From 6608d5ea9fcffe68d05f74e8886dd2030deb45e6 Mon Sep 17 00:00:00 2001 From: utensil Date: Tue, 8 Oct 2024 22:58:56 +0800 Subject: [PATCH] Add: some useful keys in Vim mode --- trees/uts-002F.tree | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 trees/uts-002F.tree diff --git a/trees/uts-002F.tree b/trees/uts-002F.tree new file mode 100644 index 0000000..a0fb3df --- /dev/null +++ b/trees/uts-002F.tree @@ -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 +}