HTML hints not working just after >


I was testing the HTML mode completion on the demo here:

If I place the cursor after a > (for example, at the end of the line with <body>, but any place just after > works) and hiy Ctrl+space, nothing happens. Then, if I first add a space (so that the cursor is not immediately after >) and hit Ctrl+space, I’m shown the hints.

The same thing doesn’t seem to happen with XML completion.


I can not reproduce this issue on Chrome (putting the cursor directly after <body> and pressing ctrl-space gives me a list of completions). Does it happen on all browsers for you? If now, which browser shows the problem?

I originally tested with firefox (actually Iceweasel), but to be sure I tried again with chrome (actually, chromium) and I still see the same problem.

If that’s relevant:

Iceweasel (33)

Chromium (38)

Konqueror (4.14)

Right, I managed to reproduce this now. See for a fix.

Nice, thank you.


I have problem with hints while opening the tag. If I put ‘<’ before the text not the space then hints are not shown up it disappears. even though for the shortcut CTRL+space.

I don’t understand the problem. Can you try to describe it a bit more clearly?

please check the screen shot of 2nd one. I have tried to put the tag animal before the text “test”… but the hints not displayed. Also the short cut option CTRL+SPACE not working

I think I get what you mean now. Does help?

I think codemirror reacts in such a way that it treats the text after the charecter ‘<’ as a tagName. I cannot able to select the tag options (list of hints) when typing the text. if there is no immidiate space after the charecter ‘<’.

is there any way to change the way of codemirror works. the list of hits need to work even though text presence after enter the charecter ‘<’

I’ve decided to change CodeMirror’s completion logic to that of most other editors: When your cursor is in the middle of (or in front of) a word, that word is no longer included when searching for a completion. So completing at ‘foo|bar’ (where the | is the cursor) will now give you everything that starts with ‘foo’, and only replace the word ‘foo’, rather than looking for ‘foobar’ and replacing the whole word. See patch

1 Like

This is what I expected…