1

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="www.example.org">
        <linktext>Example Link</linktext>
    </link>
</related-links>

If I put the cursor within the <link>...</link> block and press vit, I would expect to select lines 2-4. Instead it selects the outer tag (<related-links> in this case).

Another example of this issue happened with the following XML file:

<related-links scope="external" format="html">
    <link href="www.example.org">
        <linktext>Example Link</linktext>

I should be able to type Ctrl+x,Ctrl+o to invoke omnicomplete to close the <link> tag. Instead it skips it and closes the <related-links> tag instead.

I've noticed this issue with a few different versions of Vim. Is this the intended behavior of the built-in XML ft? If so, why?

Edit: I am able to reproduce this with vim --noplugin -u NONE -N (if I set :filetype indent plugin on after starting Vim). This was with Vim 7.2.

  • 2
    I cannot reproduce your first issue, the selection works fine here. Can you have a look at this post: vi.stackexchange.com/questions/2003/… – nobe4 May 6 '16 at 14:07
  • 1
    Same here the selection works fine. – statox May 6 '16 at 14:40
  • 1
    I still cannot reproduce, this without any plugin/configuration... – nobe4 May 6 '16 at 15:41
  • 1
    I tried with coolwanglu.github.io/vim.js/emterpreter/vim.html and it still select correctly ... I don't really understand what's going on here... – nobe4 May 6 '16 at 16:00
  • 1
    Vim 7.2 is eight years old. You should try with a newer version one day. – romainl May 6 '16 at 16:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.