Skip to content

Commit 57657d8

Browse files
committed
updated for version 7.0e05
1 parent fc1421e commit 57657d8

201 files changed

Lines changed: 2669 additions & 2351 deletions

File tree

Some content is hidden

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

runtime/autoload/netrw.vim

Lines changed: 88 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
" netrw.vim: Handles file transfer and remote directory listing across a network
22
" AUTOLOAD PORTION
3-
" Date: Apr 14, 2006
4-
" Version: 88
3+
" Date: Apr 21, 2006
4+
" Version: 91
55
" Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
66
" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
77
" Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1
@@ -23,7 +23,7 @@
2323
if &cp || exists("g:loaded_netrw")
2424
finish
2525
endif
26-
let g:loaded_netrw = "v88"
26+
let g:loaded_netrw = "v91"
2727
if v:version < 700
2828
echohl WarningMsg | echo "***netrw*** you need vim version 7.0 or later for version ".g:loaded_netrw." of netrw" | echohl None
2929
finish
@@ -396,7 +396,7 @@ fun! netrw#NetRead(mode,...)
396396
let choice = substitute(choice,'\\','/','ge')
397397
" call Decho("fixing up windows url to <".choice."> tmpfile<".tmpfile)
398398

399-
exe 'lcd ' . fnamemodify(tmpfile,':h')
399+
exe 'cd ' . fnamemodify(tmpfile,':h')
400400
let tmpfile = fnamemodify(tmpfile,':t')
401401
endif
402402

@@ -890,7 +890,7 @@ fun! netrw#NetWrite(...) range
890890
if has("win32") || has("win95") || has("win64") || has("win16")
891891
let choice= substitute(choice,'\\','/','ge')
892892
"ER: see NetRead()
893-
exe 'lcd ' . fnamemodify(tmpfile,':h')
893+
exe 'cd ' . fnamemodify(tmpfile,':h')
894894
let tmpfile = fnamemodify(tmpfile,':t')
895895
endif
896896

@@ -1233,6 +1233,7 @@ fun! s:NetBrowse(dirname)
12331233
" call Decho("new path<".path.">")
12341234

12351235
" remote-read the requested file into current buffer
1236+
mark '
12361237
keepjumps keepalt enew!
12371238
set ma
12381239
" call Decho("exe file ".method."://".user.machine."/".escape(path,s:netrw_cd_escape))
@@ -1257,6 +1258,7 @@ fun! s:NetBrowse(dirname)
12571258
let bufname = method.'://'.user.machine.'/'.path
12581259
let bufnamenr = bufnr(bufname.'$')
12591260
" call Decho("bufname<".bufname."> bufnamenr=".bufnamenr)
1261+
mark '
12601262
if bufnamenr != -1
12611263
" buffer already exists, switch to it!
12621264
" call Decho("buffer already exists, switching to it")
@@ -1324,7 +1326,7 @@ fun! s:NetBrowse(dirname)
13241326
setlocal ma nonu nowrap
13251327

13261328
" Set up the banner
1327-
" call Decho("set up the banner: sortby<".g:netrw_sort_by."> method<".method.">")
1329+
" call Decho("set up the banner: sortby<".g:netrw_sort_by."> method<".method."> direction<".g:netrw_sort_direction.">")
13281330
keepjumps put ='\" ==========================================================================='
13291331
keepjumps put ='\" Netrw Remote Directory Listing (netrw '.g:loaded_netrw.')'
13301332
keepjumps put ='\" '.bufname
@@ -2148,10 +2150,10 @@ fun! s:NetrwWideListing()
21482150
let b:netrw_cpf= 0
21492151
if line("$") >= w:netrw_bannercnt
21502152
exe 'silent keepjumps '.w:netrw_bannercnt.',$g/^./if virtcol("$") > b:netrw_cpf|let b:netrw_cpf= virtcol("$")|endif'
2151-
else
2152-
" call Dret("NetrwWideListing")
2153-
return
2154-
endif
2153+
else
2154+
" call Dret("NetrwWideListing")
2155+
return
2156+
endif
21552157
" call Decho("max file strlen+1=".b:netrw_cpf)
21562158
let b:netrw_cpf= b:netrw_cpf + 1
21572159

@@ -2163,7 +2165,7 @@ fun! s:NetrwWideListing()
21632165
" call Decho("fpl= ".winwidth(0)."/[b:netrw_cpf=".b:netrw_cpf.']='.w:netrw_fpl)
21642166

21652167
" make wide display
2166-
exe 'silent keepjumps '.w:netrw_bannercnt.',$s/^.*$/\=printf("%-'.b:netrw_cpf.'s",submatch(0))/'
2168+
exe 'silent keepjumps '.w:netrw_bannercnt.',$s/^.*$/\=printf("%-'.b:netrw_cpf.'s",escape(submatch(0),"\\"))/'
21672169
let fpc = (line("$") - w:netrw_bannercnt + w:netrw_fpl)/w:netrw_fpl
21682170
let newcolstart = w:netrw_bannercnt + fpc
21692171
let newcolend = newcolstart + fpc - 1
@@ -2252,11 +2254,15 @@ fun! s:NetMakeDir(usrhost)
22522254
call mkdir(fullnewdir,"p")
22532255
else
22542256
let netrw_origdir= s:NetGetcwd(1)
2255-
exe 'cd '.b:netrw_curdir
2256-
" call Decho("netrw_origdir<".netrw_origdir."> b:netrw_curdir<".b:netrw_curdir.">")
2257+
exe 'keepjumps cd '.b:netrw_curdir
2258+
" call Decho("netrw_origdir<".netrw_origdir.">: cd b:netrw_curdir<".b:netrw_curdir.">")
22572259
" call Decho("exe silent! !".g:netrw_local_mkdir.' "'.newdirname.'"')
22582260
exe "silent! !".g:netrw_local_mkdir.' "'.newdirname.'"'
22592261
if !g:netrw_keepdir | exe 'keepjumps cd '.netrw_origdir | endif
2262+
if !g:netrw_keepdir
2263+
exe 'keepjumps cd '.netrw_origdir
2264+
" call Decho("netrw_keepdir=".g:netrw_keepdir.": cd ".netrw_origdir)
2265+
endif
22602266
endif
22612267

22622268
if v:shell_error == 0
@@ -2770,6 +2776,11 @@ fun! netrw#DirBrowse(dirname)
27702776
endif
27712777

27722778
call s:NetOptionSave()
2779+
if w:acdkeep
2780+
exe 'cd '.escape(a:dirname,s:netrw_cd_escape)
2781+
" call Decho("cd ".escape(a:dirname,s:netrw_cd_escape))
2782+
" call Decho("getcwd<".getcwd().">")
2783+
endif
27732784

27742785
if v:version < 603
27752786
if !exists("g:netrw_quiet")
@@ -2807,6 +2818,7 @@ fun! netrw#DirBrowse(dirname)
28072818
endif
28082819

28092820
" get cleared buffer
2821+
mark '
28102822
if bufnum < 0 || !bufexists(bufnum)
28112823
keepjumps keepalt enew!
28122824
" call Decho("enew buffer")
@@ -2815,8 +2827,8 @@ fun! netrw#DirBrowse(dirname)
28152827
if exists("s:last_sort_by") && g:netrw_sort_by == s:last_sort_by
28162828
if getline(2) =~ '^" Netrw Directory Listing '
28172829
if !g:netrw_keepdir
2818-
" call Decho("change directory: cd ".b:netrw_curdir)
28192830
exe 'cd '.escape(b:netrw_curdir,s:netrw_cd_escape)
2831+
" call Decho("netrw_keepdir=".g:netrw_keepdir.": cd ".escape(b:netrw_curdir,s:netrw_cd_escape))
28202832
endif
28212833
call s:NetOptionRestore()
28222834
" call Dret("DirBrowse : reusing buffer#".bufnum."<".a:dirname.">")
@@ -2847,7 +2859,7 @@ fun! netrw#DirBrowse(dirname)
28472859

28482860
" make netrw's idea of the current directory vim's if the user wishes
28492861
if !g:netrw_keepdir
2850-
" call Decho("change directory: cd ".b:netrw_curdir)
2862+
" call Decho("netrw_keepdir=".g:netrw_keepdir.": cd ".escape(b:netrw_curdir,s:netrw_cd_escape))
28512863
try
28522864
exe 'cd '.escape(b:netrw_curdir,s:netrw_cd_escape)
28532865
catch /^Vim\%((\a\+)\)\=:E472/
@@ -2916,8 +2928,12 @@ fun! netrw#DirBrowse(dirname)
29162928
nnoremap <buffer> <silent> v :call <SID>NetSplit(3)<cr>
29172929
nnoremap <buffer> <silent> x :call netrw#NetBrowseX(<SID>LocalBrowseChgDir(b:netrw_curdir,<SID>NetGetWord(),0),0)"<cr>
29182930
nnoremap <buffer> <silent> <2-leftmouse> :call <SID>LocalBrowse(<SID>LocalBrowseChgDir(b:netrw_curdir,<SID>NetGetWord()))<cr>
2919-
nnoremap <buffer> <silent> <s-up> :Pexplore<cr>
2920-
nnoremap <buffer> <silent> <s-down> :Nexplore<cr>
2931+
if s:didstarstar || !mapcheck("<s-down>","n")
2932+
nnoremap <buffer> <silent> <s-down> :Nexplore<cr>
2933+
endif
2934+
if s:didstarstar || !mapcheck("<s-up>","n")
2935+
nnoremap <buffer> <silent> <s-up> :Pexplore<cr>
2936+
endif
29212937
exe 'nnoremap <buffer> <silent> <del> :call <SID>LocalBrowseRm("'.b:netrw_curdir.'")<cr>'
29222938
exe 'vnoremap <buffer> <silent> <del> :call <SID>LocalBrowseRm("'.b:netrw_curdir.'")<cr>'
29232939
exe 'nnoremap <buffer> <silent> D :call <SID>LocalBrowseRm("'.b:netrw_curdir.'")<cr>'
@@ -3040,7 +3056,7 @@ endfun
30403056
" ---------------------------------------------------------------------
30413057
" LocalBrowseList: does the job of "ls" for local directories {{{2
30423058
fun! s:LocalBrowseList()
3043-
" call Dfunc("LocalBrowseList() b:netrw_curdir<".b:netrw_curdir.">")
3059+
" call Dfunc("LocalBrowseList() b:netrw_curdir<".b:netrw_curdir."> sortby<".g:netrw_sort_by.">")
30443060

30453061
" get the list of files contained in the current directory
30463062
let dirname = escape(b:netrw_curdir,s:netrw_glob_escape)
@@ -3070,7 +3086,11 @@ fun! s:LocalBrowseList()
30703086
" call Decho("filelist<".filelist.">")
30713087
endif
30723088
let filelist= substitute(filelist,'\n\{2,}','\n','ge')
3073-
let filelist= substitute(filelist,'\','/','ge')
3089+
if (has("win32") || has("win95") || has("win64") || has("win16"))
3090+
let filelist= substitute(filelist,'\','/','ge')
3091+
else
3092+
let filelist= substitute(filelist,'\','\\','ge')
3093+
endif
30743094

30753095
" call Decho("dirname<".dirname.">")
30763096
" call Decho("dirnamelen<".dirnamelen.">")
@@ -3503,6 +3523,12 @@ fun! netrw#Explore(indx,dosplit,style,...)
35033523
endif
35043524
norm! 0
35053525

3526+
if a:1 =~ '\*/'
3527+
" Explore */pattern
3528+
let pattern= substitute(a:1,'^\*/\(.*\)$','\1','')
3529+
" call Decho("Explore */".pattern)
3530+
endif
3531+
35063532
if a:1 == "" && a:indx >= 0
35073533
" Explore Hexplore Vexplore Sexplore
35083534
" call Decho("Explore Hexplore Vexplore Sexplore")
@@ -3516,26 +3542,61 @@ fun! netrw#Explore(indx,dosplit,style,...)
35163542
call s:LocalBrowse(newdir)
35173543
endif
35183544

3519-
elseif a:1 =~ '\*\*/' || a:indx < 0
3520-
" Nexplore Pexplore -or- Explore **/...
3521-
" call Decho("Nexplore Pexplore -or- Explore **/...")
3545+
elseif a:1 =~ '^\*\*/' || a:indx < 0 || a:1 =~ '^\*/'
3546+
" Nexplore, Pexplore, Explore **/... , or Explore */pattern
3547+
" call Decho("Nexplore, Pexplore, <s-down>, <s-up>, Explore ".a:1)
3548+
let s:didstarstar= 1
3549+
if exists("b:netrw_curdir")
3550+
nnoremap <buffer> <silent> <s-up> :Pexplore<cr>
3551+
nnoremap <buffer> <silent> <s-down> :Nexplore<cr>
3552+
endif
35223553

35233554
if has("path_extra")
35243555
if !exists("w:netrw_explore_indx")
35253556
let w:netrw_explore_indx= 0
35263557
endif
35273558
let indx = a:indx
3559+
" call Decho("input indx=".indx)
3560+
"
35283561
if indx == -1
3562+
if !exists("w:netrw_explore_list") " sanity check
3563+
echohl WarningMsg | echo "***netrw*** using Nexplore or <s-down> improperly; see help for netrw-starstar" | echohl None
3564+
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
3565+
" call Dret("Explore")
3566+
return
3567+
endif
35293568
let indx= w:netrw_explore_indx + 1
3569+
" call Decho("indx= [w:netrw_explore_indx=".w:netrw_explore_indx."]=".indx)
3570+
35303571
elseif indx == -2
3572+
if !exists("w:netrw_explore_list") " sanity check
3573+
echohl WarningMsg | echo "***netrw*** using Pexplore or <s-up> improperly; see help for netrw-starstar" | echohl None
3574+
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
3575+
" call Dret("Explore")
3576+
return
3577+
endif
35313578
let indx= w:netrw_explore_indx - 1
3579+
" call Decho("indx= [w:netrw_explore_indx=".w:netrw_explore_indx."]=".indx)
3580+
35323581
else
3582+
" build list of files to Explore with Nexplore/Pexplore
35333583
let w:netrw_explore_indx = 0
35343584
if !exists("b:netrw_curdir")
35353585
let b:netrw_curdir= getcwd()
35363586
endif
3537-
let w:netrw_explore_list = split(expand(b:netrw_curdir."/".a:1),'\n')
3587+
" call Decho("b:netrw_curdir<".b:netrw_curdir.">")
3588+
if exists("pattern")
3589+
" call Decho("building list based on pattern<".pattern."> cwd<".getcwd().">")
3590+
exe "vimgrep /".pattern."/gj ".b:netrw_curdir."/*"
3591+
let w:netrw_explore_list = map(getqflist(),'b:netrw_curdir.bufname(v:val.bufnr)')
3592+
else
3593+
" call Decho("building list based on ".b:netrw_curdir."/".a:1)
3594+
let w:netrw_explore_list= split(expand(b:netrw_curdir."/".a:1),'\n')
3595+
endif
3596+
35383597
let w:netrw_explore_listlen = len(w:netrw_explore_list)
3598+
" call Decho("w:netrw_explore_list<".string(w:netrw_explore_list)."> listlen=".w:netrw_explore_listlen)
3599+
35393600
if w:netrw_explore_listlen == 1 && w:netrw_explore_list[0] =~ '\*\*\/'
35403601
echohl WarningMsg | echo "***netrw*** no files matched" | echohl None
35413602
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
@@ -3928,32 +3989,24 @@ fun! s:NetOptionSave()
39283989
endif
39293990

39303991
" Get Temporary Filename
3931-
let w:aikeep = &ai
3932-
" " netrw and the acd option do not work together properly
3933-
" if &acd && (has("netbeans_intg") || has("sun_workshop"))
3934-
" set noacd
3935-
" echohl Warning | echomsg "***warning*** directory browsing and the acd setting are incompatible" |echohl None
3936-
" endif
3937-
let w:fokeep = &fo
3992+
let w:acdkeep = &acd
39383993
let w:aikeep = &ai
3994+
let w:fokeep = &fo
39393995
let w:cikeep = &ci
39403996
let w:cinkeep = &cin
39413997
let w:cinokeep = &cino
39423998
let w:comkeep = &com
39433999
let w:cpokeep = &cpo
39444000
let w:hidkeep = &hidden
39454001
let w:magickeep = &magic
3946-
if !g:netrw_keepdir
3947-
let w:dirkeep = getcwd()
3948-
endif
39494002
let w:gdkeep = &gd
39504003
let w:repkeep = &report
39514004
let w:spellkeep = &spell
39524005
let w:twkeep = &tw
39534006
setlocal cino =
39544007
setlocal com =
39554008
setlocal cpo -=aA
3956-
setlocal nocin noai noci magic nospell fo=nroql2 nohid
4009+
setlocal noacd nocin noai noci magic nospell fo=nroql2 nohid
39574010
setlocal tw =0
39584011
setlocal report=10000
39594012
if has("win32") && !has("win95")
@@ -3975,14 +4028,13 @@ fun! s:NetOptionRestore()
39754028
endif
39764029
unlet w:netoptionsave
39774030

3978-
if exists("w:aikeep")| let &ai= w:aikeep|endif
4031+
if exists("w:acdkeep") |let &acd = w:acdkeep |unlet w:acdkeep |endif
39794032
if exists("w:aikeep") |let &ai = w:aikeep |unlet w:aikeep |endif
39804033
if exists("w:cikeep") |let &ci = w:cikeep |unlet w:cikeep |endif
39814034
if exists("w:cinkeep") |let &cin = w:cinkeep |unlet w:cinkeep |endif
39824035
if exists("w:cinokeep") |let &cino = w:cinokeep |unlet w:cinokeep |endif
39834036
if exists("w:comkeep") |let &com = w:comkeep |unlet w:comkeep |endif
39844037
if exists("w:cpokeep") |let &cpo = w:cpokeep |unlet w:cpokeep |endif
3985-
if exists("w:dirkeep") |exe "lcd ".w:dirkeep |unlet w:dirkeep |endif
39864038
if exists("w:fokeep") |let &fo = w:fokeep |unlet w:fokeep |endif
39874039
if exists("w:gdkeep") |let &gd = w:gdkeep |unlet w:gdkeep |endif
39884040
if exists("w:hidkeep") |let &hidden = w:hidkeep |unlet w:hidkeep |endif

runtime/autoload/paste.vim

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
" Vim support file to help with paste mappings and menus
22
" Maintainer: Bram Moolenaar <[email protected]>
3-
" Last Change: 2006 Mar 09
3+
" Last Change: 2006 Apr 21
44

55
" Define the string to use for items that are present both in Edit, Popup and
66
" Toolbar menu. Also used in mswin.vim and macmap.vim.
@@ -33,7 +33,3 @@ else
3333
let paste#paste_cmd['v'] = '"-c<Esc>gix<Esc>' . paste#paste_cmd['n'] . '"_x'
3434
let paste#paste_cmd['i'] = 'x<Esc>' . paste#paste_cmd['n'] . '"_s'
3535
endif
36-
37-
if has("virtualedit")
38-
else
39-
endif

runtime/colors/darkblue.vim

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
" Vim color file
22
" Maintainer: Bohdan Vlasyuk <[email protected]>
3-
" Last Change: 2005 Mar 28
3+
" Last Change: 2006 Apr 21
44

55
" darkblue -- for those who prefer dark background
66
" [note: looks bit uglier with come terminal palettes,
@@ -58,5 +58,3 @@ hi PreProc ctermfg=magenta guifg=#ff80ff gui=none cterm=none
5858
hi type ctermfg=green guifg=#60ff60 gui=none cterm=none
5959
hi Underlined cterm=underline term=underline
6060
hi Ignore guifg=bg ctermfg=bg
61-
62-

runtime/compiler/bdf.vim

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
" Vim compiler file
22
" Compiler: BDF to PCF Conversion
3-
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
4-
" Latest Revision: 2005-06-29
3+
" Maintainer: Nikolai Weibull <now@bitwi.se>
4+
" Latest Revision: 2006-04-19
55

66
if exists("current_compiler")
77
finish
@@ -11,9 +11,9 @@ let current_compiler = "bdf"
1111
let s:cpo_save = &cpo
1212
set cpo-=C
1313

14-
CompilerSet makeprg=bdftopcf\ $*
14+
setlocal makeprg=bdftopcf\ $*
1515

16-
CompilerSet errorformat=%ABDF\ %trror\ on\ line\ %l:\ %m,
16+
setlocal errorformat=%ABDF\ %trror\ on\ line\ %l:\ %m,
1717
\%-Z%p^,
1818
\%Cbdftopcf:\ bdf\ input\\,\ %f\\,\ corrupt,
1919
\%-G%.%#

runtime/compiler/gcc.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
" Vim compiler file
22
" Compiler: GNU C Compiler
3-
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
4-
" Latest Revision: 2005-06-29
3+
" Maintainer: Nikolai Weibull <now@bitwi.se>
4+
" Latest Revision: 2006-04-19
55

66
if exists("current_compiler")
77
finish

runtime/compiler/rst.vim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
" Vim compiler file
22
" Compiler: reStructuredText Documentation Format
3-
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
4-
" Latest Revision: 2005-06-29
3+
" Maintainer: Nikolai Weibull <now@bitwi.se>
4+
" Latest Revision: 2006-04-19
55

66
if exists("current_compiler")
77
finish
@@ -11,7 +11,7 @@ let current_compiler = "rst"
1111
let s:cpo_save = &cpo
1212
set cpo-=C
1313

14-
CompilerSet errorformat=
14+
setlocal errorformat=
1515
\%f:%l:\ (%tEBUG/0)\ %m,
1616
\%f:%l:\ (%tNFO/1)\ %m,
1717
\%f:%l:\ (%tARNING/2)\ %m,

0 commit comments

Comments
 (0)