Reputation: 25
Whenever I commit my code on bitbucket, My Tab-space indentation do not match with other Devlopers, Though Netbeans showing it with proper indentation. Is this problem of Netbeans tab setting or bitbucket? Is there any way we can provide Tab setting to change as per pulled file Tab setting?
Upvotes: 1
Views: 1029
Reputation: 25350
This probably because you are using Tabs and the others expand those to spaces. The size of a tab differs somewhere between 2 and 8 spaces and this destroys any formatting.
Just set the option to expand Tabs to spaces and the problem is solved. You can use your IDE as usual, but the file will contain fixed spaces (eg. 4 spaces) instead of a hard tab ("\t").
To do this:
Tools --> Options
and go to Editor -> Formatting
You can check this by enabling View --> Show Non-Printable Characters
. This should show bullets if spaces are used but some kind of arrow for Tabs.
Upvotes: 1