Name

HTML.zip ( Version: 1.0.6 - 88K - Last modified: Dec 12, 2020 - 10:46:49 AM ) – Vim mappings to make editing HTML/XHTML files quick and easy.

Description

This is a set of HTML/XHTML mappings (macros) and menus for Vim 9 or later. The mappings will be local to the buffer so they will not interfere if you edit other files in the same Vim session.

Warning: Until Vim 9 is offically released, this script and its accompanying helper scripts may randomly break.

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.

First you should put "filetype plugin on" in your vimrc.

To install from the zip file

Extract HTML.zip (includes HTML.vim, HTML.txt, BrowserLauncher.vim, HTMLfunctions.vim, MangleImageTag.vim, and the toolbar bitmaps) in your runtime directory (~/.vim for Unix, $HOME/vimfiles for Windows; see ":help 'runtimepath'").

Manual installation

Note: Manual installation is not recommended. Please consider installing the zip file, which will place the plugin and its associated files in a self-contained "pack" directory. See :help packages for more information.

Put "HTML.vim" ( 129K - Last modified: Dec 12, 2020 - 10:46:36 AM ) in your ftplugin/html/ subdirectory somewhere in your 'runtimepath', then install the files below that you need.

To install for old versions of Vim

The last version that supported Vim 5 is 0.10, the last version that supported Vim 6 is 0.33.1, and the last version that supported Vim 7 is 0.42.6. Support for Vim 8.2 was unintentionally broken.

Other old versions can be found here.

Files

These files—except the HTML version of the documentation, the ChangeLog, and wikipedia.vim—are included in the HTML.zip file (see "installation" above).

  • Documentation:
    • HTML.txt ( 55K - Last modified: Nov 15, 2020 - 03:35:12 PM )
      Place this file in the doc subdirectory somewhere in your 'runtimepath' (~/.vim/doc for Unix, $HOME/vimfiles/doc for Windows) and run ":helptags <directory>/doc". Then you will be able to do ":help HTML.txt". (You may view the documentation as HTML here.)
    • ChangeLog (text version)
      Revision notes for all the files listed here.
    • Frequently Asked Questions (text version)
      This covers the most frequent support requests I get.
  • GUI Toolbar Bitmaps:
    vim-html-pixmaps.zip ( 21K - Last modified: Nov 04, 2020 - 05:29:14 PM )
    Extract this in the bitmaps directory somewhere in your 'runtimepath' (~/vim/bitmaps for Unix, $HOME/vimfiles/bitmaps for Windows.) (You may view a montage of the pixmaps here.)
  • HTML Plugin Functions:
    HTMLfunctions.vim ( 40K - Last modified: Nov 14, 2020 - 06:54:43 PM )
    This file is essential! Put this in one of the autoload/ directories in your 'runtimepath' (such as ~/.vim/autoload for Unix, $HOME/vimfiles/autoload for Windows) and it will allow the browser control mappings to work.
  • Browser Launcher:
    BrowserLauncher.vim ( 16K - Last modified: Nov 08, 2020 - 09:08:11 PM )
    Put this in one of the autoload/ directories in your 'runtimepath' and it will allow the browser control mappings to work.
  • Auto-Update Image Tag Size Attributes:
    MangleImageTag.vim (6.3K - Last modified: Nov 08, 2020 - 09:08:20 PM )
    This file is placed in one of the autoload/ directories in your 'runtimepath' and it will allow the ";mi" mapping to work.

Support

Email me

Some other Vim features and plugins that may be useful for editing (X)HTML:

  • closetag.vim
    This script provides functions and mappings to close open HTML/XML tags.
  • :help ft-html-omni
    How to auto-complete tags, attributes, CSS, JavaScript, etc. in Vim 7 or later.
  • html.vim
    For Vim 7.3 or later. Syntax additions for HTML files that enables concealing of some items. This file should be placed in your <runtimepath>/after/syntax/ directory. See my main Vim page for more information.
(Suggestions welcome.)