💾 Archived View for dissolved.space › notes › 2020-12-01-vim-commands.gmi captured on 2022-01-08 at 13:38:32. Gemini links have been rewritten to link to archived content
View Raw
More Information
⬅️ Previous capture (2021-12-03)
-=-=-=-=-=-=-
Vim commands I forget to use
Elusive
- Relative line numbers for vertical movement. I still do too many repeated j's and k's.
- e — Move to end of word.
- ]p — Paste at indentation level.
- =`] — After a paste it will automatically reformat what was pasted.
- CTRL-6 CTRL-^ — Switch to last opened buffer.
- gv — Reselect last visual selection.
- v_o — Move to other end of selection.
- v_O — Move to other corner of block selection.
- vaBVy va{Vy [{V%y — Yank a brace code block from inside including full lines.
- $V%y — Same but if on a line before first brace.
- [[ ]] [] ][ — Next or prev brace in first column.
- [m ]m [M ]M — Next or prev method (second level nested braces), either start or end.
- CTRL-p CTRL-n — Complete word, prioritising either "previous" or "next" words. Can be use without and leading text also.
- cc C — Same as dd and D but put into insert mode afterwards.
- CTRL-xCTRL-k — Complete leading text from dictionary (not spell checking).
- CTRL-xCTRL-t — Suggest alternatives from thesaurus.
- i_CTRL-a — In insert mode paste in the previously inserted text.
- i_CTRL-h — Backspace alternative
- i_CTRL-r" — Put from unnamed register in insert mode
Committed to memory!
- f F t T ; — Move to next / prev matching character on line. The quick-scope [1] plugin is a terrific help for this.
- CTRL-[ — Alternative to ESC key. Remapped keyboard CAPSLOCK for CTRL to make this easier. Could have just remapped CAPSLOCK for ESC, but I get more utility out of having CTRL there.
1: quick-scope
Feed