pulse00 / Twig-Eclipse-Plugin

Eclipse plugin for the twig templating language.
twig.dubture.com
MIT License
107 stars 24 forks source link

Indentation settings : using space instead of tabs #68

Closed antoinegomez closed 2 years ago

antoinegomez commented 12 years ago

How is it possible to switch the indentation settings ?

Using Aptana, in the preferences I specified to use spaces for indentation, no config option for that in Twig editor.

marcospassos commented 11 years ago

@pulse00 Is possible add the indentation width option? That makes a big difference for us (we used 2 spaces for HTML indenting).

pulse00 commented 11 years ago

@antoinegomez @marcospassos The Twig Editor is based on the PHP ScriptEditor, this means that if you want to change indentation size or tabs/spaces for indentation, you can change it in Preferences -> PHP -> Code Style -> Formatter

Unfortunately it's not possible currently to have different indentation in twig templates and PHP files.

julkue commented 10 years ago

That should be added asap in my opinion. Twig templates are not the same as PHP files, it's printing HTML so it should use the settings for HTML.

francis-roux-serret commented 10 years ago

I agree with that, it's a mandatory change.

rudzboy commented 9 years ago

+1

pounard commented 7 years ago

For what it worth, I am using a PHP codestyle with 2 as indentation, but twig remains with 4 spaces

spantaleev commented 6 years ago

For some reason, this plugin always indents using spaces for me, even though Preferences -> PHP -> Code Style -> Formatter says Tab policy: Tab.

At first, I thought that it might be ignoring the Tab policy: Tab setting and always using spaces (as specified in Tab size). However, changing Tab size doesn't affect the plugin.

.. so it seems like the plugin always uses 4 spaces and there's no way around that, unfortunately.

zulus commented 5 years ago

currently twig should use html editor settings, not php