VIM has many features to help you write XML content such as DocBook,
including syntax highlighting and customizable key bindings.
Additionally, one can easily use external programs from VIM for features
such as spell-checking.
This chapter assumes you already know generally how to use VIM; if you
want to learn how, try the vimtutor
or by typing
:help tutor
from inside VIM.
Below is a short sample .vimrc
file that turns on
some VIM features useful for editing SGML or XML content such as
DocBook:
" Turn off vi compatibility settings like limited undo
set nocompatible
" Syntax highlighting based on file extension
syntax on
" Automatically insert newlines after 80 characters
set textwidth=80
" Automatically indent
set autoindent
" Match SGML tags with %
source $VIMRUNTIME/macros/matchit.vim
Note | |
---|---|
Some of these features require the |