Dumping ground for my notes as I learn, and configure my own NeoVim. Herein: mostly shortcuts/how-to notes.

NeoVim

Warning

Herein are keymaps specific to my neovim configuration. Many are standard, many are not Click Here to Browse My Config on Github

Helpful References:

Which-Key plugin shows available shortcuts after leader key press. Common entry points below:

\ - Leader key, access all shortcuts from here (hit it once, then backspace to see ALL available) \? - to see buffer-local keymaps \f - File / Find \s - Search \g - Git

GoTo

$ - Goto end of line K

General Operations

My BindingMy VerbiageDefaultModeDescription
Save:wC
Quit:qC
Reset:e!CResets current buffer (Abandon active file changes)
CopyyV”Yank” (copy selected region)
CutdV”Delete” (cut selected region)
PastepV”Paste” (paste yanked/deleted at cursor)
KNShow definition hover

File / Folder Nav

My BindingMy VerbiageDefaultDescription
\ffFind-FilesFind Files (Fuzzy)
\fgFind-Git FilesFind Git Files
\fpFind-ProjectsFind Projects
\eExplorerFile Directory Browser
\sgSearch w/ GrepFind inside files with Grep search

Window / Pane Nav

z z - Center viewport on current line

  • Switch focus between window splits Ctrl-W + HJKL

Tmux-Vim-Navigator

Switch seamlessly between neovim/tmux panes with: Ctrl + HJKL

File Changes

:e! - Abandon unsaved changes to open file

Tmux

Basic hierarchy: Session > Window > Pane References:

Sessions

Terminal Commands

AliasFull CommandAction
tmuxNew Session
tmux new -s mysessionNew Session With Name
tmux lsList Sessions
tmux aAttach to Session
tmux a -t mysessionAttach to Session by Name
tmux kill-session -t mysessionKill Session by Name
tmux kill-session -aKill All Sessions except current

Shortcuts (from inside tmux)

My BindingDefault BindingAction
Ctrl+B $Rename Session
Ctrl+B dDetach from Session
Ctrl+B sSession Preview mode
Ctrl+B ()Jump Between Sessions

Windows

My BindingDefault BindingAction
Ctrl+B cCreate New
Ctrl+B ,Rename
Ctrl+B &Close Current
Ctrl+B wList
Ctrl+B nNext
Ctrl+B pPrevious
Ctrl+B 0..9Select by Number

Panes

My BindingDefault BindingAction
Ctrl+B %Split Vertical
Ctrl+B "Split Horizontal
Ctrl+B ↑↓←→Change Active
Ctrl+B xClose Active
Ctrl+B Ctrl+↑↓←→Resize

Todo

  • treesitter tj
  • blinkcmp mrjakob/tj

Avante Nvim

Key BindingDescription
Leaderaashow sidebar
Leaderattoggle sidebar visibility
Leaderarrefresh sidebar
Leaderafswitch sidebar focus
Leadera?select model
Leaderaeedit selected blocks
LeaderaSstop current AI request
Leaderahselect between chat histories
cochoose ours
ctchoose theirs
cachoose all theirs
c0choose none
cbchoose both
ccchoose cursor
]xmove to previous conflict
[xmove to next conflict
[[|jump to previous codeblocks (results window)|
|]]jump to next codeblocks (results windows)

http://vimcasts.org/blog/2013/02/habit-breaking-habit-making/