Mercurial > vim
diff runtime/plugin/netrwPlugin.vim @ 13030:92a0a33f8296
move netrw back to the previous version
commit https://github.com/vim/vim/commit/4697399e8c805325009351a2488e3da530d0af38
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Dec 14 19:56:46 2017 +0100
move netrw back to the previous version
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 14 Dec 2017 20:00:05 +0100 |
parents | 65d7fd8381a3 |
children | ca8e754bdd53 |
line wrap: on
line diff
--- a/runtime/plugin/netrwPlugin.vim +++ b/runtime/plugin/netrwPlugin.vim @@ -20,7 +20,7 @@ if &cp || exists("g:loaded_netrwPlugin") finish endif -let g:loaded_netrwPlugin = "v162" +let g:loaded_netrwPlugin = "v156" let s:keepcpo = &cpo set cpo&vim "DechoRemOn @@ -42,8 +42,8 @@ augroup END " Network Browsing Reading Writing: {{{2 augroup Network au! - au BufReadCmd file://* call netrw#FileUrlEdit(expand("<amatch>")) - 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>")) + au BufReadCmd file://* call netrw#FileUrlRead(expand("<amatch>")) + 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>")) 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>")) 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>")) 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>")) @@ -59,7 +59,7 @@ com! -count=1 -nargs=* Nread let s:svpo com! -range=% -nargs=* Nwrite let s:svpos= winsaveview()<bar><line1>,<line2>call netrw#NetWrite(<f-args>)<bar>call winrestview(s:svpos) com! -nargs=* NetUserPass call NetUserPass(<f-args>) com! -nargs=* Nsource let s:svpos= winsaveview()<bar>call netrw#NetSource(<f-args>)<bar>call winrestview(s:svpos) -com! -nargs=? Ntree call netrw#SetTreetop(1,<q-args>) +com! -nargs=? Ntree call netrw#SetTreetop(<q-args>) " Commands: :Explore, :Sexplore, Hexplore, Vexplore, Lexplore {{{2 com! -nargs=* -bar -bang -count=0 -complete=dir Explore call netrw#Explore(<count>,0,0+<bang>0,<q-args>) @@ -81,7 +81,7 @@ if !exists("g:netrw_nogx") if !hasmapto('<Plug>NetrwBrowseX') nmap <unique> gx <Plug>NetrwBrowseX endif - nno <silent> <Plug>NetrwBrowseX :call netrw#BrowseX(netrw#GX(),netrw#CheckIfRemote(netrw#GX()))<cr> + nno <silent> <Plug>NetrwBrowseX :call netrw#BrowseX(expand((exists("g:netrw_gx")? g:netrw_gx : '<cfile>')),netrw#CheckIfRemote())<cr> endif if maparg('gx','v') == "" if !hasmapto('<Plug>NetrwBrowseXVis') @@ -129,15 +129,19 @@ fun! s:LocalBrowse(dirname) elseif isdirectory(a:dirname) " call Decho("(LocalBrowse) dirname<".a:dirname."> ft=".&ft." (isdirectory, not amiga)") " call Dredir("LocalBrowse ft last set: ","verbose set ft") +" call Decho("(s:LocalBrowse) COMBAK#23: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col(".")) sil! call netrw#LocalBrowseCheck(a:dirname) +" call Decho("(s:LocalBrowse) COMBAK#24: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col(".")) if exists("w:netrw_bannercnt") && line('.') < w:netrw_bannercnt exe w:netrw_bannercnt +" call Decho("(s:LocalBrowse) COMBAK#25: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col(".")) endif else " not a directory, ignore it " call Decho("(LocalBrowse) dirname<".a:dirname."> not a directory, ignoring...") endif +" call Decho("(s:LocalBrowse) COMBAK#26: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col(".")) " call Dret("s:LocalBrowse") endfun