The company I work for uses special headers for source files, which contain the date of last modification.
I wrote a vim script that updates this date automatically on each buffer write.
I am using the search/substitue feature to do the trick.
Now the problem is that the replace does move the cursor at the beginning of the file, which is very annoying because at each buffer write, the user has to jump back manually to the previous editing position.
Does anyone know a way to prevent vim from jumping when updating the date, or at least to make it jump back to the previous position?