Skip to content

Instantly share code, notes, and snippets.

@bennypowers
Created May 22, 2022 16:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bennypowers/4af7986744e03c115020cbe0e07f4fa7 to your computer and use it in GitHub Desktop.
Save bennypowers/4af7986744e03c115020cbe0e07f4fa7 to your computer and use it in GitHub Desktop.
nvim mappings cheatsheet

🔭 Telescope Mappings

Mapping Action
<C-n>/<Down> Next item
<C-p>/<Up> Previous item
j/k Next/previous (in normal mode)
H/M/L Select High/Middle/Low (in normal mode)
'gg/G' Select the first/last item (in normal mode)
<CR> Confirm selection
<C-x> Go to file selection as a split
<C-v> Go to file selection as a vsplit
<C-t> Go to a file in a new tab
<C-u> Scroll up in preview window
<C-d> Scroll down in preview window
<C-/> Show mappings for picker actions (insert mode)
? Show mappings for picker actions (normal mode)
<C-c> Close telescope
<Esc> Close telescope (in normal mode)
<Tab> Toggle selection and move to next selection
<S-Tab> Toggle selection and move to prev selection
<C-q> Send all items not filtered to quickfixlist (qflist)
<M-q> Send all selected items to qflist

✏️ Insert Mode Mappings

Mapping Action
<C-h> delete the character before the cursor during insert mode
<C-w> delete word before the cursor during insert mode
<C-j> begin new line during insert mode
<C-t> indent (move right) line one shiftwidth during insert mode
<C-d> de-indent (move left) line one shiftwidth during insert mode
<C-n> insert (auto-complete) next match before the cursor during insert mode
<C-p> insert (auto-complete) previous match before the cursor during insert mode
<C-rx> insert the contents of register x
<C-ox> Temporarily enter normal mode to issue one normal-mode command x.

🛰️ Command Mode

Mapping Action
q: (normal mode) Edit command history
<C-f> Edit command history
<C-c> Exit command history
<C-b>/<C-e> Cursor to beginning/end of cmd-line
<C-w> Delete word before cursor
<C-u> Delete all until cursor
<S-left>/<S-right> Back/Forward one word
<style> #page-header { display: none; } #page-ctn { max-width: 100vw; } section > section:first-child { grid-row: span 2 } .markdown-body { display: grid; grid-template-columns: max-content max-content; gap: 1em; } .markdown-body h2 { margin-top: 0; border-bottom: 0; } .markdown-body { padding: 0; background: var(--color-bg-primary); border: none; } </style>
@bennypowers
Copy link
Author

Screen Shot 2022-05-22 at 19 03 21

Print On A4, landscape, ~81% scale, 0 horizontal margin, 10mm top margin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment