comparison runtime/plugin/netrwPlugin.vim @ 18130:1e5672da6a69

Updte runtime files Commit: https://github.com/vim/vim/commit/589edb340454e7f1b19358f129287a636d53d0e1 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Sep 20 14:38:13 2019 +0200 Updte runtime files
author Bram Moolenaar <Bram@vim.org>
date Fri, 20 Sep 2019 14:45:05 +0200
parents ca8e754bdd53
children e9a47bcf7b94
comparison
equal deleted inserted replaced
18129:52078b0635f7 18130:1e5672da6a69
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 SECTION 2 " PLUGIN SECTION
3 " Date: Feb 08, 2016 3 " Date: Feb 08, 2016 (update for gx 2019 Sep 20)
4 " Maintainer: Charles E Campbell <NdrOchip@ScampbellPfamily.AbizM-NOSPAM> 4 " Maintainer: Charles E Campbell <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
5 " GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim 5 " GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
6 " Copyright: Copyright (C) 1999-2013 Charles E. Campbell {{{1 6 " Copyright: Copyright (C) 1999-2013 Charles E. Campbell {{{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
45 au BufReadCmd file://* call netrw#FileUrlEdit(expand("<amatch>")) 45 au BufReadCmd file://* call netrw#FileUrlEdit(expand("<amatch>"))
46 au BufReadCmd ftp://*,rcp://*,scp://*,http://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau BufReadPre ".fnameescape(expand("<amatch>"))|call netrw#Nread(2,expand("<amatch>"))|exe "sil doau BufReadPost ".fnameescape(expand("<amatch>")) 46 au BufReadCmd ftp://*,rcp://*,scp://*,http://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau BufReadPre ".fnameescape(expand("<amatch>"))|call netrw#Nread(2,expand("<amatch>"))|exe "sil doau BufReadPost ".fnameescape(expand("<amatch>"))
47 au FileReadCmd ftp://*,rcp://*,scp://*,http://*,file://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau FileReadPre ".fnameescape(expand("<amatch>"))|call netrw#Nread(1,expand("<amatch>"))|exe "sil doau FileReadPost ".fnameescape(expand("<amatch>")) 47 au FileReadCmd ftp://*,rcp://*,scp://*,http://*,file://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau FileReadPre ".fnameescape(expand("<amatch>"))|call netrw#Nread(1,expand("<amatch>"))|exe "sil doau FileReadPost ".fnameescape(expand("<amatch>"))
48 au BufWriteCmd ftp://*,rcp://*,scp://*,http://*,file://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau BufWritePre ".fnameescape(expand("<amatch>"))|exe 'Nwrite '.fnameescape(expand("<amatch>"))|exe "sil doau BufWritePost ".fnameescape(expand("<amatch>")) 48 au BufWriteCmd ftp://*,rcp://*,scp://*,http://*,file://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau BufWritePre ".fnameescape(expand("<amatch>"))|exe 'Nwrite '.fnameescape(expand("<amatch>"))|exe "sil doau BufWritePost ".fnameescape(expand("<amatch>"))
49 au FileWriteCmd ftp://*,rcp://*,scp://*,http://*,file://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau FileWritePre ".fnameescape(expand("<amatch>"))|exe "'[,']".'Nwrite '.fnameescape(expand("<amatch>"))|exe "sil doau FileWritePost ".fnameescape(expand("<amatch>")) 49 au FileWriteCmd ftp://*,rcp://*,scp://*,http://*,file://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau FileWritePre ".fnameescape(expand("<amatch>"))|exe "'[,']".'Nwrite '.fnameescape(expand("<amatch>"))|exe "sil doau FileWritePost ".fnameescape(expand("<amatch>"))
50 try 50 try
51 au SourceCmd ftp://*,rcp://*,scp://*,http://*,file://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe 'Nsource '.fnameescape(expand("<amatch>")) 51 au SourceCmd ftp://*,rcp://*,scp://*,http://*,file://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe 'Nsource '.fnameescape(expand("<amatch>"))
52 catch /^Vim\%((\a\+)\)\=:E216/ 52 catch /^Vim\%((\a\+)\)\=:E216/
53 au SourcePre ftp://*,rcp://*,scp://*,http://*,file://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe 'Nsource '.fnameescape(expand("<amatch>")) 53 au SourcePre ftp://*,rcp://*,scp://*,http://*,file://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe 'Nsource '.fnameescape(expand("<amatch>"))
54 endtry 54 endtry
55 augroup END 55 augroup END
56 56
57 " Commands: :Nread, :Nwrite, :NetUserPass {{{2 57 " Commands: :Nread, :Nwrite, :NetUserPass {{{2
79 if !exists("g:netrw_nogx") 79 if !exists("g:netrw_nogx")
80 if maparg('gx','n') == "" 80 if maparg('gx','n') == ""
81 if !hasmapto('<Plug>NetrwBrowseX') 81 if !hasmapto('<Plug>NetrwBrowseX')
82 nmap <unique> gx <Plug>NetrwBrowseX 82 nmap <unique> gx <Plug>NetrwBrowseX
83 endif 83 endif
84 nno <silent> <Plug>NetrwBrowseX :call netrw#BrowseX(netrw#GX(),netrw#CheckIfRemote(netrw#GX()))<cr> 84 nno <silent> <Plug>NetrwBrowseX :call netrw#BrowseX(expand((exists("g:netrw_gx")? g:netrw_gx : '<cfile>')),netrw#CheckIfRemote())<cr>
85 endif 85 endif
86 if maparg('gx','v') == "" 86 if maparg('gx','v') == ""
87 if !hasmapto('<Plug>NetrwBrowseXVis') 87 if !hasmapto('<Plug>NetrwBrowseXVis')
88 vmap <unique> gx <Plug>NetrwBrowseXVis 88 vmap <unique> gx <Plug>NetrwBrowseXVis
89 endif 89 endif
101 " LocalBrowse: invokes netrw#LocalBrowseCheck() on directory buffers {{{2 101 " LocalBrowse: invokes netrw#LocalBrowseCheck() on directory buffers {{{2
102 fun! s:LocalBrowse(dirname) 102 fun! s:LocalBrowse(dirname)
103 " Unfortunate interaction -- only DechoMsg debugging calls can be safely used here. 103 " Unfortunate interaction -- only DechoMsg debugging calls can be safely used here.
104 " Otherwise, the BufEnter event gets triggered when attempts to write to 104 " Otherwise, the BufEnter event gets triggered when attempts to write to
105 " the DBG buffer are made. 105 " the DBG buffer are made.
106 106
107 if !exists("s:vimentered") 107 if !exists("s:vimentered")
108 " If s:vimentered doesn't exist, then the VimEnter event hasn't fired. It will, 108 " If s:vimentered doesn't exist, then the VimEnter event hasn't fired. It will,
109 " and so s:VimEnter() will then be calling this routine, but this time with s:vimentered defined. 109 " and so s:VimEnter() will then be calling this routine, but this time with s:vimentered defined.
110 " call Dfunc("s:LocalBrowse(dirname<".a:dirname.">) (s:vimentered doesn't exist)") 110 " call Dfunc("s:LocalBrowse(dirname<".a:dirname.">) (s:vimentered doesn't exist)")
111 " call Dret("s:LocalBrowse") 111 " call Dret("s:LocalBrowse")