项目作者: aki77

项目描述 :
expanding selection
高级语言: CoffeeScript
项目地址: git://github.com/aki77/atom-expand-region.git
创建时间: 2015-06-10T06:40:40Z
项目社区:https://github.com/aki77/atom-expand-region

开源协议:MIT License

下载


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

  1. 'atom-text-editor':
  2. 'alt-up': 'expand-region:expand'
  3. '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:

  1. '.source.css':
  2. 'expand-region':
  3. commands: [
  4. # Note how `expand-region:select-word` is no longer here
  5. # like it is in the defaults
  6. {
  7. command: 'expand-region:select-word-include-dash',
  8. recursive: false
  9. }
  10. # etc...
  11. ]

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: