. This is intended to be
used when the cursor is between and
in insert mode and you
want to start a new paragraph without having to move the cursor.
*i_;pr* *v_;pr* *n_;pr*
;pr Preformatted text ( ). (|n_;|)
*i_;qu* *v_;qu* *n_;qu*
;qu Quoted text ( ). (|n_;|)
*i_;sk* *v_;sk* *n_;sk*
;sk Strike-through ( ). (|n_;|)
*i_;sm* *v_;sm* *n_;sm*
;sm Small text ( ). (|n_;|)
*i_;sn* *v_;sn* *n_;sn*
;sn Span ( ). (|n_;|)
*i_;sa* *v_;sa* *n_;sa*
;sa Sample text ( ). (|n_;|)
*i_;st* *v_;st* *n_;st*
;st Strong text ( ). (|html-smart-tag|) (|n_;|)
*i_;cs* *v_;cs* *n_;cs*
;cs CSS Style ().
(|n_;|)
*i_;ls* *v_;ls* *n_;ls*
;ls Linked CSS style sheet ( ). (|n_;|)
*i_;sb* *v_;sb* *n_;sb*
;sb Subscript ( ). (|n_;|)
*i_;sp* *v_;sp* *n_;sp*
;sp Superscript ( ). (|n_;|)
*i_;ti* *v_;ti* *n_;ti*
;ti Title ( ). (|n_;|)
*i_;tt* *v_;tt* *n_;tt*
;tt Teletype Text (monospaced) ( ). (|n_;|)
*i_;un* *v_;un* *n_;un*
;un Underlined text ( ). (|html-smart-tag|) (|n_;|)
*i_;ul* *v_;ul* *n_;ul*
;ul Unordered list (). (|n_;|)
*html-tables*
*i_;ta* *v_;ta* *n_;ta*
;ta Table (). (|n_;|)
*n_;tA*
;tA Interactive table; you will be interactively prompted for the table
rows, columns, and border width.
*i_;tH* *v_;tH* *n_;tH*
;tH Table header row ( ). (|n_;|)
*i_;tb* *v_;tb* *n_;tb*
;tb Table body ( ). (|n_;|)
*i_;tf* *v_;tf* *n_;tf*
;tf Table footer row ( ). (|n_;|)
*i_;ca* *v_;ca* *n_;ca*
;ca Table caption ( ). (|n_;|)
*i_;tr* *v_;tr* *n_;tr*
;tr Table row ( ). (|n_;|)
*i_;td* *v_;td* *n_;td*
;td Table data (column element) ( ). (|n_;|)
*i_;th* *v_;th* *n_;th*
;th Table column header ( ). (|n_;|)
*html-frames*
*i_;fs* *v_;fs* *n_;fs*
;fs Frame layout ( ). (|n_;|)
*i_;fr* *v_;fr* *n_;fr*
;fr Frame source ( ). (|n_;|)
*i_;nf* *v_;nf* *n_;nf*
;nf Text to display if for a browser that can not display frames
( ). (|n_;|)
*i_;if* *v_;if* *n_;if*
;if Inline frame (). (|n_;|)
*html-forms*
*i_;fm* *v_;fm* *n_;fm*
;fm Form (). (|n_;|)
*i_;bu* *v_;bu* *n_;bu*
;bu Form button ( ). Visual mode puts
the selected text VALUE="here". (|n_;|)
*i_;ch* *v_;ch* *n_;ch*
;ch Form check box ( ). Visual
mode puts the selected text VALUE="here". (|n_;|)
*i_;ra* *v_;ra* *n_;ra*
;ra Form radio button ( ). Visual mode
puts the selected text VALUE="here". (|n_;|)
*i_;hi* *v_;hi* *n_;hi*
;hi Hidden form data ( ). Visual mode
puts the selected text VALUE="here". (|n_;|)
*i_;pa* *v_;pa* *n_;pa*
;pa Form password input field ( ). Visual mode puts the selected text VALUE="here". (|n_;|)
*i_;te* *v_;te* *n_;te*
;te Form text input field ( ).
Visual mode puts the selected text VALUE="here". (|n_;|)
*i_;fi* *v_;fi* *n_;fi*
;fi Form file input field ( ).
Visual mode puts the selected text VALUE="here". (|n_;|)
*i_;se* *v_;se* *n_;se*
;se Form selection box ( ). Visual mode puts
the selected text here . (|n_;|)
*i_;ms* *v_;ms* *n_;ms*
;ms Form multiple selection box ( ).
Visual mode puts the selected text
here . (|n_;|)
*i_;op* *v_;op* *n_;op*
;op Form selection option ( ). (|n_;|)
*i_;og* *v_;og* *n_;og*
;og Form option group ( ). Visual mode
puts the selected text here .
(|n_;|)
*i_;tx* *v_;tx* *n_;tx*
;tx Form text input area (). Visual mode puts the selected text
. (|n_;|)
*i_;su*
;su Form submit button ( ).
*i_;re*
;re Form reset button ( ).
*i_;la* *v_;la* *n_;la*
;la Form element label ( ). Visual mode puts the
visually selected text here and positions the
cursor on the second ". (|n_;|)
*v_;lA* *n_;lA*
;lA The same as |;la| but puts the cursor and
places the cursor on the < of . (|n_;|)
==============================================================================
5. Mappings for &...; Codes *character-codes* *character-entities*
A number of mappings have been defined to allow insertion of special
characters into the HTML buffer. These are known as characters entities.
*n_;&* *v_;&*
;& This mapping converts the motion or visually selected characters to
their ...; entities, where "..." is equivalent to the ASCII decimal
representation. For example, "foo bar" would become
"foo bar". (See |i_;&|) (|n_;|)
(Note that the "&" in this mapping is not translated to whatever
|g:html_map_entity_leader| is set to.)
*n_;%* *v_;%*
;% This mapping converts the motion or visually selected characters to
their %XX hexadecimal string for URIs. For example, "foo bar" would
become "%66%6F%6F%20%62%61%72". (|n_;|)
Note: Previously the ;& and ;% normal mode mappings didn't require a motion
and operated on the character "under" the cursor. This was changed for
multiple reasons. Use ;&l or ;%l to emulate the old behavior.
*n_;^* *v_;^*
;^ This mapping will decode the ...; and %XX elements of the motion or
visually selected characters their actual characters. (|n_;|)
The following mappings work in insert mode only.
Note that you can change the leader character for these mappings from '&' to
another character of your preference. See |g:html_map_entity_leader|.
Name: HTML: Macro:
--------------------------------------------------------------------
Ampersand (&) & && *i_&&*
Greater than (>) > &> *i_&>*
Less than (<) < &< *i_&<*
*i_&* *i_&space* *i_;*
Space (non-breaking) &/; *i_;space*
Quotation mark (") " &' *i_&'*
Cent ¢ &c| *i_&cbar*
Pound £ *i_*
Yen ¥ &Y= *i_&Y=*
Left Angle Quote « &2< *i_&2<*
Right Angle Quote » &2> *i_&2>*
Copyright © &cO *i_&cO*
Registered ® &rO *i_&rO*
Trademark ™ &tm *i_&tm*
Multiply × &x *i_&x*
Divide ÷ &/ *i_&/*
Inverted Exclamation ¡ &! *i_&!*
Inverted Question ¿ &? *i_&?*
Degree ° &dg *i_&dg*
Micro µ &mi *i_&mi*
Paragraph ¶ &pa *i_&pa*
Middle Dot · &. *i_&.*
One Quarter ¼ &14 *i_&14*
One Half ½ &12 *i_&12*
Three Quarters ¾ &34 *i_&34*
En dash – &n-/&2- *i_&n-* *i_&2-*
Em dash — &m-/&--/&3- *i_&m-* *i_&--* *i_3-*
Ellipsis … &3. *i_&3.*
A-grave À &A` *i_&A`*
a-grave à &a` *i_&a`*
E-grave È &E` *i_&E`*
e-grave è &e` *i_&e`*
I-grave Ì &I` *i_&I`*
i-grave ì &i` *i_&i`*
O-grave Ò &O` *i_&O`*
o-grave ò &o` *i_&o`*
U-grave Ù &U` *i_&U`*
u-grave ù &u` *i_&u`*
A-acute Á &A' *i_&A'*
a-acute á &a' *i_&a'*
E-acute É &E' *i_&E'*
e-acute é &e' *i_&e'*
I-acute Í &I' *i_&I'*
i-acute í &i' *i_&i'*
O-acute Ó &O' *i_&O'*
o-acute ó &o' *i_&o'*
U-acute Ú &U' *i_&U'*
u-acute ú &u' *i_&u'*
Y-acute Ý &Y' *i_&Y'*
y-acute ý &y' *i_&y'*
A-tilde à &A~ *i_&A~*
a-tilde ã &a~ *i_&a~*
N-tilde Ñ &N~ *i_&N~*
n-tilde ñ &n~ *i_&n~*
O-tilde Õ &O~ *i_&O~*
o-tilde õ &o~ *i_&o~*
A-circumflex  &A^ *i_&A^*
a-circumflex â &a^ *i_&a^*
E-circumflex Ê &E^ *i_&E^*
e-circumflex ê &e^ *i_&e^*
I-circumflex Î &I^ *i_&I^*
i-circumflex î &i^ *i_&i^*
O-circumflex Ô &O^ *i_&O^*
o-circumflex ô &o^ *i_&o^*
U-circumflex Û &U^ *i_&U^*
u-circumflex û &u^ *i_&u^*
A-umlaut Ä &A" *i_&Aquote*
a-umlaut ä &a" *i_&aquote*
E-umlaut Ë &E" *i_&Equote*
e-umlaut ë &e" *i_&equote*
I-umlaut Ï &I" *i_&Iquote*
i-umlaut ï &i" *i_&iquote*
O-umlaut Ö &O" *i_&Oquote*
o-umlaut ö &o" *i_&oquote*
U-umlaut Ü &U" *i_&Uquote*
u-umlaut ü &u" *i_&uquote*
y-umlaut ÿ &y" *i_&yquote*
Umlaut ¨ &" *i_"e*
A-ring Å &Ao *i_&Ao*
a-ring å &ao *i_&ao*
AE-ligature Æ &AE *i_&AE*
ae-ligature æ &ae *i_&ae*
C-cedilla Ç &C, *i_&C,*
c-cedilla ç &c, *i_&c,*
O-slash Ø &O/ *i_&O/*
o-slash ø &o/ *i_&o/*
Left single arrow ← &la *i_&la*
Right single arrow → &ra *i_&ra*
Up single arrow ↑ &ua *i_&ua*
Down single arrow ↓ &da *i_&da*
Left-right single arrow ↔ &ha *i_&ha*
Left double arrow ⇐ &lA *i_&lA*
Right double arrow ⇒ &rA *i_&rA*
Up double arrow ⇑ &uA *i_&uA*
Down double arrow ⇓ &dA *i_&dA*
Left-right double arrow ⇔ &hA *i_&hA*
The greek alphabet:
Name: HTML: Macro:
--------------------------------------------------------------------
Upper Alpha Α &Al *i_&Al*
Upper Beta Β &Be *i_&Be*
Upper Gamma Γ &Ga *i_&Ga*
Upper Delta Δ &De *i_&De*
Upper Epsilon Ε &Ep *i_&Ep*
Upper Zeta Ζ &Ze *i_&Ze*
Upper Eta Η &Et *i_&Et*
Upper Theta Θ &Th *i_&Th*
Upper Iota Ι &Io *i_&Io*
Upper Kappa Κ &Ka *i_&Ka*
Upper Lambda Λ &Lm *i_&Lm*
Upper Mu Μ &Mu *i_&Mu*
Upper Nu Ν &Nu *i_&Nu*
Upper Xi Ξ &Xi *i_&Xi*
Upper Omicron Ο &Oc *i_&Oc*
Upper Pi Π &Pi *i_&Pi*
Upper Rho Ρ &Rh *i_&Rh*
Upper Sigma Σ &Si *i_&Si*
Upper Tau Τ &Ta *i_&Ta*
Upper Upsilon Υ &Up *i_&Up*
Upper Phi Φ &Ph *i_&Ph*
Upper Chi Χ &Ch *i_&Ch*
Upper Psi Ψ &Ps *i_&Ps*
Lower alpha α &al *i_&al*
Lower beta β &be *i_&be*
Lower gamma γ &ga *i_&ga*
Lower delta δ &de *i_&de*
Lower epsilon ε &ep *i_&ep*
Lower zeta ζ &ze *i_&ze*
Lower eta η &et *i_&et*
Lower theta θ &th *i_&th*
Lower iota ι &io *i_&io*
Lower kappa κ &ka *i_&ka*
Lower lambda λ &lm *i_&lm*
Lower mu μ &mu *i_&mu*
Lower nu ν &nu *i_&nu*
Lower xi ξ &xi *i_&xi*
Lower omicron ο &oc *i_&oc*
Lower pi π &pi *i_&pi*
Lower rho ρ &rh *i_&rh*
Lower sigma σ &si *i_&si*
Lower sigmaf ς &sf *i_&sf*
Lower tau τ &ta *i_&ta*
Lower upsilon υ &up *i_&up*
Lower phi φ &ph *i_&ph*
Lower chi χ &ch *i_&ch*
Lower psi ψ &ps *i_&ps*
Lower omega ω &og *i_&og*
Lower thetasym ϑ &ts *i_&ts*
Lower upsih ϒ &uh *i_&uh*
Lower piv ϖ &pv *i_&pv*
==============================================================================
6. How to Use Browser Mappings *browser-control*
You can use a browser to preview your current HTML document. (See
|html-author-notes|)
For Windows:
*n_;db*
;db Call the default browser on the current file.
*n_;ie*
;ie Call Explorer on the current file.
For Unix:
The following mappings are only defined if you have properly installed the
browser_launcher.vim script, available with installation instructions here:
http://www.infynity.spodzone.com/vim/HTML/
*n_;ff*
;ff Make Firefox view the current file, starting Firefox if it is not
running.
*n_;nff*
;nff Same as |;ff|, but start a new browser window.
*n_;tff*
;tff Same as |;nff|, but open a new tab.
*n_;mo*
;mo Make Mozilla view the current file, starting Mozilla if it is not
running.
*n_;nmo*
;nmo Same as |;mo|, but start a new browser window.
*n_;tmo*
;tmo Same as |;nmo|, but open a new tab.
*n_;ne*
;ne Make Netscape view the current file, starting Netscape if it is not
running.
*n_;nne*
;nne Same as |;ne|, but start a new browser window.
Note: If Firefox and/or Mozilla and/or Netscape are running, these mappings
may behave somewhat unexpectedly, due to the fact that Firefox, Mozilla and
Netscape use the same remote protocol IDs.
*n_;oa*
;oa Make Opera view the current file, starting Opera if it is not running.
*n_;noa*
;noa Same as |;oa|, but start a new browser window.
*n_;toa*
;toa Same as |;noa|, but open a new tab.
*n_;ly*
;ly Use lynx to view the current file. This behaves like |;nly| if the Vim
GUI is running.
*n_;nly*
;nly Same as |;ly|, but in a new xterm. This behaves like |;ly| if there
is no DISPLAY environmental variable.
*n_;w3*
;w3 Use w3m to view the current file. This behaves like |;nw3| if the Vim
GUI is running.
*n_;nw3*
;nw3 Same as |;w3|, but in a new xterm. This behaves like |;w3| if there
is no DISPLAY environmental variable.
==============================================================================
7. Miscellaneous Extras *html-misc*
:SetIfUnset {variable} {value} *:SetIfUnset*
This calls |SetIfUnset()|.
Functions used by the HTML mappings: *html-functions*
------------------------------------
HTMLencodeString({string} [, {...}]) *HTMLencodeString()*
Returns {string} encoded into HTML entities.
If the second argument is "%" the string is encoded into %XX
hexadecimal string instead.
If the second argument is "d" or "decode" the ...; and %XX elements
of the provided string will be decoded into their actual characters.
See |n_;&| and |n_;%| for examples.
Note that Unicode characters can not be safely converted to %XX hex
strings for URIs do to a limit in the specification.
HTMLgenerateTable() *HTMLgenerateTable()*
This is normally called by the normal mapping |;ta|, but it works the
same if called any other way.
HTMLmap({maptype}, {lhs}, {rhs} [, {re-indent}]) *HTMLmap()*
This function defines a mapping, local to the buffer and silent.
{maptype} is any map command. {lhs} and {rhs} are equivalent to :map
arguments, see |map.txt|. This is useful for autocommands and HTML
filetype plugins.
If {lhs} starts with "" that string will replaced with the
contents of |g:html_map_leader|.
If {lhs} starts with "" that string will replaced with the
contents of |g:html_map_entity_leader|.
Any text in {rhs} that is enclosed by [{}] will be converted to
uppercase/lowercase according to the |g:html_tag_case| variable, and
the [{}] markers will be removed.
{re-indent} is optional, applies only to visual maps when filetype
indenting is enabled, and should not be used for maps that enter
insert mode. If the value is 1, the visually selected area is
re-selected, plus one line below, and re-indented. A value of 2 does
the same without moving down a line.
The special cases of 0 means the visual mapping enters visual mode,
and -1 tells the function not to add any special extra code to the
visual mapping.
Note that more "magic" than what's documented here gets applied to the
mappings depending on their mode, the value of {re-indent} and so on.
HTMLmapo({map}, {insert}) *HTMLmapo()*
Creates an operator-pending mapping wrapper for {map} that calls the
visual mapping by the same name. {insert} is a boolean value (0 or 1)
that indicates whether to end in insert mode.
HTMLnextInsertPoint([{mode}]) *HTMLnextInsertPoint()*
This is normally called by the |;| mapping, but it works the same
if called any other way. The {mode} argument is either 'i' or 'n'
(default) which means |Insert| or |Normal|. In insert mode, if the
cursor is on the start of a closing tag it places the cursor after the
tag.
HTMLtemplate() *HTMLtemplate()*
This is normally called by the normal mapping |;html|, but it works
the same if called any other way.
SetIfUnset({variable}, {value}) *SetIfUnset()*
This function sets {variable} to {value} if the variable is not
already set. A {value} of "-" makes sure the variable is set with an
empty string. This function will not work for function-local
variables. (|l:var|)
Author's notes: *html-author-notes*
---------------
The Content-Type charset automatic detection value based on the 'fileencoding'
/ 'encoding' option has a very incomplete translation table from the possible
values that Vim uses--I could use help with this.
I want to finally release a 1.0 version, but I am not willing to until I have
browser control mappings for operating systems other than *nix. Unfortunately
I need substantial help to create them for Windows and MacOS since I do not
have access to either OS.
I will never include mappings for certain tags, such as and
. As far as I am concerned these tags should never have
existed. (I disable these "features" completely in my browser.)
vim:tw=78:ts=8:sw=8:ft=help:fo=tcq2:ai: