Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Adds vim mapping to remove trailing whitespace

  • Loading branch information...
commit 54fe9d9471229e391d6317f4ccd5a533e0fc942a 1 parent 8cf9155
Olaf Alders authored May 25, 2012

Showing 1 changed file with 3 additions and 0 deletions. Show diff stats Hide diff stats

  1. 3  vim/vimrc
3  vim/vimrc
@@ -69,6 +69,9 @@ let mapleader = ","
69 69
 nnoremap <silent> = :%!perltidy -q<Enter>
70 70
 vnoremap <silent> = :!perltidy -q<Enter>
71 71
 
  72
+"remove all trailing whitespace
  73
+:nnoremap <silent> - :let _s=@/<Bar>:%s/\s\+$//e<Bar>:let @/=_s<Bar>:nohl<CR>
  74
+
72 75
 " enables shift-tab for outdent
73 76
 exe 'set t_kB=' . nr2char(27) . '[Z'
74 77
 

0 notes on commit 54fe9d9

Please sign in to comment.
Something went wrong with that request. Please try again.