Add viki compatible hints to README

This commit is contained in:
Miao Jiang 2012-10-25 00:59:21 +08:00
parent 3c18515955
commit 8e9bee94c8
2 changed files with 9 additions and 1 deletions

View File

@ -244,6 +244,14 @@ Compatible with Vimwiki - [issue #19](https://github.com/jiangmiao/auto-pairs/is
Reason: vimwiki uses `<expr>` on mapping `<CR>` that auto-pairs cannot expanding.
Solution: add `let g:AutoPairsMapCR = 0` to .vimrc to disable `<CR>` mapping.
Compatible with viki - [issue #25](https://github.com/jiangmiao/auto-pairs/issues/25)
Description: When works with viki `<CR>` will output viki#ExprMarkInexistentInElement('ParagraphVisible','<CR>')
Reason: viki uses `<expr>` on mapping `<CR>` that auto-pairs cannot expanding.
Solution A: add `let g:AutoPairsMapCR = 0` to .vimrc to disable `<CR>` mapping.
Solution B: add `autocmd filetype viki inoremap <buffer> <silent> <CR> <C-R>=viki#ExprMarkInexistentInElement('ParagraphVisible',"\n")<CR><C-R>=AutoPairsReturn()<CR>` to .vimrc
Remarks: Solution B need NOT add `let g:AutoPairsMapCR = 0` to .vimrc, if still cannot work for Solution B, then have to use Solution A to disable auto-pairs `<CR>`.
Breaks '.' - [issue #3](https://github.com/jiangmiao/auto-pairs/issues/3)
Description: After entering insert mode and inputing `[hello` then leave insert

View File

@ -282,7 +282,7 @@ function! AutoPairsReturn()
let cmd = " \<C-O>zz\<ESC>cl"
end
" If user has set equalprg, then avoid call =
" If equalprg has been set, then avoid call =
" https://github.com/jiangmiao/auto-pairs/issues/24
if &equalprg != ''
return "\<ESC>O".cmd