mirror of
https://github.com/donovanglover/nix-config.git
synced 2025-06-20 09:47:57 +02:00
Add pattern matching commands to vim.md
This commit is contained in:
parent
36a8d263ac
commit
571f926955
@ -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>`
|
- 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>`
|
- 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>`
|
- 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
|
## Marking Things
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user