Loading ...
Sorry, an error occurred while loading the content.
 

Re: How to highglight capital words??

Expand Messages
  • Tim Chase
    ... You can add the token to ensure that they go through the end of the word: match Keyword /[A-Z] {2,} / -tim -- You received this message from the
    Message 1 of 4 , Jan 20, 2013
      On 01/20/13 05:06, Aggelos Kolaitis wrote:
      > I'm trying to highlight words with capital letters with this in my .vimrc:
      >
      > match Keyword /[A-Z]\{2,\}/
      >
      > I know it's problematic, because it keeps doing this:
      >
      > Highlights SDLW from SDLWindow
      > Highlights SDL GL from SDL_GL_blahblah (doesn't highlight underscores)
      >
      > This destroys the readability of my source code.

      You can add the "\>" token to ensure that they go through the end of
      the word:

      match Keyword /[A-Z]\{2,}\>/

      -tim




      --
      You received this message from the "vim_use" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php
    • Aggelos Kolaitis
      ... Thanks for your advice tim. It works, but it still highlights text like this: aSDL I added
      Message 2 of 4 , Jan 20, 2013
        > You can add the "\>" token to ensure that they go through the end of
        >
        > the word:
        >
        > match Keyword /[A-Z]\{2,}\>/
        >
        > -tim

        Thanks for your advice tim. It works, but it still highlights text like this:
        aSDL

        I added \< so that the line is like this:

        match Keyword /\<[A-Z]\{2,\}\>/

        But that way it doesn't work at all. Have I messed it up a little bit?

        --
        You received this message from the "vim_use" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php
      • Aggelos Kolaitis
        ... Nah, nevermind I got it. It was a typo / instead of . It took a while but I fixed it and it works great. Tim, thanks again!! -- You received this message
        Message 3 of 4 , Jan 20, 2013
          Τη Κυριακή, 20 Ιανουαρίου 2013 5:01:12 μ.μ. UTC+2, ο χρήστης Aggelos Kolaitis έγραψε:
          > > You can add the "\>" token to ensure that they go through the end of
          > >
          > > the word:
          > >
          > > match Keyword /[A-Z]\{2,}\>/
          > >
          > > -tim
          >
          > Thanks for your advice tim. It works, but it still highlights text like this:
          > aSDL
          >
          > I added \< so that the line is like this:
          >
          > match Keyword /\<[A-Z]\{2,\}\>/
          >
          > But that way it doesn't work at all. Have I messed it up a little bit?

          Nah, nevermind I got it.
          It was a typo / instead of \. It took a while but I fixed it and it works great.
          Tim, thanks again!!

          --
          You received this message from the "vim_use" maillist.
          Do not top-post! Type your reply below the text you are replying to.
          For more information, visit http://www.vim.org/maillist.php
        Your message has been successfully submitted and would be delivered to recipients shortly.