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?
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?
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))))