From dcb428d0a7fd9d1b9a0c33546f83a2f76b4da8f6 Mon Sep 17 00:00:00 2001 From: Vincent Bachelier Date: Thu, 19 Aug 2021 14:07:07 +0200 Subject: [PATCH] update --- .gitignore | 0 .gitmodules | 0 autoload/pathogen.vim | 422 ++++++++++++++++++------------------------ bundle/.keep | 0 bundle/perl-support | 2 +- bundle/vim-bundler | 2 +- bundle/vim-fugitive | 2 +- bundle/vim-rails | 2 +- rc/vimrc | 10 +- 9 files changed, 190 insertions(+), 250 deletions(-) mode change 100644 => 100755 .gitignore mode change 100644 => 100755 .gitmodules mode change 100644 => 100755 autoload/pathogen.vim mode change 100644 => 100755 bundle/.keep mode change 100644 => 100755 rc/vimrc diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/.gitmodules b/.gitmodules old mode 100644 new mode 100755 diff --git a/autoload/pathogen.vim b/autoload/pathogen.vim old mode 100644 new mode 100755 index 57ca1bd..b2891cd --- a/autoload/pathogen.vim +++ b/autoload/pathogen.vim @@ -1,61 +1,63 @@ " pathogen.vim - path option manipulation " Maintainer: Tim Pope -" Version: 2.2 +" Version: 2.4 " Install in ~/.vim/autoload (or ~\vimfiles\autoload). " " For management of individually installed plugins in ~/.vim/bundle (or -" ~\vimfiles\bundle), adding `call pathogen#infect()` to the top of your +" ~\vimfiles\bundle), adding `execute pathogen#infect()` to the top of your " .vimrc is the only other setup necessary. " -" The API is documented inline below. For maximum ease of reading, -" :set foldmethod=marker +" The API is documented inline below. if exists("g:loaded_pathogen") || &cp finish endif let g:loaded_pathogen = 1 -function! s:warn(msg) - if &verbose - echohl WarningMsg - echomsg a:msg - echohl NONE - endif -endfunction - " Point of entry for basic default usage. Give a relative path to invoke -" pathogen#incubate() (defaults to "bundle/{}"), or an absolute path to invoke -" pathogen#surround(). For backwards compatibility purposes, a full path that -" does not end in {} or * is given to pathogen#runtime_prepend_subdirectories() -" instead. -function! pathogen#infect(...) abort " {{{1 - for path in a:0 ? reverse(copy(a:000)) : ['bundle/{}'] - if path =~# '^[^\\/]\+$' - call s:warn('Change pathogen#infect('.string(path).') to pathogen#infect('.string(path.'/{}').')') - call pathogen#incubate(path . '/{}') - elseif path =~# '^[^\\/]\+[\\/]\%({}\|\*\)$' - call pathogen#incubate(path) - elseif path =~# '[\\/]\%({}\|\*\)$' +" pathogen#interpose() or an absolute path to invoke pathogen#surround(). +" Curly braces are expanded with pathogen#expand(): "bundle/{}" finds all +" subdirectories inside "bundle" inside all directories in the runtime path. +" If no arguments are given, defaults "bundle/{}", and also "pack/{}/start/{}" +" on versions of Vim without native package support. +function! pathogen#infect(...) abort + if a:0 + let paths = filter(reverse(copy(a:000)), 'type(v:val) == type("")') + else + let paths = ['bundle/{}', 'pack/{}/start/{}'] + endif + if has('packages') + call filter(paths, 'v:val !~# "^pack/[^/]*/start/[^/]*$"') + endif + let static = '^\%([$~\\/]\|\w:[\\/]\)[^{}*]*$' + for path in filter(copy(paths), 'v:val =~# static') + call pathogen#surround(path) + endfor + for path in filter(copy(paths), 'v:val !~# static') + if path =~# '^\%([$~\\/]\|\w:[\\/]\)' call pathogen#surround(path) else - call s:warn('Change pathogen#infect('.string(path).') to pathogen#infect('.string(path.'/{}').')') - call pathogen#surround(path . '/{}') + call pathogen#interpose(path) endif endfor call pathogen#cycle_filetype() + if pathogen#is_disabled($MYVIMRC) + return 'finish' + endif return '' -endfunction " }}}1 +endfunction " Split a path into a list. -function! pathogen#split(path) abort " {{{1 +function! pathogen#split(path) abort if type(a:path) == type([]) | return a:path | endif + if empty(a:path) | return [] | endif let split = split(a:path,'\\\@"),'!isdirectory(v:val)')) && (!filereadable(dir.sep.'doc'.sep.'tags') || filewritable(dir.sep.'doc'.sep.'tags')) - helptags `=dir.'/doc'` - endif - endfor - endfor -endfunction " }}}1 - -command! -bar Helptags :call pathogen#helptags() - -" Execute the given command. This is basically a backdoor for --remote-expr. -function! pathogen#execute(...) abort " {{{1 - for command in a:000 - execute command - endfor - return '' -endfunction " }}}1 - -" Like findfile(), but hardcoded to use the runtimepath. -function! pathogen#runtime_findfile(file,count) abort "{{{1 - let rtp = pathogen#join(1,pathogen#split(&rtp)) - let file = findfile(a:file,rtp,a:count) - if file ==# '' - return '' - else - return fnamemodify(file,':p') - endif -endfunction " }}}1 - " Backport of fnameescape(). -function! pathogen#fnameescape(string) abort " {{{1 +function! pathogen#fnameescape(string) abort if exists('*fnameescape') return fnameescape(a:string) elseif a:string ==# '-' @@ -259,70 +248,17 @@ function! pathogen#fnameescape(string) abort " {{{1 else return substitute(escape(a:string," \t\n*?[{`$\\%#'\"|!<"),'^[+>]','\\&','') endif -endfunction " }}}1 +endfunction -if exists(':Vedit') - finish -endif - -let s:vopen_warning = 0 - -function! s:find(count,cmd,file,lcd) " {{{1 - let rtp = pathogen#join(1,pathogen#split(&runtimepath)) - let file = pathogen#runtime_findfile(a:file,a:count) +" Like findfile(), but hardcoded to use the runtimepath. +function! pathogen#runtime_findfile(file,count) abort + let rtp = pathogen#join(1,pathogen#split(&rtp)) + let file = findfile(a:file,rtp,a:count) if file ==# '' - return "echoerr 'E345: Can''t find file \"".a:file."\" in runtimepath'" - endif - if !s:vopen_warning - let s:vopen_warning = 1 - let warning = '|echohl WarningMsg|echo "Install scriptease.vim to continue using :V'.a:cmd.'"|echohl NONE' + return '' else - let warning = '' + return fnamemodify(file,':p') endif - if a:lcd - let path = file[0:-strlen(a:file)-2] - execute 'lcd `=path`' - return a:cmd.' '.pathogen#fnameescape(a:file) . warning - else - return a:cmd.' '.pathogen#fnameescape(file) . warning - endif -endfunction " }}}1 +endfunction -function! s:Findcomplete(A,L,P) " {{{1 - let sep = pathogen#separator() - let cheats = { - \'a': 'autoload', - \'d': 'doc', - \'f': 'ftplugin', - \'i': 'indent', - \'p': 'plugin', - \'s': 'syntax'} - if a:A =~# '^\w[\\/]' && has_key(cheats,a:A[0]) - let request = cheats[a:A[0]].a:A[1:-1] - else - let request = a:A - endif - let pattern = substitute(request,'/\|\'.sep,'*'.sep,'g').'*' - let found = {} - for path in pathogen#split(&runtimepath) - let path = expand(path, ':p') - let matches = split(glob(path.sep.pattern),"\n") - call map(matches,'isdirectory(v:val) ? v:val.sep : v:val') - call map(matches,'expand(v:val, ":p")[strlen(path)+1:-1]') - for match in matches - let found[match] = 1 - endfor - endfor - return sort(keys(found)) -endfunction " }}}1 - -command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Ve :execute s:find(,'edit',,0) -command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vedit :execute s:find(,'edit',,0) -command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vopen :execute s:find(,'edit',,1) -command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vsplit :execute s:find(,'split',,1) -command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vvsplit :execute s:find(,'vsplit',,1) -command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vtabedit :execute s:find(,'tabedit',,1) -command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vpedit :execute s:find(,'pedit',,1) -command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vread :execute s:find(,'read',,1) - -" vim:set et sw=2: +" vim:set et sw=2 foldmethod=expr foldexpr=getline(v\:lnum)=~'^\"\ Section\:'?'>1'\:getline(v\:lnum)=~#'^fu'?'a1'\:getline(v\:lnum)=~#'^endf'?'s1'\:'=': diff --git a/bundle/.keep b/bundle/.keep old mode 100644 new mode 100755 diff --git a/bundle/perl-support b/bundle/perl-support index 96f8b0b..912062e 160000 --- a/bundle/perl-support +++ b/bundle/perl-support @@ -1 +1 @@ -Subproject commit 96f8b0b4a73127a6c48b1bca8ea93493b857bf30 +Subproject commit 912062ef7d33fed8834f375c1746f0bc5cceb7d2 diff --git a/bundle/vim-bundler b/bundle/vim-bundler index 722e344..40efd19 160000 --- a/bundle/vim-bundler +++ b/bundle/vim-bundler @@ -1 +1 @@ -Subproject commit 722e34404a9aa7d51cff2cc23ccff71f407a6569 +Subproject commit 40efd19c0a4447ff2f142d3d89735ac3d637a355 diff --git a/bundle/vim-fugitive b/bundle/vim-fugitive index 00b0916..286bf90 160000 --- a/bundle/vim-fugitive +++ b/bundle/vim-fugitive @@ -1 +1 @@ -Subproject commit 00b0916ae2fc4e329f519686348de13d7477d770 +Subproject commit 286bf9096de0d74a5b663f2c6d4ae879ef97d93b diff --git a/bundle/vim-rails b/bundle/vim-rails index bdc3238..3b37963 160000 --- a/bundle/vim-rails +++ b/bundle/vim-rails @@ -1 +1 @@ -Subproject commit bdc32389e7053c608a65f870c6c8f5e1210432a7 +Subproject commit 3b3796352a6f1a68e54e5f7ae5e0c1b9103fab0e diff --git a/rc/vimrc b/rc/vimrc old mode 100644 new mode 100755 index fb088c6..eeb6a07 --- a/rc/vimrc +++ b/rc/vimrc @@ -26,9 +26,9 @@ map Q gq inoremap u " In many terminal emulators the mouse works just fine, thus enable it. -if has('mouse') - set mouse=a -endif +" if has('mouse') +" set mouse=a +" endif " Switch syntax highlighting on, when the terminal has colors " Also switch on highlighting the last used search pattern. @@ -88,3 +88,7 @@ let mapleader = "," "TagShortCut map t :Tlist +"TabSpace +set tabstop=2 +set shiftwidth=2 +set expandtab