Using Hard Tabs

  • UnTom

    UnTom - 2006-08-16

    Hi there!
    I'm using the PyDev 1.2.2 on Eclipse 3.2 to do some Python-Developing. PyDev seems to work just fine, except for one really anoying thing: I seem to be unable to use "Hard Tabs" (as opposed to spaces-as-tabs) in my files. Whenever I press the TAB-key, 4 Spaces are automatically inserted in the editor. I looked through all the Preferences in Window->Preferences, but I couldn't find the setting anywhere. Of course my Java-Formatter is set to use Tabs rather then spaces, but PyDev doesn't seem to be using the same formatter-settings anyway.
    Since the Coding-Style-Guides I use dictate the use of hard tabs this is very annoying. I have to use the Ctrl+Shift+Tab Hotkey to change all the Spaces to tabs every time befor saving, and this is really starting to get on my nerves. Do I simply overlook the setting where i can set PyDev to use hard tabs? If there isn't such a setting: is there any config-file I can dig into to change the behaviour of PyDev? (Simply accepting to use spaces rather than tabs isn't an option)

    • Fabio Zadrozny

      Fabio Zadrozny - 2006-08-16

      It's in the preferences:
      window > preferences > Pydev (option: replace tabs with spaces when typing).



      • MattMc3

        MattMc3 - 2006-12-12

        Even with this setting changed, if I select text and hit tab or shift+tab to indent or dedent, I get spaces instead of tabs.  Is there a way to fix that?

        • Fabio Zadrozny

          Fabio Zadrozny - 2006-12-12

          I can't reproduce your behavior here -- with that setting I only get tabs... which version are you using? Can you post an example on how to reproduce it?

    • UnTom

      UnTom - 2006-08-17

      now i feel really stupid for not having found that one on my own.... sorry ;)


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks