Permalink
Browse files

Removed keybinding of : and added alt+: to play nice with Vim plugins.

Folks can overide this in their own keybdinings.json if they dont use
vim based plugins.
  • Loading branch information...
thousandtyone committed Apr 4, 2017
1 parent 1803f88 commit 54310045199fdb0350d8e756a9cf64b1a2858860
Showing with 8 additions and 7 deletions.
  1. +1 −1 README.md
  2. +1 −1 out/src/extension.js.map
  3. +3 −3 package.json
  4. +3 −2 src/extension.ts
View
@@ -28,7 +28,7 @@ When the extension moves the semi-colon to the end of the line it also moves you
The Extension understands context of the code in which it executes; so semi-colons will not move to end of line automatically for, 'for' or 'foreach' loops!
> **Note**: For languages like Python which use colons instead of semi-colons to end the line use the autoend.autoendWithColon setting and set it to true. This disables moving of semi-colons to the end of the line and does the same thing with colons to make experience with languages like python (which use colons instead of semi-colons to end a line or indicate starting of code blocks) better.
> **Note**: For languages like Python which use colons instead of semi-colons to end the line use the autoend.autoendWithColon setting and set it to true. This disables moving of semi-colons to the end of the line and does the same thing with colons to make experience with languages like python (which use colons instead of semi-colons to end a line or indicate starting of code blocks) better. Also note that in this mode the default semi-colon key function as is and you have to use ALT+: for the plugin to automatically move your colons to the end of line. This is done to play nice with Vim Plugins. You can of course override this behavior and map the defaut semi-colon key to extension.colon.autoend command in keybindings.json described https://code.visualstudio.com/docs/getstarted/keybindings if you dont use Vim based Plugins.
## Known Issues
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -2,7 +2,7 @@
"name": "autoend",
"displayName": "Autoend",
"description": "Automatically inserts / moves semicolon to the end of the line and moves you to next line.",
"version": "1.1.0",
"version": "1.1.2",
"license":"GPL-2.0",
"publisher": "thousandtyone",
"engines": {
@@ -39,7 +39,7 @@
"title": "Autoend with Semi Colon"
},
{
"command": "extension.colon.autoend",
"command": "extension.colon.autoen",
"title": "Autoend with Colon"
}
],
@@ -51,7 +51,7 @@
},
{
"command": "extension.colon.autoend",
"key" : "shift+;",
"key" : "alt+shift+;",
"when": "editorTextFocus"
}
],
View
@@ -23,7 +23,7 @@ export function activate(context: vscode.ExtensionContext) {
if(autoendWithColon == null || autoendWithColon == undefined)
autoendWithColon == false;
if(autoendWithColon == true)
@@ -42,7 +42,8 @@ export function activate(context: vscode.ExtensionContext) {
let semicolonDisposable = vscode.commands.registerCommand('extension.autoend', () => {
FireColonOrSemiColonCommand(editor,autoInsertNewline, ';');
});
let colonDisposable = vscode.commands.registerCommand('extension.colon.autoend', () => {
let colonDisposable = vscode.commands.registerCommand('extension.colon.autoend', () => {
IgnoreAndPutCharacterInCurrentPostion(editor, ':')
});
context.subscriptions.push(colonDisposable);

0 comments on commit 5431004

Please sign in to comment.