diff --git a/README.md b/README.md new file mode 100644 index 0000000..dc3f2a6 --- /dev/null +++ b/README.md @@ -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? +`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) +- [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) +- [Oil](#oil) +- [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) | `` | n | +| Scroll down (cursor centered) | `` | n | +| Next search match (centered) | `n` | n | +| Previous search match (centered) | `N` | n | +| Clear search highlight | `C` | n | +| Indent selection left (keep selection) | `<` | v | +| Indent selection right (keep selection) | `>` | v | +| Format current buffer with LSP | `f` | n | +| Format whole file or range (conform) | `mf` | n/v | +| Replace current word globally | `r` | n | +| Make current file executable | `X` | n | +| Execute current file | `XX` | n | +| Build project in build directory | `mk` | n | +| Build and run tests | `rt` | n | +| Copy file path to clipboard | `fp` | n | +| Toggle LSP diagnostics | `lx` | n | +| Buffer Local Keymaps (which-key) | `?` | n | + +--- + +### Clipboard +| Function | Keymap | Mode | +| -------------- | --------------- | ----- | +| Paste without replacing clipboard | `P` | x | +| Paste without copying selection | `p` | v | +| Delete without yanking | `x` | n | +| Delete to black hole (char) | `Ds` | n/v | +| Delete to black hole (line) | `Dl` | n/v | + +--- + +### Tabs +| Function | Keymap | Mode | +| -------------- | --------------- | ----- | +| Open a new tab | `to` | n | +| Open current file in new tab | `tO` | n | +| Close current tab | `tx` | n | +| Move to next tab | `tn` | n | +| Move to previous tab | `tp` | n | + +--- + +### Splits +| Function | Keymap | Mode | +| -------------- | --------------- | ----- | +| Split window vertically | `sv` | n | +| Split window horizontally | `sh` | n | +| Make splits equal size | `se` | n | +| Close current split | `sx` | n | +| Move to left split | `` | n | +| Move to below split | `` | n | +| Move to up split | `` | n | +| Move to right split | `` | n | + +--- + +### Snacks +| Function | Keymap | Mode | +| -------------- | --------------- | ----- | +| TODO/Fix/FIXME | `pT` | n | +| Look through ToDo comments | `pt` | n | +| Next todo comment | `]t` | n | +| Previous todo comment | `[t` | n | +| Disable Indentated Lines | `ic` | n | +| Enable Indentated Lines | `io` | n | +| Help Pages | `vh` | n | +| Pick & Switch Git Branches | `gbr` | n | +| Pick Color Schemes | `th` | n | +| Search Man Pages | `pm` | n | +| Search Registers | `p'` | n | +| Search Keymaps | `pk` | n | +| Grep a visual selection | `pvs` | v | +| Grep Something | `pw` | n | +| Find nvim config files | `pc` | n | +| Find Files | `pf` | n | +| Close Buffer | `dB` | n | +| Fast Rename Current File | `R` | n | +| Git diff (hunks) | `gd` | n | +| Lazygit Logs | `gl` | n | +| Lazygit | `lg` | n | + +--- + +### Linting +| Function | Keymap | Mode | +| -------------- | --------------- | ----- | +| Trigger linting for current file | `l` | n | + +--- + +### Mini (Files/Comment/Trailspace) +| Function | Keymap | Mode | +| -------------- | --------------- | ----- | +| Open MiniFiles explorer | `e` | n | +| Open MiniFiles at current file | `E` | n | +| Toggle hidden files | `H` | n | +| Trim trailing whitespace | `ts` | n | +| Clear trailing whitespace highlight | `tc` | n | + +--- + +### Telescope +| Function | Keymap | Mode | +| -------------- | --------------- | ----- | +| Fuzzy find recent files | `pr` | n | +| Fuzzy find notifications | `pn` | n | +| Find word under cursor | `pWs` | n | +| Switch themes | `ths` | n | + +--- + +### Harpoon +| Function | Keymap | Mode | +| -------------- | --------------- | ----- | +| Add file to harpoon | `ha` | n | +| Toggle harpoon quick menu | `hl` | n | +| Jump to file 1 | `1` | n | +| Jump to file 2 | `2` | n | +| Jump to file 3 | `3` | n | +| Jump to file 4 | `4` | n | +| Remove file 1 | `d1` | n | +| Remove file 2 | `d2` | n | +| Remove file 3 | `d3` | n | +| Remove file 4 | `d4` | n | + +--- + +### Git (Fugitive) +| Function | Keymap | Mode | +| -------------- | --------------- | ----- | +| Open Git status | `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 | `gs` | n/v | +| Reset hunk | `gr` | n/v | +| Stage buffer | `gS` | n | +| Reset buffer | `gR` | n | +| Undo stage hunk | `gu` | n | +| Preview hunk | `gp` | n | +| Toggle line blame | `gB` | n | +| Diff this | `gd` | n | +| Diff this ~ | `gD` | n | +| Select hunk | `ih` | o/x | + +--- + +### Git (Worktree) +| Function | Keymap | Mode | +| -------------- | --------------- | ----- | +| List git worktrees | `gwt` | n | +| Create git worktree | `gwc` | n | + +--- + +### Trouble +| Function | Keymap | Mode | +| -------------- | --------------- | ----- | +| Workspace diagnostics | `xw` | n | +| Document diagnostics | `xd` | n | +| Symbols/todos | `xt` | n | +| Location list | `xl` | n | +| Quickfix list | `xq` | n | + +--- + +### Multi-Cursor +| Function | Keymap | Mode | +| -------------- | --------------- | ----- | +| Line Skip Cursor (+1) | `j` | n | +| Line Skip Cursor (-1) | `k` | n | + +--- + +### Color-Picker +| Function | Keymap | Mode | +| -------------- | --------------- | ----- | +| Toggle color highlighter | `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 | `vca` | n/v | +| Smart rename | `rn` | n | +| Show buffer diagnostics | `D` | n | +| Show line diagnostics | `d` | n | +| Show documentation (hover) | `K` | n | +| Restart LSP (buffer) | `rs` | n | +| Signature help (insert mode) | `` | i | + +--- + +### Clasp (Auto-pairing) +| Function | Keymap | Mode | +| -------------- | --------------- | ----- | +| Wrap next (forward) | `` | n/i | +| Wrap previous (backward) | `` | n/i | +| Undo in insert mode | `` | i | + +--- + +### Oil (File Explorer) +| Function | Keymap | Mode | +| -------------- | --------------- | ----- | +| Open parent directory | `-` | n | +| Open parent directory (floating) | `-` | n | +| Toggle hidden files | `g.` | n | +| Show help | `g?` | n | +| Refresh | `` | 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 | `xe` | n/v | +| Clear notifications | `cn` | n | +| Toggle undo-tree | `u` | n |