Skip to content

Instantly share code, notes, and snippets.

@passy
Created June 12, 2013 15:31
Show Gist options
  • Select an option

  • Save passy/5766370 to your computer and use it in GitHub Desktop.

Select an option

Save passy/5766370 to your computer and use it in GitHub Desktop.
diff --git a/autoload/smartinput.vim b/autoload/smartinput.vim
index 15a9363..9b71f18 100644
--- a/autoload/smartinput.vim
+++ b/autoload/smartinput.vim
@@ -73,7 +73,7 @@ function! smartinput#define_default_rules() "{{{2
endfunction
call urules.add('()', [
\ {'at': '\%#', 'char': '(', 'input': '()<Left>'},
- \ {'at': '\%#\_s*)', 'char': ')', 'input': '<C-r>=smartinput#_leave_block('')'')<Enter><Right>'},
+ \ {'at': '\%#\s*)', 'char': ')', 'input': '<C-r>=smartinput#_leave_block('')'')<Enter><Right>'},
\ {'at': '(\%#)', 'char': '<BS>', 'input': '<BS><Del>'},
\ {'at': '()\%#', 'char': '<BS>', 'input': '<BS><BS>'},
\ {'at': '\\\%#', 'char': '(', 'input': '('},
@@ -81,14 +81,14 @@ function! smartinput#define_default_rules() "{{{2
\ ])
call urules.add('[]', [
\ {'at': '\%#', 'char': '[', 'input': '[]<Left>'},
- \ {'at': '\%#\_s*\]', 'char': ']', 'input': '<C-r>=smartinput#_leave_block('']'')<Enter><Right>'},
+ \ {'at': '\%#\s*\]', 'char': ']', 'input': '<C-r>=smartinput#_leave_block('']'')<Enter><Right>'},
\ {'at': '\[\%#\]', 'char': '<BS>', 'input': '<BS><Del>'},
\ {'at': '\[\]\%#', 'char': '<BS>', 'input': '<BS><BS>'},
\ {'at': '\\\%#', 'char': '[', 'input': '['},
\ ])
call urules.add('{}', [
\ {'at': '\%#', 'char': '{', 'input': '{}<Left>'},
- \ {'at': '\%#\_s*}', 'char': '}', 'input': '<C-r>=smartinput#_leave_block(''}'')<Enter><Right>'},
+ \ {'at': '\%#\s*}', 'char': '}', 'input': '<C-r>=smartinput#_leave_block(''}'')<Enter><Right>'},
\ {'at': '{\%#}', 'char': '<BS>', 'input': '<BS><Del>'},
\ {'at': '{}\%#', 'char': '<BS>', 'input': '<BS><BS>'},
\ {'at': '\\\%#', 'char': '{', 'input': '{'},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment