From a243c5b22d450ef6f4f3a13079e139bbd8e0489a Mon Sep 17 00:00:00 2001 From: mattn Date: Mon, 11 Jun 2012 21:42:50 +0900 Subject: fix inline template. Just be possible to expand: var f = |; to var f = (function() { | }; --- plugin/sonictemplate.vim | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'plugin/sonictemplate.vim') diff --git a/plugin/sonictemplate.vim b/plugin/sonictemplate.vim index 8e5f895..dd91430 100644 --- a/plugin/sonictemplate.vim +++ b/plugin/sonictemplate.vim @@ -1,7 +1,7 @@ "============================================================================= " File: sonictemplate.vim " Author: Yasuhiro Matsumoto -" Last Change: 10-Jun-2012. +" Last Change: 11-Jun-2012. " Version: 0.10 " WebPage: http://github.com/mattn/sonictemplate-vim " Description: Easy and high speed coding method @@ -24,13 +24,21 @@ command! -nargs=1 -complete=customlist,sonictemplate#complete Template call soni if get(g:, 'sonictemplate_key', '') == '' nnoremap (sonictemplate) :call sonictemplate#select('n') - inoremap (sonictemplate) :call sonictemplate#select('i') - + inoremap (sonictemplate) =sonictemplate#select('i') nmap t (sonictemplate) imap t (sonictemplate) else exe "nnoremap" g:sonictemplate_key ":call sonictemplate#select('n')" - exe "inoremap" g:sonictemplate_key ":call sonictemplate#select('i')" + exe "inoremap" g:sonictemplate_key "=sonictemplate#select('i')" +endif +if get(g:, 'sonictemplate_intelligent_key', '') == '' + nnoremap (sonictemplate-intelligent) :call sonictemplate#select_intelligent('n') + inoremap (sonictemplate-intelligent) =sonictemplate#select_intelligent('i') + nmap T (sonictemplate-intelligent) + imap T (sonictemplate-intelligent) +else + exe "nnoremap" g:sonictemplate_intelligent_key ":call sonictemplate#select_intelligent('n')" + exe "inoremap" g:sonictemplate_intelligent_key "=sonictemplate#select_intelligent('i')" endif let &cpo = s:save_cpo -- cgit v1.2.3-54-g00ecf