Master Vim Keybindings in IntelliJ IDEA: Install, Practice, and Custom Config
This tutorial shows how to integrate Vim into IntelliJ IDEA with IdeaVim plugins, teaches essential Vim commands, provides step‑by‑step practice exercises, and explains how to customize the ~/.ideavimrc file with custom mappings and IntelliJ actions for a more efficient coding workflow.
Installation
Install the following three plugins from the IntelliJ Marketplace:
IdeaVim IdeaVim-EasyMotion IdeaVimExtensionAfter installation a small square icon appears in the lower‑right corner, indicating that the plugins are active.
Basic Vim commands
Movement switches from arrow keys to h j k l. Common commands include: yy – yank (copy) the current line p – paste the yanked text di" – delete the text inside double quotes ci" – delete inside double quotes and enter insert mode di( / ci( – same operations for parentheses
Insert‑mode shortcuts
a– append after the cursor i – insert before the cursor o – open a new line below and enter insert mode O – open a new line above and enter insert mode A – append at the end of the line I – insert at the beginning of the line
Jump and search commands
[n]f{char}– find {char} forward on the current line (use F for backward) $ – move to end of line, ^ – move to start of line % – jump between matching brackets
() [] {}Additional useful commands
zo/ zc – open/close folds dt{char} – delete up to
{char}Configuring IdeaVim
Click the Vim icon in the lower‑right corner and choose Open ~/.ideavimrc . Add custom mappings, for example:
" Exit insert mode with jk
inoremap jk <Esc>
let mapleader = " "
" IntelliJ actions
nnoremap <Leader>re :action RenameElement<CR>
nnoremap <Leader>gi :action GotoImplementation<CR>
nnoremap <Leader>im :action ImplementMethods<CR>
nnoremap <Leader>rv :action IntroduceVariable<CR>
nnoremap <Leader>cr :action CopyReference<CR>
nnoremap <Leader>em :action ExtractMethod<CR>
nnoremap <Leader>sw :action SurroundWith<CR>These mappings bind the space key (the mapleader) to common IntelliJ refactoring actions, allowing you to invoke them directly from Vim mode.
Plugin ecosystem note
Because Vim runs inside IntelliJ, the full Vim plugin ecosystem is not available. No standout third‑party Vim plugins have been identified for this environment, but users are encouraged to share any useful extensions they discover.
References
Bilibili Vim introduction video
Coolshell Vim guide
Learn‑Vim GitHub repository
Ruanyifeng’s Vim configuration article
Liangxu Linux
Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
