alt + shift + f = format

Yes, I recently started using VSCode
pull/8/head
Haoming 2024-03-23 20:27:52 +08:00
parent 960cf6b981
commit e99bb8d025
1 changed files with 7 additions and 0 deletions

View File

@ -182,6 +182,13 @@ onUiLoaded(async () => {
var removeUnderscore = LeFormatter.defaultRemoveUnderscore();
const refresh = LeFormatter.shouldRefresh();
document.addEventListener('keydown', (e) => {
if (e.altKey && e.shiftKey && e.code === 'KeyF') {
e.preventDefault();
promptFields.forEach((field) => LeFormatter.formatPipeline(field, dedupe, removeUnderscore, true));
}
});
const manualBtn = LeFormatter.button({
onClick: () => {
promptFields.forEach((field) => LeFormatter.formatPipeline(field, dedupe, removeUnderscore, true));