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?

mcandre
  • 3,098

2 Answers2

2

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

Adobe
  • 3,000
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))))