// DeleteEmptyLines Ver: 1.0 // Author: chengzi (Tiancheng Yu) // Last Update: 2016/10/7 // A Macro that deletes all empty lines in your current file. // Note: Will clear all your current bookmarks of the file. document.selection.ClearBookMark(); nFound = document.selection.Find("^$",eeFindPrevious | eeFindReplaceRegExp | eeFindBookmark,0); editor.ExecuteCommandByID(4589); if (nFound != 0 && document.getLine(document.getLines()) == "") { document.selection.EndOfDocument(); document.selection.DeleteLeft(1); } if (nFound != 0) { document.selection.EndOfDocument(); }