mxw / vim-jsx

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

Enable using '%' to jump to matching tags #2

Closed justinj closed 10 years ago

justinj commented 10 years ago

This adds a file which enables matchit to be used with JSX tags, using a regex taken from /usr/local/share/vim/vim74/ftplugin/html.vim (on my machine).

This means when pressing % on the opening or closing part of a JSX tag the cursor will jump to the matching tag. It requires that the user has matchit (which comes with Vim) enabled by putting

runtime macros/matchit.vim

in their .vimrc.

mxw commented 10 years ago

Cool, sounds good to me.