IDE - Divergence between IDEs in relation to tab [ao Enter]

8

For reasons of hadware , I am the only one on my team who is using Sublime Text 3, the others are using Eclipse Luna or Mars, so far nothing.

However since the exchange I have had some problems in the commit part, because my files started to have divergences in several lines, and when I check what it is, it's just the tab spacing.

I have already checked the question of tab-size , both are with 4, and encoding both are with UTF-8 .

Would there be any other configuration that could cause this divergence?

I think that if it were the case of encode should not cause error in the spacing of the entire file instead of just a few fragments?

Issue

I was checking the commits again so I found the option, ShowWhiteSpace Characters in eclipse.

And in the line where the errors are occurring has this peculiarity:

As you can see at the end of the line there is ¤ , does anyone know what character this is? and what is it for? it is set when I give enter in eclipse.

    
asked by anonymous 19.08.2015 / 21:09

3 answers

3

This divergence occurs in the excerpts you edit from the file in the Sublime ?

In eclipse there is a setting to remove that whiteSpace . You go in Preference -> [linguagem, por exemplo JAVA] -> Editor -> Save Action , check check Perform the selected actions on save , then Additional actions . Then click on Configure... and on the Code Organizing tab check the Remove trailing whitespace option.

In addition you can configure to display these characters. Just go in Preference -> General -> Editors -> Text Editors and in option Show whitespace character (must be checked) has a configure visibility link. Clicking will open a screen for you to mark the characters you want to see in different positions in the code. For space (or whatever you want) check the trailing option. Restart eclipse and make sure the problem continues.

    
22.08.2015 / 12:47
3

You can configure your editor to use the tab pattern, the default options used by the editor by going to the Sublime Text > Preferences > Settings - Default menu. All of these options can be customized through the Settings - User menu.

{"translate_tabs_to_spaces": false}: converte espaços em tab.
    
19.08.2015 / 21:18
2

Just use: link

Simply set up a .editorconfig file at the root of your project, install the plugin for your IDE, and you're done! all will have the same configuration.

    
22.08.2015 / 23:33