From 675bc2321473dfb387795b405c50b7bcb269e22e Mon Sep 17 00:00:00 2001 From: Jason Poon Date: Sun, 30 Apr 2017 01:25:06 -0500 Subject: [PATCH] Upgrade typescript 2.2.1->2.3.2. tslint 3.10.2->2.3.2. Fix errors (#1614) --- package.json | 940 +++++++++++++------------- src/actions/actions.ts | 6 +- src/cmd_line/commands/write.ts | 4 +- src/cmd_line/lexer.ts | 4 +- src/cmd_line/main.ts | 4 + src/cmd_line/subparsers/substitute.ts | 2 +- src/cmd_line/subparsers/write.ts | 2 +- src/cmd_line/subparsers/writequit.ts | 2 +- src/configuration/configuration.ts | 2 +- src/mode/modeHandler.ts | 2 +- src/motion/position.ts | 2 +- src/register/register.ts | 2 +- test/testSimplifier.ts | 2 +- tsconfig.json | 2 + tslint.json | 6 +- 15 files changed, 492 insertions(+), 490 deletions(-) diff --git a/package.json b/package.json index b348faf05..8af75484b 100644 --- a/package.json +++ b/package.json @@ -1,476 +1,476 @@ { - "name": "vim", - "displayName": "Vim", - "description": "Vim emulation for Visual Studio Code", - "icon": "images/icon.png", - "version": "0.6.20", - "publisher": "vscodevim", - "galleryBanner": { - "color": "#e3f4ff", - "theme": "light" - }, - "license": "MIT", - "keywords": [ - "vim", - "vi", - "vscodevim" + "name": "vim", + "displayName": "Vim", + "description": "Vim emulation for Visual Studio Code", + "icon": "images/icon.png", + "version": "0.6.20", + "publisher": "vscodevim", + "galleryBanner": { + "color": "#e3f4ff", + "theme": "light" + }, + "license": "MIT", + "keywords": [ + "vim", + "vi", + "vscodevim" + ], + "repository": { + "type": "git", + "url": "https://github.com/VSCodeVim/Vim.git" + }, + "homepage": "https://github.com/VSCodeVim/Vim", + "bugs": { + "url": "https://github.com/VSCodeVim/Vim/issues" + }, + "engines": { + "vscode": "^1.10.0" + }, + "categories": [ + "Other", + "Keymaps" + ], + "activationEvents": [ + "*" + ], + "main": "./out/extension", + "contributes": { + "commands": [ + { + "command": "extension.showCmdLine", + "title": "Vim: Show Command Line" + }, + { + "command": "vim.remap", + "title": "Vim: Remap any key combination that VS Code supports to Vim motions/operators/ExCommands/macro." + } ], - "repository": { - "type": "git", - "url": "https://github.com/VSCodeVim/Vim.git" - }, - "homepage": "https://github.com/VSCodeVim/Vim", - "bugs": { - "url": "https://github.com/VSCodeVim/Vim/issues" - }, - "engines": { - "vscode": "^1.10.0" - }, - "categories": [ - "Other", - "Keymaps" + "keybindings": [ + { + "key": "Escape", + "command": "extension.vim_escape", + "when": "editorTextFocus && !inDebugRepl" + }, + { + "key": "Home", + "command": "extension.vim_home", + "when": "editorTextFocus && !inDebugRepl && vim.mode != 'Insert'" + }, + { + "key": "End", + "command": "extension.vim_end", + "when": "editorTextFocus && !inDebugRepl && vim.mode != 'Insert'" + }, + { + "key": "cmd+left", + "command": "extension.vim_cmd+left", + "when": "editorTextFocus && vim.use && !inDebugRepl && vim.mode != 'Insert'" + }, + { + "key": "cmd+right", + "command": "extension.vim_cmd+right", + "when": "editorTextFocus && vim.use && !inDebugRepl && vim.mode != 'Insert'" + }, + { + "key": "cmd+d", + "command": "extension.vim_cmd+d", + "when": "editorTextFocus && vim.use && !inDebugRepl" + }, + { + "key": "cmd+a", + "command": "extension.vim_cmd+a", + "when": "editorTextFocus && vim.use && !inDebugRepl && vim.mode != 'Insert'" + }, + { + "key": "ctrl+d", + "command": "extension.vim_ctrl+d", + "when": "editorTextFocus && vim.use && !inDebugRepl" + }, + { + "key": "ctrl+alt+down", + "linux": "shift+alt+down", + "mac": "cmd+alt+down", + "command": "extension.vim_cmd+alt+down", + "when": "editorTextFocus && !inDebugRepl" + }, + { + "key": "ctrl+alt+up", + "linux": "shift+alt+up", + "mac": "cmd+alt+up", + "command": "extension.vim_cmd+alt+up", + "when": "editorTextFocus && !inDebugRepl" + }, + { + "key": "Backspace", + "command": "extension.vim_backspace", + "when": "editorTextFocus && !inDebugRepl" + }, + { + "key": "shift+backspace", + "command": "extension.vim_shift+backspace", + "when": "editorTextFocus && vim.use && vim.mode == 'SearchInProgressMode' && !inDebugRepl" + }, + { + "key": "Delete", + "command": "extension.vim_delete", + "when": "editorTextFocus && vim.mode == 'Normal' && !inDebugRepl" + }, + { + "key": "tab", + "command": "extension.vim_tab", + "when": "editorFocus && vim.mode == 'Normal' && !inDebugRepl" + }, + { + "key": "ctrl+r", + "command": "extension.vim_ctrl+r", + "when": "editorTextFocus && vim.use && !inDebugRepl" + }, + { + "key": "ctrl+f", + "command": "extension.vim_ctrl+f", + "when": "editorTextFocus && vim.use && !inDebugRepl" + }, + { + "key": "ctrl+b", + "command": "extension.vim_ctrl+b", + "when": "editorTextFocus && vim.use && vim.mode != 'Insert' && !inDebugRepl" + }, + { + "key": "ctrl+j", + "command": "extension.vim_ctrl+j", + "when": "editorTextFocus && vim.use && vim.mode != 'Insert' && !inDebugRepl" + }, + { + "key": "ctrl+k", + "command": "extension.vim_ctrl+k", + "when": "editorTextFocus && vim.use && vim.mode != 'Insert' && !inDebugRepl" + }, + { + "key": "ctrl+h", + "command": "extension.vim_ctrl+h", + "when": "editorTextFocus && vim.use && vim.mode == 'Insert' && !inDebugRepl" + }, + { + "key": "ctrl+e", + "command": "extension.vim_ctrl+e", + "when": "editorTextFocus && vim.use && !inDebugRepl" + }, + { + "key": "ctrl+y", + "command": "extension.vim_ctrl+y", + "when": "editorTextFocus && vim.use && !inDebugRepl" + }, + { + "key": "ctrl+u", + "command": "extension.vim_ctrl+u", + "when": "editorTextFocus && vim.use && !inDebugRepl" + }, + { + "key": "ctrl+o", + "command": "extension.vim_ctrl+o", + "when": "editorTextFocus && vim.use && !inDebugRepl" + }, + { + "key": "ctrl+i", + "command": "extension.vim_ctrl+i", + "when": "editorTextFocus && vim.use && !inDebugRepl" + }, + { + "key": "ctrl+v", + "command": "extension.vim_ctrl+v", + "when": "editorTextFocus && vim.use && vim.mode != 'Insert' && !inDebugRepl" + }, + { + "key": "cmd+v", + "command": "extension.vim_cmd+v", + "when": "editorTextFocus && vim.use && vim.mode == 'SearchInProgressMode' && !inDebugRepl" + }, + { + "key": "ctrl+[", + "command": "extension.vim_ctrl+[", + "when": "editorTextFocus && vim.use && !inDebugRepl" + }, + { + "key": "ctrl+w", + "command": "extension.vim_ctrl+w", + "when": "editorTextFocus && vim.use && !inDebugRepl" + }, + { + "key": "ctrl+c", + "command": "extension.vim_ctrl+c", + "when": "editorTextFocus && vim.use && !inDebugRepl && vim.overrideCtrlC" + }, + { + "key": "cmd+c", + "command": "extension.vim_cmd+c", + "when": "editorTextFocus && vim.use && vim.overrideCopy && !inDebugRepl" + }, + { + "key": "ctrl+a", + "command": "extension.vim_ctrl+a", + "when": "editorTextFocus && vim.use && !inDebugRepl" + }, + { + "key": "ctrl+n", + "command": "extension.vim_ctrl+n", + "when": "editorTextFocus && vim.use && !inDebugRepl" + }, + { + "key": "ctrl+p", + "command": "extension.vim_ctrl+p", + "when": "suggestWidgetVisible && vim.use" + }, + { + "key": "ctrl+x", + "command": "extension.vim_ctrl+x", + "when": "editorTextFocus && vim.use && !inDebugRepl" + }, + { + "key": "ctrl+shift+2", + "command": "extension.vim_ctrl+shift+2", + "when": "editorTextFocus && vim.use" + }, + { + "key": "ctrl+t", + "command": "extension.vim_ctrl+t", + "when": "editorTextFocus && vim.use && !inDebugRepl" + }, + { + "key": "ctrl+pagedown", + "command": "extension.vim_ctrl+pagedown", + "when": "editorTextFocus && vim.use && !inDebugRepl" + }, + { + "key": "ctrl+pageup", + "command": "extension.vim_ctrl+pageup", + "when": "editorTextFocus && vim.use && !inDebugRepl" + }, + { + "key": "left", + "command": "extension.vim_left", + "when": "editorTextFocus && !inDebugRepl" + }, + { + "key": "right", + "command": "extension.vim_right", + "when": "editorTextFocus && !inDebugRepl" + }, + { + "key": "up", + "command": "extension.vim_up", + "when": "editorTextFocus && !inDebugRepl && !suggestWidgetVisible && !suggestWidgetMultipleSuggestions" + }, + { + "key": "down", + "command": "extension.vim_down", + "when": "editorTextFocus && !inDebugRepl && !suggestWidgetVisible && !suggestWidgetMultipleSuggestions" + } ], - "activationEvents": [ - "*" - ], - "main": "./out/extension", - "contributes": { - "commands": [ - { - "command": "extension.showCmdLine", - "title": "Vim: Show Command Line" - }, - { - "command": "vim.remap", - "title": "Vim: Remap any key combination that VS Code supports to Vim motions/operators/ExCommands/macro." - } - ], - "keybindings": [ - { - "key": "Escape", - "command": "extension.vim_escape", - "when": "editorTextFocus && !inDebugRepl" - }, - { - "key": "Home", - "command": "extension.vim_home", - "when": "editorTextFocus && !inDebugRepl && vim.mode != 'Insert'" - }, - { - "key": "End", - "command": "extension.vim_end", - "when": "editorTextFocus && !inDebugRepl && vim.mode != 'Insert'" - }, - { - "key": "cmd+left", - "command": "extension.vim_cmd+left", - "when": "editorTextFocus && vim.use && !inDebugRepl && vim.mode != 'Insert'" - }, - { - "key": "cmd+right", - "command": "extension.vim_cmd+right", - "when": "editorTextFocus && vim.use && !inDebugRepl && vim.mode != 'Insert'" - }, - { - "key": "cmd+d", - "command": "extension.vim_cmd+d", - "when": "editorTextFocus && vim.use && !inDebugRepl" - }, - { - "key": "cmd+a", - "command": "extension.vim_cmd+a", - "when": "editorTextFocus && vim.use && !inDebugRepl && vim.mode != 'Insert'" - }, - { - "key": "ctrl+d", - "command": "extension.vim_ctrl+d", - "when": "editorTextFocus && vim.use && !inDebugRepl" - }, - { - "key": "ctrl+alt+down", - "linux": "shift+alt+down", - "mac": "cmd+alt+down", - "command": "extension.vim_cmd+alt+down", - "when": "editorTextFocus && !inDebugRepl" - }, - { - "key": "ctrl+alt+up", - "linux": "shift+alt+up", - "mac": "cmd+alt+up", - "command": "extension.vim_cmd+alt+up", - "when": "editorTextFocus && !inDebugRepl" - }, - { - "key": "Backspace", - "command": "extension.vim_backspace", - "when": "editorTextFocus && !inDebugRepl" - }, - { - "key": "shift+backspace", - "command": "extension.vim_shift+backspace", - "when": "editorTextFocus && vim.use && vim.mode == 'SearchInProgressMode' && !inDebugRepl" - }, - { - "key": "Delete", - "command": "extension.vim_delete", - "when": "editorTextFocus && vim.mode == 'Normal' && !inDebugRepl" - }, - { - "key": "tab", - "command": "extension.vim_tab", - "when": "editorFocus && vim.mode == 'Normal' && !inDebugRepl" - }, - { - "key": "ctrl+r", - "command": "extension.vim_ctrl+r", - "when": "editorTextFocus && vim.use && !inDebugRepl" - }, - { - "key": "ctrl+f", - "command": "extension.vim_ctrl+f", - "when": "editorTextFocus && vim.use && !inDebugRepl" - }, - { - "key": "ctrl+b", - "command": "extension.vim_ctrl+b", - "when": "editorTextFocus && vim.use && vim.mode != 'Insert' && !inDebugRepl" - }, - { - "key": "ctrl+j", - "command": "extension.vim_ctrl+j", - "when": "editorTextFocus && vim.use && vim.mode != 'Insert' && !inDebugRepl" - }, - { - "key": "ctrl+k", - "command": "extension.vim_ctrl+k", - "when": "editorTextFocus && vim.use && vim.mode != 'Insert' && !inDebugRepl" - }, - { - "key": "ctrl+h", - "command": "extension.vim_ctrl+h", - "when": "editorTextFocus && vim.use && vim.mode == 'Insert' && !inDebugRepl" - }, - { - "key": "ctrl+e", - "command": "extension.vim_ctrl+e", - "when": "editorTextFocus && vim.use && !inDebugRepl" - }, - { - "key": "ctrl+y", - "command": "extension.vim_ctrl+y", - "when": "editorTextFocus && vim.use && !inDebugRepl" - }, - { - "key": "ctrl+u", - "command": "extension.vim_ctrl+u", - "when": "editorTextFocus && vim.use && !inDebugRepl" - }, - { - "key": "ctrl+o", - "command": "extension.vim_ctrl+o", - "when": "editorTextFocus && vim.use && !inDebugRepl" - }, - { - "key": "ctrl+i", - "command": "extension.vim_ctrl+i", - "when": "editorTextFocus && vim.use && !inDebugRepl" - }, - { - "key": "ctrl+v", - "command": "extension.vim_ctrl+v", - "when": "editorTextFocus && vim.use && vim.mode != 'Insert' && !inDebugRepl" - }, - { - "key": "cmd+v", - "command": "extension.vim_cmd+v", - "when": "editorTextFocus && vim.use && vim.mode == 'SearchInProgressMode' && !inDebugRepl" - }, - { - "key": "ctrl+[", - "command": "extension.vim_ctrl+[", - "when": "editorTextFocus && vim.use && !inDebugRepl" - }, - { - "key": "ctrl+w", - "command": "extension.vim_ctrl+w", - "when": "editorTextFocus && vim.use && !inDebugRepl" - }, - { - "key": "ctrl+c", - "command": "extension.vim_ctrl+c", - "when": "editorTextFocus && vim.use && !inDebugRepl && vim.overrideCtrlC" - }, - { - "key": "cmd+c", - "command": "extension.vim_cmd+c", - "when": "editorTextFocus && vim.use && vim.overrideCopy && !inDebugRepl" - }, - { - "key": "ctrl+a", - "command": "extension.vim_ctrl+a", - "when": "editorTextFocus && vim.use && !inDebugRepl" - }, - { - "key": "ctrl+n", - "command": "extension.vim_ctrl+n", - "when": "editorTextFocus && vim.use && !inDebugRepl" - }, - { - "key": "ctrl+p", - "command": "extension.vim_ctrl+p", - "when": "suggestWidgetVisible && vim.use" - }, - { - "key": "ctrl+x", - "command": "extension.vim_ctrl+x", - "when": "editorTextFocus && vim.use && !inDebugRepl" - }, - { - "key": "ctrl+shift+2", - "command": "extension.vim_ctrl+shift+2", - "when": "editorTextFocus && vim.use" - }, - { - "key": "ctrl+t", - "command": "extension.vim_ctrl+t", - "when": "editorTextFocus && vim.use && !inDebugRepl" - }, - { - "key": "ctrl+pagedown", - "command": "extension.vim_ctrl+pagedown", - "when": "editorTextFocus && vim.use && !inDebugRepl" - }, - { - "key": "ctrl+pageup", - "command": "extension.vim_ctrl+pageup", - "when": "editorTextFocus && vim.use && !inDebugRepl" - }, - { - "key": "left", - "command": "extension.vim_left", - "when": "editorTextFocus && !inDebugRepl" - }, - { - "key": "right", - "command": "extension.vim_right", - "when": "editorTextFocus && !inDebugRepl" - }, - { - "key": "up", - "command": "extension.vim_up", - "when": "editorTextFocus && !inDebugRepl && !suggestWidgetVisible && !suggestWidgetMultipleSuggestions" - }, - { - "key": "down", - "command": "extension.vim_down", - "when": "editorTextFocus && !inDebugRepl && !suggestWidgetVisible && !suggestWidgetMultipleSuggestions" - } - ], - "configuration": { - "title": "Vim Configuration", - "type": "object", - "properties": { - "vim.otherModesKeyBindings": { - "type": "array", - "description": "Remapped keys in normal mode. Allows mapping to vim commands or vscode actions. See README for more." - }, - "vim.otherModesKeyBindingsNonRecursive": { - "type": "array", - "description": "Non-recursive remapped keys in normal mode. Allows mapping to vim commands or vscode actions. See README for more." - }, - "vim.useCtrlKeys": { - "type": "boolean", - "description": "Enable some vim ctrl key commands that override otherwise common operations, like ctrl+c", - "default": true - }, - "vim.leader": { - "type": "string", - "description": "What key should map to in remappings?", - "default": "\\" - }, - "vim.searchHighlightColor": { - "type": "string", - "description": "Color of the search highlight.", - "default": "rgba(150, 150, 255, 0.3)" - }, - "vim.useSystemClipboard": { - "type": "boolean", - "description": "Use system clipboard for unnamed register.", - "default": false - }, - "vim.overrideCopy": { - "type": "boolean", - "description": "Override VSCode's copy command with our own copy command, which works better with VSCodeVim. Turn this off if copying is not working.", - "default": true - }, - "vim.insertModeKeyBindings": { - "type": "array", - "description": "Remapped keys in insert mode. Allows mapping to vim commands or vscode actions. See README for more." - }, - "vim.insertModeKeyBindingsNonRecursive": { - "type": "array", - "description": "Non-recursive keybinding overrides to use for insert mode. Allows mapping to vim commands or vscode actions. See README for more." - }, - "vim.textwidth": { - "type": "number", - "description": "Width to word-wrap to when using gq.", - "default": 80 - }, - "vim.timeout": { - "type": "number", - "description": "Timeout in milliseconds for remapped commands", - "default": 1000 - }, - "vim.useSolidBlockCursor": { - "type": "boolean", - "description": "Use a non blinking block cursor.", - "default": false - }, - "vim.scroll": { - "type": "number", - "description": "Number of lines to scroll with CTRL-U and CTRL-D commands.", - "default": 20 - }, - "vim.showcmd": { - "type": "boolean", - "description": "Show the text of any command you are in the middle of writing.", - "default": true - }, - "vim.iskeyword": { - "type": "string", - "description": "keywords contain alphanumeric characters and '_'", - "default": "/\\()\"':,.;<>~!@#$%^&*|+=[]{}`?-" - }, - "vim.ignorecase": { - "type": "boolean", - "description": "Ignore case in search patterns.", - "default": true - }, - "vim.smartcase": { - "type": "boolean", - "description": "Override the 'ignorecase' option if the search pattern contains upper case characters.", - "default": true - }, - "vim.easymotion": { - "type": "boolean", - "description": "Enable the EasyMotion plugin for Vim.", - "default": false - }, - "vim.easymotionMarkerBackgroundColor": { - "type": "string", - "description": "Set a custom background color for EasyMotion markers.", - "default": "#000000" - }, - "vim.easymotionMarkerForegroundColorOneChar": { - "type": "string", - "description": "Set a custom color for the text on one character long markers.", - "default": "#ff0000" - }, - "vim.easymotionMarkerForegroundColorTwoChar": { - "type": "string", - "description": "Set a custom color for the text on two character long markers.", - "default": "#ffa500" - }, - "vim.easymotionMarkerWidthPerChar": { - "type": "number", - "description": "Set the width (in pixels) allocated to each character in the match.", - "default": 8 - }, - "vim.easymotionMarkerHeight": { - "type": "number", - "description": "Set the height of the marker.", - "default": 14 - }, - "vim.easymotionMarkerFontFamily": { - "type": "string", - "description": "Set the font family of the marker text.", - "default": "Consolas" - }, - "vim.easymotionMarkerFontSize": { - "type": "string", - "description": "Set the font size of the marker text.", - "default": "14" - }, - "vim.easymotionMarkerFontWeight": { - "type": "string", - "description": "Set the font weight of the marker text.", - "default": "normal" - }, - "vim.easymotionMarkerYOffset": { - "type": "number", - "description": "Set the Y offset of the marker text (the distance from the top).", - "default": 11 - }, - "vim.surround": { - "type": "boolean", - "description": "Enable the Surround plugin for Vim.", - "default": true - }, - "vim.hlsearch": { - "type": "boolean", - "description": "Show all matches of the most recent search pattern", - "default": false - }, - "vim.incsearch": { - "type": "boolean", - "description": "Show where a / search matches as you type it.", - "default": true - }, - "vim.history": { - "type": "number", - "description": "How much search or command history should be remembered", - "default": 50 - }, - "vim.autoindent": { - "type": "boolean", - "description": "Indent code automatically.", - "default": true - }, - "vim.startInInsertMode": { - "type": "boolean", - "description": "Start in Insert Mode." - }, - "vim.handleKeys": { - "type": "object", - "description": "Option to delegate certain key combinations back to VSCode to be handled natively" - }, - "vim.statusBarColorControl":{ - "type": "boolean", - "description": "Allow VSCodeVim to change status bar color based on mode" - }, - "vim.statusBarColors": { - "type": "object", - "description": "Customize colors per mode when VSCodeVim controls status bar colors" - } - } + "configuration": { + "title": "Vim Configuration", + "type": "object", + "properties": { + "vim.otherModesKeyBindings": { + "type": "array", + "description": "Remapped keys in normal mode. Allows mapping to vim commands or vscode actions. See README for more." + }, + "vim.otherModesKeyBindingsNonRecursive": { + "type": "array", + "description": "Non-recursive remapped keys in normal mode. Allows mapping to vim commands or vscode actions. See README for more." + }, + "vim.useCtrlKeys": { + "type": "boolean", + "description": "Enable some vim ctrl key commands that override otherwise common operations, like ctrl+c", + "default": true + }, + "vim.leader": { + "type": "string", + "description": "What key should map to in remappings?", + "default": "\\" + }, + "vim.searchHighlightColor": { + "type": "string", + "description": "Color of the search highlight.", + "default": "rgba(150, 150, 255, 0.3)" + }, + "vim.useSystemClipboard": { + "type": "boolean", + "description": "Use system clipboard for unnamed register.", + "default": false + }, + "vim.overrideCopy": { + "type": "boolean", + "description": "Override VSCode's copy command with our own copy command, which works better with VSCodeVim. Turn this off if copying is not working.", + "default": true + }, + "vim.insertModeKeyBindings": { + "type": "array", + "description": "Remapped keys in insert mode. Allows mapping to vim commands or vscode actions. See README for more." + }, + "vim.insertModeKeyBindingsNonRecursive": { + "type": "array", + "description": "Non-recursive keybinding overrides to use for insert mode. Allows mapping to vim commands or vscode actions. See README for more." + }, + "vim.textwidth": { + "type": "number", + "description": "Width to word-wrap to when using gq.", + "default": 80 + }, + "vim.timeout": { + "type": "number", + "description": "Timeout in milliseconds for remapped commands", + "default": 1000 + }, + "vim.useSolidBlockCursor": { + "type": "boolean", + "description": "Use a non blinking block cursor.", + "default": false + }, + "vim.scroll": { + "type": "number", + "description": "Number of lines to scroll with CTRL-U and CTRL-D commands.", + "default": 20 + }, + "vim.showcmd": { + "type": "boolean", + "description": "Show the text of any command you are in the middle of writing.", + "default": true + }, + "vim.iskeyword": { + "type": "string", + "description": "keywords contain alphanumeric characters and '_'", + "default": "/\\()\"':,.;<>~!@#$%^&*|+=[]{}`?-" + }, + "vim.ignorecase": { + "type": "boolean", + "description": "Ignore case in search patterns.", + "default": true + }, + "vim.smartcase": { + "type": "boolean", + "description": "Override the 'ignorecase' option if the search pattern contains upper case characters.", + "default": true + }, + "vim.easymotion": { + "type": "boolean", + "description": "Enable the EasyMotion plugin for Vim.", + "default": false + }, + "vim.easymotionMarkerBackgroundColor": { + "type": "string", + "description": "Set a custom background color for EasyMotion markers.", + "default": "#000000" + }, + "vim.easymotionMarkerForegroundColorOneChar": { + "type": "string", + "description": "Set a custom color for the text on one character long markers.", + "default": "#ff0000" + }, + "vim.easymotionMarkerForegroundColorTwoChar": { + "type": "string", + "description": "Set a custom color for the text on two character long markers.", + "default": "#ffa500" + }, + "vim.easymotionMarkerWidthPerChar": { + "type": "number", + "description": "Set the width (in pixels) allocated to each character in the match.", + "default": 8 + }, + "vim.easymotionMarkerHeight": { + "type": "number", + "description": "Set the height of the marker.", + "default": 14 + }, + "vim.easymotionMarkerFontFamily": { + "type": "string", + "description": "Set the font family of the marker text.", + "default": "Consolas" + }, + "vim.easymotionMarkerFontSize": { + "type": "string", + "description": "Set the font size of the marker text.", + "default": "14" + }, + "vim.easymotionMarkerFontWeight": { + "type": "string", + "description": "Set the font weight of the marker text.", + "default": "normal" + }, + "vim.easymotionMarkerYOffset": { + "type": "number", + "description": "Set the Y offset of the marker text (the distance from the top).", + "default": 11 + }, + "vim.surround": { + "type": "boolean", + "description": "Enable the Surround plugin for Vim.", + "default": true + }, + "vim.hlsearch": { + "type": "boolean", + "description": "Show all matches of the most recent search pattern", + "default": false + }, + "vim.incsearch": { + "type": "boolean", + "description": "Show where a / search matches as you type it.", + "default": true + }, + "vim.history": { + "type": "number", + "description": "How much search or command history should be remembered", + "default": 50 + }, + "vim.autoindent": { + "type": "boolean", + "description": "Indent code automatically.", + "default": true + }, + "vim.startInInsertMode": { + "type": "boolean", + "description": "Start in Insert Mode." + }, + "vim.handleKeys": { + "type": "object", + "description": "Option to delegate certain key combinations back to VSCode to be handled natively" + }, + "vim.statusBarColorControl": { + "type": "boolean", + "description": "Allow VSCodeVim to change status bar color based on mode" + }, + "vim.statusBarColors": { + "type": "object", + "description": "Customize colors per mode when VSCodeVim controls status bar colors" } - }, - "scripts": { - "vscode:prepublish": "tsc -p ./", - "compile": "tsc -watch -p ./", - "test": "node ./node_modules/vscode/bin/test", - "postinstall": "node ./node_modules/vscode/bin/install && gulp init" - }, - "dependencies": { - "clipboardy": "^1.1.1", - "diff-match-patch": "^1.0.0", - "lodash": "^4.12.0" - }, - "devDependencies": { - "gulp": "^3.9.1", - "gulp-bump": "^2.1.0", - "gulp-git": "^1.7.1", - "gulp-inject-string": "^1.1.0", - "gulp-shell": "^0.5.2", - "gulp-tag-version": "^1.3.0", - "gulp-tslint": "^6.1.2", - "gulp-typings": "^2.0.0", - "merge-stream": "^1.0.0", - "tslint": "^3.10.2", - "typescript": "^2.2.1", - "mocha": "^3.2.0", - "vscode": "^1.0.5", - "@types/node": "^6.0.41", - "@types/mocha": "^2.2.39" + } } + }, + "scripts": { + "vscode:prepublish": "tsc -p ./", + "compile": "tsc -watch -p ./", + "test": "node ./node_modules/vscode/bin/test", + "postinstall": "node ./node_modules/vscode/bin/install && gulp init" + }, + "dependencies": { + "clipboardy": "^1.1.1", + "diff-match-patch": "^1.0.0", + "lodash": "^4.12.0" + }, + "devDependencies": { + "@types/mocha": "^2.2.39", + "@types/node": "^6.0.41", + "gulp": "^3.9.1", + "gulp-bump": "^2.1.0", + "gulp-git": "^1.7.1", + "gulp-inject-string": "^1.1.0", + "gulp-shell": "^0.5.2", + "gulp-tag-version": "^1.3.0", + "gulp-tslint": "^8.0.0", + "gulp-typings": "^2.0.0", + "merge-stream": "^1.0.0", + "mocha": "^3.2.0", + "tslint": "^5.1.0", + "typescript": "^2.3.2", + "vscode": "^1.0.5" + } } diff --git a/src/actions/actions.ts b/src/actions/actions.ts index 737beee59..2e3b5d3eb 100644 --- a/src/actions/actions.ts +++ b/src/actions/actions.ts @@ -7012,9 +7012,9 @@ class CommandSurroundAddToReplacement extends BaseCommand { // Convert a few shortcuts to the correct surround characters when NOT entering a tag if (vimState.surround.replacement.length === 0) { - if (stringToAdd === "b") { stringToAdd = "("; }; - if (stringToAdd === "B") { stringToAdd = "{"; }; - if (stringToAdd === "r") { stringToAdd = "["; }; + if (stringToAdd === "b") { stringToAdd = "("; } + if (stringToAdd === "B") { stringToAdd = "{"; } + if (stringToAdd === "r") { stringToAdd = "["; } } vimState.surround.replacement += stringToAdd; diff --git a/src/cmd_line/commands/write.ts b/src/cmd_line/commands/write.ts index be1a49092..b6ee845de 100644 --- a/src/cmd_line/commands/write.ts +++ b/src/cmd_line/commands/write.ts @@ -61,9 +61,9 @@ export class WriteCommand extends node.CommandBase { return this.save(modeHandler); } catch (accessErr) { if (this.arguments.bang) { - fs.chmod(modeHandler.vimState.editor.document.fileName, 666, (e) => { + fs.chmod(modeHandler.vimState.editor.document.fileName, 666, e => { if (e) { - modeHandler.setStatusBarText(e.message); + return modeHandler.setStatusBarText(e.message); } else { return this.save(modeHandler); } diff --git a/src/cmd_line/lexer.ts b/src/cmd_line/lexer.ts index 6aafb4a26..3e94a1836 100644 --- a/src/cmd_line/lexer.ts +++ b/src/cmd_line/lexer.ts @@ -162,7 +162,7 @@ module LexerFunctions { var args = emitToken(TokenType.CommandArgs, state); if (args) { tokens.push(args); - }; + } break; } } @@ -191,7 +191,7 @@ module LexerFunctions { state.ignore(); if (!state.isAtEof) { state.skip("/"); - }; + } return lexRange; } diff --git a/src/cmd_line/main.ts b/src/cmd_line/main.ts index 3d7e4f06e..cb3f22759 100644 --- a/src/cmd_line/main.ts +++ b/src/cmd_line/main.ts @@ -20,8 +20,10 @@ export async function showCmdLine(initialText: string, modeHandler : ModeHandler try { const cmdString = await vscode.window.showInputBox(options); await runCmdLine(cmdString!, modeHandler); + return; } catch (e) { modeHandler.setStatusBarText(e.toString()); + return; } } @@ -37,7 +39,9 @@ export async function runCmdLine(command : string, modeHandler : ModeHandler) : } await cmd.execute(modeHandler.vimState.editor, modeHandler); + return; } catch (e) { modeHandler.setStatusBarText(e.toString()); + return; } } diff --git a/src/cmd_line/subparsers/substitute.ts b/src/cmd_line/subparsers/substitute.ts index 79514a134..a23137110 100644 --- a/src/cmd_line/subparsers/substitute.ts +++ b/src/cmd_line/subparsers/substitute.ts @@ -19,7 +19,7 @@ function parsePattern(pattern: string, scanner: Scanner, delimiter: string): [st return [pattern, true]; } else if (currentChar === "\\") { if (!scanner.isAtEof) { - let currentChar = scanner.next(); + currentChar = scanner.next(); if (currentChar !== delimiter) { pattern += "\\"; diff --git a/src/cmd_line/subparsers/write.ts b/src/cmd_line/subparsers/write.ts index 2be36fa8d..f6588d3b2 100644 --- a/src/cmd_line/subparsers/write.ts +++ b/src/cmd_line/subparsers/write.ts @@ -40,7 +40,7 @@ export function parseWriteCommandArgs(args : string) : WriteCommand { scanner.expect('='); scanner.ignore(); while (!scanner.isAtEof) { - let c = scanner.next(); + c = scanner.next(); if (c !== ' ' && c !== '\t') { continue; } diff --git a/src/cmd_line/subparsers/writequit.ts b/src/cmd_line/subparsers/writequit.ts index 09e1bb389..424fca8c6 100644 --- a/src/cmd_line/subparsers/writequit.ts +++ b/src/cmd_line/subparsers/writequit.ts @@ -30,7 +30,7 @@ export function parseWriteQuitCommandArgs(args : string) : WriteQuitCommand { scanner.expect('='); scanner.ignore(); while (!scanner.isAtEof) { - let c = scanner.next(); + c = scanner.next(); if (c !== ' ' && c !== '\t') { continue; } diff --git a/src/configuration/configuration.ts b/src/configuration/configuration.ts index 4bcd81350..952eacef0 100644 --- a/src/configuration/configuration.ts +++ b/src/configuration/configuration.ts @@ -8,7 +8,7 @@ export type OptionValue = number | string | boolean; export type ValueMapping = { [key: number]: OptionValue [key: string]: OptionValue -} +}; export interface IHandleKeys { [key: string]: boolean; diff --git a/src/mode/modeHandler.ts b/src/mode/modeHandler.ts index 838e7b30d..bab5b52b3 100644 --- a/src/mode/modeHandler.ts +++ b/src/mode/modeHandler.ts @@ -1368,7 +1368,7 @@ export class ModeHandler implements vscode.Disposable { accumulatedPositionDifferences[command.cursorIndex].push(command.diff); } }); - }; + } } else { // This is the common case! diff --git a/src/motion/position.ts b/src/motion/position.ts index e753eced8..f5942215f 100644 --- a/src/motion/position.ts +++ b/src/motion/position.ts @@ -844,7 +844,7 @@ export class Position extends vscode.Position { private getLastWordEndWithRegex(regex: RegExp) : Position { for (let currentLine = this.line; currentLine < TextEditor.getLineCount(); currentLine++) { let positions = this.getAllEndPositions(TextEditor.getLineAt(new vscode.Position(currentLine, 0)).text, regex); - let index = _.findIndex(positions, index => index >= this.character || currentLine !== this.line); + let index = _.findIndex(positions, i => i >= this.character || currentLine !== this.line); let newCharacter = 0; if (index === -1) { newCharacter = positions[positions.length - 1]; diff --git a/src/register/register.ts b/src/register/register.ts index 4a9344e23..7507195ff 100644 --- a/src/register/register.ts +++ b/src/register/register.ts @@ -13,7 +13,7 @@ export enum RegisterMode { CharacterWise, LineWise, BlockWise, -}; +} export type RegisterContent = string | string[] | RecordedState; diff --git a/test/testSimplifier.ts b/test/testSimplifier.ts index 9d39192e1..23c28439c 100644 --- a/test/testSimplifier.ts +++ b/test/testSimplifier.ts @@ -239,4 +239,4 @@ async function testIt(modeHandler: ModeHandler, testObj: ITestObject): Promise