diff --git a/.vimrc b/.vimrc index dec2aec..7a305b7 100644 --- a/.vimrc +++ b/.vimrc @@ -239,6 +239,10 @@ nnoremap z :set nonumber! norelativenumber! " entferne trailing whitespaces beim speichern 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. autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif