Permalink
Browse files

plugin update

  • Loading branch information...
1 parent 67b7b03 commit 4da3d0410cde47e6624b9c386f0ffd339ecf2420 @gabesoft committed May 25, 2012
Showing with 3,629 additions and 296 deletions.
  1. +120 −61 .vim/bundle/neocomplcache/autoload/neocomplcache.vim
  2. +63 −71 .vim/bundle/neocomplcache/autoload/neocomplcache/async_cache.vim
  3. +51 −32 .vim/bundle/neocomplcache/autoload/neocomplcache/cache.vim
  4. +46 −27 .vim/bundle/neocomplcache/autoload/neocomplcache/sources/buffer_complete.vim
  5. +59 −22 .vim/bundle/neocomplcache/autoload/neocomplcache/sources/filename_complete.vim
  6. +7 −1 .vim/bundle/neocomplcache/autoload/neocomplcache/sources/include_complete.vim
  7. +7 −2 .vim/bundle/neocomplcache/autoload/neocomplcache/sources/keyword_complete.vim
  8. +2 −2 .vim/bundle/neocomplcache/autoload/neocomplcache/sources/member_complete.vim
  9. +33 −20 .vim/bundle/neocomplcache/autoload/neocomplcache/sources/omni_complete.vim
  10. +15 −12 .vim/bundle/neocomplcache/autoload/neocomplcache/sources/tags_complete.vim
  11. +18 −3 .vim/bundle/neocomplcache/autoload/neocomplcache/util.vim
  12. +2 −2 .vim/bundle/neocomplcache/autoload/unite/sources/neocomplcache.vim
  13. +2 −2 .vim/bundle/neocomplcache/autoload/vital.vim
  14. +146 −0 .vim/bundle/neocomplcache/autoload/vital/_8e75d8b.vim
  15. +161 −0 .vim/bundle/neocomplcache/autoload/vital/_8e75d8b/bitwise.vim
  16. +198 −0 .vim/bundle/neocomplcache/autoload/vital/_8e75d8b/data/list.vim
  17. +97 −0 .vim/bundle/neocomplcache/autoload/vital/_8e75d8b/data/ordered_set.vim
  18. +198 −0 .vim/bundle/neocomplcache/autoload/vital/_8e75d8b/data/string.vim
  19. +725 −0 .vim/bundle/neocomplcache/autoload/vital/_8e75d8b/date_time.vim
  20. +77 −0 .vim/bundle/neocomplcache/autoload/vital/_8e75d8b/functor.vim
  21. +40 −0 .vim/bundle/neocomplcache/autoload/vital/_8e75d8b/locale/message.vim
  22. +147 −0 .vim/bundle/neocomplcache/autoload/vital/_8e75d8b/mapping.vim
  23. +346 −0 .vim/bundle/neocomplcache/autoload/vital/_8e75d8b/prelude.vim
  24. +86 −0 .vim/bundle/neocomplcache/autoload/vital/_8e75d8b/system/cache.vim
  25. +153 −0 .vim/bundle/neocomplcache/autoload/vital/_8e75d8b/system/file.vim
  26. +91 −0 .vim/bundle/neocomplcache/autoload/vital/_8e75d8b/system/filepath.vim
  27. +54 −0 .vim/bundle/neocomplcache/autoload/vital/_8e75d8b/web/html.vim
  28. +202 −0 .vim/bundle/neocomplcache/autoload/vital/_8e75d8b/web/http.vim
  29. +40 −0 .vim/bundle/neocomplcache/autoload/vital/_8e75d8b/web/json.vim
  30. +295 −0 .vim/bundle/neocomplcache/autoload/vital/_8e75d8b/web/xml.vim
  31. +1 −1 .vim/bundle/neocomplcache/autoload/vital/neocomplcache.vital
  32. +114 −11 .vim/bundle/neocomplcache/doc/neocomplcache.txt
  33. +29 −23 .vim/bundle/neocomplcache/plugin/neocomplcache.vim
  34. +2 −2 .vimrc
  35. +2 −2 .vimrc.view

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -1,7 +1,7 @@
"=============================================================================
" FILE: async_cache.vim
" AUTHOR: Shougo Matsushita <Shougo.Matsu@gmail.com>
-" Last Modified: 14 Nov 2011.
+" Last Modified: 09 May 2012.
" License: MIT license {{{
" Permission is hereby granted, free of charge, to any person obtaining
" a copy of this software and associated documentation files (the
@@ -33,9 +33,11 @@ function! s:main(argv)"{{{
\ = a:argv
if funcname ==# 'load_from_file'
- let keyword_list = s:load_from_file(filename, pattern_file_name, mark, minlen, maxfilename, fileencoding)
+ let keyword_list = s:load_from_file(
+ \ filename, pattern_file_name, mark, minlen, maxfilename, fileencoding)
else
- let keyword_list = s:load_from_tags(filename, pattern_file_name, mark, minlen, maxfilename, fileencoding)
+ let keyword_list = s:load_from_tags(
+ \ filename, pattern_file_name, mark, minlen, maxfilename, fileencoding)
endif
" Create dictionary key.
@@ -63,7 +65,8 @@ endfunction"}}}
function! s:load_from_file(filename, pattern_file_name, mark, minlen, maxfilename, fileencoding)"{{{
if filereadable(a:filename)
- let lines = map(readfile(a:filename), 'iconv(v:val, a:fileencoding, &encoding)')
+ let lines = map(readfile(a:filename),
+ \ 'iconv(v:val, a:fileencoding, &encoding)')
else
" File not found.
return []
@@ -105,7 +108,6 @@ function! s:load_from_tags(filename, pattern_file_name, mark, minlen, maxfilenam
let menu_pattern = menu . printf(' %%.%ds', a:maxfilename)
let keyword_lists = []
let dup_check = {}
- let line_num = 1
let [pattern, tags_file_name, filter_pattern, filetype] =
\ readfile(a:pattern_file_name)[: 4]
@@ -139,66 +141,71 @@ function! s:load_from_tags(filename, pattern_file_name, mark, minlen, maxfilenam
for line in tags_list"{{{
let tag = split(substitute(line, "\<CR>", '', 'g'), '\t', 1)
- let opt = join(tag[2:], "\<TAB>")
- let cmd = matchstr(opt, '.*/;"')
" Add keywords.
- if line !~ '^!' && len(tag) >= 3 && len(tag[0]) >= a:minlen
- \&& !has_key(dup_check, tag[0])
- let option = {
- \ 'cmd' : substitute(substitute(substitute(cmd,
- \'^\%([/?]\^\?\)\?\s*\|\%(\$\?[/?]\)\?;"$', '', 'g'),
- \ '\\\\', '\\', 'g'), '\\/', '/', 'g'),
- \ 'kind' : ''
- \}
- if option.cmd =~ '\d\+'
- let option.cmd = tag[0]
- endif
+ if line =~ '^!' || len(tag) < 3 || len(tag[0]) < a:minlen
+ \ || has_key(dup_check, tag[0])
+ continue
+ endif
- for opt in split(opt[len(cmd):], '\t', 1)
- let key = matchstr(opt, '^\h\w*\ze:')
- if key == ''
- let option['kind'] = opt
- else
- let option[key] = matchstr(opt, '^\h\w*:\zs.*')
- endif
- endfor
-
- if has_key(option, 'file') || (has_key(option, 'access') && option.access != 'public')
- let line_num += 1
- continue
- endif
+ let opt = join(tag[2:], "\<TAB>")
+ let cmd = matchstr(opt, '.*/;"')
- let abbr = has_key(option, 'signature')? tag[0] . option.signature :
- \ (option['kind'] == 'd' || option['cmd'] == '') ?
- \ tag[0] : option['cmd']
- let abbr = substitute(abbr, '\s\+', ' ', 'g')
- " Substitute "namespace foobar" to "foobar <namespace>".
- let abbr = substitute(abbr,
- \'^\(namespace\|class\|struct\|enum\|union\)\s\+\(.*\)$', '\2 <\1>', '')
- " Substitute typedef.
- let abbr = substitute(abbr, '^typedef\s\+\(.*\)\s\+\(\h\w*\%(::\w*\)*\);\?$', '\2 <typedef \1>', 'g')
-
- let keyword = {
- \ 'word' : tag[0], 'abbr' : abbr, 'kind' : option['kind'], 'dup' : 1,
- \ }
- if has_key(option, 'struct')
- let keyword.menu = printf(menu_pattern, option.struct)
- elseif has_key(option, 'class')
- let keyword.menu = printf(menu_pattern, option.class)
- elseif has_key(option, 'enum')
- let keyword.menu = printf(menu_pattern, option.enum)
- elseif has_key(option, 'union')
- let keyword.menu = printf(menu_pattern, option.union)
+ let option = {
+ \ 'cmd' : substitute(substitute(substitute(cmd,
+ \'^\%([/?]\^\?\)\?\s*\|\%(\$\?[/?]\)\?;"$', '', 'g'),
+ \ '\\\\', '\\', 'g'), '\\/', '/', 'g'),
+ \ 'kind' : ''
+ \}
+ if option.cmd =~ '\d\+'
+ let option.cmd = tag[0]
+ endif
+
+ for opt in split(opt[len(cmd):], '\t', 1)
+ let key = matchstr(opt, '^\h\w*\ze:')
+ if key == ''
+ let option['kind'] = opt
else
- let keyword.menu = menu
+ let option[key] = matchstr(opt, '^\h\w*:\zs.*')
endif
+ endfor
+
+ if has_key(option, 'file')
+ \ || (has_key(option, 'access') && option.access != 'public')
+ continue
+ endif
- call add(keyword_lists, keyword)
- let dup_check[tag[0]] = 1
+ let abbr = has_key(option, 'signature')? tag[0] . option.signature :
+ \ (option['kind'] == 'd' || option['cmd'] == '') ?
+ \ tag[0] : option['cmd']
+ let abbr = substitute(abbr, '\s\+', ' ', 'g')
+ " Substitute "namespace foobar" to "foobar <namespace>".
+ let abbr = substitute(abbr,
+ \'^\(namespace\|class\|struct\|enum\|union\)\s\+\(.*\)$',
+ \'\2 <\1>', '')
+ " Substitute typedef.
+ let abbr = substitute(abbr,
+ \'^typedef\s\+\(.*\)\s\+\(\h\w*\%(::\w*\)*\);\?$',
+ \'\2 <typedef \1>', 'g')
+
+ let keyword = {
+ \ 'word' : tag[0], 'abbr' : abbr,
+ \ 'kind' : option['kind'], 'dup' : 1,
+ \ }
+ if has_key(option, 'struct')
+ let keyword.menu = printf(menu_pattern, option.struct)
+ elseif has_key(option, 'class')
+ let keyword.menu = printf(menu_pattern, option.class)
+ elseif has_key(option, 'enum')
+ let keyword.menu = printf(menu_pattern, option.enum)
+ elseif has_key(option, 'union')
+ let keyword.menu = printf(menu_pattern, option.union)
+ else
+ let keyword.menu = menu
endif
- let line_num += 1
+ call add(keyword_lists, keyword)
+ let dup_check[tag[0]] = 1
endfor"}}}
if filter_pattern != ''
@@ -231,10 +238,6 @@ function! s:truncate(str, width)"{{{
return ret
endfunction"}}}
-function! s:strchars(str)"{{{
- return len(substitute(a:str, '.', 'x', 'g'))
-endfunction"}}}
-
function! s:strwidthpart(str, width)"{{{
let ret = a:str
let width = s:wcswidth(a:str)
@@ -246,17 +249,6 @@ function! s:strwidthpart(str, width)"{{{
return ret
endfunction"}}}
-function! s:strwidthpart_reverse(str, width)"{{{
- let ret = a:str
- let width = s:wcswidth(a:str)
- while width > a:width
- let char = matchstr(ret, '^.')
- let ret = ret[len(char) :]
- let width -= s:wcwidth(char)
- endwhile
-
- return ret
-endfunction"}}}
if v:version >= 703
" Use builtin function.
@@ -1,7 +1,7 @@
"=============================================================================
" FILE: cache.vim
" AUTHOR: Shougo Matsushita <Shougo.Matsu@gmail.com>
-" Last Modified: 02 Apr 2012.
+" Last Modified: 09 May 2012.
" License: MIT license {{{
" Permission is hereby granted, free of charge, to any person obtaining
" a copy of this software and associated documentation files (the
@@ -119,7 +119,8 @@ function! neocomplcache#cache#save_cache(cache_dir, filename, keyword_list)"{{{
\keyword.word, keyword.abbr, keyword.menu, keyword.kind))
endfor
- call neocomplcache#cache#writefile(a:cache_dir, a:filename, word_list)
+ call neocomplcache#cache#writefile(
+ \ a:cache_dir, a:filename, word_list)
endfunction"}}}
" Cache helper.
@@ -149,25 +150,34 @@ function! neocomplcache#cache#check_old_cache(cache_dir, filename)"{{{
return s:Cache.check_old_cache(cache_dir, a:filename)
endfunction"}}}
-let s:sdir = fnamemodify(expand('<sfile>'), ':p:h')
+let s:sdir = neocomplcache#util#substitute_path_separator(
+ \ fnamemodify(expand('<sfile>'), ':p:h'))
" Async test.
function! neocomplcache#cache#test_async()"{{{
if !neocomplcache#cache#check_old_cache(a:cache_dir, a:filename)
return neocomplcache#cache#encode_name(a:cache_dir, a:filename)
endif
- let filename = substitute(fnamemodify(expand('%'), ':p'), '\\', '/', 'g')
- let pattern_file_name = neocomplcache#cache#encode_name('keyword_patterns', 'vim')
- let cache_name = neocomplcache#cache#encode_name('test_cache', filename)
+ let filename = neocomplcache#util#substitute_path_separator(
+ \ fnamemodify(expand('%'), ':p'))
+ let pattern_file_name =
+ \ neocomplcache#cache#encode_name('keyword_patterns', 'vim')
+ let cache_name =
+ \ neocomplcache#cache#encode_name('test_cache', filename)
" Create pattern file.
- call neocomplcache#cache#writefile('keyword_patterns', a:filename, [a:pattern])
+ call neocomplcache#cache#writefile(
+ \ 'keyword_patterns', a:filename, [a:pattern])
- " args: funcname, outputname, filename pattern mark minlen maxfilename outputname
+ " args: funcname, outputname, filename pattern mark
+ " minlen maxlen encoding
+ let fileencoding =
+ \ &fileencoding == '' ? &encoding : &fileencoding
let argv = [
\ 'load_from_file', cache_name, filename, pattern_file_name, '[B]',
- \ g:neocomplcache_min_keyword_length, g:neocomplcache_max_menu_width, &fileencoding
+ \ g:neocomplcache_min_keyword_length,
+ \ g:neocomplcache_max_menu_width, fileencoding
\ ]
return s:async_load(argv, 'test_cache', filename)
endfunction"}}}
@@ -177,17 +187,23 @@ function! neocomplcache#cache#async_load_from_file(cache_dir, filename, pattern,
return neocomplcache#cache#encode_name(a:cache_dir, a:filename)
endif
- let pattern_file_name = neocomplcache#cache#encode_name('keyword_patterns', a:filename)
- let cache_name = neocomplcache#cache#encode_name(a:cache_dir, a:filename)
+ let pattern_file_name =
+ \ neocomplcache#cache#encode_name('keyword_patterns', a:filename)
+ let cache_name =
+ \ neocomplcache#cache#encode_name(a:cache_dir, a:filename)
" Create pattern file.
- call neocomplcache#cache#writefile('keyword_patterns', a:filename, [a:pattern])
+ call neocomplcache#cache#writefile(
+ \ 'keyword_patterns', a:filename, [a:pattern])
- " args: funcname, outputname, filename pattern mark minlen maxfilename outputname
- let fileencoding = &fileencoding == '' ? &encoding : &fileencoding
+ " args: funcname, outputname, filename pattern mark
+ " minlen maxlen encoding
+ let fileencoding =
+ \ &fileencoding == '' ? &encoding : &fileencoding
let argv = [
\ 'load_from_file', cache_name, a:filename, pattern_file_name, a:mark,
- \ g:neocomplcache_min_keyword_length, g:neocomplcache_max_menu_width, fileencoding
+ \ g:neocomplcache_min_keyword_length,
+ \ g:neocomplcache_max_menu_width, fileencoding
\ ]
return s:async_load(argv, a:cache_dir, a:filename)
endfunction"}}}
@@ -196,24 +212,29 @@ function! neocomplcache#cache#async_load_from_tags(cache_dir, filename, filetype
return neocomplcache#cache#encode_name(a:cache_dir, a:filename)
endif
- let cache_name = neocomplcache#cache#encode_name(a:cache_dir, a:filename)
- let pattern_file_name = neocomplcache#cache#encode_name('tags_pattens', a:filename)
+ let cache_name =
+ \ neocomplcache#cache#encode_name(a:cache_dir, a:filename)
+ let pattern_file_name =
+ \ neocomplcache#cache#encode_name('tags_pattens', a:filename)
if a:is_create_tags
if !executable(g:neocomplcache_ctags_program)
- echoerr 'Create tags error! Please install ' . g:neocomplcache_ctags_program . '.'
+ echoerr 'Create tags error! Please install '
+ \ . g:neocomplcache_ctags_program . '.'
return neocomplcache#cache#encode_name(a:cache_dir, a:filename)
endif
" Create tags file.
- let tags_file_name = neocomplcache#cache#encode_name('tags_output', a:filename)
+ let tags_file_name =
+ \ neocomplcache#cache#encode_name('tags_output', a:filename)
let args = has_key(g:neocomplcache_ctags_arguments_list, a:filetype) ?
\ g:neocomplcache_ctags_arguments_list[a:filetype]
\ : g:neocomplcache_ctags_arguments_list['default']
if has('win32') || has('win64')
- let filename = substitute(a:filename, '\\', '/', 'g')
+ let filename =
+ \ neocomplcache#util#substitute_path_separator(a:filename)
let command = printf('%s -f "%s" %s "%s" ',
\ g:neocomplcache_ctags_program, tags_file_name, args, filename)
else
@@ -231,28 +252,28 @@ function! neocomplcache#cache#async_load_from_tags(cache_dir, filename, filetype
endif
let filter_pattern =
- \ (a:filetype != '' && has_key(g:neocomplcache_tags_filter_patterns, a:filetype)) ?
- \ g:neocomplcache_tags_filter_patterns[a:filetype] : ''
+ \ get(g:neocomplcache_tags_filter_patterns, a:filetype, '')
call neocomplcache#cache#writefile('tags_pattens', a:filename,
- \ [neocomplcache#get_keyword_pattern(), tags_file_name, filter_pattern, a:filetype])
+ \ [neocomplcache#get_keyword_pattern(),
+ \ tags_file_name, filter_pattern, a:filetype])
- " args: funcname, outputname, filename filetype mark minlen maxfilename outputname
+ " args: funcname, outputname, filename pattern mark
+ " minlen maxlen encoding
let fileencoding = &fileencoding == '' ? &encoding : &fileencoding
let argv = [
\ 'load_from_tags', cache_name, a:filename, pattern_file_name, a:mark,
- \ g:neocomplcache_min_keyword_length, g:neocomplcache_max_menu_width, fileencoding
+ \ g:neocomplcache_min_keyword_length,
+ \ g:neocomplcache_max_menu_width, fileencoding
\ ]
return s:async_load(argv, a:cache_dir, a:filename)
endfunction"}}}
function! s:async_load(argv, cache_dir, filename)"{{{
- let current = getcwd()
- lcd `=s:sdir`
-
" if 0
if neocomplcache#has_vimproc()
let base_path = neocomplcache#util#substitute_path_separator(
\ fnamemodify(vimproc#get_command_name(v:progname), ':p:h'))
- let vim_path = base_path . (neocomplcache#util#is_windows() ? '/vim.exe' : '/vim')
+ let vim_path = base_path .
+ \ (neocomplcache#util#is_windows() ? '/vim.exe' : '/vim')
if !executable(vim_path) && neocomplcache#util#is_mac()
" Note: Search "Vim" instead of vim.
let vim_path = base_path. '/Vim'
@@ -265,7 +286,7 @@ function! s:async_load(argv, cache_dir, filename)"{{{
endif
let args = [vim_path, '-u', 'NONE', '-i', 'NONE', '-n',
- \ '-N', '-S', 'async_cache.vim']
+ \ '-N', '-S', s:sdir.'/async_cache.vim']
\ + a:argv
call vimproc#system_bg(args)
" call vimproc#system(args)
@@ -274,8 +295,6 @@ function! s:async_load(argv, cache_dir, filename)"{{{
call neocomplcache#async_cache#main(a:argv)
endif
- lcd `=current`
-
return neocomplcache#cache#encode_name(a:cache_dir, a:filename)
endfunction"}}}
Oops, something went wrong.

0 comments on commit 4da3d04

Please sign in to comment.