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

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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, bwDraco, fixer1234, mdpc, random Feb 2 '15 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, bwDraco, fixer1234, mdpc, random
If this question can be reworded to fit the rules in the help center, please edit the question.

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.) – peth Apr 22 '11 at 17:54

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