HTML/XHTML Editing Plugin: Frequently Asked Questions
Index:
- Why am I getting an error when I try to set options for the plugin?
- My configuration stopped working, what happened?
- How do I disable the tab mapping?
- How do I prevent the plugin from overriding mappings I have defined?
- How do I disable any mapping?
- How do I make the mappings insert uppercase tags instead of lowercase?
- How do I make the mappings insert XHTML tags?
- How do I change the map leader from ; or the character entities map leader from & to something else?
- How do I keep the mappings from interfering when I edit CSS, JavaScript, PHP, etc?
- Where is the VimBall archive?
- Is there an HTML/XHTML strict mode for the mappings?
1. Why am I getting an error when I try to set options for the plugin?
You need to initialize the configuration dictionary variable to an empty
value first, by doing ":let g:htmlplugin = {}
" in your vimrc
before any other configuration commands.
2. My configuration stopped working, what happened?
For readability and maintainability in version 1.5.0 I renamed some of the configuration variables. Please refer to the documentation to determine what they are called now, and how they work.
3. How do I disable the tab mapping?
You can disable the default tab mapping by putting ":let
g:htmlplugin.no_tab_mapping = 'yes'
" in your vimrc.
This will change the default tab mapping to <lead>tab
(;tab
) instead.
4. How do I prevent the plugin from overriding mappings I have defined?
You can prevent the plugin from overriding a mapping you have defined
elsewhere—such as in your ~/.vimrc—by putting ":let
g:htmlplugin.no_map_override = 'yes'
" in your vimrc.
5. How do I disable any mapping?
You can disable any mapping that the plugin defines by adding an entry
that will match it to "g:htmlplugin.no_maps
", which is a list.
For example, to disable the ;ah
and
;im
mappings for all modes, put ":let g:htmlplugin.no_maps =
[';ah', ';im']
" in your vimrc.
Mappings that match this list will be suppressed regardless of the mode
the mapping is for, and the list will not undergo
g:htmlplugin.map_leader
and
g:htmlplugin.map_entity_leader
substitution.
6. How do I make the mappings insert uppercase tags instead of lowercase?
You can make the output of the mappings uppercase by putting ":let
g:htmlplugin.tag_case = 'uppercase'
" in your vimrc.
7. How do I make the mappings insert XHTML tags?
You can make the mappings output transitional XHTML by putting ":let
g:htmlplugin.do_xhtml_mappings = 'yes'
" in your vimrc.
8. How do I change the map leader from ; or the character entities map leader from & to something else?
You can change the default leader from ";
" to something
else—"_
" for example—by putting ":let
g:htmlplugin.map_leader = '_'
" in your vimrc.
You may also change the leader for the &-mappings by putting something
like ":let g:htmlplugin.map_entities_leader = '\'
" in your vimrc.
- :help g:htmlplugin.map_leader
- :help g:htmlplugin.map_entities_leader
- :help html-tags
- :help character-entities
9. How do I keep the mappings from interfering when I edit CSS, JavaScript, PHP, etc?
You can temporarily turn off all the mappings for the current buffer by
typing ":HTMLplugin disable
" within Vim. You can re-enable
them with ":HTMLplugin enable
".
You can shorten the command to just ":HTML
" and the arguments
"off
" and "on
" are valid.
10. Where is the VimBall archive?
VimBall is no longer supported as an installation method.
11. Is there an HTML/XHTML strict mode for the mappings?
No, because it is assumed that when an author wants strict (X)HTML he will not use the mappings that output transitional tags.
The only concession to strict mode is the ";s4
" mapping.