mxw / vim-jsx

React JSX syntax highlighting and indenting for vim.
1.59k stars 95 forks source link

Handling `%` motion for jsx tags. #133

Open sassanh opened 7 years ago

sassanh commented 7 years ago

Consider this code <div onClick={()=>{}}> if I press % in the beginning, I expect it to go to the end of line (the second >) but it goes to first >. Is it possible to handle it?

shtanton commented 6 years ago

Vim makes the same mistake with the it text object too as it will encompass after the => instead of the actual tag

sassanh commented 6 years ago

@shtanton this is solved in my fork: https://github.com/sassanh/vim-jsx/

redbmk commented 6 years ago

This was also recently fixed in https://github.com/neoclide/vim-jsx-improve/commit/5f855dafa89bde202a315b76e642addd3dc81d40. Is there an easy way to port the changes over here?

sassanh commented 6 years ago

yeah fork this repo, apply the changes in your fork and make a pull request. But seems like the owner of this repo is not actively maintaining it so you may end up using your own fork instead of the main repo.