#150 open
Christopher Stevenson

'Command+a' to Incrementally selects levels of text

Reported by Christopher Stevenson | January 5th, 2011 @ 11:49 AM

I'm not sure where I've used this before but pressing 'command+a' would first select the word, then the line, then the paragraph then the whole document.

Textmate currently uses different shortcuts for each level of text (word, line, scope, document) which is too fussy to use and it's easy to just bash away at 'command-a' until you have the whole document selected.

(Apologies for the poor spelling in the title, I accidentally pressed 'enter' before I was done and cannot figure out how to edit the title).

Comments and changes to this ticket

  • Erik Johansson

    Erik Johansson January 5th, 2011 @ 04:13 PM

    • Assigned user set to “rsms”

    Shouldn't cmd + a just select the whole document? Feels like that is the standard behavior.

  • Christopher Stevenson

    Christopher Stevenson January 5th, 2011 @ 11:21 PM

    Okay, if keeping the default behaviour is important then how about assigning this to 'command+shift+a'? (then I can just change it to 'command+a' in my general keyboard preferences)

    I think it would be nice to have a keyboard alternative to the similar mouse double-click behaviour which selects first the word, then, with each subsequent click, it selects the row, then the paragraph and, in some applications, finally the whole document.

    As I said, different shortcuts for different 'levels' of text is too fussy and messing around with combinations of shift, alt, command and the cursor keys is only marginally less so.

  • rsms

    rsms January 6th, 2011 @ 05:51 PM

    • Tag set to feature, text, ux

    This is a nice idea.

    Mathematica has a neat related feature where the selection is increased for each key press (defaults to C-.) with respect to the documents syntax.

    However, we will not change the default behavior of Cmd+A since that is a truly standardized way of selecting all which is a feature used very frequently by many people.

    In the case of a document without any underlying syntactical information, we could resort to doing as suggested and treat text in as a simple structure. For example:

    Document
    |
    +-- Paragraph
        |
        +-- Line
            |
            +-- Word
                |
                +-- Character
    

    There's an ongoing project to implement "semantic information". Work in progress is documented in this article: https://github.com/rsms/kod/wiki/Text-parser-2

  • rsms

    rsms January 6th, 2011 @ 05:51 PM

    • State changed from “new” to “open”

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

A text editor for Mac OS X

People watching this ticket

Tags

Pages