<commit_before><h1 align="center">
    <img src="https://raw.githubusercontent.com/VSCodeVim/Vim/master/images/icon.png" height="128">
    <br>
    VSCodeVim
</h1>

<p align="center"><strong>Vim emulation for Visual Studio Code.</strong></p>
<p align="center">
    <a href="http://aka.ms/vscodevim">
        <img src="http://vsmarketplacebadge.apphb.com/version/vscodevim.vim.svg" alt="Version">
    </a>
    <a href="https://travis-ci.org/VSCodeVim/Vim.svg?branch=master">
        <img src="https://travis-ci.org/VSCodeVim/Vim.svg?branch=master" alt="Build Status">
    </a>
    <a href="https://vscodevim-slackin.azurewebsites.net">
        <img src="https://vscodevim-slackin.azurewebsites.net/badge.svg" alt="Slack Status">
    </a>
</p>

<hr>

VSCodeVim is a [Visual Studio Code](https://code.visualstudio.com/) extension that enables Vim keybindings, including:

* Modes: normal, insert, command-line, visual, visual line, visual block
* Command combinations (`c3w`, `daw`, `2dd`, etc)
* Highly versatile command remapping (`jj` to `<Esc>`, `:` to command panel, etc.)
* Incremental search with `/` and `?`
* Marks
* Popular vim plugin features built-in (easymotion, surround, commentary)
* Vim settings similar to those found in .vimrc
* Multi-cursor support, run vim commands everywhere!
* And much more! Refer to the [roadmap](ROADMAP.md) for everything we support.

Please [report missing features/bugs on GitHub](https://github.com/VSCodeVim/Vim/issues), which will help us get to them faster.

Ask us questions, talk about contributing, or just say hi on [Slack](https://vscodevim-slackin.azurewebsites.net)!

## Donations

[![Donate](https://www.paypalobjects.com/webstatic/en_US/i/btn/png/btn_donate_92x26.png)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FNUBXQADN5VG4)

[Make a donation to VSCodeVim here!](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FNUBXQADN5VG4)

Donations help convince me to work on this project rather than my other (non-open-source) projects. I'd love to work on VSCodeVim full time, but I need money to live!

## Contents

* [Quick example settings](#quick-example-settings)
    * [Mac setup](#mac-setup)
    * [Windows setup](#windows-setup)
* [Settings](#settings)
    * [VSCodeVim settings](#vscodevim-settings)
    * [Key remapping](#key-remapping)
    * [Vim settings](#vim-settings)
    * [Status bar colors (vim-airline)](#status-bar-color-settings)
* [Multi-cursor mode](#multi-cursor-mode)
* [Emulated plugins](#emulated-plugins)
    * [vim-easymotion](#vim-easymotion)
    * [vim-surround](#vim-surround)
    * [vim-commentary](#vim-commentary)
    * [vim-indent-object](#vim-indent-object)
* [VSCodeVim tricks](#vscodevim-tricks)
* [F.A.Q / Troubleshooting](#faq)
* [Contributing](#contributing)
* [Release notes](https://github.com/VSCodeVim/Vim/releases)

## Getting started

The plugin will be automatically enabled after [installing](https://marketplace.visualstudio.com/items?itemName=vscodevim.vim) it and reloading VSCode. The plugin can only be disabled from the Extension manager in VSCode, with no quick way to switch between modal and modeless editing.

Just like real vim, your editor will now be in Normal mode, which is reported to VSCode's status bar. From here, all your regular vim commands will work as normal, hooray!

### Vim compatibility

All common Vim commands are supported. For an in-depth look at what Vim features are supported, check out the [roadmap](ROADMAP.md). Vimscript isn't supported, so you aren't able to load your `.vimrc` or use `.vim` plugins. You have to replicated these using our [Settings](#settings) and [Emulated plugins](#emulated-plugins).

### Mac setup

If key repeating isn't working for you, execute this in your Terminal.

```sh
defaults write com.microsoft.VSCode ApplePressAndHoldEnabled -bool false         # For VS Code
defaults write com.microsoft.VSCodeInsiders ApplePressAndHoldEnabled -bool false # For VS Code Insider
```

We also recommend going into *System Preferences -> Keyboard* and cranking up the Key Repeat and Delay Until Repeat settings to improve your speed.

### Windows setup

VSCodeVim will take over your control keys, just like real vim, so you get the _full_ vim experience. This behaviour can be adjusted with the [`useCtrlKeys`](#vimusectrlkeys) and [`handleKeys`](#vimhandlekeys) settings.

## Settings

### Quick example settings

Below is an example of a [settings.json](https://code.visualstudio.com/Docs/customization/userandworkspace) file for VSCode settings applicable to this extension. Continue on below for more in-depth documentation.

```json
{
    "vim.easymotion": true,
    "vim.incsearch": true,
    "vim.useSystemClipboard": true,
    "vim.useCtrlKeys": true,
    "vim.hlsearch": true,
    "vim.insertModeKeyBindings": [
        {
            "before": ["j","j"],
            "after": ["<Esc>"]
        }
    ],
    "vim.otherModesKeyBindingsNonRecursive": [
        {
            "before": ["<leader>","d"],
            "after": ["d", "d"]
        },
        {
            "before":["<C-n>"],
            "after":[],
            "commands": [
                {
                    "command": ":nohl"
                }
            ]
        }
    ],
    "vim.leader": "<space>",
    "vim.handleKeys":{
        "<C-a>": false,
        "<C-f>": false
    }
}
```

The following is a subset of the supported settings; the full list is described in the `Contributions` tab for this extension, or in our [package.json](https://github.com/VSCodeVim/Vim/blob/master/package.json#L175).

### VSCodeVim settings

These settings are specific to VSCodeVim.

#### `"vim.startInInsertMode"`
* Have VSCodeVim start in Insert Mode rather than Normal Mode.
* We would be remiss in our duties as Vim users not to say that you should really be staying in Normal mode as much as you can, but hey, who are we to stop you?

#### `"vim.overrideCopy"`
* Override VSCode's copy command with our own, which works correctly with VSCodeVim.
* If cmd-c or ctrl-c is giving you issues, set this to false and complain at https://github.com/Microsoft/vscode/issues/217.
* Type: Boolean (Default: `true`)

#### `"vim.useSystemClipboard"`
* Enable yanking to the system clipboard by default
* Type: Boolean (Default: `false`)

#### `"vim.searchHighlightColor"`
* Set the color of search highlights.
* Type: Color String (Default: `rgba(150, 150, 150, 0.3)`)

#### `"vim.useSolidBlockCursor"`
* Use a non-blinking block cursor
* Type: Boolean (Default: `false`)

#### `"vim.useCtrlKeys"`
* Enable Vim ctrl keys overriding common VS Code operations (eg. copy, paste, find, etc). Enabling this setting will:
    * `ctrl+c`, `ctrl+[` => `<Esc>`
    * `ctrl+f` => Full Page Forward
    * `ctrl+d` => Half Page Back
    * `ctrl+b` => Half Page Forward
    * `ctrl+v` => Visual Block Mode
    * etc.
* Type: Boolean (Default: `true`)

#### `"vim.handleKeys"`
* Allows user to select certain modifier keybindings and delegate them back to VSCode so that VSCodeVim does not process them.
* Complete list of keys that can be delegated back to VSCode can be found in our [package.json](https://github.com/VSCodeVim/Vim/blob/master/package.json#L44). Each key that has a vim.use<C-...> in the when argument can be delegated back to vscode by doing "<C-...>":false.
* An example would be if a user wanted to continue to use ctrl + f for find, but wants to have [`useCtrlKeys`](#vimusectrlkeys) set to true so that other vim bindings work.

```json
    "vim.handleKeys": {
        "<C-a>": false,
        "<C-f>": false
    }
```

### Key remapping

There's several different settings you can use to define custom remappings. Also related are the [`useCtrlKeys`](#vimusectrlkeys) and [`handleKeys`](#vimhandlekeys) settings.

#### `"vim.insertModeKeyBindings"`/`"vim.otherModesKeyBindings"`
* Keybinding overrides to use for insert and other (non-insert) modes.

Bind `jj` to `<Esc>` in insert mode:

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

Bind `:` to show the command palette:

```json
"vim.otherModesKeyBindingsNonRecursive": [
    {
        "before": [":"],
        "after": [],
        "commands": [
            {
                "command": "workbench.action.showCommands",
                "args": []
            }
        ]<commit_msg>Make note of vim.visualstar in README.md<commit_after><h1 align="center">
    <img src="https://raw.githubusercontent.com/VSCodeVim/Vim/master/images/icon.png" height="128">
    <br>
    VSCodeVim
</h1>

<p align="center"><strong>Vim emulation for Visual Studio Code.</strong></p>
<p align="center">
    <a href="http://aka.ms/vscodevim">
        <img src="http://vsmarketplacebadge.apphb.com/version/vscodevim.vim.svg" alt="Version">
    </a>
    <a href="https://travis-ci.org/VSCodeVim/Vim.svg?branch=master">
        <img src="https://travis-ci.org/VSCodeVim/Vim.svg?branch=master" alt="Build Status">
    </a>
    <a href="https://vscodevim-slackin.azurewebsites.net">
        <img src="https://vscodevim-slackin.azurewebsites.net/badge.svg" alt="Slack Status">
    </a>
</p>

<hr>

VSCodeVim is a [Visual Studio Code](https://code.visualstudio.com/) extension that enables Vim keybindings, including:

* Modes: normal, insert, command-line, visual, visual line, visual block
* Command combinations (`c3w`, `daw`, `2dd`, etc)
* Highly versatile command remapping (`jj` to `<Esc>`, `:` to command panel, etc.)
* Incremental search with `/` and `?`
* Marks
* Popular vim plugin features built-in (easymotion, surround, commentary)
* Vim settings similar to those found in .vimrc
* Multi-cursor support, run vim commands everywhere!
* And much more! Refer to the [roadmap](ROADMAP.md) for everything we support.

Please [report missing features/bugs on GitHub](https://github.com/VSCodeVim/Vim/issues), which will help us get to them faster.

Ask us questions, talk about contributing, or just say hi on [Slack](https://vscodevim-slackin.azurewebsites.net)!

## Donations

[![Donate](https://www.paypalobjects.com/webstatic/en_US/i/btn/png/btn_donate_92x26.png)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FNUBXQADN5VG4)

[Make a donation to VSCodeVim here!](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FNUBXQADN5VG4)

Donations help convince me to work on this project rather than my other (non-open-source) projects. I'd love to work on VSCodeVim full time, but I need money to live!

## Contents

* [Quick example settings](#quick-example-settings)
    * [Mac setup](#mac-setup)
    * [Windows setup](#windows-setup)
* [Settings](#settings)
    * [VSCodeVim settings](#vscodevim-settings)
    * [Key remapping](#key-remapping)
    * [Vim settings](#vim-settings)
    * [Status bar colors (vim-airline)](#status-bar-color-settings)
* [Multi-cursor mode](#multi-cursor-mode)
* [Emulated plugins](#emulated-plugins)
    * [vim-easymotion](#vim-easymotion)
    * [vim-surround](#vim-surround)
    * [vim-commentary](#vim-commentary)
    * [vim-indent-object](#vim-indent-object)
* [VSCodeVim tricks](#vscodevim-tricks)
* [F.A.Q / Troubleshooting](#faq)
* [Contributing](#contributing)
* [Release notes](https://github.com/VSCodeVim/Vim/releases)

## Getting started

The plugin will be automatically enabled after [installing](https://marketplace.visualstudio.com/items?itemName=vscodevim.vim) it and reloading VSCode. The plugin can only be disabled from the Extension manager in VSCode, with no quick way to switch between modal and modeless editing.

Just like real vim, your editor will now be in Normal mode, which is reported to VSCode's status bar. From here, all your regular vim commands will work as normal, hooray!

### Vim compatibility

All common Vim commands are supported. For an in-depth look at what Vim features are supported, check out the [roadmap](ROADMAP.md). Vimscript isn't supported, so you aren't able to load your `.vimrc` or use `.vim` plugins. You have to replicated these using our [Settings](#settings) and [Emulated plugins](#emulated-plugins).

### Mac setup

If key repeating isn't working for you, execute this in your Terminal.

```sh
defaults write com.microsoft.VSCode ApplePressAndHoldEnabled -bool false         # For VS Code
defaults write com.microsoft.VSCodeInsiders ApplePressAndHoldEnabled -bool false # For VS Code Insider
```

We also recommend going into *System Preferences -> Keyboard* and cranking up the Key Repeat and Delay Until Repeat settings to improve your speed.

### Windows setup

VSCodeVim will take over your control keys, just like real vim, so you get the _full_ vim experience. This behaviour can be adjusted with the [`useCtrlKeys`](#vimusectrlkeys) and [`handleKeys`](#vimhandlekeys) settings.

## Settings

### Quick example settings

Below is an example of a [settings.json](https://code.visualstudio.com/Docs/customization/userandworkspace) file for VSCode settings applicable to this extension. Continue on below for more in-depth documentation.

```json
{
    "vim.easymotion": true,
    "vim.incsearch": true,
    "vim.useSystemClipboard": true,
    "vim.useCtrlKeys": true,
    "vim.hlsearch": true,
    "vim.insertModeKeyBindings": [
        {
            "before": ["j","j"],
            "after": ["<Esc>"]
        }
    ],
    "vim.otherModesKeyBindingsNonRecursive": [
        {
            "before": ["<leader>","d"],
            "after": ["d", "d"]
        },
        {
            "before":["<C-n>"],
            "after":[],
            "commands": [
                {
                    "command": ":nohl"
                }
            ]
        }
    ],
    "vim.leader": "<space>",
    "vim.handleKeys":{
        "<C-a>": false,
        "<C-f>": false
    }
}
```

The following is a subset of the supported settings; the full list is described in the `Contributions` tab for this extension, or in our [package.json](https://github.com/VSCodeVim/Vim/blob/master/package.json#L175).

### VSCodeVim settings

These settings are specific to VSCodeVim.

#### `"vim.startInInsertMode"`
* Have VSCodeVim start in Insert Mode rather than Normal Mode.
* We would be remiss in our duties as Vim users not to say that you should really be staying in Normal mode as much as you can, but hey, who are we to stop you?

#### `"vim.overrideCopy"`
* Override VSCode's copy command with our own, which works correctly with VSCodeVim.
* If cmd-c or ctrl-c is giving you issues, set this to false and complain at https://github.com/Microsoft/vscode/issues/217.
* Type: Boolean (Default: `true`)

#### `"vim.useSystemClipboard"`
* Enable yanking to the system clipboard by default
* Type: Boolean (Default: `false`)

#### `"vim.searchHighlightColor"`
* Set the color of search highlights.
* Type: Color String (Default: `rgba(150, 150, 150, 0.3)`)

#### `"vim.useSolidBlockCursor"`
* Use a non-blinking block cursor
* Type: Boolean (Default: `false`)

#### `"vim.useCtrlKeys"`
* Enable Vim ctrl keys overriding common VS Code operations (eg. copy, paste, find, etc). Enabling this setting will:
    * `ctrl+c`, `ctrl+[` => `<Esc>`
    * `ctrl+f` => Full Page Forward
    * `ctrl+d` => Half Page Back
    * `ctrl+b` => Half Page Forward
    * `ctrl+v` => Visual Block Mode
    * etc.
* Type: Boolean (Default: `true`)

#### `"vim.handleKeys"`
* Allows user to select certain modifier keybindings and delegate them back to VSCode so that VSCodeVim does not process them.
* Complete list of keys that can be delegated back to VSCode can be found in our [package.json](https://github.com/VSCodeVim/Vim/blob/master/package.json#L44). Each key that has a vim.use<C-...> in the when argument can be delegated back to vscode by doing "<C-...>":false.
* An example would be if a user wanted to continue to use ctrl + f for find, but wants to have [`useCtrlKeys`](#vimusectrlkeys) set to true so that other vim bindings work.

```json
    "vim.handleKeys": {
        "<C-a>": false,
        "<C-f>": false
    }
```

#### `"vim.visualstar"`
* When pressing `*` or `#` in visual mode treat it as a new search
* Type: Boolean (Default: `false`)

### Key remapping

There's several different settings you can use to define custom remappings. Also related are the [`useCtrlKeys`](#vimusectrlkeys) and [`handleKeys`](#vimhandlekeys) settings.

#### `"vim.insertModeKeyBindings"`/`"vim.otherModesKeyBindings"`
* Keybinding overrides to use for insert and other (non-insert) modes.

Bind `jj` to `<Esc>` in insert mode:

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

Bind `:` to show the command palette:

```json
"vim.otherModesKeyBindingsNonRecursive": [
    {
        "before": [":"],
        "after": [],
        "commands": [
            {
                "command": "workbench.action.showCommands",
                "args": []
            }
        ]
{'fraction_non_alphanumeric': 0.13755458515283842, 'fraction_numerical': 0.004012746370824973, 'mean_word_length': 3.632859486057955, 'pattern_counts': {'":': 68, '<': 71, '<?xml version=': 0, '>': 83, 'https://': 34, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5944831', 'n_tokens_mistral': 5665, 'n_tokens_neox': 5356, 'n_words': 1666}