diff options
author | Karel Kočí <cynerd@email.cz> | 2016-06-30 16:03:25 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2016-06-30 16:03:25 +0200 |
commit | e573b3020c032400eed60b649a2cbf55266e6bb0 (patch) | |
tree | 8f572394ac8433529c7a8e70d160a2fbe8268b4e /vim/bundle/vim-snippets/plugin | |
parent | b8c667bd64b3edd38d56c63c5bd1db53a23b4499 (diff) | |
download | myconfigs-e573b3020c032400eed60b649a2cbf55266e6bb0.tar.gz myconfigs-e573b3020c032400eed60b649a2cbf55266e6bb0.tar.bz2 myconfigs-e573b3020c032400eed60b649a2cbf55266e6bb0.zip |
Add current configurations from old repository
Diffstat (limited to 'vim/bundle/vim-snippets/plugin')
-rw-r--r-- | vim/bundle/vim-snippets/plugin/vimsnippets.vim | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/vim/bundle/vim-snippets/plugin/vimsnippets.vim b/vim/bundle/vim-snippets/plugin/vimsnippets.vim new file mode 100644 index 0000000..f58374c --- /dev/null +++ b/vim/bundle/vim-snippets/plugin/vimsnippets.vim @@ -0,0 +1,50 @@ +if exists("b:done_vimsnippets") + finish +endif +let b:done_vimsnippets = 1 + +" Some variables need default value +if !exists("g:snips_author") + let g:snips_author = "yourname" +endif + +if !exists("g:snips_email") + let g:snips_email = "yourname@email.com" +endif + +if !exists("g:snips_github") + let g:snips_github = "https://github.com/yourname" +endif + +" Expanding the path is not needed on Vim 7.4 +if &cp || version >= 704 + finish +endif + +" Add pythonx to the python search path if needed (i.e. <= Vim 7.3). +if !has("python") && !has("python3") + finish +end + +" This will fail if UltiSnips is not installed. +try + call UltiSnips#bootstrap#Bootstrap() +catch /E117/ + finish +endtry + + +" This should have been set by UltiSnips, otherwise something is wrong. +if !exists("g:_uspy") + finish +end + + +" Expand our path +let s:SourcedFile=expand("<sfile>") +exec g:_uspy "import vim, os, sys" +exec g:_uspy "sourced_file = vim.eval('s:SourcedFile')" +exec g:_uspy "while not os.path.exists(os.path.join(sourced_file, 'pythonx')): + \ sourced_file = os.path.dirname(sourced_file)" +exec g:_uspy "module_path = os.path.join(sourced_file, 'pythonx')" +exec g:_uspy "sys.path.append(module_path)" |