Questions tagged [filetype-xml]

The tag has no usage guidance.

0
votes
1answer
17 views

How do I move to the beginning of a visual block from a vimscript function?

Suppose i have several lines of text: line1 line1 line2 line2 line3 line3 I want to create a vimscript function that has the following result: <itemizedlist> <listitem><para>line1 ...
0
votes
1answer
25 views

Vim does not spellcheck the content of <title> element in my DocBook files

I have initiated online spell checking in .vimrc with autocmd FileType docbk set spell spelllang=en autocmd FileType docbk highlight SpellBad cterm=underline ctermfg=red ctermbg=none in my plugin's ...
-1
votes
2answers
32 views

Increase numbers by one in a visual block

I edit DocBook XML files. In my plugin, i want to implement a function that would increase or decrease the section numbers recursively, assuming that cursor is at the toplevel section. For example, ...
3
votes
5answers
62 views

Replace all self-closing xml tags with open and close tags

I have an XML document with many (dozens) of the following tags: <item prop1="val1" prop2="val2" /> I would like to change this to: <item prop1="val1" prop2="val2"> <sometihng>...
1
vote
1answer
32 views

Find and replace in XML file in vi

I have an .xml file which contains many times the following web beacon <span lang="EN" class="multilang">ANY TEXT TOTO</span> I would like to make a "Find&Replace": each web beacon ...
1
vote
1answer
52 views

xml ftplugin overrides textwidth

I would like to hard wrap XML files during editing. In every other filetype my set textwidth=80 works fine. But in XML something overrides the insertion of line breaks. I tried adding t to ...
0
votes
1answer
28 views

Why is my XML filetype configuration overridding my PHP filetype configuration?

I'm using Vundle and have othree/xml.vim installed, as well as my own bundle for working with PHP. My PHP bundle has the following code: if exists('b:did_ftplugin') && 1 == b:did_ftplugin ...
2
votes
1answer
269 views

How do I remove newlines inside arbitrary xml tags matching a pattern?

I'm working with large xml files that have tags, and some are spread across multiple lines, and some are on a single line. I'd like them to all be on a single line. There are other tags in the files ...
1
vote
0answers
118 views

Jump from tag-to-tag in xml?

I'm using emmet-vim which says that it can work in xml files but I can't seem to navigate between tags. Say I have this structure: <dependency> <groupId>com.google</groupId> &...
1
vote
1answer
51 views

Make UltiSnips perform XML encoding on tabstop text

I'm writing an XML document where I frequently produce markup like this: We can exit Terminal mode by pressing <keystroke>&lt;C-\&gt;&lt;C-n&gt;</keystroke>. I'd like to ...
4
votes
2answers
92 views

Linewise inner tag without the tag lines?

An example HTML, with the cursor where the brackets are: <foo> <bar> baz quux [] </bar> </foo> I would like to outdent the text inside <...
1
vote
3answers
255 views

Conversion from XML to KML

I have an XML file with this format (there could be some leading spaces): <Latitude>23.1138</Latitude> <Longitude>8.2898</Longitude> ... <Latitude>19....
1
vote
0answers
43 views

Why does Vim treat the `<link>` tag in XML files differently?

I've noticed that omnicomplete and keyboard motions don't work in XML files with a <link> tag as expected. For example <related-links scope="external" format="html"> <link href="...
0
votes
2answers
369 views

How to remove line breaks in xml tags?

I often have to write XML where text-width has been manually set by another editor: <context> <p>Here is a paragraph about some stuff that happened and someone did a nice ...
2
votes
0answers
214 views

Make vim version 7 edit xml files

I'm using old Debian linux an vim version 7.1.314. I would like to edit eclipse .cproject file that build using XML syntax. Currently vim shows not colored information. I found vim plugin that I hope ...
5
votes
2answers
7k views

How to format xml or html's attributes into multiple lines instead of lining up on one line?

I'm using plugin Chiel92/vim-autoformat auto formatting xml files. So the default format program used for xml file is tidy. The way it formats xml file is like below: <List id='list' items='{/sss}'...
4
votes
2answers
681 views

Highlight XML errors based on this XML file's XML Schema

I have an XML file that must conform to a particular XML Schema: <?xml version="1.0" encoding="UTF-8"?> <myroot xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
2
votes
2answers
298 views

Tips for quickly formatting a single line of XML?

I have a log file with lots of web service XML data (example follows). Ideally I would like to just go to a line and type ,x to create pretty formatted XML for readability. Response XML: <...
42
votes
3answers
9k views

How to jump between matching HTML/XML tags?

How to jump between matching tags (such as <div>, <span>, etc.) when editing HTML/XHTML/XML documents similarly as % is used to jump between matching parentheses?
3
votes
1answer
1k views

How to make auto-indent XML in vim?

I am thinking on a similar solution, which Eclipse also does: during the editing, the editor tries to always hold in a "well-indented" format of the edited textual data. Ideally, it would happen very ...