Cut trailing spaces?

  • I would need that feature to.
    But I think it should be switchable with an option and default to off.

    If this feature will not make it into the normal Notepad++, could someone please give me a hint where to add that function for myself? I think it should go to dosave() ?

    • Don HO
      Don HO

      It's already done in the feature release v3.0.
      However, it won't be executed automatically when you save file.

      If you want to have the feature like that, you have to add this method into dosave(). An alternative way is define your macro to do it.


  • Many thanks to you Don! Under Windows notepad++ is my favorite editor :)

    I'm looking forward to 3.0

    <same Nobody as the previous post ;)>

  • In any case, a Search/Replace...

    Find what: [ \t]+$
    Replace with: (blank)

    ... with "regular expression" checked, would remove any trailing whitespace (spaces and tabs).

  • Hi Don,

    Can you implement it as an option in Preference dialog. I think there are many people who hate those trailing space! :)

    Thanks a lot.

    • If you do so, please cut trailing tabs as well.

      An option (has not to be default) to do this automatically before saving would be a great help, definitely. I just came from TextPad and this missing option drives me crazy.


  • It's possible to set shortcut ctrl+s to "trim and save" macro. But there's one annoying problem: when I use this shortcut and there is any symbol after cursor, that symbol is indenting by tabs. I hate this! Plz fix