74th / vscode-vim

vim emulator for Visual Studio Code
MIT License
215 stars 25 forks source link
vim-emulator vim-keybindings vscode

There are no plans to update this project.

I recommend using Neo Vim Extension.

Vim emulator for VSCode

vimanimetion

Build Status Version Installs Rating

Require

Features

vimanimetion

vimanimetion

Installation

ext install vimStyle

Supported vim commands

Support to call VSCode commands from vim keybind

But they do not behave exactly as vim command, and their supports may be changed.

Settings

If you needs optional settings, please copy belong json and paste to your settings.json.

// Show mode in status bar (default: true)
"vimStyle.showMode": false,
// changing cursor by mode (default: true)
"vimStyle.changeCursorStyle": false,
// motion with jkl;(default: false)
"vimStyle.useErgonomicKeyForMotion": true,
// default mode (default: "normal")
"vimStyle.defaultMode": "insert",
// disable without to uninstall (default: "true")
"vimStyle.enabled": "false",
// keys go to normal mode from insert mode (default: "" disable)
"vimStyle.imapEsc": "jj",
// some vimrc like settings
"vimStyle.vimrc": [
    "nmap Y y$", //
    "nnoremapmap Y y$", //
]

If you would like to use ctrl+[ instead of escape, please add blong setting to your keybindings.json.

{
    "key": "ctrl+[",
    "command": "vim.Esc",
    "when": "editorTextFocus"
}

If you would like more vim flavor, you can use vim.inNormalMode, vim.inInsertMode and vim.inVisualMode to your keyboard shortcuts. For example,

// in insert mode
{
    // Ctrl-h : BackSpace
    "key": "ctrl+h", "command": "deleteLeft",
    "when": "editorTextFocus && vim.inInsertMode"
},
{
    // Ctrl-w : delete word
    "key": "ctrl+w", "command": "deleteWordLeft",
    "when": "editorTextFocus && vim.inInsertMode"
},
// in visual mode
{
    // arrow up
    "key": "up", "command": "vim.type-<Up>",
    "when": "editorTextFocus && vim.inVisualMode"
},
{
    // arrow down
    "key": "down", "command": "vim.type-<Down>",
    "when": "editorTextFocus && vim.inVisualMode"
},
{
    // arrow right
    "key": "right", "command": "vim.type-<Right>",
    "when": "editorTextFocus && vim.inVisualMode"
},
{
    // arrow left
    "key": "left", "command": "vim.type-<Left>",
    "when": "editorTextFocus && vim.inVisualMode"
},

Support vimrc settings

Will never be supported

VimStyle Loadmap

the vim emulator written type script

License

MIT License

Contributing

function list

git clone https://github.com/74th/vscode-vim.git ~/.vscode/extensions/vscode-vim
cd ~/.vscode/extensions/vscode-vim
npm install
npm run-script build

Updates

0.5.7

0.5.5

0.5.4

0.5.3

0.5.2

0.5.1

0.5.0

0.4.7

0.4.6

0.4.5

0.4.2

0.4.1

0.4.0

0.3.13

0.3.12

0.3.11

0.3.10

0.3.9

0.3.6

0.3.5

0.3.4

0.3.3

icon

0.3.2

0.2.4

0.2.3

0.2.2

0.2.1

0.2.0

0.1.8

0.1.7

0.1.1

pre release!