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

Re: Matchtime not working

Expand Messages
  • John Little
    ... That appears to be matchparen, a standard plugin . See :h matchparen I mostly don t like it, so put let g:loaded_matchparen = 1 in my .vimrc to suppress
    Message 1 of 8 , May 1, 2012
    • 0 Attachment
      On Tuesday, May 1, 2012 10:00:56 PM UTC+12, dotancohen wrote:
      > ... in all environments the matching brace is highlighted indefinitely...

      That appears to be matchparen, a "standard plugin".

      See :h matchparen

      I mostly don't like it, so put

      let g:loaded_matchparen = 1

      in my .vimrc to suppress it.

      Regards, John

      --
      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
      ... Thank you John. I have suppressed the matchparen as you mention, but I would still like to have the highlight show for one second. The showmatch and
      Message 2 of 8 , May 1, 2012
      • 0 Attachment
        On Tue, May 1, 2012 at 14:28, John Little <John.B.Little@...> wrote:
        > On Tuesday, May 1, 2012 10:00:56 PM UTC+12, dotancohen wrote:
        >> ... in all environments the matching brace is highlighted indefinitely...
        >
        > That appears to be matchparen, a "standard plugin".
        >
        > See :h matchparen
        >
        > I mostly don't like it, so put
        >
        >    let g:loaded_matchparen = 1
        >
        > in my .vimrc to suppress it.
        >
        > Regards, John
        >

        Thank you John. I have suppressed the matchparen as you mention, but I
        would still like to have the highlight show for one second. The
        showmatch and matchtime options are still not working. Can I enable
        them somehow?

        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
      • Taylor Hedberg
        ... 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
        Message 3 of 8 , May 1, 2012
        • 0 Attachment
          Dotan Cohen, Tue 2012-05-01 @ 15:14:08+0300:
          > I have suppressed the matchparen as you mention, but I would still
          > like to have the highlight show for one second. The showmatch and
          > matchtime options are still not working. Can I enable them somehow?

          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.
        • Dotan Cohen
          ... 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
          Message 4 of 8 , May 1, 2012
          • 0 Attachment
            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.

            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
          • Taylor Hedberg
            ... matchparen uses the MatchParen highlight group to highlight the matching character, so you can modify that group to change how it appears. For instance, in
            Message 5 of 8 , May 1, 2012
            • 0 Attachment
              Dotan Cohen, Tue 2012-05-01 @ 19:05:21+0300:
              > 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.

              matchparen uses the MatchParen highlight group to highlight the matching
              character, so you can modify that group to change how it appears.

              For instance, in my Vim, running in a color terminal, I can do the
              following to remove the highlighting effect and just underline instead:

              :highlight MatchParen ctermbg=NONE ctermfg=NONE cterm=underline

              You would need to tweak the above if you use the GUI version or a
              non-color terminal, but the idea is the same. See `:help :highlight` for
              details.
            • 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 6 of 8 , May 1, 2012
              • 0 Attachment
                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 7 of 8 , May 1, 2012
                • 0 Attachment
                  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.