Skip to content

Commit

Permalink
Enhance vim config: auto delete trailing spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
turicas authored and s-celles committed Jun 21, 2016
1 parent 7addd83 commit 56464b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ hi TABs ctermbg=Red ctermfg=LightRed guibg=Red guifg=LightRed term=italic
hi TrSp ctermbg=DarkGray ctermfg=Red guibg=DarkGray guifg=Red term=italic
call matchadd("TABs", "\t") " All TABs but the trailing ones
call matchadd("TrSp", "\\s\\+$") " Trailing TABs and spaces
autocmd BufWritePre * :%s/\s\+$//e " Removes trailing spaces when save buffer

" Paste mouse selected text with Shift+Insert
if has('gui_running')
map <S-Insert> <MiddleMouse>
map! <S-Insert> <MiddleMouse>
endif

0 comments on commit 56464b8

Please sign in to comment.