Skip to content

Commit

Permalink
Toggle on WinEnter and WinLeave
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffkreeftmeijer committed Oct 26, 2017
1 parent 055b3f3 commit cfaecb9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugin/number_toggle.vim
@@ -1,9 +1,9 @@
" vim-numbertoggle - Automatic toggling between 'hybrid' and absolute line numbers
" Maintainer: <https://jeffkreeftmeijer.com>
" Version: 2.1.0
" Version: 2.1.1

augroup numbertoggle
autocmd!
autocmd BufEnter,FocusGained,InsertLeave * if &nu | set rnu | endif
autocmd BufLeave,FocusLost,InsertEnter * if &nu | set nornu | endif
autocmd BufEnter,FocusGained,InsertLeave,WinEnter * if &nu | set rnu | endif
autocmd BufLeave,FocusLost,InsertEnter,WinLeave * if &nu | set nornu | endif
augroup END

0 comments on commit cfaecb9

Please sign in to comment.