1
0
mirror of https://github.com/chylex/IntelliJ-IdeaVim.git synced 2026-04-12 21:57:41 +02:00
Files
IntelliJ-IdeaVim/CONTRIBUTING.md
Alex Plate f29deb15ba Remove contribution awards program information
The license awards program for quality contributions has ended.
Removed references from CONTRIBUTING.md, build.gradle.kts changeNotes,
and maintenance-instructions.md.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 14:58:15 +02:00

8.9 KiB
Raw Permalink Blame History

TeamCity Build

IdeaVim is an open source project created by 130+ contributors. Would you like to make it even better? Thats wonderful!

This page is created to help you start contributing. And who knows, maybe in a few days this project will be brighter than ever!

Before you begin

OK, ready to do some coding?

Yes, I'm ready for some coding

  • Fork the repository and clone it to the local machine.
  • Open the project with IntelliJ IDEA.

Yoo hoo! Youre all set to begin contributing. We've prepared some useful configurations for you:

  • Start IJ with IdeaVim
  • IdeaVim tests
  • IdeaVim full verification

Prepared configurations lightPrepared configurations dark

And here are useful gradle commands:

  • ./gradlew runIde — start the dev version of IntelliJ IDEA with IdeaVim installed.
  • ./gradlew test -x :tests:property-tests:test -x :tests:long-running-tests:test — run tests.
  • ./gradlew buildPlugin — build the plugin. The result will be located in build/distributions. This file can be installed by using Settings | Plugin | >Gear Icon< | Install Plugin from Disk.... You can stay with your personal build for a few days or send it to a friend for testing.

Warmup

  • Pick a few relatively simple tasks that are tagged with #patch_welcome in the issue tracker.
  • Read the javadoc for the @VimBehaviorDiffers annotation in the source code and fix the corresponding functionality.
  • Implement one of the requested #vim plugins.

🔸 You may leave a comment in the YouTrack ticket or open a draft PR if youd like early feedback or want to let maintainers know youve started working on an issue. Otherwise, simply open a PR.

Where to start in the codebase

If you are looking for:

  • Vim commands (w, <C-O>, p, etc.):

  • Ex commands (:set, :s, :nohlsearch):

  • Extensions:

    • Extensions handler: VimExtensionHandler.
    • Available extensions: package com/maddyhome/idea/vim/extension.
  • Common features:

    • State machine. How every particular keystroke is parsed in IdeaVim: KeyHandler.handleKey().
    • Options (incsearch, iskeyword, relativenumber): VimOptionGroup.
    • Plugin startup: PluginStartup.
    • Notifications: NotificationService.
    • Status bar icon: StatusBar.kt.
    • On/off switch: VimPlugin.setEnabled().

Testing

Here are some guides for testing:

  1. Read the javadoc for the @VimBehaviorDiffers annotation in the source code.

  2. Please avoid senseless text like "dhjkwaldjwa", "asdasdasd", "123 123 123 123", etc. Use a few lines of code or the following template:

Lorem Ipsum

Lorem ipsum dolor sit amet,
consectetur adipiscing elit
Sed in orci mauris.
Cras id tellus in ex imperdiet egestas.
  1. Don't forget to test your functionality with various corner cases:
    • Position-based: line start, line end, file start, file end, empty line, single character line
    • Content-based: whitespace-only lines, lines with trailing spaces, mixed tabs and spaces, Unicode characters, multi-byte characters (e.g., emoji, CJK)
    • Selection-based: multiple carets, visual mode (character/line/block), empty selection
    • Motion-based: dollar motion, count with motion (e.g., 3w, 5j), zero-width motions
    • Buffer state: empty file, single line file, very long lines, read-only files
    • Boundaries: word boundaries with punctuation, sentence/paragraph boundaries, matching brackets at extremes
Neovim

IdeaVim has an integration with neovim in tests. Tests that are performed with doTest also executed in neovim instance, and the state of IdeaVim is asserted to be the same as the state of neovim.

  • Only tests that use doTest are checked with neovim.
  • Tests with @VimBehaviorDiffers or @TestWithoutNeovim annotations don't use neovim.

Property-based tests

Property-based tests are located under propertybased package. These tests a flaky by nature although in most cases they are stable. If the test fails on your TeamCity run, try to check the test output and understand if the fail is caused by your changes. If it's not, just ignore the test.

A common direction

Were trying to make IdeaVim close to the original Vim both in terms of functionality and architecture.

  • Vim motions can be either inclusive, exclusive, or linewise. In IdeaVim, you can use MotionType for that.
  • Have you read the interesting things about IdeaVim? Do you remember how dd, yy, and other similar commands work? DuplicableOperatorAction will help you with that. And we also translate it to d_ and y_: KeyHandler.mapOpCommand().
  • All IdeaVim extensions use the same command names as the originals (e.g. <Plug>(CommentMotion), <Plug>ReplaceWithRegisterLine), so you can reuse your .vimrc settings. We also support proper command mappings (functions are mapped to <Plug>...), the operator function (OperatorFunction), and so on.
  • Magic is supported as well. See Magic.

Fleet

The IdeaVim plugin is divided into two main modules: IdeaVim and vim-engine. IdeaVim serves as a plugin for JetBrains IDEs, while vim-engine is an IntelliJ Platform-independent Vim engine. This engine is utilized in both the Vim plugin for Fleet and IdeaVim.

If you develop a plugin that depends on IdeaVim: We have an instrument to check that our changes don't affect the plugins in the marketplace. If you still encounter any issues with the newer versions of IdeaVim, please contact maintainers.


I read the whole page but something is still unclear.

Oh no! No cookies for the maintainers today! Please tell us about it so we can help.

Ive found a bug in this documentation.

No beer in the bar for us unless it's fixed. Let us know situation so we might be able to fix it.

The lack of documentation or a javadoc/ktdoc makes it difficult to start contributing.

This is just terrible. You know what to do.

Resources: