diff --git a/.vimrc b/.vimrc index 0c5fe32..c1d91ce 100644 --- a/.vimrc +++ b/.vimrc @@ -53,7 +53,8 @@ nnoremap ev :vsp $MYVIMRC nnoremap et :exec ":vsp /Users/dblack/notes/vim/" . strftime('%m-%d-%y') . ".md" nnoremap ez :vsp ~/.zshrc nnoremap sv :source $MYVIMRC -nnoremap l :call ToggleNumber() +nnoremap l :call ToggleRelativeNumber() +nnoremap tl :call ToggleNumber() nnoremap :noh nnoremap s :mksession nnoremap a :Ag @@ -128,7 +129,7 @@ let g:airline_right_sep = '' let g:airline_right_sep = '' " }}} " Custom Functions {{{ -function! ToggleNumber() +function! ToggleRelativeNumber() if(&relativenumber == 1) set norelativenumber set number @@ -137,6 +138,13 @@ function! ToggleNumber() endif endfunc +function! ToggleNumber() + if(&relativenumber == 1) + set norelativenumber + endif + set invnumber +endfunc + " strips trailing whitespace at the end of files. this " is called on buffer write in the autogroup above. function! StripTrailingWhitespaces()