Catalin Copil
Catalin Copil

Reputation: 43

How to convert spaces in tabs in Netbeans 8.2?

Some IDEs and Text Editors write spaces instead of TABs.

  1. Is there a way to convert these spaces into TABs when I import a project or some files in Netbeans 8.2 ?
  2. Is there a way to convert spaces into TABs for a Netbeans current project?

I also saw this answer about the Editor settings but it doesn't solve my problem.

Maybe this feature it has always been missing?

If you don't know how to solve this issue using NetBeans, other solutions are welcome.

(Please upvote if you consider this answer relevant :) )

Upvotes: 4

Views: 1264

Answers (1)

Cris70
Cris70

Reputation: 339

When you uncheck "Expand Tabs to Spaces" (see this answer) you can then use Code -> Format (or SHIFT-ALT-F) to convert your spaces to tabs. See here for more information.

The prolem with this approach is that it also applies other formatting to your code, that you may not want (that is my case).

Upvotes: 2

Related Questions