Clarify the use of tabs in documentation and add a Vim configuration

example.
This commit is contained in:
Tom Hukins 2003-04-10 21:13:09 +00:00
parent 0e394c26e8
commit 825301e946
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=16527

View file

@ -183,9 +183,10 @@
<emphasis>regardless</emphasis> of the indentation level of the file
which might contain this one.</para>
<para>Every start tag increases the indentation level by 2 spaces, and
every end tag decreases the indentation level by 2 spaces. Replace
as many leading spaces with tabs as appropriate. Do not use
<para>Opening tags increase the indentation level by 2 spaces.
Closing tags decrease the indentation level by 2 spaces. Blocks
of 8 spaces at the start of a line should be replaced with a tab.
Do not use
spaces in front of tabs, and do not add extraneous whitespace at the
end of a line. Content
within elements should be indented by two spaces if the content runs
@ -209,11 +210,6 @@ V
<emphasis>regardless</emphasis> of the indentation level of the file
which might contain this one.</para>
<para>Every start tag increases the indentation level by 2 spaces, and
every end tag decreases the indentation level by 2 spaces. Content
within elements should be indented by two spaces if the content runs
over more than one line.</para>
...
</sect2>
</sect1>
@ -224,6 +220,19 @@ V
<literal>sgml-mode</literal> should be loaded automatically, and the
<application>Emacs</application> local variables at the bottom of each file should enforce these
styles.</para>
<para><application>Vim</application> users might want to configure
their editor with:</para>
<programlisting>augroup sgmledit
autocmd FileType sgml set formatoptions=cq2l " Special formatting options
autocmd FileType sgml set textwidth=70 " Wrap lines at 70 spaces
autocmd FileType sgml set shiftwidth=2 " Automatically indent
autocmd FileType sgml set softtabstop=2 " Tab key indents 2 spaces
autocmd FileType sgml set tabstop=8 " Replace 8 spaces with a tab
autocmd FileType sgml set autoindent " Automatic indentation
augroup END</programlisting>
</sect2>
<sect2>