Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6775689
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:56:11+00:00 2026-05-26T15:56:11+00:00

When modifying code I find I often have to go through dozens of files

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T15:56:11+00:00Added an answer on May 26, 2026 at 3:56 pm

    Probably the most suitable solution for you in this case would be to use the
    grep capabilities integrated in Vim. The following command performs a search
    for the pattern \<pretty_print\> in files matching the wildcard apple*.js,
    and stores locations of the pattern’s occurrences in the quickfix list
    allowing to easily jump through all the matches.

    :vimgrep /\<pretty_print\>/ apple*.js
    

    For more detailed introduction into the quickfix list with regard to searching
    in files, see my answer to the question “Loading a set of files obtained
    via cmd-exec into Vim buffers
    “.

    If you would like to simply open a list of files matching a particular
    wildcard, load that files’ names into the argument list

    :args apple*.js
    

    and then navigate between them using :n and :N, as usual.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Have you ever created or encountered a self modifying code in Java? If yes,
I am modifying my PHP network's code to have user roles like wordpress here
I'm stepping through someone else's code to find what's breaking mine under a certain,
I have some inherited code that I am modifying. However, I am seeing something
I have been modifying the code here: WhereIsMyMac to try and get a better
I'm modifying inherited code and keep getting a weird cannot find symbol error which
Modifying a jQuery plugin, I have lines of code as follows: var currentread =
I'm modifying some code that calls enumerate on a list declared via a list
I've been modifying some code to work between Mac OS X and iPhone OS.
I'm new to C# and directly diving into modifying some code for a project

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.