File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -246,7 +246,8 @@ Compatible with Vimwiki - [issue #19](https://github.com/jiangmiao/auto-pairs/is
246
246
247
247
Breaks '.' - [ issue #3 ] ( https://github.com/jiangmiao/auto-pairs/issues/3 )
248
248
249
- Description: After entering insert mode and inputing `[hello` then leave insert mode by `<ESC>`, press '.' will insert 'hello' instead of '[hello]'.
249
+ Description: After entering insert mode and inputing `[hello` then leave insert
250
+ mode by `<ESC>`. press '.' will insert 'hello' instead of '[hello]'.
250
251
Reason: `[` actually equals `[]\<LEFT>` and \<LEFT> will break '.'
251
252
Solution: none
252
253
Original file line number Diff line number Diff line change 1
1
" Insert or delete brackets, parens, quotes in pairs.
2
2
" Maintainer: JiangMiao <jiangfriend@gmail.com>
3
3
" Contributor: camthompson
4
- " Last Change: 2012-07-15
5
- " Version: 1.2.3
4
+ " Last Change: 2012-08-17
5
+ " Version: 1.2.4
6
6
" Homepage: http://www.vim.org/scripts/script.php?script_id=3599
7
7
" Repository: https://github.com/jiangmiao/auto-pairs
8
8
@@ -267,8 +267,8 @@ function! AutoPairsReturn()
267
267
let cmd = ' '
268
268
let cur_char = line [col (' .' )-1 ]
269
269
if has_key (g: AutoPairs , prev_char) && g: AutoPairs [prev_char] == cur_char
270
- if g: AutoPairsCenterLine && winline () * 1.5 >= winheight (0 )
271
- let cmd = " \<C-O> zz\<ESC> cl "
270
+ if g: AutoPairsCenterLine && winline () * 3 >= winheight (0 ) * 2
271
+ let cmd = " \<C-O> zz\<BS> "
272
272
end
273
273
" conflict with javascript and coffee
274
274
" javascript need indent new line
You can’t perform that action at this time.
0 commit comments