Can NetBeans remove trailing whitespace and change tabs to spaces on save?

后端 未结 5 2119
渐次进展
渐次进展 2021-02-01 00:49

I just started to use NetBeans, and am trying to work out how to:

  1. Make it so that trailing whitespace is removed on save. I know that you can invoke it manually

5条回答
  •  星月不相逢
    2021-02-01 01:16

    For the first question, NetBeans 7.0+ has now a built-in solution. You can find it in:

    On NetBeans 7:

    Tools > Options > Editor > General > When saving files > Remove Trailing Whitespace: Never / Always / For Modified Lines Only

    On NetBeans 8 / 9:

    Tools > Options > Editor > On Save > Remove Trailing Whitespace From: None / All Lines / Modified Lines Only

提交回复
热议问题