• Packages
  • Themes
  • Documentation
  • Blog
  • Discuss
Sign in

expand-region

expanding selection
  • #selection
aki77
0.5.0 35,664
138
  • Repo
  • Bugs
  • Versions
  • License
Flag as spam or malicious

expand-region package

expanding selection Build Status

Gyazo

Inspired by vim-expand-region

Features

  • Support for multiple cursors.
  • You can easily customize.
  • Support for html tags.(emmet package is required.)

Keymap

No keymap by default.

edit ~/.atom/keymap.cson

'atom-text-editor':
  'alt-up': 'expand-region:expand'
  'alt-down': 'expand-region:shrink'

Customize selected regions

Follow the Atom guide on language-specific configuration to adjust how regions are selected per language. Edit ~/.atom/config.cson and use the default settings as a reference.

For example, if you want to select words with dashes first in CSS (instead of words without dashes), you could change your config.cson to something like:

'.source.css':
  'expand-region':
    commands: [
      # Note how `expand-region:select-word` is no longer here 
      # like it is in the defaults 
      {
        command: 'expand-region:select-word-include-dash',
        recursive: false
      }
      # etc... 
    ]

And now if you expanded while your cursor was—for example—between x and t in text-align, rather than selecting text first, you'd select the whole text-align property.

Other custom configs for inspiration:

  • jsx

I think this package is bad news.

Good catch. Let us know what about this package looks wrong to you, and we'll investigate right away.

  • Terms of Use
  • Privacy
  • Code of Conduct
  • Releases
  • FAQ
  • Contact
with by