I noticed that when in fundamental-mode
or prog-mode
(basically any mode without an indent-line-function
) the TAB
key will jump between columns. For example if I have
foo bar baz
fot bat|
with the cursor at the |
and I hit TAB
it will move my cursor to align with baz
.
foo bar baz
fot bat |
This is really nice when doing something like adding ports to a port list in Verilog. However in verilog-mode
(and every other programming major mode I have tested) hitting TAB
will just indent the line.
My question is, what is this fundamental-mode
mechanism called and how can I add it to another major mode?
<tab>
key is bound to infundamental-mode
, usingC-h k
.indent-for-tab-command
in both cases