Chapter 18: Search Project-Wide with grep, vimgrep, and Others

Chapter Overview

Part V: Tools | Tips 107-112

Searching across multiple files.

Tips in This Chapter

Tip Title Mastered

107

Call grep Without Leaving Vim

[ ]

108

Customize the grep Program

[ ]

109

Grep with Vim’s Internal Search Engine

[ ]

grep Commands

Command Effect

:grep {pattern}

External grep

:vimgrep {pattern} {files}

Internal search

:lvimgrep

Populate location list

:copen

View results

grepprg Options

Setting Effect

grepprg=grep -n

Default grep

grepprg=rg --vimgrep

ripgrep

grepprg=ag --vimgrep

silver searcher

Commands Learned

Command Description Notes

Practice

Commands I tried while reading:

" (Add commands you practiced)

Questions

Things I want to explore further.

Chapter Complete

  • Read entire chapter

  • Tried all tips

  • Noted key learnings

Date completed: _