mirror of
https://github.com/microsoft/vscode-extension-samples.git
synced 2026-04-27 16:55:44 +08:00
Adopt tasks 2.0.0 (Microsoft/vscode#50876)
This commit is contained in:
4
vim-sample/.vscode/launch.json
vendored
4
vim-sample/.vscode/launch.json
vendored
@ -11,7 +11,7 @@
|
||||
"stopOnEntry": false,
|
||||
"sourceMaps": true,
|
||||
"outFiles": ["${workspaceRoot}/out/src/**/*.js"],
|
||||
"preLaunchTask": "npm"
|
||||
"preLaunchTask": "npm: watch"
|
||||
},
|
||||
{
|
||||
"name": "Launch Tests",
|
||||
@ -22,7 +22,7 @@
|
||||
"stopOnEntry": false,
|
||||
"sourceMaps": true,
|
||||
"outFiles": ["${workspaceRoot}/out/test/**/*.js"],
|
||||
"preLaunchTask": "npm"
|
||||
"preLaunchTask": "npm: watch"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
2
vim-sample/.vscode/settings.json
vendored
2
vim-sample/.vscode/settings.json
vendored
@ -8,5 +8,7 @@
|
||||
"search.exclude": {
|
||||
"out": true // set this to false to include "out" folder in search results
|
||||
},
|
||||
// Turn off tsc task auto detection since we have the necessary task as npm scripts
|
||||
"typescript.tsc.autoDetect": "off",
|
||||
"typescript.tsdk": "./node_modules/typescript/lib" // we want to use the TS server from our node_modules folder to control its version
|
||||
}
|
||||
46
vim-sample/.vscode/tasks.json
vendored
46
vim-sample/.vscode/tasks.json
vendored
@ -1,30 +1,20 @@
|
||||
// Available variables which can be used inside of strings.
|
||||
// ${workspaceRoot}: the root folder of the team
|
||||
// ${file}: the current opened file
|
||||
// ${fileBasename}: the current opened file's basename
|
||||
// ${fileDirname}: the current opened file's dirname
|
||||
// ${fileExtname}: the current opened file's extension
|
||||
// ${cwd}: the current working directory of the spawned process
|
||||
|
||||
// A task runner that calls a custom npm script that compiles the extension.
|
||||
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
||||
// for the documentation about the tasks.json format
|
||||
{
|
||||
"version": "0.1.0",
|
||||
|
||||
// we want to run npm
|
||||
"command": "npm",
|
||||
|
||||
// the command is a shell script
|
||||
"isShellCommand": true,
|
||||
|
||||
// show the output window only if unrecognized errors occur.
|
||||
"showOutput": "silent",
|
||||
|
||||
// we run the custom script "compile" as defined in package.json
|
||||
"args": ["run", "compile", "--loglevel", "silent"],
|
||||
|
||||
// The tsc compiler is started in watching mode
|
||||
"isWatching": true,
|
||||
|
||||
// use the standard tsc in watch mode problem matcher to find compile problems in the output.
|
||||
"problemMatcher": "$tsc-watch"
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"type": "npm",
|
||||
"script": "watch",
|
||||
"problemMatcher": "$tsc-watch",
|
||||
"isBackground": true,
|
||||
"presentation": {
|
||||
"reveal": "never"
|
||||
},
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
2015
vim-sample/package-lock.json
generated
Normal file
2015
vim-sample/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,77 +1,77 @@
|
||||
{
|
||||
"name": "vim",
|
||||
"displayName": "vim",
|
||||
"description": "vim sample extension",
|
||||
"version": "0.0.1",
|
||||
"publisher": "alexdima",
|
||||
"engines": {
|
||||
"vscode": "^1.0.0"
|
||||
},
|
||||
"categories": [
|
||||
"Other"
|
||||
],
|
||||
"activationEvents": [
|
||||
"*"
|
||||
],
|
||||
"main": "./out/src/extension",
|
||||
"contributes": {
|
||||
"keybindings": [
|
||||
{
|
||||
"command": "vim.goToNormalMode",
|
||||
"key": "escape",
|
||||
"when": "editorTextFocus && !vim.inNormalMode"
|
||||
},
|
||||
{
|
||||
"command": "vim.clearInput",
|
||||
"key": "escape",
|
||||
"when": "editorTextFocus && vim.hasInput"
|
||||
},
|
||||
{
|
||||
"command": "redo",
|
||||
"key": "ctrl+r",
|
||||
"mac": "cmd+r",
|
||||
"when": "editorTextFocus"
|
||||
},
|
||||
{
|
||||
"command": "e",
|
||||
"key": "ctrl+e",
|
||||
"when": "editorTextFocus && vim.inNormalMode"
|
||||
},
|
||||
{
|
||||
"command": "d",
|
||||
"key": "ctrl+d",
|
||||
"when": "editorTextFocus && vim.inNormalMode"
|
||||
},
|
||||
{
|
||||
"command": "f",
|
||||
"key": "ctrl+f",
|
||||
"when": "editorTextFocus && vim.inNormalMode"
|
||||
},
|
||||
{
|
||||
"command": "y",
|
||||
"key": "ctrl+y",
|
||||
"when": "editorTextFocus && vim.inNormalMode"
|
||||
},
|
||||
{
|
||||
"command": "u",
|
||||
"key": "ctrl+u",
|
||||
"when": "editorTextFocus && vim.inNormalMode"
|
||||
},
|
||||
{
|
||||
"command": "b",
|
||||
"key": "ctrl+b",
|
||||
"when": "editorTextFocus && vim.inNormalMode"
|
||||
}
|
||||
]
|
||||
},
|
||||
"scripts": {
|
||||
"vscode:prepublish": "tsc -p ./",
|
||||
"compile": "tsc -watch -p ./",
|
||||
"postinstall": "node ./node_modules/vscode/bin/install"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^2.1.4",
|
||||
"vscode": "^1.1.17",
|
||||
"@types/node": "*"
|
||||
}
|
||||
}
|
||||
{
|
||||
"name": "vim",
|
||||
"displayName": "vim",
|
||||
"description": "vim sample extension",
|
||||
"version": "0.0.1",
|
||||
"publisher": "alexdima",
|
||||
"engines": {
|
||||
"vscode": "^1.0.0"
|
||||
},
|
||||
"categories": [
|
||||
"Other"
|
||||
],
|
||||
"activationEvents": [
|
||||
"*"
|
||||
],
|
||||
"main": "./out/extension",
|
||||
"contributes": {
|
||||
"keybindings": [
|
||||
{
|
||||
"command": "vim.goToNormalMode",
|
||||
"key": "escape",
|
||||
"when": "editorTextFocus && !vim.inNormalMode"
|
||||
},
|
||||
{
|
||||
"command": "vim.clearInput",
|
||||
"key": "escape",
|
||||
"when": "editorTextFocus && vim.hasInput"
|
||||
},
|
||||
{
|
||||
"command": "redo",
|
||||
"key": "ctrl+r",
|
||||
"mac": "cmd+r",
|
||||
"when": "editorTextFocus"
|
||||
},
|
||||
{
|
||||
"command": "e",
|
||||
"key": "ctrl+e",
|
||||
"when": "editorTextFocus && vim.inNormalMode"
|
||||
},
|
||||
{
|
||||
"command": "d",
|
||||
"key": "ctrl+d",
|
||||
"when": "editorTextFocus && vim.inNormalMode"
|
||||
},
|
||||
{
|
||||
"command": "f",
|
||||
"key": "ctrl+f",
|
||||
"when": "editorTextFocus && vim.inNormalMode"
|
||||
},
|
||||
{
|
||||
"command": "y",
|
||||
"key": "ctrl+y",
|
||||
"when": "editorTextFocus && vim.inNormalMode"
|
||||
},
|
||||
{
|
||||
"command": "u",
|
||||
"key": "ctrl+u",
|
||||
"when": "editorTextFocus && vim.inNormalMode"
|
||||
},
|
||||
{
|
||||
"command": "b",
|
||||
"key": "ctrl+b",
|
||||
"when": "editorTextFocus && vim.inNormalMode"
|
||||
}
|
||||
]
|
||||
},
|
||||
"scripts": {
|
||||
"vscode:prepublish": "tsc -p ./",
|
||||
"watch": "tsc -watch -p ./",
|
||||
"postinstall": "node ./node_modules/vscode/bin/install"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^2.1.4",
|
||||
"vscode": "^1.1.17",
|
||||
"@types/node": "*"
|
||||
}
|
||||
}
|
||||
|
||||
@ -220,8 +220,7 @@ export class Controller implements IController {
|
||||
private _interpretNormalModeInput(editor: TextEditor, modifierKeys: ModifierKeys): Thenable<ITypeResult> {
|
||||
if (this._currentInput.startsWith(':')) {
|
||||
return window.showInputBox({ value: 'tabm' }).then((value) => {
|
||||
let result = this._findMapping(value || '', editor, modifierKeys);
|
||||
return Promise.resolve(result);
|
||||
return this._findMapping(value || '', editor, modifierKeys);
|
||||
});
|
||||
}
|
||||
let result = this._findMapping(this._currentInput, editor, modifierKeys);
|
||||
|
||||
Reference in New Issue
Block a user