I just added the following lines to my .vimrc file:
    let start_comment="\\/\\*"
    let any_including_nl="\\_."
    let non_greedy="\\{-}"
    let end_comment="\\*\\/"
    let full_c_comment=start_comment . any_including_nl . non_greedy .
end_comment
    nnoremap <leader>cc /^R=full_c_comment^M^M
The intent is to make some regex building blocks that are easy to read and
combine. It works fine so far. Any gotchas I should know about? Thanks.
--
View this message in context: http://vim.1045645.n5.nabble.com/Question-on-vimrc-coding-technique-tp5721131.html
Sent from the Vim - General mailing list archive at Nabble.com.
-- 
-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
--- 
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Tuesday, March 25, 2014
Subscribe to:
Post Comments (Atom)
 
No comments:
Post a Comment