comparison runtime/plugin/netrwPlugin.vim @ 17433:ca8e754bdd53

Update runtime files commit https://github.com/vim/vim/commit/85850f3a5ef9f5a9d22e908ef263de8faa265a95 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Jul 19 22:05:51 2019 +0200 Update runtime files
author Bram Moolenaar <Bram@vim.org>
date Fri, 19 Jul 2019 22:15:08 +0200
parents 92a0a33f8296
children 1e5672da6a69
comparison
equal deleted inserted replaced
17432:d13620591637 17433:ca8e754bdd53
18 " =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- 18 " =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
19 " Load Once: {{{1 19 " Load Once: {{{1
20 if &cp || exists("g:loaded_netrwPlugin") 20 if &cp || exists("g:loaded_netrwPlugin")
21 finish 21 finish
22 endif 22 endif
23 let g:loaded_netrwPlugin = "v156" 23 let g:loaded_netrwPlugin = "v165"
24 let s:keepcpo = &cpo 24 let s:keepcpo = &cpo
25 set cpo&vim 25 set cpo&vim
26 "DechoRemOn 26 "DechoRemOn
27 27
28 " --------------------------------------------------------------------- 28 " ---------------------------------------------------------------------
40 augroup END 40 augroup END
41 41
42 " Network Browsing Reading Writing: {{{2 42 " Network Browsing Reading Writing: {{{2
43 augroup Network 43 augroup Network
44 au! 44 au!
45 au BufReadCmd file://* call netrw#FileUrlRead(expand("<amatch>")) 45 au BufReadCmd file://* call netrw#FileUrlEdit(expand("<amatch>"))
46 au BufReadCmd ftp://*,rcp://*,scp://*,http://*,file://*,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>"))
57 " Commands: :Nread, :Nwrite, :NetUserPass {{{2 57 " Commands: :Nread, :Nwrite, :NetUserPass {{{2
58 com! -count=1 -nargs=* Nread let s:svpos= winsaveview()<bar>call netrw#NetRead(<count>,<f-args>)<bar>call winrestview(s:svpos) 58 com! -count=1 -nargs=* Nread let s:svpos= winsaveview()<bar>call netrw#NetRead(<count>,<f-args>)<bar>call winrestview(s:svpos)
59 com! -range=% -nargs=* Nwrite let s:svpos= winsaveview()<bar><line1>,<line2>call netrw#NetWrite(<f-args>)<bar>call winrestview(s:svpos) 59 com! -range=% -nargs=* Nwrite let s:svpos= winsaveview()<bar><line1>,<line2>call netrw#NetWrite(<f-args>)<bar>call winrestview(s:svpos)
60 com! -nargs=* NetUserPass call NetUserPass(<f-args>) 60 com! -nargs=* NetUserPass call NetUserPass(<f-args>)
61 com! -nargs=* Nsource let s:svpos= winsaveview()<bar>call netrw#NetSource(<f-args>)<bar>call winrestview(s:svpos) 61 com! -nargs=* Nsource let s:svpos= winsaveview()<bar>call netrw#NetSource(<f-args>)<bar>call winrestview(s:svpos)
62 com! -nargs=? Ntree call netrw#SetTreetop(<q-args>) 62 com! -nargs=? Ntree call netrw#SetTreetop(1,<q-args>)
63 63
64 " Commands: :Explore, :Sexplore, Hexplore, Vexplore, Lexplore {{{2 64 " Commands: :Explore, :Sexplore, Hexplore, Vexplore, Lexplore {{{2
65 com! -nargs=* -bar -bang -count=0 -complete=dir Explore call netrw#Explore(<count>,0,0+<bang>0,<q-args>) 65 com! -nargs=* -bar -bang -count=0 -complete=dir Explore call netrw#Explore(<count>,0,0+<bang>0,<q-args>)
66 com! -nargs=* -bar -bang -count=0 -complete=dir Sexplore call netrw#Explore(<count>,1,0+<bang>0,<q-args>) 66 com! -nargs=* -bar -bang -count=0 -complete=dir Sexplore call netrw#Explore(<count>,1,0+<bang>0,<q-args>)
67 com! -nargs=* -bar -bang -count=0 -complete=dir Hexplore call netrw#Explore(<count>,1,2+<bang>0,<q-args>) 67 com! -nargs=* -bar -bang -count=0 -complete=dir Hexplore call netrw#Explore(<count>,1,2+<bang>0,<q-args>)
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(expand((exists("g:netrw_gx")? g:netrw_gx : '<cfile>')),netrw#CheckIfRemote())<cr> 84 nno <silent> <Plug>NetrwBrowseX :call netrw#BrowseX(netrw#GX(),netrw#CheckIfRemote(netrw#GX()))<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
127 endif 127 endif
128 128
129 elseif isdirectory(a:dirname) 129 elseif isdirectory(a:dirname)
130 " call Decho("(LocalBrowse) dirname<".a:dirname."> ft=".&ft." (isdirectory, not amiga)") 130 " call Decho("(LocalBrowse) dirname<".a:dirname."> ft=".&ft." (isdirectory, not amiga)")
131 " call Dredir("LocalBrowse ft last set: ","verbose set ft") 131 " call Dredir("LocalBrowse ft last set: ","verbose set ft")
132 " call Decho("(s:LocalBrowse) COMBAK#23: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col("."))
133 sil! call netrw#LocalBrowseCheck(a:dirname) 132 sil! call netrw#LocalBrowseCheck(a:dirname)
134 " call Decho("(s:LocalBrowse) COMBAK#24: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col("."))
135 if exists("w:netrw_bannercnt") && line('.') < w:netrw_bannercnt 133 if exists("w:netrw_bannercnt") && line('.') < w:netrw_bannercnt
136 exe w:netrw_bannercnt 134 exe w:netrw_bannercnt
137 " call Decho("(s:LocalBrowse) COMBAK#25: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col("."))
138 endif 135 endif
139 136
140 else 137 else
141 " not a directory, ignore it 138 " not a directory, ignore it
142 " call Decho("(LocalBrowse) dirname<".a:dirname."> not a directory, ignoring...") 139 " call Decho("(LocalBrowse) dirname<".a:dirname."> not a directory, ignoring...")
143 endif 140 endif
144 " call Decho("(s:LocalBrowse) COMBAK#26: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col("."))
145 141
146 " call Dret("s:LocalBrowse") 142 " call Dret("s:LocalBrowse")
147 endfun 143 endfun
148 144
149 " --------------------------------------------------------------------- 145 " ---------------------------------------------------------------------