mirror of https://github.com/tLDP/LDP
Vim spell check and tag completion.
This commit is contained in:
parent
d257a44f9b
commit
537436eb9c
|
@ -27,7 +27,6 @@
|
|||
length, but definitely needs some TLC from a Real Emacs
|
||||
User.
|
||||
-->
|
||||
|
||||
&configure-emacs;
|
||||
|
||||
<section id="tools-vim">
|
||||
|
@ -93,6 +92,75 @@
|
|||
the change in highlighting).
|
||||
</para>
|
||||
</section> <!-- vim-new-file -->
|
||||
|
||||
<section id="vim-spellcheck">
|
||||
<title>Spell Check</title>
|
||||
<para>
|
||||
As in <application>Emacs</application>,
|
||||
<application>Vim</application>, will work quite happily with
|
||||
<application>aspell</application>. It can be run from within Vim
|
||||
with the following:
|
||||
<userinput>:! aspell -c %</userinput>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
For more sophisticated spell check alternatives, give <ulink
|
||||
url="http://cream.sourceforge.net/">Cream</ulink> or <ulink
|
||||
url="http://www.vim.org/scripts/script_search_results.php?keywords=vimspell&script_type=&order_by=rating&direction=descending&search=search">vimspell</ulink> a try.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="vim-tagcompletion">
|
||||
<title>Tag Completion<title>
|
||||
|
||||
<para>
|
||||
The following information is provided by <ulink
|
||||
url="http://www.digitalhermit.com">Kwan Lowe</ulink>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Vim has a DocBook helper script which can be easily copied into
|
||||
your <filename class="directory">.vimscripts</filename>
|
||||
directory and used to <quote>auto complete</quote> tags while
|
||||
writing DocBook documents. The script can be downloaded from:
|
||||
<ulink url="http://www.vim.org/scripts/script.php?script_id=38"
|
||||
/>.
|
||||
</para>
|
||||
|
||||
<blockquote>
|
||||
<para>
|
||||
Grab the file, then untar it. Copy the
|
||||
<filename>dbhelper.vim</filename> to your <filename
|
||||
class="directory">.vimscripts</filename> directory if you have one.
|
||||
</para>
|
||||
<screen>
|
||||
<prompt>$ </prompt><command>mkdir</command> <filename class="directory".vimscripts</filename>
|
||||
<prompt>$ </prompt><command>cp</command> <filename>dbhelper.vim</filename> <filename class="directory">.vimscripts</filename>
|
||||
</screen>
|
||||
|
||||
<para>
|
||||
You'll also have to convert the dbhelper.vim file to unix formatting:
|
||||
</para>
|
||||
|
||||
<screen>
|
||||
<prompt>$ </prompt><command>dos2unix</command> <filename>dbhelper.vim</filename>
|
||||
</screen>
|
||||
|
||||
<para>
|
||||
Next, edit your <filename>.vimrc</filename> file and add the line:
|
||||
<userinput>source
|
||||
/home/yourname/.vimscripts/dbhelper.vim</userinput>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To use the scripts, enter vi and go into insert mode. Press
|
||||
<keycap>,</keycap> followed by the shortcut. For example:
|
||||
<userinput>,dtbk</userinput>
|
||||
</para>
|
||||
</blockquote>
|
||||
|
||||
</section>
|
||||
|
||||
</section> <!-- vim -->
|
||||
|
||||
<section id="tools-epcEdit">
|
||||
|
|
Loading…
Reference in New Issue