Public bug reported:
Binary package hint: vim-common
in /etc/vim/vimrc
the commented lines that allow one to jump to the last position when
reopening a file are incorrect. It doesn't act properly if a user
remaps g in their .vimrc . It needs an ! after the normal. It should
read:
" Uncomment the following to have Vim jump to the last position when
" reopening a file
"if has("autocmd")
" au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
" \| exe "normal! g'\"" | endif
"endif
Notice the ! after normal, that needs to be added so that it doesn't
remap the g. Obviously this is only a problem if someone uncomments
those lines, and has g remapped in their .vimrc (or vimrc.local in my
case).
to reproduce, uncomment those lines in /etc/vim/vimrc and add
noremap g >>j
to /etc/vim/vimrc.local
** Affects: vim (Ubuntu)
Importance: Undecided
Status: Unconfirmed
--
jump to last position when reopening file
https://launchpad.net/bugs/69611
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs