aki77 / atom-expand-region

expanding selection
https://atom.io/packages/expand-region
MIT License
89 stars 9 forks source link

Support for JSX with language-babel package #21

Closed marcofugaro closed 7 years ago

marcofugaro commented 7 years ago

Currently doesn't work in JSX

aki77 commented 7 years ago

Please try it! emmet package is required.

~/.atom/config.cson

'.source.js.jsx':
  'expand-region':
    commands: [
      {
        command: 'editor:select-word'
        recursive: false
      }
      {
        command: 'expand-region:select-word-include-dash',
        recursive: false
      }
      {
        command: 'expand-region:select-word-include-dash-and-dot',
        recursive: false
      }
      {
        command: 'expand-region:select-inside-tags'
        recursive: false
      }
      {
        command: 'expand-region:select-inside-single-quotes'
        recursive: false
      }
      {
        command: 'expand-region:select-around-single-quotes'
        recursive: false
      }
      {
        command: 'expand-region:select-inside-double-quotes'
        recursive: false
      }
      {
        command: 'expand-region:select-around-double-quotes'
        recursive: false
      }
      {
        command: 'expand-region:select-inside-parentheses'
        recursive: true
      }
      {
        command: 'expand-region:select-around-parentheses'
        recursive: true
      }
      {
        command: 'expand-region:select-inside-curly-brackets'
        recursive: true
      }
      {
        command: 'expand-region:select-around-curly-brackets'
        recursive: true
      }
      {
        command: 'expand-region:select-inside-square-brackets'
        recursive: true
      }
      {
        command: 'expand-region:select-around-square-brackets'
        recursive: true
      }
      {
        command: 'emmet:balance-outward'
        recursive: true
      }
    ]
marcofugaro commented 7 years ago

Nice! It works with the latest update!

daiyi commented 6 years ago

WOW this is perfect, thanks! I'm going to add this to the readme for visibility.