Skip to content

Instantly share code, notes, and snippets.

@amadeus
Created October 2, 2013 18:54
Show Gist options
  • Select an option

  • Save amadeus/6798724 to your computer and use it in GitHub Desktop.

Select an option

Save amadeus/6798724 to your computer and use it in GitHub Desktop.
" TESTING: Toggle whitespace save
function! ToggleWhitespaceSave()
if exists('b:pw') && b:pw == 1
unlet b:pw
echo 'Stripping whitespace on save'
else
let b:pw = 1
echo 'Preserving whitespace on save'
endif
endfunction
nnoremap <leader>pw :call ToggleWhitespaceSave()<cr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment