You are not logged in.
I may not always use them, but I find macros very convenient at times, especially on files with very large amounts of data with patterns all over the place http://vim.wikia.com/wiki/Macros If you don't know how to use them, you should definitely check them out when you have the time.
Offline
* To delete trailing whitespaces automatically during saving, but exclude in *.patch files.
function RemoveTrailingSpace()
if expand('%') =~? '\.patch$'
return
endif
try
%s/\s\+$//
norm! ``
catch /E486/
endtry
endfunction
autocmd BufWritePre * call RemoveTrailingSpace()
* Automatic ctags handling
function! UPDATE_TAGS()
let _f_ = expand("%:p")
let _cmd_ = '"ctags -a -R $HOME/Targizi/pacman-3.2.2/ --c++-kinds=+p --fields=+iaS --extra=+q " ' . '"' . _f_ . '"'
let _resp = system(_cmd_)
unlet _cmd_
unlet _f_
unlet _resp
endfunction
au BufWritePost *.cpp,*.h,*.c call UPDATE_TAGS()
" au BufWritePre * %s/\s\+$//e | norm! ``
* some plugins, like vim-nerdcommenter, vim-pastie
Some others, you can see my vimrc in similar threads
Offline