From 31c04cb5bb9bbe05c91222e6fc18fb50dafc8060 Mon Sep 17 00:00:00 2001 From: paras-verma Date: Wed, 22 Dec 2021 12:53:41 +0530 Subject: [PATCH] add keymap cheatsheet --- KeyMapCheatSheet.md | 93 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 KeyMapCheatSheet.md diff --git a/KeyMapCheatSheet.md b/KeyMapCheatSheet.md new file mode 100644 index 0000000..224bd38 --- /dev/null +++ b/KeyMapCheatSheet.md @@ -0,0 +1,93 @@ +# KeyMap Cheat-Sheet + +For anyone who is just starting with this neovim config! + +##### Note: + +- Vim Commands still work as they do one vanilla neovim +- All keybinds can be changed according to one's preference in the `keymaps.lua` file located at `.../nvim/lua/user/lsp/` + + - To make edits enter (Debian): + + ```sh + cd ~/.config/nvim/lua/lsp + nvim keymaps.lua + ``` + + - [Explainer (Video)](https://www.youtube.com/watch?v=435-amtVYJ8&list=PLhoH5vyxr6Qq41NFL4GvhFp-WLd5xzIzZ&index=3) + +- All commands are case sensitive +- Both `` keys (R, L) are supported for commands requiring to press one +- Press `` to open + +**Helper Menu can be accessed via ``** + +## Normal mode + +One can trigger these key-binds directly + +#### Buffers (Open Files) Navigation + +| Key-Combination | Action | Vim Key-Combination | +| :-------------: | :------------------: | :-----------------: | +| `+l` | Open Next buffer | `:bnext` | +| `+h` | Open Previous buffer | `:bprevious` | +| `+c` | Close Current Buffer | `:bd` | + +#### Window Navigation + +| Key-Combination | Action | +| :-------------: | :------------------: | +| `+h` | Move to Left Window | +| `+j` | Move to Window Below | +| `+k` | Move to Window Above | +| `+l` | Move to Right Window | + +#### Window Resize (with arrows) + +| Key-Combination | Action | Vim Key-Combination | +| :-------------: | :-------------: | :-------------------: | +| `+Up` | Increase Height | `:resize -2` | +| `+Down` | Decrease Height | `:resize +2` | +| `+Left` | Increase Width | `:vertical resize -2` | +| `+Right` | Decrease Width | `:vertical resize +2` | + +> Note: Up, Down, Left and Right are the Arrow keys + +#### Move text + +| Key-Combination | Action | Vim Key-Combination | +| :-------------: | :----------: | :-----------------: | +| `+j` | Move line up | `:m .+1` | +| `+k` | Move line up | `:m .-2` | + +#### Text Editing + +| Key-Combination | Action | Vim Key-Combination | +| :-------------: | :--------------: | :-----------------: | +| `i` | Insert Mode | `i` | +| `jk` | Exit Insert Mode | `` | + +## Visual Mode + +One needs to be in the visual mode for these binds to work + +> Note: Press `v` to enter visual mode + +#### Add Indentation + +| Key-Combination | Action | Vim Key-Combination | +| :-------------: | :-----------: | :-----------------: | +| `<` | Remove Indent | `` | Add Indent | `>gv` | + +#### Move text + +| Key-Combination | Action | Vim Key-Combination | +| :-------------: | :-------: | :-----------------: | +| `+j` | Move Down | `:m .+1` | +| `+k` | Move Up | `:m .-2` | + +**For those who are beginning with vim/neovim please visit this [site](https://devhints.io/vim) for the basic commands** + +Feel free to contribute more to this file!