vim: consecutive empty lines

This commit is contained in:
Michael Grote 2023-07-13 10:57:01 +02:00
parent 7983fb98cb
commit 8c19273012

4
.vimrc
View file

@ -239,6 +239,10 @@ nnoremap <Leader>z :set nonumber! norelativenumber!<CR>
" entferne trailing whitespaces beim speichern " entferne trailing whitespaces beim speichern
autocmd BufWritePre * :%s/\s\+$//e autocmd BufWritePre * :%s/\s\+$//e
" entferne multiple consecutive empty lines
if executable('cat')
autocmd BufWritePre *.md %!cat -s
endif
" Exit Vim if NERDTree is the only window remaining in the only tab. " Exit Vim if NERDTree is the only window remaining in the only tab.
autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif