Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand Selection and PML Nodes #34

Open
tajmone opened this issue Jul 26, 2022 · 0 comments
Open

Expand Selection and PML Nodes #34

tajmone opened this issue Jul 26, 2022 · 0 comments
Labels
🔬 research Issue requires further researching

Comments

@tajmone
Copy link
Owner

tajmone commented Jul 26, 2022

The following Sublime Text menus are of particular interest for Sublime PML:

menu key-binding
Selection » Expand Selection Ctrl+Shift+A
Selection » Expand Selection to Block
Selection » Expand Selection to Scope Ctrl+Shift+Space
Selection » Expand Selection to Brackets Ctrl+Shift+M

Ideally, one of the above should allow users to quickly select a node's contents, and if executed again then select the opening and closing tags too, and with subsequent executions move to the outer node, and so on.

This would allow to quickly select and delete a node's contents, or the entire node (including its delimiters) with a single key-binding.

Unfortunately, none of these work exactly as expected because they don't seem to recognize the node opening and closing tags in their own right, but focus instead on the square brackets only.

I also noticed that these selection modes don't work consistently on native syntaxes either, so I probably need to investigate how semantic scopes relate to their efficiency, and which criteria distinguish these selection-expansion modes in respect to scoping, etc. Maybe then I could achieve the expected goal by tweaking the way PML nodes are being scoped.

In the native Default.sublime-commands settings, these modes are associated to the following commands:

    { "caption": "Selection: Expand", "command": "expand_selection", "args": {"to": "smart"} },
    { "caption": "Selection: Expand to Scope", "command": "expand_selection", "args": {"to": "scope"} },
    { "caption": "Selection: Expand to Brackets", "command": "expand_selection", "args": {"to": "brackets"} },
@tajmone tajmone added the 🔬 research Issue requires further researching label Jul 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔬 research Issue requires further researching
Projects
None yet
Development

No branches or pull requests

1 participant