Auto-closing HTML tags in Vim on Debian Buster

Debian provides deb packages for Vim and Vim scripts. Vim scripts are a set of addons to vim to automate repetitive tasks or adding new functionalities to the Vim editor.

This addon, closetag.vim, will be installed and enabled and ready for use when editing an HTML file.

Debian provide a central way to manage Vim addons, vim-addons-manager, system-wide or a per-user configuration.
To install it :

apt install vim-addon-manager vim-scripts

To enable it just for you :

vim-addons install closetag

A local copy of closetag.vim is created in ~/.vim/macros

To enable it in your Vim editor :

:let g:closetag_html_style=1
:source ~/.vim/macros/closetag.vim

The auto-closing function is available in insert mode by typing Ctrl-_

More infos :

https://github.com/vim-scripts/closetag.vim
http://www.vim.org/scripts/script.php?script_id=13

Debian Packaging Policy for Vim

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s