~ubuntu-branches/ubuntu/maverick/vim/maverick

« back to all changes in this revision

Viewing changes to runtime/plugin/netrwPlugin.vim

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2008-06-26 13:42:18 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20080626134218-703edeyb8k70qpbz
Tags: 1:7.1.314-3ubuntu1
* Resynchronise with Debian. Remaining changes:
  - Enable detection of GNU screen as a mouse-capable terminal.
  - Add NoDisplay=true to gvim.desktop.
  - Drop vim-lesstif package and lesstif2-dev build-dependency.
  - Build-depend on libxt-dev.
  - Enable Python interpreter on basic builds.
  - Create a .pot file for translations.
  - Disable autoindent, line-wrapping, and backup files by default.
* Fixes various vulnerabilities due to improper quoting of 'execute'
  arguments (LP: #240216).
* Drop fixes for upgrade problems from Ubuntu 6.06 LTS; direct upgrades
  from 6.06 to 8.10 will not be supported.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
" netrwPlugin.vim: Handles file transfer and remote directory listing across a network
2
2
"            PLUGIN SECTION
3
 
" Date:         Aug 09, 2007
 
3
" Date:         Apr 07, 2008
4
4
" Maintainer:   Charles E Campbell, Jr <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
5
5
" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
6
6
" Copyright:    Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1
22
22
if &cp || exists("g:loaded_netrwPlugin")
23
23
 finish
24
24
endif
25
 
let g:loaded_netrwPlugin = "v119"
 
25
let g:loaded_netrwPlugin = "v125"
26
26
let s:keepcpo            = &cpo
27
27
if v:version < 700
28
28
 echohl WarningMsg | echo "***netrw*** you need vim version 7.0 for this version of netrw" | echohl None
52
52
  au BufReadCmd  file://*               exe "silent doau BufReadPre ".netrw#RFC2396(expand("<amatch>"))|exe 'e '.substitute(netrw#RFC2396(expand("<amatch>")),'file://\(.*\)','\1',"")|exe "bwipe ".expand("<amatch>")|exe "silent doau BufReadPost ".netrw#RFC2396(expand("<amatch>"))
53
53
  au BufReadCmd  file://localhost/*     exe "silent doau BufReadPre ".netrw#RFC2396(expand("<amatch>"))|exe 'e '.substitute(netrw#RFC2396(expand("<amatch>")),'file://localhost/\(.*\)','\1',"")|exe "bwipe ".substitute(expand("<amatch>"),'file://\(\k\+@\)\=','','')|exe "silent doau BufReadPost ".netrw#RFC2396(expand("<amatch>"))
54
54
 endif
55
 
 au BufReadCmd   ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://*    exe "silent doau BufReadPre ".expand("<amatch>")|exe '2Nread "'.expand("<amatch>").'"'|exe "silent doau BufReadPost ".expand("<amatch>")
56
 
 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>")
57
 
 au BufWriteCmd  ftp://*,rcp://*,scp://*,dav://*,rsync://*,sftp://*             exe "silent doau BufWritePre ".expand("<amatch>")|exe 'Nwrite "' .expand("<amatch>").'"'|exe "silent doau BufWritePost ".expand("<amatch>")
58
 
 au FileWriteCmd ftp://*,rcp://*,scp://*,dav://*,rsync://*,sftp://*             exe "silent doau FileWritePre ".expand("<amatch>")|exe "'[,']".'Nwrite "' .expand("<amatch>").'"'|exe "silent doau FileWritePost ".expand("<amatch>")
 
55
 au BufReadCmd   ftp://*,rcp://*,scp://*,http://*,dav://*,davs://*,rsync://*,sftp://*   exe "silent doau BufReadPre ".expand("<amatch>")|exe '2Nread "'.expand("<amatch>").'"'|exe "silent doau BufReadPost ".expand("<amatch>")
 
56
 au FileReadCmd  ftp://*,rcp://*,scp://*,http://*,dav://*,davs://*,rsync://*,sftp://*   exe "silent doau FileReadPre ".expand("<amatch>")|exe 'Nread "'   .expand("<amatch>").'"'|exe "silent doau FileReadPost ".expand("<amatch>")
 
57
 au BufWriteCmd  ftp://*,rcp://*,scp://*,dav://*,davs://*,rsync://*,sftp://*            exe "silent doau BufWritePre ".expand("<amatch>")|exe 'Nwrite "' .expand("<amatch>").'"'|exe "silent doau BufWritePost ".expand("<amatch>")
 
58
 au FileWriteCmd ftp://*,rcp://*,scp://*,dav://*,davs://*,rsync://*,sftp://*            exe "silent doau FileWritePre ".expand("<amatch>")|exe "'[,']".'Nwrite "' .expand("<amatch>").'"'|exe "silent doau FileWritePost ".expand("<amatch>")
59
59
 try
60
 
  au SourceCmd    ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://*   exe 'Nsource "'.expand("<amatch>").'"'
 
60
  au SourceCmd    ftp://*,rcp://*,scp://*,http://*,dav://*,davs://*,rsync://*,sftp://*  exe 'Nsource "'.expand("<amatch>").'"'
61
61
 catch /^Vim\%((\a\+)\)\=:E216/
62
 
  au SourcePre    ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://*   exe 'Nsource "'.expand("<amatch>").'"'
 
62
  au SourcePre    ftp://*,rcp://*,scp://*,http://*,dav://*,davs://*,rsync://*,sftp://*  exe 'Nsource "'.expand("<amatch>").'"'
63
63
 endtry
64
64
augroup END
65
65
 
87
87
 if !hasmapto('<Plug>NetrwBrowseX')
88
88
  nmap <unique> gx <Plug>NetrwBrowseX
89
89
 endif
90
 
 nno <silent> <Plug>NetrwBrowseX :call netrw#NetBrowseX(expand("<cWORD>"),0)<cr>
 
90
 nno <silent> <Plug>NetrwBrowseX :call netrw#NetrwBrowseX(expand("<cWORD>"),0)<cr>
91
91
endif
92
92
 
93
93
" ---------------------------------------------------------------------