- Changed :NeoSnippetEdit behavior.

This commit is contained in:
Shougo Matsushita 2012-10-04 12:35:07 +09:00
parent 82dce7fb66
commit 6eef3d5462
2 changed files with 15 additions and 2 deletions

View File

@ -241,8 +241,17 @@ function! neosnippet#edit_snippets(args)"{{{
endif
" Edit snippet file.
let filename = (options.runtime ? s:runtime_dir[0] : s:snippets_dir[-1])
\ .'/'.filetype.'.snip'
let snippet_dir = (options.runtime ? s:runtime_dir[0] : s:snippets_dir[-1])
let filename = snippet_dir .'/'.filetype
if isdirectory(filename)
" Edit in snippet directory.
let filename .= '/'.filetype
endif
if filename !~ '\.snip*$'
let filename .= '.snip'
endif
if options.split
" Split window.

View File

@ -71,6 +71,9 @@ COMMANDS *neosnippet-commands*
Opens [filetype] snippets to edit. It automatically selects
current buffer's filetype unless you specify [filetype].
If [filetype] snippets has a directory, it automatically edit
"[filetype].snip" in [filetype] subdirectory.
If [filetype] snippet file doesn't exist, it creates one
automatically.
@ -391,6 +394,7 @@ CHANGELOG *neosnippet-changelog*
2012-10-04
- Refactored snippets filter.
- Changed :NeoSnippetEdit behavior.
2012-10-01
- Deleted neosnippet#force_expandable().