Without any specific regularity my vim displays underlines on the place of tabs (see below).
Sometimes it also happens to the text: I type and it's underlined.
What could be a reason?
This is likely due to the fact that you are editing an html file and the text near the underline is inside of an <a>
tag.
To disable this you can add let html_no_rendering=1
to your ~/.vimrc
. This setting will, however, also disable bold and italic styling for html files.
If you wish to only disable the underlining, see :help html.vim
. There it gives you instructions on what highlight groups you need to redefine without underline
.
This method (cobbled from other responses) will enable underline only under the text portion of the link without modifying the full html.vim syntax file.
Paste the following into that file:
" disable the current htmlLink syntax
highlight link htmlLink text
" enable a new htmlLink syntax
syn region htmlLink start="<a\>\_[^>]*\<href\>" end="</a>"me=e-4 keepend contains=@Spell,htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,htmlLinkText,javaScript,@htmlPreproc
syn match htmlLinkText contained contains=@Spell,htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,htmlLinkText,javaScript,@htmlPreproc "^\s*\zs.\{-}\ze\s*$"
syn match htmlLinkText contained contains=@Spell,htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,htmlLinkText,javaScript,@htmlPreproc "\S.\{-}\ze\s*$"
" enable the new syntax
hi def link htmlLinkText Underlined
It's probably one of two things, either:
'list'
set: (try :set list?
and if this says list
, try :set nolist
)<F3>
. If it shows a highlighting group, type hi GROUPNAME
to confirm the highlighting (with GROUPNAME replaced by the last named group in angle brackets). Then adjust your colour scheme to get rid of the underline.Mapping to identify highlight group:
map <F3> :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<' . synIDattr(synID(line("."),col("."),0),"name") . "> lo<" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">" . " FG:" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"fg#") . " BG:" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"bg#")<CR>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With