sponsor Vim development Vim logo Vim Book Ad

html-macros.vim : macros for html

 script karma  Rating 55/28, Downloaded by 5653  Comments, bugs, improvements  Vim wiki

created by
Carl Mueller
 
script type
utility
 
description
Here are some macros for html.

In normal mode, the function key F1 will insert an html skeleton.
In insert mode, F1 will complete the previous uncompleted tag.
Typing "<" will result in a pair "<>", with the cursor in between.
There are a number of macros beginning with ";".  For instance,
;1 will result in <h1></h1>, with the cursor in the middle.
Typing ;1 in visual mode will embrace the region with the tags <h1></h1>.
 
install details
Put it in an ftplugin directory in your runtime path,
or add the following line to your .vimrc file.

autocmd Filetype html source ~/.Vim/html-macros.vim

with the appropriate directories.
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
html-macros.vim 1.0 2002-10-12 6.0 Miroslav Štandera a
html.vim 1.1 2002-10-10 6.0 Carl Mueller Fixed problems with indentation
html-macros.vim 1.0 2001-12-21 6.0 Carl Mueller Changed the name, so it doesn't conflict
with the html.vim syntax file.
html-macros.vim 1.0 2001-12-03 6.0 Carl Mueller Initial upload
ip used for rating: 3.140.186.241

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github