Friday, May 20, 2011

bash script using vim commands?

I would like to execute a bash script from the terminal with two vim commands. This script is useful to delete the comments of C++ files recursively (subfolders too)

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?

--
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

No comments: