I code primarily in jQuery/JavaScript, and I'm looking for a text editor for Linux that has auto-indent and auto-outdent (seems to be tough to find that). Any suggestions? I've checked Gedit, Cream, vim, Bluefish. None of them seem to have this feature.

link|improve this question

77% accept rate
feedback

2 Answers

up vote 1 down vote accepted

Geany has auto-outdent on close brace.

link|improve this answer
Whoa, love it! Really nice editor, great features too. Thanks! – CaptSaltyJack Apr 22 '11 at 17:52
feedback

As far as I know, Vim does indent your code (and it also has a "smartindent" feature which might be equivalent to auto-outdenting. I've never tried it myself but you can do this in your ~/.vimrc

set autoindent
set smartindent

If not, Vim has hundreds of plugins which might get that accomplished.

link|improve this answer
Cool! Now, can I get Cream to use smartindent as well? Cream doesn't seem to do the auto-outdent – CaptSaltyJack Apr 22 '11 at 17:45
According to this: cream.sourceforge.net/faq.html Cream should be picking up on the ~/.vimrc file automatically. Unless, you've turned it off. Try going through your preferences and taking a look as I'm not 100% sure of this :) – MaxMackie Apr 22 '11 at 17:50
2  
Nowadays Vim does in- and outdenting with indentation rules defined for every file type. These indent files can be found in $VIMRUNTIME/indent/<ft>.vim. To make it work, you have to place filetype indent on in your vimrc. I'd guess Cream has that already in place, though. (See :help filetype-indent-on.) – user112553 Apr 22 '11 at 17:54
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.