Ah c'mon, let's hijack this group for another battle in the viemacs religious war.
Glad to have helped, even if it was for an infidel. :)
-Les
On 2014-04-25 16:45, chirp.cordless@xoxy.net wrote:
On Apr 25, 2014, at 3:50 PM, Les Niles - les@2pi.org chirp.cordless.8d3c9f1ae8.les#2pi.org@ob.0sg.net wrote:
Just use emacs' python mode (usually the default when editing .py files). It will keep you out of trouble, consistently writing out only spaces so you don't need to look at the white space. You can use the tab key to indent, but it will actually just insert the appropriate number of spaces.
I've been using vi for almost 35 years, so I'm not likely to switch now. Of course, nowadays on my Mac that means vim, and I've been a bit slow bothering to harness it's extensibility vice vi, just grateful I didn't have to relearn everything.
But your suggestion of an emacs Python mode woke me up, and google to the rescue, there's a vim Python mode. A number of discussions, I ended up mostly following this one: http://henry.precheur.org/vim/python
Bottom line, put some appropriate vim commands in a file ~/.vim/ftplugin/python.vim and add this to ~/.vimrc: to enable the plugin filetype plugin indent on
Now automagically when editing Python files my tabs are expanded to 4 spaces, but unchanged in C files. Cool. I may still play with some of the other autoindent stuff, but the big deal of invisible tabs is solved, I think.
Thanks for the indirect suggestion,
-dan