HTML/JSX
+ vim abbreviations =♥️
This plugin is just a collection of shortcuts for some of the most common HTML
tags, leveraging the awesome vim's iabbrev
mappings.
Tag | Abbreviation |
---|---|
<div /> |
div> |
<p /> |
p> |
<span /> |
span> |
<header /> |
header> |
<footer /> |
footer> |
<main /> |
main> |
<a /> |
a> |
<aside /> |
aside> |
<video /> |
video> |
<img /> |
img> |
<h1 /> |
h1> |
<h2 /> |
h2> |
<h3 /> |
h3> |
<h4 /> |
h4> |
<h5 /> |
h5> |
<h6 /> |
h6> |
<nav /> |
nav> |
<input /> |
input> |
<svg /> |
svg> |
<g /> |
g> |
<defs /> |
defs> |
<circle /> |
circle> |
<ellipse /> |
ellipse> |
<rect /> |
rect> |
<polygon /> |
polygon> |
<polyline /> |
polyline> |
<path /> |
path> |
<line /> |
line> |
<text /> |
text> |
<tspan /> |
tspan> |
📌 All the tags will be expanded with the attribute class
, or className
in case of JSX
, by default.
🎁 Plus HTML5
template generator: just type html5>
and it'll bootstrap the document for you.
For more info on the topic see the chapter about abbreviations on learn vim script the hardway or type :h iabbrev
from whitin vim.
-
Vundle, add the following line to your
~/.vimrc
:Bundle 'glippi/markabbreviations-vim'
$ vim +'PluginInstall! markabbreviations-vim' +qall
-
vim-plug, add the following to your plugin section:
Plug 'glippi/markabbreviations-vim'
$ vim +PlugInstall
-
NeoBundle, add the following line to your
~/.vimrc
:NeoBundle 'glippi/markabbreviations-vim'
$ vim +NeoBundleInstall +qall
-
Pathogen, execute the following in your shell:
$ cd ~/.vim/bundle
$ git clone https://github.com/glippi/markabbreviations-vim.git
If you are not using a package manager, download the tarball and execute the following steps:
$ cp markabbreviations-vim-master.tar.gz ~/.vim
$ cd ~/.vim
$ tar --strip-components=1 --overwrite -zxf markabbreviations-vim-master.tar.gz
$ rm markabbreviations-vim.tar.gz
Copyright (c) Gabriele Lippi. Distributed under the same terms as Vim itself. See :help license
.