Raimondi / delimitMate

Vim plugin, provides insert mode auto-completion for quotes, parens, brackets, etc.
http://www.vim.org/scripts/script.php?script_id=2754
1.99k stars 116 forks source link

fix maparg typo #215

Closed RGBD closed 9 years ago

RGBD commented 9 years ago

I found issue https://github.com/Raimondi/delimitMate/issues/204. This code:

    if maparg('<BS>'. 'i') == ''
      silent! imap <unique> <buffer> <BS> <Plug>delimitMateBS
    endif
    if maparg('<C-h>'. 'i') == ''
      silent! imap <unique> <buffer> <C-h> <Plug>delimitMateBS
    endif

doesn't work as intended. maparg really returns ant empty string, so the control flow enters the if statement, but due to silent!, error "mapping already exists" is omitted. As @perrin4869 noted, comma should be used instead. Related issue: (https://github.com/Raimondi/delimitMate/issues/204)