Re: Alternative to reducing indentation

Vince's Avatar

Vince

05 Sep, 2017 07:08 PM

While it's great (really!) that you did this (allowed shift-tab to unindent), you realize that's just the balance to the request I made for tab to indent that you shot down? :) (Both were implied in my request; I didn't bother with shift-tab since you shot down tab. So kudos to Shane, although he has the benefit of having used MMD prior to 4.x.)

That seems to me to be inconsistent. I would really, really love it to be consistent, but consistent in that tab can now indent, not consistent in changing your mind about shift-tab.

:) (That's a happy face because I'm smiling, but I'm serious about the request. Again.)

  1. Support Staff 1 Posted by Fletcher on 05 Sep, 2017 07:33 PM

    Fletcher's Avatar

    The problem is that the tab key is used to insert tabs ('\t') anywhere in a line (e.g. at the end of each cell in a table, or between key and value in metadata). There is no way to determine whether a user wants to indent or insert a tab in an arbitrary position in the line. Mapping the tab key to the indent\shiftRight function would prohibit inserting \t characters.

    However, there is no character inserted when "shift-tab" is used. So there is nothing in need of disambiguation, and nothing broken when shift-tab is mapped to deindent\shiftLeft.

    If one is at the beginning of the line, hitting the tab key inserts \t which also has the effect of indenting. Shift-tab allows you to easily undo this (and as Shane pointed out was in previous versions of Composer, but I neglected to put it in this one).

    If one really wants to use tab/shift-tab to move lines around, then you can use Cmd-left arrow first (moving the insertion point to the beginning of the line). Then tab will indent and shift-tab will indent. But the same is not true at other positions in the line.

    One should note that Composer does interpret tab as indent in a few specific situations, such as immediately after hitting enter in a list when automatic list formatting is enabled.

    To recap:

    • Cmd-ctrl can be paired with any of the arrow keys to move text
    • Cmd-[ and Cmd-] can shift text left, right
    • Tab at the beginning of a line inserts \t which is the same as indenting
    • Shift-Tab anywhere in a line deindents it one step
    • Tab after hitting enter in a list will indent the list item
  2. Fletcher closed this discussion on 05 Sep, 2017 07:33 PM.

  3. Vince Rice re-opened this discussion on 05 Sep, 2017 07:40 PM

  4. 2 Posted by Vince Rice on 05 Sep, 2017 07:40 PM

    Vince Rice's Avatar

    There is, and I apologize for probably leaving out something obvious (again, standard across editors, I don't think about the "obvious" things).
    The "tab to indent" only works if more than one line of text is highlighted, and if more than one line of text is highlighted, then tab indents, it doesn't insert. (Provided there's an option, and provided the option is checked.) So there's no need for disambiguation — it's completely unambiguous (when option checked). Lines selected, tab indents. No lines selected, tab inserts as per normal.

    And thanks for the thorough explanation, but I've actually discovered all of those things as I've been using it. :)

  5. 3 Posted by Vince Rice on 05 Sep, 2017 07:45 PM

    Vince Rice's Avatar

    And I just realized this also might not be obvious — the same is true for shift-tab. Shift-tab normally (as in other editors) only works on selected lines as well. It's the only way for either of them to know how much to indent/unindent.

    If Iwehave five level 3 bullets and we decide we want two of them to be at level 4, we would just highlight two of them and tab. If we wanted to do the reverse, i.e. move two of those level 3's to level 2, we would again highlight the two of them and shift-tab. The tab/shift-tab are operating on what we have selected, and only on what we have selected.

    > On Sep 5, 2017, at 2:40 PM, Vince Rice <[email blocked]> wrote:
    >
    > There is, and I apologize for probably leaving out something obvious (again, standard across editors, I don't think about the "obvious" things).
    > The "tab to indent" only works if more than one line of text is highlighted, and if more than one line of text is highlighted, then tab indents, it doesn't insert. (Provided there's an option, and provided the option is checked.) So there's no need for disambiguation — it's completely unambiguous (when option checked). Lines selected, tab indents. No lines selected, tab inserts as per normal.
    >
    > And thanks for the thorough explanation, but I've actually discovered all of those things as I've been using it. :)
    >
    >
    >> On Sep 5, 2017, at 2:33 PM, Fletcher <[email blocked] <mailto:[email blocked]>> wrote:
    >>

  6. Support Staff 4 Posted by Fletcher on 05 Sep, 2017 08:01 PM

    Fletcher's Avatar

    I frequently select text and hit tab in order to replace something with
    a `\t`. I would be frustrated if something else happened.

    I don't think there is a shortage of ways to indent/deindent text in
    Composer.

    (I did look to see if the Tab key could be mapped to the menu commands,
    and it doesn't look like System preferences allow that, though perhaps
    other third party apps might??)

  7. 5 Posted by Vince Rice on 05 Sep, 2017 08:21 PM

    Vince Rice's Avatar

    First, I've only ever talked about an option (for MMD), not universal behavior. If you don't want the behavior, don't use it.
    Second, really, you're selecting five lines of text and wanting to replace them with a tab? That's … fascinating.

    The issue isn't a shortage of ways. The issue is that the standard way doesn't work. I am constantly highlighting things and overwriting them with a tab in MMD, which I then have to undo and remember the right key. It is a real pain to have to remember not to do that in this one app, when all of the other editors I use work that way. You can talk your brain into a new way of doing things, but only when you're doing that new way everywhere. Forcing it to remember not to do that in one out of a half-dozen places is a whole lot harder.

    No, if it's an option, it's not on a menu, it's a preference option. (BBEdit, e.g. has "Allow tab key to indent blocks" as a Preference option.)

    I'll shut up now. I only had the temerity to bring it up again because of the Shift-Tab — I've seen the rare editor that doesn't do this (if Textmate supports it, I never figured out how, one of the many reasons I don't use Textmate), but I've never seen one support one of the keys and not the other (for indenting).

  8. Support Staff 6 Posted by Fletcher on 06 Sep, 2017 12:41 AM

    Fletcher's Avatar

    Ok. Because:

    1) I'm tired of hearing about the tab key

    and

    2) I appreciate your helping me track down some hard to find bugs

    There is a preference for this in the next build.

    Merry Christmas.

    ;)

  9. Fletcher closed this discussion on 06 Sep, 2017 12:41 AM.

  10. Vince Rice re-opened this discussion on 06 Sep, 2017 02:27 AM

  11. 7 Posted by Vince Rice on 06 Sep, 2017 02:27 AM

    Vince Rice's Avatar

    Might be my favorite Christmas present already! :) Thank you very much!

  12. Fletcher closed this discussion on 06 Sep, 2017 10:13 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac