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

Re: Matchtime not working

Expand Messages
  • Charles Campbell
    ... In quickly diving into matchparen, I see that the matching brace is the MatchParen highlighting group. Consequently, hi clear MatchParen hi MatchParen
    Message 1 of 8 , May 1, 2012
      Dotan Cohen wrote:
      > On Tue, May 1, 2012 at 17:39, Taylor Hedberg<tmhedberg@...> wrote:
      >
      >> The highlighting you are used to is provided by the matchparen plugin.
      >> 'showmatch' and 'matchtime' are, on the other hand, for Vim's built-in
      >> (i.e. not implemented as a plugin) matching functionality, which, rather
      >> than highlighting, jumps the cursor to the matching opening
      >> brace/bracket/parenthesis for a brief time after the closing character
      >> in the pair is typed. Try typing some opening and closing parentheses
      >> after `:set showmatch` and you'll see what I mean. This feature is
      >> turned off by default.
      >>
      >> As far as I know, the matchparen plugin does not refer to the
      >> 'matchtime' option to determine how long to highlight; it is either on
      >> indefinitely or it is off. Barring modification to the plugin itself, I
      >> don't think there's any way to get precisely what you want.
      >>
      > Thanks Taylor, I see it now. I was testing with existing code,
      > expecting to put the cursor on a brace and see the match. I now
      > understand that it only works for typing out new code.
      >
      > Is there any way to change the behaviour of the matchparen plugin to
      > underline the matching brace, instead of highlighting it? I often get
      > confused which is the highlighted brace and which brace has the
      > cursor.
      >
      In quickly diving into matchparen, I see that the matching brace is the
      MatchParen highlighting group.

      Consequently,

      hi clear MatchParen
      hi MatchParen gui=underline cterm=underline

      should do the trick. When you're happy with it, put these two lines into

      .vim/after/plugin/matchparen.vim

      Regards,
      Chip Campbell

      --
      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
    • Dotan Cohen
      On Tue, May 1, 2012 at 19:15, Charles Campbell ... Thank you Chip. That does exactly what I need! I will also take your example and try my hand at delving
      Message 2 of 8 , May 1, 2012
        On Tue, May 1, 2012 at 19:15, Charles Campbell
        <Charles.E.Campbell@...> wrote:
        > In quickly diving into matchparen, I see that the matching brace is the
        > MatchParen highlighting group.
        >
        > Consequently,
        >
        >  hi clear MatchParen
        >  hi MatchParen gui=underline cterm=underline
        >
        > should do the trick.  When you're  happy with it, put these two lines into
        >
        > .vim/after/plugin/matchparen.vim
        >
        > Regards,
        > Chip Campbell

        Thank you Chip. That does exactly what I need! I will also take your
        example and try my hand at "delving" into the matchparen plugin to
        learn a bit about how this is done.

        Thanks!

        --
        Dotan Cohen

        http://gibberish.co.il
        http://what-is-what.com

        --
        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.