vim notes
This commit is contained in:
parent
d999ecfadd
commit
c039afa780
5 changed files with 54 additions and 0 deletions
15
349ceffd.md
Normal file
15
349ceffd.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
date: 2021-03-29T21:24
|
||||
tags:
|
||||
- vim
|
||||
---
|
||||
|
||||
# mark basics
|
||||
|
||||
`m{a-zA-Z}`: set a "bookmark" at a cursor position.
|
||||
|
||||
`'{mark}`: jumps the cursor to first non-whitespace character on the line with.
|
||||
|
||||
`` `{mark}``: jump the cursor to the exact mark position.
|
||||
|
||||
Uppercase marks are global, and by default are persisted across sessions.
|
10
38003bd5.md
Normal file
10
38003bd5.md
Normal file
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
date: 2021-03-29T21:21
|
||||
tags:
|
||||
- vim
|
||||
---
|
||||
|
||||
# search is a motion
|
||||
|
||||
Don't forget, search is a motion, and can be combined with other actions,
|
||||
like `d` (delete): `d/foo<CR>`.
|
10
6d0a076e.md
Normal file
10
6d0a076e.md
Normal file
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
date: 2021-03-29T21:14
|
||||
tags:
|
||||
- vim
|
||||
---
|
||||
|
||||
# display lines
|
||||
|
||||
Interacting with display lines (vs real lines) is easier when you prefix
|
||||
motion commands with a `g`.
|
9
f0b50398.md
Normal file
9
f0b50398.md
Normal file
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
date: 2021-03-29T21:30
|
||||
tags:
|
||||
- vim
|
||||
---
|
||||
|
||||
# the jump list is primarily for between-file motions
|
||||
|
||||
`<C-o>` & `<C-i>` & `:jumps`
|
10
f0e5cfc1.md
Normal file
10
f0e5cfc1.md
Normal file
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
date: 2021-03-29T21:32
|
||||
tags:
|
||||
- vim
|
||||
---
|
||||
|
||||
# the `gf` motion will jump to the filename under the cursor
|
||||
|
||||
The `suffixadd` option needs to be set, although most common filetype plugins
|
||||
should handle this automatically.
|
Loading…
Add table
Reference in a new issue