I want to write myFunc function to:
myFunc /function foo/
becomes
:vimgrep /function foo/ **/*.cpp **/*.hpp
and
myFunc /class bar: public/
vimgrep /class bar: public/ **/*.cpp **/*.hpp
how to do it?
Thanks!
:command -nargs=1 MyFunc vimgrep <args> **/*.cpp **/*.hpp :MyFunc /Hello world/
You might want to check out the plugin I wrote called EasyGrep . It supports native support when using tracked mode. What you can do is place the cursor over the word (or visually select some text) and type <leader> vv, and it will look for everything * .cpp * .hpp * .cxx * .hxx * .cc * .c * .h for drawing. When you get used to the <leader> vv set, this is significantly faster than typing: Command / Pattern /.
Source: https://habr.com/ru/post/1300155/More articles:A regular expression for receiving alphanumeric characters (6-10 characters). NET, C # - c #Saving master data and user interface performance - objective-cC Programming - Converting an Integer to Binary - cCan I use Zend_Log to handle PHP errors? - phpXSLT: can the abs value be used? - javaHow to identify Unicode keys when a key is pressed? - unicodeSpring MVC 3.0.0 application will not load on Weblogic Server 11gR1 - ClassCastException - javaGWT Stock Watcher - Poll Not Push? - gwtParse RSS pubDate to Date object in JavaScript - javascriptJSON parsing in .NET runtime - jsonAll Articles