| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| I know this is probably a stupid question, but is there a way to quickly use gvim to search for a pattern in all the files in a directory, whether they are .vim, .php, .js, .css, etc.? bgold12 |
|
#2
| |||
| |||
| On Aug 22, 11:12*am, bgold12 <bgol...@gmail.com> wrote: > I know this is probably a stupid question, but is there a way to > quickly use gvim to search for a pattern in all the files in a > directory, whether they are .vim, .php, .js, .css, etc.? How about this: :grep foo *.php :copen |
|
#3
| |||
| |||
| bgold12 scripsit: > I know this is probably a stupid question, but is there a way to > quickly use gvim to search for a pattern in all the files in a > directory, whether they are .vim, .php, .js, .css, etc.? > :vimgrep /pattern/ *.vim m. -- LaTeX + Vim = http://vim-latex.sourceforge.net/ Vim Universal Templates: http://vim.sf.net/script.php?script_id=1078 vim.pl - http://skawina.eu.org/mikolaj CLEWN - http://clewn.sf.net |
|
#4
| |||
| |||
| On Aug 22, 4:14*pm, Mikolaj Machowski <mikm...@wp.pl> wrote: > bgold12 scripsit: > > > I know this is probably a stupid question, but is there a way to > > quickly use gvim to search for a pattern in all the files in a > > directory, whether they are .vim, .php, .js, .css, etc.? > > :vimgrep /pattern/ *.vim > > m. > -- also :set wildignore=*.o,*.obj,*.bak,*.exe,*.aux,*.dvi,*.jpg ,*.gif,*.jpeg :vimgrep /pattern/ *.* -- zzapper Best of VimTips http://vim.wikia.com/wiki/Best_Vim_Tips |
|
#5
| |||
| |||
| zzapper wrote: >> :vimgrep /pattern/ *.vim > >also > >:set wildignore=*.o,*.obj,*.bak,*.exe,*.aux,*.dvi,*.jpg ,*.gif,*.jpeg > >:vimgrep /pattern/ *.* Are you sure? I just tried :set wildignore=*.txt :vimgrep /pattern/ * and I found *.txt files containing 'pattern'. John |
|
#6
| |||
| |||
| On Aug 24, 2:10*am, John Beckett <nom...@thanks.junk> wrote: > zzapper wrote: > >> :vimgrep /pattern/ *.vim > > >also > > >:set wildignore=*.o,*.obj,*.bak,*.exe,*.aux,*.dvi,*.jpg ,*.gif,*.jpeg > > >:vimgrep /pattern/ * *.* > > Are you sure? I just tried > > :set wildignore=*.txt > :vimgrep /pattern/ * > > and I found *.txt files containing 'pattern'. > > John Whoops It would seem that wildignore is only used for completion purposes zzapper |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.