tagalong : Change an HTML(ish) opening tag and take the closing one along as well
| script karma
Downloaded by 75
Comments, bugs, improvements
script versions (upload new version)
|Github repository: https://github.com/AndrewRadev/tagalong.vim
The plugin is designed to automatically rename closing HTML/XML tags when editing opening ones (or the other way around). For the most part, you should be able to edit your code normally (see documentation for limitations) and the plugin would take care of the renaming once you leave insert mode. You can see a demo gif here: http://i.andrewradev.com/f52337c3b41b6f2269407c1b332caf9c.gif
Apart from HTML tags, it'll also detect XML-style `<namespaced:tags>`, react-style `<Component.Subcomponents>`, ember-style `<component/paths>`.
The plugin only activates for HTML-like buffers, or at least all the ones that I could think of. You can see the full list in the setting `g:tagalong_filetypes`. You can set that variable yourself to limit it to the ones you use. You can activate the plugin for more filetypes by changing `g:tagalong_additional_filetypes` (but consider opening an issue to suggest changes to the default list). See the documentation for more details.
|The easiest way to install the plugin is with a plugin manager:
- vim-plug: https://github.com/junegunn/vim-plug
- Vundle: https://github.com/VundleVim/Vundle.vim
If you use one, just follow the instructions in its documentation.
You can install the plugin yourself using Vim's "packages" functionality by cloning the project (or adding it as a submodule) under `~/.vim/pack/<any-name>/start/`. For example:
git clone https://github.com/AndrewRadev/tagalong.vim ~/.vim/pack/_/start/tagalong
This should automatically load the plugin for you on Vim start. Alternatively,
you can add it to `~/.vim/pack/<any-name>/opt/` instead and load it in your
.vimrc manually with:
If you'd rather not use git, you can download the files from the "releases" tab and unzip them in the relevant directory: https://github.com/AndrewRadev/tagalong.vim/releases.
Click on the package to download.
ip used for rating: 22.214.171.124
||- Timeout implemented for large files with lots of tag nesting.
- Fix bug with nested `<SelfClosing/>` tags, disable support for `/` in the body of a tag (hopefully not actually used for anything)
- Allow deinitialization of the plugin in a buffer
||- Support multi-line opening tags
- Fix issue with editing a closing tag