From 9931e0888b2419326ae10ebbfae532261c5c125f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Thu, 30 Jun 2016 16:11:56 +0200 Subject: Fix submodules --- vim/bundle/vim-snipmate | 1 + vim/bundle/vim-snipmate/plugin/snipMate.vim | 137 ---------------------------- 2 files changed, 1 insertion(+), 137 deletions(-) create mode 160000 vim/bundle/vim-snipmate delete mode 100644 vim/bundle/vim-snipmate/plugin/snipMate.vim (limited to 'vim/bundle/vim-snipmate/plugin') diff --git a/vim/bundle/vim-snipmate b/vim/bundle/vim-snipmate new file mode 160000 index 0000000..ee433e4 --- /dev/null +++ b/vim/bundle/vim-snipmate @@ -0,0 +1 @@ +Subproject commit ee433e43c76c768c95ad6d9af67c4cd4b40f7eac diff --git a/vim/bundle/vim-snipmate/plugin/snipMate.vim b/vim/bundle/vim-snipmate/plugin/snipMate.vim deleted file mode 100644 index 837f0dc..0000000 --- a/vim/bundle/vim-snipmate/plugin/snipMate.vim +++ /dev/null @@ -1,137 +0,0 @@ -" File: snipMate.vim -" Description: snipMate.vim implements some of TextMate's snippets features in -" Vim. A snippet is a piece of often-typed text that you can -" insert into your document using a trigger word followed by a "". -" -" For more help see snipMate.txt; you can do this by using: -" :helptags ~/.vim/doc -" :h SnipMate - -if exists('loaded_snips') || &cp || version < 700 - finish -endif -let loaded_snips = 1 - -" Save and reset 'cpo' -let s:save_cpo = &cpo -set cpo&vim - -try - call funcref#Function('') -catch /.*/ - echoe "you're missing vim-addon-mw-utils. See install instructions at ".expand(':h:h').'/README.md' -endtry - -if (!exists('g:snipMateSources')) - let g:snipMateSources = {} - " Default source: get snippets based on runtimepath - let g:snipMateSources['default'] = funcref#Function('snipMate#DefaultPool') -endif - -augroup SnipMateDetect - au BufRead,BufNewFile *.snippet,*.snippets setlocal filetype=snippets - au FileType snippets if expand(':e') =~# 'snippet$' - \ | setlocal syntax=snippet - \ | else - \ | setlocal syntax=snippets - \ | endif -augroup END - -inoremap snipMateNextOrTrigger =snipMate#TriggerSnippet() -snoremap snipMateNextOrTrigger a=snipMate#TriggerSnippet() -inoremap snipMateTrigger =snipMate#TriggerSnippet(1) -inoremap snipMateBack =snipMate#BackwardsSnippet() -snoremap snipMateBack a=snipMate#BackwardsSnippet() -inoremap snipMateShow =snipMate#ShowAvailableSnips() -xnoremap snipMateVisual :call grab_visual()gv"_c - -" config variables -if !exists('g:snips_author') - let g:snips_author = 'Me' -endif -if !exists('g:snipMate') - let g:snipMate = {} -endif - -" SnipMate inserts this string when no snippet expansion can be done -let g:snipMate['no_match_completion_feedkeys_chars'] = - \ get(g:snipMate, 'no_match_completion_feedkeys_chars', "\t") - -" Add default scope aliases, without overriding user settings -let g:snipMate.scope_aliases = get(g:snipMate, 'scope_aliases', {}) -if exists('g:snipMate_no_default_aliases') - echom 'The g:snipMate_no_default_aliases option has been renamed.' - \ 'See :h snipMate-options.' -endif -if (!exists('g:snipMate_no_default_aliases') || !g:snipMate_no_default_aliases) - \ && (!exists('g:snipMate.no_default_aliases') - \ || !g:snipMate.no_default_aliases) - let g:snipMate.scope_aliases.objc = - \ get(g:snipMate.scope_aliases, 'objc', 'c') - let g:snipMate.scope_aliases.cpp = - \ get(g:snipMate.scope_aliases, 'cpp', 'c') - let g:snipMate.scope_aliases.cu = - \ get(g:snipMate.scope_aliases, 'cu', 'c') - let g:snipMate.scope_aliases.xhtml = - \ get(g:snipMate.scope_aliases, 'xhtml', 'html') - let g:snipMate.scope_aliases.html = - \ get(g:snipMate.scope_aliases, 'html', 'javascript') - let g:snipMate.scope_aliases.php = - \ get(g:snipMate.scope_aliases, 'php', 'php,html,javascript') - let g:snipMate.scope_aliases.ur = - \ get(g:snipMate.scope_aliases, 'ur', 'html,javascript') - let g:snipMate.scope_aliases.mxml = - \ get(g:snipMate.scope_aliases, 'mxml', 'actionscript') - let g:snipMate.scope_aliases.eruby = - \ get(g:snipMate.scope_aliases, 'eruby', 'eruby-rails,html') - let g:snipMate.scope_aliases.scss = - \ get(g:snipMate.scope_aliases, 'scss', 'css') - let g:snipMate.scope_aliases.less = - \ get(g:snipMate.scope_aliases, 'less', 'css') -endif - -let g:snipMate['get_snippets'] = get(g:snipMate, 'get_snippets', funcref#Function("snipMate#GetSnippets")) - -" List of paths where snippets/ dirs are located -let g:snipMate['snippet_dirs'] = get(g:snipMate, 'snippet_dirs', split(&rtp, ',')) -if type(g:snipMate['snippet_dirs']) != type([]) - echohl WarningMsg - echom "g:snipMate['snippet_dirs'] must be a List" - echohl None -endif - -" _ is default scope added always -" -" &ft honors multiple filetypes and syntax such as in set ft=html.javascript syntax=FOO -let g:snipMate['get_scopes'] = get(g:snipMate, 'get_scopes', funcref#Function('return split(&ft,"\\.")+[&syntax, "_"]')) - -" Modified from Luc Hermitte's function on StackOverflow -" -function! s:grab_visual() abort - let a_save = @a - try - normal! gv"ay - let b:snipmate_visual = @a - finally - let @a = a_save - endtry -endfunction - -" TODO: Allow specifying an arbitrary snippets file -function! s:load_scopes(bang, ...) abort - let gb = a:bang ? g: : b: - let gb.snipMate = get(gb, 'snipMate', {}) - let gb.snipMate.scope_aliases = get(gb.snipMate, 'scope_aliases', {}) - let gb.snipMate.scope_aliases['_'] = join(split(get(gb.snipMate.scope_aliases, '_', ''), ',') + a:000, ',') -endfunction - -command! -bang -bar -nargs=+ SnipMateLoadScope - \ call s:load_scopes(0, ) - -" Edit snippet files -command! SnipMateOpenSnippetFiles call snipMate#OpenSnippetFiles() - -" restore 'cpo' -let &cpo = s:save_cpo - -" vim:noet:sw=4:ts=4:ft=vim -- cgit v1.2.3