Topic: Internal Hyperlinks (1 of 11), Read 48 times
Conf: VEDIT Macro Library
From: Ian Davies
Date: Tuesday, August 14, 2007 12:04 AM

I am currently using Vedit 6.15.1. I tend to use Vedit to construct large documents which I later format appropriately for print.

In the meantime I have often pondered on how useful it would be if a sort of hyperlink could be embedded in the plain text such that by clicking on a link it would take me to the appropriate place in the document. Perhaps this already exists. If so I apologise that I haven't discovered it. But if not, then this is how I imagine such a macro might work:

The document might have at its head a series of links like
Section 1
Section 2
etc

By clicking on "Section 1" or invoking a keystroke macro like the "open at cursor" macro, I could then jump to that line in the document marked "Section 1"

Does this already exist? I would be interested to hear the comments of other users.

 


Topic: Re: Internal Hyperlinks (2 of 11), Read 45 times
Conf: VEDIT Macro Library
From: Fritz Heberlein
Date: Tuesday, August 14, 2007 03:04 AM

> In the meantime I have often pondered on how useful it would be if a sort of hyperlink could be embedded in the plain text such that by clicking on a link it would take me to the appropriate place in the document. Perhaps this already exists. If so I apologise that I haven't discovered it. But if not, then this is how I imagine such a macro might work:

You might try out Christian's hypertxt macro. It is on his Vedit fan
page: http://www.ziemski.net/vedit/

Fritz

 


Topic: Re: Internal Hyperlinks (3 of 11), Read 47 times
Conf: VEDIT Macro Library
From: Ian Davies
Date: Tuesday, August 14, 2007 04:19 PM

Thanks Fritz, I'll check it out

 


Topic: Re: Internal Hyperlinks (4 of 11), Read 46 times
Conf: VEDIT Macro Library
From: Christian Ziemski
Date: Wednesday, August 15, 2007 03:10 AM

Ian:

There are several versions of my macro...

You should use the hypertxt.vdm in the tools section and comment out line 830ff:

// quote it for long filenames with blanks
///Reg_Set(96,'"',INSERT)
///Reg_Set(96,'"',APPEND)


I'll clean up my macro site regarding hypertxt this evening.


Christian

 


Topic: Re: Internal Hyperlinks (7 of 11), Read 43 times
Conf: VEDIT Macro Library
From: Ian Davies
Date: Wednesday, August 15, 2007 01:27 PM

Christian, I have already downloaded version 3.28 of your hypertxt.vdm. I will check "Tools" to see if there is a later one.

It was not immediately apparent how this should be used, i.e. the method of marking a place and returning to it. I will study it more closely.

Many thanks.

 


Topic: Re: Internal Hyperlinks (8 of 11), Read 50 times, 1 File Attachment
Conf: VEDIT Macro Library
From: Christian Ziemski
Date: Wednesday, August 15, 2007 02:25 PM

On 8/15/2007 1:27:07 PM, Ian Davies wrote:
>Christian, I have already
>downloaded version 3.28 of
>your hypertxt.vdm. I will
>check "Tools" to see if there
>is a later one.

3.28 is the initial version number, not the last.
I attached the most current macro version to this message.

>It was not
>immediately apparent how this
>should be used, i.e. the
>method of marking a place and
>returning to it. I will study
>it more closely.


In (very) short:

Words in brackets like [example] are considered as link to an anchor within the same document.
An anchor is marked with a '@' at line begin like
@example

Links can be used by double-click or by F12.
You can jump back in history with F11.

Helpful: Shift-F1 shows a help page with some more commands.



The easiest way to find out is the following:

1) Download the syntax file:
http://www.ziemski.net/vedit/macros/hypertxt.syn
and download the example file:
http://www.ziemski.net/vedit/macros/hypertxt.htx

2) Put both of them together with hypertxt.vdm into your user-mac directory.

3) Open the above example file in VEDIT.

4) Then load/execute the user macro hypertxt.vdm


Enjoy.

Christian

 
HYPERTXT.VDM (40KB)

 


Topic: Re: Internal Hyperlinks (9 of 11), Read 48 times
Conf: VEDIT Macro Library
From: Ian Davies
Date: Wednesday, August 15, 2007 09:03 PM

Christian, Many thanks for your help. I have downloaded your latest hypertxt.vdm and related files.

I had to change a number of keystroke assignments which conflicted with existing ones, but after that was done, all worked as expected.

A curious question remains. I'd like to put this in the user.mnu file. The normal syntax is something like:

8
Hypertext Mode
#124=Reg_Free Call_File(#124,"hypertxt.vdm") Reg_Empty(#124)

This does not work with hypertxt.vdm (even if it is put in the vedit\macros and not vedit\user-mac). I am curious to know the correct way to call it.

Regards

 


Topic: Re: Internal Hyperlinks (10 of 11), Read 45 times
Conf: VEDIT Macro Library
From: Christian Ziemski
Date: Thursday, August 16, 2007 01:59 AM

Ian:

On 8/15/2007 9:03:33 PM, Ian Davies wrote:
>I have downloaded your latest hypertxt.vdm and
>related files.

>A curious question remains. I'd like to put this
>in the user.mnu file. The normal syntax is something
>like:

8
Hypertext Mode
#124=Reg_Free Call_File(#124,"hypertxt.vdm") Reg_Empty(#124)

>This does not work with hypertxt.vdm
>I am curious to know the correct way to call it.

Hypertxt is a relative complex macro which uses many text registers and assumes to be running in register 100 itself.
So consider it as an almost "standalone"-tool.

You can use the following in the user.mnu:

8
Hypertext Mode
Call_File(100,"hypertxt.vdm")


Christian

 


Topic: Internal Hyperlinks (5 of 11), Read 44 times
Conf: VEDIT Macro Library
From: Pauli Lindgren
Date: Wednesday, August 15, 2007 11:56 AM

On 8/14/2007 12:04:32 AM, Ian Davies wrote:

>In the meantime I have often pondered on how useful it
>would be if a sort of hyperlink could be embedded in
>the plain text such that by clicking on a link it would
>take me to the appropriate place in the document. Perhaps
>this already exists.

Why don't you use the bookmarks?
With bookmarks, you do not need to add any hyperlinks, just store the bookmark and then you can jump to that location from wherever you are inside the file.

Remember that bookmarks are saved with projects.

You can use bookmarks more interactively by using my Markers.vdm macro. It displays list of all bookmarks with piece of text at that location, so you can more easily identify the bookmarks.
http://koti.mbnet.fi/pkl/vedit/misc.htm#bookmarks

Another method to do "hyperlinks" is to add any unique piece of text at target location, and the same text e.g. at the beginning of the file. Then use search to find the location.
On my keyboard, I have configured numpad + and - keys to search for highlighted block forward and backwards, respectively. This makes it very easy to find text (usefull for searching variables etc. in source code, too).

You could even add the id texts (with descriptions) in a separate file and then use Wildfile to search for the text in all files. This could be used as kind of global bookmarks.

--
Pauli

 


Topic: Internal Hyperlinks (6 of 11), Read 44 times
Conf: VEDIT Macro Library
From: Ian Davies
Date: Wednesday, August 15, 2007 01:19 PM

Pauli, you have given me some useful lines of enquiry to pursue. I will try your Markers.vdm.

I have never used "projects" so I didn't immediately consider the concept of bookmarks. I'll now study it more closely.

Many thanks for your suggestions.

 


Topic: Internal Hyperlinks (11 of 11), Read 38 times
Conf: VEDIT Macro Library
From: Ian Binnie
Date: Thursday, August 16, 2007 09:56 PM

On 8/15/2007 11:56:33 AM, Pauli Lindgren wrote:
>On 8/14/2007 12:04:32 AM, Ian Davies
>wrote:
>
>You can use bookmarks more interactively
>by using my Markers.vdm macro. It
>displays list of all bookmarks with
>piece of text at that location, so you
>can more easily identify the bookmarks.
>http://koti.mbnet.fi/pkl/vedit/misc.htm#
>bookmarks

This is a very handy macro.
I never used more than 2 or 3 markers, because I could never remember where they pointed.