On Saturday 21 May 2011 02:26:21 shawn wilson wrote: > On May 21, 2011 12:30 AM, "Antonio Recio" <[email protected]> wrote: > > The two commands to delete the comments of C++ files are: > > :%s!\s*//.*\|/\*\_.\{-}\*/ > > :g/^\s*$/d > > > > How I can add this commands to my bash script?
I think it's: vim -s scriptfile Be sure you end the scriptfile with :wq or you'll need to manually do that. > > The right tool for the job I think: sed, awk, perl, lisp, etc. I > don't think vim is the right tool. I used to do that stuff all the time. I still do sometimes. > > That said, I'm sure there's a way. OTOH, if you're a hammer, > everything looks like a nail :) Another way of saying that is if you want to learn the use of fifty similar tools, you won't need a hammer as much. But if you're really good at a hammer, you can use a much smaller toolbox. SteveT Steve Litt Recession Relief Package http://www.recession-relief.US Twitter: http://www.twitter.com/stevelitt -- 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
