wklken/k-vim — pull request #14 by Garnel (2013-10-25 04:45:45+00:00)
Title: update vimrc for vim74 compatibility

all about line number
1. add norelativenumber! in key map :
nnoremap :set norelativenumber! nonumber! number?
2. when change status between number and relativenumber, shutdown the other one first:
au FocusLost * :set norelativenumber number
au FocusGained * :set nonumber relativenumber
" 插入模式下用绝对行号, 普通模式下用相对
autocmd InsertEnter * :set norelativenumber number
autocmd InsertLeave * :set nonumber relativenumber
function! NumberToggle()
if(&relativenumber == 1)
set norelativenumber number
else
set nonumber relativenumber
endif
endfunc
nnoremap :call NumberToggle()