Name

HTML.zip ( Version: 0.42.6 - 72K - Last modified: Feb 17, 2020 - 07:17:15 PM ) – 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 7 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.

Installation

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

To install from the zip file

Extract HTML.zip (Includes HTML.vim, HTML.txt, browser_launcher.vim, MangleImageTag.vim, and the toolbar bitmaps.) in your runtime directory (~/.vim for Unix, $HOME/vimfiles for Windows; see ":help 'runtimepath'"). Then run ":helptags <directory>/doc" within vim.

Manual installation

Put "HTML.vim" ( 149K - Last modified: Feb 17, 2020 - 07:16:45 PM ) in your ftplugin/html subdirectory somewhere in your 'runtimepath', then install the files below that you want.

To install for old versions of Vim

Support for Vim 6 and earlier has been abandoned—the last version that supported Vim 5 is version 0.10, and the last version that supported Vim 6 is version 0.33.1.

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 & HTML.vba files (see "installation" above).

  • Documentation:
    • HTML.txt ( 52K - Last modified: Feb 17, 2020 - 07:16:54 PM )
      Place this file in the doc subdirectory somewhere in your 'runtimepath' (~/.vim/doc for Unix) 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 ( 17K - Last modified: Jan 24, 2020 - 09:16:45 PM )
    Extract this in the bitmaps directory somewhere in your 'runtimepath' (~/vim/bitmaps for Unix). (You may view a montage of the pixmaps here.)
  • Browser Launcher (for Unix/Linux):
    browser_launcher.vim ( 15K - Last modified: Feb 02, 2020 - 02:41:18 PM )
    Put browser_launcher.vim in one of the toplevel directories in your 'runtimepath' (such as ~/.vim for Unix).
  • Auto-Update Image Tag Size Attributes:
    MangleImageTag.vim (7.2K - Last modified: Jan 25, 2020 - 03:38:24 PM )
    If this file is placed in one of the toplevel directories in your 'runtimepath' it will cause the ";mi" mapping to be defined.

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.)