1
0
forked from aniani/vim

updated for version 7.0161

This commit is contained in:
Bram Moolenaar
2005-11-28 23:01:53 +00:00
parent 9835862c81
commit 36c31f71ad
4 changed files with 32 additions and 10 deletions

View File

@@ -1,7 +1,7 @@
" netrw.vim: Handles file transfer and remote directory listing across a network " netrw.vim: Handles file transfer and remote directory listing across a network
" AUTOLOAD PORTION " AUTOLOAD PORTION
" Date: Nov 18, 2005 " Date: Nov 28, 2005
" Version: 75 " Version: 76
" Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz> " Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim " GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
" Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1 " Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1
@@ -23,7 +23,7 @@
if &cp || exists("g:loaded_netrw") if &cp || exists("g:loaded_netrw")
finish finish
endif endif
let g:loaded_netrw = "v75" let g:loaded_netrw = "v76"
if v:version < 700 if v:version < 700
echohl WarningMsg | echo "***netrw*** you need vim version 7.0 or later for version ".g:loaded_netrw." of netrw" | echohl None echohl WarningMsg | echo "***netrw*** you need vim version 7.0 or later for version ".g:loaded_netrw." of netrw" | echohl None
finish finish
@@ -301,7 +301,7 @@ fun! netrw#NetRead(...)
let tmpfile= tempname() let tmpfile= tempname()
let tmpfile= substitute(tmpfile,'\','/','ge') let tmpfile= substitute(tmpfile,'\','/','ge')
if !isdirectory(substitute(tmpfile,'[^/]\+$','','e')) if !isdirectory(substitute(tmpfile,'[^/]\+$','','e'))
echohl Error | echo "***netrw*** your <".substitute(tmpfile,'[^/]\+$','','e')."> directory is missing!" echohl Error | echo "***netrw*** your <".substitute(tmpfile,'[^/]\+$','','e')."> directory is missing!" | echohl None
call inputsave()|call input("Press <cr> to continue")|call inputrestore() call inputsave()|call input("Press <cr> to continue")|call inputrestore()
" call Dret("NetRead") " call Dret("NetRead")
return return

View File

@@ -1,7 +1,7 @@
" zip.vim: Handles browsing zipfiles " zip.vim: Handles browsing zipfiles
" AUTOLOAD PORTION " AUTOLOAD PORTION
" Date: Nov 14, 2005 " Date: Nov 28, 2005
" Version: 4 " Version: 5
" Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz> " Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
" License: Vim License (see vim's :help license) " License: Vim License (see vim's :help license)
" Copyright: Copyright (C) 2005 Charles E. Campbell, Jr. {{{1 " Copyright: Copyright (C) 2005 Charles E. Campbell, Jr. {{{1
@@ -22,7 +22,7 @@ if exists("g:loaded_zip")
finish finish
endif endif
let g:loaded_zip= "v4" let g:loaded_zip= "v5"
" ---------------- " ----------------
" Functions: {{{1 " Functions: {{{1
@@ -32,11 +32,14 @@ let g:loaded_zip= "v4"
" zip#Browse: {{{2 " zip#Browse: {{{2
fun! zip#Browse(zipfile) fun! zip#Browse(zipfile)
" call Dfunc("zip#Browse(zipfile<".a:zipfile.">)") " call Dfunc("zip#Browse(zipfile<".a:zipfile.">)")
let repkeep= &report
set report=10
" sanity checks " sanity checks
if !executable("unzip") if !executable("unzip")
echohl Error | echo "***error*** (zip#Browse) unzip not available on your system" echohl Error | echo "***error*** (zip#Browse) unzip not available on your system"
call inputsave()|call input("Press <cr> to continue")|call inputrestore() call inputsave()|call input("Press <cr> to continue")|call inputrestore()
let &report= repkeep
" call Dret("zip#Browse") " call Dret("zip#Browse")
return return
endif endif
@@ -46,6 +49,7 @@ fun! zip#Browse(zipfile)
echohl Error | echo "***error*** (zip#Browse) File not readable<".a:zipfile.">" | echohl None echohl Error | echo "***error*** (zip#Browse) File not readable<".a:zipfile.">" | echohl None
call inputsave()|call input("Press <cr> to continue")|call inputrestore() call inputsave()|call input("Press <cr> to continue")|call inputrestore()
endif endif
let &report= repkeep
" call Dret("zip#Browse : file<".a:zipfile."> not readable") " call Dret("zip#Browse : file<".a:zipfile."> not readable")
return return
endif endif
@@ -77,6 +81,7 @@ fun! zip#Browse(zipfile)
setlocal noma nomod ro setlocal noma nomod ro
noremap <silent> <buffer> <cr> :call <SID>ZipBrowseSelect()<cr> noremap <silent> <buffer> <cr> :call <SID>ZipBrowseSelect()<cr>
let &report= repkeep
" call Dret("zip#Browse") " call Dret("zip#Browse")
endfun endfun
@@ -84,16 +89,20 @@ endfun
" ZipBrowseSelect: {{{2 " ZipBrowseSelect: {{{2
fun! s:ZipBrowseSelect() fun! s:ZipBrowseSelect()
" call Dfunc("ZipBrowseSelect() zipfile<".w:zipfile."> curfile<".expand("%").">") " call Dfunc("ZipBrowseSelect() zipfile<".w:zipfile."> curfile<".expand("%").">")
let repkeep= &report
set report=10
let fname= getline(".") let fname= getline(".")
" sanity check " sanity check
if fname =~ '^"' if fname =~ '^"'
let &report= repkeep
" call Dret("ZipBrowseSelect") " call Dret("ZipBrowseSelect")
return return
endif endif
if fname =~ '/$' if fname =~ '/$'
echohl Error | echo "***error*** (zip#Browse) Please specify a file, not a directory" | echohl None echohl Error | echo "***error*** (zip#Browse) Please specify a file, not a directory" | echohl None
call inputsave()|call input("Press <cr> to continue")|call inputrestore() call inputsave()|call input("Press <cr> to continue")|call inputrestore()
let &report= repkeep
" call Dret("ZipBrowseSelect") " call Dret("ZipBrowseSelect")
return return
endif endif
@@ -110,6 +119,7 @@ fun! s:ZipBrowseSelect()
exe "e zipfile:".zipfile.':'.fname exe "e zipfile:".zipfile.':'.fname
filetype detect filetype detect
let &report= repkeep
" call Dret("ZipBrowseSelect : s:zipfile_".winnr()."<".s:zipfile_{winnr()}.">") " call Dret("ZipBrowseSelect : s:zipfile_".winnr()."<".s:zipfile_{winnr()}.">")
endfun endfun
@@ -117,6 +127,9 @@ endfun
" zip#Read: {{{2 " zip#Read: {{{2
fun! zip#Read(fname,mode) fun! zip#Read(fname,mode)
" call Dfunc("zip#Read(fname<".a:fname.">,mode=".a:mode.")") " call Dfunc("zip#Read(fname<".a:fname.">,mode=".a:mode.")")
let repkeep= &report
set report=10
let zipfile = substitute(a:fname,'zipfile:\(.\{-}\):.*$','\1','') let zipfile = substitute(a:fname,'zipfile:\(.\{-}\):.*$','\1','')
let fname = substitute(a:fname,'zipfile:.\{-}:\(.*\)$','\1','') let fname = substitute(a:fname,'zipfile:.\{-}:\(.*\)$','\1','')
" call Decho("zipfile<".zipfile."> fname<".fname.">") " call Decho("zipfile<".zipfile."> fname<".fname.">")
@@ -127,6 +140,7 @@ fun! zip#Read(fname,mode)
0d 0d
set nomod set nomod
let &report= repkeep
" call Dret("zip#Read") " call Dret("zip#Read")
endfun endfun
@@ -134,17 +148,21 @@ endfun
" zip#Write: {{{2 " zip#Write: {{{2
fun! zip#Write(fname) fun! zip#Write(fname)
" call Dfunc("zip#Write(fname<".a:fname.") zipfile_".winnr()."<".s:zipfile_{winnr()}.">") " call Dfunc("zip#Write(fname<".a:fname.") zipfile_".winnr()."<".s:zipfile_{winnr()}.">")
let repkeep= &report
set report=10
" sanity checks " sanity checks
if !executable("zip") if !executable("zip")
echohl Error | echo "***error*** (zip#Write) sorry, your system doesn't appear to have the zip pgm" | echohl None echohl Error | echo "***error*** (zip#Write) sorry, your system doesn't appear to have the zip pgm" | echohl None
call inputsave()|call input("Press <cr> to continue")|call inputrestore() call inputsave()|call input("Press <cr> to continue")|call inputrestore()
let &report= repkeep
" call Dret("zip#Write") " call Dret("zip#Write")
return return
endif endif
if !exists("*mkdir") if !exists("*mkdir")
echohl Error | echo "***error*** (zip#Write) sorry, mkdir() doesn't work on your system" | echohl None echohl Error | echo "***error*** (zip#Write) sorry, mkdir() doesn't work on your system" | echohl None
call inputsave()|call input("Press <cr> to continue")|call inputrestore() call inputsave()|call input("Press <cr> to continue")|call inputrestore()
let &report= repkeep
" call Dret("zip#Write") " call Dret("zip#Write")
return return
endif endif
@@ -164,6 +182,7 @@ fun! zip#Write(fname)
catch /^Vim\%((\a\+)\)\=:E344/ catch /^Vim\%((\a\+)\)\=:E344/
echohl Error | echo "***error*** (zip#Write) cannot cd to temporary directory" | Echohl None echohl Error | echo "***error*** (zip#Write) cannot cd to temporary directory" | Echohl None
call inputsave()|call input("Press <cr> to continue")|call inputrestore() call inputsave()|call input("Press <cr> to continue")|call inputrestore()
let &report= repkeep
" call Dret("zip#Write") " call Dret("zip#Write")
return return
endtry endtry
@@ -220,6 +239,7 @@ fun! zip#Write(fname)
exe "cd ".escape(curdir,' \') exe "cd ".escape(curdir,' \')
setlocal nomod setlocal nomod
let &report= repkeep
" call Dret("zip#Write") " call Dret("zip#Write")
endfun endfun

View File

@@ -1,4 +1,4 @@
*pi_netrw.txt* For Vim version 7.0. Last change: Oct 19, 2005 *pi_netrw.txt* For Vim version 7.0. Last change: Nov 28, 2005
VIM REFERENCE MANUAL by Charles E. Campbell, Jr. VIM REFERENCE MANUAL by Charles E. Campbell, Jr.
@@ -1284,6 +1284,8 @@ which is loaded automatically at startup (assuming :set nocp).
============================================================================== ==============================================================================
10. History *netrw-history* 10. History *netrw-history*
v76: * "directory is missing" error message now restores echo
highlighting
v75: * file://... now conforms to RFC2396 (thanks to S. Zacchiroli) v75: * file://... now conforms to RFC2396 (thanks to S. Zacchiroli)
* if the binary option is set, then NetWrite() will only write * if the binary option is set, then NetWrite() will only write
the whole file (line numbers don't make sense with this). the whole file (line numbers don't make sense with this).

View File

@@ -36,5 +36,5 @@
#define VIM_VERSION_NODOT "vim70aa" #define VIM_VERSION_NODOT "vim70aa"
#define VIM_VERSION_SHORT "7.0aa" #define VIM_VERSION_SHORT "7.0aa"
#define VIM_VERSION_MEDIUM "7.0aa ALPHA" #define VIM_VERSION_MEDIUM "7.0aa ALPHA"
#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2005 Nov 26)" #define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2005 Nov 28)"
#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2005 Nov 26, compiled " #define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2005 Nov 28, compiled "