diff options
-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 2ce00b1..f5ec1fd 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -10,7 +10,6 @@ nnoremap "+p :let @"=substitute(system("wl-paste --no-newline"), '<C-v><C-m>', ' nnoremap "*p :let @"=substitute(system("wl-paste --no-newline --primary"), '<C-v><C-m>', '', 'g')<cr>p nnoremap <leader>cd :cd %:p:h<CR>:pwd<CR> - filetype plugin indent on let g:netrw_banner = 0 @@ -28,6 +27,14 @@ augroup fileExplore au VimEnter * :wincmd l augroup END +" dynamic line numbers +" insert: absolute numbers; normal: relative numbers +:augroup numbertoggle +: autocmd! +: autocmd BufEnter,FocusGained,InsertLeave,WinEnter * if &nu && mode() != "i" | set rnu | endif +: autocmd BufLeave,FocusLost,InsertEnter,WinLeave * if &nu | set nornu | endif +:augroup END + syntax on cnoremap sudow w !sudo tee % >/dev/null |