24767Re: Fixing the year in a copyright line
- Jan 3, 2002Martin Metz wrote:
> I'm also very glad of the below given code and use it with an
> autocommand when writing a buffer. But one detail is ugly:
> Because of the "search()" the cursor position changes. That's not
> important if I close the VIM. But if I just save the current buffer e.
> g. with ":w" I loose the current position and stay at the copyright
> message. :-(
> Does any one have a good idea to jump back to the old position? Maybe
> with marks? I'm currently to stupid to find a solution.
To do it with marks, see
If you are doing it from inside a script, and want to avoid using marks (which
are global) then look at the Mark() function in foo.vim:
HTH --Benji Fisher
- << Previous post in topic Next post in topic >>