diff options
author | mattn <mattn.jp@gmail.com> | 2012-04-12 03:23:26 +0900 |
---|---|---|
committer | mattn <mattn.jp@gmail.com> | 2012-04-12 03:23:26 +0900 |
commit | 8acb5310eb716c639686cc92d222aa3e46a51fdc (patch) | |
tree | 4ab06c7dcc9f60da8dea77fb83b7192c29048f06 /plugin | |
parent | 8bf9089fcc271fa7ed7aad85e0db8ae6f39ce491 (diff) | |
download | vim-sonictemplate-8acb5310eb716c639686cc92d222aa3e46a51fdc.tar.gz vim-sonictemplate-8acb5310eb716c639686cc92d222aa3e46a51fdc.tar.bz2 vim-sonictemplate-8acb5310eb716c639686cc92d222aa3e46a51fdc.zip |
avoid to un-display on linux. don't use plug map.
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/sonictemplate.vim | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/plugin/sonictemplate.vim b/plugin/sonictemplate.vim index fcc4190..4bba402 100644 --- a/plugin/sonictemplate.vim +++ b/plugin/sonictemplate.vim @@ -1,7 +1,7 @@ "============================================================================= " File: sonictemplate.vim " Author: Yasuhiro Matsumoto <mattn.jp@gmail.com> -" Last Change: 08-Nov-2011. +" Last Change: 12-Apr-2012. " Version: 0.08 " WebPage: http://github.com/mattn/sonictemplate-vim " Description: Easy and high speed coding method @@ -22,11 +22,16 @@ set cpo&vim command! -nargs=1 -complete=customlist,sonictemplate#complete Template call sonictemplate#apply(<f-args>, 'n') -nnoremap <plug>(sonictemplate) :call sonictemplate#select('n')<cr> -inoremap <plug>(sonictemplate) <space><bs><c-o>:call sonictemplate#select('i')<cr> +if get(g:, 'sonictemplate_key', '') == '' + nnoremap <plug>(sonictemplate) :call sonictemplate#select('n')<cr> + inoremap <plug>(sonictemplate) <space><bs><c-o>:call sonictemplate#select('i')<cr> -nmap <unique> <c-y>t <plug>(sonictemplate) -imap <unique> <c-y>t <plug>(sonictemplate) + nmap <unique> <c-y>t <plug>(sonictemplate) + imap <unique> <c-y>t <plug>(sonictemplate) +else + exe "nnoremap" g:sonictemplate_key ":call sonictemplate#select('n')<cr>" + exe "inoremap" g:sonictemplate_key "<space><bs><c-o>:call sonictemplate#select('i')<cr>" +endif let &cpo = s:save_cpo unlet s:save_cpo |