LazyVim快捷键

⌨️ 按键映射

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

image

  • 默认的 <leader> 键是 <space>
  • 默认的 <localleader> 键是 \
模式描述
nNormal Mode
vVisual Mode
sSelect Mode
iInsert Mode
cCommand Mode
xEx Mode
tTerminal 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>前一个Buffern
<S-l>后一个Buffern
[b前一个Buffern
]b后一个Buffern
<leader>bb切换到其他Buffern
<leader>`切换到其他Buffern
<esc>退出并清除搜索高亮i, n
<leader>ur重绘/清除搜索高亮 / Diff Updaten
n后一个搜索结果n, x, o
N前一个搜索结果n, x, o
<C-s>保存文件i, x, n, s
<leader>KKeywordprgn
<leader>l打开Lazy面板n
<leader>fn新建文件n
<leader>xlLocation列表n
<leader>xqQuickfix列表n
[q前一个Quickfixn
]q后一个Quickfixn
<leader>cf格式化n, v
<leader>cdLine Diagnosticsn
]d后一个Diagnosticn
[d前一个Diagnosticn
]e后一个Errorn
[e前一个Errorn
]w后一个Warningn
[w前一个Warningn
<leader>uf开关自动格式化 (全局)n
<leader>uF开关自动格式化 (Buffer)n
<leader>us开关拼写n
<leader>uw开关折行n
<leader>uL开关相对行号n
<leader>ul开关行号n
<leader>ud开关Diagnosticsn
<leader>uc开关Concealn
<leader>uh开关Inlay Hintsn
<leader>uT开关Treesitter Highlightn
<leader>ub开关Backgroundn
<leader>ggLazygit(根目录)n
<leader>gGLazygit(当前目录)n
<leader>gbGit Blame Linen
<leader>gfLazygit当前文件历史n
<leader>qq全部退出n
<leader>uiInspect Posn
<leader>LLazyVim Changelogn
<leader>ft终端(根目录)n
<leader>fT终端(当前目录)n
<c-/>终端(根目录)n
<c-_>which_key_ignoren, 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最后一个Tabn
<leader><tab>f第一个Tabn
<leader><tab><tab>新建Tabn
<leader><tab>]后一个Tabn
<leader><tab>d关闭Tabn
<leader><tab>[前一个Tabn

LSP

描述模式
<leader>clLsp信息n
gd转到定义n
gr查找引用n
gD转到声明n
gI转到实现n
gy转到类型定义n
K悬停n
gK函数签名帮助n
<c-k>函数签名帮助i
<leader>ca代码Actionn, v
<leader>cc执行Codelensn, v
<leader>cC刷新并显示Codelensn
<leader>cASource Actionn
<leader>cr重命名n

bufferline.nvim

bufferline.nvim

描述模式
<leader>bl删除左侧所有Buffersn
<leader>bo删除其他Buffersn
<leader>bp开关大头针n
<leader>bP删除未钉住的Buffersn
<leader>br删除右侧所有Buffersn
[b前一个Buffern
]b后一个Buffern
<S-h>前一个Buffern
<S-l>后一个Buffern

conform.nvim

conform.nvim

描述模式
<leader>cF格式化注入的语言n, v

flash.nvim

flash.nvim

描述模式
<c-s>开关Flash搜索c
r远程Flasho
RTreesitter搜索o, x
sFlashn, o, x
SFlash Treesittern, o, x

mason.nvim

mason.nvim

描述模式
<leader>cmMasonn

mini.bufremove

mini.bufremove

描述模式
<leader>bd删除Buffern
<leader>bD删除Buffer(强制)n

mini.pairs

mini.pairs

描述模式
<leader>up开关Auto Pairsn

mini.surround

mini.surround

描述模式
gsa添加Surroundingn, v
gsd删除Surroundingn
gsf找到右边Surroundingn
gsF找到左边Surroundingn
gsh高亮Surroundingn
gsn更新MiniSurround.config.n_linesn
gsr替换Surroundingn

neo-tree.nvim

neo-tree.nvim

描述模式
<leader>beBuffer浏览n
<leader>e浏览NeoTree(根目录)n
<leader>E浏览NeoTree(当前目录)n
<leader>fe浏览NeoTree(根目录)n
<leader>fE浏览NeoTree(当前目录)n
<leader>geGit浏览n

noice.nvim

noice.nvim

描述模式
<c-b>向后滚动n, i, s
<c-f>向前滚动n, i, s
<leader>snaNoice Alln
<leader>snd忽略Alln
<leader>snhNoice历史n
<leader>snlNoice最后Messagen
<S-Enter>重定向Cmdlinec

nvim-notify

nvim-notify

描述模式
<leader>un忽略All Notificationsn

nvim-spectre

nvim-spectre

描述模式
<leader>srReplace in Files (Spectre)n

nvim-treesitter

nvim-treesitter

描述模式
<bs>Decrement Selectionx
<c-space>Increment Selectionn

nvim-treesitter-context

nvim-treesitter-context

描述模式
<leader>ut开关Treesitter Contextn

persistence.nvim

persistence.nvim

描述模式
<leader>qd不保存当前会话n
<leader>ql恢复最后会话n
<leader>qs恢复会话n

telescope.nvim

telescope.nvim

描述模式
<leader><space>查找文件(根目录)n
<leader>,Switch Buffern
<leader>/Grep (根目录)n
<leader>:Command Historyn
<leader>fbBuffersn
<leader>fcFind Config Filen
<leader>ffFind Files (根目录)n
<leader>fFFind Files (当前目录)n
<leader>fgFind Files (git-files)n
<leader>frRecentn
<leader>fRRecent (当前目录)n
<leader>gcCommitsn
<leader>gsStatusn
<leader>s"Registersn
<leader>saAuto Commandsn
<leader>sbBuffern
<leader>scCommand Historyn
<leader>sCCommandsn
<leader>sdDocument Diagnosticsn
<leader>sDWorkspace Diagnosticsn
<leader>sgGrep (根目录)n
<leader>sGGrep (当前目录)n
<leader>shHelp Pagesn
<leader>sHSearch Highlight Groupsn
<leader>skKey Mapsn
<leader>smJump to Markn
<leader>sMMan Pagesn
<leader>soOptionsn
<leader>sRResumen
<leader>ssGoto Symboln
<leader>sSGoto Symbol (Workspace)n
<leader>swWord (根目录)n
<leader>sWWord (当前目录)n
<leader>swSelection (根目录)v
<leader>sWSelection (当前目录)v
<leader>uCColorscheme with Previewn

todo-comments.nvim

todo-comments.nvim

描述模式
<leader>stTodon
<leader>sTTodo/Fix/Fixmen
<leader>xtTodo (Trouble)n
<leader>xTTodo/Fix/Fixme (Trouble)n
[t前一个Todo Commentn
]t后一个Todo Commentn

trouble.nvim

trouble.nvim

描述模式
<leader>xLLocation列表(Trouble)n
<leader>xQQuickfix列表(Trouble)n
<leader>xxDocument Diagnostics (Trouble)n
<leader>xXWorkspace Diagnostics (Trouble)n
[q前一个Trouble/Quickfix Itemn
]q后一个Trouble/Quickfix Itemn

vim-illuminate

vim-illuminate

描述模式
[[前一个Referencen
]]后一个Referencen

yanky.nvim

yanky.nvim Part of lazyvim.plugins.extras.coding.yanky

描述模式
<leader>p打开Yank历史n
<pPut and Indent Leftn
<PPut Before and Indent Leftn
=pPut After Applying a Filtern
=PPut Before Applying a Filtern
>pPut and Indent Rightn
>PPut Before and Indent Rightn
[pPut Indented Before Cursor (Linewise)n
[PPut Indented Before Cursor (Linewise)n
[yCycle Forward Through Yank Historyn
]pPut Indented After Cursor (Linewise)n
]PPut Indented After Cursor (Linewise)n
]yCycle Backward Through Yank Historyn
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开关Breakpointn
<leader>dBBreakpoint Conditionn
<leader>dcContinuen
<leader>dCRun to Cursorn
<leader>dgGo to Line (No Execute)n
<leader>diStep Inton
<leader>djDownn
<leader>dkUpn
<leader>dlRun Lastn
<leader>doStep Outn
<leader>dOStep Overn
<leader>dp暂停n
<leader>dr开关REPLn
<leader>ds会话n
<leader>dt终端n
<leader>dw小部件n

nvim-dap-ui

Part of lazyvim.plugins.extras.dap.core

描述模式
<leader>deEvaln, v
<leader>duDap UIn

aerial.nvim

aerial.nvim Part of lazyvim.plugins.extras.editor.aerial

描述模式
<leader>csAerial (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>1Harpoon to File 1n
<leader>2Harpoon to File 2n
<leader>3Harpoon to File 3n
<leader>4Harpoon to File 4n
<leader>5Harpoon to File 5n
<leader>hHarpoon Quick Menun
<leader>HHarpoon Filen

flit.nvim

flit.nvim Part of lazyvim.plugins.extras.editor.leap

描述模式
ffn, o, x
FFn, o, x
ttn, o, x
TTn, o, x

leap.nvim

leap.nvim Part of lazyvim.plugins.extras.editor.leap

描述模式
gsLeap from Windowsn, o, x
sLeap Forward ton, o, x
SLeap Backward ton, o, x

mini.diff

mini.diff Part of lazyvim.plugins.extras.editor.mini-diff

描述模式
<leader>go开关mini.diff overlayn

mini.files

mini.files Part of lazyvim.plugins.extras.editor.mini-files

描述模式
<leader>fmOpen mini.files (Directory of Current File)n
<leader>fMOpen mini.files (当前目录)n

outline.nvim

outline.nvim Part of lazyvim.plugins.extras.editor.outline

描述模式
<leader>cs开关Outlinen

trouble.nvim

trouble.nvim Part of lazyvim.plugins.extras.editor.trouble-v3

描述模式
<leader>cs符号(Trouble)n
<leader>cSLSP references/definitions/… (Trouble)n
<leader>xLLocation列表(Trouble)n
<leader>xQQuickfix列表(Trouble)n
<leader>xx诊断(Trouble)n
<leader>xXBuffer诊断(Trouble)n
[qPrevious Trouble/Quickfix Itemn

markdown-preview.nvim

markdown-preview.nvim Part of lazyvim.plugins.extras.lang.markdown

描述模式
<leader>cpMarkdown预览n

nvim-dap-python

nvim-dap-python Part of lazyvim.plugins.extras.lang.python

描述模式
<leader>dPcDebug Classn
<leader>dPtDebug Methodn

venv-selector.nvim

venv-selector.nvim Part of lazyvim.plugins.extras.lang.python

描述模式
<leader>cv选择VirtualEnvn

neotest

neotest Part of lazyvim.plugins.extras.test.core

描述模式
<leader>tlRun Lastn
<leader>to显示Outputn
<leader>tO开关Output Paneln
<leader>tr运行Nearestn
<leader>ts开关Summaryn
<leader>tS停止n
<leader>tt运行文件n
<leader>tT运行所有测试文件n

nvim-dap

nvim-dap Part of lazyvim.plugins.extras.test.core

描述模式
<leader>tdDebug Nearestn

edgy.nvim

edgy.nvim Part of lazyvim.plugins.extras.ui.edgy

描述模式
<leader>ueEdgy 开关n
<leader>uEEdgy Select Windown

mason.nvim

mason.nvim Part of lazyvim.plugins.extras.util.gitui

描述模式
<leader>ggGitUi(根目录)n
<leader>gGGitUi(当前目录)n

project.nvim

project.nvim Part of lazyvim.plugins.extras.util.project

描述模式
<leader>fpProjectsn