Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question

closed as off-topic by Nifle, DragonLord, fixer1234, mdpc, random Feb 2 at 4:01

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions seeking product, service, or learning material recommendations are off-topic because they become outdated quickly and attract opinion-based answers. Instead, describe your situation and the specific problem you're trying to solve. Share your research. Here are a few suggestions on how to properly ask this type of question." – Nifle, DragonLord, fixer1234, mdpc, random
If this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers 2

up vote 1 down vote accepted

Geany has auto-outdent on close brace.

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

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.

share|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 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 :) –  n0pe Apr 22 '11 at 17:50
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

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