blob: b46ee39f74e095792b6c45e77c1c3a145265c3eb [file] [log] [blame]
Bram Moolenaar482aaeb2005-09-29 18:26:07 +00001" netrwPlugin.vim: Handles file transfer and remote directory listing across a network
Bram Moolenaardd2a3cd2007-05-05 17:10:09 +00002" PLUGIN SECTION
Christian Brabandtf9ca1392024-02-19 20:37:11 +01003" Maintainer: This runtime file is looking for a new maintainer.
Konfekt3d7e5672024-10-27 22:16:49 +01004" Date: Sep 09, 2021
Nir Lichtman1e34b952024-05-08 19:19:34 +02005" Last Change:
6" 2024 May 08 by Vim Project: cleanup legacy Win9X checks
Konfekt3d7e5672024-10-27 22:16:49 +01007" 2024 Oct 27 by Vim Project: cleanup gx mapping
Christian Brabandtf9ca1392024-02-19 20:37:11 +01008" Former Maintainer: Charles E Campbell
Bram Moolenaar482aaeb2005-09-29 18:26:07 +00009" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
Bram Moolenaar89a9c152021-08-29 21:55:35 +020010" Copyright: Copyright (C) 1999-2021 Charles E. Campbell {{{1
Bram Moolenaar482aaeb2005-09-29 18:26:07 +000011" Permission is hereby granted to use and distribute this code,
12" with or without modifications, provided that this copyright
13" notice is copied with it. Like anything else that's free,
14" netrw.vim, netrwPlugin.vim, and netrwSettings.vim are provided
15" *as is* and comes with no warranty of any kind, either
16" expressed or implied. By using this plugin, you agree that
17" in no event will the copyright holder be liable for any damages
18" resulting from the use of this software.
19"
20" But be doers of the Word, and not only hearers, deluding your own selves {{{1
21" (James 1:22 RSV)
22" =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Bram Moolenaar482aaeb2005-09-29 18:26:07 +000023" Load Once: {{{1
Bram Moolenaardd2a3cd2007-05-05 17:10:09 +000024if &cp || exists("g:loaded_netrwPlugin")
Bram Moolenaar482aaeb2005-09-29 18:26:07 +000025 finish
26endif
Bram Moolenaarb7398fe2023-05-14 18:50:25 +010027let g:loaded_netrwPlugin = "v173"
Bram Moolenaar5c736222010-01-06 20:54:52 +010028let s:keepcpo = &cpo
Bram Moolenaar482aaeb2005-09-29 18:26:07 +000029set cpo&vim
Bram Moolenaar8d043172014-01-23 14:24:41 +010030"DechoRemOn
Bram Moolenaar482aaeb2005-09-29 18:26:07 +000031
32" ---------------------------------------------------------------------
33" Public Interface: {{{1
34
Konfekt3d7e5672024-10-27 22:16:49 +010035" Commands Launch/URL {{{2
36" surpress output of command; use bang for GUI applications
37
Enno70197882024-10-28 20:47:25 +010038func s:redir()
39 " set up redirection (avoids browser messages)
40 " by default if not set, g:netrw_suppress_gx_mesg is true
41 if get(g:, 'netrw_suppress_gx_mesg', 1)
42 if &srr =~# "%s"
43 return printf(&srr, has("win32") ? "nul" : "/dev/null")
44 else
45 return &srr .. (has("win32") ? "nul" : "/dev/null")
46 endif
Konfekt3d7e5672024-10-27 22:16:49 +010047 endif
Enno70197882024-10-28 20:47:25 +010048 return ''
49endfunc
Konfekt3d7e5672024-10-27 22:16:49 +010050
51if has('unix')
52 if has('win32unix')
53 " If cygstart provided, then assume Cygwin and use cygstart --hide; see man cygstart.
54 if executable('cygstart')
55 command -complete=shellcmd -nargs=1 -bang Launch
56 \ exe 'silent ! cygstart --hide' trim(<q-args>) s:redir | redraw!
57 elseif !empty($MSYSTEM) && executable('start')
58 " MSYS2/Git Bash comes by default without cygstart; see
59 " https://www.msys2.org/wiki/How-does-MSYS2-differ-from-Cygwin
60 " Instead it provides /usr/bin/start script running `cmd.exe //c start`
61 " Adding "" //b` sets void title, hides cmd window and blocks path conversion
62 " of /b to \b\ " by MSYS2; see https://www.msys2.org/docs/filesystem-paths/
63 command -complete=shellcmd -nargs=1 -bang Launch
Enno70197882024-10-28 20:47:25 +010064 \ exe 'silent !start "" //b' trim(<q-args>) s:redir() | redraw!
Konfekt3d7e5672024-10-27 22:16:49 +010065 else
66 " imitate /usr/bin/start script for other environments and hope for the best
67 command -complete=shellcmd -nargs=1 -bang Launch
Enno70197882024-10-28 20:47:25 +010068 \ exe 'silent !cmd //c start "" //b' trim(<q-args>) s:redir() | redraw!
Konfekt3d7e5672024-10-27 22:16:49 +010069 endif
70 elseif exists('$WSL_DISTRO_NAME') " use cmd.exe to start GUI apps in WSL
71 command -complete=shellcmd -nargs=1 -bang Launch execute ':silent !'..
72 \ ((<q-args> =~? '\v<\f+\.(exe|com|bat|cmd)>') ?
73 \ 'cmd.exe /c start "" /b' trim(<q-args>) :
Enno70197882024-10-28 20:47:25 +010074 \ 'nohup ' trim(<q-args>) s:redir() '&')
Konfekt3d7e5672024-10-27 22:16:49 +010075 \ | redraw!
76 else
77 command -complete=shellcmd -nargs=1 -bang Launch
Enno70197882024-10-28 20:47:25 +010078 \ exe ':silent ! nohup' trim(<q-args>) s:redir() '&' | redraw!
Konfekt3d7e5672024-10-27 22:16:49 +010079 endif
80elseif has('win32')
81 command -complete=shellcmd -nargs=1 -bang Launch
82 \ exe 'silent !'.. (&shell =~? '\<cmd\.exe\>' ? '' : 'cmd.exe /c')
Enno70197882024-10-28 20:47:25 +010083 \ 'start /b ' trim(<q-args>) s:redir() | redraw!
Konfekt3d7e5672024-10-27 22:16:49 +010084endif
85if exists(':Launch') == 2
86 " Git Bash
87 if has('win32unix')
88 " start suffices
89 let s:cmd = ''
90 " Windows / WSL
91 elseif executable('explorer.exe')
92 let s:cmd = 'explorer.exe'
93 " Linux / BSD
94 elseif executable('xdg-open')
95 let s:cmd = 'xdg-open'
96 " MacOS
97 elseif executable('open')
98 let s:cmd = 'open'
Konfekt3d7e5672024-10-27 22:16:49 +010099 endif
Enno70197882024-10-28 20:47:25 +0100100 function s:Open(file)
101 if !exists('s:cmd') && !exists('g:netrw_browsex_viewer')
Konfekt3d7e5672024-10-27 22:16:49 +0100102 echoerr "No program to open this path found. See :help Open for more information."
103 else
Enno70197882024-10-28 20:47:25 +0100104 exe 'Launch' s:cmd shellescape(a:file, 1)
Konfekt3d7e5672024-10-27 22:16:49 +0100105 endif
106 endfunction
Enno70197882024-10-28 20:47:25 +0100107 command -complete=file -nargs=1 Open call s:Open(<q-args>)
Konfekt3d7e5672024-10-27 22:16:49 +0100108endif
109
110if !exists('g:netrw_regex_url')
111 let g:netrw_regex_url = '\%(\%(http\|ftp\|irc\)s\?\|file\)://\S\{-}'
112endif
113
114" " }}}
Bram Moolenaar8d043172014-01-23 14:24:41 +0100115" Local Browsing Autocmds: {{{2
Bram Moolenaar482aaeb2005-09-29 18:26:07 +0000116augroup FileExplorer
117 au!
Bram Moolenaara6878372014-03-22 21:02:50 +0100118 au BufLeave * if &ft != "netrw"|let w:netrw_prvfile= expand("%:p")|endif
Bram Moolenaar8d043172014-01-23 14:24:41 +0100119 au BufEnter * sil call s:LocalBrowse(expand("<amatch>"))
120 au VimEnter * sil call s:VimEnter(expand("<amatch>"))
Nir Lichtman1e34b952024-05-08 19:19:34 +0200121 if has("win32")
Bram Moolenaar8d043172014-01-23 14:24:41 +0100122 au BufEnter .* sil call s:LocalBrowse(expand("<amatch>"))
Bram Moolenaardd2a3cd2007-05-05 17:10:09 +0000123 endif
Bram Moolenaar482aaeb2005-09-29 18:26:07 +0000124augroup END
125
126" Network Browsing Reading Writing: {{{2
127augroup Network
128 au!
Bram Moolenaar85850f32019-07-19 22:05:51 +0200129 au BufReadCmd file://* call netrw#FileUrlEdit(expand("<amatch>"))
130 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>"))
Bram Moolenaar8feef4f2015-01-07 16:57:10 +0100131 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>"))
132 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>"))
133 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>"))
Bram Moolenaar589edb32019-09-20 14:38:13 +0200134 try
Bram Moolenaar8feef4f2015-01-07 16:57:10 +0100135 au SourceCmd ftp://*,rcp://*,scp://*,http://*,file://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe 'Nsource '.fnameescape(expand("<amatch>"))
Bram Moolenaar589edb32019-09-20 14:38:13 +0200136 catch /^Vim\%((\a\+)\)\=:E216/
Bram Moolenaar8feef4f2015-01-07 16:57:10 +0100137 au SourcePre ftp://*,rcp://*,scp://*,http://*,file://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe 'Nsource '.fnameescape(expand("<amatch>"))
Bram Moolenaardd2a3cd2007-05-05 17:10:09 +0000138 endtry
Bram Moolenaar482aaeb2005-09-29 18:26:07 +0000139augroup END
140
141" Commands: :Nread, :Nwrite, :NetUserPass {{{2
Bram Moolenaare0fa3742016-02-20 15:47:01 +0100142com! -count=1 -nargs=* Nread let s:svpos= winsaveview()<bar>call netrw#NetRead(<count>,<f-args>)<bar>call winrestview(s:svpos)
143com! -range=% -nargs=* Nwrite let s:svpos= winsaveview()<bar><line1>,<line2>call netrw#NetWrite(<f-args>)<bar>call winrestview(s:svpos)
Bram Moolenaar482aaeb2005-09-29 18:26:07 +0000144com! -nargs=* NetUserPass call NetUserPass(<f-args>)
Bram Moolenaare0fa3742016-02-20 15:47:01 +0100145com! -nargs=* Nsource let s:svpos= winsaveview()<bar>call netrw#NetSource(<f-args>)<bar>call winrestview(s:svpos)
Bram Moolenaar85850f32019-07-19 22:05:51 +0200146com! -nargs=? Ntree call netrw#SetTreetop(1,<q-args>)
Bram Moolenaar482aaeb2005-09-29 18:26:07 +0000147
Bram Moolenaar8d043172014-01-23 14:24:41 +0100148" Commands: :Explore, :Sexplore, Hexplore, Vexplore, Lexplore {{{2
Bram Moolenaardd2a3cd2007-05-05 17:10:09 +0000149com! -nargs=* -bar -bang -count=0 -complete=dir Explore call netrw#Explore(<count>,0,0+<bang>0,<q-args>)
150com! -nargs=* -bar -bang -count=0 -complete=dir Sexplore call netrw#Explore(<count>,1,0+<bang>0,<q-args>)
151com! -nargs=* -bar -bang -count=0 -complete=dir Hexplore call netrw#Explore(<count>,1,2+<bang>0,<q-args>)
152com! -nargs=* -bar -bang -count=0 -complete=dir Vexplore call netrw#Explore(<count>,1,4+<bang>0,<q-args>)
153com! -nargs=* -bar -count=0 -complete=dir Texplore call netrw#Explore(<count>,0,6 ,<q-args>)
154com! -nargs=* -bar -bang Nexplore call netrw#Explore(-1,0,0,<q-args>)
155com! -nargs=* -bar -bang Pexplore call netrw#Explore(-2,0,0,<q-args>)
Bram Moolenaar8feef4f2015-01-07 16:57:10 +0100156com! -nargs=* -bar -bang -count=0 -complete=dir Lexplore call netrw#Lexplore(<count>,<bang>0,<q-args>)
Bram Moolenaar482aaeb2005-09-29 18:26:07 +0000157
158" Commands: NetrwSettings {{{2
Bram Moolenaarf2330482008-06-24 20:19:36 +0000159com! -nargs=0 NetrwSettings call netrwSettings#NetrwSettings()
Bram Moolenaara6878372014-03-22 21:02:50 +0100160com! -bang NetrwClean call netrw#Clean(<bang>0)
Bram Moolenaar482aaeb2005-09-29 18:26:07 +0000161
Bram Moolenaarb8a7b562006-02-01 21:47:16 +0000162" Maps:
Bram Moolenaar8feef4f2015-01-07 16:57:10 +0100163if !exists("g:netrw_nogx")
164 if maparg('gx','n') == ""
165 if !hasmapto('<Plug>NetrwBrowseX')
166 nmap <unique> gx <Plug>NetrwBrowseX
167 endif
Bram Moolenaar5ef1c6a2019-11-10 22:09:11 +0100168 nno <silent> <Plug>NetrwBrowseX :call netrw#BrowseX(netrw#GX(),netrw#CheckIfRemote(netrw#GX()))<cr>
Bram Moolenaardd2a3cd2007-05-05 17:10:09 +0000169 endif
Bram Moolenaar89a9c152021-08-29 21:55:35 +0200170 if maparg('gx','x') == ""
Bram Moolenaar8feef4f2015-01-07 16:57:10 +0100171 if !hasmapto('<Plug>NetrwBrowseXVis')
Bram Moolenaar89a9c152021-08-29 21:55:35 +0200172 xmap <unique> gx <Plug>NetrwBrowseXVis
Bram Moolenaar8feef4f2015-01-07 16:57:10 +0100173 endif
Bram Moolenaar89a9c152021-08-29 21:55:35 +0200174 xno <silent> <Plug>NetrwBrowseXVis :<c-u>call netrw#BrowseXVis()<cr>
Bram Moolenaar8feef4f2015-01-07 16:57:10 +0100175 endif
Bram Moolenaarb8a7b562006-02-01 21:47:16 +0000176endif
Bram Moolenaara0f849e2015-10-30 14:37:44 +0100177if exists("g:netrw_usetab") && g:netrw_usetab
178 if maparg('<c-tab>','n') == ""
179 nmap <unique> <c-tab> <Plug>NetrwShrink
180 endif
181 nno <silent> <Plug>NetrwShrink :call netrw#Shrink()<cr>
182endif
Bram Moolenaarb8a7b562006-02-01 21:47:16 +0000183
Bram Moolenaar482aaeb2005-09-29 18:26:07 +0000184" ---------------------------------------------------------------------
Bram Moolenaar8d043172014-01-23 14:24:41 +0100185" LocalBrowse: invokes netrw#LocalBrowseCheck() on directory buffers {{{2
Bram Moolenaar482aaeb2005-09-29 18:26:07 +0000186fun! s:LocalBrowse(dirname)
Bram Moolenaar8d043172014-01-23 14:24:41 +0100187 " Unfortunate interaction -- only DechoMsg debugging calls can be safely used here.
188 " Otherwise, the BufEnter event gets triggered when attempts to write to
Bram Moolenaar482aaeb2005-09-29 18:26:07 +0000189 " the DBG buffer are made.
Bram Moolenaar589edb32019-09-20 14:38:13 +0200190
Bram Moolenaare6ae6222013-05-21 21:01:10 +0200191 if !exists("s:vimentered")
Bram Moolenaar8d043172014-01-23 14:24:41 +0100192 " If s:vimentered doesn't exist, then the VimEnter event hasn't fired. It will,
193 " and so s:VimEnter() will then be calling this routine, but this time with s:vimentered defined.
194" call Dfunc("s:LocalBrowse(dirname<".a:dirname.">) (s:vimentered doesn't exist)")
195" call Dret("s:LocalBrowse")
Bram Moolenaare6ae6222013-05-21 21:01:10 +0200196 return
197 endif
Bram Moolenaar8d043172014-01-23 14:24:41 +0100198
199" call Dfunc("s:LocalBrowse(dirname<".a:dirname.">) (s:vimentered=".s:vimentered.")")
200
Bram Moolenaardd2a3cd2007-05-05 17:10:09 +0000201 if has("amiga")
202 " The check against '' is made for the Amiga, where the empty
203 " string is the current directory and not checking would break
204 " things such as the help command.
Bram Moolenaar8d043172014-01-23 14:24:41 +0100205" call Decho("(LocalBrowse) dirname<".a:dirname."> (isdirectory, amiga)")
Bram Moolenaardd2a3cd2007-05-05 17:10:09 +0000206 if a:dirname != '' && isdirectory(a:dirname)
Bram Moolenaaradc21822011-04-01 18:03:16 +0200207 sil! call netrw#LocalBrowseCheck(a:dirname)
Bram Moolenaar8feef4f2015-01-07 16:57:10 +0100208 if exists("w:netrw_bannercnt") && line('.') < w:netrw_bannercnt
Bram Moolenaara6878372014-03-22 21:02:50 +0100209 exe w:netrw_bannercnt
210 endif
Bram Moolenaardd2a3cd2007-05-05 17:10:09 +0000211 endif
Bram Moolenaar8d043172014-01-23 14:24:41 +0100212
Bram Moolenaardd2a3cd2007-05-05 17:10:09 +0000213 elseif isdirectory(a:dirname)
Bram Moolenaara6878372014-03-22 21:02:50 +0100214" call Decho("(LocalBrowse) dirname<".a:dirname."> ft=".&ft." (isdirectory, not amiga)")
215" call Dredir("LocalBrowse ft last set: ","verbose set ft")
Bram Moolenaar89a9c152021-08-29 21:55:35 +0200216 " Jul 13, 2021: for whatever reason, preceding the following call with
217 " a sil! causes an unbalanced if-endif vim error
218 call netrw#LocalBrowseCheck(a:dirname)
Bram Moolenaar8feef4f2015-01-07 16:57:10 +0100219 if exists("w:netrw_bannercnt") && line('.') < w:netrw_bannercnt
Bram Moolenaara6878372014-03-22 21:02:50 +0100220 exe w:netrw_bannercnt
221 endif
Bram Moolenaar8d043172014-01-23 14:24:41 +0100222
223 else
224 " not a directory, ignore it
225" call Decho("(LocalBrowse) dirname<".a:dirname."> not a directory, ignoring...")
Bram Moolenaar482aaeb2005-09-29 18:26:07 +0000226 endif
Bram Moolenaar8d043172014-01-23 14:24:41 +0100227
228" call Dret("s:LocalBrowse")
Bram Moolenaar482aaeb2005-09-29 18:26:07 +0000229endfun
230
231" ---------------------------------------------------------------------
Bram Moolenaar8d043172014-01-23 14:24:41 +0100232" s:VimEnter: after all vim startup stuff is done, this function is called. {{{2
233" Its purpose: to look over all windows and run s:LocalBrowse() on
234" them, which checks if they're directories and will create a directory
235" listing when appropriate.
236" It also sets s:vimentered, letting s:LocalBrowse() know that s:VimEnter()
237" has already been called.
Bram Moolenaar00a927d2010-05-14 23:24:24 +0200238fun! s:VimEnter(dirname)
Bram Moolenaar8d043172014-01-23 14:24:41 +0100239" call Dfunc("s:VimEnter(dirname<".a:dirname.">) expand(%)<".expand("%").">")
Bram Moolenaar89a9c152021-08-29 21:55:35 +0200240 if has('nvim') || v:version < 802
241 " Johann Hรถchtl: reported that the call range... line causes an E488: Trailing characters
242 " error with neovim. I suspect its because neovim hasn't updated with recent
243 " vim patches. As is, this code will have problems with popup terminals
244 " instantiated before the VimEnter event runs.
245 " Ingo Karkat : E488 also in Vim 8.1.1602
Bram Moolenaare6ae6222013-05-21 21:01:10 +0200246 let curwin = winnr()
247 let s:vimentered = 1
Bram Moolenaar8d043172014-01-23 14:24:41 +0100248 windo call s:LocalBrowse(expand("%:p"))
Bram Moolenaar477db062010-07-28 18:17:41 +0200249 exe curwin."wincmd w"
Bram Moolenaar89a9c152021-08-29 21:55:35 +0200250 else
251 " the following complicated expression comes courtesy of lacygoill; largely does the same thing as the windo and
252 " wincmd which are commented out, but avoids some side effects. Allows popup terminal before VimEnter.
253 let s:vimentered = 1
254 call range(1, winnr('$'))->map({_, v -> win_execute(win_getid(v), 'call expand("%:p")->s:LocalBrowse()')})
255 endif
Bram Moolenaar8d043172014-01-23 14:24:41 +0100256" call Dret("s:VimEnter")
Bram Moolenaar00a927d2010-05-14 23:24:24 +0200257endfun
258
259" ---------------------------------------------------------------------
Bram Moolenaar482aaeb2005-09-29 18:26:07 +0000260" NetrwStatusLine: {{{1
261fun! NetrwStatusLine()
Bram Moolenaaraf48b092006-03-14 22:51:38 +0000262" let g:stlmsg= "Xbufnr=".w:netrw_explore_bufnr." bufnr=".bufnr("%")." Xline#".w:netrw_explore_line." line#".line(".")
263 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")
Bram Moolenaar482aaeb2005-09-29 18:26:07 +0000264 let &stl= s:netrw_explore_stl
265 if exists("w:netrw_explore_bufnr")|unlet w:netrw_explore_bufnr|endif
266 if exists("w:netrw_explore_line")|unlet w:netrw_explore_line|endif
267 return ""
268 else
269 return "Match ".w:netrw_explore_mtchcnt." of ".w:netrw_explore_listlen
270 endif
271endfun
272
273" ------------------------------------------------------------------------
274" NetUserPass: set username and password for subsequent ftp transfer {{{1
275" Usage: :call NetUserPass() -- will prompt for userid and password
276" :call NetUserPass("uid") -- will prompt for password
277" :call NetUserPass("uid","password") -- sets global userid and password
278fun! NetUserPass(...)
279
280 " get/set userid
281 if a:0 == 0
282" call Dfunc("NetUserPass(a:0<".a:0.">)")
283 if !exists("g:netrw_uid") || g:netrw_uid == ""
284 " via prompt
285 let g:netrw_uid= input('Enter username: ')
286 endif
287 else " from command line
288" call Dfunc("NetUserPass(a:1<".a:1.">) {")
289 let g:netrw_uid= a:1
290 endif
291
292 " get password
293 if a:0 <= 1 " via prompt
294" call Decho("a:0=".a:0." case <=1:")
295 let g:netrw_passwd= inputsecret("Enter Password: ")
296 else " from command line
297" call Decho("a:0=".a:0." case >1: a:2<".a:2.">")
298 let g:netrw_passwd=a:2
299 endif
300" call Dret("NetUserPass")
301endfun
302
303" ------------------------------------------------------------------------
Bram Moolenaar482aaeb2005-09-29 18:26:07 +0000304" Modelines And Restoration: {{{1
305let &cpo= s:keepcpo
306unlet s:keepcpo
307" vim:ts=8 fdm=marker