Expandregion for Sublime text: Quick selection

Source: Internet
Author: User

There is no special envy Webstrom on the ctrl+w shortcut keys, through which you can quickly select the text under the cursor, more than a few times can gradually expand the selection of the area, which is very convenient when editing the text. Vim also has a similar concept, called text object in Vim, which allows you to quickly select text objects of different sizes.

In the sublime text although there are shortcut keys to select text, but not good enough, until one day encountered this plugin: sublime-expand-region, all the troubles have disappeared.

Like "Expand Selection to Scope". But better!

Expandregion works a bit like the ' build in ' Expand Selection to Scope ' However it does not depend on Scopes (Scopes is U Sed by ST to "understand" code, i.e. for syntax highlighting). Therefore selection expansion can is more granular and customizable.

It works similar to expandregion for Emacs and "Structural Selection" (control-w) in the JetBrains IDE ' s (i.e. IntelliJ ID EA).

Installation method does not say, one is the above link said how to install, and the other people with Sublimetext probably also know how to install plug-ins. So there's no nagging here.

Here are just a few shortcuts that I configured. Light installation is not yet available, you have to customize two shortcuts, one for enlarging the selection, and one for reducing the selection.

    {"        keys": ["Alt+up"],        "command": "Expand_region"    },    {        "keys": ["Alt+down"],        "command": " Expand_region ",        " args ": {" undo ": True},        " context ": [{" Key ":" Expand_region_soft_undo "}]    },

The above shortcut keys are defined for Windows, Linux, MacOS

Here are a few:

JavaScript (should also work for other C ' ish languages like Java).

Python

Html

Expandregion for Sublime text: Quick selection

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.