From 8c192730121890757a19b5d40d1e3a7fcfc8c2e7 Mon Sep 17 00:00:00 2001 From: mg Date: Thu, 13 Jul 2023 10:57:01 +0200 Subject: [PATCH] vim: consecutive empty lines --- .vimrc | 4 ++++ 1 file changed, 4 insertions(+) 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