Skip to main content

Return shortcut to escape formatting environment

Comments

4 comments

  • Fletcher Penney

    I'm not sure about the keystroke causing u+0080 -- that is apparently created by macOS.  I'm not messing with it.  ;)

     

    As for the original suggestion -- you can already do that by just hitting return again.  All (to my knowledge) of the automatic formatting applied with return functions is escaped by one "level" when you hit return again without adding anything else.  This is true with indents, lists, tables, etc.  One advantage of this is that you can quickly outdent by a one (or more) level(s) in a nested list.

    0
  • AmberV
    There are cases where the successive-return method doesn't work as well---like you say it works as an outdent tool (which doubles as cancellation for simple environments), but by that very token it doesn't work as well as a full cancellation tool in a swift and consistent form. Escaping out of a four level deep list for example takes five return key hits to get all the way out, so you're having to react to the software in real time rather than just issuing a single command and having the software react to you. Given that, as a global "I want nothing" action, `↩ + ⌘delete` is more consistently effective from those grounds.
     
    So that's what I think this common approach is striving toward: something predictable and simple to execute, in that it uses a key we already use heavily for the same basic purpose. `⌥↩` also fits in with the natural notion of altering the base command to an optional/alternative outcome.

     

    0
  • AmberV

    Oh! Something I forgot to add here, but another common convention among text editors is that this type of command also be something that moves to a new line no matter where the cursor position is on the current line. Where regular Return would split the line into two, a modified return would create a new line (with no attachments) below the current one without disturbing the original line.

    Very useful if you get used to having it; the kind of thing that becomes second nature as just don't have to worry about little things like where the cursor is.

    0
  • AmberV

    Another scenario where ignoring the auto-correction/etc. engine is useful, is when you want to have what is on the current line left alone. There are some conditions where when you press Return, the editor cleans up what was on the previous line before moving you to the next. This is in fact one of the things you mentioned as a better way to do this---to press return on a line with nothing but a bullet to escape the environment.

    But what is what you really want is to leave the empty bullet line alone and move to an empty line below it? To be fair, in that specific case there isn't much utility to wanting to do that, but here is for example is how I like to format quotes:

    ```
    > > Nested quotation paragraph
    >
    > Paragraph one...
    >
    > Paragraph two...
    ```

    And, as far as I understand it, this method produces a better, more semantically cohesive result than leaving empty lines between the quoted marked lines. One ends up with a sequence of discrete blockquote environments rather than a single block quote with one nested blockquote and two separate paragraphs all within the single container.

    With a key to override all applicable return behaviours and simply insert a newline, one could much more simply compose an extended quotation like the above.

    To reiterate, it is less about specific scenarios where it would be useful to use, because although they are not common, they are very diverse, and once you can do it, it becomes more common to make use of such a capability, as a fluid and intuitive way of escaping any environment behaviour the cursor position would currently trigger, from wherever the cursor is within the line.

    0

Please sign in to leave a comment.

Powered by Zendesk