diff options
author | Daniel Weipert <code@drogueronin.de> | 2022-01-20 13:09:28 +0100 |
---|---|---|
committer | Daniel Weipert <code@drogueronin.de> | 2022-01-20 13:09:28 +0100 |
commit | 3f7f2009a38e64f1f4ef8a0104f3528fa4d13026 (patch) | |
tree | 40a800941bc31f974a9ddcf76903c947f8830129 /.config | |
parent | 706089cafe16a0b9a6faad2d111269f4faf9b4a4 (diff) |
Smart vim ruler hybrid mode
Diffstat (limited to '.config')
-rw-r--r-- | .config/nvim/init.vim | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index b152723..194624a 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -40,9 +40,16 @@ nnoremap <SPACE> <Nop> let mapleader=" " set shiftwidth=2 -set number set mouse=a +" ruler +set relativenumber number +augroup numbertoggle + autocmd! + autocmd BufEnter,WinEnter * if &nu && mode() != 'i' | set relativenumber | endif + autocmd BufLeave,WinLeave * if &nu | set norelativenumber | endif +augroup END + colorscheme darcula hi Normal guibg=NONE ctermbg=NONE |