Vim: How do I map vimgrep command to avoid typing the file pattern? -
i search in projects using vimgrep command in fahsion:
:vimgrep /{pattern}/gj app_name/**/*.py all significant source code lives inside app_name directory , search inside python files, create command avoid writing search path on , on (i'm using project specific vimrc custom mappings). this:
:proj_search {pattern}
you can use command
command -nargs=1 projsearch vimgrep /<args>/gj app_name/**/*.py edit: mcubik pointed out
user-defined commands must start capital letter. cannot use
":x",":next",":print". underscore cannot used! can use digits, discouraged.
Comments
Post a Comment