• Stars
    star
    7,980
  • Rank 4,425 (Top 0.09 %)
  • Language
    Kotlin
  • License
    MIT License
  • Created about 13 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

IdeaVim โ€“ A Vim engine for JetBrains IDEs

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, CLion, PhpStorm, WebStorm, RubyMine, AppCode, DataGrip, GoLand, Rider, Cursive, Android Studio and other IntelliJ platform based IDEs.

Setup

  • IdeaVim can be installed via Settings | Plugins. See the detailed instructions.

  • Use Tools | Vim in the menu to enable or disable vim.

  • Use the ~/.ideavimrc file as an analog of ~/.vimrc (learn more). The XDG standard is supported, as well.

  • Shortcut conflicts can be resolved by using:

    • On Linux & Windows: File | Settings | Editor | Vim & File | Settings | Keymap,
    • On macOS: Preferences | Editor | Vim & Preferences | Keymap,
    • Regular Vim mappings in the ~/.ideavimrc file.

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 | Subscibe to EAP

Or subscribe to EAP updates manually:

  1. Open Settings | Plugins
  2. Click the gear icon โš™๏ธ, 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:

  • Normal / insert / visual / select / etc. modes
  • Motion / deletion / change / window / etc. commands
  • Key mappings
  • Marks / Macros / Digraphs / Registers
  • Some set commands
  • Full Vim regexps for search and search/replace
  • Vim web help
  • ~/.ideavimrc configuration file

IdeaVim plugins:

  • vim-easymotion
  • NERDTree
  • vim-surround
  • vim-multiple-cursors
  • vim-commentary
  • argtextobj.vim
  • vim-textobj-entire
  • ReplaceWithRegister
  • vim-exchange
  • vim-highlightedyank
  • vim-paragraph-motion
  • vim-indent-object
  • match.it
    etc

See also:

Files

  • ~/.ideavimrc
    • Your IdeaVim-specific Vim initialization commands
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.

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:

  • <Action>({action_id})
    • For the mappings you can use a special <Action> keyword. Don't forget the parentheses.
    • E.g. map gh <Action>(ShowErrorDescription) <- execute hover on gh.
    • โš ๏ธ Mappings to <Action> don't work with noremap. If you know the case when it's needed, please let us know.
  • :action {action_id}
    • Execute an action by {action_id}. Works from Ex command line.
    • Please don't use :action in mappings. Use <Action> instead.

Finding action ids:

  • IJ provides IdeaVim: track action Ids command to show the id of the executed actions. This command can be found in "Search everywhere" (double shift).

    "Track action Ids" Details (click to see) track action ids
  • :actionlist [pattern]

    • Find IDE actions by id or keymap pattern (E.g. :actionlist extract, :actionlist <C-D)
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)
Some popular actions:
QuickJavaDoc - Quick Documentation (not only for java, all languages)
ShowErrorDescription - Show description of the error under the caret (cursor hovering)
QuickImplementations - Quick Definition

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 or Vim Script Roadmap.

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

๐Ÿ’Ž Contributing

The power of contributing drives IdeaVim ๐Ÿ’ช. Even small contributions matter!

See CONTRIBUTING.md to start bringing your value to the project.

Authors

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

IdeaVim tips and tricks

  • Use the power of IJ and Vim:

    • set ideajoin to enable join via the IDE. See the examples.
    • Make sure ideaput is enabled for clipboard to enable native IJ insertion in Vim.
    • Sync IJ bookmarks and Vim marks: set ideamarks
    • Check out more ex commands.
  • Use your vim settings with IdeaVim. Put source ~/.vimrc in ~/.ideavimrc.

  • Control the status bar icon via the ideastatusicon option.

  • Not familiar with the default behaviour during a refactoring? See the idearefactormode option.

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.

  • There are no such commands as dd, yy, or cc. For example, dd is not a separate command for deleting the line, but a d command with a d motion.
    Wait, but there isn't a d motion in Vim! Thatโ€™s right, and thatโ€™s why Vim has a dedicated set of commands for which it checks whether the command equals to motion and if so, it executes _ motion instead.
    _ is an interesting motion that isn't even documented in vi, and it refers to the current line. So, commands like dd, yy, and similar ones are simply translated to d_, y_, etc. Here is the source of this knowledge.

  • x, D, and & are not separate commands either. They are synonyms of dl, d$, and :s\r, respectively. Here is the full list of synonyms.

  • Have you ever used U after dd? Don't even try.

  • A lot of variables that refers to visual mode start with two uppercase letters, e.g. VIsual_active. Some examples.

  • Other strange things from vi:

    • ":3" jumps to line 3
    • ":3|..." prints line 3
    • ":|" prints current line
  • Vim script doesn't skip white space before comma. F(a ,b) => E475.

  • Fancy constants for undolevels:

    The local value is set to -123456 when the global value is to be used.

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: #543

More Repositories

1

kotlin

The Kotlin Programming Language.
Kotlin
45,725
star
2

intellij-community

IntelliJ IDEA Community Edition & IntelliJ Platform
16,452
star
3

compose-multiplatform

Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
Kotlin
14,677
star
4

JetBrainsMono

JetBrains Mono โ€“ the free and open-source typeface for developers
Shell
10,126
star
5

Exposed

Kotlin SQL Framework
Kotlin
7,869
star
6

kotlin-native

Kotlin/Native infrastructure
Kotlin
7,048
star
7

ring-ui

A collection of JetBrains Web UI components
TypeScript
3,555
star
8

kotlinconf-app

KotlinConf Schedule Application
Kotlin
2,834
star
9

intellij-platform-plugin-template

Template repository for creating plugins for IntelliJ Platform
Kotlin
2,791
star
10

skija

Java bindings for Skia
Java
2,605
star
11

create-react-kotlin-app

Create React apps using Kotlin with no build configuration
JavaScript
2,477
star
12

projector-docker

Run JetBrains IDEs remotely with Docker
Shell
2,209
star
13

intellij-plugins

Open-source plugins included in the distribution of IntelliJ IDEA Ultimate and other IDEs based on the IntelliJ Platform
Java
2,002
star
14

svg-sprite-loader

Webpack loader for creating SVG sprites.
JavaScript
1,998
star
15

skiko

Kotlin MPP bindings to Skia
C++
1,685
star
16

compose-multiplatform-ios-android-template

Compose Multiplatform iOS+Android Application project template
Kotlin
1,563
star
17

MPS

JetBrains Meta programming System
JetBrains MPS
1,500
star
18

lets-plot

Multiplatform plotting library based on the Grammar of Graphics
Kotlin
1,446
star
19

kotlin-web-site

The Kotlin programming language website
JavaScript
1,413
star
20

intellij-platform-gradle-plugin

Gradle plugin for building plugins for IntelliJ-based IDEs
Kotlin
1,377
star
21

phpstorm-stubs

PHP runtime & extensions header files for PhpStorm
PHP
1,297
star
22

kotlin-wrappers

Kotlin wrappers for popular JavaScript libraries
Kotlin
1,294
star
23

idea-gitignore

.ignore support plugin for IntelliJ IDEA
Kotlin
1,287
star
24

projector-server

Server-side library for running Swing applications remotely
Kotlin
1,230
star
25

resharper-unity

Unity support for both ReSharper and Rider
C#
1,199
star
26

intellij-sdk-docs

IntelliJ SDK Platform Documentation
Markdown
1,181
star
27

xodus

Transactional schema-less embedded database used by JetBrains YouTrack and JetBrains Hub.
Java
1,155
star
28

intellij-scala

Scala plugin for IntelliJ IDEA
Scala
1,137
star
29

kotless

Kotlin Serverless Framework
Kotlin
1,124
star
30

JetBrainsRuntime

Runtime environment based on OpenJDK for running IntelliJ Platform-based products on Windows, macOS, and Linux
Java
1,118
star
31

intellij-sdk-code-samples

Mirror of the IntelliJ SDK Docs Code Samples
Java
980
star
32

js-graphql-intellij-plugin

GraphQL language support for WebStorm, IntelliJ IDEA and other IDEs based on the IntelliJ Platform.
Java
879
star
33

android

Android Plugin for IntelliJ IDEA. This repository is a subset of https://git.jetbrains.org/?p=idea/android.git cut according to GitHub file size limitations.
Kotlin
863
star
34

projector-client

Common and client-related code for running Swing applications remotely
Kotlin
813
star
35

projector-installer

Install, configure and run JetBrains IDEs with Projector Server on Linux or in WSL
Python
810
star
36

Grammar-Kit

Grammar files support & parser/PSI generation for IntelliJ IDEA
Java
688
star
37

Arend

The Arend Proof Assistant
Java
676
star
38

amper

Amper - a build and project configuration tool with a focus on the user experience and the IDE support
Kotlin
621
star
39

markdown

Markdown parser written in kotlin
Kotlin
617
star
40

jediterm

Pure Java Terminal Emulator. Works with SSH and PTY.
Java
611
star
41

compose-multiplatform-template

Compose Multiplatform Application project template
Kotlin
603
star
42

jewel

An implementation of the IntelliJ look and feels in Compose for Desktop
Kotlin
580
star
43

Nitra

Public Nitra repository
Nemerle
549
star
44

lincheck

Framework for testing concurrent data structures
Kotlin
520
star
45

intellij-micropython

Plugin for MicroPython devices in PyCharm and IntelliJ
Python
482
star
46

kotlin-playground

Self-contained component to embed in websites for running Kotlin code
JavaScript
422
star
47

colorSchemeTool

Python
396
star
48

compose-multiplatform-desktop-template

Compose Multiplatform Desktop Application project template
Kotlin
393
star
49

lets-plot-kotlin

Grammar of Graphics for Kotlin
Kotlin
389
star
50

Qodana

๐Ÿ“ Source repository of Qodana Help
388
star
51

rd

Reactive Distributed communication framework for .NET, Kotlin, C++. Inspired by Rider IDE.
C#
373
star
52

java-annotations

Annotations for JVM-based languages.
Java
362
star
53

phpstorm-attributes

PhpStorm specific attributes
PHP
357
star
54

Unity3dRider

Unity JetBrains Rider integration
348
star
55

godot-support

C#
339
star
56

pty4j

Pty for Java
Java
338
star
57

resharper-fsharp

F# support in JetBrains Rider
F#
320
star
58

phpstorm-workshop

Code for the PhpStorm workshop
PHP
287
star
59

awesome-pycharm

A curated list of resources for learning and using PyCharm, a Python IDE from JetBrains
271
star
60

web-types

JSON standard for documenting web component libraries for IDEs, documentation generators and other tools
TypeScript
270
star
61

meta-runner-power-pack

A set of Meta-runners for TeamCity
PowerShell
256
star
62

inspection-plugin

Gradle plugin to launch IDEA inspections
Kotlin
255
star
63

youtrack-mobile

A iOS and Android client for YouTrack
TypeScript
255
star
64

gradle-changelog-plugin

Plugin for parsing and managing the Changelog in a "keep a changelog" style.
Kotlin
252
star
65

ideolog

Interactive viewer for '.log' files.
Kotlin
250
star
66

qodana-action

โš™๏ธ Scan your Go, Java, Kotlin, PHP, Python, JavaScript, TypeScript, .NET projects at GitHub with Qodana. This repository contains Qodana for Azure, GitHub, CircleCI and Gradle
JavaScript
234
star
67

gradle-idea-ext-plugin

Plugin to store IJ settings in gradle script
Groovy
227
star
68

php-timeline

Notable events of PHP history
222
star
69

resharper-rider-samples

Simple interactive exercises to help learn ReSharper and Rider
C#
221
star
70

la-clojure

Clojure plugin for IntelliJ IDEA
Java
220
star
71

kotlin-compiler-server

Server for executing kotlin code
Kotlin
216
star
72

jdk8u_jdk

Java
210
star
73

jcef

A simple framework for embedding Chromium-based browsers into Java-based applications.
Java
206
star
74

pest-intellij

The official Pest Plugin for PhpStorm / IntelliJ IDEA
Kotlin
195
star
75

youtrack-workflows

YouTrack Custom Workflow Repository
JavaScript
194
star
76

psiviewer

PSI Viewer for IntelliJ IDEA plugin development
Java
175
star
77

svg-mixer

Node.js toolset for generating & transforming SVG images and sprites in modern way
JavaScript
173
star
78

compose-for-web-demos

Historical repository of early Compose for Web effort.
171
star
79

phpstorm-docker-images

Pre-configured Docker images used by PhpStorm team
Dockerfile
170
star
80

rider-efcore

Entity Framework Core UI plugin for JetBrains Rider
Kotlin
169
star
81

jetbrains_guide

JetBrains Guides where Developer Advocacy and the community share ideas.
CSS
168
star
82

kotlin-web-demo

Online mini-IDE for Kotlin
Kotlin
168
star
83

intellij-plugin-verifier

Compatibility verification tool for IntelliJ Platform plugins
Kotlin
165
star
84

intellij-samples

Code that demonstrates various IntelliJ IDEA features
Java
163
star
85

jdk8u_hotspot

C++
159
star
86

resharper-rider-plugin

https://www.jetbrains.com/help/resharper/sdk/
PowerShell
158
star
87

qodana-cli

๐Ÿ”ง JetBrains Qodanaโ€™s official command line tool
Go
154
star
88

teamcity-messages

Python Unit Test Reporting to TeamCity
Python
139
star
89

ruby-type-inference

Dynamic definitions and types provider for ruby static analysis
Kotlin
136
star
90

educational-plugin

Educational plugin to learn and teach programming languages such as Kotlin, Java, Python, JavaScript, and others right inside of JetBrains IntelliJ Platform based IDEs.
Kotlin
134
star
91

resharper-angularjs

ReSharper plugin for AngularJS support
JavaScript
134
star
92

clion-remote

134
star
93

golandtipsandtricks

This is an ever evolving repository for GoLand Tips&Tricks
Go
132
star
94

python-skeletons

The python-skeltons repo is deprecated: use PEP 484 and Typeshed instead
Python
132
star
95

clion-wsl

Shell
130
star
96

phpstorm-phpstan-plugin

PHPStan plugin for PhpStorm
Java
130
star
97

teamcity-docker-samples

TeamCity docker compose samples
Shell
128
star
98

phpstorm-psalm-plugin

Psalm plugin for PhpStorm
Java
126
star
99

jdk8u

Shell
123
star
100

YouTrackSharp

.NET Standard 2.0 Library to access YouTrack API.
C#
123
star