Rework vim editor configuration section to be clearer.

From BSDCan 2016 Doc lounge.

Reported by:	Chris Amos <spazmaticcelery@hotmail.com>
This commit is contained in:
Warren Block 2016-06-09 23:52:04 +00:00
parent 11b32fed9a
commit c6a77abb50
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=48905

View file

@ -41,13 +41,23 @@
<title><application>Vim</application></title>
<para>Install from <package>editors/vim</package>
or <package>editors/vim-lite</package>.</para>
or <package>editors/vim-lite</package>, then follow the
configuration instructions in
<xref linkend="editor-config-vim-config"/>.</para>
<sect2 xml:id="editor-config-vim-use">
<title>Use</title>
<para>Press <keycap>P</keycap> to reformat paragraphs or text that has been selected in Visual mode. Press
<keycap>T</keycap> to replace groups of eight spaces with a
tab.</para>
</sect2>
<sect2 xml:id="editor-config-vim-config">
<title>Configuration</title>
<para>Edit <filename>~/.vimrc</filename>, adding these
lines:</para>
lines to the end of the file:</para>
<programlisting>if has("autocmd")
au BufNewFile,BufRead *.sgml,*.ent,*.xsl,*.xml call Set_SGML()
@ -88,14 +98,6 @@ function Set_SGML()
return 0
endfunction " Set_SGML()</programlisting>
</sect2>
<sect2 xml:id="editor-config-vim-use">
<title>Use</title>
<para>Press <keycap>P</keycap> to reformat paragraphs or text that has been selected in Visual mode. Press
<keycap>T</keycap> to replace groups of eight spaces with a
tab.</para>
</sect2>
</sect1>
<sect1 xml:id="editor-config-emacs">