This is a work-in-progress.
List of all additional keybindings on top of the default Neovim keybindings.
For more details see plugins configuration.
<leader>gg: git status<leader>gc: git commit<leader>gd: diff<leader>gh: file history<leader>gl: git log
Normal-mode:
<leader>dv: open diffview- :DiffviewOpen HEAD~2
- :DiffviewOpen HEAD
4..HEAD2 - :DiffviewOpen d4a7abd
- :DiffviewOpen origin/main...HEAD
- :DiffviewOpen HEAD~2 -- foo.lua
<leader>dc: close diffview<leader>dh: diffview file history
Visual-mode:
<leader>d: diffview file history
On Diffview:
- File panel (Left):
j/k: next/previous<tab>/<s-tab>: next/previous entry<leader>b: toggle panelg<C-x>: cycle layout]x/[x: next/previous conflict-: toggle stageS: Stage allU: Unstage allX: Restore entry<c-b>: scroll up<c-f>: scroll downi: listing stylef: flatten dirsR: refresh
- view (Right):
<leader>co: our changest: their changesb: base changesa: all changes
dx: none of the changesu: undo<tab>/<s-tab>: next/previous entry]x/[x: next/previous conflictg<C-x>: cycle layout
Navigation:
]c: next hunk[c: previous hunk
Actions:
<leader>hs: stage hunk<leader>hS: stage buffer<leader>hu: undo stage hunk<leader>hr: reset hunk<leader>hR: reset buffer<leader>hp: preview hunk<leader>hb: blame line<leader>tb: toggle blame line<leader>hd: diff buffer<leader>hD: diff hunk<leader>td: toggle deleted
<leader>S: Open spectre<leader>ss: Replace current word<leader>sw: Replace currend word in file
-
ga: EasyAlign- Example:
gaip=-> inner paragraph, align around '=' - Visual also works!
- Example:
-
gaip: inner paragraph=: around 1st occurrences2=: around 2st occurrences*=: around all occurrences<enter>: Switching betweeen left/right/center alignment modes
-
gaip<space>for align around whitespaces -
gaip,comma
NORMAL mode:
-
gcc- Toggles the current line using linewise comment -
gbc- Toggles the current line using blockwise comment -
[count]gcc- Toggles the number of line given as a prefix-count using linewise -
[count]gbc- Toggles the number of line given as a prefix-count using blockwise -
gc[count]{motion}- (Op-pending) Toggles the region using linewise comment -
gb[count]{motion}- (Op-pending) Toggles the region using blockwise comment -
gco- Insert comment to the next line and enters INSERT mode -
gcO- Insert comment to the previous line and enters INSERT mode -
gcA- Insert comment to end of the current line and enters INSERT mode
VISUAL mode:
gc- Toggles the region using linewise commentgb- Toggles the region using blockwise comment
leader here refers to VM_leader (default '\')
Extended mode (normal mode):
- [count]: Find Word
n: nextN: select previousq: skip and find nextQ: remove current]: go to next[: go to previousy/d/c/~/gu/gU(don't wait for a motion)s: select region e.gsiwR: replace pattern in regionS: surround (depends on nvim-surround)- Find Word also works on Visual/Select mode. Select part of a word and
<C-a>: increase numbers
\\A: select all words in the file\\/: regex
Cursor mode (normal mode):
-
<C-Down>/<C-Up>: Add Cursor Down/Up -
<S-Right>and<S-Down>: Select Right/Left -
{y/d/c}<motion> -
s: select region e.g3<C-Down>siwwould create 3 cursors and select the current word -
\\aor\\<or\\>: Align (each do a different thing) E.g. Align the three bullet points: put your curson on the first'-'and press2<C-Down>\\<-- s... - s... - s... -
Tab: Switch cursor and extended mode
Visual-mode:
\\c: create cursors from visual selection
vim-visual-multi can do a lot more, but this is enough to take out 80% of it.
Normal:
ys{motion}{char}: addds{char}: deletecs{target}{replacement}: change
Visual/Select:
S{char}: add
More at https://github.com/kylechui/nvim-surround/blob/main/doc/nvim-surround.txt
]s: Move to the next misspelt word
[s: Move to the previous misspelt word
z=: Provide suggestions (you can entire the suggestion ID and enter to replace the word)
zg: Add a word to the dictionary
More at spell
Better undo
U: open undo tree?: help
Navigation:
[d: next diagnostic]d: previous diagnostic
Normal:
-
gd: go to definition -
gD: go to definition (vsplit) -
gr: go to references -
gi: go to implementation -
K: hover short docs -
<C-k>: hover long docs -
<leader>ca: code action -
<leader>me: Show errors under cursor -
<leader>mf: format -
<leader>mr: rename -
<leader>mR: Restart LSP -
<leader>mL: Show LSP logs -
<leader>wa: add workspace folder -
<leader>wr: remove workspace folder -
<leader>wl: list workspace folders
<leader>ma: Hover code actions<leader>mc: Open *.cabal<leader>mC: Open stack.yaml<leader>mh: Telescope hoogle<CR>: entry to clipboard<C-b>: open in browser
<leader>mH: Telescope hoogle under cursor<CR>: entry to clipboard<C-b>: open in browser<C-r>: replace word under cursor
<leader>mt: repl buffer<leader>mT: repl project<leader>ml: repl load file<leader>mq: quit repl
Snippets are defined here.
Normal:
<C-space>: complete<C-e>: abort<CR>: confirm<Tab>: next<S-Tab>: previous<C-d>: scroll up (dialog)<C-f>: scroll down (dialog)
Snippet:
<Tab>: next<S-Tab>: previous
Better quicklist, lsp references, etc.
Trouble commands are under the prefix x.
In a quicklist:
j: nextk: previous<cr>/<tab>: jump and closeq: close<c-s>: open hsplit<c-v>: open vsplit
zc: Closec: Closeo: Openr: Fold lessR: Open all foldsm: Fold moreM: Close all foldsp: Preview<c-u>: scroll up<c-d>: scroll down
This plugin is disabled
For help: g?
- Agenda:
<leader>oa - Capture:
<leader>oc - Org files:
<Tab>/<S-Tab>: toggle folding<</>>: promote headline<s/>s: promote subtree<leader><cr>: add headline/list item<C-space>: checkbox<leader>oi: insert timestamp/deadline/headline/todo item<C-a>\<C-x>: increase/decrease datecid: change date via calendar
Tutorial: https://github.com/nvim-orgmode/orgmode/wiki/Getting-Started