diff options
author | mattn <mattn.jp@gmail.com> | 2011-11-02 11:51:28 +0900 |
---|---|---|
committer | mattn <mattn.jp@gmail.com> | 2011-11-02 11:51:28 +0900 |
commit | afcff8be0816042d3ef4d3ee02b5851e9207769f (patch) | |
tree | 9c7d3f21f6791b4fab2ad1d907e95bc6adf1b4a5 /autoload | |
parent | 59f5cd24d34d663bfb2dda66f01f92bf7087d168 (diff) | |
download | vim-sonictemplate-afcff8be0816042d3ef4d3ee02b5851e9207769f.tar.gz vim-sonictemplate-afcff8be0816042d3ef4d3ee02b5851e9207769f.tar.bz2 vim-sonictemplate-afcff8be0816042d3ef4d3ee02b5851e9207769f.zip |
workaround for indent.
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/sonictemplate.vim | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/autoload/sonictemplate.vim b/autoload/sonictemplate.vim index c6bf121..e29f397 100644 --- a/autoload/sonictemplate.vim +++ b/autoload/sonictemplate.vim @@ -1,7 +1,7 @@ "============================================================================= " sonictemplate.vim " Author: Yasuhiro Matsumoto <mattn.jp@gmail.com> -" Last Change: 28-Oct-2011. +" Last Change: 02-Nov-2011. let s:save_cpo = &cpo set cpo&vim @@ -17,7 +17,7 @@ function! sonictemplate#select() abort if name == '' return endif - call sonictemplate#apply(name) + silent! call sonictemplate#apply(name) endfunction function! sonictemplate#complete(lead, cmdline, curpos) abort @@ -89,11 +89,9 @@ function! sonictemplate#apply(name) abort silent! put! = c endif if stridx(c, '{{_cursor_}}') - silent! call search('{{_cursor_}}', 'w') - silent! s/{{_cursor_}}//g + silent! call search('{{_cursor_}}\zs', 'w') + silent! exe "normal a".repeat("\<bs>", 12) endif - silent! exe "normal! \<c-o>" - startinsert endfunction let &cpo = s:save_cpo |