Plugin with some utilities to folks who work with JSX on Vim.
nnoremap <leader>ja :call JSXEncloseReturn()<CR>
nnoremap <leader>ji :call JSXEachAttributeInLine()<CR>
nnoremap <leader>je :call JSXExtractPartialPrompt()<CR>
nnoremap <leader>jc :call JSXChangeTagPrompt()<CR>
nnoremap vat :call JSXSelectTag()<CR>
You can install this plugin with Pathogen, Vundle and other plugin loaders.
Select the whole tag, like vat
, but with a little improvement to select self-closing tags.
Put the current tag on a return statement with parenthesis.
Put each tag attribute's on its own line to better readability.
Extract some tag on its own method on a ES6 class.
Change the tag name
Samuel Simões ~ @samuelsimoes ~ Blog