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:
- https://vim.rtorr.com/
- https://nix-community.github.io/nixvim/
- https://dotfyle.com/neovim/plugins/trending
- http://vimcasts.org/blog/2013/02/habit-breaking-habit-making/
Navigation
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 Binding | My Verbiage | Default | Mode | Description |
---|---|---|---|---|
Save | :w | C | ||
Quit | :q | C | ||
Reset | :e! | C | Resets current buffer (Abandon active file changes) | |
Copy | y | V | ”Yank” (copy selected region) | |
Cut | d | V | ”Delete” (cut selected region) | |
Paste | p | V | ”Paste” (paste yanked/deleted at cursor) | |
K | N | Show definition hover |
File / Folder Nav
My Binding | My Verbiage | Default | Description |
---|---|---|---|
\ff | Find-Files | Find Files (Fuzzy) | |
\fg | Find-Git Files | Find Git Files | |
\fp | Find-Projects | Find Projects | |
\e | Explorer | File Directory Browser | |
\sg | Search w/ Grep | Find 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
Alias | Full Command | Action |
---|---|---|
tmux | New Session | |
tmux new -s mysession | New Session With Name | |
tmux ls | List Sessions | |
tmux a | Attach to Session | |
tmux a -t mysession | Attach to Session by Name | |
tmux kill-session -t mysession | Kill Session by Name | |
tmux kill-session -a | Kill All Sessions except current |
Shortcuts (from inside tmux)
My Binding | Default Binding | Action |
---|---|---|
Ctrl+B $ | Rename Session | |
Ctrl+B d | Detach from Session | |
Ctrl+B s | Session Preview mode | |
Ctrl+B () | Jump Between Sessions |
Windows
My Binding | Default Binding | Action |
---|---|---|
Ctrl+B c | Create New | |
Ctrl+B , | Rename | |
Ctrl+B & | Close Current | |
Ctrl+B w | List | |
Ctrl+B n | Next | |
Ctrl+B p | Previous | |
Ctrl+B 0..9 | Select by Number |
Panes
My Binding | Default Binding | Action |
---|---|---|
Ctrl+B % | Split Vertical | |
Ctrl+B " | Split Horizontal | |
Ctrl+B ↑↓←→ | Change Active | |
Ctrl+B x | Close Active | |
Ctrl+B Ctrl+↑↓←→ | Resize | |
Todo
- treesitter tj
- blinkcmp mrjakob/tj
Avante Nvim
Key Binding | Description |
---|---|
Leaderaa | show sidebar |
Leaderat | toggle sidebar visibility |
Leaderar | refresh sidebar |
Leaderaf | switch sidebar focus |
Leadera? | select model |
Leaderae | edit selected blocks |
LeaderaS | stop current AI request |
Leaderah | select between chat histories |
co | choose ours |
ct | choose theirs |
ca | choose all theirs |
c0 | choose none |
cb | choose both |
cc | choose cursor |
]x | move to previous conflict |
[x | move 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/