TOC and and text navigation

medienmeister's Avatar

medienmeister

19 Oct, 2017 08:38 AM

The TOC sidebar on the left is a nice addition. What I'm missing is a way to use it for text navigation without the mouse. My desired workflow would look like this:

1. Toggle TOC (cmd+shift+T)
2. Type ahead some characters of a header or use arrow keys to jump around in the text
3. Hit return (or some other key) to move the cursor to the new location

Currently #3 is not possible (#2 also requires an extra key stroke to give the TOC the focus). I can select or double click the entries in the TOC and it will scroll the editor window to that position but it won't move the cursor. Every time I toggle (hide) the TOC again I'm thrown back to the last edited position. That might be the expected behavior for some but I doubt it. The TOC would be much more helpful if it would allow "moving the cursor around". (I know I can use the mouse to click in the editor window once it has scrolled to the right position but for a text driven app a keyboard alternative would be convenient).

Am I missing something - or is everybody else fine with the current TOC behavior? In that case I'd not insist on changing it.

Thanks for the otherwise great update,
Roland

  1. Support Staff 1 Posted by Fletcher on 19 Oct, 2017 12:27 PM

    Fletcher's Avatar

    I assume you are aware of the Cmd-1, Cmd-2, Cmd-3 options.

    I've not had anyone else request that moving in the TOC change the
    insertion point.

    I'm not opposed to thinking about it, but it seems that there are a
    couple of issues to consider:

    1. I often use the TOC to examine another part of a document with the
    expectation of returning to the previous section to resume typing (e.g.
    to look something up from another section). Changing as you suggest
    would potentially break this.

    2. It's not immediately clear to me where the cursor should go. Before
    the title of the section? Before the first line of content within the
    section? Usually when I am navigating the TOC, the area of interest is
    an arbitrary paragraph within the section (that may even be off-screen
    by default requiring me to scroll with the mouse in any case.) Since I
    am going to use the mouse regardless, I don't usually notice that as
    being an unnecessary step.

    3. When navigating with the TOC, the section of interest is scrolled on
    screen so that it is in the middle, unless there is insufficient room,
    in which case it starts at the top. If typewriter mode is enabled, then
    any place the cursor ends up is going to cause the screen to jump.

    What are your thoughts?

    F-

  2. 2 Posted by medienmeister on 19 Oct, 2017 05:44 PM

    medienmeister's Avatar

    Hello Fletcher,

    thanks for your thoughtful reply. Maybe it is really just me. Here are some thoughts:

    ad 1.: I can see the decisions behind the current behavior. Maybe I'm just customized to the "navigation perspective". BBEdit is an example for "my" behavior. It has a function menu that moves the cursor around in markdown documents (it sets the current selection to the headline). FoldingText is another example (it moves the curser at the end of the headline). I think, the current behavior does not have to change. It would be enough to have another keyboard short cut (something like cmd+alt+2) that switches back to the editor taking the cursor to the top of the current visible area.

    ad 2. This is just my preference - but the beginning of the selected headline would be a good guess for me. As long as it is consistent I don't think that ist too important.

    As said in the OP: if I'm really the only person asking for this, the oddness is clearly on my side. Please don't put too much thoughts into it if the audience is just one (I guess I'll construct a macro with Keyboard Maestro that simulates clicking with the

  3. 3 Posted by Vince on 21 Oct, 2017 08:31 PM

    Vince's Avatar

    I think I agree that moving in the TOC shouldn't automatically move the cursor. But maybe a special key while on a TOC entry could do so? Cmd-Enter or Ctrl-Enter or somesuch that isn't used elsewhere, or could only have meaning while TOC has focus?

    To Fletcher's points:
    2. I agree with Roland, if this is done, it should be at the beginning of the headline.

    1. I'm already on record as not liking anything about how this works. :) Positioning should be exact; if we click on a TOC entry, what we click on should be in a fixed, known location.

    I would add:
    If we use the keyboard (Cmd-2) to move focus back to the document from the TOC, the document display should switch to where the cursor is. If we click in the document to move the focus, then it should obviously go where clicked. But if we Cmd-2 to move the focus, then the display should move to where the cursor is, otherwise freezing the cursor doesn't make any sense.

  4. Support Staff 4 Posted by Fletcher on 31 Oct, 2017 08:24 PM

    Fletcher's Avatar

    The next version will offer two different methods:

    1. Cmd-2 will switch back to the editor and scroll to current cursor position.

    2. Hitting return in the TOC will move the cursor to the beginning of the header and move focus to the editor at the new position.

  5. Fletcher closed this discussion on 31 Oct, 2017 08:24 PM.

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