Viewing 3 posts - 1 through 3 (of 3 total)
- AuthorPosts
- December 23, 2011 at 11:09 pm #9867
user
Participanthello!
I would like with one click to:
1) automatically replace all two or more spaces with one space, two or more tabs with one tab
2) automatically delete spaces and tabs at the begining or end of linesany help?
thanks!
December 24, 2011 at 5:23 pm #9869Cirillo
ParticipantHello user!
You may want to use the following .jsee macro
//---Begin Macro---
Window.Redraw = false;
// remove trailing blanks (whitespaces, tabs ecc.) & their combos
document.selection.Replace ("([[:blank:]]){2,}", "1", eeFindReplaceRegExp | eeFindAround | eeReplaceAll | eeFindReplaceQuiet);
// remove StartOfLine blanks
document.selection.Replace ("^[[:blank:]]", "", eeFindReplaceRegExp | eeFindAround | eeReplaceAll | eeFindReplaceQuiet);
// remove EndOfLine blanks
document.selection.Replace ("[[:blank:]]$", "", eeFindReplaceRegExp | eeFindAround | eeReplaceAll | eeFindReplaceQuiet);
document.selection.StartOfDocument (false);
document.HighlightFind = false;
Window.Redraw = true;
//---End Macro---Hope this will help.
March 17, 2012 at 9:34 pm #10198ldm
ParticipantHow is it possible to remove empty/blank lines in the end of the file (or to leave just one empty/blank line)?
Thank you! - AuthorPosts
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.