EmEditor巨集-強制删除空白
來提供幾個我使用的巨集~ 🫡 像這個強制删除空白就是把檔案的每一行開頭的空白給全部刪除掉 🏎️
// 來源網址
// https://www.emeditor.com/forums/topic/remove-empty-characters/
// https://www.emeditor.com/forums/topic/how-to-delete-empty-lines-by-macro/
// Delete all blank lines in the active document1(JavaScript for EmEditor)
//---Begin Macro---
document.selection.StartOfDocument (false);
Window.Redraw = false;
// remove trailing blanks (whitespaces, tabs ecc.) & their combos
document.selection.Replace ("([[:blank:]]){2,}", "", eeFindNext | eeFindReplaceRegExp | eeReplaceAll);
document.selection.Replace ("^[[:blank:]]", "", eeFindNext | eeFindReplaceRegExp | eeReplaceAll);
document.selection.Replace ("[[:blank:]]$", "", eeFindNext | eeFindReplaceRegExp | eeReplaceAll);
Window.Redraw = true;
editor.ExecuteCommandByID(4099);
//---End Macro---
