LazyVim快捷键
⌨️ 按键映射
LazyVim 使用 which-key.nvim 帮助你记住你的按键映射。
按任意键,如 <space>
,你将看到一个包含所有以 <space>
开始的按键映射的弹窗。

- 默认的
<leader>
键是 <space>
- 默认的
<localleader>
键是 \
模式 | 描述 |
---|
n | Normal Mode |
v | Visual Mode |
s | Select Mode |
i | Insert Mode |
c | Command Mode |
x | Ex Mode |
t | Terminal Mode |
通用的#
键 | 描述 | 模式 |
---|
<C-h> | 切换到左边窗口 | n, t |
<C-j> | 切换到下面窗口 | n, t |
<C-k> | 切换到上面窗口 | n, t |
<C-l> | 切换到右边窗口 | n, t |
<C-Up> | 增加窗口高度 | n |
<C-Down> | 降低窗口高度 | n |
<C-Left> | 降低窗口宽度 | n |
<C-Right> | 增加窗口宽度 | n |
<A-j> | 下移 | n, i, v |
<A-k> | 上移 | n, i, v |
<S-h> | 前一个Buffer | n |
<S-l> | 后一个Buffer | n |
[b | 前一个Buffer | n |
]b | 后一个Buffer | n |
<leader>bb | 切换到其他Buffer | n |
<leader>` | 切换到其他Buffer | n |
<esc> | 退出并清除搜索高亮 | i, n |
<leader>ur | 重绘/清除搜索高亮 / Diff Update | n |
n | 后一个搜索结果 | n, x, o |
N | 前一个搜索结果 | n, x, o |
<C-s> | 保存文件 | i, x, n, s |
<leader>K | Keywordprg | n |
<leader>l | 打开Lazy面板 | n |
<leader>fn | 新建文件 | n |
<leader>xl | Location列表 | n |
<leader>xq | Quickfix列表 | n |
[q | 前一个Quickfix | n |
]q | 后一个Quickfix | n |
<leader>cf | 格式化 | n, v |
<leader>cd | Line Diagnostics | n |
]d | 后一个Diagnostic | n |
[d | 前一个Diagnostic | n |
]e | 后一个Error | n |
[e | 前一个Error | n |
]w | 后一个Warning | n |
[w | 前一个Warning | n |
<leader>uf | 开关自动格式化 (全局) | n |
<leader>uF | 开关自动格式化 (Buffer) | n |
<leader>us | 开关拼写 | n |
<leader>uw | 开关折行 | n |
<leader>uL | 开关相对行号 | n |
<leader>ul | 开关行号 | n |
<leader>ud | 开关Diagnostics | n |
<leader>uc | 开关Conceal | n |
<leader>uh | 开关Inlay Hints | n |
<leader>uT | 开关Treesitter Highlight | n |
<leader>ub | 开关Background | n |
<leader>gg | Lazygit(根目录) | n |
<leader>gG | Lazygit(当前目录) | n |
<leader>gb | Git Blame Line | n |
<leader>gf | Lazygit当前文件历史 | n |
<leader>qq | 全部退出 | n |
<leader>ui | Inspect Pos | n |
<leader>L | LazyVim Changelog | n |
<leader>ft | 终端(根目录) | n |
<leader>fT | 终端(当前目录) | n |
<c-/> | 终端(根目录) | n |
<c-_> | which_key_ignore | n, t |
<esc><esc> | 进入普通模式 | t |
<C-/> | 隐藏终端 | t |
<leader>ww | 切到另一个窗口 | n |
<leader>wd | 删除窗口 | n |
<leader>w- | 向下分割窗口 | n |
<leader>w| | 向右分割窗口 | n |
<leader>- | 向下分割窗口 | n |
<leader>| | 向右分割窗口 | n |
<leader><tab>l | 最后一个Tab | n |
<leader><tab>f | 第一个Tab | n |
<leader><tab><tab> | 新建Tab | n |
<leader><tab>] | 后一个Tab | n |
<leader><tab>d | 关闭Tab | n |
<leader><tab>[ | 前一个Tab | n |
LSP#
键 | 描述 | 模式 |
---|
<leader>cl | Lsp信息 | n |
gd | 转到定义 | n |
gr | 查找引用 | n |
gD | 转到声明 | n |
gI | 转到实现 | n |
gy | 转到类型定义 | n |
K | 悬停 | n |
gK | 函数签名帮助 | n |
<c-k> | 函数签名帮助 | i |
<leader>ca | 代码Action | n, v |
<leader>cc | 执行Codelens | n, v |
<leader>cC | 刷新并显示Codelens | n |
<leader>cA | Source Action | n |
<leader>cr | 重命名 | n |
bufferline.nvim#
bufferline.nvim
键 | 描述 | 模式 |
---|
<leader>bl | 删除左侧所有Buffers | n |
<leader>bo | 删除其他Buffers | n |
<leader>bp | 开关大头针 | n |
<leader>bP | 删除未钉住的Buffers | n |
<leader>br | 删除右侧所有Buffers | n |
[b | 前一个Buffer | n |
]b | 后一个Buffer | n |
<S-h> | 前一个Buffer | n |
<S-l> | 后一个Buffer | n |
conform.nvim
键 | 描述 | 模式 |
---|
<leader>cF | 格式化注入的语言 | n, v |
flash.nvim#
flash.nvim
键 | 描述 | 模式 |
---|
<c-s> | 开关Flash搜索 | c |
r | 远程Flash | o |
R | Treesitter搜索 | o, x |
s | Flash | n, o, x |
S | Flash Treesitter | n, o, x |
mason.nvim#
mason.nvim
mini.bufremove#
mini.bufremove
键 | 描述 | 模式 |
---|
<leader>bd | 删除Buffer | n |
<leader>bD | 删除Buffer(强制) | n |
mini.pairs#
mini.pairs
键 | 描述 | 模式 |
---|
<leader>up | 开关Auto Pairs | n |
mini.surround#
mini.surround
键 | 描述 | 模式 |
---|
gsa | 添加Surrounding | n, v |
gsd | 删除Surrounding | n |
gsf | 找到右边Surrounding | n |
gsF | 找到左边Surrounding | n |
gsh | 高亮Surrounding | n |
gsn | 更新MiniSurround.config.n_lines | n |
gsr | 替换Surrounding | n |
neo-tree.nvim#
neo-tree.nvim
键 | 描述 | 模式 |
---|
<leader>be | Buffer浏览 | n |
<leader>e | 浏览NeoTree(根目录) | n |
<leader>E | 浏览NeoTree(当前目录) | n |
<leader>fe | 浏览NeoTree(根目录) | n |
<leader>fE | 浏览NeoTree(当前目录) | n |
<leader>ge | Git浏览 | n |
noice.nvim#
noice.nvim
键 | 描述 | 模式 |
---|
<c-b> | 向后滚动 | n, i, s |
<c-f> | 向前滚动 | n, i, s |
<leader>sna | Noice All | n |
<leader>snd | 忽略All | n |
<leader>snh | Noice历史 | n |
<leader>snl | Noice最后Message | n |
<S-Enter> | 重定向Cmdline | c |
nvim-notify#
nvim-notify
键 | 描述 | 模式 |
---|
<leader>un | 忽略All Notifications | n |
nvim-spectre#
nvim-spectre
键 | 描述 | 模式 |
---|
<leader>sr | Replace in Files (Spectre) | n |
nvim-treesitter#
nvim-treesitter
键 | 描述 | 模式 |
---|
<bs> | Decrement Selection | x |
<c-space> | Increment Selection | n |
nvim-treesitter-context#
nvim-treesitter-context
键 | 描述 | 模式 |
---|
<leader>ut | 开关Treesitter Context | n |
persistence.nvim#
persistence.nvim
键 | 描述 | 模式 |
---|
<leader>qd | 不保存当前会话 | n |
<leader>ql | 恢复最后会话 | n |
<leader>qs | 恢复会话 | n |
telescope.nvim#
telescope.nvim
键 | 描述 | 模式 |
---|
<leader><space> | 查找文件(根目录) | n |
<leader>, | Switch Buffer | n |
<leader>/ | Grep (根目录) | n |
<leader>: | Command History | n |
<leader>fb | Buffers | n |
<leader>fc | Find Config File | n |
<leader>ff | Find Files (根目录) | n |
<leader>fF | Find Files (当前目录) | n |
<leader>fg | Find Files (git-files) | n |
<leader>fr | Recent | n |
<leader>fR | Recent (当前目录) | n |
<leader>gc | Commits | n |
<leader>gs | Status | n |
<leader>s" | Registers | n |
<leader>sa | Auto Commands | n |
<leader>sb | Buffer | n |
<leader>sc | Command History | n |
<leader>sC | Commands | n |
<leader>sd | Document Diagnostics | n |
<leader>sD | Workspace Diagnostics | n |
<leader>sg | Grep (根目录) | n |
<leader>sG | Grep (当前目录) | n |
<leader>sh | Help Pages | n |
<leader>sH | Search Highlight Groups | n |
<leader>sk | Key Maps | n |
<leader>sm | Jump to Mark | n |
<leader>sM | Man Pages | n |
<leader>so | Options | n |
<leader>sR | Resume | n |
<leader>ss | Goto Symbol | n |
<leader>sS | Goto Symbol (Workspace) | n |
<leader>sw | Word (根目录) | n |
<leader>sW | Word (当前目录) | n |
<leader>sw | Selection (根目录) | v |
<leader>sW | Selection (当前目录) | v |
<leader>uC | Colorscheme with Preview | n |
todo-comments.nvim
键 | 描述 | 模式 |
---|
<leader>st | Todo | n |
<leader>sT | Todo/Fix/Fixme | n |
<leader>xt | Todo (Trouble) | n |
<leader>xT | Todo/Fix/Fixme (Trouble) | n |
[t | 前一个Todo Comment | n |
]t | 后一个Todo Comment | n |
trouble.nvim#
trouble.nvim
键 | 描述 | 模式 |
---|
<leader>xL | Location列表(Trouble) | n |
<leader>xQ | Quickfix列表(Trouble) | n |
<leader>xx | Document Diagnostics (Trouble) | n |
<leader>xX | Workspace Diagnostics (Trouble) | n |
[q | 前一个Trouble/Quickfix Item | n |
]q | 后一个Trouble/Quickfix Item | n |
vim-illuminate#
vim-illuminate
键 | 描述 | 模式 |
---|
[[ | 前一个Reference | n |
]] | 后一个Reference | n |
yanky.nvim#
yanky.nvim
Part of lazyvim.plugins.extras.coding.yanky
键 | 描述 | 模式 |
---|
<leader>p | 打开Yank历史 | n |
<p | Put and Indent Left | n |
<P | Put Before and Indent Left | n |
=p | Put After Applying a Filter | n |
=P | Put Before Applying a Filter | n |
>p | Put and Indent Right | n |
>P | Put Before and Indent Right | n |
[p | Put Indented Before Cursor (Linewise) | n |
[P | Put Indented Before Cursor (Linewise) | n |
[y | Cycle Forward Through Yank History | n |
]p | Put Indented After Cursor (Linewise) | n |
]P | Put Indented After Cursor (Linewise) | n |
]y | Cycle Backward Through Yank History | n |
gp | 拷贝文本到选中文本后 | n, x |
gP | 拷贝文本到选中文本前 | n, x |
p | 拷贝文本到光标后 | n, x |
P | 拷贝文本到光标前 | n, x |
y | 拷贝文本 | n, x |
nvim-dap#
nvim-dap
Part of lazyvim.plugins.extras.dap.core
键 | 描述 | 模式 |
---|
<leader>da | 带参数运行 | n |
<leader>db | 开关Breakpoint | n |
<leader>dB | Breakpoint Condition | n |
<leader>dc | Continue | n |
<leader>dC | Run to Cursor | n |
<leader>dg | Go to Line (No Execute) | n |
<leader>di | Step Into | n |
<leader>dj | Down | n |
<leader>dk | Up | n |
<leader>dl | Run Last | n |
<leader>do | Step Out | n |
<leader>dO | Step Over | n |
<leader>dp | 暂停 | n |
<leader>dr | 开关REPL | n |
<leader>ds | 会话 | n |
<leader>dt | 终端 | n |
<leader>dw | 小部件 | n |
Part of lazyvim.plugins.extras.dap.core
键 | 描述 | 模式 |
---|
<leader>de | Eval | n, v |
<leader>du | Dap UI | n |
aerial.nvim#
aerial.nvim
Part of lazyvim.plugins.extras.editor.aerial
键 | 描述 | 模式 |
---|
<leader>cs | Aerial (Symbols) | n |
telescope.nvim#
telescope.nvim
Part of lazyvim.plugins.extras.editor.aerial
键 | 描述 | 模式 |
---|
<leader>ss | 跳转到符号 (Aerial) | n |
dial.nvim#
dial.nvim
Part of lazyvim.plugins.extras.editor.dial
键 | 描述 | 模式 |
---|
<C-a> | 增加 | n, v |
<C-x> | 减少 | n, v |
g<C-a> | 增加 | n, v |
g<C-x> | 减少 | n, v |
harpoon#
harpoon
Part of lazyvim.plugins.extras.editor.harpoon2
键 | 描述 | 模式 |
---|
<leader>1 | Harpoon to File 1 | n |
<leader>2 | Harpoon to File 2 | n |
<leader>3 | Harpoon to File 3 | n |
<leader>4 | Harpoon to File 4 | n |
<leader>5 | Harpoon to File 5 | n |
<leader>h | Harpoon Quick Menu | n |
<leader>H | Harpoon File | n |
flit.nvim#
flit.nvim
Part of lazyvim.plugins.extras.editor.leap
键 | 描述 | 模式 |
---|
f | f | n, o, x |
F | F | n, o, x |
t | t | n, o, x |
T | T | n, o, x |
leap.nvim#
leap.nvim
Part of lazyvim.plugins.extras.editor.leap
键 | 描述 | 模式 |
---|
gs | Leap from Windows | n, o, x |
s | Leap Forward to | n, o, x |
S | Leap Backward to | n, o, x |
mini.diff#
mini.diff
Part of lazyvim.plugins.extras.editor.mini-diff
键 | 描述 | 模式 |
---|
<leader>go | 开关mini.diff overlay | n |
mini.files#
mini.files
Part of lazyvim.plugins.extras.editor.mini-files
键 | 描述 | 模式 |
---|
<leader>fm | Open mini.files (Directory of Current File) | n |
<leader>fM | Open mini.files (当前目录) | n |
outline.nvim#
outline.nvim
Part of lazyvim.plugins.extras.editor.outline
键 | 描述 | 模式 |
---|
<leader>cs | 开关Outline | n |
trouble.nvim#
trouble.nvim
Part of lazyvim.plugins.extras.editor.trouble-v3
键 | 描述 | 模式 |
---|
<leader>cs | 符号(Trouble) | n |
<leader>cS | LSP references/definitions/… (Trouble) | n |
<leader>xL | Location列表(Trouble) | n |
<leader>xQ | Quickfix列表(Trouble) | n |
<leader>xx | 诊断(Trouble) | n |
<leader>xX | Buffer诊断(Trouble) | n |
[q | Previous Trouble/Quickfix Item | n |
markdown-preview.nvim#
markdown-preview.nvim
Part of lazyvim.plugins.extras.lang.markdown
键 | 描述 | 模式 |
---|
<leader>cp | Markdown预览 | n |
nvim-dap-python#
nvim-dap-python
Part of lazyvim.plugins.extras.lang.python
键 | 描述 | 模式 |
---|
<leader>dPc | Debug Class | n |
<leader>dPt | Debug Method | n |
venv-selector.nvim#
venv-selector.nvim
Part of lazyvim.plugins.extras.lang.python
键 | 描述 | 模式 |
---|
<leader>cv | 选择VirtualEnv | n |
neotest#
neotest
Part of lazyvim.plugins.extras.test.core
键 | 描述 | 模式 |
---|
<leader>tl | Run Last | n |
<leader>to | 显示Output | n |
<leader>tO | 开关Output Panel | n |
<leader>tr | 运行Nearest | n |
<leader>ts | 开关Summary | n |
<leader>tS | 停止 | n |
<leader>tt | 运行文件 | n |
<leader>tT | 运行所有测试文件 | n |
nvim-dap#
nvim-dap
Part of lazyvim.plugins.extras.test.core
键 | 描述 | 模式 |
---|
<leader>td | Debug Nearest | n |
edgy.nvim#
edgy.nvim
Part of lazyvim.plugins.extras.ui.edgy
键 | 描述 | 模式 |
---|
<leader>ue | Edgy 开关 | n |
<leader>uE | Edgy Select Window | n |
mason.nvim#
mason.nvim
Part of lazyvim.plugins.extras.util.gitui
键 | 描述 | 模式 |
---|
<leader>gg | GitUi(根目录) | n |
<leader>gG | GitUi(当前目录) | n |
project.nvim#
project.nvim
Part of lazyvim.plugins.extras.util.project