Buffers and Searching Contents

Switching between what is already open

Once files are open you do not need to find them again — you need to switch.

:b rou               " jumps to routes.py

:b matches against the buffers you already have open, so it is instant. It does not touch the disk.

Searching contents, not names

When you do not know the filename at all, only something written inside it:

:vimgrep /def/ **/*.py
:copen
  • :vimgrep searches inside files and fills the quickfix list
  • **/*.py means every Python file at any depth
  • :copen shows the results as a list you can walk with Ctrl-n / Ctrl-p
  • :cclose puts it away

That is the same quickfix workflow used elsewhere in the course, aimed at your project.

The whole toolkit

WantUse
Open a file by name:find <name> with path+=**
Half remember the namefuzzy :find via findfunc
Switch to something open:b <fragment>
Search inside files:vimgrep + :copen