summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Robin Obůrka <robin.oburka@nic.cz> 2014-03-20 12:42:04 +0100
committerGravatar Robin Obůrka <robin.oburka@nic.cz> 2014-03-20 12:42:04 +0100
commitdf5d4efd3327c6d8345a45013f66f735682c03ea (patch)
tree1754c639665fc32ed4d8d4ce3fa3751141fb305a
parentNew mapping of reformat keys (diff)
downloadvim_sync-df5d4efd3327c6d8345a45013f66f735682c03ea.tar.xz
Add line numbering switch function
-rw-r--r--.vimrc10
1 files changed, 10 insertions, 0 deletions
diff --git a/.vimrc b/.vimrc
index 7d54c1b..4eb3c29 100644
--- a/.vimrc
+++ b/.vimrc
@@ -49,4 +49,14 @@ imap <C-D> </><Esc>2F<lywf>f/pF<i<Enter><Enter><Up><Tab>
map <F12> :set textwidth=80<Enter>
map <S-F12> :set textwidth=0<Enter>
" =======================================================================
+function! NumberToggle()
+ if(&relativenumber == 1)
+ set number
+ else
+ set relativenumber
+ endif
+endfunc
+
+nnoremap <C-n> :call NumberToggle()<cr>
+" =======================================================================
source ~/.vim/hicursorwords.vim