How to change TAB key behavior to indent the whole line even if pressed in the middle of a line?


#1

When I press TAB key while the cursor is in the middle of a line, it inserts tab/space characters instead of indenting the whole line. Key binding resolver show that pressing TAB key there invokes editor:indent command. How can I change it, so that it will indent the whole line instead?


#2

That seems a bit weird to me. Isn’t tab always inserting a tab wherever you are, as one would expect?
I wouldn’t want to indent the whole line if my cursor isn’t before the first character of that line.

But if you do, you probably want editor:indent-selected-rows:


#3

This is actually common behavior on Emacs and part of the reason I created the emacs-flow package though I never quite got it working like I wanted it to. Once you get used to the behavior, it becomes very useful … kind of like Cmd+Enter allowing you to create a newline from anywhere in a line.


#4

I feel so uneducated in the ways of the Mac.


#5

Emacs is an editor that predates the Mac by about a decade … :grinning:


#6

You can’t fool me! It’s Apple sorcery.


#7

It’s not a sorcerer, it’s a saint! Saint IGNUcius!

Also see: https://stallman.org/saint.html


#8

See, I don’t even get that reference. :confused:
That’s how alien your world is to me.