comparison runtime/plugin/netrwPlugin.vim @ 557:862863033fdd v7.0158

updated for version 7.0158
author vimboss
date Wed, 23 Nov 2005 21:25:05 +0000
parents 249173daa651
children 8157079cea85
comparison
equal deleted inserted replaced
556:f9eaf0a9872d 557:862863033fdd
1 " netrwPlugin.vim: Handles file transfer and remote directory listing across a network 1 " netrwPlugin.vim: Handles file transfer and remote directory listing across a network
2 " PLUGIN PORTION 2 " PLUGIN PORTION
3 " Date: Oct 12, 2005 3 " Date: Oct 27, 2005
4 " Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz> 4 " Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
5 " GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim 5 " GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
6 " Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1 6 " Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1
7 " Permission is hereby granted to use and distribute this code, 7 " Permission is hereby granted to use and distribute this code,
8 " with or without modifications, provided that this copyright 8 " with or without modifications, provided that this copyright
40 40
41 " Network Browsing Reading Writing: {{{2 41 " Network Browsing Reading Writing: {{{2
42 augroup Network 42 augroup Network
43 au! 43 au!
44 if has("win32") || has("win95") || has("win64") || has("win16") 44 if has("win32") || has("win95") || has("win64") || has("win16")
45 au BufReadCmd file://* exe "silent doau BufReadPre ".expand("<amatch>")|exe 'e '.substitute(expand("<amatch>"),"file:/*","","")|exe "silent doau BufReadPost ".expand("<amatch>") 45 au BufReadCmd file://* exe "silent doau BufReadPre ".netrw#RFC2396(expand("<amatch>"))|exe 'e '.substitute(netrw#RFC2396(expand("<amatch>")),'file://\(.*\)','\1',"")|exe "silent doau BufReadPost ".netrw#RFC2396(expand("<amatch>"))
46 else 46 else
47 au BufReadCmd file:///* exe "silent doau BufReadPre ".expand("<amatch>")|exe 'e /'.substitute(expand("<amatch>"),"file:/*","","")|exe "silent doau BufReadPost ".expand("<amatch>") 47 au BufReadCmd file://* exe "silent doau BufReadPre ".netrw#RFC2396(expand("<amatch>"))|exe 'e '.substitute(netrw#RFC2396(expand("<amatch>")),'file://\(.*\)','\1',"")|exe "silent doau BufReadPost ".netrw#RFC2396(expand("<amatch>"))
48 au BufReadCmd file://localhost/* exe "silent doau BufReadPre ".expand("<amatch>")|exe 'e /'.substitute(expand("<amatch>"),"file:/*","","")|exe "silent doau BufReadPost ".expand("<amatch>") 48 au BufReadCmd file://localhost/* exe "silent doau BufReadPre ".netrw#RFC2396(expand("<amatch>"))|exe 'e '.substitute(netrw#RFC2396(expand("<amatch>")),'file://localhost/\(.*\)','\1',"")|exe "silent doau BufReadPost ".netrw#RFC2396(expand("<amatch>"))
49 endif 49 endif
50 au BufReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://* exe "silent doau BufReadPre ".expand("<amatch>")|exe "Nread 0r ".expand("<amatch>")|exe "silent doau BufReadPost ".expand("<amatch>") 50 au BufReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://* exe "silent doau BufReadPre ".expand("<amatch>")|exe "Nread 0r ".expand("<amatch>")|exe "silent doau BufReadPost ".expand("<amatch>")
51 au FileReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://* exe "silent doau BufReadPre ".expand("<amatch>")|exe "Nread " .expand("<amatch>")|exe "silent doau FileReadPost ".expand("<amatch>") 51 au FileReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://* exe "silent doau FileReadPre ".expand("<amatch>")|exe "Nread " .expand("<amatch>")|exe "silent doau FileReadPost ".expand("<amatch>")
52 au BufWriteCmd ftp://*,rcp://*,scp://*,dav://*,rsync://*,sftp://* exe "silent doau BufWritePre ".expand("<amatch>")|exe "Nwrite " .expand("<amatch>")|exe "silent doau BufWritePost ".expand("<amatch>") 52 au BufWriteCmd ftp://*,rcp://*,scp://*,dav://*,rsync://*,sftp://* exe "silent doau BufWritePre ".expand("<amatch>")|exe "Nwrite " .expand("<amatch>")|exe "silent doau BufWritePost ".expand("<amatch>")
53 au FileWriteCmd ftp://*,rcp://*,scp://*,dav://*,rsync://*,sftp://* exe "silent doau BufWritePre ".expand("<amatch>")|exe "'[,']Nwrite " .expand("<amatch>")|exe "silent doau FileWritePost ".expand("<amatch>") 53 au FileWriteCmd ftp://*,rcp://*,scp://*,dav://*,rsync://*,sftp://* exe "silent doau FileWritePre ".expand("<amatch>")|exe "'[,']Nwrite " .expand("<amatch>")|exe "silent doau FileWritePost ".expand("<amatch>")
54 augroup END 54 augroup END
55 55
56 " Commands: :Nread, :Nwrite, :NetUserPass {{{2 56 " Commands: :Nread, :Nwrite, :NetUserPass {{{2
57 com! -nargs=* Nread call netrw#NetSavePosn()<bar>call netrw#NetRead(<f-args>)<bar>call netrw#NetRestorePosn() 57 com! -nargs=* Nread call netrw#NetSavePosn()<bar>call netrw#NetRead(<f-args>)<bar>call netrw#NetRestorePosn()
58 com! -range=% -nargs=* Nwrite call netrw#NetSavePosn()<bar><line1>,<line2>call netrw#NetWrite(<f-args>)<bar>call netrw#NetRestorePosn() 58 com! -range=% -nargs=* Nwrite call netrw#NetSavePosn()<bar><line1>,<line2>call netrw#NetWrite(<f-args>)<bar>call netrw#NetRestorePosn()