From d5bce097f3dacec7b57f2eccadbf815a1a336d46 Mon Sep 17 00:00:00 2001 From: Keisuke KATO Date: Sat, 17 Sep 2016 17:10:08 +0900 Subject: [PATCH] fixed #13 ctrl|cmd+shift+enter behaves differently than IntelliJ. (#14) * fixed #13 ctrl|cmd+shift+enter behaves differently than IntelliJ. * fix readme and usage --- README.md | 1 + package.json | 17 +++++++++++------ src/package-with-comment.json | 18 ++++++++++++------ src/tool/gene-keybind-markdown.js | 2 +- 4 files changed, 25 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 0bc3581..079a5f9 100644 --- a/README.md +++ b/README.md @@ -209,6 +209,7 @@ Linux, Windows | macOS | Feature | Supported ---------------|------|---------|---------- f7 | f7 | Next difference | Yes shift+f7 | shift+f7 | Previous difference | Yes +ctrl+shift+enter | cmd+shift+enter | Start new line | Yes ## Installation diff --git a/package.json b/package.json index 76e4e71..294da6e 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { "name": "intellij-idea-keybindings", - "version": "0.1.5", + "version": "0.1.6", "publisher": "k--kato", "engines": { - "vscode": "1.4.x" + "vscode": "1.5.x" }, "displayName": "IntelliJ IDEA Keybindings", "description": "Port of IntelliJ IDEA Keybindings", @@ -20,7 +20,7 @@ ], "dependencies": {}, "devDependencies": { - "vscode": "^0.11.14", + "vscode": "^0.11.18", "gulp": "~3.9.1", "gulp-cli": "~1.2.2", "gulp-strip-json-comments": "~2.0.0", @@ -68,8 +68,8 @@ { "key": "ctrl+shift+enter", "mac": "cmd+shift+enter", - "command": "editor.action.insertLineAfter", - "when": "editorTextFocus", + "command": "acceptSelectedSuggestion", + "when": "editorFocus && suggestWidgetVisible", "intellij": "Complete statement" }, { "key": "ctrl+p", @@ -1223,8 +1223,13 @@ "command": "workbench.action.compareEditor.previousChange", "when": "textCompareEditorVisible", "intellij": "Previous difference" + }, { + "key": "ctrl+shift+enter", + "mac": "cmd+shift+enter", + "command": "editor.action.insertLineAfter", + "when": "editorTextFocus && !suggestWidgetVisible", + "intellij": "Start new line" } - ] } } \ No newline at end of file diff --git a/src/package-with-comment.json b/src/package-with-comment.json index f20f16b..206d9de 100644 --- a/src/package-with-comment.json +++ b/src/package-with-comment.json @@ -1,9 +1,9 @@ { "name": "intellij-idea-keybindings", - "version": "0.1.5", + "version": "0.1.6", "publisher": "k--kato", "engines": { - "vscode": "1.4.x" + "vscode": "1.5.x" }, "displayName": "IntelliJ IDEA Keybindings", "description": "Port of IntelliJ IDEA Keybindings", @@ -21,7 +21,7 @@ "dependencies": { }, "devDependencies": { - "vscode": "^0.11.14", + "vscode": "^0.11.18", "gulp": "~3.9.1", "gulp-cli": "~1.2.2", "gulp-strip-json-comments": "~2.0.0", @@ -70,8 +70,8 @@ { "key": "ctrl+shift+enter", "mac": "cmd+shift+enter", - "command": "editor.action.insertLineAfter", - "when": "editorTextFocus", + "command": "acceptSelectedSuggestion", + "when": "editorFocus && suggestWidgetVisible", "intellij": "Complete statement" }, { @@ -1277,8 +1277,14 @@ "command": "workbench.action.compareEditor.previousChange", "when": "textCompareEditorVisible", "intellij": "Previous difference" + }, + { + "key": "ctrl+shift+enter", + "mac": "cmd+shift+enter", + "command": "editor.action.insertLineAfter", + "when": "editorTextFocus && !suggestWidgetVisible", + "intellij": "Start new line" } - ] } } \ No newline at end of file diff --git a/src/tool/gene-keybind-markdown.js b/src/tool/gene-keybind-markdown.js index bd1544f..9f1d8ad 100644 --- a/src/tool/gene-keybind-markdown.js +++ b/src/tool/gene-keybind-markdown.js @@ -1,5 +1,5 @@ /*---------------------------------------------------------------------------*\ - * node src/tool/gene-keybind-markdown.js + * node gene-keybind-markdown.js \*---------------------------------------------------------------------------*/ const fs = require('fs'),