diff --git a/autoload/neosnippet/init.vim b/autoload/neosnippet/init.vim index 9deec8a..79080d9 100644 --- a/autoload/neosnippet/init.vim +++ b/autoload/neosnippet/init.vim @@ -1,7 +1,7 @@ "============================================================================= " FILE: init.vim " AUTHOR: Shougo Matsushita -" Last Modified: 28 Dec 2013. +" Last Modified: 11 Jan 2014. " License: MIT license {{{ " Permission is hereby granted, free of charge, to any person obtaining " a copy of this software and associated documentation files (the @@ -49,10 +49,10 @@ function! s:initialize_script_variables() "{{{ " Load snipMate snippet directories. let runtime_dir += split(globpath(&runtimepath, \ 'snippets'), '\n') + if exists('g:snippets_dir') + let runtime_dir += neosnippet#util#option2list(g:snippets_dir) + endif endif - let runtime_dir += (exists('g:snippets_dir') ? - \ split(g:snippets_dir, '\s*,\s*') - \ : split(globpath(&runtimepath, 'snippets'), '\n')) call map(runtime_dir, 'substitute(v:val, "[\\\\/]$", "", "")') " Set snippets_dir. diff --git a/doc/neosnippet.txt b/doc/neosnippet.txt index 459398d..b913849 100755 --- a/doc/neosnippet.txt +++ b/doc/neosnippet.txt @@ -164,12 +164,11 @@ g:neosnippet#disable_select_mode_mappings g:neosnippet#disable_runtime_snippets This is a dictionary variable which uses file types as key. If you set the value of a file type entry to 1, this prevents - loading all the file type specific built-in snippets. This is - very useful to prevent snippet conflicts between self - defined snippet files and the built-in snippet files of - neosnippet. If you use a "_" as key for an entry this will - treat the value of the entry as default value for all file - types. + loading "neosnippets" directories from 'runtimepath'. This is + very useful to prevent snippet conflicts between self defined + snippet files and the built-in snippet files of neosnippet. If + you use a "_" as key for an entry this will treat the value of + the entry as default value for all file types. Note: This dictionary must be set in your .vimrc. @@ -190,7 +189,8 @@ g:neosnippet#disable_runtime_snippets g:neosnippet#enable_snipmate_compatibility If this variable is not 0, neosnippet will enable the snipMate compatibility feature (For example: Filename() function) and - load snipMate snippets automatically from 'runtimepath'. + load |g:snippets_dir| and snipMate snippets automatically from + 'runtimepath'. The default value is 0.