Vim for Visual Studio Code
Go to file
Peng Lyu 7a2165121f Roadmap update (#717)
Update roadmap to reflect the real status of all commands.
2016-09-09 07:59:40 -07:00
.github Update ISSUE_TEMPLATE.md (#709) 2016-09-04 22:14:43 -07:00
.vscode Fix remapping - most notably, fix #523. 2016-08-14 12:48:07 -07:00
images fix package in order to publish 2015-11-29 02:37:35 -08:00
src Roadmap update (#717) 2016-09-09 07:59:40 -07:00
test added visual block tests (#722) 2016-09-06 11:28:03 -07:00
typings fix #609 2016-08-16 10:58:55 -07:00
.gitignore Clean up. 2016-08-14 12:52:16 -07:00
.travis.yml Update version of node that Travis uses 2016-07-24 19:31:21 -06:00
.vscodeignore Tests: Fixes #15 enabling all tests to be run within Travis 2016-01-02 02:15:41 -08:00
extension.ts Fix #716. Remapper options should be case-insensitive (#721) 2016-09-06 11:26:15 -07:00
gulpfile.js Hack to mitigate #569 and prevent extension from locking up (#576) 2016-08-06 11:33:22 +10:00
LICENSE Initial commit 2015-11-12 01:02:24 -08:00
package.json add support for changing indentation 2016-09-07 14:37:08 -07:00
README.md Add a badge linking to the vs marketplace 2016-09-08 14:08:46 -07:00
ROADMAP.md Roadmap update (#717) 2016-09-09 07:59:40 -07:00
STYLE.md Create styleguide 2016-07-13 12:29:29 -07:00
tsconfig.json Refactor code with enumerator 2016-08-12 21:28:05 +08:00
tsd.json Stop using jsdiff. Use diff-match-patch. 2016-08-14 12:03:45 -07:00
tslint.json * Fix build error 2016-03-04 00:04:34 -08:00
typings.json Support "{char} registers and clipboard access via "* register. (#543) 2016-08-02 02:37:38 -07:00

Version Build Status Slack Status

Vim

VSCodeVim is a Visual Studio Code extension that provides Vim keybindings within Visual Studio Code.

Please report missing or buggy features on GitHub.

We've added a lot of functionality, but everyone uses Vim in their own special way, so let us know if we're missing your favorite obscure command. 😉

We're super friendly people if you want to drop by and talk to us on our Slack channel!

Screenshot

Features We Support

  • All modes (including visual block mode!)
  • Most typical commands, including command combinations like c3w, daw, 2dd, etc. (Check the roadmap for details.)
  • Command remapping (jj to esc)
  • Repeating actions with .
  • Incremental search with / and ? that works like Vim (doesn't just open the search box!)
  • Correct undo/redo state
  • Marks
  • Vim Options

Roadmap

See our Github Milestone page for an idea of what we plan to implement next.

Install

  1. Within Visual Studio Code, open the command palette (Ctrl-Shift-P / Cmd-Shift-P)
  2. Select Install Extension and search for 'vim' or run ext install vim

Configure

Due to overlap between VSCode and VIm, options are loaded slightly different from native Vim. The option loading sequence/priority is

  1. :set {option} on the fly
  2. [TODO] .vimrc.
  3. vim.{option} from user settings or workspace settings.
  4. VSCode configuration
  5. VSCodeVim flavored Vim option default values

Supported Options

Vim options can be added to your user or workspace settings (open Command Pallete and search for "User Settings" or "Workspace Settings"). Changes require restarting of VSCode to take effect.

The following is a subset of the supported configurations; the full list is described in package.json:

  • insertModeKeyBindings/otherModesKeyBindings

    • Keybinding overrides to use for insert and other (non-insert) modes

    • Example: Bind jj to <Esc> while in insert mode

        "vim.insertModeKeyBindings": [
             {
                 "before": ["j", "j"],
                 "after": ["<Esc>"]
             }
        ]
      

      Similarly for otherModesKeyBindings, bind jj to <Esc> for modes which are not insert mode

        "vim.otherModesKeyBindings": [
             {
                 "before": ["j", "j"],
                 "after": ["<Esc>"]
             }
        ]
      
  • insertModeKeyBindingsNonRecursive/otherModesKeyBindingsNonRecursive

    • Non-recursive keybinding overrides to use for insert and other (non-insert) modes (similar to :noremap)

    • Example: Bind j to gj. Notice that if you attempted this binding normally, the j in gj would be expanded into gj, on and on forever. Stop this recursive expansion using insertModeKeyBindingsNonRecursive/otherModesKeyBindingNonRecursive.

      "vim.otherModesKeyBindingsNonRecursive": [
      {
          "before": ["j"],
          "after": ["g", "j"]
      }]
      
  • useCtrlKeys

    • Enable Vim ctrl keys thus overriding common VSCode operations (eg. copy, paste, find, etc). Setting this option to true will enable:

      • ctrl+c, ctrl+[ => <Esc>
      • ctrl+f => Page Forward
      • ctrl+v => Visual Block Mode
      • etc.
    • Type: Boolean (Default: false)

    • Example:

      "vim.useCtrlKeys": true
      
  • useSystemClipboard

    • Enable yanking to the system clipboard by default
    • Type: Boolean (Default: false)
  • useSolidBlockCursor

    • Use a non-blinking block cursor
    • Type: Boolean (Default: false)
  • ignorecase

    • Ignore case in search patterns
    • Type: Boolean (Default: true)
  • smartcase

    • Override the 'ignorecase' option if the search pattern contains upper case characters
    • Type: Boolean (Default: true)
  • hlsearch

    • When there is a previous search pattern, highlight all its matches
    • Type: Boolean (Default: true)

F.A.Q.

j, k and others don't repeat when I hold them down.

On OS X, open Terminal and run the following command:

defaults write com.microsoft.VSCode ApplePressAndHoldEnabled -bool false // For VSCode
defaults write com.microsoft.VSCodeInsiders ApplePressAndHoldEnabled -bool false // For VSCode Insider

Contributing

This project is maintained by a group of awesome contributors and contributions are extremely welcome ❤️. If you are having trouble thinking of how you can help, check out our roadmap.

For a quick tutorial on how to get started, see our contributing guide.

Changelog

Please see our list of recent releases and features added.

License

MIT, see License for more information.