Skip to content

Commit

Permalink
Merge pull request #50 from bubuntux/patch-1
Browse files Browse the repository at this point in the history
keep norelativenumbers on insert mode when focus re-gained
  • Loading branch information
jeffkreeftmeijer authored Dec 30, 2020
2 parents c05d78c + 78e6250 commit 4cad062
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugin/number_toggle.vim
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
" vim-numbertoggle - Automatic toggling between 'hybrid' and absolute line numbers
" Maintainer: <https://jeffkreeftmeijer.com>
" Version: 2.1.1
" Version: 2.1.2

augroup numbertoggle
autocmd!
autocmd BufEnter,FocusGained,InsertLeave,WinEnter * if &nu | set rnu | endif
autocmd BufEnter,FocusGained,InsertLeave,WinEnter * if &nu && mode() != "i" | set rnu | endif
autocmd BufLeave,FocusLost,InsertEnter,WinLeave * if &nu | set nornu | endif
augroup END

0 comments on commit 4cad062

Please sign in to comment.