vim: relative Zeilennummern
This commit is contained in:
parent
5027fbc824
commit
94f357049a
1 changed files with 9 additions and 2 deletions
11
.vimrc
11
.vimrc
|
@ -163,8 +163,6 @@ nnoremap <C-k> :bprev<CR>
|
||||||
" Saner CTRL-L
|
" Saner CTRL-L
|
||||||
" https://github.com/mhinz/vim-galore#saner-ctrl-l
|
" https://github.com/mhinz/vim-galore#saner-ctrl-l
|
||||||
nnoremap <Leader>dh :nohlsearch<cr>:diffupdate<cr>:syntax sync fromstart<cr><c-l>
|
nnoremap <Leader>dh :nohlsearch<cr>:diffupdate<cr>:syntax sync fromstart<cr><c-l>
|
||||||
" toggle linenumbers
|
|
||||||
nnoremap <Leader>z :set nonu!<CR>
|
|
||||||
" toggle cursorline
|
" toggle cursorline
|
||||||
nnoremap <Leader>h :set nocursorline!<CR>
|
nnoremap <Leader>h :set nocursorline!<CR>
|
||||||
" strg+f sucht fuzzy nach dateien
|
" strg+f sucht fuzzy nach dateien
|
||||||
|
@ -189,3 +187,12 @@ vnoremap <Leader>sr y:%s/<C-R>"//gc<Left><Left><Left>
|
||||||
" ### Abbreviations
|
" ### Abbreviations
|
||||||
iabbrev ncicht nicht
|
iabbrev ncicht nicht
|
||||||
iabbrev nciht nicht
|
iabbrev nciht nicht
|
||||||
|
|
||||||
|
" linenumbers
|
||||||
|
nnoremap <Leader>z :set nonumber! norelativenumber!<CR>
|
||||||
|
" https://jeffkreeftmeijer.com/vim-number/
|
||||||
|
: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
|
||||||
|
|
Loading…
Reference in a new issue