Skip to content

Commit

Permalink
Merge pull request #811 from VSCodeVim/multi-cursor-mode-simple
Browse files Browse the repository at this point in the history
Multi-Cursor Mode v 2.0
  • Loading branch information
johnfn committed Sep 30, 2016
2 parents e568fbd + 62139b5 commit 70c2c07
Show file tree
Hide file tree
Showing 22 changed files with 1,297 additions and 361 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
out
testing
node_modules
*.sw?
.vscode-test
.DS_Store
*.vsix
*.log
testing
test2
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@
}
],

"vim.hlsearch": false,
"editor.cursorStyle": "block",

"typescript.tsdk": "./node_modules/typescript/lib", // we want to use the TS server from our node_modules folder to control its version
"editor.tabSize": 2,
"editor.insertSpaces": true,
"vim.useCtrlKeys": true,
"files.trimTrailingWhitespace": true
}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ We're super friendly people if you want to drop by and talk to us on [Slack](htt
* Correct undo/redo state
* Marks
* Vim Options
* Multiple Cursor mode (allows multiple simultaneous cursors to receive Vim commands. It's like macros, but in real time. Allows `/` search, has independent clipboards for each cursor, etc.)

## Roadmap

Expand Down
6 changes: 2 additions & 4 deletions extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import * as vscode from 'vscode';
import * as _ from "lodash";
import { showCmdLine } from './src/cmd_line/main';
import { ModeHandler } from './src/mode/modeHandler';
import { TaskQueue } from './src/taskQueue';
import { taskQueue } from './src/taskQueue';
import { Position } from './src/motion/position';
import { Globals } from './src/globals';
import { AngleBracketNotation } from './src/notation';
Expand Down Expand Up @@ -66,8 +66,6 @@ let extensionContext: vscode.ExtensionContext;
let modeHandlerToEditorIdentity: { [key: string]: ModeHandler } = {};
let previousActiveEditorId: EditorIdentity = new EditorIdentity();

let taskQueue = new TaskQueue();

export async function getAndUpdateModeHandler(): Promise<ModeHandler> {
const oldHandler = modeHandlerToEditorIdentity[previousActiveEditorId.toString()];
const activeEditorId = new EditorIdentity(vscode.window.activeTextEditor);
Expand Down Expand Up @@ -220,7 +218,7 @@ async function handleKeyEvent(key: string): Promise<void> {
const mh = await getAndUpdateModeHandler();

taskQueue.enqueueTask({
promise : async () => { await mh.handleKeyEvent(key); },
promise : async () => { console.log(key); await mh.handleKeyEvent(key); },
isRunning : false
});
}
Expand Down
10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"url": "https://github.com/VSCodeVim/Vim/issues"
},
"engines": {
"vscode": "^1.0.0"
"vscode": "^1.5.0"
},
"categories": [
"Other"
Expand All @@ -46,6 +46,11 @@
"command": "extension.vim_escape",
"when": "editorTextFocus && !inDebugRepl && !suggestWidgetVisible"
},
{
"key": "cmd+d",
"command": "extension.vim_cmd+d",
"when": "editorTextFocus && !inDebugRepl"
},
{
"key": "Backspace",
"command": "extension.vim_backspace",
Expand Down Expand Up @@ -244,7 +249,8 @@
"child-process": "^1.0.2",
"copy-paste": "^1.3.0",
"diff-match-patch": "^1.0.0",
"lodash": "^4.12.0"
"lodash": "^4.12.0",
"vscode": "^0.11.16"
},
"devDependencies": {
"gulp": "^3.9.1",
Expand Down

0 comments on commit 70c2c07

Please sign in to comment.