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

When in markdown-mode, I would like to disable smart indent. Instead, when I highlight a block of code and press TAB, I would like the block to be indented one level deeper, like how Sublime does it.

What goes in my ~/.emacs to achieve this?

share|improve this question
Could you show an example of your desired output for those of us who do not use sublime? – terdon Mar 22 '13 at 16:08
up vote 1 down vote accepted

You can use the indent-rigidly command to do this. I would however not recommend disabling markdown-mode's standard TAB binding since it does much more than indenting (for exemple it cycles visibility when point is on a header line)

For example, put this in your initialization file to bind C-TAB to rigid indentation:

(eval-after-load "markdown-mode"
  '(define-key markdown-mode-map (kbd "C-<tab>")
     (lambda ()
       (indent-rigidly (region-beginning) (region-end) 4))))
share|improve this answer

Try: C-u C-x Tab. Should be working in any mode.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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