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 6187103
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T02:00:11+00:00 2026-05-24T02:00:11+00:00

I normally do a find -type f | xargs grep ‘something’ and try to

  • 0

I normally do a find -type f | xargs grep 'something' and try to open those files in the Vim. What is happening is, I have to close and open Vim sessions and sometimes, I have to do the find operation again, if I had lost the result. Is there a way to automate this in Vim, like I would like the Vim to open all these files into separate buffers so that I can switch between them seamlessly? Note that I am looking if I can execute these find commands from within Vim (using !) and then load those files as buffers.

Any other tricks you would use, if you are in for above situation?

  • 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-24T02:00:12+00:00Added an answer on May 24, 2026 at 2:00 am

    Vim has several commands integrating and implementing Grep capabilities (see
    :help grep). The two major ones are :grep and :vimgrep. The former
    uses external Grep program (set by grepprg option), while the latter uses
    core Grep functionality implemented in Vim itself.

    The main advantages of the internal :vimgrep are Vim regex syntax and
    portability, that includes ** glob wildcard. The :vimgrep command
    understands a subset of extended glob patterns (see :help wildcard). This
    allows to avoid find command in most of the cases. Using :vimgrep, your
    example search would look like the following.

    :vimgrep /something/ **/*
    

    The same search can be performed with :grep command, if your shell or
    grepprg implements the ** wildcard. Below is an example showing Zsh
    extendned glob notation.

    :grep 'something' **/*(.)
    

    Both of these commands (and their variants) utilize Vim interface features
    called QuickFix list and its window-local version, location list (see :help
    quickfix
    ). The QuickFix window is a special read-only buffer containing any
    kind of search results relating one or several files. Search results
    collected by Grep commands are immediately aggregated in the QuickFix window.

    The QuickFix list represents each matching position of the search pattern by
    a single line, and allows to quickly switch between them by pressing
    Enter on these lines. There is not a few commands related to the
    QuickFix list. Here I list only some of them as a starting point (see help
    for additional information).

    • :cw or :cope open the QuickFix window (see help to understand the
      difference between them).
    • :cc, :cn, :cp display the current, the next, and the previous
      match in the list, respectively.
    • :cr, :cla display the first, and the last match in the list,
      respectively.
    • :ccl closes the QuickFix window.

    A location list is a QuickFix list attached to a certain window. Each window
    can have a single location list attached to it (independent from other
    windows’ location lists and the QuickFix list). Any QuickFix list command
    of those listed above has an equivalent working with a location list.

    • :lw or :lop open the location list associated with the current
      window.
    • :ll, :lne, :lp display the current, the next, and the previous
      match in the list, respectively.
    • :lr, :lla display the first, and the last match in the list,
      respectively.
    • :lcl closes the location list.

    Location list counterparts of the :grep and :vimgrep commands are :lgrep
    and :lvimgrep, respectively.

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

Sidebar

Related Questions

Normally I create web application projects and use code-behind, but I have a requirement
I often find myself with fairly complex data that represents something that my objects
It appears like something is stopping my errors from displaying normally an in ASP.NET
When running bundler, I normally type: bundle install However, I accidentally added another string
I have a function that is normally called while looping inside a SqlDataReader, that
I have an array of structures, sorted on a member of a structure, something
So pretty straight forward but I cant find the answer. Say I have an
I'm trying to understand what's happening here: I have a supervisor that is cyclically
I have some issue I can't find any info about! I did a clean
I have the following function below that will normally spit out a URL such

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.