2012-09-27 12:30:33 +00:00
|
|
|
"=============================================================================
|
|
|
|
" FILE: neosnippet.vim
|
2017-06-15 00:11:15 +00:00
|
|
|
" AUTHOR: Shougo Matsushita <Shougo.Matsu at gmail.com>
|
2017-06-15 00:04:27 +00:00
|
|
|
" License: MIT license
|
2012-09-27 12:30:33 +00:00
|
|
|
"=============================================================================
|
|
|
|
|
|
|
|
if exists('g:loaded_neosnippet')
|
|
|
|
finish
|
2017-02-13 07:44:33 +00:00
|
|
|
elseif v:version < 704
|
2012-09-27 12:30:33 +00:00
|
|
|
echoerr 'neosnippet does not work this version of Vim "' . v:version . '".'
|
|
|
|
finish
|
|
|
|
endif
|
|
|
|
|
2017-10-01 13:40:17 +00:00
|
|
|
" Plugin key-mappings.
|
2012-09-27 15:42:34 +00:00
|
|
|
inoremap <silent><expr> <Plug>(neosnippet_expand_or_jump)
|
2013-11-18 11:14:01 +00:00
|
|
|
\ neosnippet#mappings#expand_or_jump_impl()
|
2012-09-27 15:42:34 +00:00
|
|
|
inoremap <silent><expr> <Plug>(neosnippet_jump_or_expand)
|
2013-11-18 11:14:01 +00:00
|
|
|
\ neosnippet#mappings#jump_or_expand_impl()
|
2012-09-27 15:42:34 +00:00
|
|
|
inoremap <silent><expr> <Plug>(neosnippet_expand)
|
2013-11-18 11:14:01 +00:00
|
|
|
\ neosnippet#mappings#expand_impl()
|
2012-09-27 15:42:34 +00:00
|
|
|
inoremap <silent><expr> <Plug>(neosnippet_jump)
|
2013-11-18 11:14:01 +00:00
|
|
|
\ neosnippet#mappings#jump_impl()
|
2012-10-29 20:09:50 +00:00
|
|
|
snoremap <silent><expr> <Plug>(neosnippet_expand_or_jump)
|
2013-11-18 11:14:01 +00:00
|
|
|
\ neosnippet#mappings#expand_or_jump_impl()
|
2012-10-29 20:09:50 +00:00
|
|
|
snoremap <silent><expr> <Plug>(neosnippet_jump_or_expand)
|
2013-11-18 11:14:01 +00:00
|
|
|
\ neosnippet#mappings#jump_or_expand_impl()
|
2012-10-29 20:09:50 +00:00
|
|
|
snoremap <silent><expr> <Plug>(neosnippet_expand)
|
2013-11-18 11:14:01 +00:00
|
|
|
\ neosnippet#mappings#expand_impl()
|
2012-09-27 15:42:34 +00:00
|
|
|
snoremap <silent><expr> <Plug>(neosnippet_jump)
|
2013-11-18 11:14:01 +00:00
|
|
|
\ neosnippet#mappings#jump_impl()
|
2012-09-27 12:30:33 +00:00
|
|
|
|
2012-10-29 20:09:50 +00:00
|
|
|
xnoremap <silent> <Plug>(neosnippet_get_selected_text)
|
2013-11-21 09:40:40 +00:00
|
|
|
\ :call neosnippet#helpers#get_selected_text(visualmode(), 1)<CR>
|
2012-10-29 10:27:18 +00:00
|
|
|
|
2012-10-29 22:38:37 +00:00
|
|
|
xnoremap <silent> <Plug>(neosnippet_expand_target)
|
2013-11-21 09:54:04 +00:00
|
|
|
\ :<C-u>call neosnippet#mappings#_expand_target()<CR>
|
2012-10-30 02:27:59 +00:00
|
|
|
xnoremap <silent> <Plug>(neosnippet_register_oneshot_snippet)
|
2013-11-21 09:14:07 +00:00
|
|
|
\ :<C-u>call neosnippet#mappings#_register_oneshot_snippet()<CR>
|
2012-10-29 22:38:37 +00:00
|
|
|
|
2012-09-30 09:04:48 +00:00
|
|
|
inoremap <expr><silent> <Plug>(neosnippet_start_unite_snippet)
|
2013-12-30 22:50:41 +00:00
|
|
|
\ unite#sources#neosnippet#start_complete()
|
2012-09-27 12:30:33 +00:00
|
|
|
|
2017-10-01 13:40:17 +00:00
|
|
|
|
|
|
|
augroup neosnippet
|
2013-11-19 07:04:32 +00:00
|
|
|
autocmd InsertEnter * call neosnippet#init#_initialize()
|
2017-10-01 13:40:17 +00:00
|
|
|
augroup END
|
2012-09-27 15:42:34 +00:00
|
|
|
|
2017-10-01 13:40:17 +00:00
|
|
|
" Commands.
|
2015-12-18 23:47:56 +00:00
|
|
|
command! -nargs=? -bar
|
|
|
|
\ -complete=customlist,neosnippet#commands#_edit_complete
|
2012-09-30 10:10:25 +00:00
|
|
|
\ NeoSnippetEdit
|
2013-11-19 07:19:33 +00:00
|
|
|
\ call neosnippet#commands#_edit(<q-args>)
|
2012-09-30 10:10:25 +00:00
|
|
|
|
2015-12-18 23:47:56 +00:00
|
|
|
command! -nargs=? -bar
|
|
|
|
\ -complete=customlist,neosnippet#commands#_filetype_complete
|
2012-09-30 10:10:25 +00:00
|
|
|
\ NeoSnippetMakeCache
|
2013-11-19 07:19:33 +00:00
|
|
|
\ call neosnippet#commands#_make_cache(<q-args>)
|
2012-09-30 10:10:25 +00:00
|
|
|
|
2015-12-18 23:47:56 +00:00
|
|
|
command! -nargs=1 -bar -complete=file
|
2012-11-03 03:33:18 +00:00
|
|
|
\ NeoSnippetSource
|
2013-11-19 07:19:33 +00:00
|
|
|
\ call neosnippet#commands#_source(<q-args>)
|
2013-12-25 12:56:56 +00:00
|
|
|
|
2015-12-18 23:47:56 +00:00
|
|
|
command! -bar NeoSnippetClearMarkers
|
2013-12-25 12:56:56 +00:00
|
|
|
\ call neosnippet#commands#_clear_markers()
|
2012-09-30 08:45:41 +00:00
|
|
|
|
2012-09-27 12:30:33 +00:00
|
|
|
|
2017-10-01 13:40:17 +00:00
|
|
|
let g:loaded_neosnippet = 1
|