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.

link|improve this question

73% accept rate
1  
Are you talking about syntax highlighting in vim or styling html? – honk 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
feedback

3 Answers

up vote 4 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).

link|improve this answer
1  
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
feedback

If you are talking about html then you just need a CSS change called text-decoration.

link|improve this answer
feedback

It is due to function of

< span style='text-decoration:underline'> YOUR TEXT < /span>
and its result will be YOUR TEXT underlined. So put none at place of underline.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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