Advertisement
Hey all, this has been bugging me for a bit. I have some odd highlighting going on when I edit text files whch I *think* is coming in from some html syntax highlighter. The 2 things that are annoying me are a) apostrophes get treated as string denoters, so if I type "isn't", everything after the ' gets turned into a single colour, until I hit another '. b) Putting things between *stars* makes it go all bold, which gets in the way :)
How do I /undo/ existing highlight rules?
Cheers....
How do I /undo/ existing highlight rules?
Cheers....
Advertisement
Advertisement
-
Re: Removing existing highlighting ing
Sun, February 5, 2006 - 5:36 PMwhich vi are you using? Is it vim? -
-
Re: Removing existing highlighting ing
Mon, February 6, 2006 - 3:38 AMYup. 6.3 mostly. -
-
Re: Removing existing highlighting ing
Tue, February 7, 2006 - 8:10 AMgot it
:set hls!
you can map it too -
-
Re: Removing existing highlighting ing
Tue, February 7, 2006 - 10:06 AMhls? Hmm, isn't that highlight searching? (i.e. highlight the thing you're looking for.) Sorry, maybe I wasn't as clear as I might have been.. :)
Actually, I just went through the help again, to see if I could work it out. Turns out the commands I needed were:
" To turn off highlighting of everything between any single quotes (e.g. isn'...t -> doesn...'t):
:hi link htmlString NONE
" To turn off big bright inverse colours for italicised text
:hi htmlItalics NONE
That's sorted me out.
(Some context: I'm using the Markdown highlighting file from the vim script archives, which links certain strings to html highlighting. I've added the two commands above (without colons) to the syntax/mkd.vim file.
In fact, can anyone explain what this means?:
syn region htmlString start="("ms=e+1 end=")"me=s-1
I know it sets up a syntax region, but what's the start and end values?
)
-
-
Re: Removing existing highlighting ing
Tue, February 7, 2006 - 2:20 PMI think we missed each other. You were after the definitions, I was talking about the search function. You missed the exclamation point. I missed the perment edit.
:set hls! <--- Exclamation point!
which turns off highlighting after search
As long as it's vi it all good! Sorry I wan't a help :)
-
-
-
-
-
Re: Removing existing highlighting ing
Wed, February 8, 2006 - 5:38 PMSounds like it's doing syntax highlighting. Try this
:syntax off
I added it to my .exrc file and only turn it on when I can't find where I missed a closing quote.