SDB:VIM disable line resume

Jump to: navigation, search


Situation

You want to VIM to not resume the last line you where editing in a file but to always start at line 0.


Procedure

Remove the following lines in /etc/vimrc

" Only do this part when compiled with support for autocommands. 
if has("autocmd")
  " When editing a file, always jump to the last known cursor position. 
  " Don't do it when the position is invalid or when inside an event handler 
  " (happens when dropping a file on gvim). 
  autocmd BufReadPost *
    \ if line("'\"") > 0 && line("'\"") <= line("$") |
    \   exe "normal g`\"" |
    \ endif

endif " has("autocmd")