https://github.com/inside/vim-textobj-jsxattr
A vim text object for JSX attributes.
https://github.com/inside/vim-textobj-jsxattr
Last synced: 3 months ago
JSON representation
A vim text object for JSX attributes.
- Host: GitHub
- URL: https://github.com/inside/vim-textobj-jsxattr
- Owner: inside
- License: wtfpl
- Created: 2016-11-28T14:52:52.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-11-29T13:23:58.000Z (over 9 years ago)
- Last Synced: 2025-10-25T06:36:18.410Z (7 months ago)
- Language: VimL
- Size: 7.81 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# vim-textobj-jsxattr
[](https://travis-ci.org/inside/vim-textobj-jsxattr)
A vim text object for JSX attributes. Forked from
[whatyouhide/vim-textobj-xmlattr](https://github.com/whatyouhide/vim-textobj-xmlattr)
## Usage
Use the text-objects `ix` and `ax` to operate on JSX attributes.
## Examples
This is a JSX component, the pipe represents the cursor:
``` jsx
```
Hitting `vax` will visually select ` onChange={this.handleChange.bind(this, 'name')}`.
Notice the space before. This is because you selected `a` attribute. Hitting
`vix` will visually select the inner attribute
`onChange={this.handleChange.bind(this, 'name')}` without the space.
## Installation
``` viml
" vim-plug
Plug 'kana/vim-textobj-user' | Plug 'inside/vim-textobj-jsxattr'
" NeoBundle
NeoBundle 'kana/vim-textobj-user'
NeoBundle 'inside/vim-textobj-jsxattr'
" Vundle
Plugin 'kana/vim-textobj-user'
Plugin 'inside/vim-textobj-jsxattr'
```
## License
[![][wtfpl-logo]][wtfpl]
[wtfpl]: http://www.wtfpl.net/
[wtfpl-logo]: http://www.wtfpl.net/wp-content/uploads/2012/12/logo-220x1601.png