Skip to content

Commit

Permalink
Add: some useful keys in Vim mode
Browse files Browse the repository at this point in the history
  • Loading branch information
utensil committed Oct 8, 2024
1 parent c51863b commit 6608d5e
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions trees/uts-002F.tree
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
\import{macros}
% clifford hopf spin tt ag math draft tech exp notes
\tag{tech}
\tag{notes}
\tag{draft}

\mdnote{some useful keys in Vim mode}{
I'm a bit rusty on Vim mode, here are some useful keys that I like using:

- save & quit
- should stick to `cmd+s` for saving, `cmd+w` for closing a tab
- `ZZ` to save and quit
- `:q!` to quit without saving
- move
- `gg` for beginning, `G` for end
- `w`/`b` to move forward/backward by word
- shift+`w`/`b` to move by space-separated words
- left `hj` are for left, down; right `kl` are for right, up
- I can never remember this in my muscle memory
- `0` to move to the beginning of the line
- I don't like `^` and `$` because they are difficult to reach
- move & edit
- `i` to enter INSERT mode
- `A` to append at the end of the line
- `0i` to insert at the beginning of the line
- `R` to replace
- `u` to undo, surprisingly `Ctrl`+`r` to redo
- `x`/`dw`/`dd` to delete a character/word/line
- `yyp` to duplicate a line
- add a number before a command to repeat it, e.g. `3j`, `3W`, `3u` for the impatient
- search
- `/` to search forward, `n`/`p` to go to next/previous match
- `?` to search backward
- remember to press `Enter` after typing the search term
}

0 comments on commit 6608d5e

Please sign in to comment.