Permalink
Browse files

Add viki compatible hints to README

  • Loading branch information...
jiangmiao committed Oct 24, 2012
1 parent 3c18515 commit 8e9bee94c8c338cd48b75cc3f880819486f930e3
Showing with 9 additions and 1 deletion.
  1. +8 −0 README.md
  2. +1 −1 plugin/auto-pairs.vim
View
@@ -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
@@ -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

0 comments on commit 8e9bee9

Please sign in to comment.