@@ -284,68 +284,4 @@ function! pathogen#runtime_append_all_bundles(...) abort
284
284
return pathogen#interpose (a: 0 ? a: 1 . ' /{}' : ' bundle/{}' )
285
285
endfunction
286
286
287
- if exists (' :Vedit' )
288
- finish
289
- endif
290
-
291
- let s: vopen_warning = 0
292
-
293
- function ! s: find (count ,cmd,file ,lcd )
294
- let rtp = pathogen#join (1 ,pathogen#split (&runtimepath ))
295
- let file = pathogen#runtime_findfile (a: file ,a: count )
296
- if file == # ' '
297
- return " echoerr 'E345: Can''t find file \" " .a: file ." \" in runtimepath'"
298
- endif
299
- if ! s: vopen_warning
300
- let s: vopen_warning = 1
301
- let warning = ' |echohl WarningMsg|echo "Install scriptease.vim to continue using :V' .a: cmd .' "|echohl NONE'
302
- else
303
- let warning = ' '
304
- endif
305
- if a: lcd
306
- let path = file [0 :- strlen (a: file )-2 ]
307
- execute ' lcd `=path`'
308
- return a: cmd .' ' .pathogen#fnameescape (a: file ) . warning
309
- else
310
- return a: cmd .' ' .pathogen#fnameescape (file ) . warning
311
- endif
312
- endfunction
313
-
314
- function ! s: Findcomplete (A,L,P )
315
- let sep = pathogen#slash ()
316
- let cheats = {
317
- \' a ' : ' autoload',
318
- \' d ' : ' doc',
319
- \' f ' : ' ftplugin',
320
- \' i ' : ' indent ',
321
- \' p ' : ' plugin ',
322
- \' s ' : ' syntax '}
323
- if a: A = ~# ' ^\w[\\/]' && has_key (cheats,a: A [0 ])
324
- let request = cheats[a: A [0 ]].a: A [1 :-1 ]
325
- else
326
- let request = a: A
327
- endif
328
- let pattern = substitute (request,' /\|\' .sep,' *' .sep,' g' ).' *'
329
- let found = {}
330
- for path in pathogen#split (&runtimepath )
331
- let path = expand (path , ' :p' )
332
- let matches = split (glob (path .sep.pattern)," \n " )
333
- call map (matches,' isdirectory(v:val) ? v:val.sep : v:val' )
334
- call map (matches,' expand(v:val, ":p")[strlen(path)+1:-1]' )
335
- for match in matches
336
- let found[match ] = 1
337
- endfor
338
- endfor
339
- return sort (keys (found))
340
- endfunction
341
-
342
- command ! - bar - bang -range =1 -nargs =1 -complete =customlist ,s: Findcomplete Ve :execute s: find (<count> ,' edit<bang>' ,<q-args> ,0 )
343
- command ! - bar - bang -range =1 -nargs =1 -complete =customlist ,s: Findcomplete Vedit :execute s: find (<count> ,' edit<bang>' ,<q-args> ,0 )
344
- command ! - bar - bang -range =1 -nargs =1 -complete =customlist ,s: Findcomplete Vopen :execute s: find (<count> ,' edit<bang>' ,<q-args> ,1 )
345
- command ! - bar - bang -range =1 -nargs =1 -complete =customlist ,s: Findcomplete Vsplit :execute s: find (<count> ,' split' ,<q-args> ,<bang> 1 )
346
- command ! - bar - bang -range =1 -nargs =1 -complete =customlist ,s: Findcomplete Vvsplit :execute s: find (<count> ,' vsplit' ,<q-args> ,<bang> 1 )
347
- command ! - bar - bang -range =1 -nargs =1 -complete =customlist ,s: Findcomplete Vtabedit :execute s: find (<count> ,' tabedit' ,<q-args> ,<bang> 1 )
348
- command ! - bar - bang -range =1 -nargs =1 -complete =customlist ,s: Findcomplete Vpedit :execute s: find (<count> ,' pedit' ,<q-args> ,<bang> 1 )
349
- command ! - bar - bang -range =1 -nargs =1 -complete =customlist ,s: Findcomplete Vread :execute s: find (<count> ,' read' ,<q-args> ,<bang> 1 )
350
-
351
287
" vim:set et sw = 2 foldmethod = expr foldexpr = getline (v \: lnum)= ~' ^\"\ Section\:' ?' >1' \: getline (v \: lnum)= ~#' ^fu' ?' a1' \: getline (v \: lnum)= ~#' ^endf' ?' s1' \: ' =' :
0 commit comments