vim: Move numbertoggle autocmd into settings.vim
Step by step I want to restructure the vim files. The approach to cleanly divide the config by topics works in zsh pretty well, but is too vague in vim for my liking. Especially (the very small) functions and autocommands that have the purpose of setting options or mapping keys or the interplay of multiple categories together, make it difficult to decide in which file the snippets should lay.
This commit is contained in:
@@ -57,9 +57,3 @@ augroup highlight_current_word
|
||||
au CursorHold * :exec 'match CursorColumn /\V\<' . escape(expand('<cword>'), '/\') . '\>/'
|
||||
au CursorMoved * :exec 'match'
|
||||
augroup END
|
||||
|
||||
augroup numbertoggle
|
||||
au!
|
||||
au BufEnter,FocusGained,InsertLeave,WinEnter * if &nu | set rnu | endif
|
||||
au BufLeave,FocusLost,InsertEnter,WinLeave * if &nu | set nornu | endif
|
||||
augroup END
|
||||
|
||||
Reference in New Issue
Block a user