Menu

#2048 New Function Request: Trim Tailing Spaces

closed-invalid
nobody
5
2004-03-22
2004-03-22
Anonymous
No

Hi,

I just wonder if jedit can implement a method that
delete all spaces and tabs after the last word on every
line.

Discussion

  • Marcelo Vanzin

    Marcelo Vanzin - 2004-03-22

    Logged In: YES
    user_id=75113

    Edit -> Indent -> Remove trailing whitespace

    Why is it under "Indent" is beyond me.

     
  • Marcelo Vanzin

    Marcelo Vanzin - 2004-03-22
    • status: open --> closed-invalid
     
  • Skeeve

    Skeeve - 2004-04-01

    Logged In: YES
    user_id=864970

    Use this macro to achieve what you want:

    SearchAndReplace.setSearchString("[\\t ]+$");
    SearchAndReplace.setReplaceString("");
    SearchAndReplace.setBeanShellReplace(false);
    SearchAndReplace.setIgnoreCase(false);
    SearchAndReplace.setRegexp(true);
    SearchAndReplace.setSearchFileSet(new CurrentBufferSet());
    SearchAndReplace.replaceAll(view);

     

Log in to post a comment.