As a long time Vim user, I have the following config in my ~/.vimrc
to ensure I never ever enter an evil tab character into my source code.
set shiftwidth=2
set tabstop=2
set smarttab
set et
For my Android projects, I’m starting to use Eclipse, and unfortunately eternally banishing all tabs in Eclipse is not such an easy task. Here’s where I’m at so far, YMMV and I’ll update this as I find more. It seems the tab boss is difficult to kill in this app.
- Under Window -> Preferences -> General -> Editors -> Text Editors ensure Insert spaces for tabs is checked.
- Under Window -> Preferences -> Java -> Code Style -> Formatter create a new profile based off the default, and under the Indentation tab set Tab policy to to Spaces only.