Skip to content

Commit

Permalink
- Converted markers.
Browse files Browse the repository at this point in the history
  • Loading branch information
Shougo committed Dec 13, 2012
1 parent d3b19f3 commit 0cbcac0
Show file tree
Hide file tree
Showing 24 changed files with 296 additions and 296 deletions.
52 changes: 26 additions & 26 deletions autoload/neocomplcache.vim
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function! neocomplcache#enable() "{{{
return
endif

" Auto commands."{{{
" Auto commands. "{{{
augroup neocomplcache
autocmd!
autocmd InsertEnter * call s:on_insert_enter()
Expand Down Expand Up @@ -99,7 +99,7 @@ function! neocomplcache#enable() "{{{

call s:initialize_variables()

" Initialize keyword patterns."{{{
" Initialize keyword patterns. "{{{
call neocomplcache#util#set_default(
\ 'g:neocomplcache_keyword_patterns', {})
call neocomplcache#util#set_default_dictionary(
Expand Down Expand Up @@ -324,7 +324,7 @@ function! neocomplcache#enable() "{{{
\'\h\w*')
"}}}

" Initialize next keyword patterns."{{{
" Initialize next keyword patterns. "{{{
call neocomplcache#util#set_default(
\ 'g:neocomplcache_next_keyword_patterns', {})
call neocomplcache#util#set_default_dictionary(
Expand All @@ -347,7 +347,7 @@ function! neocomplcache#enable() "{{{
\'[[:alnum:]_:-]*>\|[^"]*"')
"}}}

" Initialize same file type lists."{{{
" Initialize same file type lists. "{{{
call neocomplcache#util#set_default(
\ 'g:neocomplcache_same_filetype_lists', {})
call neocomplcache#util#set_default_dictionary(
Expand Down Expand Up @@ -462,7 +462,7 @@ function! neocomplcache#enable() "{{{
\ 'int-php', 'php')
"}}}

" Initialize context filetype lists."{{{
" Initialize context filetype lists. "{{{
call neocomplcache#util#set_default(
\ 'g:neocomplcache_context_filetype_lists', {})
call neocomplcache#util#set_default_dictionary(
Expand Down Expand Up @@ -541,7 +541,7 @@ function! neocomplcache#enable() "{{{
\])
"}}}

" Initialize delimiter patterns."{{{
" Initialize delimiter patterns. "{{{
call neocomplcache#util#set_default(
\ 'g:neocomplcache_delimiter_patterns', {})
call neocomplcache#util#set_default_dictionary(
Expand Down Expand Up @@ -575,7 +575,7 @@ function! neocomplcache#enable() "{{{
\ 'perl6', ['\.', '::'])
"}}}

" Initialize ctags arguments."{{{
" Initialize ctags arguments. "{{{
call neocomplcache#util#set_default(
\ 'g:neocomplcache_ctags_arguments_list', {})
call neocomplcache#util#set_default_dictionary(
Expand Down Expand Up @@ -607,23 +607,23 @@ function! neocomplcache#enable() "{{{
\ '__attribute_pure__,__attribute_warn_unused_result__,__attribute__+')
"}}}

" Initialize text mode filetypes."{{{
" Initialize text mode filetypes. "{{{
call neocomplcache#util#set_default(
\ 'g:neocomplcache_text_mode_filetypes', {})
call neocomplcache#util#set_default_dictionary(
\ 'g:neocomplcache_text_mode_filetypes',
\ 'text,help,tex,gitcommit,vcs-commit', 1)
"}}}

" Initialize tags filter patterns."{{{
" Initialize tags filter patterns. "{{{
call neocomplcache#util#set_default(
\ 'g:neocomplcache_tags_filter_patterns', {})
call neocomplcache#util#set_default_dictionary(
\'g:neocomplcache_tags_filter_patterns', 'c,cpp',
\'v:val.word !~ ''^[~_]''')
"}}}

" Initialize force omni completion pattern."{{{
" Initialize force omni completion pattern. "{{{
call neocomplcache#util#set_default(
\ 'g:neocomplcache_force_omni_patterns', {})
call neocomplcache#util#set_default_dictionary(
Expand All @@ -635,7 +635,7 @@ function! neocomplcache#enable() "{{{
call neocomplcache#util#set_default(
\ 'g:neocomplcache_ignore_composite_filetype_lists', {})

" Add commands."{{{
" Add commands. "{{{
command! -nargs=? Neco call s:display_neco(<q-args>)
command! -nargs=1 NeoComplCacheAutoCompletionLength
\ call s:set_auto_completion_length(<args>)
Expand All @@ -650,7 +650,7 @@ function! neocomplcache#enable() "{{{
let g:neocomplcache_min_keyword_length = 1
endif

" Initialize omni function list."{{{
" Initialize omni function list. "{{{
if !exists('g:neocomplcache_omni_functions')
let g:neocomplcache_omni_functions = {}
endif
Expand Down Expand Up @@ -946,7 +946,7 @@ function! s:check_in_do_auto_complete() "{{{
endif
endfunction"}}}

" Source helper."{{{
" Source helper. "{{{
function! neocomplcache#available_complfuncs() "{{{
return s:complfunc_sources
endfunction"}}}
Expand Down Expand Up @@ -1019,7 +1019,7 @@ function! neocomplcache#keyword_escape(cur_keyword_str) "{{{
\ pattern, 'g') . keyword_escape[13:]
endif
else
" Underbar completion."{{{
" Underbar completion. "{{{
if g:neocomplcache_enable_underbar_completion
\ && keyword_escape =~ '[^_]_\|^_'
let keyword_escape = substitute(keyword_escape,
Expand All @@ -1031,7 +1031,7 @@ function! neocomplcache#keyword_escape(cur_keyword_str) "{{{
\ '[^-]\zs-', '[^-]*-', 'g')
endif
"}}}
" Camel case completion."{{{
" Camel case completion. "{{{
if g:neocomplcache_enable_camel_case_completion
\ && keyword_escape =~ '\u\?\U*'
let keyword_escape =
Expand Down Expand Up @@ -1238,23 +1238,23 @@ function! neocomplcache#add_dictionaries(dictionaries) "{{{
return ret
endfunction"}}}

" Rank order."{{{
" Rank order. "{{{
function! neocomplcache#compare_rank(i1, i2)
let diff = get(a:i2, 'rank', 0) - get(a:i1, 'rank', 0)
if !diff
let diff = (a:i1.word ># a:i2.word) ? 1 : -1
endif
return diff
endfunction"}}}
" Word order."{{{
" Word order. "{{{
function! neocomplcache#compare_word(i1, i2)
return (a:i1.word ># a:i2.word) ? 1 : -1
endfunction"}}}
" Nothing order."{{{
" Nothing order. "{{{
function! neocomplcache#compare_nothing(i1, i2)
return 0
endfunction"}}}
" Human order."{{{
" Human order. "{{{
function! neocomplcache#compare_human(i1, i2)
let words_1 = map(split(a:i1.word, '\D\zs\ze\d'),
\ "v:val =~ '^\\d' ? str2nr(v:val) : v:val")
Expand All @@ -1274,12 +1274,12 @@ function! neocomplcache#compare_human(i1, i2)
return words_1_len - words_2_len
endfunction"}}}

" Source rank order."{{{
" Source rank order. "{{{
function! s:compare_source_rank(i1, i2)
return neocomplcache#get_source_rank(a:i2[0]) -
\ neocomplcache#get_source_rank(a:i1[0])
endfunction"}}}
" Pos order."{{{
" Pos order. "{{{
function! s:compare_pos(i1, i2)
return a:i1[0] == a:i2[0] ? a:i1[1] - a:i2[1] : a:i1[0] - a:i2[0]
endfunction"}}}
Expand Down Expand Up @@ -1860,7 +1860,7 @@ function! s:set_complete_results_pos(cur_text, ...) "{{{
call filter(sources, '!neocomplcache#is_plugin_locked(v:key)')
endif

" Try source completion."{{{
" Try source completion. "{{{
let complete_results = {}
for [source_name, source] in items(sources)
if source.kind ==# 'plugin'
Expand Down Expand Up @@ -1992,7 +1992,7 @@ function! neocomplcache#filetype_complete(arglead, cmdline, cursorpos) "{{{
endfunction"}}}
"}}}

" Command functions."{{{
" Command functions. "{{{
function! neocomplcache#toggle_lock() "{{{
if !neocomplcache#is_enabled()
call neocomplcache#enable()
Expand Down Expand Up @@ -2215,7 +2215,7 @@ function! s:set_auto_completion_length(len) "{{{
endfunction"}}}
"}}}

" Key mapping functions."{{{
" Key mapping functions. "{{{
function! neocomplcache#smart_close_popup() "{{{
return g:neocomplcache_enable_auto_select ?
\ neocomplcache#cancel_popup() : neocomplcache#close_popup()
Expand Down Expand Up @@ -2349,7 +2349,7 @@ function! neocomplcache#start_manual_complete_list(cur_keyword_pos, cur_keyword_
endfunction"}}}
"}}}

" Event functions."{{{
" Event functions. "{{{
function! s:on_moved_i() "{{{
" Get cursor word.
let cur_text = s:get_cur_text()
Expand Down Expand Up @@ -2465,7 +2465,7 @@ function! s:clear_result()
endfunction
"}}}

" Internal helper functions."{{{
" Internal helper functions. "{{{
function! s:get_cur_text() "{{{
let cur_text =
\ (mode() ==# 'i' ? (col('.')-1) : col('.')) >= len(getline('.')) ?
Expand Down
26 changes: 13 additions & 13 deletions autoload/neocomplcache/async_cache.vim
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
let s:save_cpo = &cpo
set cpo&vim

function! s:main(argv)"{{{
function! s:main(argv) "{{{
" args: funcname, outputname filename pattern_file_name mark minlen maxfilename
let [funcname, outputname, filename, pattern_file_name, mark, minlen, maxfilename, fileencoding]
\ = a:argv
Expand Down Expand Up @@ -65,7 +65,7 @@ function! s:main(argv)"{{{
call writefile([string(keyword_list)], outputname)
endfunction"}}}

function! s:load_from_file(filename, pattern_file_name, mark, minlen, maxfilename, fileencoding)"{{{
function! s:load_from_file(filename, pattern_file_name, mark, minlen, maxfilename, fileencoding) "{{{
if !filereadable(a:filename)
" File not found.
return []
Expand All @@ -84,9 +84,9 @@ function! s:load_from_file(filename, pattern_file_name, mark, minlen, maxfilenam
let dup_check = {}
let keyword_pattern2 = '^\%('.pattern.'\m\)'

for line in lines"{{{
for line in lines "{{{
let match = match(line, pattern)
while match >= 0"{{{
while match >= 0 "{{{
let match_str = matchstr(line, keyword_pattern2, match)

if !has_key(dup_check, match_str) && len(match_str) >= a:minlen
Expand All @@ -103,7 +103,7 @@ function! s:load_from_file(filename, pattern_file_name, mark, minlen, maxfilenam
return keyword_list
endfunction"}}}

function! s:load_from_tags(filename, pattern_file_name, mark, minlen, maxfilename, fileencoding)"{{{
function! s:load_from_tags(filename, pattern_file_name, mark, minlen, maxfilename, fileencoding) "{{{
let menu = '[' . a:mark . '] ' . s:strwidthpart(
\ fnamemodify(a:filename, ':t'), a:maxfilename)

Expand Down Expand Up @@ -145,7 +145,7 @@ function! s:load_from_tags(filename, pattern_file_name, mark, minlen, maxfilenam
\ a:mark, a:minlen, a:maxfilename, a:fileencoding)
endif

for line in tags_list"{{{
for line in tags_list "{{{
let tag = split(substitute(line, "\<CR>", '', 'g'), '\t', 1)

" Add keywords.
Expand Down Expand Up @@ -221,7 +221,7 @@ function! s:load_from_tags(filename, pattern_file_name, mark, minlen, maxfilenam
return keyword_lists
endfunction"}}}

function! s:truncate(str, width)"{{{
function! s:truncate(str, width) "{{{
" Original function is from mattn.
" http://github.com/mattn/googlereader-vim/tree/master

Expand All @@ -244,7 +244,7 @@ function! s:truncate(str, width)"{{{
return ret
endfunction"}}}

function! s:strwidthpart(str, width)"{{{
function! s:strwidthpart(str, width) "{{{
let ret = a:str
let width = s:wcswidth(a:str)
while width > a:width
Expand All @@ -266,14 +266,14 @@ endfunction

if v:version >= 703
" Use builtin function.
function! s:wcswidth(str)"{{{
function! s:wcswidth(str) "{{{
return strdisplaywidth(a:str)
endfunction"}}}
function! s:wcwidth(str)"{{{
function! s:wcwidth(str) "{{{
return strwidth(a:str)
endfunction"}}}
else
function! s:wcswidth(str)"{{{
function! s:wcswidth(str) "{{{
if a:str =~# '^[\x00-\x7f]*$'
return strlen(a:str)
end
Expand All @@ -293,7 +293,7 @@ else
endfunction"}}}

" UTF-8 only.
function! s:wcwidth(ucs)"{{{
function! s:wcwidth(ucs) "{{{
let ucs = a:ucs
if (ucs >= 0x1100
\ && (ucs <= 0x115f
Expand Down Expand Up @@ -326,7 +326,7 @@ if argc() == 8 &&

qall!
else
function! neocomplcache#async_cache#main(argv)"{{{
function! neocomplcache#async_cache#main(argv) "{{{
call s:main(a:argv)
endfunction"}}}
endif
Expand Down
Loading

0 comments on commit 0cbcac0

Please sign in to comment.