1

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?

1
  • Could you show an example of your desired output for those of us who do not use sublime?
    – terdon
    Mar 22, 2013 at 16:08

2 Answers 2

1

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 ()
       (interactive)
       (indent-rigidly (region-beginning) (region-end) 4))))
2

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .