-
Notifications
You must be signed in to change notification settings - Fork 1
docs(nvim): add documentation for neovim #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Prakhar1808
wants to merge
8
commits into
LilSuperUser:main
Choose a base branch
from
Prakhar1808:docs/nvim-documentation
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
e8f9215
docs(nvim): add documentation for neovim
Prakhar1808 a6a0e66
docs: add more keymaps
Prakhar1808 7b119b7
docs: nvim keymaps sorted by plugins
Prakhar1808 a3090eb
Merge branch 'LilSuperUser:main' into docs/nvim-documentation
Prakhar1808 80ae950
docs(nvim:keymaps): add Mode Column
Prakhar1808 dca138f
docs(nvim:keymaps): add remaining keymaps
Prakhar1808 31551ae
docs: add Table Of Contents
Prakhar1808 30b43d9
docs: fix broken links in table of content
Prakhar1808 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,288 @@ | ||
| # LilSuperUser's Dotfiles | ||
| ## Nvim Dotfiles | ||
| ### Keymaps | ||
| > _even though keymaps are available and very easy to understand after installing the configuration, here's the keymaps for the lazy (pun intended) crowd_ | ||
|
|
||
| how a keymap works? | ||
| `<space>mf` for example means pressing the leader key i.e. space (default) then press m and then f | ||
|
|
||
| --- | ||
|
|
||
| ## Table of Contents | ||
|
|
||
| - [General](#general) | ||
| - [Clipboard](#clipboard) | ||
| - [Tabs](#tabs) | ||
| - [Splits](#splits) | ||
| - [Snacks](#snacks) | ||
| - [Linting](#linting) | ||
| - [Mini](#mini-filescommenttrailspace) | ||
| - [Telescope](#telescope) | ||
| - [Harpoon](#harpoon) | ||
| - [Git (Fugitive)](#git-fugitive) | ||
| - [Git (Gitsigns)](#git-gitsigns) | ||
| - [Git (Worktree)](#git-worktree) | ||
| - [Trouble](#trouble) | ||
| - [Multi-Cursor](#multi-cursor) | ||
| - [Color-Picker](#color-picker) | ||
| - [LSP Commands](#lsp-commands) | ||
| - [Clasp](#clasp-auto-pairing) | ||
| - [Oil](#oil-file-explorer) | ||
| - [Folding (Ufo)](#folding-ufo) | ||
| - [Misc](#misc) | ||
|
|
||
| --- | ||
|
|
||
| ### General | ||
| | Function | Keymap | Mode | | ||
| | -------------- | --------------- | ----- | | ||
| | Move lines down in visual selection | `J` | v | | ||
| | Move lines up in visual selection | `K` | v | | ||
| | Join current line with one below | `J` | n | | ||
| | Scroll up (cursor centered) | `<C-d>` | n | | ||
| | Scroll down (cursor centered) | `<C-u>` | n | | ||
| | Next search match (centered) | `n` | n | | ||
| | Previous search match (centered) | `N` | n | | ||
| | Clear search highlight | `<leader>C` | n | | ||
| | Indent selection left (keep selection) | `<` | v | | ||
| | Indent selection right (keep selection) | `>` | v | | ||
| | Format current buffer with LSP | `<leader>f` | n | | ||
| | Format whole file or range (conform) | `<leader>mf` | n/v | | ||
| | Replace current word globally | `<leader>r` | n | | ||
| | Make current file executable | `<leader>X` | n | | ||
| | Execute current file | `<leader>XX` | n | | ||
| | Build project in build directory | `<leader>mk` | n | | ||
| | Build and run tests | `<leader>rt` | n | | ||
| | Copy file path to clipboard | `<leader>fp` | n | | ||
| | Toggle LSP diagnostics | `<leader>lx` | n | | ||
| | Buffer Local Keymaps (which-key) | `<leader>?` | n | | ||
|
|
||
| --- | ||
|
|
||
| ### Clipboard | ||
| | Function | Keymap | Mode | | ||
| | -------------- | --------------- | ----- | | ||
| | Paste without replacing clipboard | `<leader>P` | x | | ||
| | Paste without copying selection | `p` | v | | ||
| | Delete without yanking | `x` | n | | ||
| | Delete to black hole (char) | `<leader>Ds` | n/v | | ||
| | Delete to black hole (line) | `<leader>Dl` | n/v | | ||
|
|
||
| --- | ||
|
|
||
| ### Tabs | ||
| | Function | Keymap | Mode | | ||
| | -------------- | --------------- | ----- | | ||
| | Open a new tab | `<leader>to` | n | | ||
| | Open current file in new tab | `<leader>tO` | n | | ||
| | Close current tab | `<leader>tx` | n | | ||
| | Move to next tab | `<leader>tn` | n | | ||
| | Move to previous tab | `<leader>tp` | n | | ||
|
|
||
| --- | ||
|
|
||
| ### Splits | ||
| | Function | Keymap | Mode | | ||
| | -------------- | --------------- | ----- | | ||
| | Split window vertically | `<leader>sv` | n | | ||
| | Split window horizontally | `<leader>sh` | n | | ||
| | Make splits equal size | `<leader>se` | n | | ||
| | Close current split | `<leader>sx` | n | | ||
| | Move to left split | `<C-h>` | n | | ||
| | Move to below split | `<C-j>` | n | | ||
| | Move to up split | `<C-k>` | n | | ||
| | Move to right split | `<C-l>` | n | | ||
|
|
||
| --- | ||
|
|
||
| ### Snacks | ||
| | Function | Keymap | Mode | | ||
| | -------------- | --------------- | ----- | | ||
| | TODO/Fix/FIXME | `<space>pT` | n | | ||
| | Look through ToDo comments | `<space>pt` | n | | ||
| | Next todo comment | `]t` | n | | ||
| | Previous todo comment | `[t` | n | | ||
| | Disable Indentated Lines | `<space>ic` | n | | ||
| | Enable Indentated Lines | `<space>io` | n | | ||
| | Help Pages | `<space>vh` | n | | ||
| | Pick & Switch Git Branches | `<space>gbr` | n | | ||
| | Pick Color Schemes | `<space>th` | n | | ||
| | Search Man Pages | `<space>pm` | n | | ||
| | Search Registers | `<space>p'` | n | | ||
| | Search Keymaps | `<space>pk` | n | | ||
| | Grep a visual selection | `<space>pvs` | v | | ||
| | Grep Something | `<space>pw` | n | | ||
| | Find nvim config files | `<space>pc` | n | | ||
| | Find Files | `<space>pf` | n | | ||
| | Close Buffer | `<space>dB` | n | | ||
| | Fast Rename Current File | `<space>R` | n | | ||
| | Git diff (hunks) | `<space>gd` | n | | ||
| | Lazygit Logs | `<space>gl` | n | | ||
| | Lazygit | `<space>lg` | n | | ||
|
|
||
| --- | ||
|
|
||
| ### Linting | ||
| | Function | Keymap | Mode | | ||
| | -------------- | --------------- | ----- | | ||
| | Trigger linting for current file | `<space>l` | n | | ||
|
|
||
| --- | ||
|
|
||
| ### Mini (Files/Comment/Trailspace) | ||
| | Function | Keymap | Mode | | ||
| | -------------- | --------------- | ----- | | ||
| | Open MiniFiles explorer | `<leader>e` | n | | ||
| | Open MiniFiles at current file | `<leader>E` | n | | ||
| | Toggle hidden files | `<leader>H` | n | | ||
| | Trim trailing whitespace | `<leader>ts` | n | | ||
| | Clear trailing whitespace highlight | `<leader>tc` | n | | ||
|
|
||
| --- | ||
|
|
||
| ### Telescope | ||
| | Function | Keymap | Mode | | ||
| | -------------- | --------------- | ----- | | ||
| | Fuzzy find recent files | `<leader>pr` | n | | ||
| | Fuzzy find notifications | `<leader>pn` | n | | ||
| | Find word under cursor | `<leader>pWs` | n | | ||
| | Switch themes | `<leader>ths` | n | | ||
|
|
||
| --- | ||
|
|
||
| ### Harpoon | ||
| | Function | Keymap | Mode | | ||
| | -------------- | --------------- | ----- | | ||
| | Add file to harpoon | `<leader>ha` | n | | ||
| | Toggle harpoon quick menu | `<leader>hl` | n | | ||
| | Jump to file 1 | `<leader>1` | n | | ||
| | Jump to file 2 | `<leader>2` | n | | ||
| | Jump to file 3 | `<leader>3` | n | | ||
| | Jump to file 4 | `<leader>4` | n | | ||
| | Remove file 1 | `<leader>d1` | n | | ||
| | Remove file 2 | `<leader>d2` | n | | ||
| | Remove file 3 | `<leader>d3` | n | | ||
| | Remove file 4 | `<leader>d4` | n | | ||
|
|
||
| --- | ||
|
|
||
| ### Git (Fugitive) | ||
| | Function | Keymap | Mode | | ||
| | -------------- | --------------- | ----- | | ||
| | Open Git status | `<leader>gg` | n | | ||
| | Git push (fugitive buffer) | `P` | n | | ||
| | Git pull with rebase (fugitive buffer) | `p` | n | | ||
| | Set upstream (fugitive buffer) | `t` | n | | ||
|
|
||
| --- | ||
|
|
||
| ### Git (Gitsigns) | ||
| | Function | Keymap | Mode | | ||
| | -------------- | --------------- | ----- | | ||
| | Next hunk | `]h` | n | | ||
| | Previous hunk | `[h` | n | | ||
| | Stage hunk | `<leader>gs` | n/v | | ||
| | Reset hunk | `<leader>gr` | n/v | | ||
| | Stage buffer | `<leader>gS` | n | | ||
| | Reset buffer | `<leader>gR` | n | | ||
| | Undo stage hunk | `<leader>gu` | n | | ||
| | Preview hunk | `<leader>gp` | n | | ||
| | Toggle line blame | `<leader>gB` | n | | ||
| | Diff this | `<leader>gd` | n | | ||
| | Diff this ~ | `<leader>gD` | n | | ||
| | Select hunk | `ih` | o/x | | ||
|
|
||
| --- | ||
|
|
||
| ### Git (Worktree) | ||
| | Function | Keymap | Mode | | ||
| | -------------- | --------------- | ----- | | ||
| | List git worktrees | `<leader>gwt` | n | | ||
| | Create git worktree | `<leader>gwc` | n | | ||
|
|
||
| --- | ||
|
|
||
| ### Trouble | ||
| | Function | Keymap | Mode | | ||
| | -------------- | --------------- | ----- | | ||
| | Workspace diagnostics | `<leader>xw` | n | | ||
| | Document diagnostics | `<leader>xd` | n | | ||
| | Symbols/todos | `<leader>xt` | n | | ||
| | Location list | `<leader>xl` | n | | ||
| | Quickfix list | `<leader>xq` | n | | ||
|
|
||
| --- | ||
|
|
||
| ### Multi-Cursor | ||
| | Function | Keymap | Mode | | ||
| | -------------- | --------------- | ----- | | ||
| | Line Skip Cursor (+1) | `<space>j` | n | | ||
| | Line Skip Cursor (-1) | `<space>k` | n | | ||
|
|
||
| --- | ||
|
|
||
| ### Color-Picker | ||
| | Function | Keymap | Mode | | ||
| | -------------- | --------------- | ----- | | ||
| | Toggle color highlighter | `<leader>cc` | n | | ||
|
|
||
| --- | ||
|
|
||
| ### LSP Commands | ||
| | Function | Keymap | Mode | | ||
| | -------------- | --------------- | ----- | | ||
| | Show LSP info | `:LspInfo` | n | | ||
| | Stop LSP clients | `:LspStop` | n | | ||
| | Start LSP | `:LspStart` | n | | ||
| | Restart LSP | `:LspRestart` | n | | ||
| | Show LSP references | `gR` | n | | ||
| | Go to declaration | `gD` | n | | ||
| | Show LSP definitions | `gd` | n | | ||
| | Show LSP implementations | `gi` | n | | ||
| | Show LSP type definitions | `gt` | n | | ||
| | Code actions | `<leader>vca` | n/v | | ||
| | Smart rename | `<leader>rn` | n | | ||
| | Show buffer diagnostics | `<leader>D` | n | | ||
| | Show line diagnostics | `<leader>d` | n | | ||
| | Show documentation (hover) | `K` | n | | ||
| | Restart LSP (buffer) | `<leader>rs` | n | | ||
| | Signature help (insert mode) | `<C-h>` | i | | ||
|
|
||
| --- | ||
|
|
||
| ### Clasp (Auto-pairing) | ||
| | Function | Keymap | Mode | | ||
| | -------------- | --------------- | ----- | | ||
| | Wrap next (forward) | `<C-;>` | n/i | | ||
| | Wrap previous (backward) | `<C-'>` | n/i | | ||
| | Undo in insert mode | `<C-u>` | i | | ||
|
|
||
| --- | ||
|
|
||
| ### Oil (File Explorer) | ||
| | Function | Keymap | Mode | | ||
| | -------------- | --------------- | ----- | | ||
| | Open parent directory | `-` | n | | ||
| | Open parent directory (floating) | `<leader>-` | n | | ||
| | Toggle hidden files | `g.` | n | | ||
| | Show help | `g?` | n | | ||
| | Refresh | `<C-r>` | n | | ||
| | Close | `q` | n | | ||
|
|
||
| --- | ||
|
|
||
| ### Folding (Ufo) | ||
| | Function | Keymap | Mode | | ||
| | -------------- | --------------- | ----- | | ||
| | Open all folds | `zR` | n | | ||
| | Close all folds | `zM` | n | | ||
| | Fold / Unfold at cursor | `za` | n | | ||
|
|
||
| --- | ||
|
|
||
| ### Misc | ||
| | Function | Keymap | Mode | | ||
| | -------------- | --------------- | ----- | | ||
| | Wrap with abbreviation | `<leader>xe` | n/v | | ||
| | Clear notifications | `<leader>cn` | n | | ||
| | Toggle undo-tree | `<leader>u` | n | | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some keymaps are still missing in the documentation.
I suggest taking checking out each plugin's config and then documenting the keymaps. (Not all of the keymaps are shown by
which-keypluginThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll make sure to make the necessary changes