1
0
forked from extern/nix-config

Add pattern matching commands to vim.md

This commit is contained in:
Donovan Glover 2018-02-14 23:23:37 -05:00
parent 36a8d263ac
commit 571f926955
No known key found for this signature in database
GPG Key ID: 8FC5F7D90A5D8F4D

View File

@ -247,6 +247,9 @@ Macros are used for complex commands that can't be repeated with `.`. They help
- To repeat a macro on only a specific set of lines, use: `:<from>,<to>norm! @<SYMBOL>`
- From line 5 to the end of the file: `:5,$norm! @<SYMBOL>`
- Repeat a macro on all lines matching a pattern: `:g/pattern/norm! @<SYMBOOL>`
- Delete all lines that contain a pattern: `:g/pattern/d`
- To catch multiple patterns, separate them with `\|`. Example: `:g/pattern_one\|pattern_two/d`
- To delete all lines that do NOT contain a pattern, use: `:v/pattern/d`
## Marking Things