diff options
Diffstat (limited to 'vim/.vimrc')
-rw-r--r-- | vim/.vimrc | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -1,3 +1,7 @@ +" Different config for each filetype +filetype plugin on + +" Show trailing spaces highlight ExtraWhitespace ctermbg=red guibg=red match ExtraWhitespace /\s\+$/ autocmd BufWinEnter * match ExtraWhitespace /\s\+$/ @@ -5,15 +9,17 @@ autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/ autocmd InsertLeave * match ExtraWhitespace /\s\+$/ autocmd BufWinLeave * call clearmatches() - -filetype plugin on +" Clear trailing spaces on <F2> +function TrimWhiteSpace() + %s/\s*$// + '' +:endfunction +nnoremap <F2> :call TrimWhiteSpace()<CR> " Fold set foldmethod=syntax set foldlevelstart=99 - - " HighLight search and map CarrierReturn to remove highlight set hlsearch nnoremap <CR> :noh<CR><CR> |