Wednesday, April 3, 2013

execute user defined command and press enter

I created the following command
command! -nargs=1 Vim :call VimGrep("<args>", g:dir_list) | copen | cc

The problem that I'm having is that it is asking me to press enter after it is executed. How can I avoid it? How can I make it open the quickfix list automatically without vim telling me to press enter. I tried putting <cr> at the end of the command, but then I get following error:

E488: Trailing characters cc^M

Any help is appreciated.

--
--
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/groups/opt_out.

No comments:

Post a Comment