Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
13029:ad25944f23a6 | 13030:92a0a33f8296 |
---|---|
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 = "v162" | 23 let g:loaded_netrwPlugin = "v156" |
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#FileUrlEdit(expand("<amatch>")) | 45 au BufReadCmd file://* call netrw#FileUrlRead(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://*,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>")) |
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(1,<q-args>) | 62 com! -nargs=? Ntree call netrw#SetTreetop(<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(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 |
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(".")) | |
132 sil! call netrw#LocalBrowseCheck(a:dirname) | 133 sil! call netrw#LocalBrowseCheck(a:dirname) |
134 " call Decho("(s:LocalBrowse) COMBAK#24: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col(".")) | |
133 if exists("w:netrw_bannercnt") && line('.') < w:netrw_bannercnt | 135 if exists("w:netrw_bannercnt") && line('.') < w:netrw_bannercnt |
134 exe w:netrw_bannercnt | 136 exe w:netrw_bannercnt |
137 " call Decho("(s:LocalBrowse) COMBAK#25: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col(".")) | |
135 endif | 138 endif |
136 | 139 |
137 else | 140 else |
138 " not a directory, ignore it | 141 " not a directory, ignore it |
139 " call Decho("(LocalBrowse) dirname<".a:dirname."> not a directory, ignoring...") | 142 " call Decho("(LocalBrowse) dirname<".a:dirname."> not a directory, ignoring...") |
140 endif | 143 endif |
144 " call Decho("(s:LocalBrowse) COMBAK#26: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col(".")) | |
141 | 145 |
142 " call Dret("s:LocalBrowse") | 146 " call Dret("s:LocalBrowse") |
143 endfun | 147 endfun |
144 | 148 |
145 " --------------------------------------------------------------------- | 149 " --------------------------------------------------------------------- |