I decided that I was ready to try something new, after a few years of using gEdit for most of my coding needs, and try to learn using Emacs. I knew this would be difficult,
You can do this with something like the following:
(add-hook 'text-mode-hook (lambda ()
(set (make-local-variable 'indent-region-function)
(lambda (s e)
(indent-rigidly s e tab-width)))))
Then selecting a region and hitting TAB
. will indent the region by a tab-width. You can then exchange point and mark with C-x C-x
and hit TAB
again to repeat.
I do, however, agree with the previous answers that suggest using indent-rigidly
directly.