Currently pressing TAB in evil insert mode, runs indent-for-tab-command
I'm not sure of the exact details, but from what I can tell this is performing some kind of re-indentation, which does nothing if emacs consideres the text already indented.
I would like this to behave (like vim) where.
- When tabs are enabled a
\t
is inserted *. - When tabs are disabled, insert n spaces, aligning to the
tab-width
.
Is this possible?
* by tabs enabled I mean (setq indent-tabs-mode t)
.
indent-relative
and this makes for less tab key usage if it's configured properly. You can do the same by overriding the indentation function for modes that don't behave.=
operator for that.Why not embrace Emacs and its smart indentation?
- when working on larger projects not everyone uses Emacs. There might be external formatting utilities such as clang format, yet - that can be disabled for blocks of code too... in short, sometimes I just want to insert tab aligned indentation without relying on Emacs to do what I want.