*daps.txt* Plugin for using daps (https://opensuse.github.io/daps) commands inside Vim.

                                                           *daps-installation*
I recommend using a plugin manager such as vim-plug (https://github.com/junegunn/vim-plug)
to install and update vim-daps.
If you do not want to use a plugin manager, download and uncompress the tarball into
your ~/.vim/plugin directory.

                                                           *daps-requirements*
You need to have daps (https://opensuse.github.io/daps) installed to use vim-daps
commands in your Vim editor.


Note:
Before using any of vim-daps commands, you first have to specify which DC file
you are going to use in the current buffer with the :DapsSetDCfile <DC-file> command.
You can make vim-daps ask you for the DC file on a new buffer startup by setting
g:let daps_dcfile_autostart = 1

Commands:
:DapsSetDCfile <dc-file>
  Specifies the DC file to be used by the current Vim buffer.

:DapsValidate
  Validates the DocBook XML document specified by the give DC file.

:DapsHtml
  Builds HTML from the DocBook XML document in the current buffer.
  If the cursor is on a suitable line with id="...', then this
  ROOTID will be built.

:DapsPdf
  Builds PDF from the DocBook XML document in the current buffer.
  If the cursor is on a suitable line with id="...', then this
  ROOTID will be built.

:DapsXmlFormat
  Beautifies the XML source code in the current buffer.

:DapsImportEntites <entity_file>
  Imports XML entities found in the given file for auto-completion
  purposes. If no file is specified, entities are imported from
  the current file's <!ENTITY tag.

:DapsSetDoctype <doctype>
  Set DocType for DocBook documents and import available entities. vim-daps
  ships with 'docbook50' (default), and 'geekodoc5'.

:DapsStylecheck
  Check the current buffer's DocBook and content style, then displays
  error messages in a quickfix window.

:DapsOpenTarget <target_id>
  Opens a new tab with a file that contains the specified xml:id. You can
  specify the ID in the command line with tab-completion, or place a cursor
  on a <xref> line and the ID will be read for you. If the current line
  contains <link xlink:href=", the URL is opened in a Web browser window.
  If both <xref> and <link> are on the current line, both the referenced
  file is opene in a new tab, and the URL in a browser.

:DapsSetBuilddir <build_dir>
  Set the target directory for the --builddir option. Each buffer can have
  its own build_dir.

:DapsImportXmlIds
  Imports XML IDs from the current book/bookset based on a provided DC file.
  You can then auto complete them inside the '<xref linkend=""/>' tag.

:DapsShiftSectUp :DapsShiftSectDown
  Shifts the visually selected DocBook XML sections' structure up or down
  one level. Useful for refactoring documents.

                                                           *daps-settings*
g:daps_dcfile_autostart = 1 or 0
  Specifies if Vim should ask you for the DC file for the first
  buffer automatically after the buffer is opened. If set to 0, Vim asks you
  for the DC file when a daps command needs it. Note that if the DC file
  is already provided and you open a new tab, the DC you already provided
  will be used without asking for a new one. You can override the DC file name
  with :DapsSetDCfile for the current buffer.

g:daps_dcfile_glob_pattern = <pattern>
  Set the globbing pattern to be used for DC file autocompletion.

g:daps_entity_import_autostart
  If set to 1, runs XML entity import on DocBook files automatically.

g:daps_entfile_glob_pattern = <pattern>
  Globbing patter for entity file autocompletion. Default is '*'.

g:daps_doctype = <doctype>
  Set the default doctype for DocBook documents. Default is 'docbook50'.

g:daps_html_viewer = <command>
  Set the default application for viewing HTML output. Default is the desktop
  environment's MIME handler.

g:daps_pdf_viewer = <command>
  Set the default application for viewing PDF output. Default is the desktop
  environment's MIME handler.

g:daps_xmlschemas_autostart = 0 or 1
  If set to 1, looks for the 'xml/schemas.xml' file and parses the DocBook schema URI
  from it, possibly overriding the 'g:daps_doctype' setting. Default is 0.

g:daps_auto_validate_file = 0 or 1
  If set to 1, :DapsValidateFile() is run on the current buffer before :DapsValidate().
  Default is 0.

g:daps_builddir = <directory>
  Set the --builddir directory for the current buffer. Default is the 'build/' subdirectory
  of the current directory.

g:daps_auto_import_xmlids = 0 or 1
  Whether or not import all the XML IDs related for the current DC file
  to XML omnicompletion after a DC file is specified. Default is 1.
