54556Re: bookmarks: helpful for source code writing
- Oct 25, 2004Neil Zanella <nzanella@...> wrote:
> Hello,These are known as "marks" in Vim parlance. Their use is explained starting
> I need the following feature in vim:
> - I want to be able to bookmark source code (or other) files.
at ":help mark-motions". Since you want to be able to use them to jump from
one file to another, what you want are the "file marks". You can have at
most 26 of them ('A to 'Z), which remember not only file names but also
cursor positions. There are also 26 "local" marks for each file ('a to 'z)
and 10 read-only marks ('0 to '9) showing where the cursor was the 10 latest
times you quit Vim. All those marks (and the jump history) can remembered
from one run of Vim to the next by means of the viminfo file (see ":help
viminfo" and ":help 'viminfo'").
> - I want to be able to split the screen so that one screen displaysThe following quick'n-dirty scriptlet does it. (It clobbers the unnamed
> bookmarks, consisting of absolute path names to files.
> - Highlighting a path name brings me to the source code for that fileYou would need to write a function for that, possibly wrap it in a
> in the other
> window in the split.
user-command, and map it buffer-locally to the Enter key. It is possible,
probably rather easily, but it's not ready-made AFAIK (I don't know
everything though). See
You might also try to search the scripts database at
http://vim.sourceforge.net/ -- I'm not sure what to use as a search key.
> Is this possible. I would even be surprised if it hadn't been done.
- << Previous post in topic Next post in topic >>