> My OP at the end of this post.
>
> Somebody on IRC/Freenode suggested this:
>
> 1) map a key to write a non-printing character where the cursor is +
> save + quit
>
> 2) map another key to search for that non-printing character and move to
> that line.
>
>
> Any opinion on this strategy and how to implement it?
That's perfectly fine for a text file only used by you. You, as a human,
can encounter this marker in a file and not be thrown off by it. Your
code also needs to consider removing / moving that marker when needed.
That's a terrible idea for source code or system config files. A
computer, encountering unexected and syntax violating character in
something it is trying to "understand" will likely throw errors.
If you want to create a set of manual bookmarks that go to specific
places in specific files, that's what tags do. In traditional vi, so
probably in nvi, the standard tag syntax is:
tagname (tab) filename (tab) motion
Where the motion is generally in the form of a /search string/ or
a line number. Traditional vi allows *any* ex mode command for the
motion, there can be a security risk in that, so vim (and possibly
nvi) has tightened the rules.
So I'd look for a way to create/update tags for storing file locations
if it were me doing this. (I have used tags for storing bookmarks
before, but not used tags created on the fly.)
Elijah
------
or use vim and have viminfo take care of it