首頁 / 軟硬通吃 / EmEditor巨集-強制删除空白

EmEditor巨集-強制删除空白

來提供幾個我使用的巨集~ (:cc)
像這個強制删除空白就是把檔案的每一行開頭的空白給全部刪除掉 🖕

// 來源網址
// 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---

Comments

comments

關於 窮苦人家的小孩

In every democracy, the people get the government they deserve. ~Alexis de Tocqueville
上一篇:
下一篇:

您可能會喜歡

記憶卡/隨身碟/硬碟效能測試 (CrystalDiskMark)

測試工具:CrystalDis …

發佈留言