BetterCommands: Remove Very Broken Newlines
This commit is contained in:
parent
27f647a167
commit
183920dd37
1 changed files with 1 additions and 26 deletions
|
|
@ -15,12 +15,7 @@ const settings = definePluginSettings({
|
|||
description: "Automatically fill command with all arguments instead of just required ones.",
|
||||
type: OptionType.BOOLEAN,
|
||||
default: true,
|
||||
},
|
||||
allowNewlinesInCommands: {
|
||||
description: "Allow newlines in command inputs (CTRL + Shift + Enter)",
|
||||
type: OptionType.BOOLEAN,
|
||||
default: true,
|
||||
}
|
||||
}, a
|
||||
});
|
||||
|
||||
function fetchIndex(target: object) {
|
||||
|
|
@ -48,26 +43,6 @@ export default definePlugin({
|
|||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
find: '"italics"),!0;',
|
||||
predicate: () => settings.store.allowNewlinesInCommands,
|
||||
replacement: [
|
||||
{
|
||||
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 && ${event}.ctrlKey){
|
||||
${event}.preventDefault();
|
||||
${event}.stopPropagation();
|
||||
${insertText}(${editor},'\\n');
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
${orig}`;
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
commands: [
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue