aki77 / atom-expand-region

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

Select text inside JSX tags? #11

Closed dvdplm closed 8 years ago

dvdplm commented 8 years ago

How do I configure it to select all text inside tags when editing a JSX file?

Thanks! :)

aki77 commented 8 years ago

Please try it!

~/.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-fold'
        recursive: true
      }
      {
        command: 'expand-region:select-inside-tags'
        recursive: false
      }
      {
        command: 'expand-region:select-inside-paragraph'
        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
      }
    ]
dvdplm commented 8 years ago

Lovely, works! :D

aki77 commented 8 years ago

:smiley: