Skip to content

Commit e3dfc27

Browse files
author
root
committed
first commit
0 parents  commit e3dfc27

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+14847
-0
lines changed

.netrwhist

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
let g:netrw_dirhistmax =10
2+
let g:netrw_dirhist_cnt =0

2.22.3.zip

32 KB
Binary file not shown.

README.md

Whitespace-only changes.

autoload/pathogen.vim

+132
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
" pathogen.vim - path option manipulation
2+
" Maintainer: Tim Pope <[email protected]>
3+
" Version: 1.2
4+
5+
" Install in ~/.vim/autoload (or ~\vimfiles\autoload).
6+
"
7+
" API is documented below.
8+
9+
if exists("g:loaded_pathogen") || &cp
10+
finish
11+
endif
12+
let g:loaded_pathogen = 1
13+
14+
" Split a path into a list.
15+
function! pathogen#split(path) abort " {{{1
16+
if type(a:path) == type([]) | return a:path | endif
17+
let split = split(a:path,'\\\@<!\%(\\\\\)*\zs,')
18+
return map(split,'substitute(v:val,''\\\([\\,]\)'',''\1'',"g")')
19+
endfunction " }}}1
20+
21+
" Convert a list to a path.
22+
function! pathogen#join(...) abort " {{{1
23+
if type(a:1) == type(1) && a:1
24+
let i = 1
25+
let space = ' '
26+
else
27+
let i = 0
28+
let space = ''
29+
endif
30+
let path = ""
31+
while i < a:0
32+
if type(a:000[i]) == type([])
33+
let list = a:000[i]
34+
let j = 0
35+
while j < len(list)
36+
let escaped = substitute(list[j],'[,'.space.']\|\\[\,'.space.']\@=','\\&','g')
37+
let path .= ',' . escaped
38+
let j += 1
39+
endwhile
40+
else
41+
let path .= "," . a:000[i]
42+
endif
43+
let i += 1
44+
endwhile
45+
return substitute(path,'^,','','')
46+
endfunction " }}}1
47+
48+
" Convert a list to a path with escaped spaces for 'path', 'tag', etc.
49+
function! pathogen#legacyjoin(...) abort " {{{1
50+
return call('pathogen#join',[1] + a:000)
51+
endfunction " }}}1
52+
53+
" Remove duplicates from a list.
54+
function! pathogen#uniq(list) abort " {{{1
55+
let i = 0
56+
let seen = {}
57+
while i < len(a:list)
58+
if has_key(seen,a:list[i])
59+
call remove(a:list,i)
60+
else
61+
let seen[a:list[i]] = 1
62+
let i += 1
63+
endif
64+
endwhile
65+
return a:list
66+
endfunction " }}}1
67+
68+
" \ on Windows unless shellslash is set, / everywhere else.
69+
function! pathogen#separator() abort " {{{1
70+
return !exists("+shellslash") || &shellslash ? '/' : '\'
71+
endfunction " }}}1
72+
73+
" Convenience wrapper around glob() which returns a list.
74+
function! pathogen#glob(pattern) abort " {{{1
75+
let files = split(glob(a:pattern),"\n")
76+
return map(files,'substitute(v:val,"[".pathogen#separator()."/]$","","")')
77+
endfunction "}}}1
78+
79+
" Like pathogen#glob(), only limit the results to directories.
80+
function! pathogen#glob_directories(pattern) abort " {{{1
81+
return filter(pathogen#glob(a:pattern),'isdirectory(v:val)')
82+
endfunction "}}}1
83+
84+
" Prepend all subdirectories of path to the rtp, and append all after
85+
" directories in those subdirectories.
86+
function! pathogen#runtime_prepend_subdirectories(path) " {{{1
87+
let sep = pathogen#separator()
88+
let before = pathogen#glob_directories(a:path.sep."*[^~]")
89+
let after = pathogen#glob_directories(a:path.sep."*[^~]".sep."after")
90+
let rtp = pathogen#split(&rtp)
91+
let path = expand(a:path)
92+
call filter(rtp,'v:val[0:strlen(path)-1] !=# path')
93+
let &rtp = pathogen#join(pathogen#uniq(before + rtp + after))
94+
return &rtp
95+
endfunction " }}}1
96+
97+
" For each directory in rtp, check for a subdirectory named dir. If it
98+
" exists, add all subdirectories of that subdirectory to the rtp, immediately
99+
" after the original directory. If no argument is given, 'bundle' is used.
100+
" Repeated calls with the same arguments are ignored.
101+
function! pathogen#runtime_append_all_bundles(...) " {{{1
102+
let sep = pathogen#separator()
103+
let name = a:0 ? a:1 : 'bundle'
104+
if "\n".s:done_bundles =~# "\\M\n".name."\n"
105+
return ""
106+
endif
107+
let s:done_bundles .= name . "\n"
108+
let list = []
109+
for dir in pathogen#split(&rtp)
110+
if dir =~# '\<after$'
111+
let list += pathogen#glob_directories(substitute(dir,'after$',name.sep.'*[^~]'.sep.'after','')) + [dir]
112+
else
113+
let list += [dir] + pathogen#glob_directories(dir.sep.name.sep.'*[^~]')
114+
endif
115+
endfor
116+
let &rtp = pathogen#join(pathogen#uniq(list))
117+
return 1
118+
endfunction
119+
120+
let s:done_bundles = ''
121+
" }}}1
122+
123+
" Invoke :helptags on all non-$VIM doc directories in runtimepath.
124+
function! pathogen#helptags() " {{{1
125+
for dir in pathogen#split(&rtp)
126+
if dir[0 : strlen($VIM)-1] !=# $VIM && isdirectory(dir.'/doc') && (!filereadable(dir.'/doc/tags') || filewritable(dir.'/doc/tags'))
127+
helptags `=dir.'/doc'`
128+
endif
129+
endfor
130+
endfunction " }}}1
131+
132+
" vim:set ft=vim ts=8 sw=2 sts=2:

bundle/ack/doc/ack.txt

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
*ack.txt* Plugin that integrates ack with Vim
2+
3+
==============================================================================
4+
Author: Antoine Imbert <[email protected]> *ack-author*
5+
License: Same terms as Vim itself (see |license|)
6+
7+
==============================================================================
8+
INTRODUCTION *ack*
9+
10+
This plugin is a front for the Perl module App::Ack. Ack can be used as a
11+
replacement for grep. This plugin will allow you to run ack from vim, and
12+
shows the results in a split window.
13+
14+
:Ack [options] {pattern} [{directory}] *:Ack*
15+
16+
Search recursively in {directory} (which defaults to the current
17+
directory) for the {pattern}. Behaves just like the |:grep| command, but
18+
will open the |Quickfix| window for you.
19+
20+
:AckAdd [options] {pattern} [{directory}] *:AckAdd*
21+
22+
Just like |:Ack| + |:grepadd|. Appends the |quickfix| with the results
23+
24+
:AckFromSearch [{directory}] *:AckFromSearch*
25+
26+
Just like |:Ack| but the pattern is from previous search.
27+
28+
:LAck [options] {pattern} [{directory}] *:LAck*
29+
30+
Just like |:Ack| + |:lgrep|. Searches, but opens in |location-list|
31+
32+
:LAckAdd [options] {pattern} [{directory}] *:LAckAdd*
33+
34+
Just like |:Ack| + |:lgrepadd|. Searches, but appends results to
35+
|location-list|
36+
37+
Files containing the search term will be listed in the split window, along
38+
with the line number of the occurrence, once for each occurrence. <Enter> on
39+
a line in this window will open the file, and place the cursor on the matching
40+
line.
41+
42+
See http://search.cpan.org/~petdance/ack/ack for more information.

bundle/ack/doc/tags

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
:Ack ack.txt /*:Ack*
2+
:AckAdd ack.txt /*:AckAdd*
3+
:AckFromSearch ack.txt /*:AckFromSearch*
4+
:LAck ack.txt /*:LAck*
5+
:LAckAdd ack.txt /*:LAckAdd*
6+
ack ack.txt /*ack*
7+
ack-author ack.txt /*ack-author*
8+
ack.txt ack.txt /*ack.txt*

bundle/ack/plugin/ack.vim

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
" NOTE: You must, of course, install the ack script
2+
" in your path.
3+
" On Ubuntu:
4+
" sudo apt-get install ack-grep
5+
" ln -s /usr/bin/ack-grep /usr/bin/ack
6+
" With MacPorts:
7+
" sudo port install p5-app-ack
8+
9+
let g:ackprg="ack -H --nocolor --nogroup"
10+
11+
function! s:Ack(cmd, args)
12+
redraw
13+
echo "Searching ..."
14+
15+
let grepprg_bak=&grepprg
16+
try
17+
let &grepprg=g:ackprg
18+
silent execute a:cmd . " " . a:args
19+
finally
20+
let &grepprg=grepprg_bak
21+
endtry
22+
23+
if a:cmd =~# '^l'
24+
botright lopen
25+
else
26+
botright copen
27+
endif
28+
redraw!
29+
endfunction
30+
31+
function! s:AckFromSearch(cmd, args)
32+
let search = getreg('/')
33+
" translate vim regular expression to perl regular expression.
34+
let search = substitute(search,'\(\\<\|\\>\)','\\b','g')
35+
call s:Ack(a:cmd, '"' . search .'" '. a:args)
36+
endfunction
37+
38+
command! -bang -nargs=* -complete=file Ack call s:Ack('grep<bang>',<q-args>)
39+
command! -bang -nargs=* -complete=file AckAdd call s:Ack('grepadd<bang>', <q-args>)
40+
command! -bang -nargs=* -complete=file AckFromSearch call s:AckFromSearch('grep<bang>', <q-args>)
41+
command! -bang -nargs=* -complete=file LAck call s:Ack('lgrep<bang>', <q-args>)
42+
command! -bang -nargs=* -complete=file LAckAdd call s:Ack('lgrepadd<bang>', <q-args>)

bundle/endwise/plugin/endwise.vim

+132
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
" endwise.vim - EndWise
2+
" Author: Tim Pope <[email protected]>
3+
" Version: 1.0
4+
5+
" Distributable under the same terms as Vim itself (see :help license)
6+
7+
" Exit quickly when:
8+
" - this plugin was already loaded (or disabled)
9+
" - when 'compatible' is set
10+
if (exists("g:loaded_endwise") && g:loaded_endwise) || &cp
11+
finish
12+
endif
13+
let g:loaded_endwise = 1
14+
15+
16+
let s:cpo_save = &cpo
17+
set cpo&vim
18+
19+
augroup endwise " {{{1
20+
au!
21+
autocmd FileType ruby
22+
\ let b:endwise_addition = '\=submatch(0)=="{" ? "}" : "end"' |
23+
\ let b:endwise_words = 'module,class,def,if,unless,case,while,until,begin,do' |
24+
\ let b:endwise_pattern = '^\s*\zs\%(module\|class\|def\|if\|unless\|case\|while\|until\|for\|\|begin\)\>\%(.*[^.:@$]\<end\>\)\@!\|\<do\ze\%(\s*|.*|\)\=\s*$' |
25+
\ let b:endwise_syngroups = 'rubyModule,rubyClass,rubyDefine,rubyControl,rubyConditional,rubyRepeat'
26+
autocmd FileType vb,vbnet,aspvbs
27+
\ let b:endwise_addition = 'End &' |
28+
\ let b:endwise_words = 'Function,Sub,Class,Module,Enum,Namespace' |
29+
\ let b:endwise_pattern = '\%(\<End\>.*\)\@<!\<&\>' |
30+
\ let b:endwise_syngroups = 'vbStatement,vbnetStorage,vbnetProcedure,vbnet.*Words,AspVBSStatement'
31+
autocmd FileType vim
32+
\ let b:endwise_addition = 'end&' |
33+
\ let b:endwise_words = 'fu\%[nction],wh\%[ile],if,for,try' |
34+
\ let b:endwise_syngroups = 'vimFuncKey,vimNotFunc,vimCommand'
35+
augroup END " }}}1
36+
37+
" Maps {{{1
38+
39+
40+
if maparg("<Plug>DiscretionaryEnd") == ""
41+
inoremap <silent> <SID>DiscretionaryEnd <C-R>=<SID>crend(0)<CR>
42+
inoremap <silent> <SID>AlwaysEnd <C-R>=<SID>crend(1)<CR>
43+
imap <script> <Plug>DiscretionaryEnd <SID>DiscretionaryEnd
44+
imap <script> <Plug>AlwaysEnd <SID>AlwaysEnd
45+
endif
46+
if maparg('<CR>','i') =~# '<C-R>=.*crend(.)<CR>\|<\%(Plug\|SID\)>.*End'
47+
" Already mapped
48+
elseif maparg('<CR>','i') =~ '<CR>'
49+
exe "imap <script> <C-X><CR> ".maparg('<CR>','i')."<SID>AlwaysEnd"
50+
exe "imap <script> <CR> ".maparg('<CR>','i')."<SID>DiscretionaryEnd"
51+
else
52+
imap <C-X><CR> <CR><Plug>AlwaysEnd
53+
imap <CR> <CR><Plug>DiscretionaryEnd
54+
endif
55+
56+
if maparg('<M-o>','i') == ''
57+
inoremap <M-o> <C-O>o
58+
endif
59+
60+
" }}}1
61+
62+
" Code {{{1
63+
64+
function! s:mysearchpair(beginpat,endpat,synpat)
65+
let g:endwise_syntaxes = ""
66+
let s:lastline = line('.')
67+
call s:synname()
68+
let line = searchpair(a:beginpat,'',a:endpat,'Wn','<SID>synname() !~# "^'.substitute(a:synpat,'\\','\\\\','g').'$"',line('.')+50)
69+
return line
70+
endfunction
71+
72+
function! s:crend(always)
73+
let n = ""
74+
if !exists("b:endwise_addition") || !exists("b:endwise_words") || !exists("b:endwise_syngroups")
75+
return n
76+
end
77+
let synpat = '\%('.substitute(b:endwise_syngroups,',','\\|','g').'\)'
78+
let wordchoice = '\%('.substitute(b:endwise_words,',','\\|','g').'\)'
79+
if exists("b:endwise_pattern")
80+
let beginpat = substitute(b:endwise_pattern,'&',substitute(wordchoice,'\\','\\&','g'),'g')
81+
else
82+
let beginpat = '\<'.wordchoice.'\>'
83+
endif
84+
let lnum = line('.') - 1
85+
let space = matchstr(getline(lnum),'^\s*')
86+
let col = match(getline(lnum),beginpat) + 1
87+
let word = matchstr(getline(lnum),beginpat)
88+
let endpat = substitute(word,'.*',b:endwise_addition,'')
89+
let y = n.endpat."\<C-O>O"
90+
let endpat = '\<'.substitute(wordchoice,'.*',b:endwise_addition,'').'\>'
91+
if a:always
92+
return y
93+
elseif col <= 0 || synIDattr(synID(lnum,col,1),'name') !~ '^'.synpat.'$'
94+
return n
95+
elseif getline('.') !~ '^\s*#\=$'
96+
return n
97+
endif
98+
let line = s:mysearchpair(beginpat,endpat,synpat)
99+
" even is false if no end was found, or if the end found was less
100+
" indented than the current line
101+
let even = strlen(matchstr(getline(line),'^\s*')) >= strlen(space)
102+
if line == 0
103+
let even = 0
104+
endif
105+
let g:endwise_debug = line . "(" . even . ")"
106+
if !even && line == line('.') + 1
107+
return y
108+
endif
109+
if even
110+
return n
111+
endif
112+
return y
113+
endfunction
114+
115+
function! s:synname()
116+
" Checking this helps to force things to stay in sync
117+
while s:lastline < line('.')
118+
let s = synIDattr(synID(s:lastline,indent(s:lastline)+1,1),'name')
119+
let s:lastline = nextnonblank(s:lastline + 1)
120+
endwhile
121+
122+
let s = synIDattr(synID(line('.'),col('.'),1),'name')
123+
let g:endwise_syntaxes = g:endwise_syntaxes . line('.').','.col('.')."=".s."\n"
124+
let s:lastline = line('.')
125+
return s
126+
endfunction
127+
128+
" }}}1
129+
130+
let &cpo = s:cpo_save
131+
132+
" vim:set ft=vim ff=unix ts=8 sw=4 sts=4:

0 commit comments

Comments
 (0)