Skip to content

Commit 092bed4

Browse files
committed
docs(vim): optimize custom key bindings docs
1 parent 6252024 commit 092bed4

1 file changed

Lines changed: 102 additions & 62 deletions

File tree

README.md

Lines changed: 102 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,10 @@ The supported platforms currently are macOS and Linux.
8282
- [Vim/Neovim](#VimNeovim)
8383
- [Leader Key](#Leader-Key)
8484
- [Custom Key Bindings](#Custom-key-bindings)
85-
- [Normal Mode](#Normal-mode)
86-
- [Insert Mode](#Insert-mode)
87-
- [Visual Mode](#Visual-Mode)
88-
- [Command-Line Mode](#Command-Line-Mode)
85+
- [Tabs Management](#Tabs-management)
86+
- [Cursor Movement](#Cursor-movement)
87+
- [Text Edit](#Text-edit)
88+
- [Others](#Others)
8989
- [Custom Snippets](#Custom-Snippets)
9090
- [Markdown](#Markdown)
9191
- [Vim/Neovim Plugins](#VimNeovim-Plugins)
@@ -352,8 +352,6 @@ or
352352
$ icons
353353
```
354354

355-
<++>
356-
357355
### <a name="With-Keyboard-ShortcutsHotkey"></a>With Keyboard Shortcuts/Hotkey [](#ColorschemeTheme)
358356

359357
> `ctrl a` follows is the tmux prefix key.
@@ -911,62 +909,104 @@ The vim leader key has been changed from `\`(default) to `,`.
911909

912910
### <a name="Custom-key-bindings"></a>Custom Key Bindings [](#VimNeovim)
913911

914-
#### <a name="Normal-Mode"></a>Normal Mode [](#Custom-key-bindings)
915-
916-
- `Y` : Copy from the cursor position to the end of the line
917-
- `E` : Edit `~/.vimrc` or `~/.config/nvim/init.vim` in the new split window
918-
- `R` : Reload `~/.vimrc` or `~/.config/nvim/init.vim`
919-
- `Ctrl` `s`: Toggle spell check
920-
- `Ctrl` `k`/`j`/`h`/`l` : Move the cursor to up/down/left/right window
921-
- `Ctrl` `e`/`y` : Move the screen down or up by 3 lines step
922-
- `0` : Move the cursor to the first non-blank character, if already at the first character, then to the first character.
923-
- `,` `1`/`2`/`3`... : Go to the specific tab
924-
- `,` `0` : Go to the last tab
925-
- `Option/Alt` `1`/`2`/`3`... : Go to the specific tab
926-
- `Option/Alt` `0` : Go to the last tab
927-
- `,` `fn` : Go to the next tab
928-
- `,` `fp` : Go to the previous tab
929-
- `Ctrl` `t` : Create new tab
930-
- `,` `fh` : Move the tab to the left
931-
- `,` `fl` : Move the tab to the right
932-
- `,` `qo` : Close all tabs except current one
933-
- `,` `qq` : Close current tab
934-
- `,` `q` `1`/`2`/`3` ... : Close the specific tab
935-
- `,` `q` `0` : Close the last tab
936-
937-
#### <a name="Insert-Mode"></a>Insert Mode [](#Custom-key-bindings)
938-
939-
- `Ctrl` `p`/`n`/`b`/`f` : Move the cursor to up/down/left/right
940-
- `Ctrl` `e` : Move the cursor to the end of the line
941-
- `Ctrl` `a`: Press twice for moving the cursor to the first non-blank character,
942-
and press twice once again for moving the cursor to the first character.
943-
> NOTE: Press twice coz `Ctrl` `a` is also the tmux prefix key.
944-
- `Option/Alt` `b`/`f` : Move the cursor to left/right by one word step
945-
- `Ctrl` `h`/`l` : Delete a character from left/right
946-
- `Ctrl` `d` : Delete from the cursor position to the end of the line.
947-
- `Ctrl` `u` : Delete from the cursor position to the head of the line.
948-
- `Ctrl` `w` : Delete a word from left
949-
- `Ctrl` `s`: Toggle spell check
950-
- `Option/Alt` `1`/`2`/`3`... : Go to the specific tab
951-
- `Option/Alt` `0` : Go to the last tab
952-
953-
#### <a name="Visual-Mode"></a>Visual Mode [](#Custom-key-bindings)
954-
955-
- `0` : Move the cursor to the first non-blank character, if it already at the first character,
956-
then to the first character.
957-
- `>`/`<`: Use `>` or `<` to indent without exiting visual mode
958-
- `,` `)`/`]`/`}`/`"`/`'` : Surround the selected text by `)` or `]` or `}` or `"` or `'`
959-
960-
#### <a name="Command-Line-Mode"></a>Command-Line Mode [](#Custom-key-bindings)
961-
962-
- `Ctrl` `b`/`f` : Move the cursor to left/right
963-
- `Ctrl` `p`/`n` : Go through history commands from up/down
964-
- `Ctrl` `a`/`e` : Move the cursor to the first character or the end of the line
965-
- `Option/Alt` `b`/`f` : Move the cursor to left/right by one word step
966-
- `Ctrl` `h`/`l` : Delete a character from left/right
967-
- `Ctrl` `d` : Delete from the cursor position to the end of the line.
968-
- `Ctrl` `u` : Delete from the cursor position to the head of the line.
969-
- `Ctrl` `w` : Delete a word from left
912+
#### <a name="Tabs-management"></a>Tabs Management [](#Custom-key-bindings)
913+
914+
- Normal Mode
915+
916+
- `Ctrl` `t` : Create new tab
917+
- `,` `1`/`2`/`3`... : Go to the specific tab
918+
- `,` `0` : Go to the last tab
919+
- `Option/Alt` `1`/`2`/`3`... : Go to the specific tab
920+
- `Option/Alt` `0` : Go to the last tab
921+
- `,` `fn` : Go to the next tab
922+
- `,` `fp` : Go to the previous tab
923+
- `,` `fh` : Move the tab to the left
924+
- `,` `fl` : Move the tab to the right
925+
- `,` `qo` : Close all tabs except current one
926+
- `,` `qq` : Close current tab
927+
- `,` `q` `1`/`2`/`3` ... : Close the specific tab
928+
- `,` `q` `0` : Close the last tab
929+
930+
- Insert Mode
931+
932+
- `Option/Alt` `1`/`2`/`3`... : Go to the specific tab
933+
- `Option/Alt` `0` : Go to the last tab
934+
935+
#### <a name="Cursor-movement"></a>Cursor Movement [](#Custom-key-bindings)
936+
937+
- Normal Mode
938+
939+
- `Ctrl` `k`/`j`/`h`/`l` : Move the cursor to up/down/left/right window
940+
- `Ctrl` `e`/`y` : Move the screen down or up by 3 lines step
941+
- `0` : Move the cursor to the first non-blank character,
942+
if already at the first character, then to the first character.
943+
944+
- Insert Mode
945+
946+
- `Ctrl` `p`/`n`/`b`/`f` : Move the cursor to up/down/left/right
947+
- `Ctrl` `e` : Move the cursor to the end of the line
948+
- `Ctrl` `a`: Press twice for moving the cursor to the first non-blank character,
949+
and press twice once again for moving the cursor to the first character.
950+
> NOTE: Press twice coz `Ctrl` `a` is also the tmux prefix key.
951+
- `Option/Alt` `b`/`f` : Move the cursor to left/right by one word step
952+
953+
- Visual Mode
954+
955+
- `0` : Move the cursor to the first non-blank character,
956+
if it already at the first character, then to the first character.
957+
958+
- Command-Line Mode
959+
960+
- `Ctrl` `b`/`f` : Move the cursor to left/right
961+
- `Ctrl` `p`/`n` : Go through history commands from up/down
962+
- `Ctrl` `a`/`e` : Move the cursor to the first character or the end of the line
963+
- `Option/Alt` `b`/`f` : Move the cursor to left/right by one word step
964+
965+
#### <a name="Text-Edit"></a>Text Edit [](#Custom-key-bindings)
966+
967+
- Insert Mode
968+
969+
- `Ctrl` `h`/`l` : Delete a character from left/right
970+
- `Ctrl` `d` : Delete from the cursor position to the end of the line.
971+
- `Ctrl` `u` : Delete from the cursor position to the head of the line.
972+
- `Ctrl` `w` : Delete a word from left
973+
974+
- Visual Mode
975+
976+
- `,` `)`/`]`/`}`/`"`/`'` : Surround the selected text by `)` or `]` or `}` or `"` or `'`
977+
- `>`/`<`: Use `>` or `<` to indent without exiting visual mode
978+
979+
- Command-Line Mode
980+
981+
- `Ctrl` `h`/`l` : Delete a character from left/right
982+
- `Ctrl` `d` : Delete from the cursor position to the end of the line.
983+
- `Ctrl` `u` : Delete from the cursor position to the head of the line.
984+
- `Ctrl` `w` : Delete a word from left
985+
986+
#### <a name="Others"></a>Others [](#Custom-key-bindings)
987+
988+
- Normal Mode
989+
990+
- `E` : Edit `~/.vimrc` or `~/.config/nvim/init.vim` in the new split window
991+
- `R` : Reload `~/.vimrc` or `~/.config/nvim/init.vim`
992+
- `Y` : Copy from the cursor position to the end of the line
993+
- `Ctrl` `s`: Toggle spell check
994+
- `,` `z` : Zoom window
995+
- `,` `n` : Toggle line number
996+
- `,` `va` : Select all lines
997+
- `,` `vf` : Select from the current line to the end of line
998+
- `,` `vb` : Select from the current line to the first of line
999+
- `,` `ya` : Yank all lines
1000+
- `,` `yf` : Yank from the current line to the end of line
1001+
- `,` `yb` : Yank from the current line to the first of line
1002+
1003+
- Insert Mode
1004+
1005+
- `Ctrl` `s`: Toggle spell check
1006+
1007+
- Command-Line Mode
1008+
1009+
- `:W` : Use sudo to save
9701010

9711011
### <a name="Custom-Snippets"></a>Custom Snippets [](#VimNeovim)
9721012

0 commit comments

Comments
 (0)