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

69373Re: Add an option for matchparen to disable it in insert mode

Expand Messages
  • Christian Brabandt
    May 2, 2013
      Hi Ingo!

      On Do, 02 Mai 2013, Ingo Karkat wrote:

      > #v+
      > autocmd CursorMovedI *
      > \ if exists('b:matchparen_no_insertmode') |
      > \ if b:matchparen_no_insertmode |
      > \ return |
      > \ endif
      > \ elseif exists('g:matchparen_no_insertmode') &&
      > g:matchparen_no_insertmode |
      > \ return |
      > \ endif |
      > \ ...
      > #v-

      Excuse me for chiming in, but I find this construct rather ugly and
      unreadable. How about this instead:

      #v+
      autocmd CursorMovedI *
      \ if get(b:, 'matchparen_no_insertmode', 0) ||
      \ get(g:, 'matchparen_no_insertmode', 0)
      \ return |
      \ endif |
      \ ...
      #v-

      regards,
      Christian
      --
      Es ist lange her, daß sich die menschliche Phantasie die Hölle
      ausgemalt hat, aber erst durch ihre jüngst erworbenen Fertigkeiten ist
      sie in die Lage versetzt worden, ihre einstigen Vorstellungen zu
      verwirklichen.
      -- Bertrand A. W. Russell

      --
      --
      You received this message from the "vim_dev" 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

      ---
      You received this message because you are subscribed to the Google Groups "vim_dev" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Show all 19 messages in this topic