Removing existing highlighting ing

topic posted Sat, February 4, 2006 - 9:38 AM by  Scribe
Share/Save/Bookmark
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....
posted by:
Scribe
Advertisement
Advertisement
  • Re: Removing existing highlighting ing

    Sun, February 5, 2006 - 5:36 PM
    which vi are you using? Is it vim?
    • Re: Removing existing highlighting ing

      Mon, February 6, 2006 - 3:38 AM
      Yup. 6.3 mostly.
      • Re: Removing existing highlighting ing

        Tue, February 7, 2006 - 8:10 AM
        got it
        :set hls!
        you can map it too
        • Re: Removing existing highlighting ing

          Tue, February 7, 2006 - 10:06 AM
          hls? 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 PM
            I 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 :)

Recent topics in "Vi"

Topic Author Replies Last Post
Capitalises last entered letter Bearterrible 5 December 16, 2008
I love VI!! Steven 2 December 22, 2007
How many people use VI-style keybindings with readline (inc. B... Steven 2 December 18, 2007
slightly n00b question Alex 24 August 27, 2007