vim - search

Table of Contents

Sometimes, it is best not to run grep within Vim and to run it standalone in terminal :

In terminal, navigate to the project folder and use this :

grep -r -n -l i text_to_search *
  1. -r recursive - search in current and sub directories
  2. -n show line numbers in the results
  3. -l only list the names of the files
  4. i case insensitive search. grep is case sensitive by default

Search in files of all types

How to exclude one specific folder or a list of folders from the search results? e.g. ’node_modules’ in a javascript project?