BetterCommands: Do CTRL Shift Enter
This commit is contained in:
parent
344f229f3d
commit
5e70b145ff
1 changed files with 2 additions and 2 deletions
|
|
@ -17,7 +17,7 @@ const settings = definePluginSettings({
|
|||
default: true,
|
||||
},
|
||||
allowNewlinesInCommands: {
|
||||
description: "Allow newlines in command inputs (Shift + Enter)",
|
||||
description: "Allow newlines in command inputs (CTRL + Shift + Enter)",
|
||||
type: OptionType.BOOLEAN,
|
||||
default: true,
|
||||
}
|
||||
|
|
@ -54,7 +54,7 @@ export default definePlugin({
|
|||
match: /case (\i\.\i)\.TAB:if\(null!=(\i).selection&&\i\((\i)(?=.{0,300}(\i\.\i\.insertText))/,
|
||||
replace: (orig, keys, editor, event, insertText) => {
|
||||
return `case ${keys}.ENTER:
|
||||
if(${event}.shiftKey){
|
||||
if(${event}.shiftKey && ${event}.ctrlKey){
|
||||
${event}.preventDefault();
|
||||
${event}.stopPropagation();
|
||||
${insertText}(${editor},'\\n');
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue