I'm trying to get a few code straightening commands to fire, one after
another:
" Cleanup Formating
command! CleanupWhitespace %s/\s\+$//g
command! CleanupFrontParens %s/\(if\|elseif\|foreach\|for\)(\([^ ]\)/\1
( \2/g
command! CleanupRearParens %s/\([^ ]\)) {/\1 ) {/g
command! CleanupFrontBools %s/\([^ ]\)\(&&\|||\)/\1 \2/g
command! CleanupRearBools %s/\(&&\|||\)\([^ ]\)/\1 \2/g
noremap <silent>
<F5> :CleanupWhitespace<Bar>CleanupFrontParens<Bar>CleanupRearParens<Bar>CleanupFrontBools<bar>CleanupRearBools<bar>:nohl<CR>
Unfortunately, execution stops after the first substitution
(CleanWhitespace), if nothing is found. I dug through the help docs,
couldn't find a way to do this.
Any suggestions?
Thanks!
Justin
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment