Bug#467057: /etc/vim/vimrc: Sample "jump to last position" does not work if 'g' remapped

Andrew McCarthy andrewmc-debian at celt.dias.ie
Fri Feb 22 18:22:04 UTC 2008


Package: vim-common
Version: 1:7.1-241+1
Severity: minor
File: /etc/vim/vimrc

In Debian's /etc/vim/vimrc the following example appears:

" 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

If the 'g' key has been remapped, this will not work correctly. It
should read:

"if has("autocmd")
"  au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
"    \| exe "normal! g'\"" | endif
"endif

Note the exclamation mark after "normal".

Thanks!


-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.22-3-686 (SMP w/2 CPU cores)
Locale: LANG=en_IE.UTF-8, LC_CTYPE=en_IE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages vim-common depends on:
ii  libc6                         2.7-6      GNU C Library: Shared libraries

Versions of packages vim-common recommends:
ii  vim                          1:7.1-241+1 Vi IMproved - enhanced vi editor
ii  vim-gtk                      1:7.1-241+1 Vi IMproved - enhanced vi editor -

-- no debconf information





More information about the pkg-vim-maintainers mailing list