When modifying code I find I often have to go through dozens of files to change the simplest of things. For example lets say I have a function pretty_print
and I change it to conform to camel case prettyPrint
. Now I want to go through the files apple1.js
to apple99.js
, and possibly a few orange.js
files in there. Is there a quick way to do this in Vim?
NOTE: this is not something I can automate, I actually need to go in and modify the code myself.
I know I can do :b <fileName>
, but, although it supports name completion/pattern matching, I don't think the pattern is carried over.
For example, if I do
:b apple*.js
and I hit tab, I'll get
:b apple1.js
but if I revisit that function (either by pressing :
+ upArrow or q:
) then if I hit tab it won't go to
:b apple2.js
What I want is to specify something like
:b apple*.js
edit the file, then when I type :w
, it moves to the next buffer. I would prefer to stay in Vim, I don't want to come out, type vim apple*.js
, go back into Vim and then use the :x
command. I realize this works, but I still need all the other files in case I want to, for example jump between tags.