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

24767Re: Fixing the year in a copyright line

Expand Messages
  • Benji Fisher
    Jan 3, 2002
    • 0 Attachment
      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.
      [snip]

      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:

      http://vim.sourceforge.net/scripts/script.php?script_id=72

      HTH --Benji Fisher
    • Show all 13 messages in this topic