howl-editor / howl

The Howl Editor
http://howl.io
Other
712 stars 68 forks source link

Shouldn't shift+tab unindent? #393

Closed imaia closed 6 years ago

imaia commented 6 years ago

TAB indents in most (all?) modern visual editors. Shift+Tab unindents. What if howl could keep this behavior? I believe learn curve should be small, whenever possible.

refi64 commented 6 years ago

Shift indents in most (all?) modern visual editors.

It does? Do you have an example?

imaia commented 6 years ago

I'm sorry. Mistype.

ghost commented 6 years ago

Shift+Tab seems to unindent just fine for me in v0.5.2 for both single lines and multiline selections irrespective of mode.

imaia commented 6 years ago

@stutonk if there is no text highlighted, it still unindents?

ghost commented 6 years ago

@imaia Yes, shift+tab unindents for me with no selection so long as the cursor is at the beginning of the text on a line or at the beginning of the line. If it's elsewhere in the line, shift+tab successively moves the cursor backward by the tabwidth until it's in a position that will unindent the line. I've tried it on a few random modes including none, rust, markdown, and lua. In my keymap.moon, shift+tab is set to 'editor-smart-back-tab'. It also seems to work fine for both left and right shift keys. Does shift+tab simply do nothing for you?

imaia commented 6 years ago

Actually, the behavior is just as you described. It unindents if in the beginning of the line, moves the cursor there otherwise. If text is highlighted, it unindents normally. I did not know about this "cursor at the beginning of the line" behavior. Now it makes more sense.

That seems reasonable behavior. I'll close the issue.