"============================================================================= " File: sonictemplate.vim " Author: Yasuhiro Matsumoto " Last Change: 01-May-2013. " Version: 0.10 " WebPage: http://github.com/mattn/sonictemplate-vim " Description: Easy and high speed coding method " Usage: " " :Template {name} " Load template named as {name} in the current buffer. " " Or type + t if &cp || (exists('g:loaded_sonictemplate_vim') && g:loaded_sonictemplate_vim) finish endif let g:loaded_sonictemplate_vim = 1 let s:save_cpo = &cpo set cpo&vim exe "command!" "-nargs=1" "-complete=customlist,sonictemplate#complete" get(g:, 'sonictemplate_commandname', 'Template') "call sonictemplate#apply(, 'n')" if get(g:, 'sonictemplate_key', '') == '' nnoremap (sonictemplate) :call sonictemplate#select('n') 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 "=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 unlet s:save_cpo " vim:set et: