- Deleted compatibility features.

This commit is contained in:
Shougo Matsushita 2013-06-04 22:39:30 +09:00
parent 736ef26fd2
commit b7be48ece3
5 changed files with 17 additions and 131 deletions

View File

@ -10,7 +10,7 @@ snipMate.vim or snippetsEmu.vim. But since you can choose snippets with the
have less trouble using them, because you do not have to remember each snippet have less trouble using them, because you do not have to remember each snippet
name. name.
Note: neocomplcache is NOT required! But recommended. Note: neocomplcache/neocomplete is NOT required! But recommended.
Extra snippets files are available in: Extra snippets files are available in:
[vim-snippets](https://github.com/honza/vim-snippets) [vim-snippets](https://github.com/honza/vim-snippets)

View File

@ -1,7 +1,7 @@
"============================================================================= "=============================================================================
" FILE: snippets_complete.vim " FILE: snippets_complete.vim
" AUTHOR: Shougo Matsushita <Shougo.Matsu@gmail.com> " AUTHOR: Shougo Matsushita <Shougo.Matsu@gmail.com>
" Last Modified: 28 May 2013. " Last Modified: 04 Jun 2013.
" License: MIT license {{{ " License: MIT license {{{
" Permission is hereby granted, free of charge, to any person obtaining " Permission is hereby granted, free of charge, to any person obtaining
" a copy of this software and associated documentation files (the " a copy of this software and associated documentation files (the
@ -99,23 +99,6 @@ function! neocomplcache#sources#snippets_complete#define() "{{{
return s:source return s:source
endfunction"}}} endfunction"}}}
function! neocomplcache#sources#snippets_complete#expandable() "{{{
return neosnippet#expandable()
endfunction"}}}
function! neocomplcache#sources#snippets_complete#force_expandable() "{{{
return neosnippet#expandable()
endfunction"}}}
function! neocomplcache#sources#snippets_complete#jumpable() "{{{
return neosnippet#jumpable()
endfunction"}}}
function! neocomplcache#sources#snippets_complete#get_snippets() "{{{
return neosnippet#get_snippets()
endfunction"}}}
function! neocomplcache#sources#snippets_complete#get_snippets_dir() "{{{
return neosnippet#get_snippets_directory()
endfunction"}}}
let &cpo = s:save_cpo let &cpo = s:save_cpo
unlet s:save_cpo unlet s:save_cpo

View File

@ -1,7 +1,7 @@
"============================================================================= "=============================================================================
" FILE: neosnippet.vim " FILE: neosnippet.vim
" AUTHOR: Shougo Matsushita <Shougo.Matsu@gmail.com> " AUTHOR: Shougo Matsushita <Shougo.Matsu@gmail.com>
" Last Modified: 28 May 2013. " Last Modified: 04 Jun 2013.
" License: MIT license {{{ " License: MIT license {{{
" Permission is hereby granted, free of charge, to any person obtaining " Permission is hereby granted, free of charge, to any person obtaining
" a copy of this software and associated documentation files (the " a copy of this software and associated documentation files (the
@ -31,11 +31,9 @@ set cpo&vim
call neosnippet#util#set_default( call neosnippet#util#set_default(
\ 'g:neosnippet#disable_runtime_snippets', {}) \ 'g:neosnippet#disable_runtime_snippets', {})
call neosnippet#util#set_default( call neosnippet#util#set_default(
\ 'g:neosnippet#snippets_directory', \ 'g:neosnippet#snippets_directory', '')
\ '', 'g:neocomplcache_snippets_dir')
call neosnippet#util#set_default( call neosnippet#util#set_default(
\ 'g:neosnippet#disable_select_mode_mappings', \ 'g:neosnippet#disable_select_mode_mappings', 1)
\ 1, 'g:neocomplcache_disable_select_mode_mappings')
call neosnippet#util#set_default( call neosnippet#util#set_default(
\ 'g:neosnippet#enable_snipmate_compatibility', 0) \ 'g:neosnippet#enable_snipmate_compatibility', 0)
"}}} "}}}
@ -1251,6 +1249,9 @@ function! s:skip_next_auto_completion() "{{{
if exists('*neocomplcache#skip_next_complete') if exists('*neocomplcache#skip_next_complete')
call neocomplcache#skip_next_complete() call neocomplcache#skip_next_complete()
endif endif
if exists('*neocomplete#skip_next_complete')
call neocomplete#skip_next_complete()
endif
let neosnippet = neosnippet#get_current_neosnippet() let neosnippet = neosnippet#get_current_neosnippet()
let neosnippet.trigger = 0 let neosnippet.trigger = 0
@ -1325,11 +1326,6 @@ function! s:initialize_script_variables() "{{{
let s:snippets_expand_stack = [] let s:snippets_expand_stack = []
let s:snippets = {} let s:snippets = {}
if get(g:, 'neocomplcache_snippets_disable_runtime_snippets', 0)
" Set for backward compatibility.
let g:neosnippet#disable_runtime_snippets._ = 1
endif
" Set runtime dir. " Set runtime dir.
let s:runtime_dir = split(globpath(&runtimepath, let s:runtime_dir = split(globpath(&runtimepath,
\ 'autoload/neosnippet/snippets'), '\n') \ 'autoload/neosnippet/snippets'), '\n')

View File

@ -1,5 +1,5 @@
*neosnippet.txt* *neosnippet.txt*
The neo-snippet plugin contains the neocomplcache snippet source The neo-snippet plugin contains snippet source
Version: 3.1 Version: 3.1
Author: Shougo <Shougo.Matsu@gmail.com> Author: Shougo <Shougo.Matsu@gmail.com>
@ -42,8 +42,8 @@ INTRODUCTION *neosnippet-introduction*
This plugin analyzes snippet files which you can use for completion. It offers This plugin analyzes snippet files which you can use for completion. It offers
functionality similar to snipMate.vim or snippetsEmu.vim. Since you can choose functionality similar to snipMate.vim or snippetsEmu.vim. Since you can choose
snippets with the neocomplcache interface, you might have less trouble using snippets with the neocomplcache/neocomplete interface, you might have less
them, because you do not have to remember each snippet name. trouble using them, because you do not have to remember each snippet name.
============================================================================== ==============================================================================
INSTALL *neosnippet-install* INSTALL *neosnippet-install*
@ -76,9 +76,6 @@ COMMANDS *neosnippet-commands*
automatically chooses the current buffer's file type unless you automatically chooses the current buffer's file type unless you
specify another one by [filetype]. specify another one by [filetype].
*:NeoComplCacheCachingSnippets*
Note: |:NeoComplCacheCachingSnippets| is an obsolete name.
:NeoSnippetEdit [{options}] [filetype] :NeoSnippetEdit [{options}] [filetype]
*:NeoSnippetEdit* *:NeoSnippetEdit*
Opens the snippets for a given [filetype] to edit. It automatically Opens the snippets for a given [filetype] to edit. It automatically
@ -93,7 +90,6 @@ COMMANDS *neosnippet-commands*
with precedence. The snippets are re-cached automatically with precedence. The snippets are re-cached automatically
when you save the file after edit. when you save the file after edit.
*:NeoComplCacheEditSnippets*
The following parameters can be used as {options} to modify The following parameters can be used as {options} to modify
the behavior of the command. Note: You must escape spaces with the behavior of the command. Note: You must escape spaces with
a backslash "\". a backslash "\".
@ -122,18 +118,6 @@ COMMANDS *neosnippet-commands*
Edit the runtime snippets (built-in defaults) instead of the Edit the runtime snippets (built-in defaults) instead of the
user snippets defined by 'g:neosnippet#snippets_directory'. user snippets defined by 'g:neosnippet#snippets_directory'.
Note: |:NeoComplCacheEditSnippets| is an obsolete name.
:NeoComplCacheEdit -runtime [filetype]
Opens the built in snippet file for the [filetype] to edit. It
automatically selects the current buffer's file type
unless you specify a file type by [filetype]. The snippets are
re-cached automatically when you save the file after edit.
*:NeoComplCacheEditRuntimeSnippets*
Note: |:NeoComplCacheEditRuntimeSnippets| is an obsolete name.
:NeoSnippetSource [filename] :NeoSnippetSource [filename]
*:NeoSnippetSource* *:NeoSnippetSource*
@ -160,9 +144,6 @@ g:neosnippet#snippets_directory *g:neosnippet#snippets_directory*
- "vim_*.snip*" - "vim_*.snip*"
- "vim/**/*.snip" - "vim/**/*.snip"
*g:neocomplcache_snippets_dir*
Note: |g:neocomplcache_snippets_dir| is an obsolete name.
This variable doesn't exist unless you declare it. This variable doesn't exist unless you declare it.
g:neosnippet#disable_select_mode_mappings g:neosnippet#disable_select_mode_mappings
@ -172,10 +153,6 @@ g:neosnippet#disable_select_mode_mappings
is better to leave it as it is. But if you have troubles with is better to leave it as it is. But if you have troubles with
the buffer switcher LustyJuggler you can switch them off. the buffer switcher LustyJuggler you can switch them off.
*g:neocomplcache_disable_select_mode_mappings*
Note: |g:neocomplcache_disable_select_mode_mappings| is an
obsolete name.
The default value is 1. The default value is 1.
g:neosnippet#disable_runtime_snippets g:neosnippet#disable_runtime_snippets
@ -197,16 +174,11 @@ g:neosnippet#disable_runtime_snippets
\ 'c' : 1, 'cpp' : 1, \ 'c' : 1, 'cpp' : 1,
\ } \ }
" Works like g:neocomplcache_snippets_disable_runtime_snippets
" which disables all runtime snippets " which disables all runtime snippets
let g:neosnippet#disable_runtime_snippets = { let g:neosnippet#disable_runtime_snippets = {
\ '_' : 1, \ '_' : 1,
\ } \ }
< <
*g:neocomplcache_snippets_disable_runtime_snippets*
Note: |g:neocomplcache_snippets_disable_runtime_snippets| is
an obsolete name.
The default value is {}. The default value is {}.
g:neosnippet#enable_snipmate_compatibility g:neosnippet#enable_snipmate_compatibility
@ -233,10 +205,6 @@ s_<Plug>(neosnippet_expand_or_jump)
no snippet available it jumps to the next placeholder of the no snippet available it jumps to the next placeholder of the
buffer. buffer.
*<Plug>(neocomplcache_snippets_expand)*
Note: |<Plug>(neocomplcache_snippets_expand)| is an obsolete
name.
<Plug>(neosnippet_jump_or_expand) <Plug>(neosnippet_jump_or_expand)
*<Plug>(neosnippet_jump_or_expand)* *<Plug>(neosnippet_jump_or_expand)*
s_<Plug>(neosnippet_jump_or_expand) s_<Plug>(neosnippet_jump_or_expand)
@ -245,21 +213,13 @@ s_<Plug>(neosnippet_jump_or_expand)
is no placeholder it expands a snippet in the current cursor is no placeholder it expands a snippet in the current cursor
position. position.
*<Plug>(neocomplcache_snippets_jump)*
Note: |<Plug>(neocomplcache_snippets_jump)| is an obsolete
name.
<Plug>(neosnippet_expand) <Plug>(neosnippet_expand)
*<Plug>(neosnippet_expand)* *<Plug>(neosnippet_expand)*
s_<Plug>(neosnippet_expand) s_<Plug>(neosnippet_expand)
*s_<Plug>(neosnippet_expand)* *s_<Plug>(neosnippet_expand)*
Expand a snippet in current cursor position. It only takes Expand a snippet in current cursor position. It only takes
effect if there is a snippet text to expand or if you have effect if there is a snippet text to expand or if you have
chosen a snippet from the neocomplcache drop down menu. chosen a snippet from popup menu.
*<Plug>(neocomplcache_snippets_force_expand)*
Note: |<Plug>(neocomplcache_snippets_force_expand)| is
an obsolete name.
<Plug>(neosnippet_jump) <Plug>(neosnippet_jump)
*<Plug>(neosnippet_jump)* *<Plug>(neosnippet_jump)*
@ -268,20 +228,12 @@ s_<Plug>(neosnippet_jump)
Jump to the next placeholder key. It does not expand any Jump to the next placeholder key. It does not expand any
snippets. snippets.
*<Plug>(neocomplcache_snippets_force_jump)*
Note: |<Plug>(neocomplcache_snippets_force_jump)| is
an obsolete name.
i_<Plug>(neosnippet_start_unite_snippet) i_<Plug>(neosnippet_start_unite_snippet)
*i_<Plug>(neosnippet_start_unite_snippet)* *i_<Plug>(neosnippet_start_unite_snippet)*
Starts the unite snippet source. You can expand a snippet by Starts the unite snippet source. You can expand a snippet by
the unite interface. the unite interface.
Note: The plug-in |unite.vim| is required for that feature. Note: The plug-in |unite.vim| is required for that feature.
*<Plug>(neocomplcache_start_unite_snippet)*
Note: |<Plug>(neocomplcache_start_unite_snippet)| is an
obsolete name.
x_<Plug>(neosnippet_expand_target) x_<Plug>(neosnippet_expand_target)
*x_<Plug>(neosnippet_expand_target)* *x_<Plug>(neosnippet_expand_target)*
Expand the input trigger by a selected target text. Expand the input trigger by a selected target text.
@ -301,17 +253,6 @@ neosnippet#expandable()
You can use this function with imap <expr>. It checks if You can use this function with imap <expr>. It checks if
the cursor text is a snippet trigger. This is is useful to the cursor text is a snippet trigger. This is is useful to
save key mappings. save key mappings.
Note: If you are used to
|neocomplcache#sources#snippets_complete#expandable()|, you
must use |neosnippet#expandable_or_jumpable()|.
*neocomplcache#sources#snippets_complete#expandable()*
*neocomplcache#sources#snippets_complete#force_expandable()*
Note:
|neocomplcache#sources#snippets_complete#expandable()|
and
|neocomplcache#sources#snippets_complete#force_expandable()|
are obsolete names.
neosnippet#jumpable() neosnippet#jumpable()
*neosnippet#jumpable()* *neosnippet#jumpable()*
@ -319,10 +260,6 @@ neosnippet#jumpable()
cursor text is an existing placeholder in current buffer. This cursor text is an existing placeholder in current buffer. This
is useful to save key mappings. is useful to save key mappings.
*neocomplcache#sources#snippets_complete#jumpable()*
Note: |neocomplcache#sources#snippets_complete#jumpable()| is
an obsolete name.
neosnippet#expandable_or_jumpable() neosnippet#expandable_or_jumpable()
*neosnippet#expandable_or_jumpable()* *neosnippet#expandable_or_jumpable()*
You can use this function with imap <expr>. It checks if You can use this function with imap <expr>. It checks if
@ -345,10 +282,6 @@ neosnippet#get_snippets_directory()
snippets directories and |g:neosnippet#snippets_directory| snippets directories and |g:neosnippet#snippets_directory|
directories. directories.
*neocomplcache#sources#snippets_complete#get_snippets_dir()*
Note:
|neocomplcache#sources#snippets_complete#get_snippets_dir()|
is an obsolete name.
============================================================================== ==============================================================================
EXAMPLES *neosnippet-examples* EXAMPLES *neosnippet-examples*
@ -409,7 +342,7 @@ Snippet Keywords:
- abbr [name] (Optional) - abbr [name] (Optional)
You can define an abbreviation for the snippet name. It will be You can define an abbreviation for the snippet name. It will be
displayed in the drop down selection menu of the neocomplcache plugin. displayed in the drop down selection menu.
- alias [aliases] (Optional) - alias [aliases] (Optional)
@ -788,6 +721,9 @@ A: You can use |:NeoSnippetSource| for it.
============================================================================== ==============================================================================
CHANGELOG *neosnippet-changelog* CHANGELOG *neosnippet-changelog*
2013-06-04
- Deleted compatibility features.
2013-05-30 2013-05-30
- Added scheme snippets. - Added scheme snippets.

View File

@ -1,7 +1,7 @@
"============================================================================= "=============================================================================
" FILE: neosnippet.vim " FILE: neosnippet.vim
" AUTHOR: Shougo Matsushita <Shougo.Matsu@gmail.com> " AUTHOR: Shougo Matsushita <Shougo.Matsu@gmail.com>
" Last Modified: 21 May 2013. " Last Modified: 04 Jun 2013.
" License: MIT license {{{ " License: MIT license {{{
" Permission is hereby granted, free of charge, to any person obtaining " Permission is hereby granted, free of charge, to any person obtaining
" a copy of this software and associated documentation files (the " a copy of this software and associated documentation files (the
@ -58,23 +58,6 @@ snoremap <silent><expr> <Plug>(neosnippet_jump)
xnoremap <silent> <Plug>(neosnippet_get_selected_text) xnoremap <silent> <Plug>(neosnippet_get_selected_text)
\ :call neosnippet#get_selected_text(visualmode(), 1)<CR> \ :call neosnippet#get_selected_text(visualmode(), 1)<CR>
imap <silent> <Plug>(neocomplcache_snippets_expand)
\ <Plug>(neosnippet_expand_or_jump)
smap <silent> <Plug>(neocomplcache_snippets_expand)
\ <Plug>(neosnippet_expand_or_jump)
imap <silent> <Plug>(neocomplcache_snippets_jump)
\ <Plug>(neosnippet_jump_or_expand)
smap <silent> <Plug>(neocomplcache_snippets_jump)
\ <Plug>(neosnippet_expand_or_jump)
imap <silent> <Plug>(neocomplcache_snippets_force_expand)
\ <Plug>(neosnippet_expand)
smap <silent> <Plug>(neocomplcache_snippets_force_expand)
\ <Plug>(neosnippet_expand)
imap <silent> <Plug>(neocomplcache_snippets_force_jump)
\ <Plug>(neosnippet_jump)
smap <silent> <Plug>(neocomplcache_snippets_force_jump)
\ <Plug>(neosnippet_jump)
xnoremap <silent> <Plug>(neosnippet_expand_target) xnoremap <silent> <Plug>(neosnippet_expand_target)
\ :<C-u>call neosnippet#expand_target()<CR> \ :<C-u>call neosnippet#expand_target()<CR>
xnoremap <silent><expr> <Plug>(neosnippet_start_unite_snippet_target) xnoremap <silent><expr> <Plug>(neosnippet_start_unite_snippet_target)
@ -82,8 +65,6 @@ xnoremap <silent><expr> <Plug>(neosnippet_start_unite_snippet_target)
xnoremap <silent> <Plug>(neosnippet_register_oneshot_snippet) xnoremap <silent> <Plug>(neosnippet_register_oneshot_snippet)
\ :<C-u>call neosnippet#register_oneshot_snippet()<CR> \ :<C-u>call neosnippet#register_oneshot_snippet()<CR>
imap <silent> <Plug>(neocomplcache_start_unite_snippet)
\ <Plug>(neosnippet_start_unite_snippet)
inoremap <expr><silent> <Plug>(neosnippet_start_unite_snippet) inoremap <expr><silent> <Plug>(neosnippet_start_unite_snippet)
\ unite#sources#snippet#start_complete() \ unite#sources#snippet#start_complete()
"}}} "}}}
@ -101,16 +82,6 @@ command! -nargs=? -complete=customlist,neosnippet#filetype_complete
\ NeoSnippetMakeCache \ NeoSnippetMakeCache
\ call neosnippet#make_cache(<q-args>) \ call neosnippet#make_cache(<q-args>)
command! -nargs=? -complete=customlist,neosnippet#filetype_complete
\ NeoComplCacheCachingSnippets
\ NeoSnippetMakeCache <args>
command! -nargs=? -complete=customlist,neosnippet#filetype_complete
\ NeoComplCacheEditSnippets
\ NeoSnippetEdit <args>
command! -nargs=? -complete=customlist,neosnippet#filetype_complete
\ NeoComplCacheEditRuntimeSnippets
\ NeoSnippetEdit -runtime <args>
command! -nargs=1 -complete=file command! -nargs=1 -complete=file
\ NeoSnippetSource \ NeoSnippetSource
\ call neosnippet#source_file(<q-args>) \ call neosnippet#source_file(<q-args>)