소스 검색

correct shortcuts

omassot 6 년 전
부모
커밋
1a1c3337af
2개의 변경된 파일19개의 추가작업 그리고 13개의 파일을 삭제
  1. 16 11
      extension.js
  2. 3 2
      package.json

+ 16 - 11
extension.js

@@ -175,9 +175,7 @@ function activate(context) {
 	// ctrl+i
 	function toggleItalic() {
 		// permettre de choisir le symbole dans les params
-		// si texte selectionné et non formatté: entoure avec le symbole
-		// si texte selectionné et déjà formatté: retire les symbole
-		// si curseur entouré d'espaces: ajoute un double symbole et place le curseur au centre
+		// voir à mieux prendre en compte les paramètres spéciaux (inclure ou exclure selon les cas)
 		extendSelection(/\S+/);
 		toggleSurrounding('*');
 	}
@@ -185,18 +183,13 @@ function activate(context) {
 	
 	// ctrl+b
 	function toggleBold() {
+		// voir à mieux prendre en compte les paramètres spéciaux (inclure ou exclure selon les cas)
 		extendSelection(/\S+/);
 		toggleSurrounding('**');
 	}
 	context.subscriptions.push(vscode.commands.registerCommand('fastmd.toggleBold', toggleBold));
 	
-	// ctrl+b ctrl+i
-	function toggleCombinedEmphasis() {
-		vscode.window.showInformationMessage('combined');
-	}
-	context.subscriptions.push(vscode.commands.registerCommand('fastmd.toggleCombinedEmphasis', toggleCombinedEmphasis));
-	
-	// ctrl+alt+e
+	// ctrl+alt+s
 	function toggleStrikethrough() {
 		extendSelection(/\S+/);
 		toggleSurrounding('~~');
@@ -263,6 +256,18 @@ function activate(context) {
 	}	
 	context.subscriptions.push(vscode.commands.registerCommand('fastmd.toggleOList', toggleOList));
 	
+	// ctrl++
+	function toggleChecklist() {
+		vscode.window.showInformationMessage('checklist');
+	}
+	context.subscriptions.push(vscode.commands.registerCommand('fastmd.toggleChecklist', toggleChecklist));
+
+	// alt+c
+	function check() {
+		vscode.window.showInformationMessage('check');
+	}
+	context.subscriptions.push(vscode.commands.registerCommand('fastmd.check', check));
+
 	// ctrl+t
 	function insertTable() {
 		vscode.window.showInformationMessage('table');
@@ -280,7 +285,7 @@ function activate(context) {
 		vscode.window.showInformationMessage('add-row');
 	}
 	context.subscriptions.push(vscode.commands.registerCommand('fastmd.tableAddRow', tableAddRow));
-	
+
 	// ctrl+alt+p
 	function togglePreview() {
 		vscode.window.showInformationMessage('preview');

+ 3 - 2
package.json

@@ -38,8 +38,7 @@
 			{"command": "fastmd.setH5", "key": "ctrl+shift+5", "when": "editorTextFocus && editorLangId == 'markdown'"},
 			{"command": "fastmd.toggleItalic", "key": "ctrl+i", "when": "editorTextFocus && editorLangId == 'markdown'"},
 			{"command": "fastmd.toggleBold", "key": "ctrl+b", "when": "editorTextFocus && editorLangId == 'markdown'"},
-			{"command": "fastmd.toggleCombinedEmphasis", "key": "ctrl+e", "when": "editorTextFocus && editorLangId == 'markdown'"},
-			{"command": "fastmd.toggleStrikethrough", "key": "ctrl+alt+e", "when": "editorTextFocus && editorLangId == 'markdown'"},
+			{"command": "fastmd.toggleStrikethrough", "key": "ctrl+alt+s", "when": "editorTextFocus && editorLangId == 'markdown'"},
 			{"command": "fastmd.toggleLink", "key": "ctrl+l", "when": "editorTextFocus && editorLangId == 'markdown'"},
 			{"command": "fastmd.toggleNumRefLink", "key": "ctrl+num", "when": "editorTextFocus && editorLangId == 'markdown'"},
 			{"command": "fastmd.toggleImageLink", "key": "ctrl+g", "when": "editorTextFocus && editorLangId == 'markdown'"},
@@ -48,6 +47,8 @@
 			{"command": "fastmd.toggleCodeblock", "key": "ctrl+k", "when": "editorTextFocus && editorLangId == 'markdown'"},
 			{"command": "fastmd.toggleUList", "key": "ctrl+u", "when": "editorTextFocus && editorLangId == 'markdown'"},
 			{"command": "fastmd.toggleOList", "key": "ctrl+o", "when": "editorTextFocus && editorLangId == 'markdown'"},
+			{"command": "fastmd.toggleChecklist", "key": "ctrl++", "when": "editorTextFocus && editorLangId == 'markdown'"},
+			{"command": "fastmd.check", "key": "alt+c", "when": "editorTextFocus && editorLangId == 'markdown'"},
 			{"command": "fastmd.insertTable", "key": "ctrl+t", "when": "editorTextFocus && editorLangId == 'markdown'"},
 			{"command": "fastmd.tableAddCol", "key": "ctrl+right", "when": "editorTextFocus && editorLangId == 'markdown'"},
 			{"command": "fastmd.tableAddRow", "key": "ctrl+down", "when": "editorTextFocus && editorLangId == 'markdown'"},