Skip to content

Instantly share code, notes, and snippets.

@AamuLumi
Created December 16, 2025 11:11
Show Gist options
  • Select an option

  • Save AamuLumi/a2f5111e44d39181bc26a05a695607a1 to your computer and use it in GitHub Desktop.

Select an option

Save AamuLumi/a2f5111e44d39181bc26a05a695607a1 to your computer and use it in GitHub Desktop.
My custom IDEAVim configuration for an MacOS AZERTY layout
"""" IdeaVim configuration file
"" Author: Aamu
"" This file is optimized for a MacOS AZERTY keyboard layout
"" Source your .vimrc
"source ~/.vimrc
Plug 'terryma/vim-multiple-cursor'
Plug 'preservim/nerdtree'
let mapleader=" "
"" -- Options --
" Show a few lines of context around the cursor. Note that this makes the
" text scroll if you mouse-click near the start or end of the window.
set scrolloff=10
" Do incremental searching.
set incsearch
" Don't use Ex mode, use Q for formatting.
map Q gq
" Show shortcuts in a popup with which-key plugin
set which-key
" Increase timeoutlen to make which-key visible longer
set timeoutlen=5000
" Enable system clipboard integration
set clipboard+=unnamed
set clipboard+=ideaput
" Show line numbers and relative line numbers
set number relativenumber
" Add easymotion and multiple-cursors plugins
set easymotion
set multiple-cursors
"" -- Mapping --
" Base actions
nmap <c-m> <Action>(MoveEditorToOppositeTabGroup)
nmap <c-h> <c-w>h
nmap <c-l> <c-w>l
nmap <c-j> 25j
nmap <c-k> 25k
vmap <c-j> 25j
vmap <c-k> 25k
nmap <A-S-j> <Action>(MoveLineDown)
nmap <A-S-k> <Action>(MoveLineUp)
nmap <leader>p #
nmap <leader>n *
" Multiple cursors
nmap <C-n> <Plug>NextWholeOccurrence
xmap <C-n> <Plug>NextWholeOccurrence
nmap g<C-n> <Plug>NextOccurrence
xmap g<C-n> <Plug>NextOccurrence
xmap <C-x> <Plug>SkipOccurrence
xmap <C-p> <Plug>RemoveOccurrence
nmap <S-C-n> <Plug>AllWholeOccurrences
xmap <S-C-n> <Plug>AllWholeOccurrences
nmap g<S-C-n> <Plug>AllOccurrences
xmap g<S-C-n> <Plug>AllOccurrences
" Code editing and navigation
nmap <leader>/ <Action>(CommentByLineComment)
nmap <leader>r <Action>(Refactorings.QuickListPopupAction)
nmap <leader>a <Action>(QuickJavaDoc)
nmap <leader>e <Action>(ShowErrorDescription)
nmap <leader>imp <Action>(AddAllImports)
nmap <leader>u <Action>(FindUsages)
nmap gb <Action>(Back)
nmap gc <Action>(GotoClass)
nmap gd <Action>(GotoDeclaration)
nmap ge <Action>(GotoNextError)
nmap gi <Action>(GotoImplementation)
nmap gp <Action>(GotoSuperMethod)
nmap gr <Action>(GotoRelated)
nmap gs <Action>(GotoSymbol)
nmap gt <Action>(GotoTest)
nmap <leader>f <Plug>(easymotion-s)
" Webstorm navigation
nmap <C-e> :NERDTree<CR>
nmap <C-d> <Action>(ActivateDebugToolWindow)
nmap <C-f> <Action>(FindInPath)
nmap <C-S-O> <Action>(GotoAction)
nmap <C-o> <Action>(GotoFile)
nmap <C-c> <Action>(GotoClass)
nmap <c-r> <Action>(RecentFiles)
nmap <leader>gb <Action>(Annotate)
nmap <leader>h <Action>(LocalHistory.ShowHistory)
nmap <leader>hw <Action>(HideSideWindows)
nmap <leader>l <Action>(RecentLocations)
" Run and debug actions
nmap <leader>b <Action>(BuildWholeSolutionAction)
nmap <leader>bp <Action>(ToggleLineBreakpoint)
nmap <leader>eval <Action>(EvaluateExpression)
nmap <leader>rdc <Action>(ChooseDebugConfiguration)
nmap <leader>rdt <Action>(DebugClass)
nmap <leader>run <Action>(Run)
nmap <leader>rt <Action>(RunClass)
nmap ! <Action>(StepOut)
nmap ç <Action>(StepInto)
nmap à <Action>(StepOver)
nmap ) <Action>(Resume)
nmap - <Action>(Stop)
" Plugins actions
nmap <leader>g<leader> <Action>(VcsGroups)
nmap <leader>ts <Action>(TypeScript.Restart.Service)
nmap <leader>rel <Action>(IdeaVim.ReloadVimRc.reload)
nmap <leader>vim :e ~/.ideavimrc<CR>
nmap <leader>vid <Action>(VimFindActionIdAction)
nmap <c-z> <Action>(ToggleDistractionFreeMode)
" Clipboard actions
" Map @ as a void register easy access
nmap @d "_d
nmap @p "_dP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment