diff --git a/vimfiles.stefan/vimrc.linux b/vimfiles.stefan/vimrc.linux index 208dd6a..c5d81f3 100644 --- a/vimfiles.stefan/vimrc.linux +++ b/vimfiles.stefan/vimrc.linux @@ -27,8 +27,7 @@ let g:noccmmenu = 1 if has('gui') " set Font - "set guifont=Fixedsys - "set guifont=Terminal:h6 + set guifont=Andale\ Mono\ 8 "set guifontwide= " Set standards for GUI diff --git a/vimfiles/plugin/blockdiff.vim b/vimfiles/plugin/blockdiff.vim index eb3427b..bbecad9 100644 --- a/vimfiles/plugin/blockdiff.vim +++ b/vimfiles/plugin/blockdiff.vim @@ -1,102 +1,102 @@ -" Vim BlockDiff-Plugin -" -" Author: Timo Teifel -" Email: timo dot teifel at teifel dot net -" Version: 1.1 -" Date: 23 Oct 2007 -" Licence: GPL v2.0 -" -" Usage: -" - Select first block -" - Depending on the configuration, select: -" - Menu Tools->BlockDiff-> This\ is\ Block\ 1 -" - Popup-Menu -> This\ is\ Block\ 1 -" - :BlockDiff1 -" - ,d1 -" - select second block (may be in another file, but in the same -" Vim window) -" - Menu Tools->BlockDiff-> This\ is\ Block\ 2,\ start\ diff -" - Popup-Menu -> This\ is\ Block\ 2,\ start\ diff -" - :BlockDiff2 -" - ,d2 -" - Script opens a new tab, splits it and shows the diff between -" the two blocks. -" - Close the tab when done -" -" History: -" V1.0: Initial upload -" V1.1: Added commands and inclusion guard, Thanks to Ingo Karkat - - -" Avoid installing twice or when in compatible mode -if exists('g:loaded_blockdiff') || (v:version < 700) -finish -endif -let g:loaded_blockdiff = 1 - - -let s:save_cpo = &cpo -set cpo&vim - -" ---------- Configuration ---------------------------------------------------- -" uncomment one or more of these blocks: - - -" Create menu entry: - vmenu 40.352.10 &Tools.Bloc&kDiff.This\ is\ Block\ &1 :call BlockDiff_GetBlock1() - vmenu 40.352.20 &Tools.Bloc&kDiff.This\ is\ Block\ &2,\ start\ diff :call BlockDiff_GetBlock2() - - -" Create popup-menu-entry: - "vmenu PopUp.BlockDiff.This\ is\ Block\ 1 :call BlockDiff_GetBlock1() - "vmenu PopUp.BlockDiff.This\ is\ Block\ 2,\ start\ diff :call BlockDiff_GetBlock2() - -" Shortcuts - "vmap ,d1 :call BlockDiff_GetBlock1() - "vmap ,d2 :call BlockDiff_GetBlock2() - -" Commands - command! -range BlockDiff1 :,call BlockDiff_GetBlock1() - command! -range BlockDiff2 :,call BlockDiff_GetBlock2() - - -" ---------- Code ------------------------------------------------------------- -fun! BlockDiff_GetBlock1() range - let s:regd = @@ - " copy selected block into unnamed register - exe a:firstline . "," . a:lastline . "y" - " save block for later use in variable - let s:block1 = @@ - " restore unnamed register - let @@ = s:regd -endfun - -fun! BlockDiff_GetBlock2() range - let s:regd = @@ - exe a:firstline . "," . a:lastline . "y" - - " Open new tab, paste second selected block - tabnew - normal P - " to prevent 'No write since last change' message: - se buftype=nowrite - diffthis - - " vsplit left for first selected block - lefta vnew - " copy first block into unnamed register & paste - let @@ = s:block1 - normal P - se buftype=nowrite - - " start diff - diffthis - - " restore unnamed register - let @@ = s:regd -endfun - - -let &cpo = s:save_cpo -unlet s:save_cpo - +" Vim BlockDiff-Plugin +" +" Author: Timo Teifel +" Email: timo dot teifel at teifel dot net +" Version: 1.1 +" Date: 23 Oct 2007 +" Licence: GPL v2.0 +" +" Usage: +" - Select first block +" - Depending on the configuration, select: +" - Menu Tools->BlockDiff-> This\ is\ Block\ 1 +" - Popup-Menu -> This\ is\ Block\ 1 +" - :BlockDiff1 +" - ,d1 +" - select second block (may be in another file, but in the same +" Vim window) +" - Menu Tools->BlockDiff-> This\ is\ Block\ 2,\ start\ diff +" - Popup-Menu -> This\ is\ Block\ 2,\ start\ diff +" - :BlockDiff2 +" - ,d2 +" - Script opens a new tab, splits it and shows the diff between +" the two blocks. +" - Close the tab when done +" +" History: +" V1.0: Initial upload +" V1.1: Added commands and inclusion guard, Thanks to Ingo Karkat + + +" Avoid installing twice or when in compatible mode +if exists('g:loaded_blockdiff') || (v:version < 700) +finish +endif +let g:loaded_blockdiff = 1 + + +let s:save_cpo = &cpo +set cpo&vim + +" ---------- Configuration ---------------------------------------------------- +" uncomment one or more of these blocks: + + +" Create menu entry: + vmenu 40.352.10 &Tools.Bloc&kDiff.This\ is\ Block\ &1 :call BlockDiff_GetBlock1() + vmenu 40.352.20 &Tools.Bloc&kDiff.This\ is\ Block\ &2,\ start\ diff :call BlockDiff_GetBlock2() + + +" Create popup-menu-entry: + "vmenu PopUp.BlockDiff.This\ is\ Block\ 1 :call BlockDiff_GetBlock1() + "vmenu PopUp.BlockDiff.This\ is\ Block\ 2,\ start\ diff :call BlockDiff_GetBlock2() + +" Shortcuts + "vmap ,d1 :call BlockDiff_GetBlock1() + "vmap ,d2 :call BlockDiff_GetBlock2() + +" Commands + command! -range BlockDiff1 :,call BlockDiff_GetBlock1() + command! -range BlockDiff2 :,call BlockDiff_GetBlock2() + + +" ---------- Code ------------------------------------------------------------- +fun! BlockDiff_GetBlock1() range + let s:regd = @@ + " copy selected block into unnamed register + exe a:firstline . "," . a:lastline . "y" + " save block for later use in variable + let s:block1 = @@ + " restore unnamed register + let @@ = s:regd +endfun + +fun! BlockDiff_GetBlock2() range + let s:regd = @@ + exe a:firstline . "," . a:lastline . "y" + + " Open new tab, paste second selected block + tabnew + normal P + " to prevent 'No write since last change' message: + se buftype=nowrite + diffthis + + " vsplit left for first selected block + lefta vnew + " copy first block into unnamed register & paste + let @@ = s:block1 + normal P + se buftype=nowrite + + " start diff + diffthis + + " restore unnamed register + let @@ = s:regd +endfun + + +let &cpo = s:save_cpo +unlet s:save_cpo + diff --git a/vimfiles/plugin/netrwPlugin.vim b/vimfiles/plugin/netrwPlugin.vim index 2f7ac5a..3020279 100644 --- a/vimfiles/plugin/netrwPlugin.vim +++ b/vimfiles/plugin/netrwPlugin.vim @@ -1,180 +1,180 @@ -" netrwPlugin.vim: Handles file transfer and remote directory listing across a network -" PLUGIN SECTION -" Date: Aug 09, 2007 -" Maintainer: Charles E Campbell, Jr -" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim -" Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1 -" Permission is hereby granted to use and distribute this code, -" with or without modifications, provided that this copyright -" notice is copied with it. Like anything else that's free, -" netrw.vim, netrwPlugin.vim, and netrwSettings.vim are provided -" *as is* and comes with no warranty of any kind, either -" expressed or implied. By using this plugin, you agree that -" in no event will the copyright holder be liable for any damages -" resulting from the use of this software. -" -" But be doers of the Word, and not only hearers, deluding your own selves {{{1 -" (James 1:22 RSV) -" =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - -" --------------------------------------------------------------------- -" Load Once: {{{1 -if &cp || exists("g:loaded_netrwPlugin") - finish -endif -let g:loaded_netrwPlugin = "v116" -let s:keepcpo = &cpo -if v:version < 700 - echohl WarningMsg | echo "***netrw*** you need vim version 7.0 for this version of netrw" | echohl None - finish -endif -let s:keepcpo= &cpo -set cpo&vim - -" --------------------------------------------------------------------- -" Public Interface: {{{1 - -" Local Browsing: {{{2 -augroup FileExplorer - au! - au BufEnter * silent! call s:LocalBrowse(expand("")) - if has("win32") || has("win95") || has("win64") || has("win16") - au BufEnter .* silent! call s:LocalBrowse(expand("")) - endif -augroup END - -" Network Browsing Reading Writing: {{{2 -augroup Network - au! - if has("win32") || has("win95") || has("win64") || has("win16") - au BufReadCmd file://* exe "silent doau BufReadPre ".netrw#RFC2396(expand(""))|exe 'e '.substitute(netrw#RFC2396(expand("")),'file://\(.*\)','\1',"")|exe "silent doau BufReadPost ".netrw#RFC2396(expand("")) - else - au BufReadCmd file://* exe "silent doau BufReadPre ".netrw#RFC2396(expand(""))|exe 'e '.substitute(netrw#RFC2396(expand("")),'file://\(.*\)','\1',"")|exe "silent doau BufReadPost ".netrw#RFC2396(expand("")) - au BufReadCmd file://localhost/* exe "silent doau BufReadPre ".netrw#RFC2396(expand(""))|exe 'e '.substitute(netrw#RFC2396(expand("")),'file://localhost/\(.*\)','\1',"")|exe "silent doau BufReadPost ".netrw#RFC2396(expand("")) - endif - au BufReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://* exe "silent doau BufReadPre ".expand("")|exe '2Nread "'.expand("").'"'|exe "silent doau BufReadPost ".expand("") - au FileReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://* exe "silent doau FileReadPre ".expand("")|exe 'Nread "' .expand("").'"'|exe "silent doau FileReadPost ".expand("") - au BufWriteCmd ftp://*,rcp://*,scp://*,dav://*,rsync://*,sftp://* exe "silent doau BufWritePre ".expand("")|exe 'Nwrite "' .expand("").'"'|exe "silent doau BufWritePost ".expand("") - au FileWriteCmd ftp://*,rcp://*,scp://*,dav://*,rsync://*,sftp://* exe "silent doau FileWritePre ".expand("")|exe "'[,']".'Nwrite "' .expand("").'"'|exe "silent doau FileWritePost ".expand("") - try - au SourceCmd ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://* exe 'Nsource "'.expand("").'"' - catch /^Vim\%((\a\+)\)\=:E216/ - au SourcePre ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://* exe 'Nsource "'.expand("").'"' - endtry -augroup END - -" Commands: :Nread, :Nwrite, :NetUserPass {{{2 -com! -count=1 -nargs=* Nread call netrw#NetrwSavePosn()call netrw#NetRead(,)call netrw#NetrwRestorePosn() -com! -range=% -nargs=* Nwrite call netrw#NetrwSavePosn(),call netrw#NetWrite()call netrw#NetrwRestorePosn() -com! -nargs=* NetUserPass call NetUserPass() -com! -nargs=* Nsource call netrw#NetrwSavePosn()call netrw#NetSource()call netrw#NetrwRestorePosn() - -" Commands: :Explore, :Sexplore, Hexplore, Vexplore {{{2 -com! -nargs=* -bar -bang -count=0 -complete=dir Explore call netrw#Explore(,0,0+0,) -com! -nargs=* -bar -bang -count=0 -complete=dir Sexplore call netrw#Explore(,1,0+0,) -com! -nargs=* -bar -bang -count=0 -complete=dir Hexplore call netrw#Explore(,1,2+0,) -com! -nargs=* -bar -bang -count=0 -complete=dir Vexplore call netrw#Explore(,1,4+0,) -com! -nargs=* -bar -count=0 -complete=dir Texplore call netrw#Explore(,0,6 ,) -com! -nargs=* -bar -bang Nexplore call netrw#Explore(-1,0,0,) -com! -nargs=* -bar -bang Pexplore call netrw#Explore(-2,0,0,) - -" Commands: NetrwSettings {{{2 -com! -nargs=0 NetrwSettings call netrwSettings#NetrwSettings() -com! -bang NetrwClean call netrw#NetrwClean(0) - -" Maps: -if !exists("g:netrw_nogx") && maparg('g','n') == "" - if !hasmapto('NetrwBrowseX') - nmap gx NetrwBrowseX - endif - nno NetrwBrowseX :call netrw#NetBrowseX(expand(""),0) -endif - -" --------------------------------------------------------------------- -" LocalBrowse: {{{2 -fun! s:LocalBrowse(dirname) - " unfortunate interaction -- debugging calls can't be used here; - " the BufEnter event causes triggering when attempts to write to - " the DBG buffer are made. -" echomsg "dirname<".a:dirname.">" - if has("amiga") - " The check against '' is made for the Amiga, where the empty - " string is the current directory and not checking would break - " things such as the help command. - if a:dirname != '' && isdirectory(a:dirname) - silent! call netrw#LocalBrowseCheck(a:dirname) - endif - elseif isdirectory(a:dirname) -" echomsg "dirname<".dirname."> isdir" - silent! call netrw#LocalBrowseCheck(a:dirname) - endif - " not a directory, ignore it -endfun - -" --------------------------------------------------------------------- -" NetrwStatusLine: {{{1 -fun! NetrwStatusLine() -" let g:stlmsg= "Xbufnr=".w:netrw_explore_bufnr." bufnr=".bufnr("%")." Xline#".w:netrw_explore_line." line#".line(".") - 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") - let &stl= s:netrw_explore_stl - if exists("w:netrw_explore_bufnr")|unlet w:netrw_explore_bufnr|endif - if exists("w:netrw_explore_line")|unlet w:netrw_explore_line|endif - return "" - else - return "Match ".w:netrw_explore_mtchcnt." of ".w:netrw_explore_listlen - endif -endfun - -" ------------------------------------------------------------------------ -" NetUserPass: set username and password for subsequent ftp transfer {{{1 -" 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 -fun! NetUserPass(...) - - " get/set userid - if a:0 == 0 -" call Dfunc("NetUserPass(a:0<".a:0.">)") - if !exists("g:netrw_uid") || g:netrw_uid == "" - " via prompt - let g:netrw_uid= input('Enter username: ') - endif - else " from command line -" call Dfunc("NetUserPass(a:1<".a:1.">) {") - let g:netrw_uid= a:1 - endif - - " get password - if a:0 <= 1 " via prompt -" call Decho("a:0=".a:0." case <=1:") - let g:netrw_passwd= inputsecret("Enter Password: ") - else " from command line -" call Decho("a:0=".a:0." case >1: a:2<".a:2.">") - let g:netrw_passwd=a:2 - endif -" call Dret("NetUserPass") -endfun - -" ------------------------------------------------------------------------ -" NetReadFixup: this sort of function is typically written by the user {{{1 -" to handle extra junk that their system's ftp dumps -" into the transfer. This function is provided as an -" example and as a fix for a Windows 95 problem: in my -" experience, win95's ftp always dumped four blank lines -" at the end of the transfer. -if has("win95") && exists("g:netrw_win95ftp") && g:netrw_win95ftp - fun! NetReadFixup(method, line1, line2) -" call Dfunc("NetReadFixup(method<".a:method."> line1=".a:line1." line2=".a:line2.")") - if method == 3 " ftp (no <.netrc>) - let fourblanklines= line2 - 3 - silent fourblanklines.",".line2."g/^\s*/d" - endif -" call Dret("NetReadFixup") - endfun -endif - -" ------------------------------------------------------------------------ -" Modelines And Restoration: {{{1 -let &cpo= s:keepcpo -unlet s:keepcpo -" vim:ts=8 fdm=marker +" netrwPlugin.vim: Handles file transfer and remote directory listing across a network +" PLUGIN SECTION +" Date: Aug 09, 2007 +" Maintainer: Charles E Campbell, Jr +" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim +" Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1 +" Permission is hereby granted to use and distribute this code, +" with or without modifications, provided that this copyright +" notice is copied with it. Like anything else that's free, +" netrw.vim, netrwPlugin.vim, and netrwSettings.vim are provided +" *as is* and comes with no warranty of any kind, either +" expressed or implied. By using this plugin, you agree that +" in no event will the copyright holder be liable for any damages +" resulting from the use of this software. +" +" But be doers of the Word, and not only hearers, deluding your own selves {{{1 +" (James 1:22 RSV) +" =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + +" --------------------------------------------------------------------- +" Load Once: {{{1 +if &cp || exists("g:loaded_netrwPlugin") + finish +endif +let g:loaded_netrwPlugin = "v116" +let s:keepcpo = &cpo +if v:version < 700 + echohl WarningMsg | echo "***netrw*** you need vim version 7.0 for this version of netrw" | echohl None + finish +endif +let s:keepcpo= &cpo +set cpo&vim + +" --------------------------------------------------------------------- +" Public Interface: {{{1 + +" Local Browsing: {{{2 +augroup FileExplorer + au! + au BufEnter * silent! call s:LocalBrowse(expand("")) + if has("win32") || has("win95") || has("win64") || has("win16") + au BufEnter .* silent! call s:LocalBrowse(expand("")) + endif +augroup END + +" Network Browsing Reading Writing: {{{2 +augroup Network + au! + if has("win32") || has("win95") || has("win64") || has("win16") + au BufReadCmd file://* exe "silent doau BufReadPre ".netrw#RFC2396(expand(""))|exe 'e '.substitute(netrw#RFC2396(expand("")),'file://\(.*\)','\1',"")|exe "silent doau BufReadPost ".netrw#RFC2396(expand("")) + else + au BufReadCmd file://* exe "silent doau BufReadPre ".netrw#RFC2396(expand(""))|exe 'e '.substitute(netrw#RFC2396(expand("")),'file://\(.*\)','\1',"")|exe "silent doau BufReadPost ".netrw#RFC2396(expand("")) + au BufReadCmd file://localhost/* exe "silent doau BufReadPre ".netrw#RFC2396(expand(""))|exe 'e '.substitute(netrw#RFC2396(expand("")),'file://localhost/\(.*\)','\1',"")|exe "silent doau BufReadPost ".netrw#RFC2396(expand("")) + endif + au BufReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://* exe "silent doau BufReadPre ".expand("")|exe '2Nread "'.expand("").'"'|exe "silent doau BufReadPost ".expand("") + au FileReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://* exe "silent doau FileReadPre ".expand("")|exe 'Nread "' .expand("").'"'|exe "silent doau FileReadPost ".expand("") + au BufWriteCmd ftp://*,rcp://*,scp://*,dav://*,rsync://*,sftp://* exe "silent doau BufWritePre ".expand("")|exe 'Nwrite "' .expand("").'"'|exe "silent doau BufWritePost ".expand("") + au FileWriteCmd ftp://*,rcp://*,scp://*,dav://*,rsync://*,sftp://* exe "silent doau FileWritePre ".expand("")|exe "'[,']".'Nwrite "' .expand("").'"'|exe "silent doau FileWritePost ".expand("") + try + au SourceCmd ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://* exe 'Nsource "'.expand("").'"' + catch /^Vim\%((\a\+)\)\=:E216/ + au SourcePre ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://* exe 'Nsource "'.expand("").'"' + endtry +augroup END + +" Commands: :Nread, :Nwrite, :NetUserPass {{{2 +com! -count=1 -nargs=* Nread call netrw#NetrwSavePosn()call netrw#NetRead(,)call netrw#NetrwRestorePosn() +com! -range=% -nargs=* Nwrite call netrw#NetrwSavePosn(),call netrw#NetWrite()call netrw#NetrwRestorePosn() +com! -nargs=* NetUserPass call NetUserPass() +com! -nargs=* Nsource call netrw#NetrwSavePosn()call netrw#NetSource()call netrw#NetrwRestorePosn() + +" Commands: :Explore, :Sexplore, Hexplore, Vexplore {{{2 +com! -nargs=* -bar -bang -count=0 -complete=dir Explore call netrw#Explore(,0,0+0,) +com! -nargs=* -bar -bang -count=0 -complete=dir Sexplore call netrw#Explore(,1,0+0,) +com! -nargs=* -bar -bang -count=0 -complete=dir Hexplore call netrw#Explore(,1,2+0,) +com! -nargs=* -bar -bang -count=0 -complete=dir Vexplore call netrw#Explore(,1,4+0,) +com! -nargs=* -bar -count=0 -complete=dir Texplore call netrw#Explore(,0,6 ,) +com! -nargs=* -bar -bang Nexplore call netrw#Explore(-1,0,0,) +com! -nargs=* -bar -bang Pexplore call netrw#Explore(-2,0,0,) + +" Commands: NetrwSettings {{{2 +com! -nargs=0 NetrwSettings call netrwSettings#NetrwSettings() +com! -bang NetrwClean call netrw#NetrwClean(0) + +" Maps: +if !exists("g:netrw_nogx") && maparg('g','n') == "" + if !hasmapto('NetrwBrowseX') + nmap gx NetrwBrowseX + endif + nno NetrwBrowseX :call netrw#NetBrowseX(expand(""),0) +endif + +" --------------------------------------------------------------------- +" LocalBrowse: {{{2 +fun! s:LocalBrowse(dirname) + " unfortunate interaction -- debugging calls can't be used here; + " the BufEnter event causes triggering when attempts to write to + " the DBG buffer are made. +" echomsg "dirname<".a:dirname.">" + if has("amiga") + " The check against '' is made for the Amiga, where the empty + " string is the current directory and not checking would break + " things such as the help command. + if a:dirname != '' && isdirectory(a:dirname) + silent! call netrw#LocalBrowseCheck(a:dirname) + endif + elseif isdirectory(a:dirname) +" echomsg "dirname<".dirname."> isdir" + silent! call netrw#LocalBrowseCheck(a:dirname) + endif + " not a directory, ignore it +endfun + +" --------------------------------------------------------------------- +" NetrwStatusLine: {{{1 +fun! NetrwStatusLine() +" let g:stlmsg= "Xbufnr=".w:netrw_explore_bufnr." bufnr=".bufnr("%")." Xline#".w:netrw_explore_line." line#".line(".") + 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") + let &stl= s:netrw_explore_stl + if exists("w:netrw_explore_bufnr")|unlet w:netrw_explore_bufnr|endif + if exists("w:netrw_explore_line")|unlet w:netrw_explore_line|endif + return "" + else + return "Match ".w:netrw_explore_mtchcnt." of ".w:netrw_explore_listlen + endif +endfun + +" ------------------------------------------------------------------------ +" NetUserPass: set username and password for subsequent ftp transfer {{{1 +" 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 +fun! NetUserPass(...) + + " get/set userid + if a:0 == 0 +" call Dfunc("NetUserPass(a:0<".a:0.">)") + if !exists("g:netrw_uid") || g:netrw_uid == "" + " via prompt + let g:netrw_uid= input('Enter username: ') + endif + else " from command line +" call Dfunc("NetUserPass(a:1<".a:1.">) {") + let g:netrw_uid= a:1 + endif + + " get password + if a:0 <= 1 " via prompt +" call Decho("a:0=".a:0." case <=1:") + let g:netrw_passwd= inputsecret("Enter Password: ") + else " from command line +" call Decho("a:0=".a:0." case >1: a:2<".a:2.">") + let g:netrw_passwd=a:2 + endif +" call Dret("NetUserPass") +endfun + +" ------------------------------------------------------------------------ +" NetReadFixup: this sort of function is typically written by the user {{{1 +" to handle extra junk that their system's ftp dumps +" into the transfer. This function is provided as an +" example and as a fix for a Windows 95 problem: in my +" experience, win95's ftp always dumped four blank lines +" at the end of the transfer. +if has("win95") && exists("g:netrw_win95ftp") && g:netrw_win95ftp + fun! NetReadFixup(method, line1, line2) +" call Dfunc("NetReadFixup(method<".a:method."> line1=".a:line1." line2=".a:line2.")") + if method == 3 " ftp (no <.netrc>) + let fourblanklines= line2 - 3 + silent fourblanklines.",".line2."g/^\s*/d" + endif +" call Dret("NetReadFixup") + endfun +endif + +" ------------------------------------------------------------------------ +" Modelines And Restoration: {{{1 +let &cpo= s:keepcpo +unlet s:keepcpo +" vim:ts=8 fdm=marker