You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove trailing spaces and format smart single ‘’ and double “” quotes
:KnvimTermVert
Toggle vertical terminal
:KnvimToggleClickableLualine
Toggle clicability of statusline
1.3. Snacks key-bindings
1.3.1 Snacks.picker (fuzzy finder) key-bindings
All picker key-bindings start with <space>.
Functionality
Key-binding
Open Snacks picker
<space> <space>
Find files
<space> f
Find text (grep)
<space> t
Find buffer
<space> b
Find help
<space> h
Find keymap
<space> k
Find commands
<space> c
Find marks
<space> m
Find registers
<space> r
Find diagnostics
<space> d
Find in jndo tree
<space> j
Find in undo tree
<space> u
Find spelling
<space> z
Find hovered word
<space> *
Find in open buffers
<space> /
Find python virtual environment
<space> e
Find session
<space> s
Delete session
<space> S
Inside the picker:
Functionality
Key-binding (insert mode)
Key-binding (normal mode)
Go to the next line
Ctrl+n
j
Go to the previous line
Ctrl+p
k
Scroll down the doc
Ctrl+b
Ctrl+b
Scroll up the doc
Ctrl+f
Ctrl+f
Select multiple items
Tab
Tab
Send selection to quicklist
Ctrl+q
Ctrl+q
Close
Ctrl+c
Esc
Show help (which-key)
-
?
For the complete key-bindings, see Snacks picker's doc.
1.3.2. Other Snacks key-bindings
Functionality
Key-binding
Toggle Zen-mode
<leader> z
Toggle zoom of the current window
<leader> Z
Dismiss current notification message
<leader> n
Show history of notification messages
<leader> N
Open Lazygit
<leader> g
Open scratch buffer
<leader> s
Select scratch buffer
<leader> S
Toggle terminal
Ctrl+\
Enter normal mode in terminal
<Esc><Esc>
Open Yazi
Ctrl+y
1.4. LSP key-bindings
Group
Functionality
Key-binding
Navigation
Go to definitions
gd
Go to file path (not LSP, vim default)
gf
Go to file path in a new vertical split
gF
Go to type definition
gy
Go to reference
grr
Go to implementation
gri
Misc
Rename variables
grn
Code action (if supported)
gra
Show function documentation (on hover)
K
Show signature help (while typing function arguments)
Ctrl+k
Code formatting (if supported)
<leader> f
Toggle inlay-hint (if supported)
<leader> i
Diagnostics
Open diagnostic list (project-wise)
<space> d
Show current line's diagnostics
Ctrl+w d or Ctrl+w Ctrl+d
Go to previous diagnostic
[d
Go to next diagnostic
]d
1.5. Window and buffer navigation
Overall logic:
Alt: for split manipulation (with Shift to swap)
Ctrl+Alt: for buffer manipulation (with Shift for extra functionalities)
Group
Functionality
Key-binding
Split manipulation
Switch to the left window
Alt+h
Switch to the lower window
Alt+j
Switch to the upper window
Alt+k
Switch to the right window
Alt+l
Swap with the left window
Alt+Shift+h
Swap with the lower window
Alt+Shift+j
Swap with the upper window
Alt+Shift+k
Swap with the right window
Alt+Shift+l
Decrease window width
Alt+Left
Increase window width
Alt+Right
Decrease window height
Alt+Down
Increase window height
Alt+Up
Buffer manipulation
Switch to the previous buffer
Ctrl+Alt+h
Switch to the next buffer
Ctrl+Alt+l
Jump to a buffer
Ctrl+Alt+j
Kill a buffer
Ctrl+Alt+k
Swap with the previous buffer
Ctrl+Alt+Shift+h
Swap with the next buffer
Ctrl+Alt+Shift+l
Restore a closed buffer
Ctrl+Alt+Shift+j
Kill the current buffer
Ctrl+Alt+Shift+k
Pin/unpin the current buffer
Ctrl+Alt+p
Tab manipulation
Switch to the next tab
Ctrl+Alt+PageDown
(vim default)
Switch to the previous tab
Ctrl+Alt+PageUp
1.6. DAP key-bindings
All DAP key-bindings start with ,.
Functionality
Key-binding
Toggle DAP UI
,d
Toggle DAP breakpoint
,b
Toggle DAP breakpoint with condition
,B
Continue DAP debugging
,c
Run last DAP launcher (if there are many)
,l
Step over
,n
Step into
,s
Step out
,u
Terminate debugging
,t
Hover variable while debugging
,k
Add the expression under cursor to watch list
,w
Generate launcher template for python project
,gp
1.7. Neotest key-bindings
All Neotest key-bindings start with ;.
Functionality
Key-binding
Toggle summary
;s
Open output (hover)
;k
Toggle output-panel
;o
Run the nearest test
;rr
Run the current file
;rf
Run the current file with nvim-dap
;rd
Run the last test
;ll
Run the last test but debug with nvim-dap
;ld
Stop a running process
;t
1.8. Other custom key-bindings
Group
Functionality
Key-binding
Misc
Show local key-maps in the buffer
<leader> ?
Insert python breakpoint (on the next line)
<leader> b
Insert python breakpoint (on the previous line)
<leader> B
Fill line with ─ characters
<leader> -
Fill line with ━ characters
<leader> =
Generate doc string for function
<leader> d
Toggle file explorer
<leader> e
Toggle outline view (on the screen right side)
<leader> o
Toggle outline view (beside current buffer)
<leader> O
Toggle Diffview
<leader> v
In insert mode, Alt+h,j,k,l becomes arrows
Alt+h,j,k,l
File Manager
Open Oil
_
Git hunk
Go to previous hunk of Git change
[c
Go to next hunk of Git change
]c
Easy-align
Start easy align (in visual mode)
<leader> a
- Example: align by |
<leader> a*|
- Example: align by <space>
<leader> a*<space>
Neogen
Generate docstring
<leader> d
Markdown
Toggle markdown render
<leader> m
Cycle through checkbox marks
Ctrl+<space>
Sidekick
Toggle sidekick (AI Agent)
Ctrl+.
Select sidekick (AI Agent)
Ctrl+/
2. Clickable Lualine
Lualine components are configured so that most of them are clickable, though the default behavior is non-clickable. To activate the clickable feature, click on the (mouse) icon on the far-right side.
Here are the components (some are hidden by default):
Need to set up spellfile first (knvim already set it as vim.fn.stdpath("data") .. "/spelling/en.utf-8.add"). To turn spellchecking on, use the command: :set spell (turning off with :set nospell). You can specify which language as (e.g., en_us, en_gb, ...) :set spell spelllang=en_us. For more information, see :h spell.