Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I type a HTML element a, there is always a underline. I want to stop this, but do not know how?

I'm talking about the vim syntax highlight.

share|improve this question
Are you talking about syntax highlighting in vim or styling html? – Benjamin Bannier Sep 30 '10 at 15:50
Isn't it also clickable in Vim, to open the link in a browser? (Hence: maybe it's not just about how it's displayed?) – Arjan Sep 30 '10 at 17:13
@Arjan: vim's syntax highlighting displays the anchor text (content of the <a> tag) in underline. – grawity Sep 30 '10 at 19:24
up vote 5 down vote accepted

Make a copy of the html.vim syntax highlighting definition.

mkdir -p ~/.vim/syntax
cp /usr/share/vim/vim73/syntax/html.vim ~/.vim/syntax/
# "vim72" for version 7.2
vim ~/.vim/syntax/html.vim

Find this line: (should be around line 248)

    HtmlHiLink htmlLink                    Underlined

To disable styling completely, comment out the line (prefix with a " double-quote).

To change appearance, replace the Underlined part with a different highlight definition (such as htmlBold, or define your own: there are several examples just below that line).

share|improve this answer
Or better yet, just put something like "highlight link htmlLink text" in: ~/.vim/after/syntax/html.vim -- that way you won't have to worry about what happens when a new version of the default html.vim comes out. – Heptite Sep 6 '11 at 16:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.