Permalink
Browse files

Add rules to leave from ''' block

  • Loading branch information...
kana committed Mar 29, 2012
1 parent 883969d commit 7d19a861e61d5dc045dfa9e09f69ea2dd773bf20
Showing with 16 additions and 0 deletions.
  1. +1 −0 autoload/smartinput.vim
  2. +15 −0 t/api.vim
View
@@ -103,6 +103,7 @@ function! smartinput#define_default_rules() "{{{2
\ ])
call urules.add('''''''', [
\ {'at': '''''\%#', 'char': '''', 'input': '''''''''<Left><Left><Left>'},
+ \ {'at': '\%#''''''\ze', 'char': '''', 'input': '<Right><Right><Right>'},
\ {'at': '''''''\%#''''''', 'char': '<BS>', 'input': '<BS><BS><BS><Del><Del><Del>'},
\ {'at': '''''''''''''\%#', 'char': '<BS>', 'input': '<BS><BS><BS><BS><BS><BS>'},
\ ])
View
@@ -644,6 +644,19 @@ describe 'The default configuration'
\ ["'", [''''''], 1, 3 - 1],
\ ["'", [''''''''''''''], 1, 4 - 1],
\ ],
+ \ ''''''' leave #1': [
+ \ ["'", [''''''], 1, 2 - 1],
+ \ ["'", [''''''], 1, 3 - 1],
+ \ ["'", [''''''''''''''], 1, 4 - 1],
+ \ ["'", [''''''''''''''], 1, 7 - 1],
+ \ ],
+ \ ''''''' leave #2': [
+ \ ["'", [''''''], 1, 2 - 1],
+ \ ["'", [''''''], 1, 3 - 1],
+ \ ["'", [''''''''''''''], 1, 4 - 1],
+ \ ["x", ['''''''x'''''''], 1, 5 - 1],
+ \ ["'", ['''''''x'''''''], 1, 8 - 1],
+ \ ],
\ ''''''' undo #1': [
\ ["'", [''''''], 1, 2 - 1],
\ ["'", [''''''], 1, 3 - 1],
@@ -873,6 +886,8 @@ describe 'The default configuration'
\ ''''' undo #1',
\ ''''' undo #2',
\ ''''''' complete',
+ \ ''''''' leave #1',
+ \ ''''''' leave #2',
\ ''''''' undo #1',
\ ''''''' undo #2',
\ '"" complete',

0 comments on commit 7d19a86

Please sign in to comment.