HTML/XHTML editing macros for Vim 9 or later https://christianrobinson.name/programming/vim/HTML
  • Vim Script 83.5%
  • C 12.3%
  • Makefile 3.1%
  • Perl 1.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-05-30 23:00:29 -06:00
.github/workflows Potential fix for code scanning alert no. 1: Workflow does not contain permissions 2026-05-23 20:30:59 -06:00
autoload/HTML Update copyright years. 2026-05-22 09:01:32 -06:00
bitmaps Unstage some files 2024-04-09 16:43:27 -06:00
commands/HTML Update copyright years. 2026-05-22 09:01:32 -06:00
doc Comments no longer needed in CSS. Read multiple JSON files logic broken. 2025-03-25 13:41:40 -06:00
ftplugin/html Bump minimum Vim version required to run the plugin 2026-05-18 18:25:35 -06:00
import/HTML Merge branch 'master' of github.com:Heptite/HTML 2026-05-30 23:00:29 -06:00
json/HTML Merge branch 'master' of github.com:Heptite/HTML 2026-05-30 23:00:29 -06:00
lang Fix language conversion code, various other tweaks 2025-10-27 16:04:38 -06:00
test Commented two tests out because of a Vim bug(?) 2026-05-22 19:54:07 -06:00
.gitignore Fix make targets 2026-05-22 18:37:34 -06:00
LICENSE.md fix markdown 2024-04-13 15:22:08 -06:00
Makefile No longer generate ChangeLog -- it was too problematic 2026-05-23 17:44:59 -06:00
README.md Tweak markdown 2026-05-22 09:04:18 -06:00
SECURITY.md Fix make targets 2026-05-22 18:37:34 -06:00
upload Update copyright years. 2026-05-22 09:01:32 -06:00
version Bump minimum Vim version required to run the plugin 2026-05-18 18:25:35 -06:00

HTML/XHTML Editing Macros

Note that this plugin requires Vim 9.2 or later; nightly builds are available for Windows at: https://github.com/vim/vim-win32-installer/releases Or semi-frequent builds are available for Windows at: https://tuxproject.de/projects/vim/

This plugin allows for the rapid development of HTML files primarily with the use of macros. For example:

  • In normal mode, type ;html to insert a configurable template
  • Use <Tab> to skip to unfilled parts of the template
  • Use insert mode ;-mappings to insert tags. For example:
    • ;pp inserts:
      <p>
      </p>
    • ;im inserts <img src="" alt=""> and correctly positions the cursor
    • ;br inserts <br>
    • &< inserts &lt;, &> inserts &gt;, && inserts &amp;
    • and so on...
  • ;db in normal mode launches the default browser on the current buffer file
  • Commands are included to disable and re-enable the mappings, so it is easier to edit JavaScript, PHP, etc.
  • The map leaders (; and &) are configurable, along with many other configuration variables
  • A menu―including a modified toolbar―is included to allow for reference to tags and their corresponding mappings

Installation

Note: If you have an old installation of this plugin, you need to remove its files first or they may prevent the packed version from loading.

Install using your favorite package manager, or use Vim's built-in package support:

Unix/MacOS

In a terminal type these commands:

mkdir -p ~/.vim/pack/cjr/start
cd ~/.vim/pack/cjr/start
git clone https://github.com/Heptite/HTML.git

Windows

Press Windows+R, type in "cmd" and press Enter. In that window run these commands:

mkdir %USERPROFILE%\vimfiles\pack\cjr\start
cd %USERPROFILE%\vimfiles\pack\cjr\start
git clone https://github.com/Heptite/HTML.git

After installing using git you can always update by going into the pack/cjr/start/HTML directory and typing: git pull

Official Website

http://christianrobinson.name/vim/HTML/

This includes extra documentation, alternate install methods, an FAQ, etc.

License

Copyright © 1998 - 2026 Christian J. Robinson

Distributable under the terms of the GNU General Public License, version 3 or later: https://www.gnu.org/licenses/licenses.html#GPL