vim: multiple whitespaces
This commit is contained in:
parent
f522f0a7e8
commit
53a8901a70
1 changed files with 4 additions and 0 deletions
4
.vimrc
4
.vimrc
|
@ -238,6 +238,10 @@ autocmd BufWritePre * :%s/\s\+$//e
|
|||
if executable('cat')
|
||||
autocmd BufWritePre *.md %!cat -s
|
||||
endif
|
||||
" remove multiple whitespaces between words
|
||||
" https://stackoverflow.com/questions/5150870/efficient-way-to-remove-multiple-spaces-between-two-words-in-Vim
|
||||
autocmd BufWritePre *.md :%s/\(\w\)\s\+\(\w\)/\1 \2/g
|
||||
|
||||
|
||||
" 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
|
||||
|
|
Loading…
Reference in a new issue