mirror of
https://github.com/neovim/neovim.git
synced 2025-10-18 15:51:50 +00:00
vim-patch:2249cc0: runtime(netrw): remove the fun from netrw :)
closes: vim/vim#17584
2249cc0a47
Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
This commit is contained in:
745
runtime/pack/dist/opt/netrw/autoload/netrw.vim
vendored
745
runtime/pack/dist/opt/netrw/autoload/netrw.vim
vendored
File diff suppressed because it is too large
Load Diff
@@ -54,7 +54,7 @@ augroup END
|
|||||||
|
|
||||||
command! -count=1 -nargs=* Nread let s:svpos= winsaveview()<bar>call netrw#NetRead(<count>,<f-args>)<bar>call winrestview(s:svpos)
|
command! -count=1 -nargs=* Nread let s:svpos= winsaveview()<bar>call netrw#NetRead(<count>,<f-args>)<bar>call winrestview(s:svpos)
|
||||||
command! -range=% -nargs=* Nwrite let s:svpos= winsaveview()<bar><line1>,<line2>call netrw#NetWrite(<f-args>)<bar>call winrestview(s:svpos)
|
command! -range=% -nargs=* Nwrite let s:svpos= winsaveview()<bar><line1>,<line2>call netrw#NetWrite(<f-args>)<bar>call winrestview(s:svpos)
|
||||||
command! -nargs=* NetUserPass call NetUserPass(<f-args>)
|
command! -nargs=* NetUserPass call netrw#NetUserPass(<f-args>)
|
||||||
command! -nargs=* Nsource let s:svpos= winsaveview()<bar>call netrw#NetSource(<f-args>)<bar>call winrestview(s:svpos)
|
command! -nargs=* Nsource let s:svpos= winsaveview()<bar>call netrw#NetSource(<f-args>)<bar>call winrestview(s:svpos)
|
||||||
command! -nargs=? Ntree call netrw#SetTreetop(1,<q-args>)
|
command! -nargs=? Ntree call netrw#SetTreetop(1,<q-args>)
|
||||||
|
|
||||||
@@ -143,39 +143,17 @@ function! s:VimEnter(dirname)
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" }}}
|
" }}}
|
||||||
" NetrwStatusLine: {{{
|
" Deprecated: {{{
|
||||||
|
|
||||||
function! NetrwStatusLine()
|
function NetUserPass(...)
|
||||||
if !exists("w:netrw_explore_bufnr") || w:netrw_explore_bufnr != bufnr("%") || !exists("w:netrw_explore_line") || w:netrw_explore_line != line(".") || !exists("w:netrw_explore_list")
|
call netrw#msg#Deprecate('NetUserPass', 'v185', {
|
||||||
let &stl= s:netrw_explore_stl
|
\ 'vim': 'netrw#NetUserPass()',
|
||||||
unlet! w:netrw_explore_bufnr w:netrw_explore_line
|
\ 'nvim': 'netrw#NetUserPass()'
|
||||||
return ""
|
\})
|
||||||
|
if a:0
|
||||||
|
call netrw#NetUserPass(a:000)
|
||||||
else
|
else
|
||||||
return "Match ".w:netrw_explore_mtchcnt." of ".w:netrw_explore_listlen
|
call netrw#NetUserPass()
|
||||||
endif
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" }}}
|
|
||||||
" NetUserPass: set username and password for subsequent ftp transfer {{{
|
|
||||||
" Usage: :call NetUserPass() -- will prompt for userid and password
|
|
||||||
" :call NetUserPass("uid") -- will prompt for password
|
|
||||||
" :call NetUserPass("uid","password") -- sets global userid and password
|
|
||||||
function! NetUserPass(...)
|
|
||||||
" get/set userid
|
|
||||||
if a:0 == 0
|
|
||||||
if !exists("g:netrw_uid") || g:netrw_uid == ""
|
|
||||||
" via prompt
|
|
||||||
let g:netrw_uid= input('Enter username: ')
|
|
||||||
endif
|
|
||||||
else " from command line
|
|
||||||
let g:netrw_uid= a:1
|
|
||||||
endif
|
|
||||||
|
|
||||||
" get password
|
|
||||||
if a:0 <= 1 " via prompt
|
|
||||||
let g:netrw_passwd= inputsecret("Enter Password: ")
|
|
||||||
else " from command line
|
|
||||||
let g:netrw_passwd=a:2
|
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user