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:

My BindingMy VerbiageDefaultModeDescription
\NLeader key, access all shortcuts
\?NSee buffer-local keymaps
\fFile/FindNFile and find operations
\sSearchNSearch operations
\gGitNGit operations

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
uNUndo
Ctrl + rNRedo
Find & Replace on Line:s/old/new/gNFind instances of old on current line, replace with new
Find & Replace in Buffer:%s/old/new/gNFind instances of old in buffer, replace with new
yypNDuplicate line under cursor

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

Cursor / Pane Navigation

My BindingMy VerbiageDefaultModeDescription
z zNCenter viewport on current line
Ctrl + uNScroll active pane up
Ctrl + dNScroll active pane down
Ctrl-W + HJKLNSwitch focus between window splits
NGo to top of file

Buffer Navigation

My BindingMy VerbiageDefaultModeDescription
:buffer N or :b NCSwitch to buffer number N (e.g., :b 2)
:bnext or :bnCMove to the next buffer
:bprevious or :bpCMove to the previous buffer
:bfirst or :bfCMove to the first buffer
:blast or :blCMove to the last buffer
:bdNClose current buffer
Ctrl+^NToggle between current and previous buffer
Ctrl+oNJump to the previous position in the jump list
Ctrl+iNJump to the next position in the jump list

Flash Navigation

My BindingMy VerbiageDefaultModeDescription
sFlashn, x, oJump to target
SFlash Treesittern, x, oNavigate using treesitter
rRemote FlashoRemote flash navigation
RTreesitter Searcho, xSearch using treesitter
<c-s>Toggle Flash SearchcToggle flash search functionality

Basic Vim Mode Commands

My BindingMy VerbiageDefaultModeDescription
iNInsert mode at current position
INInsert at beginning of current line
aNInsert after character at current position
ANInsert at end of current line

Line / Word Navigation

My BindingMy VerbiageDefaultModeDescription
$NMove cursor to end of line
^NMove cursor to start of line
wNMove cursor to next word start
eNMove cursor to next word end
WNMove cursor to next word start after whitespace
ENMove cursor to next word end after whitespace

Tmux-Vim-Navigator

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

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

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/

Vimium, Browser Extension

https://vimium.github.io/

Keyboard Shortcuts

KeyAction
jScroll down
kScroll up
ggScroll to the top of the page
GScroll to the bottom of the page
dScroll a half page down
uScroll a half page up
hScroll left
lScroll right
rReload the page
yyCopy the current URL to the clipboard
pOpen the clipboard’s URL in the current tab
POpen the clipboard’s URL in a new tab
iEnter insert mode
vEnter visual mode
giFocus the first text input on the page
fOpen a link in the current tab
FOpen a link in a new tab
gfSelect the next frame on the page
gFSelect the page’s main/top frame

Using find

KeyAction
/Enter find mode
nCycle forward to the next find match
NCycle backward to the previous find match

Using the omnibar

KeyAction
oOpen URL, bookmark or history entry
OOpen URL, bookmark or history entry in a new tab
bOpen a bookmark
BOpen a bookmark in a new tab
TSearch through your open tabs
KeyAction
HGo back in history
LGo forward in history

Manipulating tabs

KeyAction
tCreate new tab
JGo one tab left
KGo one tab right
g0Go to the first tab
g$Go to the last tab
ytDuplicate current tab
xClose current tab
XRestore closed tab

Miscellaneous

KeyAction
?Show help