--- title: "Vim mode" description: "Turn on Vim emulation, configure it with ~/.ideavimrc, map keys to IDE actions and resolve shortcut conflicts." --- OpenIDEA has a built-in Vim emulation modelled on IntelliJ IDEA's IdeaVim plugin. The editing engine is [`@replit/codemirror-vim`](https://github.com/replit/codemirror-vim); OpenIDEA adds IDE integration on top: Ex commands that save and close tabs, `:action` to run IDE commands, IdeaVim-style rc files and a shortcut conflict table. ## Turn it on Use any of these: - **Tools › Vim**, which turns it on or off. - The **Vim** widget in the status bar: click it and check **Enabled**. - **Settings › Editor › Vim** › **Enable Vim emulation**. The setting applies to every editor in every window right away and is remembered across restarts. While Vim mode is on, the status bar widget shows the current mode: `NORMAL`, `INSERT`, `VISUAL`, `V-LINE`, `V-BLOCK` or `REPLACE`. ## What works The usual Vim editing model is available through codemirror-vim: Normal, Insert, Visual (characterwise, linewise and blockwise) and Replace modes, motions, operators and text objects with counts, registers, marks, `.` repeat, search with `/`, `?`, `*` and `#`, and its Ex commands such as `:s`, `:g` and `:sort`. OpenIDEA adds these Ex commands: | Command | Does | | -------------- | ------------------------ | | `:w`, `:wa` | **Save All** | | `:q` | Close the editor tab | | `:qa` | Close all editor tabs | | `:wq`, `:x` | Save, then close the tab | | `:action ` | Run an IDE action | ## The rc file When Vim mode turns on (including at startup, if it was on), OpenIDEA reads `~/.openideavimrc`, or `~/.ideavimrc` when the first does not exist. Use `~/.openideavimrc` for settings that should apply only to OpenIDEA and not to IntelliJ IDEA. After editing the file, run **Reload .ideavimrc** (from the status bar widget or Find Action), or click **Reload** in **Settings › Editor › Vim**. The settings page shows which file was read, how many mappings it has, and every line that was ignored with the reason. Supported lines: | Line | Notes | | --------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `map`, `noremap` and their `n`, `v`, `x`, `i`, `o` variants (`nnoremap`, `vmap`…) | ``, ``, ``, ``, `` and `