Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add rules to leave from ''' block

  • Loading branch information...
commit 7d19a861e61d5dc045dfa9e09f69ea2dd773bf20 1 parent 883969d
@kana authored
Showing with 16 additions and 0 deletions.
  1. +1 −0  autoload/smartinput.vim
  2. +15 −0 t/api.vim
View
1  autoload/smartinput.vim
@@ -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
15 t/api.vim
@@ -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',
Please sign in to comment.
Something went wrong with that request. Please try again.