Loading ...
Sorry, an error occurred while loading the content.

24767Re: Fixing the year in a copyright line

Expand Messages
  • Benji Fisher
    Jan 3, 2002
      Martin Metz wrote:
      > Hello,
      > 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

      :help restore-position

      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
    • Show all 13 messages in this topic