Note
If you have xml files that do not have a .xml extension then eclipse may not recognize it as an xml file resulting in validation, completion, etc not working. Although the vim side may have the correct file type set, you may still need to add the file’s extension to the list of xml content types in the eclipse gui:
Xml code completion uses the standard Vim code completion mechanism like so:
<ser<Ctrl-X><Ctrl-U>
<servlet>
<ser<Ctrl-X><Ctrl-U>
<servlet>
<servlet-name>
...
Note
Requires a valid dtd or xsd to determine possible completions.
When editing xml files, eclim provides a couple commands which allow you to quickly and easily open the file’s data definition and optionally jump to the definition of a particular element.
Note
When opening urls, these commands rely on netrw (:help netrw).
When editing a xml file eclim will default to validating the file when it is written. Any errors will be added to the current window’s location list (:help location-list) and their corresponding line number noted via Vim’s sign functionality.
If you don’t want xml files validated when saving them, you can set the g:EclimXmlValidate variable described in the configuration section below.
Regardless of whether you have validation enabled upon saving or not, the following command is still available for validating xml files on demand.
:Validate - Validate the the current file.
If eclimd is not currently running, and the xmllint command is available, eclim will validate the xml file using that. Eclim will never use xmllint when saving the file with g:EclimXmlValidate enabled.
When editing a dtd file eclim will default to validating the file when it is written. Any errors will be added to the current window’s location list (:help location-list) and their corresponding line number noted via Vim’s sign functionality.
If you do not want your dtd files validated automatically when saved, you can set the g:EclimDtdValidate variable described in the configuration section below.
Whether or not auto validation has been enabled, eclim also exposes the command :Validate to manually execute the validation of the file.
When editing a xsd file eclim will default to validating the file when it is written. Any errors will be added to the current window’s location list (:help location-list) and their corresponding line number noted via Vim’s sign functionality.
If you do not want your xsd files validated automatically when saved, you can set the g:EclimXsdValidate variable described in the configuration section below.
Whether or not auto validation has been enabled, eclim also exposes the command :Validate to manually execute the validation of the file.