-
-
Save mikeslattery/d2f2562e5bbaa7ef036cf9f5a13deff5 to your computer and use it in GitHub Desktop.
" ~/.idea-lazy.vim | |
" LazyVim mappings for Jetbrains IDEs | |
" Required plugins. https://plugins.jetbrains.com/bundles/7-ideavim-bundle | |
" IDEAVim | |
" Which-Key | |
" IdeaVim-Sneak | |
" To install, add this to the top of your ~/.ideavimrc: | |
" source ~/.idea-lazy.vim | |
" This file is hosted at: | |
" https://gist.github.com/mikeslattery/d2f2562e5bbaa7ef036cf9f5a13deff5 | |
" Beginners, run this to learn basic maps: | |
" nvim --clean +Tutor | |
" Useful Jetbrains Tool Windows' Maps: | |
" <esc> Return to editor | |
" <S-esc> Hide the tool window | |
" <F12> Go to the tool window | |
" <C-S-quote> Toggle Maximize/Restore the tool window | |
" <C-M-y> Reload files. Useful after making edits in Neovim or CL | |
" <M-left> Previous Tab | |
" <M-right> Next Tab | |
" <C-F4> Close Tab | |
" <M-3> Activate Find Tool Window | |
" <M-6> Activate Problems View Tool Window | |
" <c-s-a> Find Action | |
" LazyVim's Java extra: https://www.lazyvim.org/extras/lang/java | |
" LazyVim default settings | |
" https://www.lazyvim.org/configuration/general | |
let mapleader=" " | |
let maplocalleader="\\" | |
" Confirm to save changes before exiting modified buffer | |
set formatoptions=jcroqlnt | |
" Print line number | |
set number | |
" Relative line numbers | |
set relativenumber | |
" Lines of context | |
set scrolloff=4 | |
" Round indent | |
set shiftround | |
" Columns of context | |
set sidescrolloff=8 | |
" which-key says to set this high, or set notimeout | |
set timeoutlen=10000 | |
set notimeout | |
set undolevels=10000 | |
" Disable line wrap | |
set nowrap | |
" Neovim settings that differ from Vim | |
" https://neovim.io/doc/user/diff.html | |
" https://github.com/mikeslattery/nvim-defaults.vim/blob/main/plugin/.vimrc | |
set backspace=indent,eol,start | |
set formatoptions=tcqj | |
set listchars=tab:>\ ,trail:-,nbsp:+ | |
set shortmess=filnxtToOF | |
" Enable plugin behavior | |
" https://github.com/JetBrains/ideavim/wiki/IdeaVim-Plugins | |
" https://www.lazyvim.org/plugins | |
" gcc and gc<action> mappings. | |
Plug 'tpope/vim-commentary' | |
" s action, such as cs"' (replace " with '), ds" (unquote) | |
Plug 'tpope/vim-surround' | |
" similar to flash.nvim | |
Plug 'justinmk/vim-sneak' | |
" Enable the whichkey plugin, available on Jetbrains marketplace | |
set which-key | |
" Extended matching. A Neovim default plugin. | |
set matchit | |
" Key maps | |
" https://www.lazyvim.org/configuration/keymaps | |
" To track Action-IDs | |
" :action VimFindActionIdAction | |
" General Keymaps | |
" Go to Left Window | |
nmap <C-h> <C-w>h | |
" Go to Lower Window | |
nmap <C-j> <C-w>j | |
" Go to Upper Window | |
nmap <C-k> <C-w>k | |
" Go to Right Window | |
nmap <C-l> <C-w>l | |
" Increase Window Height | |
nmap <C-Up> <Action>(IncrementWindowHeight) | |
" Decrease Window Height | |
nmap <C-Down> <Action>(DecrementWindowHeight) | |
" Decrease Window Width | |
nmap <C-Left> <Action>(DecrementWindowWidth) | |
" Increase Window Width | |
nmap <C-Right> <Action>(IncrementWindowWidth) | |
" Move Down | |
nmap <A-j> <Action>(MoveLineDown) | |
imap <A-j> <Esc><Action>(MoveLineDown)i | |
" Move Up | |
nmap <A-k> <Action>(MoveLineUp) | |
imap <A-k> <Esc><Action>(MoveLineUp)i | |
" Prev Buffer | |
nmap <S-h> <Action>(PreviousTab) | |
" Next Buffer | |
nmap <S-l> <Action>(NextTab) | |
" Prev Buffer (alternative) | |
nmap [b <Action>(PreviousTab) | |
" Next Buffer (alternative) | |
nmap ]b <Action>(NextTab) | |
" Switch to Other Buffer | |
nnoremap <leader>bb <C-^> | |
" Switch to Other Buffer (alternative) | |
nnoremap <leader>` <C-^> | |
" Delete Buffer | |
nmap <leader>bd <Action>(CloseContent) | |
" Delete Buffer and Window | |
nmap <leader>bD <Action>(CloseContent) | |
" Delete Other Buffers | |
nmap <leader>bo <Action>(CloseAllEditorsButActive) | |
" Escape and Clear hlsearch | |
nmap <esc> :nohlsearch<CR> | |
nmap <leader>ur :nohlsearch<CR> | |
" Keywordprg | |
nmap <leader>K :help<space><C-r><C-w><CR> | |
" Add Comment Below | |
nmap gco o<c-o>gcc | |
" Add Comment Above | |
nmap gcO O<c-o>gcc | |
" Lazy | |
nmap <leader>l <Action>(WelcomeScreen.Plugins) | |
" New File | |
nmap <leader>fn Action(NewElementSamePlace) | |
" Location List | |
nmap <leader>xl <Action>(ActivateProblemsViewToolWindow) | |
" Quickfix List | |
nmap <leader>xq <Action>(ActivateProblemsViewToolWindow) | |
" Previous Quickfix | |
nmap [q <Action>(GotoPreviousError) | |
" Next Quickfix | |
nmap ]q <Action>(GotoNextError) | |
" Format | |
nmap <leader>cf <Action>(Format) | |
vmap <leader>cf <Action>(Format) | |
" Line Diagnostics | |
nmap <leader>cd <Action>(ActivateProblemsViewToolWindow) | |
" Next Diagnostic | |
nmap ]d <Action>(GotoNextError) | |
" Prev Diagnostic | |
nmap [d <Action>(GotoPreviousError) | |
" Next Error | |
nmap ]e <Action>(GotoNextError) | |
" Prev Error | |
nmap [e <Action>(GotoPreviousError) | |
" Next Warning | |
nmap ]w <Action>(GotoNextError) | |
" Prev Warning | |
nmap [w <Action>(GotoPreviousError) | |
" Toggle Auto Format (Global) | |
nmap <leader>ub :echo 'There is no equivalent mapping for Toggle Auto Format.'<cr> | |
" Toggle Auto Format (Buffer) | |
nmap <leader>uB :echo 'There is no equivalent mapping for Toggle Auto Format.'<cr> | |
" Toggle Spelling | |
nmap <leader>us :setlocal spell!<CR> | |
" Toggle Wrap | |
nmap <leader>uw :setlocal wrap!<CR> | |
" Toggle Relative Number | |
nmap <leader>uL :set relativenumber!<CR> | |
" Toggle Diagnostics | |
nmap <leader>ud <Action>(ActivateProblemsViewToolWindow) | |
" Toggle Line Numbers | |
nmap <leader>ul :set number!<CR> | |
" Toggle conceallevel | |
nmap <leader>uc :echo 'There is no equivalent mapping for Toggle Conceallevel.'<cr> | |
" Toggle Treesitter Highlight | |
nmap <leader>uT :echo 'There is no equivalent mapping for Toggle Treesitter Highlight.'<cr> | |
" Toggle Background | |
nmap <leader>ub <Action>(QuickChangeScheme) | |
" Toggle Inlay Hints | |
nmap <leader>uh :echo 'There is no equivalent mapping for Toggle Inlay Hints.'<cr> | |
" Lazygit (Root Dir) | |
nmap <leader>gg <Action>(ActivateCommitToolWindow) | |
" Lazygit (cwd) | |
nmap <leader>gG <Action>(ActivateCommitToolWindow) | |
" Git Blame Line | |
nmap <leader>gb <Action>(Annotate) | |
" Git Browse | |
nmap <leader>gB <Action>(Vcs.Show.Log) | |
" Lazygit Current File History | |
nmap <leader>gf <Action>(Vcs.ShowTabbedFileHistory) | |
" Lazygit Log | |
nmap <leader>gl <Action>(Vcs.Show.Log) | |
" Lazygit Log (cwd) | |
nmap <leader>gL <Action>(Vcs.Show.Log) | |
" Quit All | |
nmap <leader>qq <Action>(Exit) | |
" Inspect Pos | |
nmap <leader>ui <Actrion>(ActivateStructureToolWindow) | |
" Inspect Tree | |
nmap <leader>uI <Action>(ActivateStructureToolWindow) | |
" LazyVim Changelog | |
nmap <leader>L <Action>(WhatsNewAction) | |
" Terminal (Root Dir) | |
nmap <leader>ft <Action>(ActivateTerminalToolWindow) | |
" Terminal (cwd) | |
nmap <leader>fT <Action>(ActivateTerminalToolWindow) | |
" Terminal (Root Dir) | |
nmap <C-/> <Action>(ActivateTerminalToolWindow) | |
" nmap <C-_> 'There is no equivalent mapping for <c-_>.'<cr> | |
" Hide Terminal - terminal mode maps not possible | |
" Split Window Below. :split<cr> doesn't work. | |
nmap <leader>- <c-w>s | |
" Split Window Right | |
nmap <leader><bar> <c-w>v | |
" Delete Window | |
nmap <leader>wd <Action>(CloseContent) | |
" Toggle Maximize | |
nmap <leader>wm <Action>(ToggleDistractionFreeMode) | |
" Tabs are treated as saved layouts | |
" Last Tab | |
nmap <leader><tab>l <Action>(StoreDefaultLayout)<Action>(ChangeToolWindowLayout) | |
" Close Other Tabs | |
nmap <leader><tab>o :<cr> | |
" First Tab | |
nmap <leader><tab>f <Action>(StoreDefaultLayout)<Action>(ChangeToolWindowLayout) | |
" New Tab | |
nmap <leader><tab>f <Action>(StoreDefaultLayout)<Action>(StoreNewLayout) | |
" Next Tab | |
nmap <leader><tab>] <Action>(StoreDefaultLayout)<Action>(ChangeToolWindowLayout) | |
" Previous Tab | |
nmap <leader><tab>[ <Action>(StoreDefaultLayout)<Action>(ChangeToolWindowLayout) | |
" Close Tab | |
nmap <leader><tab>f <Action>(StoreDefaultLayout)<Action>(ChangeToolWindowLayout) | |
" LSP Keymaps | |
" Lsp Info | |
nmap <leader>cc :echo 'There is no equivalent mapping for Lsp Info.'<cr> | |
" Goto Definition | |
nmap gd <Action>(GotoDeclaration) | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" References | |
nmap gr <Action>(FindUsages) | |
" Goto Implementation | |
nmap gI <Action>(GotoImplementation) | |
" Goto Type Definition | |
nmap gy <Action>(GotoTypeDeclaration) | |
" Goto Declaration | |
nmap gD <Action>(GotoDeclaration) | |
" Signature Help | |
nmap gK <Action>(ParameterInfo) | |
" Signature Help in Insert Mode | |
imap <C-k> <C-o><Action>(ParameterInfo) | |
" Code Action | |
nmap <leader>ca <Action>(RefactoringMenu) | |
vmap <leader>ca <Action>(RefactoringMenu) | |
" Run Codelens | |
nmap <leader>cc :echo 'There is no equivalent mapping for Run Codelens.'<cr> | |
" Refresh & Display Codelens | |
nmap <leader>cC :echo 'There is no equivalent mapping for Refresh & Display Codelens.'<cr> | |
" Rename File | |
nmap <leader>cR <Action>(RenameFile) | |
" Rename | |
nmap <leader>cr <Action>(RenameElement) | |
" Source Action | |
nmap <leader>cA <Action>(ShowIntentionActions) | |
" Next Reference | |
nmap ]] <Action>(GotoNextError) | |
" Prev Reference | |
nmap [[ <Action>(GotoPreviousError) | |
" Next Reference (alternative) | |
nmap <a-n> <Action>(GotoNextError) | |
" Prev Reference (alternative) | |
nmap <a-p> <Action>(GotoPreviousError) | |
" Bufferline | |
" Delete buffers to the left | |
nmap <leader>bl <Action>(CloseAllToTheLeft) | |
" Toggle pin | |
nmap <leader>bp <Action>(PinActiveTabToggle) | |
" Delete Non-Pinned Buffers | |
nmap <leader>bP <Action>(CloseAllUnpinnedEditors) | |
" Delete buffers to the right | |
nmap <leader>br <Action>(CloseAllToTheRight) | |
" Neo-tree Keymaps | |
" Buffer Explorer | |
nmap <leader>be <Action>(ActivateProjectToolWindow) | |
" Explorer NeoTree (Root Dir) | |
nmap <leader>e <Action>(FileStructurePopup) | |
" Explorer NeoTree (cwd) | |
nmap <leader>E <Action>(SelectInProjectView) | |
" Explorer NeoTree (Root Dir) (alternative) | |
nmap <leader>fe <Action>(ActivateProjectToolWindow) | |
" Explorer NeoTree (cwd) (alternative) | |
nmap <leader>fE <Action>(ActivateProjectToolWindow) | |
" Git Explorer | |
nmap <leader>ge <Action>(ActivateVersionControlToolWindow) | |
" Notifications (noice, snacks) | |
nmap <leader>snd <Action>(ClearAllNotifications) | |
nmap <leader>un <Action>(ClearAllNotifications) | |
" Telescope Keymaps | |
" Find Files (Root Dir) | |
nmap <leader><space> <Action>(GotoFile) | |
" Switch Buffer | |
nmap <leader>, <Action>(Switcher) | |
" Grep (Root Dir) | |
nmap <leader>/ <Action>(FindInPath) | |
" Command History | |
nmap <leader>: :history<cr> | |
" Buffers | |
nmap <leader>fb <Action>(Switcher) | |
" Find Config File | |
nmap <leader>fc <Action>(GotoFile) | |
" Find Files (Root Dir) (alternative) | |
nmap <leader>ff <Action>(GotoFile) | |
" Find Files (cwd) | |
nmap <leader>fF <Action>(GotoFile) | |
" Find Files (git-files) | |
nmap <leader>fg <Action>(GotoFile) | |
" Recent | |
nmap <leader>fr <Action>(RecentFiles) | |
" Recent (cwd) | |
nmap <leader>fR <Action>(RecentFiles) | |
" Commits | |
nmap <leader>gc <Action>(Vcs.Show.Log) | |
" Status | |
nmap <leader>gs <Action>(Vcs.Show.Log) | |
" Registers | |
nmap <leader>s" :registers<cr> | |
" Auto Commands | |
nmap <leader>sa :echo 'There is no equivalent mapping.'<cr> | |
" Buffer | |
nmap <leader>sb <Action>(Switcher) | |
" Command History (alternative) | |
nmap <leader>sc :history<cr> | |
" Commands | |
nmap <leader>sC <Action>(GotoAction) | |
" Document Diagnostics | |
nmap <leader>sd <Action>(ActivateProblemsViewToolWindow) | |
" Workspace Diagnostics | |
nmap <leader>sD <Action>(ActivateProblemsViewToolWindow) | |
" Grep (Root Dir) (alternative) | |
nmap <leader>sg <Action>(FindInPath) | |
" Grep (cwd) | |
nmap <leader>sG <Action>(FindInPath) | |
" Help Pages | |
nmap <leader>sh <Action>(HelpTopics) | |
" Search Highlight Groups | |
nmap <leader>sH <Action>(HighlightUsagesInFile) | |
" Jumplist | |
nmap <leader>sj <Action>(RecentLocations) | |
" Key Maps | |
nmap <leader>sk :map<cr> | |
" Location List | |
nmap <leader>sl <Action>(ActivateProblemsViewToolWindow) | |
" Jump to Mark | |
nmap <leader>sm :marks<cr> | |
" Man Pages | |
nmap <leader>sM <Action>(ShowDocumentation) | |
" Options | |
nmap <leader>so <Action>(ShowSettings) | |
" Quickfix List | |
nmap <leader>sq <Action>(ActivateProblemsViewToolWindow) | |
" Resume | |
nmap <leader>sR :echo 'Not yet implmented.'<cr> | |
" Goto Symbol | |
nmap <leader>ss <Action>(GotoSymbol) | |
" Goto Symbol (Workspace) | |
nmap <leader>sS <Action>(GotoSymbol) | |
" Word (Root Dir) | |
nmap <leader>sw <Action>(FindWordAtCaret) | |
" Word (cwd) | |
nmap <leader>sW <Action>(FindWordAtCaret) | |
" Selection (Root Dir) | |
vmap <leader>sw <Action>(FindWordAtCaret) | |
" Selection (cwd) | |
vmap <leader>sW <Action>(FindWordAtCaret) | |
" Colorscheme with Preview | |
nmap <leader>uC <Action>(QuickChangeScheme) | |
" DAP Keymaps | |
" Run with Args | |
nmap <leader>da <Action>(ChooseRunConfiguration) | |
" Toggle Breakpoint | |
nmap <leader>db <Action>(ToggleLineBreakpoint) | |
" Breakpoint Condition | |
nmap <leader>dB <Action>(AddConditionalBreakpoint) | |
" Continue | |
nmap <leader>dc <Action>(Resume) | |
" Run to Cursor | |
nmap <leader>dC <Action>(ForceRunToCursor) | |
" Go to Line (No Execute) | |
nmap <leader>dg :echo 'Not yet implemented.'<cr> | |
" Step Into | |
nmap <leader>di <Action>(StepInto) | |
" Down | |
nmap <leader>dj <Action>(GotoNextError) | |
" Up | |
nmap <leader>dk <Action>(GotoPreviousError) | |
" Run Last | |
nmap <leader>dl <Action>(Debug) | |
" Step Out | |
nmap <leader>do <Action>(StepOut) | |
" Step Over | |
nmap <leader>dO <Action>(StepOver) | |
" Pause | |
nmap <leader>dp <Action>(Pause) | |
" Toggle REPL | |
nmap <leader>dr <Action>(JShell.Console) | |
" Session | |
nmap <leader>ds :echo 'Not yet implmented.'<cr> | |
" Terminate | |
nmap <leader>dt <Action>(Stop) | |
" Widgets | |
nmap <leader>dw :echo 'There is no equivalent mapping for Widgets.'<cr> | |
" Todo-comments Keymaps | |
" Todo | |
nmap <leader>st oTODO<esc>gcc | |
" Todo/Fix/Fixme | |
nmap <leader>sT :echo 'Not yet implemented.'<cr> | |
" Todo (Trouble) | |
nmap <leader>xt :echo 'Not yet implemented.'<cr> | |
" Todo/Fix/Fixme (Trouble) | |
nmap <leader>xT :echo 'Not yet implemented.'<cr> | |
" Previous Todo Comment | |
nmap [t ?TODO<cr> | |
" Next Todo Comment | |
nmap ]t /TODO<cr> | |
" DAP UI Keymaps | |
" Eval | |
nmap <leader>de <Action>(EvaluateExpression) | |
vmap <leader>de <Action>(EvaluateExpression) | |
" Dap UI | |
nmap <leader>du <Action>(ActivateDebugToolWindow) | |
" Neotest Keymaps | |
" Run Last | |
nmap <leader>tl <Action>(Run) | |
" Show Output | |
nmap <leader>to :echo 'Not yet implemented.'<cr> | |
" Toggle Output Panel | |
nmap <leader>tO :echo 'Not yet implemented.'<cr> | |
" Run Nearest | |
nmap <leader>tr <Action>(RunClass) | |
" Toggle Summary | |
nmap <leader>ts <Action>(ShowTestSummary) | |
" Stop | |
nmap <leader>tS <Action>(Stop) | |
" Run File | |
nmap <leader>tt <Action>(RunClass) | |
" Run All Test Files | |
nmap <leader>tT <Action>(RunAllTests) | |
" Toggle Watch | |
nmap <leader>tw <Action>(ToggleTestWatch) | |
" nvim-dap | |
" Debug Nearest | |
nmap <leader>td <Action>(ChooseDebugConfiguration) | |
" Neovim mappings | |
" https://neovim.io/doc/user/vim_diff.html#_default-mappings | |
nnoremap Y y$ | |
inoremap <C-U> <C-G>u<C-U> | |
inoremap <C-W> <C-G>u<C-W> | |
" Q isn't exactly the same. | |
nnoremap Q @@ | |
" There are several more Neovim mappings that need to be ported. See link. | |
" Jetbrains conflicts | |
" https://github.com/JetBrains/ideavim/blob/master/doc/sethandler.md | |
" None, yet. Possible conflicts: ctrl -6befhjklorsvw | |
" Notes and Caveats: | |
" Tabs map to JB saved layouts. | |
" Not everything has been tested. | |
" TODOs: | |
" Jetbrains conflicts | |
" Improve Todo-comments | |
" Convert to a github project | |
" which-key labels | |
" Test every map. sidy-by-side. | |
" Compare all which-key popups | |
" Consider: | |
" flash, grub-far, noice, trouble, mini.diff, oversear, copilotchat, | |
" dial, outline, md preview, harpoon, octo |
This is a god send! Thank you.
However, I can't seem to make use of the local leader mapping.
With the default mapping let maplocalleader="\\"
, I can't really map it to anything,
e.g.
" Terminal (Root Dir)
nmap <localleader>ft <Action>(ActivateTerminalToolWindow)
I usually use ,
as localleader in Neovim, but regardless if I use \\
or ,
as <localleader>
, all I get it is the
"error chime" when trying to execute the mapping above. Doesn't seem to matter which underlying IDE mapping
I have (VSCode, Windows, Rider, etc).
Any ideas?
@helibom This is an IDEAVim issue. I believe it's not yet implemented. I searched the source and found no references tolocalleader
.
This ugly solution should work (untested): :execute 'nmap ' . maplocalleader . 'ft <Action>(ActivateTerminalToolWindow)'
When I next update this file, I'll remove the line and include a warning comment.
Thanks for getting back to me. Unfortunately, that hack did not seem to do the trick for me at least.
However, I realized I could get by with my workflow using only the leader key, even in good old Neovim, so that will have to do for now.
Hopefully the Neovim integration with JetBrains will get better in the future.
Hi, I saw your TODO about the which-key labels and got to work :)
Maybe it is really time that this becomes a repo!
let g:WhichKeyDesc_LazyVim_1 = "<leader>bb Switch to Other Buffer"
let g:WhichKeyDesc_LazyVim_2 = "<leader>` Switch to Other Buffer"
let g:WhichKeyDesc_LazyVim_3 = "<leader>bD Delete Buffer and Window"
let g:WhichKeyDesc_LazyVim_4 = "<leader>K Keywordprg"
let g:WhichKeyDesc_LazyVim_5 = "<leader>l Lazy"
let g:WhichKeyDesc_LazyVim_6 = "<leader>fn New File"
let g:WhichKeyDesc_LazyVim_7 = "<leader>xl Location List"
let g:WhichKeyDesc_LazyVim_8 = "<leader>xq Quickfix List"
let g:WhichKeyDesc_LazyVim_9 = "<leader>cd Line Diagnostics"
let g:WhichKeyDesc_LazyVim_10 = "<leader>gg Lazygit (Root Dir)"
let g:WhichKeyDesc_LazyVim_11 = "<leader>gG Lazygit (cwd)"
let g:WhichKeyDesc_LazyVim_12 = "<leader>gf Git Current File History"
let g:WhichKeyDesc_LazyVim_13 = "<leader>gl Git Log"
let g:WhichKeyDesc_LazyVim_14 = "<leader>gL Git Log (cwd)"
let g:WhichKeyDesc_LazyVim_15 = "<leader>gb Git Blame Line"
let g:WhichKeyDesc_LazyVim_16 = "<leader>gB Git Browse (open)"
let g:WhichKeyDesc_LazyVim_17 = "<leader>qq Quit All"
let g:WhichKeyDesc_LazyVim_18 = "<leader>ui Inspect Pos"
let g:WhichKeyDesc_LazyVim_19 = "<leader>uI Inspect Tree"
let g:WhichKeyDesc_LazyVim_20 = "<leader>L LazyVim Changelog"
let g:WhichKeyDesc_LazyVim_21 = "<leader>fT Terminal (cwd)"
let g:WhichKeyDesc_LazyVim_22 = "<leader>ft Terminal (Root Dir)"
let g:WhichKeyDesc_LazyVim_23 = "<leader>w Windows"
let g:WhichKeyDesc_LazyVim_24 = "<leader>- Split Window Below"
let g:WhichKeyDesc_LazyVim_25 = "<leader>| Split Window Right"
let g:WhichKeyDesc_LazyVim_26 = "<leader>wd Delete Window"
let g:WhichKeyDesc_LazyVim_27 = "<leader><tab>l Last Tab"
let g:WhichKeyDesc_LazyVim_28 = "<leader><tab>o Close Other Tabs"
let g:WhichKeyDesc_LazyVim_29 = "<leader><tab>f First Tab"
let g:WhichKeyDesc_LazyVim_30 = "<leader><tab><tab> New Tab"
let g:WhichKeyDesc_LazyVim_31 = "<leader><tab>] Next Tab"
let g:WhichKeyDesc_LazyVim_32 = "<leader><tab>d Close Tab"
let g:WhichKeyDesc_LazyVim_33 = "<leader><tab>[ Previous Tab"
let g:WhichKeyDesc_LazyVim_34 = "<leader>cl Lsp Info"
let g:WhichKeyDesc_LazyVim_35 = "<leader>ca Code Action"
let g:WhichKeyDesc_LazyVim_36 = "<leader>cc Run Codelens"
let g:WhichKeyDesc_LazyVim_37 = "<leader>cC Refresh & Display Codelens"
let g:WhichKeyDesc_LazyVim_38 = "<leader>cR Rename File"
let g:WhichKeyDesc_LazyVim_39 = "<leader>cr Rename"
let g:WhichKeyDesc_LazyVim_40 = "<leader>cA Source Action"
let g:WhichKeyDesc_LazyVim_41 = "<leader>cm Mason"
let g:WhichKeyDesc_LazyVim_42 = "<leader>ow Task list"
let g:WhichKeyDesc_LazyVim_43 = "<leader>oo Run task"
let g:WhichKeyDesc_LazyVim_44 = "<leader>oq Action recent task"
let g:WhichKeyDesc_LazyVim_45 = "<leader>oi Overseer Info"
let g:WhichKeyDesc_LazyVim_46 = "<leader>ob Task builder"
let g:WhichKeyDesc_LazyVim_47 = "<leader>ot Task action"
let g:WhichKeyDesc_LazyVim_48 = "<leader>oc Clear cache"
let g:WhichKeyDesc_LazyVim_49 = "<leader>, Buffers"
let g:WhichKeyDesc_LazyVim_50 = "<leader>/ Grep (Root Dir)"
let g:WhichKeyDesc_LazyVim_51 = "<leader>: Command History"
let g:WhichKeyDesc_LazyVim_52 = "<leader><space> Find Files (Root Dir)"
let g:WhichKeyDesc_LazyVim_53 = "<leader>fb Buffers"
let g:WhichKeyDesc_LazyVim_54 = "<leader>fc Find Config File"
let g:WhichKeyDesc_LazyVim_55 = "<leader>ff Find Files (Root Dir)"
let g:WhichKeyDesc_LazyVim_56 = "<leader>fF Find Files (cwd)"
let g:WhichKeyDesc_LazyVim_57 = "<leader>fg Find Files (git-files)"
let g:WhichKeyDesc_LazyVim_58 = "<leader>fr Recent"
let g:WhichKeyDesc_LazyVim_59 = "<leader>fR Recent (cwd)"
let g:WhichKeyDesc_LazyVim_60 = "<leader>gc Git Log"
let g:WhichKeyDesc_LazyVim_61 = "<leader>gd Git Diff (hunks)"
let g:WhichKeyDesc_LazyVim_62 = "<leader>gs Git Status"
let g:WhichKeyDesc_LazyVim_63 = "<leader>sb Buffer Lines"
let g:WhichKeyDesc_LazyVim_64 = "<leader>sB Grep Open Buffers"
let g:WhichKeyDesc_LazyVim_65 = "<leader>sg Grep (Root Dir)"
let g:WhichKeyDesc_LazyVim_66 = "<leader>sG Grep (cwd)"
let g:WhichKeyDesc_LazyVim_67 = "<leader>sw Visual selection or word (Root Dir)"
let g:WhichKeyDesc_LazyVim_68 = "<leader>sW Visual selection or word (cwd)"
let g:WhichKeyDesc_LazyVim_69 = "<leader>sa Autocmds"
let g:WhichKeyDesc_LazyVim_70 = "<leader>sc Command History"
let g:WhichKeyDesc_LazyVim_71 = "<leader>sC Commands"
let g:WhichKeyDesc_LazyVim_72 = "<leader>sd Diagnostics"
let g:WhichKeyDesc_LazyVim_73 = "<leader>sh Help Pages"
let g:WhichKeyDesc_LazyVim_74 = "<leader>sH Highlights"
let g:WhichKeyDesc_LazyVim_75 = "<leader>sj Jumps"
let g:WhichKeyDesc_LazyVim_76 = "<leader>sk Keymaps"
let g:WhichKeyDesc_LazyVim_77 = "<leader>sl Location List"
let g:WhichKeyDesc_LazyVim_78 = "<leader>sM Man Pages"
let g:WhichKeyDesc_LazyVim_79 = "<leader>sm Marks"
let g:WhichKeyDesc_LazyVim_80 = "<leader>sR Resume"
let g:WhichKeyDesc_LazyVim_81 = "<leader>sq Quickfix List"
let g:WhichKeyDesc_LazyVim_82 = "<leader>uC Colorschemes"
let g:WhichKeyDesc_LazyVim_83 = "<leader>fp Projects"
let g:WhichKeyDesc_LazyVim_84 = "<leader>ss LSP Symbols"
let g:WhichKeyDesc_LazyVim_85 = "<leader>sS LSP Workspace Symbols"
let g:WhichKeyDesc_LazyVim_86 = "<leader>st Todo"
let g:WhichKeyDesc_LazyVim_87 = "<leader>sT Todo/Fix/Fixme"
let g:WhichKeyDesc_LazyVim_88 = "<leader>/ Grep (Root Dir)"
let g:WhichKeyDesc_LazyVim_89 = "<leader>: Command History"
let g:WhichKeyDesc_LazyVim_90 = "<leader><space> Find Files (Root Dir)"
let g:WhichKeyDesc_LazyVim_91 = "<leader>fb Buffers"
let g:WhichKeyDesc_LazyVim_92 = "<leader>fc Find Config File"
let g:WhichKeyDesc_LazyVim_93 = "<leader>ff Find Files (Root Dir)"
let g:WhichKeyDesc_LazyVim_94 = "<leader>fF Find Files (cwd)"
let g:WhichKeyDesc_LazyVim_95 = "<leader>fg Find Files (git-files)"
let g:WhichKeyDesc_LazyVim_96 = "<leader>fr Recent"
let g:WhichKeyDesc_LazyVim_97 = "<leader>fR Recent (cwd)"
let g:WhichKeyDesc_LazyVim_98 = "<leader>gc Commits"
let g:WhichKeyDesc_LazyVim_99 = "<leader>gs Status"
let g:WhichKeyDesc_LazyVim_100 = "<leader>sa Auto Commands"
let g:WhichKeyDesc_LazyVim_101 = "<leader>sb Buffer"
let g:WhichKeyDesc_LazyVim_102 = "<leader>sc Command History"
let g:WhichKeyDesc_LazyVim_103 = "<leader>sC Commands"
let g:WhichKeyDesc_LazyVim_104 = "<leader>sd Document Diagnostics"
let g:WhichKeyDesc_LazyVim_105 = "<leader>sD Workspace Diagnostics"
let g:WhichKeyDesc_LazyVim_106 = "<leader>sg Grep (Root Dir)"
let g:WhichKeyDesc_LazyVim_107 = "<leader>sG Grep (cwd)"
let g:WhichKeyDesc_LazyVim_108 = "<leader>sh Help Pages"
let g:WhichKeyDesc_LazyVim_109 = "<leader>sH Search Highlight Groups"
let g:WhichKeyDesc_LazyVim_110 = "<leader>sj Jumplist"
let g:WhichKeyDesc_LazyVim_111 = "<leader>sk Key Maps"
let g:WhichKeyDesc_LazyVim_112 = "<leader>sl Location List"
let g:WhichKeyDesc_LazyVim_113 = "<leader>sM Man Pages"
let g:WhichKeyDesc_LazyVim_114 = "<leader>sm Jump to Mark"
let g:WhichKeyDesc_LazyVim_115 = "<leader>sR Resume"
let g:WhichKeyDesc_LazyVim_116 = "<leader>sq Quickfix List"
let g:WhichKeyDesc_LazyVim_117 = "<leader>sw Word (Root Dir)"
let g:WhichKeyDesc_LazyVim_118 = "<leader>sW Word (cwd)"
let g:WhichKeyDesc_LazyVim_119 = "<leader>sw Selection (Root Dir)"
let g:WhichKeyDesc_LazyVim_120 = "<leader>sW Selection (cwd)"
let g:WhichKeyDesc_LazyVim_121 = "<leader>uC Colorscheme with Preview"
let g:WhichKeyDesc_LazyVim_122 = "<leader>st Todo"
let g:WhichKeyDesc_LazyVim_123 = "<leader>sT Todo/Fix/Fixme"
let g:WhichKeyDesc_LazyVim_124 = "<leader>cs Aerial (Symbols)"
let g:WhichKeyDesc_LazyVim_125 = "<leader>cs Toggle Outline"
let g:WhichKeyDesc_LazyVim_126 = "<leader>r +refactor"
let g:WhichKeyDesc_LazyVim_127 = "<leader>/ Grep (Root Dir)"
let g:WhichKeyDesc_LazyVim_128 = "<leader>: Command History"
let g:WhichKeyDesc_LazyVim_129 = "<leader><space> Find Files (Root Dir)"
let g:WhichKeyDesc_LazyVim_130 = "<leader>fc Find Config File"
let g:WhichKeyDesc_LazyVim_131 = "<leader>ff Find Files (Root Dir)"
let g:WhichKeyDesc_LazyVim_132 = "<leader>fF Find Files (cwd)"
let g:WhichKeyDesc_LazyVim_133 = "<leader>fg Find Files (git-files)"
let g:WhichKeyDesc_LazyVim_134 = "<leader>fr Recent"
let g:WhichKeyDesc_LazyVim_135 = "<leader>fR Recent (cwd)"
let g:WhichKeyDesc_LazyVim_136 = "<leader>gc Commits"
let g:WhichKeyDesc_LazyVim_137 = "<leader>gs Status"
let g:WhichKeyDesc_LazyVim_138 = "<leader>sa Auto Commands"
let g:WhichKeyDesc_LazyVim_139 = "<leader>sb Buffer"
let g:WhichKeyDesc_LazyVim_140 = "<leader>sc Command History"
let g:WhichKeyDesc_LazyVim_141 = "<leader>sC Commands"
let g:WhichKeyDesc_LazyVim_142 = "<leader>sd Document Diagnostics"
let g:WhichKeyDesc_LazyVim_143 = "<leader>sD Workspace Diagnostics"
let g:WhichKeyDesc_LazyVim_144 = "<leader>sg Grep (Root Dir)"
let g:WhichKeyDesc_LazyVim_145 = "<leader>sG Grep (cwd)"
let g:WhichKeyDesc_LazyVim_146 = "<leader>sh Help Pages"
let g:WhichKeyDesc_LazyVim_147 = "<leader>sH Search Highlight Groups"
let g:WhichKeyDesc_LazyVim_148 = "<leader>sj Jumplist"
let g:WhichKeyDesc_LazyVim_149 = "<leader>sk Key Maps"
let g:WhichKeyDesc_LazyVim_150 = "<leader>sl Location List"
let g:WhichKeyDesc_LazyVim_151 = "<leader>sM Man Pages"
let g:WhichKeyDesc_LazyVim_152 = "<leader>sm Jump to Mark"
let g:WhichKeyDesc_LazyVim_153 = "<leader>so Options"
let g:WhichKeyDesc_LazyVim_154 = "<leader>sR Resume"
let g:WhichKeyDesc_LazyVim_155 = "<leader>sq Quickfix List"
let g:WhichKeyDesc_LazyVim_156 = "<leader>sw Word (Root Dir)"
let g:WhichKeyDesc_LazyVim_157 = "<leader>sW Word (cwd)"
let g:WhichKeyDesc_LazyVim_158 = "<leader>sw Selection (Root Dir)"
let g:WhichKeyDesc_LazyVim_159 = "<leader>sW Selection (cwd)"
let g:WhichKeyDesc_LazyVim_160 = "<leader>uC Colorscheme with Preview"
let g:WhichKeyDesc_LazyVim_161 = "<leader>dB Breakpoint Condition"
let g:WhichKeyDesc_LazyVim_162 = "<leader>db Toggle Breakpoint"
let g:WhichKeyDesc_LazyVim_163 = "<leader>dc Run/Continue"
let g:WhichKeyDesc_LazyVim_164 = "<leader>da Run with Args"
let g:WhichKeyDesc_LazyVim_165 = "<leader>dC Run to Cursor"
let g:WhichKeyDesc_LazyVim_166 = "<leader>dg Go to Line (No Execute)"
let g:WhichKeyDesc_LazyVim_167 = "<leader>di Step Into"
let g:WhichKeyDesc_LazyVim_168 = "<leader>dj Down"
let g:WhichKeyDesc_LazyVim_169 = "<leader>dk Up"
let g:WhichKeyDesc_LazyVim_170 = "<leader>dl Run Last"
let g:WhichKeyDesc_LazyVim_171 = "<leader>do Step Out"
let g:WhichKeyDesc_LazyVim_172 = "<leader>dO Step Over"
let g:WhichKeyDesc_LazyVim_173 = "<leader>dP Pause"
let g:WhichKeyDesc_LazyVim_174 = "<leader>dr Toggle REPL"
let g:WhichKeyDesc_LazyVim_175 = "<leader>ds Session"
let g:WhichKeyDesc_LazyVim_176 = "<leader>dt Terminate"
let g:WhichKeyDesc_LazyVim_177 = "<leader>dw Widgets"
let g:WhichKeyDesc_LazyVim_178 = "<leader>du Dap UI"
let g:WhichKeyDesc_LazyVim_179 = "<leader>de Eval"
let g:WhichKeyDesc_LazyVim_180 = "<leader>t +test"
let g:WhichKeyDesc_LazyVim_181 = "<leader>tt Run File (Neotest)"
let g:WhichKeyDesc_LazyVim_182 = "<leader>tT Run All Test Files (Neotest)"
let g:WhichKeyDesc_LazyVim_183 = "<leader>tr Run Nearest (Neotest)"
let g:WhichKeyDesc_LazyVim_184 = "<leader>tl Run Last (Neotest)"
let g:WhichKeyDesc_LazyVim_185 = "<leader>ts Toggle Summary (Neotest)"
let g:WhichKeyDesc_LazyVim_186 = "<leader>to Show Output (Neotest)"
let g:WhichKeyDesc_LazyVim_187 = "<leader>tO Toggle Output Panel (Neotest)"
let g:WhichKeyDesc_LazyVim_188 = "<leader>tS Stop (Neotest)"
let g:WhichKeyDesc_LazyVim_189 = "<leader>tw Toggle Watch (Neotest)"
let g:WhichKeyDesc_LazyVim_190 = "<leader>td Debug Nearest"
let g:WhichKeyDesc_LazyVim_191 = "<leader>cxv Extract Variable"
let g:WhichKeyDesc_LazyVim_192 = "<leader>cxc Extract Constant"
let g:WhichKeyDesc_LazyVim_193 = "<leader>cgs Goto Super"
let g:WhichKeyDesc_LazyVim_194 = "<leader>cgS Goto Subjects"
let g:WhichKeyDesc_LazyVim_195 = "<leader>co Organize Imports"
let g:WhichKeyDesc_LazyVim_196 = "<leader>tT Run Test"
let g:WhichKeyDesc_LazyVim_197 = "<leader>dPt Debug Method"
let g:WhichKeyDesc_LazyVim_198 = "<leader>dPc Debug Class"
let g:WhichKeyDesc_LazyVim_199 = "<leader>cv Select VirtualEnv"
let g:WhichKeyDesc_LazyVim_200 = "<leader>ch Switch Source/Header (C/C++)"
let g:WhichKeyDesc_LazyVim_201 = "<leader>D Toggle DBUI"
let g:WhichKeyDesc_LazyVim_202 = "<leader>a +ai"
let g:WhichKeyDesc_LazyVim_203 = "<leader>ap Prompt Actions (CopilotChat)"
let g:WhichKeyDesc_LazyVim_204 = "<leader>uE Edgy Select Window"
let g:WhichKeyDesc_LazyVim_205 = "<leader>fp Projects"
let g:WhichKeyDesc_LazyVim_206 = "<leader>fp Projects"
let g:WhichKeyDesc_LazyVim_207 = "<leader>R +Rest"
let g:WhichKeyDesc_LazyVim_208 = "<leader>Rb Open scratchpad"
let g:WhichKeyDesc_LazyVim_209 = "<leader>Rc Copy as cURL"
let g:WhichKeyDesc_LazyVim_210 = "<leader>RC Paste from curl"
let g:WhichKeyDesc_LazyVim_211 = "<leader>Ri Inspect current request"
let g:WhichKeyDesc_LazyVim_212 = "<leader>Rn Jump to next request"
let g:WhichKeyDesc_LazyVim_213 = "<leader>Rp Jump to previous request"
let g:WhichKeyDesc_LazyVim_214 = "<leader>Rq Close window"
let g:WhichKeyDesc_LazyVim_215 = "<leader>Rr Replay the last request"
let g:WhichKeyDesc_LazyVim_216 = "<leader>Rs Send the request"
let g:WhichKeyDesc_LazyVim_217 = "<leader>RS Show stats"
let g:WhichKeyDesc_LazyVim_218 = "<leader>Rt Toggle headers/body"
let g:WhichKeyDesc_LazyVim_219 = "<leader>gi List Issues (Octo)"
let g:WhichKeyDesc_LazyVim_220 = "<leader>gI Search Issues (Octo)"
let g:WhichKeyDesc_LazyVim_221 = "<leader>gp List PRs (Octo)"
let g:WhichKeyDesc_LazyVim_222 = "<leader>gP Search PRs (Octo)"
let g:WhichKeyDesc_LazyVim_223 = "<leader>gr List Repos (Octo)"
let g:WhichKeyDesc_LazyVim_224 = "<leader>gS Search (Octo)"
let g:WhichKeyDesc_LazyVim_225 = "<leader>bp Toggle Pin"
let g:WhichKeyDesc_LazyVim_226 = "<leader>bP Delete Non-Pinned Buffers"
let g:WhichKeyDesc_LazyVim_227 = "<leader>br Delete Buffers to the Right"
let g:WhichKeyDesc_LazyVim_228 = "<leader>bl Delete Buffers to the Left"
let g:WhichKeyDesc_LazyVim_229 = "<leader>sn +noice"
let g:WhichKeyDesc_LazyVim_230 = "<leader>snl Noice Last Message"
let g:WhichKeyDesc_LazyVim_231 = "<leader>snh Noice History"
let g:WhichKeyDesc_LazyVim_232 = "<leader>sna Noice All"
let g:WhichKeyDesc_LazyVim_233 = "<leader>snd Dismiss All"
let g:WhichKeyDesc_LazyVim_234 = "<leader>snt Noice Picker (Telescope/FzfLua)"
let g:WhichKeyDesc_LazyVim_235 = "<leader>n Notification History"
let g:WhichKeyDesc_LazyVim_236 = "<leader>un Dismiss All Notifications"
let g:WhichKeyDesc_LazyVim_237 = "<leader>fe Explorer NeoTree (Root Dir)"
let g:WhichKeyDesc_LazyVim_238 = "<leader>fE Explorer NeoTree (cwd)"
let g:WhichKeyDesc_LazyVim_239 = "<leader>xx Diagnostics (Trouble)"
let g:WhichKeyDesc_LazyVim_240 = "<leader>xX Buffer Diagnostics (Trouble)"
let g:WhichKeyDesc_LazyVim_241 = "<leader>cs Symbols (Trouble)"
let g:WhichKeyDesc_LazyVim_242 = "<leader>cS LSP references/definitions/... (Trouble)"
let g:WhichKeyDesc_LazyVim_243 = "<leader>xL Location List (Trouble)"
let g:WhichKeyDesc_LazyVim_244 = "<leader>xQ Quickfix List (Trouble)"
let g:WhichKeyDesc_LazyVim_245 = "<leader>xt Todo (Trouble)"
let g:WhichKeyDesc_LazyVim_246 = "<leader>xT Todo/Fix/Fixme (Trouble)"
let g:WhichKeyDesc_LazyVim_247 = "<leader>st Todo"
let g:WhichKeyDesc_LazyVim_248 = "<leader>sT Todo/Fix/Fixme"
let g:WhichKeyDesc_LazyVim_249 = "<leader>. Toggle Scratch Buffer"
let g:WhichKeyDesc_LazyVim_250 = "<leader>S Select Scratch Buffer"
let g:WhichKeyDesc_LazyVim_251 = "<leader>dps Profiler Scratch Buffer"
let g:WhichKeyDesc_LazyVim_252 = "<leader>qs Restore Session"
let g:WhichKeyDesc_LazyVim_253 = "<leader>qS Select Session"
let g:WhichKeyDesc_LazyVim_254 = "<leader>ql Restore Last Session"
let g:WhichKeyDesc_LazyVim_255 = "<leader>qd Don't Save Current Session"
I generated those directly from the LazyVim sourcecode by running this:
grep --no-filename -r -E '"<leader>[^"]+".*desc\s*=\s*"[^"]+"' . | sed -E 's/.*"(<leader>[^"]+)".*desc\s*=\s*"([^"]+)".*$/let g:WhichKeyDesc_LazyVim___counter__ = "\1 \2"/' | awk -v word="__counter__" 'BEGIN {count=0;} {gsub(word, ++count); print}'
Thanks for this amazing contributions!
Agree with @cufarvid and @luqasn, this could become a repo so we can contribute with PRs. Not only to improve the current file, LazyVim is always adding new keymaps that we could keep up to date together. What do you think @mikeslattery?
I've created a repository at https://github.com/cufarvid/lazy-idea based on this gist to make it easier for people to contribute. Feel free to check it out and contribute!
I appreciate the effort and ofc you are free to fork whatever, but out of courtesy I'd have preferred to give the original author the choice to turn this into a repo under their account. I'll wait some more to see if they come back until I start contributing. No beef, just love <3
I endorse the new github repo.
@cufarvid and @luqasn , I appreciate the feedback here. I'm happy cufarvid made the repo, as he gave me attribution. I only do Java for a few months of the year (occasional projects at work), so I am not motivated to maintain a repo.
My only ask is that @cufarvid maintain it over the long term and eagerly accept PRs, including my own.
Perfect, thanks to you both!
@mikeslattery Thanks for the endorsement - PRs are definitely welcome, including yours.
@luqasn Appreciate the feedback, would be great to have your contributions.
Great configuration! I have noticed
Delete Other buffers
was missing. This is how I map it:Happy to contribute a PR once this moves to a repo.