BetterCommands: Do CTRL Shift Enter

This commit is contained in:
thororen1234 2026-01-17 12:28:02 -05:00
parent 344f229f3d
commit 5e70b145ff
No known key found for this signature in database

View file

@ -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');