ideavim README

The project's README from github.com/JetBrains/ideavim. As one markdown file: README.md.

icon

IdeaVim

Official JetBrains Project Contributions welcome Downloads Rating Version Gitter codecov Twitter

IdeaVim is a Vim engine for JetBrains IDEs.

Contact maintainers:
Resources:

Compatibility

IntelliJ IDEA, PyCharm, GoLand, CLion, PhpStorm, WebStorm, RubyMine, DataGrip, DataSpell, Rider, Cursive, Android Studio, and other JetBrains IDEs.

Setup

Get Early Access

Would you like to try new features and fixes? Join the Early Access Program and receive EAP builds as updates!

  1. Click the IdeaVim icon icon in the status bar | Early Access Program | Subscribe to EAP

Or subscribe to EAP updates manually:

  1. Open Settings | Plugins
  2. Click the gear icon :gear:, select Manage Plugin Repositories, and add the following url:
https://plugins.jetbrains.com/plugins/eap/ideavim

See the changelog for the list of unreleased features.

It is important to distinguish EAP builds from traditional pre-release software. Please note that the quality of EAP versions may at times be way below even usual beta standards.

You can always leave your feedback with:

Summary of Supported Vim Features

Here are some examples of supported vim features and commands:

See also:

Files

Example (click to see)
""" Map leader to space ---------------------
let mapleader=" "

""" Plugins  --------------------------------
set surround
set multiple-cursors
set commentary
set argtextobj
set easymotion
set textobj-entire
set ReplaceWithRegister

""" Plugin settings -------------------------
let g:argtextobj_pairs="[:],(:),<:>"

""" Common settings -------------------------
set showmode
set so=5
set incsearch
set nu

""" Idea specific settings ------------------
set ideajoin
set ideastatusicon=gray
set idearefactormode=keep

""" Mappings --------------------------------
map <leader>f <Plug>(easymotion-s)
map <leader>e <Plug>(easymotion-f)

map <leader>d <Action>(Debug)
map <leader>r <Action>(RenameElement)
map <leader>c <Action>(Stop)
map <leader>z <Action>(ToggleDistractionFreeMode)

map <leader>s <Action>(SelectInProjectView)
map <leader>a <Action>(Annotate)
map <leader>h <Action>(Vcs.ShowTabbedFileHistory)
map <S-Space> <Action>(GotoNextError)

map <leader>b <Action>(ToggleLineBreakpoint)
map <leader>o <Action>(FileStructurePopup)
Suggested options (click to see)

Here is also a list of the suggested options from defaults.vim

" 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=5

" Do incremental searching.
set incsearch

" Don't use Ex mode, use Q for formatting.
map Q gq

You can read your ~/.vimrc file from ~/.ideavimrc with this command:

source ~/.vimrc

Also note that if you have overridden the user.home JVM option, this will affect where IdeaVim looks for your .ideavimrc file. For example, if you have -Duser.home=/my/alternate/home then IdeaVim will source /my/alternate/home/.ideavimrc instead of ~/.ideavimrc.

Alternatively, you can set up initialization commands using XDG standard. Put your settings to $XDG_CONFIG_HOME/ideavim/ideavimrc file.

You can also set a custom path for your .ideavimrc file using the IDEA_VIM_CUSTOM_VIMRC environment variable. If set, IdeaVim will use this path instead of the default locations.

IdeaVim Plugins

See doc/IdeaVim Plugins.md

Executing IDE Actions

IdeaVim adds various commands for listing and executing arbitrary IDE actions as Ex commands or via :map command mappings:

Executing actions:

Finding action IDs:

Examples:
" Map \r to the Reformat Code action
:map \r <Action>(ReformatCode)

" Map <leader>d to start debug
:map <leader>d <Action>(Debug)

" Map \b to toggle the breakpoint on the current line
:map \b <Action>(ToggleLineBreakpoint)
ShowHoverInfo - Quick Documentation and Error Description
QuickImplementations - Quick Definition

Autocmd

IdeaVim supports Vim’s :autocmd for running commands on editor events, including InsertEnter/InsertLeave, buffer events (BufEnter, BufLeave, BufRead, BufNewFile, BufWritePre, BufWritePost), window events (WinEnter, WinLeave), focus events (FocusGained, FocusLost), and FileType. Full glob patterns (*, **, ?, [abc], {a,b}) and augroups are supported.

autocmd BufWritePre *.py echo "saving python"
autocmd FileType python setlocal shiftwidth=4

See doc/autocmd.md for the full event reference, firing order, and notes on IntelliJ-specific differences.

Vim Script

IdeaVim can execute custom scripts that are written with Vim Script. At the moment we support all language features, but not all of the built-in functions and options are supported.

Additionally, you may be interested in the Vim Script Discussion.

IDE specific options

You can evaluate the has('ide') function call and get 1 if it was called with IdeaVim or 0 if the function was called from Vim/NeoVim.
The option &ide contains the name and edition of your IDE, for example, "IntelliJ IDEA Ultimate Edition".
To see its value for the current IDE you are using, execute the :echo &ide command.
To write an IDE-specific configuration, use Vim's regexp match operators =~? (case-insensitive) / =~# (case-sensitive)

Example config:

" options and mappings that are supported by both Vim and IdeaVim
set nu
set relativenumber

if has('ide')
  " mappings and options that exist only in IdeaVim
  map <leader>f <Action>(GotoFile)
  map <leader>g <Action>(FindInPath)
  map <leader>b <Action>(Switcher)

  if &ide =~? 'intellij idea'
    if &ide =~? 'community'
      " some mappings and options for IntelliJ IDEA Community Edition
    elseif &ide =~? 'ultimate'
      " some mappings and options for IntelliJ IDEA Ultimate Edition
    endif
  elseif &ide =~? 'pycharm'
    " PyCharm specific mappings and options
  endif
else
  " some mappings for Vim/Neovim
  nnoremap <leader>f <cmd>Telescope find_files<cr>
endif

:gem: Contributing

The power of contributing drives IdeaVim :muscle:. Even small contributions matter!

See the contribution guide in CONTRIBUTING.md to start bringing your value to the project.

😎 In 2025, we launched a rewards program. See the guide for details.

Authors

See AUTHORS.md for a list of authors and contributors.

IdeaVim tips and tricks

Some facts about Vim

Let’s relax and have some fun now! Here are a few things we've found interesting during development and would like to share with you.

License

IdeaVim is licensed under the MIT license.

Third-party components and licenses are listed in ThirdPartyLicenses.md.

All releases before 2.0.0 were licensed under terms of GPL-2.0 or later. The last commit before switch to MIT is 05852b07c6090ad40fde7d3cafe0b074604f7ac5. You can read more about the license change here: https://github.com/JetBrains/ideavim/discussions/543

ideavim (JetBrains/ideavim)

Searching Database…

10.3K ·GitHub
Что это такое?IdeaVim — это Vim-движок для JetBrains IDE: официальный плагин JetBrains, который добавляет модальное редактирование в стиле Vim в IntelliJ IDEA, PyCharm и остальные продукты семейства JetBrains.
Это плагин внутри моей IDE или отдельный редактор?Это плагин для JetBrains IDE, а не отдельное приложение — эмуляция Vim встраивается в редактор, которым вы уже пользуетесь, так что ничего дополнительного запускать вместе с IDE не нужно.
Как его запустить?Установите его через Settings | Plugins в вашей IDE, а затем включайте и выключайте Vim в любой момент через Tools | Vim в меню.
Могу ли я использовать свою существующую конфигурацию Vim?Да — конфигурация Vim хранится в ~/.ideavimrc, аналоге ~/.vimrc (поддерживаются и пути XDG), а команда source ~/.vimrc внутри него подключает вашу текущую настройку Vim напрямую.
Клавиши Vim будут конфликтовать с горячими клавишами IDE?Конфликты неизбежны, и в IdeaVim для них есть отдельные настройки: Settings (на macOS — Preferences) | Editor | Vim вместе со страницей Keymap, либо обычные маппинги Vim в ~/.ideavimrc.
В каких IDE он работает?Во всём семействе JetBrains: IntelliJ IDEA, PyCharm, GoLand, CLion, PhpStorm, WebStorm, RubyMine, DataGrip, DataSpell, Rider, Cursive, Android Studio и других IDE от JetBrains.
Он открытый — есть ли подвох в лицензии?Сейчас он распространяется по лицензии MIT, но все версии до 2.0.0 выходили под GPL-2.0 или более поздней, так что если для вас это важно, проверяйте версию.
Могу ли я вызывать действия IDE из команд Vim?Да — команда :action {actionid} запускает любое действие IDE из командной строки Ex, а маппинги могут вызывать действия с помощью ключевого слова (ActionId). Чтобы найти ID действий, используйте :actionlist [pattern] или выполните команду IdeaVim: track action IDs (находится через поиск по двойному Shift) — она показывает ID всего, что вы выполняете.
Могу ли я попробовать новые функции до официальных релизов?Да — присоединяйтесь к программе раннего доступа: нажмите на значок IdeaVim в строке состояния и выберите Early Access Program | Subscribe to EAP, либо вручную добавьте репозиторий EAP-плагинов в Settings | Plugins. Учтите, что качество EAP-версий порой может быть ниже даже обычных бета-стандартов.
Есть ли у него собственные расширения сверх стандартного Vim?В IdeaVim есть собственная система плагинов, описанная в файле doc/IdeaVim Plugins.md, которая добавляет возможности поверх базовой эмуляции Vim.
Creator
JetBrains
Size
122.1 MB
Stars
10.3K
Updated
CommitOct 17
Age
15y
Commits · 90 Days