From 583d0a4196ceaeb7a4cbb9c699be930900c8c623 Mon Sep 17 00:00:00 2001 From: "jiangfriend@gmail.com" Date: Thu, 22 Dec 2011 12:30:04 +0800 Subject: [PATCH] update README --- README.md | 23 ++++++++++++++++++++--- plugin/auto-pairs.vim | 2 +- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1aed80e..102df4d 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,19 @@ Features input: |'hello' (press ( at|) output: ('hello') +* Quick jump to closed pair. + + input: + { + something;| + } + + (press } at |) + + output: + { + + }| Shortcuts --------- @@ -135,7 +148,11 @@ TroubleShooting * How to insert parens purely There are 3 ways - 1 use Ctrl-V ) to insert paren without trigger the plugin. - 2 use Alt-P to turn off the plugin. - 3 use DEL or x to delete the character insert by plugin. + + 1. use Ctrl-V ) to insert paren without trigger the plugin. + + 2. use Alt-P to turn off the plugin. + + 3. use DEL or x to delete the character insert by plugin. + diff --git a/plugin/auto-pairs.vim b/plugin/auto-pairs.vim index 5b503bc..a7b2938 100644 --- a/plugin/auto-pairs.vim +++ b/plugin/auto-pairs.vim @@ -85,7 +85,7 @@ function! AutoPairsInsert(key) end " Skip the character if next - if next_char == '' + if current_char == '' let next_lineno = line('.')+1 let next_line = getline(nextnonblank(next_lineno)) let next_char = matchstr(next_line, '\s*\zs.')