0
0
mirror of https://github.com/vim/vim.git synced 2025-07-04 23:07:33 -04:00

updated for version 7.0157

This commit is contained in:
Bram Moolenaar 2005-10-12 20:54:52 +00:00
parent 8349fd7c7e
commit 61036991ab
3 changed files with 254 additions and 168 deletions

View File

@ -1,7 +1,7 @@
" netrw.vim: Handles file transfer and remote directory listing across a network
" AUTOLOAD PORTION
" Date: Sep 29, 2005
" Version: 72
" Date: Oct 12, 2005
" Version: 73
" Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
" Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1
@ -23,22 +23,74 @@
if &cp || exists("g:loaded_netrw")
finish
endif
let g:loaded_netrw = "v73"
if v:version < 700
echohl WarningMsg | echo "***netrw*** you need vim version 7.0 or later for version ".g:loaded_netrw." of netrw" | echohl None
finish
endif
let g:loaded_netrw = "v72"
let s:keepcpo = &cpo
set cpo&vim
" call Decho("doing autoload/netrw.vim")
" ---------------------------------------------------------------------
" Default values for global netrw variables {{{1
if !exists("g:netrw_ftpmode")
let g:netrw_ftpmode= "binary"
" Default values for netrw's global protocol variables {{{1
if !exists("g:netrw_dav_cmd")
let g:netrw_dav_cmd = "cadaver"
endif
if !exists("g:netrw_win95ftp")
let g:netrw_win95ftp= 1
if !exists("g:netrw_fetch_cmd")
if executable("fetch")
let g:netrw_fetch_cmd = "fetch -o"
else
let g:netrw_fetch_cmd = ""
endif
endif
if !exists("g:netrw_ftp_cmd")
let g:netrw_ftp_cmd = "ftp"
endif
if !exists("g:netrw_http_cmd")
if executable("wget")
let g:netrw_http_cmd = "wget -q -O"
elseif executable("fetch")
let g:netrw_http_cmd = "fetch -o"
else
let g:netrw_http_cmd = ""
endif
endif
if !exists("g:netrw_rcp_cmd")
let g:netrw_rcp_cmd = "rcp"
endif
if !exists("g:netrw_rsync_cmd")
let g:netrw_rsync_cmd = "rsync"
endif
if !exists("g:netrw_scp_cmd")
let g:netrw_scp_cmd = "scp -q"
endif
if !exists("g:netrw_sftp_cmd")
let g:netrw_sftp_cmd = "sftp"
endif
if !exists("g:netrw_ssh_cmd")
let g:netrw_ssh_cmd= "ssh"
endif
if has("win32") || has("win95") || has("win64") || has("win16")
\ && exists("g:netrw_use_nt_rcp")
\ && g:netrw_use_nt_rcp
\ && executable( $SystemRoot .'/system32/rcp.exe')
let s:netrw_has_nt_rcp = 1
let s:netrw_rcpmode = '-b'
else
let s:netrw_has_nt_rcp = 0
let s:netrw_rcpmode = ''
endif
" ---------------------------------------------------------------------
" Default values for netrw's global variables {{{1
" Default values - a-c ---------- {{{2
if !exists("g:netrw_alto")
let g:netrw_alto= 0
endif
if !exists("g:netrw_altv")
let g:netrw_altv= 0
endif
if !exists("g:netrw_cygwin")
if has("win32") || has("win95") || has("win64") || has("win16")
@ -51,14 +103,15 @@ if !exists("g:netrw_cygwin")
let g:netrw_cygwin= 0
endif
endif
if !exists("g:netrw_list_cmd")
if executable("ssh")
" provide a default listing command
let g:netrw_list_cmd= "ssh HOSTNAME ls -FLa"
else
" call Decho("ssh is not executable, can't do remote directory exploring with ssh")
let g:netrw_list_cmd= ""
endif
" Default values - d-f ---------- {{{2
if !exists("g:NETRW_DIRHIST_CNT")
let g:NETRW_DIRHIST_CNT= 0
endif
if !exists("g:netrw_dirhistmax")
let g:netrw_dirhistmax= 10
endif
if !exists("g:netrw_ftp_browse_reject")
let g:netrw_ftp_browse_reject='^total\s\+\d\+$\|^Trying\s\+\d\+.*$\|^KERBEROS_V\d rejected\|^Security extensions not\|No such file\|: connect to address [0-9a-fA-F:]*: No route to host$'
endif
if !exists("g:netrw_ftp_list_cmd")
if has("unix") || exists("g:netrw_cygwin")
@ -67,75 +120,96 @@ if !exists("g:netrw_ftp_list_cmd")
let g:netrw_ftp_list_cmd= "dir"
endif
endif
if !exists("g:netrw_rm_cmd")
let g:netrw_rm_cmd = "ssh HOSTNAME rm"
if !exists("g:netrw_ftpmode")
let g:netrw_ftpmode= "binary"
endif
if !exists("g:netrw_rmf_cmd")
let g:netrw_rmf_cmd = "ssh HOSTNAME rm -f"
" Default values - h-lh ---------- {{{2
if !exists("g:netrw_hide")
let g:netrw_hide= 1
endif
if !exists("g:netrw_rmdir_cmd")
let g:netrw_rmdir_cmd = "ssh HOSTNAME rmdir"
if !exists("g:netrw_keepdir")
let g:netrw_keepdir= 1
endif
if !exists("g:netrw_list_cmd")
if executable(g:netrw_ssh_cmd)
" provide a default listing command
let g:netrw_list_cmd= g:netrw_ssh_cmd." HOSTNAME ls -FLa"
else
" call Decho(g:netrw_ssh_cmd." is not executable, can't do remote directory exploring)
let g:netrw_list_cmd= ""
endif
endif
if !exists("g:netrw_list_hide")
let g:netrw_list_hide= ""
endif
" Default values - lh-lz ---------- {{{2
if !exists("g:netrw_local_mkdir")
let g:netrw_local_mkdir= "mkdir"
endif
if !exists("g:netrw_local_rmdir")
let g:netrw_local_rmdir= "rmdir"
endif
if !exists("g:netrw_longlist")
let g:netrw_longlist= 0
endif
if g:netrw_longlist < 0 || g:netrw_longlist > 2
" sanity check
let g:netrw_longlist= 0
endif
if g:netrw_longlist == 1
let g:netrw_list_cmd= g:netrw_list_cmd." -l"
endif
" Default values - m-r ---------- {{{2
if !exists("g:netrw_maxfilenamelen")
let g:netrw_maxfilenamelen= 32
endif
if !exists("g:netrw_mkdir_cmd")
let g:netrw_mkdir_cmd= g:netrw_ssh_cmd." HOSTNAME mkdir"
endif
if !exists("g:netrw_rename_cmd")
let g:netrw_rename_cmd= "ssh HOSTNAME mv"
let g:netrw_rename_cmd= g:netrw_ssh_cmd." HOSTNAME mv"
endif
if !exists("g:netrw_rm_cmd")
let g:netrw_rm_cmd = g:netrw_ssh_cmd." HOSTNAME rm"
endif
if !exists("g:netrw_rmdir_cmd")
let g:netrw_rmdir_cmd = g:netrw_ssh_cmd." HOSTNAME rmdir"
endif
if !exists("g:netrw_rmf_cmd")
let g:netrw_rmf_cmd = g:netrw_ssh_cmd." HOSTNAME rm -f"
endif
" Default values - s ---------- {{{2
if exists("g:netrw_silent") && g:netrw_silent != 0
let g:netrw_silentxfer= "silent "
else
let g:netrw_silentxfer= ""
endif
if !exists("g:netrw_winsize")
let g:netrw_winsize= ""
endif
if !exists("g:netrw_list_hide")
let g:netrw_list_hide= ""
endif
if !exists("g:netrw_sort_by")
" alternatives: date size
let g:netrw_sort_by= "name"
endif
if !exists("g:netrw_sort_sequence")
let g:netrw_sort_sequence= '[\/]$,*,\.bak$,\.o$,\.h$,\.info$,\.swp$,\.obj$'
endif
if !exists("g:netrw_sort_direction")
" alternative: reverse (z y x ...)
let g:netrw_sort_direction= "normal"
endif
if !exists("g:netrw_longlist")
let g:netrw_longlist= 0
endif
if g:netrw_longlist == 0 || g:netrw_longlist == 2
let g:netrw_list_cmd= "ssh HOSTNAME ls -FLa"
else
let g:netrw_longlist= 1
let g:netrw_list_cmd= "ssh HOSTNAME ls -FLa -l"
endif
if !exists("g:netrw_list_cmd")
endif
if !exists("g:netrw_timefmt")
let g:netrw_timefmt= "%c"
endif
if !exists("g:netrw_local_rmdir")
let g:netrw_local_rmdir= "rmdir"
endif
if !exists("g:netrw_local_mkdir")
let g:netrw_local_mkdir= "mkdir"
endif
if !exists("g:netrw_mkdir_cmd")
let g:netrw_mkdir_cmd= "ssh HOSTNAME mkdir"
endif
if !exists("g:netrw_hide")
let g:netrw_hide= 1
endif
if !exists("g:netrw_ftp_browse_reject")
let g:netrw_ftp_browse_reject='^total\s\+\d\+$\|^Trying\s\+\d\+.*$\|^KERBEROS_V\d rejected\|^Security extensions not\|No such file\|: connect to address [0-9a-fA-F:]*: No route to host$'
if !exists("g:netrw_sort_sequence")
let g:netrw_sort_sequence= '[\/]$,*,\.bak$,\.o$,\.h$,\.info$,\.swp$,\.obj$'
endif
if !exists("g:netrw_ssh_browse_reject")
let g:netrw_ssh_browse_reject='^total\s\+\d\+$'
endif
if !exists("g:netrw_keepdir")
let g:netrw_keepdir= 1
" Default values - t-w ---------- {{{2
if !exists("g:netrw_timefmt")
let g:netrw_timefmt= "%c"
endif
if !exists("g:netrw_win95ftp")
let g:netrw_win95ftp= 1
endif
if !exists("g:netrw_winsize")
let g:netrw_winsize= ""
endif
" ---------------------------------------------------------------------
" Default values for netrw's script variables: {{{1
if !exists("s:netrw_cd_escape")
if has("win32") || has("win95") || has("win64") || has("win16")
let s:netrw_cd_escape="#% "
@ -150,75 +224,12 @@ if !exists("s:netrw_glob_escape")
let s:netrw_glob_escape= '[]*?`{~$'
endif
endif
if !exists("g:netrw_alto")
let g:netrw_alto= 0
endif
if !exists("g:netrw_altv")
let g:netrw_altv= 0
endif
if !exists("g:netrw_maxfilenamelen")
let g:netrw_maxfilenamelen= 32
endif
if !exists("g:netrw_dirhistmax")
let g:netrw_dirhistmax= 10
endif
if !exists("g:NETRW_DIRHIST_CNT")
let g:NETRW_DIRHIST_CNT= 0
endif
" BufEnter event ignored by decho when following variable is true
" Has a side effect that doau BufReadPost doesn't work, so
" files read by network transfer aren't appropriately highlighted.
"let g:decho_bufenter = 1 "Decho
" ---------------------------------------------------------------------
" Default values for global protocol variables {{{1
if !exists("g:netrw_rcp_cmd")
let g:netrw_rcp_cmd = "rcp"
endif
if !exists("g:netrw_ftp_cmd")
let g:netrw_ftp_cmd = "ftp"
endif
if !exists("g:netrw_scp_cmd")
let g:netrw_scp_cmd = "scp -q"
endif
if !exists("g:netrw_sftp_cmd")
let g:netrw_sftp_cmd = "sftp"
endif
if !exists("g:netrw_http_cmd")
if executable("wget")
let g:netrw_http_cmd = "wget -q -O"
elseif executable("fetch")
let g:netrw_http_cmd = "fetch -o"
else
let g:netrw_http_cmd = ""
endif
endif
if !exists("g:netrw_dav_cmd")
let g:netrw_dav_cmd = "cadaver"
endif
if !exists("g:netrw_rsync_cmd")
let g:netrw_rsync_cmd = "rsync"
endif
if !exists("g:netrw_fetch_cmd")
if executable("fetch")
let g:netrw_fetch_cmd = "fetch -o"
else
let g:netrw_fetch_cmd = ""
endif
endif
if has("win32") || has("win95") || has("win64") || has("win16")
\ && exists("g:netrw_use_nt_rcp")
\ && g:netrw_use_nt_rcp
\ && executable( $SystemRoot .'/system32/rcp.exe')
let s:netrw_has_nt_rcp = 1
let s:netrw_rcpmode = '-b'
else
let s:netrw_has_nt_rcp = 0
let s:netrw_rcpmode = ''
endif
" ------------------------------------------------------------------------
" NetSavePosn: saves position of cursor on screen {{{1
fun! netrw#NetSavePosn()
@ -435,7 +446,7 @@ fun! netrw#NetRead(...)
let &debug= debugkeep
endif
bd!
let result = s:NetGetFile(readcmd, tmpfile, b:netrw_method)
let result = s:NetGetFile(readcmd, tmpfile, b:netrw_method)
let b:netrw_lastfile = choice
".........................................
@ -507,7 +518,7 @@ fun! netrw#NetRead(...)
" call Decho("executing: !".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".tmpfile)
exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".tmpfile
endif
let result = s:NetGetFile(readcmd, tmpfile, b:netrw_method)
let result = s:NetGetFile(readcmd, tmpfile, b:netrw_method)
let b:netrw_lastfile = choice
".........................................
@ -656,6 +667,10 @@ endfun
fun! s:NetGetFile(readcmd, fname, method)
" call Dfunc("NetGetFile(readcmd<".a:readcmd.">,fname<".a:fname."> method<".a:method.">)")
" record remote filename
let rfile= bufname("%")
" call Decho("rfile<".rfile.">")
if exists("*NetReadFixup")
" for the use of NetReadFixup (not otherwise used internally)
let line2= line("$")
@ -678,9 +693,6 @@ fun! s:NetGetFile(readcmd, fname, method)
if a:readcmd[0] == '0'
" get file into buffer
" record remote filename
let rfile= bufname(".")
" call Decho("remotefile<".rfile.">")
" call Dredir("ls!","starting buffer list")
" rename the current buffer to the temp file (ie. fname)
@ -1064,7 +1076,7 @@ fun! s:NetBrowse(dirname)
endif
elseif !exists("g:netrw_list_cmd") || g:netrw_list_cmd == ''
if !exists("g:netrw_quiet")
echohl Error | echo "***netrw*** this system doesn't support remote directory listing via ssh" | echohl None
echohl Error | echo "***netrw*** this system doesn't support remote directory listing via ".g:netrw_list_cmd | echohl None
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
endif
@ -1540,6 +1552,9 @@ fun! s:NetBrowseRm(usrhost,path) range
let ok= input("Confirm deletion of file<".rmfile."> ","[{y(es)},n(o),a(ll),q(uit)] ")
call inputrestore()
echohl NONE
if ok == ""
let ok="no"
endif
let ok= substitute(ok,'\[{y(es)},n(o),a(ll),q(uit)]\s*','','e')
if ok =~ 'a\%[ll]'
let all= 1
@ -1566,6 +1581,9 @@ fun! s:NetBrowseRm(usrhost,path) range
call inputsave()
let ok= input("Confirm deletion of directory<".rmfile."> ","[{y(es)},n(o),a(ll),q(uit)] ")
call inputrestore()
if ok == ""
let ok="no"
endif
let ok= substitute(ok,'\[{y(es)},n(o),a(ll),q(uit)]\s*','','e')
if ok =~ 'a\%[ll]'
let all= 1
@ -1722,7 +1740,7 @@ fun! s:NetBrowseX(fname,remote)
exe "w! ".fname
q
endif
" call Decho("exten<".exten."> "."NetrwFileHandler_".exten."():exists=".exists("*NetrwFileHandler_".exten))
" call Decho("exten<".exten."> "."netrwFileHandlers#NFH_".exten."():exists=".exists("*netrwFileHandlers#NFH_".exten))
" set up redirection
if &srr =~ "%s"
@ -1738,19 +1756,22 @@ fun! s:NetBrowseX(fname,remote)
exe 'silent !start rundll32 url.dll,FileProtocolHandler "'.escape(fname, '%#').'"'
let ret= v:shell_error
elseif has("unix") && executable("kfmclient")
" call Decho("exe silent !kfmclient exec '".escape(fname,'%#')."' ".redir)
exe "silent !kfmclient exec '".escape(fname,'%#')."' ".redir
let ret= v:shell_error
elseif has("unix") && executable("gnome-open")
" call Decho("exe silent !gnome-open '".escape(fname,'%#')."' ".redir)
exe "silent !gnome-open '".escape(fname,'%#')."'".redir
let ret= v:shell_error
elseif exten != "" && exists("*NetrwFileHandler_".exten)
" call Decho("let ret= NetrwFileHandler_".exten.'("'.fname.'")')
exe "let ret= NetrwFileHandler_".exten.'("'.fname.'")'
elseif has("unix") && executable("kfmclient")
" call Decho("exe silent !kfmclient exec '".escape(fname,'%#')."' ".redir)
exe "silent !kfmclient exec '".escape(fname,'%#')."' ".redir
let ret= v:shell_error
else
call netrwFileHandlers#Init()
if exten != "" && exists("*netrwFileHandlers#NFH_".exten)
" call Decho("let ret= netrwFileHandlers#NFH_".exten.'("'.fname.'")')
exe "let ret= netrwFileHandlers#NFH_".exten.'("'.fname.'")'
endif
endif
redraw!
@ -2349,6 +2370,8 @@ fun! s:NetObtain()
".........................................
else
" scp: Method#4
let curdir = expand("%")
let path = substitute(curdir,'scp://[^/]\+/','','e')
if exists("g:netrw_port") && g:netrw_port != ""
let useport= " -P ".g:netrw_port
else
@ -2356,11 +2379,11 @@ fun! s:NetObtain()
endif
if g:netrw_cygwin == 1
let cygtmpfile=substitute(tmpfile,'^\(\a\):','/cygdrive/\1/','e')
" call Decho("executing: !".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".escape(fname,' ?&')." .")
exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".escape(fname,' ?&')." ."
" call Decho("executing: !".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".path.escape(fname,' ?&')." .")
exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".path.escape(fname,' ?&')." ."
else
" call Decho("executing: !".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".escape(fname,' ?&')." .")
exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".escape(fname,' ?&')." ."
" call Decho("executing: !".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".path.escape(fname,' ?&')." .")
exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".path.escape(fname,' ?&')." ."
endif
endif
@ -2825,7 +2848,12 @@ fun! s:LocalBrowseRm(path) range
let ok= input("Confirm deletion of file<".rmfile."> ","[{y(es)},n(o),a(ll),q(uit)] ")
call inputrestore()
echohl NONE
if ok == ""
let ok="no"
endif
" call Decho("response: ok<".ok.">")
let ok= substitute(ok,'\[{y(es)},n(o),a(ll),q(uit)]\s*','','e')
" call Decho("response: ok<".ok."> (after sub)")
if ok =~ 'a\%[ll]'
let all= 1
endif
@ -2846,6 +2874,9 @@ fun! s:LocalBrowseRm(path) range
let ok= input("Confirm deletion of directory<".rmfile."> ","[{y(es)},n(o),a(ll),q(uit)] ")
call inputrestore()
let ok= substitute(ok,'\[{y(es)},n(o),a(ll),q(uit)]\s*','','e')
if ok == ""
let ok="no"
endif
if ok =~ 'a\%[ll]'
let all= 1
endif
@ -3034,6 +3065,7 @@ fun! netrw#Explore(indx,dosplit,style,...)
" call Decho("calling NetBrowse(newdir<".newdir.">)")
call s:NetBrowse(newdir)
else
if newdir == ""|let newdir= "."|endif
" call Decho("calling LocalBrowse(newdir<".newdir.">)")
call s:LocalBrowse(newdir)
endif

View File

@ -1,4 +1,4 @@
*pi_netrw.txt* For Vim version 7.0. Last change: Sep 29, 2005
*pi_netrw.txt* For Vim version 7.0. Last change: Oct 03, 2005
VIM REFERENCE MANUAL by Charles E. Campbell, Jr.
@ -663,12 +663,13 @@ NETRW BROWSER VARIABLES *netrw-browse-var*
: connect to address [0-9a-fA-F:]*
: No route to host$'
*g:netrw_ssh_browse_reject* ssh can sometimes produce unwanted lines,
messages, banners, and whatnot that one doesn't
want masquerading as "directories" and "files".
Use this pattern to remove such embedded
messages. By default its value is:
'^total\s\+\d\+$'
*g:netrw_ftp_list_cmd* options for passing along to ftp for directory
listing. Defaults:
unix or g:netrw_cygwin set: : "ls -lF"
otherwise "dir"
*g:netrw_hide* if true, the hiding list is used
default: =0
*g:netrw_keepdir* =1 (default) keep current directory immune from
the browsing directory.
@ -683,16 +684,11 @@ NETRW BROWSER VARIABLES *netrw-browse-var*
*g:netrw_longlist* if =1, then long listing will be default
*g:netrw_ftp_list_cmd* options for passing along to ftp for directory
listing. Defaults:
unix or g:netrw_cygwin set: : "ls -lF"
otherwise "dir"
*g:netrw_list_hide* comma separated pattern list for hiding files
default: ""
*g:netrw_local_mkdir* command for making a local directory
default: "ssh HOSTNAME mkdir"
default: "mkdir"
*g:netrw_local_rmdir* remove directory command (rmdir)
default: "rmdir"
@ -716,9 +712,6 @@ NETRW BROWSER VARIABLES *netrw-browse-var*
*g:netrw_rmf_cmd* command for removing softlinks
default: "ssh HOSTNAME rm -f"
*g:netrw_hide* if true, the hiding list is used
default: =0
*g:netrw_sort_by* sort by "name", "time", or "size"
default: "name"
@ -730,6 +723,18 @@ NETRW BROWSER VARIABLES *netrw-browse-var*
default: '[\/]$,*,\.bak$,\.o$,\.h$,
\.info$,\.swp$,\.obj$'
*g:netrw_ssh_cmd* One may specify an executable command
to use instead of ssh for remote actions
such as listing, file removal, etc.
default: ssh
*g:netrw_ssh_browse_reject* ssh can sometimes produce unwanted lines,
messages, banners, and whatnot that one doesn't
want masquerading as "directories" and "files".
Use this pattern to remove such embedded
messages. By default its value is:
'^total\s\+\d\+$'
*g:netrw_timefmt* specify format string to strftime() (%c)
default: "%c"
@ -833,7 +838,7 @@ refresh a local directory by using ":e .".
GOING UP *netrw--*
To go up a directory, press - or press the <cr> when atop the ../ directory
To go up a directory, press "-" or press the <cr> when atop the ../ directory
entry in the listing.
Netrw will use the command in |g:netrw_list_cmd| to perform the directory
@ -1072,24 +1077,24 @@ handler varies:
* for Windows 32 or 64, the url and FileProtocolHandler dlls are used.
* for KDE (with kfmclient): kfmclient is used.
* for Gnome (with gnome-open): gnome-open is used.
* otherwise the NetrwFileHandler plugin is used.
* otherwise the netrwFileHandler plugin is used.
The file's suffix is used by these various approaches to determine an
appropriate application to use to "handle" these files. Such things as
OpenOffice (*.sfx), visualization (*.jpg, *.gif, etc), and PostScript (*.ps,
*.eps) can be handled.
The NetrwFileHandler applies a user-defined function to a file, based on its
The netrwFileHandler applies a user-defined function to a file, based on its
extension. Of course, the handler function must exist for it to be called!
>
Ex. mypgm.html x ->
NetrwFileHandler_html("scp://user@host/some/path/mypgm.html")
netrwFileHandler_html("scp://user@host/some/path/mypgm.html")
<
See the <plugin/NetrwFileHandlers.vim> for an example of how to handle an html
See the <plugin/netrwFileHandlers.vim> for an example of how to handle an html
file with mozilla.
One may write custom NetrwFileHandlers; please look at the
plugin/NetrwFileHandlers.vim script for examples. If its likely to be
One may write custom netrwFileHandlers; please look at the
plugin/netrwFileHandlers.vim script for examples. If its likely to be
generally useful, please feel free to forward a copy to me for future
inclusion in the distribution.
@ -1279,6 +1284,12 @@ which is loaded automatically at startup (assuming :set nocp).
==============================================================================
10. History *netrw-history*
v73: * bugfix -- scp://host/path/file was getting named incorrectly
* netrw detects use of earlier-than-7.0 version of vim and issues
a pertinent error message.
* netrwSettings.vim is now uses autoloading. Only
<netrwPlugin.vim> is needed as a pure plugin
(ie. always loaded).
v72: * bugfix -- formerly, one could prevent the loading of netrw
by "let g:loaded_netrw=1"; when autoloading became supported,
this feature was lost. It is now restored.
@ -1415,7 +1426,7 @@ which is loaded automatically at startup (assuming :set nocp).
* special file viewing with:
(windows) rundll32 url.dll (gnome) gnome-open (kde)
kfmclient If none of these are on the executable path, then
NetrwFileHandlers.vim is used.
netrwFileHandlers.vim is used.
* directory bookmarking during both local and remote browsing
implemented
* one may view all, use the hiding list to suppress, or use the

View File

@ -0,0 +1,43 @@
" Vim syntax file
" Language: trustees
" Maintainer: Nima Talebi <nima@it.net.au>
" Last Change: 2005-10-12
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
syntax case match
syntax sync minlines=0 maxlines=0
" Errors & Comments
syntax match tfsError /.*/
highlight link tfsError Error
syntax keyword tfsSpecialComment TODO XXX FIXME contained
highlight link tfsSpecialComment Todo
syntax match tfsComment ~\s*#.*~ contains=tfsSpecialComment
highlight link tfsComment Comment
" Operators & Delimiters
highlight link tfsSpecialChar Operator
syntax match tfsSpecialChar ~[*!+]~ contained
highlight link tfsDelimiter Delimiter
syntax match tfsDelimiter ~:~ contained
" Trustees Rules - Part 1 of 3 - The Device
syntax region tfsRuleDevice matchgroup=tfsDeviceContainer start=~\[/~ end=~\]~ nextgroup=tfsRulePath oneline
highlight link tfsRuleDevice Label
highlight link tfsDeviceContainer PreProc
" Trustees Rules - Part 2 of 3 - The Path
syntax match tfsRulePath ~/[-_a-zA-Z0-9/]*~ nextgroup=tfsRuleACL contained contains=tfsDelimiter
highlight link tfsRulePath String
" Trustees Rules - Part 3 of 3 - The ACLs
syntax match tfsRuleACL ~\(:\(\*\|[+]\{0,1\}[a-zA-Z0-9/]\+\):[RWEBXODCU!]\+\)\+$~ contained contains=tfsDelimiter,tfsRuleWho,tfsRuleWhat
syntax match tfsRuleWho ~\(\*\|[+]\{0,1\}[a-zA-Z0-9/]\+\)~ contained contains=tfsSpecialChar
highlight link tfsRuleWho Identifier
syntax match tfsRuleWhat ~[RWEBXODCU!]\+~ contained contains=tfsSpecialChar
highlight link tfsRuleWhat Structure