Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

updated for version 7.0003

  • Loading branch information...
commit 5c3784fc4549019655a8ab9cb858ee80120850d0 1 parent 18d8b2d
vimboss authored
Showing with 15,741 additions and 1,074 deletions.
  1. +15 −2 Filelist
  2. BIN  emx.dll
  3. BIN  emxlibcs.dll
  4. +44 −0 runtime/KVim.desktop
  5. +18 −2 runtime/doc/autocmd.txt
  6. +9 −1 runtime/doc/eval.txt
  7. +8 −8 runtime/doc/gui.txt
  8. +66 −5 runtime/doc/gui_x11.txt
  9. +8 −8 runtime/doc/options.txt
  10. +7 −1 runtime/doc/os_amiga.txt
  11. +103 −14 runtime/doc/pi_netrw.txt
  12. +6 −5 runtime/doc/repeat.txt
  13. +30 −3 runtime/doc/tags
  14. +27 −29 runtime/doc/todo.txt
  15. +4 −4 runtime/doc/usr_27.txt
  16. +24 −1 runtime/doc/version7.txt
  17. +2 −1  runtime/filetype.vim
  18. +11 −10 runtime/ftplugin/aspvbs.vim
  19. BIN  runtime/hi16-action-make.png
  20. BIN  runtime/hi22-action-make.png
  21. +9,314 −0 runtime/kde-tips
  22. BIN  runtime/kvim32x32.png
  23. BIN  runtime/kvim48x48.png
  24. BIN  runtime/kvim64x64.png
  25. +2 −2 runtime/menu.vim
  26. +26 −0 runtime/plugin/NetrwFileHandlers.vim
  27. +360 −173 runtime/plugin/netrw.vim
  28. +14 −7 runtime/syntax/netrwlist.vim
  29. +404 −242 runtime/tutor/tutor
  30. +8 −5 src/INSTALL
  31. +101 −0 src/INSTALLkde.txt
  32. +115 −4 src/Makefile
  33. +861 −466 src/auto/configure
  34. +3 −0  src/config.h.in
  35. +2 −0  src/config.mk.in
  36. +255 −3 src/configure.in
  37. +30 −0 src/edit.c
  38. +4 −0 src/eval.c
  39. +7 −1 src/ex_cmds2.c
  40. +15 −7 src/ex_docmd.c
  41. +11 −7 src/feature.h
  42. +3 −0  src/fileio.c
  43. +9 −1 src/globals.h
  44. +18 −15 src/gui.c
  45. +39 −4 src/gui.h
  46. +587 −0 src/gui_kde.cc
  47. +1,396 −0 src/gui_kde_widget.cc
  48. +234 −0 src/gui_kde_widget.h
  49. +1,307 −0 src/gui_kde_x11.cc
  50. +19 −0 src/kvim_iface.h
  51. +15 −4 src/main.c
  52. +15 −2 src/mbyte.c
  53. +5 −4 src/menu.c
  54. +1 −1  src/misc1.c
  55. +2 −2 src/misc2.c
  56. +2 −2 src/normal.c
  57. +5 −5 src/option.c
  58. +3 −3 src/option.h
  59. +27 −6 src/os_mswin.c
  60. +13 −2 src/os_unix.c
  61. +6 −0 src/os_unixx.h
  62. +5 −1 src/proto.h
  63. +19 −0 src/proto/gui_kde.pro
  64. +62 −0 src/proto/gui_kde_x11.pro
  65. +2 −0  src/proto/misc2.pro
  66. +2 −0  src/proto/os_mswin.pro
  67. +2 −2 src/screen.c
  68. +3 −0  src/structs.h
  69. +3 −3 src/ui.c
  70. +4 −0 src/version.c
  71. +2 −2 src/version.h
  72. +17 −4 src/vim.h
View
17 Filelist
@@ -130,6 +130,7 @@ SRC_UNIX = \
pixmaps/gen-inline-pixbufs.sh \
pixmaps/stock_icons.h \
src/INSTALL \
+ src/INSTALLkde.txt \
src/Makefile \
src/auto/configure \
src/config.aap.in \
@@ -146,6 +147,11 @@ SRC_UNIX = \
src/gui_gtk_f.c \
src/gui_gtk_f.h \
src/gui_gtk_x11.c \
+ src/gui_kde.cc \
+ src/gui_kde_widget.cc \
+ src/gui_kde_widget.h \
+ src/gui_kde_x11.cc \
+ src/kvim_iface.h \
src/gui_motif.c \
src/gui_x11.c \
src/hangulin.c \
@@ -164,6 +170,8 @@ SRC_UNIX = \
src/proto/gui_athena.pro \
src/proto/gui_gtk.pro \
src/proto/gui_gtk_x11.pro \
+ src/proto/gui_kde.pro \
+ src/proto/gui_kde_x11.pro \
src/proto/gui_motif.pro \
src/proto/gui_x11.pro \
src/proto/hangulin.pro \
@@ -504,6 +512,13 @@ RT_SCRIPTS = \
# Unix runtime
RT_UNIX = \
README_unix.txt \
+ runtime/KVim.desktop \
+ runtime/hi16-action-make.png \
+ runtime/hi22-action-make.png \
+ runtime/kde-tips \
+ runtime/kvim32x32.png \
+ runtime/kvim48x48.png \
+ runtime/kvim64x64.png \
runtime/vim16x16.png \
runtime/vim16x16.xpm \
runtime/vim32x32.png \
@@ -630,8 +645,6 @@ EXTRA = \
src/tee/Makefile* \
src/tee/tee.c \
csdpmi4b.zip \
- emx.dll \
- emxlibcs.dll \
# generic language files
LANG_GEN = \
View
BIN  emx.dll
Binary file not shown
View
BIN  emxlibcs.dll
Binary file not shown
View
44 runtime/KVim.desktop
@@ -0,0 +1,44 @@
+# KDE Config File
+[Desktop Entry]
+Type=Application
+Exec=kvim -f %F
+Icon=kvim
+MiniIcon=kvim
+DocPath=kvim/index.html
+Comment=
+Comment[xx]=xx
+Terminal=0
+Name=KVim
+Name[eo]=VIM-fasado
+Name[sv]=Kvim
+Name[xx]=xx
+Comment=Text Editor
+Comment[ar]=محرر نصوص
+Comment[bg]=Текст Редактор
+Comment[de]=Texteditor
+Comment[el]=Διορθωτής Κειμένου
+Comment[eo]=Tekstredaktilo
+Comment[et]=Tekstiredaktor
+Comment[eu]=Testu Editorea
+Comment[fi]=Tekstieditori
+Comment[he]=עורך טקסט
+Comment[is]=Textaritill
+Comment[ja]=テキストエディタ
+Comment[lt]=Teksto redaktorius
+Comment[mt]=Editur tat-test
+Comment[pt_BR]=Editor de Texto
+Comment[ro]=Editor de text
+Comment[ru]=редактор
+Comment[sk]=Textový editor
+Comment[sl]=Urejevalnik besedil
+Comment[ta]=¯¨Ã ¦¾¡ÌôÀ¡Ç÷
+Comment[tr]=Metin Düzenleyici
+Comment[uk]=Редактор текстів
+Comment[vi]=Trình soạn văn bản
+Comment[xx]=xx
+Comment[zh_CN]=文本编辑器
+Comment[zh_TW]=文字編輯器
+MimeType=application/mathml+xml;application/xhtml+xml;application/x-perl;application/x-python;application/x-shellscript;audio/x-mpegurl;audio/x-scpls;image/svg+xml;message/news;message/rfc822;text/calendar;text/css;text/english;text/html;text/mrml;text/plain;text/rdf;text/rss;text/rtf;text/sgml;text/vnd.wap.wml;text/x-adasrc;text/x-bibtex;text/x-chdr;text/x-c++hdr;text/x-csrc;text/x-c++src;text/x-csv;text/x-diff;text/x-java;text/x-katefilelist;text/x-latex;text/x-log;text/x-lyx;text/x-makefile;text/xmcd;text/xml;text/x-moc;text/x-mswinurl;text/x-objcsrc;text/x-pascal;text/x-perl;text/x-python;text/x-tcl;text/x-tex;text/x-vcalendar;text/x-vcard;text/x-xslfo;text/x-xslt
+X-KDE-StartupNotify=true
+X-KDE-AuthorizeAction=shell access
+
View
20 runtime/doc/autocmd.txt
@@ -1,4 +1,4 @@
-*autocmd.txt* For Vim version 7.0aa. Last change: 2004 Apr 20
+*autocmd.txt* For Vim version 7.0aa. Last change: 2004 Jun 30
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -304,7 +304,8 @@ FocusGained When Vim got input focus. Only for the GUI
*FocusLost*
FocusLost When Vim lost input focus. Only for the GUI
version and a few console versions where this
- can be detected.
+ can be detected. May also happen when a
+ dialog pops up.
*FuncUndefined*
FuncUndefined When a user function is used but it isn't
defined. Useful for defining a function only
@@ -467,6 +468,21 @@ VimLeave Before exiting Vim, just after writing the
*EncodingChanged*
EncodingChanged Fires off when the 'encoding' option is
changed. Useful to set up fonts, for example.
+ *InsertEnter*
+InsertEnter When starting Insert mode. Also for Replace
+ mode and Virtual Replace mode. The
+ |v:insertmode| variable indicates the mode.
+ Be careful not to move the cursor or do
+ anything else that the user does not expect.
+ *InsertChange*
+InsertChange When typing <Insert> while in Insert or
+ Replace mode. The |v:insertmode| variable
+ indicates the new mode.
+ Be careful not to move the cursor or do
+ anything else that the user does not expect.
+ *InsertLeave*
+InsertLeave When leaving Insert mode. Also when using
+ CTRL-O |i_CTRL-O|.
*FileEncoding*
FileEncoding Obsolete. It still works and is equivalent
to |EncodingChanged|.
View
10 runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt* For Vim version 7.0aa. Last change: 2004 Jun 22
+*eval.txt* For Vim version 7.0aa. Last change: 2004 Jun 30
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -679,6 +679,13 @@ v:foldend Used for 'foldtext': last line of closed fold.
v:foldstart Used for 'foldtext': first line of closed fold.
Read-only. |fold-foldtext|
+ *v:insertmode* *insertmode-variable*
+v:insertmode Used for the |InsertEnter| and |InsertChange| autocommand
+ events. Values:
+ i Insert mode
+ r Replace mode
+ v Virtual Replace mode
+
*v:lang* *lang-variable*
v:lang The current locale setting for messages of the runtime
environment. This allows Vim scripts to be aware of the
@@ -2765,6 +2772,7 @@ gui_athena Compiled with Athena GUI.
gui_beos Compiled with BeOS GUI.
gui_gtk Compiled with GTK+ GUI (any version).
gui_gtk2 Compiled with GTK+ 2 GUI (gui_gtk is also defined).
+gui_kde Compiled with KDE GUI |KVim|
gui_mac Compiled with Macintosh GUI.
gui_motif Compiled with Motif GUI.
gui_photon Compiled with Photon GUI.
View
16 runtime/doc/gui.txt
@@ -25,8 +25,8 @@ Other GUI documentation:
First you must make sure you actually have a version of Vim with the GUI code
included. You can check this with the ":version" command, it should include
-"+GUI_Athena", "+GUI_BeOS", "+GUI_GTK", "+GUI_Motif" or "MS-Windows ... bit
-GUI version".
+"+GUI_Athena", "+GUI_BeOS", "+GUI_GTK", "+GUI_KDE", "+GUI_Motif" or
+"MS-Windows ... bit GUI version".
How to start the GUI depends on the system used. Mostly you can run the
GUI version of Vim with:
@@ -94,8 +94,8 @@ There are a number of options which only have meaning in the GUI version of
Vim. These are 'guicursor', 'guifont', 'guipty' and 'guioptions'. They are
documented in |options.txt| with all the other options.
-If using the Motif or Athena version of the GUI (but not for the GTK+ or Win32
-version), a number of X resources are available. See |gui-resources|.
+If using the Motif or Athena version of the GUI (but not for the KDE, GTK+ or
+Win32 version), a number of X resources are available. See |gui-resources|.
Another way to set the colors for different occasions is with highlight
groups. The "Normal" group is used to set the background and foreground
@@ -479,7 +479,7 @@ a menu entry. Hit <Enter> to execute it. Hit <Esc> if you want to cancel.
This does require the |+menu| feature enabled at compile time.
*tear-off-menus*
-GTK+ and Motif support Tear-off menus. These are sort of sticky menus or
+KDE, GTK+ and Motif support Tear-off menus. These are sort of sticky menus or
pop-up menus that are present all the time. If the resizing does not work
correctly, this may be caused by using something like "Vim*geometry" in the
defaults. Use "Vim.geometry" instead.
@@ -646,8 +646,8 @@ because the item will never be selected. Use a single colon to keep it
simple.
*gui-toolbar*
-The toolbar is currently available in the Win32, Athena, Motif, GTK+ (X11) and
-Photon GUI. It should turn up in other GUIs in due course. The default
+The toolbar is currently available in the Win32, Athena, Motif, GTK+ (X11),
+KDE and Photon GUI. It should turn up in other GUIs in due course. The default
toolbar is setup in menu.vim.
The display of the toolbar is controlled by the 'guioptions' letter 'T'. You
can thus have menu & toolbar together, or either on its own, or neither.
@@ -735,7 +735,7 @@ from the main menu bar. You must then use the |:popup| or |:tearoff| command
to display it.
*popup-menu*
-In the Win32, GTK+, Motif, Athena and Photon GUI, you can define the special
+In the Win32, KDE, GTK+, Motif, Athena and Photon GUI, you can define the special
menu "PopUp". This is the menu that is displayed when the right mouse button
is pressed, if 'mousemodel' is set to popup or popup_setpos.
View
71 runtime/doc/gui_x11.txt
@@ -12,8 +12,9 @@ Vim's Graphical User Interface *gui-x11* *GUI-X11*
4. Various |gui-x11-various|
5. GTK version |gui-gtk|
6. GNOME version |gui-gnome|
-7. Compiling |gui-x11-compiling|
-8. X11 selection mechanism |x11-selection|
+7. KDE version |gui-kde|
+8. Compiling |gui-x11-compiling|
+9. X11 selection mechanism |x11-selection|
Other relevant documentation:
|gui.txt| For generic items of the GUI.
@@ -59,7 +60,7 @@ flag in 'guioptions'. |-f|.
==============================================================================
2. GUI Resources *gui-resources* *.Xdefaults*
-If using the Motif or Athena version of the GUI (not for the GTK+ or Win32
+If using the Motif or Athena version of the GUI (not for the KDE, GTK+ or Win32
version), a number of X resources are available. You should use Vim's class
"Vim" when setting these. They are as follows:
@@ -434,7 +435,61 @@ the WM to identify the window by restoring the window role (using the |--role|
command line argument).
==============================================================================
-7. Compiling *gui-x11-compiling*
+7. KDE version *gui-kde* *KDE* *KVim*
+
+The KDE version of Vim works with KDE 2.x and KDE 3.x.
+KVim (name code for gui-kde) does not use traditional X settings for its
+configuration.
+Most important difference is the font handling, KVim uses QFont to display the
+text. To set your font use the following syntax :
+>
+ :set guifont=Fixed\ [Misc]/10/-1/5/50/0/0/0/1/0
+<
+the '10' value is the font size, other settings concerns more specific Qt
+options which you should not need to care with.
+The suggested way to choose your font is through the font selection dialog
+available with the command :
+ :set guifont=*
+
+Note: X Font names are not supported any more, so if you use GVim too, you'll
+have to set something like this in your ~/.gvimrc : >
+
+ if has("gui_kde")
+ :set guifont=Fixed\ [Misc]/10/-1/5/50/0/0/0/1/0
+ else if has("gui_gtk")
+ :set guifont=-misc-fixed-medium-r-normal-*-*-100-*-*-c-*-iso10646-1
+ endif
+<
+ *antialias*
+KVim uses antialias for its font, so that the text looks better, to disable
+this you have to refer to Qt's documentation (export QT_XFT=0 for QT 2.x).
+
+KDE provides some other features, like being able to move the menubar and the
+toolbar wherever you want around the text area.
+
+ *kde-toolbar*
+KVim can be used with a KDE-look toolbar instead of Vim's default toolbar. To
+enable this feature you have to run the configure script with the
+--enable-kde-toolbar switch. It may be moved to a runtime option in the
+future.
+
+ *DCOP*
+Since Vim 6.0, the new ClientServer feature has been added, it works fine in
+KVim too. KVim also provides its own communication scheme based on DCOP. This
+is mainly used by the |vimpart| but can freely be used by other applications
+or manually through KDE's DCOP tools. The DCOP servername is synchronized with
+the X11 servername so that it's easier to identify the same KVim through the
+two communication systems.
+
+ *vimpart* *vim-kpart*
+KVim developers are also working on a component to allow embedding of Vim into
+KDE's applications. As of this writing, the component is working and can be
+used in different KDE applications. New KDE applications should support it
+soon. To get more information about this component, refer to
+http://freehackers.org/kvim or to the KDE project.
+
+==============================================================================
+8. Compiling *gui-x11-compiling*
If using X11, Vim's Makefile will by default first try to find the necessary
GTK+ files on your system. If the GTK+ files cannot be found, then the Motif
@@ -489,6 +544,12 @@ menus look a bit better. Edit the Makefile and look for "XAW_LIB". The
scrollbars will remain the same, because Vim has its own, which are already
3D (in fact, they look more like Motif).
+ *gui-x11-kde*
+For Vim-KDE, you need at least Qt(>=2.x) and the corresponding kdelibs.
+To compile, you must use the --with-qt-dir configure flag because QTDIR is not
+automatically detected yet. Giving KDE's directories to the configure script
+may also help in some cases.
+
*gui-x11-neXtaw*
The neXtaw version is mostly like Athena, but uses different widgets.
@@ -499,7 +560,7 @@ X11R5 with a library for X11R6 probably doesn't work (although the linking
won't give an error message, Vim will crash later).
==============================================================================
-8. X11 selection mechanism *x11-selection*
+9. X11 selection mechanism *x11-selection*
If using X11, in either the GUI or an xterm with an X11-aware Vim, then Vim
provides varied access to the X11 selection and clipboard. These are accessed
View
16 runtime/doc/options.txt
@@ -1,4 +1,4 @@
-*options.txt* For Vim version 7.0aa. Last change: 2004 Jun 21
+*options.txt* For Vim version 7.0aa. Last change: 2004 Jun 28
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -468,10 +468,10 @@ short for "example:").
*modeline-local*
The options are set like with ":setlocal": The new value only applies to the
-buffer that contains the window. Although it's possible to set global options
-from a modeline, this is unusual. If you have two windows open and the files
-in it set the same global option to a different value, the result depends on
-which one was opened last.
+buffer and window that contain the file. Although it's possible to set global
+options from a modeline, this is unusual. If you have two windows open and
+the files in it set the same global option to a different value, the result
+depends on which one was opened last.
*modeline-version*
If the modeline is only to be used for some versions of Vim, the version
@@ -5436,7 +5436,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|shift-left-right|.
What gets inserted (a Tab or spaces) depends on the 'expandtab'
option. Also see |ins-expandtab|. When 'expandtab' is not set, the
- number of spaces minimized by using <Tab>s.
+ number of spaces is minimized by using <Tab>s.
NOTE: This option is reset when 'compatible' is set.
*'softtabstop'* *'sts'*
@@ -5480,9 +5480,9 @@ A jump table for the options with a short description can be found at |Q_op|.
global
{not in Vi}
When "on" the commands listed below move the cursor to the first
- blank of the line. When off the cursor is kept in the same column
+ non-blank of the line. When off the cursor is kept in the same column
(if possible). This applies to the commands: CTRL-D, CTRL-U, CTRL-B,
- CTRL-F, "G", "H", "M", "L", , and to the commands "d", "<<" and ">>"
+ CTRL-F, "G", "H", "M", "L", gg, and to the commands "d", "<<" and ">>"
with a linewise operator, with "%" with a count and to buffer changing
commands (CTRL-^, :bnext, :bNext, etc.). Also for an Ex command that
only has a line number, e.g., ":25" or ":+".
View
8 runtime/doc/os_amiga.txt
@@ -1,4 +1,4 @@
-*os_amiga.txt* For Vim version 7.0aa. Last change: 2004 Apr 25
+*os_amiga.txt* For Vim version 7.0aa. Last change: 2004 Jun 28
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -30,6 +30,12 @@ the |+digraphs| feature. If you want to use Vim with other terminals you can
recompile with the TERMCAP option. Vim compiles with Manx 5.x and SAS 6.x.
See the makefiles and feature.h.
+If you notice Vim crashes on some files when syntax highlighting is on, or
+when using a search pattern with nested wildcards, it might be that the stack
+is too small. Try increasing the stack size. In a shell use the Stack
+command before launching Vim. On the Workbench, select the Vim icon, use the
+workbench "Info" menu and change the Stack field in the form.
+
If you want to use different colors set the termcap codes:
t_mr (for inverted text)
t_md (for bold text)
View
117 runtime/doc/pi_netrw.txt
@@ -1,4 +1,4 @@
-*pi_netrw.txt* For Vim version 6.2. Last change: Jun 15, 2004
+*pi_netrw.txt For Vim version 6.2. Last change: Jun 25, 2004
VIM REFERENCE MANUAL by Charles E. Campbell, Jr.
@@ -16,7 +16,7 @@
4. Transparent File Transfer...........................|netrw-transparent|
5. Ex Commands.........................................|netrw-ex|
6. Variables and Options...............................|netrw-var|
-7. Remote Directory Listing............................|netrw-dir|
+7. Remote Directory Browser............................|netrw-browse|
8. Debugging...........................................|netrw-debug|
9. History.............................................|netrw-history|
10. Credits.............................................|netrw-credits|
@@ -493,28 +493,116 @@ from <netrw.vim> itself:
>
==============================================================================
-7. Remote Directory Listing *netrw-dir* *netrw-list*
+7. Remote Directory Browser *netrw-browse* *netrw-dir* *netrw-list*
+>
+ ------- -----------
+ Command Explanation
+ ------- -----------
+ <cr> Netrw will enter the directory or read the file
+ <del> Netrw will attempt to remove the file/directory
+ D Netrw will attempt to remove the file(s)/directory(ies)
+ R Netrw will attempt to rename the file(s)/directory(ies)
+ - Makes Netrw go up one directory
+ a Show all of a directory (temporarily ignore g:netrw_list_hide)
+ o Enter the file/directory under the cursor in a new browser
+ window. A horizontal split is used.
+ v Enter the file/directory under the cursor in a new browser
+ window. A vertical split is used.
+ x Apply a function to a file.
+ <c-l> Causes Netrw to refresh the directory listing
+ ? Causes Netrw to issue help
+<
+ *netrw-browse-var*
+>
+ --- -----------
+ Var Explanation
+ --- -----------
+ g:netrw_list_cmd supports listing
+ g:netrw_rm_cmd supports removing files
+ g:netrw_rmf_cmd supports removing softlinks to directories
+ g:netrw_rmdir_cmd supports removing directories
+ g:netrw_winsize specify initial size of new o/v windows
+ g:netrw_list_hide comma separated list of patterns for
+ hiding files
+<
+Netrw supports the browsing of directories on remote hosts, including
+generating listing directories, entering directories, editing files
+therein, deleting files/directories, and moving (renaming) files and
+directories.
-Netrw supports listing (browsing) directories on remote hosts; simply attempt
-to read a "file" with a trailing slash and it will be interpreted as a
-request to browse a directory:
+To enter the netrw directory browser, simply attempt to read a "file" with a
+trailing slash and it will be interpreted as a request to list a directory:
vim [protocol]://[user@]hostname/path/
-Netrw will modify the command in g:netrw_list to perform the directory listing
-operation. By default the command is:
+Netrw will modify the command in g:netrw_list_cmd to perform the directory
+listing operation. By default the command is:
- ssh HOSTNAME ls -Fa
+ ssh HOSTNAME ls -FLa
-where the HOSTNAME becomes the hostname as requested by the attempted
-read. Naturally, the user may override this command with whatever is
+where the HOSTNAME becomes the [user@]hostname as requested by the attempt
+to read. Naturally, the user may override this command with whatever is
preferred. The NetList function which implements remote directory
browsing expects that directories will be flagged by a trailing slash.
Browsing is simple: move the cursor onto a file or directory of interest.
-Hitting the <cr> (the return key) will select the file or directory. Directories
-will themselves be listed, and files will be opened using the protocol given
-in the original read request.
+Hitting the <cr> (the return key) will select the file or directory.
+Directories will themselves be listed, and files will be opened using the
+protocol given in the original read request.
+
+ *netrw-delete* *netrw-remove*
+
+Deleting/removing files and directories involves moving the cursor to the
+file/directory to be deleted and pressing "D". Directories must be empty
+first before they can be successfully removed. If the directory is a softlink
+to a directory, then netrw will make two requests to remove the directory
+before succeeding. Netrw will ask for confirmation before doing the
+removal(s). You may select a range of lines with the "V" command (visual
+selection), and then pressing "D".
+
+The g:netrw_rm_cmd, g:netrw_rmf_cmd, and g:netrw_rmdir_cmd variables are
+used to control the attempts to remove files and directories. The
+g:netrw_rm_cmd is used with files, and its default value is:
+
+ g:netrw_rm_cmd: ssh HOSTNAME rm
+
+The g:netrw_rmdir_cmd is used with directories. Its default value is:
+
+ g:netrw_rmdir_cmd: ssh HOSTNAME rmdir
+
+If removing a directory fails with g:netrw_rmdir_cmd, netrw then will attempt
+to remove it again using the g:netrw_rmf_cmd. Its default value is:
+
+ g:netrw_rmf_cmd: ssh HOSTNAME rm -f
+
+ *netrw-x*
+
+The Netrw executor 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")
+<
+See the <NetrwFileHandlers.vim>
+
+ *netrw-move* *netrw-rename*
+
+Renaming/moving files and directories involves moving the cursor to the
+file/directory to be moved (renamed) and pressing "R". You will then be
+queried for where you want the file/directory to be moved. You may select a
+range of lines with the "V" command (visual selection), and then pressing "R".
+
+The g:netrw_rename_cmd is used to implement renaming. By default its
+value is:
+
+ ssh HOSTNAME mv
+
+ *netrw-list-hack*
+For Linux/Unix systems, I suggest looking into
+
+ http://hacks.oreilly.com/pub/h/66
+
+It gives a tip for setting up password-less use of ssh and scp, and discusses
+the associated security issues.
==============================================================================
@@ -551,6 +639,7 @@ which is loaded automatically at startup (assuming :set nocp).
==============================================================================
9. History *netrw-history*
+ v47: *
v46: * now handles remote directory browsing
* g:netrw_silent (if 1) will cause all transfers to be silent'd
v45: * made the [user@]hostname:path form a bit more restrictive
View
11 runtime/doc/repeat.txt
@@ -483,13 +483,14 @@ if the pattern starts with "^" and ends in "$"). A "*" matches any sequence
of characters. 'ignorecase' is not used, but "\c" can be used in the pattern
to ignore case |/\c|. Don't include the () for the function name!
-The match for sourced scripts is done against the full file name. Examples: >
- breakadd file explorer
-won't match, the path is missing. >
+The match for sourced scripts is done against the full file name. If no path
+is specified the current directory is used. Examples: >
+ breakadd file explorer.vim
+matches "explorer.vim" in the current directory. >
breakadd file *explorer.vim
-matches ".../plugin/explorer.vim" and ".../plugin/iexplorer.vim". >
+matches ".../plugin/explorer.vim", ".../plugin/iexplorer.vim", etc. >
breakadd file */explorer.vim
-matches ".../plugin/explorer.vim" only.
+matches ".../plugin/explorer.vim" and "explorer.vim" in any other directory.
The match for functions is done against the name as it's shown in the output
of ":function". For local functions this means that something like "<SNR>99_"
View
33 runtime/doc/tags
@@ -2874,6 +2874,7 @@ CursorHold autocmd.txt /*CursorHold*
CursorHold-example windows.txt /*CursorHold-example*
CursorIM mbyte.txt /*CursorIM*
D change.txt /*D*
+DCOP gui_x11.txt /*DCOP*
DOS os_dos.txt /*DOS*
DOS-format editing.txt /*DOS-format*
DOS-format-write editing.txt /*DOS-format-write*
@@ -3583,9 +3584,14 @@ IM-server mbyte.txt /*IM-server*
IME mbyte.txt /*IME*
Insert insert.txt /*Insert*
Insert-mode insert.txt /*Insert-mode*
+InsertChange autocmd.txt /*InsertChange*
+InsertEnter autocmd.txt /*InsertEnter*
+InsertLeave autocmd.txt /*InsertLeave*
J change.txt /*J*
Japanese mbyte.txt /*Japanese*
K various.txt /*K*
+KDE gui_x11.txt /*KDE*
+KVim gui_x11.txt /*KVim*
Korean mbyte.txt /*Korean*
L motion.txt /*L*
Linux-backspace options.txt /*Linux-backspace*
@@ -3634,6 +3640,7 @@ Operator-pending intro.txt /*Operator-pending*
Operator-pending-mode intro.txt /*Operator-pending-mode*
OverTheSpot mbyte.txt /*OverTheSpot*
P change.txt /*P*
+PATHEXT eval.txt /*PATHEXT*
Pattern pattern.txt /*Pattern*
Perl if_perl.txt /*Perl*
Posix intro.txt /*Posix*
@@ -3908,6 +3915,7 @@ alternate-file editing.txt /*alternate-file*
amiga-window starting.txt /*amiga-window*
ant-syntax syntax.txt /*ant-syntax*
ant.vim syntax.txt /*ant.vim*
+antialias gui_x11.txt /*antialias*
ap motion.txt /*ap*
apache-syntax syntax.txt /*apache-syntax*
apache.vim syntax.txt /*apache.vim*
@@ -4213,6 +4221,7 @@ cpo-C options.txt /*cpo-C*
cpo-D options.txt /*cpo-D*
cpo-E options.txt /*cpo-E*
cpo-F options.txt /*cpo-F*
+cpo-I options.txt /*cpo-I*
cpo-J options.txt /*cpo-J*
cpo-K options.txt /*cpo-K*
cpo-L options.txt /*cpo-L*
@@ -4780,6 +4789,7 @@ gui-gtk gui_x11.txt /*gui-gtk*
gui-gtk-socketid gui_x11.txt /*gui-gtk-socketid*
gui-horiz-scroll gui.txt /*gui-horiz-scroll*
gui-init gui.txt /*gui-init*
+gui-kde gui_x11.txt /*gui-kde*
gui-mouse gui.txt /*gui-mouse*
gui-mouse-focus gui.txt /*gui-mouse-focus*
gui-mouse-mapping gui.txt /*gui-mouse-mapping*
@@ -4811,6 +4821,7 @@ gui-x11 gui_x11.txt /*gui-x11*
gui-x11-athena gui_x11.txt /*gui-x11-athena*
gui-x11-compiling gui_x11.txt /*gui-x11-compiling*
gui-x11-gtk gui_x11.txt /*gui-x11-gtk*
+gui-x11-kde gui_x11.txt /*gui-x11-kde*
gui-x11-misc gui_x11.txt /*gui-x11-misc*
gui-x11-motif gui_x11.txt /*gui-x11-motif*
gui-x11-neXtaw gui_x11.txt /*gui-x11-neXtaw*
@@ -4830,6 +4841,8 @@ gvim starting.txt /*gvim*
gvimdiff diff.txt /*gvimdiff*
gvimrc gui.txt /*gvimrc*
gw change.txt /*gw*
+gwgw change.txt /*gwgw*
+gww change.txt /*gww*
gzip pi_gzip.txt /*gzip*
gzip-autocmd pi_gzip.txt /*gzip-autocmd*
gzip-example autocmd.txt /*gzip-example*
@@ -5097,6 +5110,7 @@ insert_expand insert.txt /*insert_expand*
inserting insert.txt /*inserting*
inserting-ex insert.txt /*inserting-ex*
inserting-file insert.txt /*inserting-file*
+insertmode-variable eval.txt /*insertmode-variable*
install usr_90.txt /*install*
install-home usr_90.txt /*install-home*
install-registry gui_w32.txt /*install-registry*
@@ -5125,6 +5139,7 @@ jumplist motion.txt /*jumplist*
jumpto-diffs diff.txt /*jumpto-diffs*
k motion.txt /*k*
kcc uganda.txt /*kcc*
+kde-toolbar gui_x11.txt /*kde-toolbar*
key-codes intro.txt /*key-codes*
key-codes-changed version4.txt /*key-codes-changed*
key-mapping map.txt /*key-mapping*
@@ -5360,23 +5375,32 @@ netbeans-support netbeans.txt /*netbeans-support*
netbeans.txt netbeans.txt /*netbeans.txt*
netrw pi_netrw.txt /*netrw*
netrw-activate pi_netrw.txt /*netrw-activate*
+netrw-browse pi_netrw.txt /*netrw-browse*
+netrw-browse-var pi_netrw.txt /*netrw-browse-var*
netrw-contents pi_netrw.txt /*netrw-contents*
netrw-credits pi_netrw.txt /*netrw-credits*
netrw-debug pi_netrw.txt /*netrw-debug*
+netrw-delete pi_netrw.txt /*netrw-delete*
+netrw-dir pi_netrw.txt /*netrw-dir*
netrw-ex pi_netrw.txt /*netrw-ex*
netrw-file pi_netrw.txt /*netrw-file*
netrw-fixup pi_netrw.txt /*netrw-fixup*
+netrw-history pi_netrw.txt /*netrw-history*
+netrw-list pi_netrw.txt /*netrw-list*
+netrw-list-hack pi_netrw.txt /*netrw-list-hack*
+netrw-move pi_netrw.txt /*netrw-move*
netrw-netrc pi_netrw.txt /*netrw-netrc*
-netrw-new pi_netrw.txt /*netrw-new*
-netrw-newstuff pi_netrw.txt /*netrw-newstuff*
netrw-options pi_netrw.txt /*netrw-options*
netrw-passwd pi_netrw.txt /*netrw-passwd*
netrw-protocol pi_netrw.txt /*netrw-protocol*
netrw-ref pi_netrw.txt /*netrw-ref*
+netrw-remove pi_netrw.txt /*netrw-remove*
+netrw-rename pi_netrw.txt /*netrw-rename*
netrw-transparent pi_netrw.txt /*netrw-transparent*
netrw-uidpass pi_netrw.txt /*netrw-uidpass*
netrw-urls pi_netrw.txt /*netrw-urls*
netrw-var pi_netrw.txt /*netrw-var*
+netrw-x pi_netrw.txt /*netrw-x*
netrw-xfer pi_netrw.txt /*netrw-xfer*
netrw.vim pi_netrw.txt /*netrw.vim*
netterm-mouse options.txt /*netterm-mouse*
@@ -5545,7 +5569,6 @@ phtml-syntax syntax.txt /*phtml-syntax*
phtml.vim syntax.txt /*phtml.vim*
pi_expl.txt pi_expl.txt /*pi_expl.txt*
pi_gzip.txt pi_gzip.txt /*pi_gzip.txt*
-pi_netrw.txt pi_netrw.txt /*pi_netrw.txt*
pi_spec.txt pi_spec.txt /*pi_spec.txt*
plugin usr_05.txt /*plugin*
plugin-details filetype.txt /*plugin-details*
@@ -6265,6 +6288,7 @@ v:folddashes eval.txt /*v:folddashes*
v:foldend eval.txt /*v:foldend*
v:foldlevel eval.txt /*v:foldlevel*
v:foldstart eval.txt /*v:foldstart*
+v:insertmode eval.txt /*v:insertmode*
v:lang eval.txt /*v:lang*
v:lc_time eval.txt /*v:lc_time*
v:lnum eval.txt /*v:lnum*
@@ -6348,6 +6372,7 @@ v_g_CTRL-] tagsrch.txt /*v_g_CTRL-]*
v_gf editing.txt /*v_gf*
v_gq change.txt /*v_gq*
v_gv visual.txt /*v_gv*
+v_gw change.txt /*v_gw*
v_i motion.txt /*v_i*
v_i( motion.txt /*v_i(*
v_i) motion.txt /*v_i)*
@@ -6409,6 +6434,7 @@ vim-announce intro.txt /*vim-announce*
vim-arguments starting.txt /*vim-arguments*
vim-default-editor gui_w32.txt /*vim-default-editor*
vim-dev intro.txt /*vim-dev*
+vim-kpart gui_x11.txt /*vim-kpart*
vim-mac intro.txt /*vim-mac*
vim-modes intro.txt /*vim-modes*
vim-modes-intro intro.txt /*vim-modes-intro*
@@ -6429,6 +6455,7 @@ viminfo-file-marks starting.txt /*viminfo-file-marks*
viminfo-file-name starting.txt /*viminfo-file-name*
viminfo-read starting.txt /*viminfo-read*
viminfo-write starting.txt /*viminfo-write*
+vimpart gui_x11.txt /*vimpart*
vimrc starting.txt /*vimrc*
vimrc-filetype usr_05.txt /*vimrc-filetype*
vimrc-intro usr_05.txt /*vimrc-intro*
View
56 runtime/doc/todo.txt
@@ -1,4 +1,4 @@
-*todo.txt* For Vim version 7.0aa. Last change: 2004 Jun 24
+*todo.txt* For Vim version 7.0aa. Last change: 2004 Jun 30
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -30,35 +30,8 @@ be worked on, but only if you sponsor Vim development. See |sponsor|.
*known-bugs*
-------------------- Known bugs and current work -----------------------
-Change for fsync() error in Vim 6 as patch?
-
For version 7.0:
- Include many PATCHES:
- 9 Merge in ideas from tutor.txt (Gabriel Zachmann)
- New version 2004 June 16.
- 8 ":winpos" doesn't work. Patch from Vipin Aravind.
- 8 Add GTK 2.3 file dialog support. Patch by Grahame Bowland, 2004 Mar 15,
- but it doesn't use "initdir" or "dflt". (will update patch)
- 8 On Sinix SYS_NMLN isn't defined. Include patch from Cristiano De
- Michele. He no longer has such a machine.
- 8 Add file locking. Lock a file when starting to edit it with flock() or
- fcntl(). This patch has advisory file locking while reading/writing
- the file: ~/vim/patches/kahn_file_locking .
- Do we still want this? Andy doesn't have time to work on it.
- 8 Add buffer-local autocommands? Reduces overhead for autocommands that
- trigger often (inserting a character, switching mode).
- :au Event <buffer> do-something
- E.g.:
- :au BufEnter <buffer> menu enable ...
- :au BufLeave <buffer> menu disable ...
- Patch from Yakov Lerner, including test (2004 Jan 7).
- He'll send updated patch.
- Autocommands:
- VimResized - When the Vim window has been resized (SIGWINCH)
- patch from Yakov Lerner, 2003 July 24.
- He'll write documentation and send updated patch.
- InsmodEnter
- InsmodLeave Taro Muraoka, 2004 Jun 16
- Include the kvim patch. http://freenux.org/vim/ (Mickael Marchand)
Do not add Qtopia yet, it doesn't work very well.
update from Mickael 2004 Jun 20.
@@ -130,6 +103,20 @@ For version 7.0:
'isfname'. E.g. ":set flipcase=a-zA-Z,xX,23-33:143-153". The colon to
separate the from and to part is optional.
Resp: no time now.
+ 8 Add GTK 2.3 file dialog support. Patch by Grahame Bowland, 2004 Mar 15,
+ but it doesn't use "initdir" or "dflt". (will update patch)
+ 8 Add buffer-local autocommands? Reduces overhead for autocommands that
+ trigger often (inserting a character, switching mode).
+ :au Event <buffer> do-something
+ E.g.:
+ :au BufEnter <buffer> menu enable ...
+ :au BufLeave <buffer> menu disable ...
+ Patch from Yakov Lerner, including test (2004 Jan 7).
+ He'll send updated patch.
+ Autocommands:
+ VimResized - When the Vim window has been resized (SIGWINCH)
+ patch from Yakov Lerner, 2003 July 24.
+ He'll write documentation and send updated patch.
--- responses above --
7 Make "5dd" on last-but-one-line not delete anything (Vi compatible).
Add flag in 'cpoptions' for this. When not present, "2dd" in the last
@@ -247,8 +234,11 @@ For version 7.0:
- findmatch() should be adjusted for Lisp. See remark at
get_lisp_indent(). Esp. \( and \) should be skipped. (Dorai Sitaram,
incomplete patch Mar 18)
+
+
- Change ga_room into ga_maxlen, so that it doesn't need to be
incremented/decremented each time.
+- For string variables, use length instead of NUL termination.
- new DATA TYPES: lists, dictionaries and function references.
Check old patch from Robert Webb for array support.
Add type checking? See ~/vim/ideas.txt.
@@ -311,6 +301,7 @@ For version 7.0:
- FileChangedShellPost autocommand event: after (not) reloading a changed
file. Can be used to update statusline oslt.
- Displaying size of Visual area: use 24-33 column display.
+- Mac: Unicode input and display (Eckehard Berns, June 27)
Vi incompatibility:
@@ -1577,6 +1568,13 @@ Robustness:
A long line with a " in it can cause a crash when it runs out of stack
space (on systems where this isn't caught). How can we catch this for
more systems?
+6 Add file locking. Lock a file when starting to edit it with flock() or
+ fcntl(). This patch has advisory file locking while reading/writing
+ the file for Vim 5.4: ~/vim/patches/kahn_file_locking .
+ The patch is incomplete (needs support for more systems, autoconf).
+ Andy doesn't have time to work on it.
+ Disadvantage: Need to find ways to gracefully handle failure to obtain a
+ lock. When to release a lock: When buffer is unloaded?
Performance:
@@ -2016,8 +2014,8 @@ Autocommands:
ReplaceEnter - Entering Replace mode
CmdEnter - Entering Cmdline mode
VisualEnter - Entering Visual mode
+ *Leave - Leaving a mode (in pair with the above *Enter)
CmdUndefined - Like FuncUndefined but for user commands.
- *Leave - Leaving the mode
SearchPost - After doing a search command (e.g. to do "M")
PreDirChanged/PostDirChanged
- Before/after ":cd" has been used (for changing the
View
8 runtime/doc/usr_27.txt
@@ -1,4 +1,4 @@
-*usr_27.txt* For Vim version 7.0aa. Last change: 2003 Oct 28
+*usr_27.txt* For Vim version 7.0aa. Last change: 2004 Jun 26
VIM USER MANUAL - by Bram Moolenaar
@@ -304,9 +304,9 @@ Will match "ab" in "abbb". Actually, it will never match more than one b,
because there is no reason to match more. It requires something else to force
it to match more than the lower limit.
The same rules apply to removing "n" and "m". It's even possible to remove
-both of the, resulting in "\{-}". This matches the item before it zero or
-more times, as few as possible. The item by itself always match zero times.
-It is useful when combined with something else. Example: >
+both of the numbes, resulting in "\{-}". This matches the item before it zero
+or more times, as few as possible. The item by itself always matches zero
+times. It is useful when combined with something else. Example: >
/a.\{-}b
View
25 runtime/doc/version7.txt
@@ -1,4 +1,4 @@
-*version7.txt* For Vim version 7.0aa. Last change: 2004 Jun 24
+*version7.txt* For Vim version 7.0aa. Last change: 2004 Jun 30
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -61,6 +61,15 @@ In Vim scripts the following types have been added:
Many functions and commands have been added to support the new types.
+NOT IMPLEMENTED YET!
+
+
+KDE support *new-kde*
+-----------
+
+Kvim is the KDE version of Vim. It uses the Qt toolkit. See |KVim|.
+(Thomas Capricelli, Philippe Fremy, Mickael Marchand, Mark Westcott, et al.)
+
Various new items *new-items-7*
-----------------
@@ -73,12 +82,18 @@ Options: ~
Ex commands: ~
+Win32: The ":winpos" command now also works in the console. (Vipin Aravind)
+
New functions: ~
New autocommand events: ~
+InsertEnter starting Insert or Replace mode
+InsertChange going from Insert to Replace mode or back
+InsertLeave leaving Insert or Replace mode
+
New Syntax files: ~
@@ -89,6 +104,9 @@ character selections can be used between two Vims. (Eckehard Berns)
Also fixes the problem that setting 'clipboard' to "unnamed" breaks using
"yyp".
+The netrw plugin now also supports viewing a directory, when "scp://" is used.
+Deleting and renaming files is possible. (Charles Campbell)
+
==============================================================================
IMPROVEMENTS *improvements-7*
@@ -97,6 +115,8 @@ IMPROVEMENTS *improvements-7*
":breakadd here" and ":breakdel here" can be used to set or delete a
breakpoint at the cursor.
+The tutor was updated to make it simpler to use and added text to explain a
+few more important commands. Used ideas from Gabriel Zachmann.
==============================================================================
COMPILE TIME CHANGES *compile-changes-7*
@@ -152,4 +172,7 @@ After using cursor(line, col) moving up/down doesn't keep the same column.
Win32: Borland C before 5.5 requires using ".u." for LowPart and HighPart
fields. (Walter Briscoe)
+On Sinix SYS_NMLN isn't always defined. Define it ourselves. (Cristiano De
+Michele)
+
vim:tw=78:ts=8:ft=help:norl:
View
3  runtime/filetype.vim
@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2004 Jun 10
+" Last Change: 2004 Jun 27
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@@ -956,6 +956,7 @@ if has("fname_case")
else
au BufNewFile,BufRead *.pl call FTCheck_pl()
endif
+au BufNewFile,BufRead *.plx setf perl
fun! FTCheck_pl()
if exists("g:filetype_pl")
View
21 runtime/ftplugin/aspvbs.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: aspvbs
" Maintainer: Dan Sharp <dwsharp at hotmail dot com>
-" Last Changed: 2003 Sep 29
+" Last Changed: 2004 Jun 28
" URL: http://mywebpage.netscape.com/sharppeople/vim/ftplugin
if exists("b:did_ftplugin") | finish | endif
@@ -35,15 +35,16 @@ endif
" thanks to Gontran BAERTS
if exists("loaded_matchit")
let s:notend = '\%(\<end\s\+\)\@<!'
+ let b:match_ignorecase = 1
let b:match_words =
- \ s:notend . '\<If\>:^\s\+\<Else\>:\<ElseIf\>:\<end\s\+\<if\>,' .
- \ s:notend . '\<Select\s\+\<Case\>:\<Case\>:\<Case\s\+\<Else\>:\<End\s\+\<Select\>,' .
- \ '^\s*\<Sub\>:\<End\s\+\<Sub\>,' .
- \ '^\s*\<Function\>:\<End\s\+\<Function\>,' .
- \ '\<Class\>:\<End\s\+\<Class\>,' .
- \ '^\s*\<Do\>:\<Loop\>,' .
- \ '^\s*\<For\>:\<Next\>,' .
- \ '\<While\>:\<Wend\>,' .
+ \ s:notend . '\<if\>\%(.\{-}then\s\+\w\)\@!:\<elseif\>:^\s*\<else\>:\<end\s\+\<if\>,' .
+ \ s:notend . '\<select\s\+case\>:\<case\>:\<case\s\+else\>:\<end\s\+select\>,' .
+ \ '^\s*\<sub\>:\<end\s\+sub\>,' .
+ \ '^\s*\<function\>:\<end\s\+function\>,' .
+ \ '\<class\>:\<end\s\+class\>,' .
+ \ '^\s*\<do\>:\<loop\>,' .
+ \ '^\s*\<for\>:\<next\>,' .
+ \ '\<while\>:\<wend\>,' .
\ s:match_words
endif
@@ -52,7 +53,7 @@ if has("gui_win32")
let b:browsefilter="ASP Files (*.asp)\t*.asp\n" . s:browsefilter
endif
-let b:undo_ftplugin = "unlet! b:match_words b:browsefilter | " . s:undo_ftplugin
+let b:undo_ftplugin = "unlet! b:match_words b:match_ignorecase b:browsefilter | " . s:undo_ftplugin
" Restore the saved compatibility options.
let &cpo = s:save_cpo
View
BIN  runtime/hi16-action-make.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  runtime/hi22-action-make.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
9,314 runtime/kde-tips
9,314 additions, 0 deletions not shown
View
BIN  runtime/kvim32x32.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  runtime/kvim48x48.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  runtime/kvim64x64.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
4 runtime/menu.vim
@@ -193,7 +193,7 @@ inoremenu <script> <silent> 20.400 &Edit.&Select\ All<Tab>ggVG <C-O>:call <SID>S
cnoremenu <script> <silent> 20.400 &Edit.&Select\ All<Tab>ggVG <C-U>call <SID>SelectAll()<CR>
an 20.405 &Edit.-SEP2- <Nop>
-if has("win32") || has("win16") || has("gui_gtk") || has("gui_motif")
+if has("win32") || has("win16") || has("gui_gtk") || has("gui_kde") || has("gui_motif")
an 20.410 &Edit.&Find\.\.\. :promptfind<CR>
vunmenu &Edit.&Find\.\.\.
vnoremenu &Edit.&Find\.\.\. y:promptfind <C-R>"<CR>
@@ -382,7 +382,7 @@ if has("keymap")
endif
unlet s:n
endif
-if has("win32") || has("win16") || has("gui_gtk") || has("gui_photon")
+if has("win32") || has("win16") || has("gui_gtk") || has("gui_kde") || has("gui_photon")
an 20.470 &Edit.Select\ Fo&nt\.\.\. :set guifont=*<CR>
endif
View
26 runtime/plugin/NetrwFileHandlers.vim
@@ -0,0 +1,26 @@
+" NetrwFileHandlers: contains various extension-based file handlers for
+" netrw's browser
+" Author: Charles E. Campbell, Jr.
+" Date: Jun 25, 2004
+" Version: 1
+" ---------------------------------------------------------------------
+
+" NetrwFileHandler_html: handles html
+fun! NetrwFileHandler_html(webpage)
+" call Dfunc("NetrwFileHandler_html(".a:webpage.")")
+
+ let host= substitute(a:webpage,'^\w\+://\%(\w*@\)\=\(\w\+\)/.*$','\1','e')
+" call Decho("host<".host.">")
+
+ if host == hostname() || host == substitute(hostname(),'\..*$','','e')
+ let page= substitute(a:webpage,'^\w\+://\%(\w*@\)\=\(\w\+\)/','file://\1/'.expand("$HOME").'/','e')
+ else
+ let page= substitute(a:webpage,'^\w\+://\%(\w*@\)\=\(\w\+\)/','http://\1/','e')
+ endif
+" call Decho("executing !mozilla ".page)
+ exe "!mozilla ".page
+
+" call Dret("NetrwFileHandler_html")
+endfun
+
+" ---------------------------------------------------------------------
View
533 runtime/plugin/netrw.vim
@@ -1,7 +1,7 @@
" netrw.vim: Handles file transfer and remote directory listing across a network
" Last Change: Jun 24, 2004
" Maintainer: Charles E. Campbell, Jr. PhD <drchipNOSPAM at campbellfamily.biz>
-" Version: 47c NOT RELEASED
+" Version: 47f NOT RELEASED
" License: Vim License (see vim's :help license)
"
" But be doers of the word, and not only hearers, deluding your own selves
@@ -12,7 +12,7 @@
if exists("loaded_netrw") || &cp
finish
endif
-let loaded_netrw = "v47c"
+let loaded_netrw = "v47f NOT RELEASED"
let s:save_cpo = &cpo
set cpo&vim
@@ -31,6 +31,38 @@ 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")
+ let g:netrw_list_cmd= ""
+ endif
+endif
+if !exists("g:netrw_rm_cmd")
+ let g:netrw_rm_cmd = "ssh HOSTNAME rm"
+endif
+if !exists("g:netrw_rmf_cmd")
+ let g:netrw_rmf_cmd = "ssh HOSTNAME rm -f"
+endif
+if !exists("g:netrw_rmdir_cmd")
+ let g:netrw_rmdir_cmd = "ssh HOSTNAME rmdir"
+endif
+if !exists("g:netrw_rename_cmd")
+ let g:netrw_rename_cmd= "ssh HOSTNAME mv"
+endif
+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
" ---------------------------------------------------------------------
" Default values for global protocol variables {{{1
@@ -68,20 +100,6 @@ if !exists("g:netrw_fetch_cmd")
let g:netrw_fetch_cmd = ""
endif
endif
-if !exists("g:netrw_list_cmd")
- if executable("ssh")
- let g:netrw_list_cmd= "ssh HOSTNAME ls -FLa"
- else
-" call Decho("ssh is not executable, can't do netlist")
- let g:netrw_list_cmd= ""
- endif
-endif
-if exists("g:netrw_silent") && g:netrw_silent != 0
- let g:netrw_silentxfer= "silent "
-else
- let g:netrw_silentxfer= ""
-endif
-
if has("win32")
\ && exists("g:netrw_use_nt_rcp")
@@ -124,7 +142,7 @@ com! -nargs=* NetUserPass call NetUserPass(<f-args>)
" ------------------------------------------------------------------------
" NetSavePosn: saves position of cursor on screen {{{1
fun! s:NetSavePosn()
-" call Dfunc("NetSavePosn()")
+ call Dfunc("NetSavePosn()")
" Save current line and column
let s:netrw_winnr= winnr()
let s:netrw_line = line(".")
@@ -135,13 +153,13 @@ fun! s:NetSavePosn()
let s:netrw_hline= line(".")
call s:NetRestorePosn()
-" call Dret("NetSavePosn : winnr=".s:netrw_winnr." line=".s:netrw_line." col=".s:netrw_col." hline=".s:netrw_hline)
+ call Dret("NetSavePosn : winnr=".s:netrw_winnr." line=".s:netrw_line." col=".s:netrw_col." hline=".s:netrw_hline)
endfun
" ------------------------------------------------------------------------
" NetRestorePosn: restores the cursor and file position as saved by NetSavePosn() {{{1
fun! <SID>NetRestorePosn()
-" call Dfunc("NetRestorePosn() winnr=".s:netrw_winnr." line=".s:netrw_line." col=".s:netrw_col." hline=".s:netrw_hline)
+ call Dfunc("NetRestorePosn() winnr=".s:netrw_winnr." line=".s:netrw_line." col=".s:netrw_col." hline=".s:netrw_hline)
exe "silent! ".s:netrw_winnr."wincmd w"
if v:shell_error == 0
@@ -154,13 +172,13 @@ fun! <SID>NetRestorePosn()
" restore position
exe "norm! ".s:netrw_line."G0".s:netrw_col."\<bar>"
-" call Dret("NetRestorePosn")
+ call Dret("NetRestorePosn")
endfun
" ------------------------------------------------------------------------
" NetRead: responsible for reading a file over the net {{{1
fun! s:NetRead(...)
-" call Dfunc("NetRead(a:1<".a:1.">)")
+ call Dfunc("NetRead(a:1<".a:1.">)")
" save options
call s:NetOptionSave()
@@ -182,18 +200,18 @@ fun! s:NetRead(...)
" get name of a temporary file
let tmpfile= tempname()
-" call Decho("ichoice=".ichoice." readcmd<".readcmd.">")
+ call Decho("ichoice=".ichoice." readcmd<".readcmd.">")
while ichoice <= a:0
" attempt to repeat with previous host-file-etc
if exists("b:netrw_lastfile") && a:0 == 0
-" call Decho("using b:netrw_lastfile<" . b:netrw_lastfile . ">")
+ call Decho("using b:netrw_lastfile<" . b:netrw_lastfile . ">")
let choice = b:netrw_lastfile
let ichoice= ichoice + 1
else
exe "let choice= a:" . ichoice
-" call Decho("no lastfile: choice<" . choice . ">")
+ call Decho("no lastfile: choice<" . choice . ">")
" Reconstruct Choice if choice starts with '"'
if match(choice,"?") == 0
@@ -211,7 +229,7 @@ fun! s:NetRead(...)
echo ':Nread sftp://[user@]machine[[:#]port]/path uses sftp'
break
elseif match(choice,"^\"") != -1
-" call Decho("reconstructing choice")
+ call Decho("reconstructing choice")
if match(choice,"\"$") != -1
" case "..."
let choice=strpart(choice,1,strlen(choice)-2)
@@ -225,7 +243,7 @@ fun! s:NetRead(...)
let ichoice = ichoice + 1
if ichoice > a:0
echoerr "Unbalanced string in filename '". wholechoice ."'"
-" call Dret("NetRead")
+ call Dret("NetRead")
return
endif
let choice= a:{ichoice}
@@ -235,13 +253,13 @@ fun! s:NetRead(...)
endif
endif
-" call Decho("choice<" . choice . ">")
+ call Decho("choice<" . choice . ">")
let ichoice= ichoice + 1
" fix up windows urls
if has("win32")
let choice = substitute(choice,'\\','/','ge')
-" call Decho("fixing up windows url to <".choice."> tmpfile<".tmpfile)
+ call Decho("fixing up windows url to <".choice."> tmpfile<".tmpfile)
exe 'lcd ' . fnamemodify(tmpfile,':h')
let tmpfile = fnamemodify(tmpfile,':t')
@@ -250,12 +268,12 @@ fun! s:NetRead(...)
" Determine method of read (ftp, rcp, etc)
call s:NetMethod(choice)
- " Check if NetList() should be handling this request
-" call Decho("checking if netlist: choice<".choice."> netrw_list_cmd<".g:netrw_list_cmd.">")
+ " Check if NetBrowse() should be handling this request
+ call Decho("checking if netlist: choice<".choice."> netrw_list_cmd<".g:netrw_list_cmd.">")
if choice =~ "^.*/$"
if strlen(g:netrw_list_cmd) > 0
- keepjumps call s:NetList(choice)
-" call Dret("NetRead")
+ keepjumps call s:NetBrowse(choice)
+ call Dret("NetRead")
else
echoerr "sorry, can't do a remote listing; ssh isn't executable"
endif
@@ -269,7 +287,7 @@ fun! s:NetRead(...)
".........................................
" rcp: NetRead Method #1
if b:netrw_method == 1 " read with rcp
-" call Decho("read via rcp (method #1)")
+ call Decho("read via rcp (method #1)")
" ER: noting done with g:netrw_uid yet?
" ER: on Win2K" rcp machine[.user]:file tmpfile
" ER: if machine contains '.' adding .user is required (use $USERNAME)
@@ -288,7 +306,7 @@ fun! s:NetRead(...)
let uid_machine = g:netrw_machine
endif
endif
-" call Decho("executing: !".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".uid_machine.":".escape(b:netrw_fname,' ?&')." ".tmpfile)
+ call Decho("executing: !".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".uid_machine.":".escape(b:netrw_fname,' ?&')." ".tmpfile)
exe g:netrw_silentxfer."!".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".uid_machine.":".escape(b:netrw_fname,' ?&')." ".tmpfile
let result = s:NetGetFile(readcmd, tmpfile, b:netrw_method)
let b:netrw_lastfile = choice
@@ -296,17 +314,17 @@ fun! s:NetRead(...)
".........................................
" ftp + <.netrc>: NetRead Method #2
elseif b:netrw_method == 2 " read with ftp + <.netrc>
-" call Decho("read via ftp+.netrc (method #2)")
+ call Decho("read via ftp+.netrc (method #2)")
let netrw_fname= b:netrw_fname
new
set ff=unix
exe "put ='".g:netrw_ftpmode."'"
exe "put ='get ".netrw_fname." ".tmpfile."'"
if exists("g:netrw_port") && g:netrw_port != ""
-" call Decho("executing: %!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port)
+ call Decho("executing: %!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port)
exe g:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port
else
-" call Decho("executing: %!".g:netrw_ftp_cmd." -i ".g:netrw_machine)
+ call Decho("executing: %!".g:netrw_ftp_cmd." -i ".g:netrw_machine)
exe g:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".g:netrw_machine
endif
" If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar)
@@ -321,7 +339,7 @@ fun! s:NetRead(...)
" ftp + machine,id,passwd,filename: NetRead Method #3
elseif b:netrw_method == 3 " read with ftp + machine, id, passwd, and fname
" Construct execution string (four lines) which will be passed through filter
-" call Decho("read via ftp+mipf (method #3)")
+ call Decho("read via ftp+mipf (method #3)")
let netrw_fname= b:netrw_fname
new
set ff=unix
@@ -347,9 +365,9 @@ fun! s:NetRead(...)
" -i : turns off interactive prompting from ftp
" -n unix : DON'T use <.netrc>, even though it exists
" -n win32: quit being obnoxious about password
-" call Decho('performing ftp -i -n')
+ call Decho('performing ftp -i -n')
norm 1Gdd
-" call Decho("executing: %!".g:netrw_ftp_cmd." -i -n")
+ call Decho("executing: %!".g:netrw_ftp_cmd." -i -n")
exe g:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i -n"
" If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar)
if getline(1) !~ "^$"
@@ -362,7 +380,7 @@ fun! s:NetRead(...)
".........................................
" scp: NetRead Method #4
elseif b:netrw_method == 4 " read with scp
-" call Decho("read via scp (method #4)")
+ call Decho("read via scp (method #4)")
if exists("g:netrw_port") && g:netrw_port != ""
let useport= " -P ".g:netrw_port
else
@@ -370,10 +388,10 @@ fun! s:NetRead(...)
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(b:netrw_fname,' ?&')." ".cygtmpfile)
+ call Decho("executing: !".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".cygtmpfile)
exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".cygtmpfile
else
-" call Decho("executing: !".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".tmpfile)
+ 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)
@@ -381,7 +399,7 @@ fun! s:NetRead(...)
".........................................
elseif b:netrw_method == 5 " read with http (wget)
-" call Decho("read via http (method #5)")
+ call Decho("read via http (method #5)")
if g:netrw_http_cmd == ""
echoerr "neither wget nor fetch command is available"
exit
@@ -389,7 +407,7 @@ fun! s:NetRead(...)
if match(b:netrw_fname,"#") == -1
" simple wget
-" call Decho("executing: !".g:netrw_http_cmd." ".tmpfile." http://".g:netrw_machine.escape(b:netrw_fname,' ?&'))
+ call Decho("executing: !".g:netrw_http_cmd." ".tmpfile." http://".g:netrw_machine.escape(b:netrw_fname,' ?&'))
exe g:netrw_silentxfer."!".g:netrw_http_cmd." ".tmpfile." http://".g:netrw_machine.escape(b:netrw_fname,' ?&')
let result = s:NetGetFile(readcmd, tmpfile, b:netrw_method)
@@ -397,12 +415,12 @@ fun! s:NetRead(...)
" wget plus a jump to an in-page marker (ie. http://abc/def.html#aMarker)
let netrw_html= substitute(b:netrw_fname,"#.*$","","")
let netrw_tag = substitute(b:netrw_fname,"^.*#","","")
-" call Decho("netrw_html<".netrw_html.">")
-" call Decho("netrw_tag <".netrw_tag.">")
-" call Decho("executing: !".g:netrw_http_cmd." ".tmpfile." http://".g:netrw_machine.netrw_html)
+ call Decho("netrw_html<".netrw_html.">")
+ call Decho("netrw_tag <".netrw_tag.">")
+ call Decho("executing: !".g:netrw_http_cmd." ".tmpfile." http://".g:netrw_machine.netrw_html)
exe g:netrw_silentxfer."!".g:netrw_http_cmd." ".tmpfile." http://".g:netrw_machine.netrw_html
let result = s:NetGetFile(readcmd, tmpfile, b:netrw_method)
-" call Decho('<\s*a\s*name=\s*"'.netrw_tag.'"/')
+ call Decho('<\s*a\s*name=\s*"'.netrw_tag.'"/')
exe 'norm! 1G/<\s*a\s*name=\s*"'.netrw_tag.'"/'."\<CR>"
endif
let b:netrw_lastfile = choice
@@ -410,7 +428,7 @@ fun! s:NetRead(...)
".........................................
" cadaver: NetRead Method #6
elseif b:netrw_method == 6 " read with cadaver
-" call Decho("read via cadaver (method #6)")
+ call Decho("read via cadaver (method #6)")
" Construct execution string (four lines) which will be passed through filter
let netrw_fname= b:netrw_fname
@@ -432,7 +450,7 @@ fun! s:NetRead(...)
" perform cadaver operation:
norm 1Gdd
-" call Decho("executing: %!".g:netrw_dav_cmd)
+ call Decho("executing: %!".g:netrw_dav_cmd)
exe g:netrw_silentxfer."%!".g:netrw_dav_cmd
bd!
let result = s:NetGetFile(readcmd, tmpfile, b:netrw_method)
@@ -441,13 +459,13 @@ fun! s:NetRead(...)
".........................................
" rsync: NetRead Method #7
elseif b:netrw_method == 7 " read with rsync
-" call Decho("read via rsync (method #7)")
+ call Decho("read via rsync (method #7)")
if g:netrw_cygwin == 1
let cygtmpfile=substitute(tmpfile,'^\(\a\):','/cygdrive/\1/','e')
-" call Decho("executing: !".g:netrw_rsync_cmd." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".cygtmpfile)
+ call Decho("executing: !".g:netrw_rsync_cmd." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".cygtmpfile)
exe g:netrw_silentxfer."!".g:netrw_rsync_cmd." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".cygtmpfile
else
-" call Decho("executing: !".g:netrw_rsync_cmd." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".tmpfile)
+ call Decho("executing: !".g:netrw_rsync_cmd." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".tmpfile)
exe g:netrw_silentxfer."!".g:netrw_rsync_cmd." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".tmpfile
endif
let result = s:NetGetFile(readcmd,tmpfile, b:netrw_method)
@@ -466,13 +484,13 @@ fun! s:NetRead(...)
else
let netrw_option= "ftp"
endif
-" call Decho("read via fetch for ".netrw_option)
+ call Decho("read via fetch for ".netrw_option)
if exists("g:netrw_uid") && g:netrw_uid != "" && exists("g:netrw_passwd") && g:netrw_passwd != ""
-" call Decho("executing: !".g:netrw_fetch_cmd." ".tmpfile." ".netrw_option."://".g:netrw_uid.':'.g:netrw_passwd.'@'.g:netrw_machine."/".escape(b:netrw_fname,' ?&'))
+ call Decho("executing: !".g:netrw_fetch_cmd." ".tmpfile." ".netrw_option."://".g:netrw_uid.':'.g:netrw_passwd.'@'.g:netrw_machine."/".escape(b:netrw_fname,' ?&'))
exe g:netrw_silentxfer."!".g:netrw_fetch_cmd." ".tmpfile." ".netrw_option."://".g:netrw_uid.':'.g:netrw_passwd.'@'.g:netrw_machine."/".escape(b:netrw_fname,' ?&')
else
-" call Decho("executing: !".g:netrw_fetch_cmd." ".tmpfile." ".netrw_option."://".g:netrw_machine."/".escape(b:netrw_fname,' ?&'))
+ call Decho("executing: !".g:netrw_fetch_cmd." ".tmpfile." ".netrw_option."://".g:netrw_machine."/".escape(b:netrw_fname,' ?&'))
exe g:netrw_silentxfer."!".g:netrw_fetch_cmd." ".tmpfile." ".netrw_option."://".g:netrw_machine."/".escape(b:netrw_fname,' ?&')
endif
@@ -482,14 +500,14 @@ fun! s:NetRead(...)
".........................................
" sftp: NetRead Method #9
elseif b:netrw_method == 9 " read with sftp
-" call Decho("read via sftp (method #4)")
+ call Decho("read via sftp (method #4)")
if g:netrw_cygwin == 1
let cygtmpfile=substitute(tmpfile,'^\(\a\):','/cygdrive/\1/','e')
-" call Decho("!".g:netrw_sftp_cmd." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".cygtmpfile)
-" call Decho("executing: !".g:netrw_sftp_cmd." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".cygtmpfile)
+ call Decho("!".g:netrw_sftp_cmd." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".cygtmpfile)
+ call Decho("executing: !".g:netrw_sftp_cmd." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".cygtmpfile)
exe "!".g:netrw_sftp_cmd." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".cygtmpfile
else
-" call Decho("executing: !".g:netrw_sftp_cmd." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".tmpfile)
+ call Decho("executing: !".g:netrw_sftp_cmd." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".tmpfile)
exe g:netrw_silentxfer."!".g:netrw_sftp_cmd." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".tmpfile
endif
let result = s:NetGetFile(readcmd, tmpfile, b:netrw_method)
@@ -502,7 +520,7 @@ fun! s:NetRead(...)
endwhile
" cleanup
-" call Decho("cleanup")
+ call Decho("cleanup")
if exists("b:netrw_method")
unlet b:netrw_method
unlet g:netrw_machine
@@ -510,14 +528,14 @@ fun! s:NetRead(...)
endif
call s:NetOptionRestore()
-" call Dret("NetRead")
+ call Dret("NetRead")
endfun
" end of NetRead
" ------------------------------------------------------------------------
" NetGetFile: Function to read file "fname" with command "readcmd". {{{1
fun! s:NetGetFile(readcmd, fname, method)
-" call Dfunc("NetGetFile(readcmd<".a:readcmd.">,fname<".a:fname."> method<".a:method.">)")
+ call Dfunc("NetGetFile(readcmd<".a:readcmd.">,fname<".a:fname."> method<".a:method.">)")
if exists("*NetReadFixup")
" for the use of NetReadFixup (not otherwise used internally)
@@ -528,14 +546,14 @@ fun! s:NetGetFile(readcmd, fname, method)
if &term == "win32"
if &shell == "bash"
let fname=a:fname
-" call Decho("(win32 && bash) fname<".fname.">")
+ call Decho("(win32 && bash) fname<".fname.">")
else
let fname=substitute(a:fname,'/','\\\\','ge')
-" call Decho("(win32 && !bash) fname<".fname.">")
+ call Decho("(win32 && !bash) fname<".fname.">")
endif
else
let fname= a:fname
-" call Decho("(copied) fname<".fname.">")
+ call Decho("(copied) fname<".fname.">")
endif
" get the file, but disable undo when reading a new buffer
@@ -594,10 +612,10 @@ fun! s:NetGetFile(readcmd, fname, method)
let &ul= oldul
endif
elseif filereadable(fname)
-" call Decho("exe<".a:readcmd." ".v:cmdarg." ".fname.">")
+ call Decho("exe<".a:readcmd." ".v:cmdarg." ".fname.">")
exe a:readcmd." ".v:cmdarg." ".fname
else
-" call Dret("NetGetFile")
+ call Dret("NetGetFile")
return
endif
@@ -609,22 +627,22 @@ fun! s:NetGetFile(readcmd, fname, method)
else
let line2= line("$") - line2
endif
-" call Decho("calling NetReadFixup(method<".a:method."> line1=".line1." line2=".line2.")")
+ call Decho("calling NetReadFixup(method<".a:method."> line1=".line1." line2=".line2.")")
call NetReadFixup(a:method, line1, line2)
endif
-" call Decho("readcmd<".a:readcmd."> cmdarg<".v:cmdarg."> fname<".a:fname."> readable=".filereadable(a:fname))
+ call Decho("readcmd<".a:readcmd."> cmdarg<".v:cmdarg."> fname<".a:fname."> readable=".filereadable(a:fname))
" insure that we have the right filetype and that its being displayed
filetype detect
redraw!
-" call Dret("NetGetFile")
+ call Dret("NetGetFile")
endfun
" ------------------------------------------------------------------------
" NetWrite: responsible for writing a file over the net {{{1
fun! s:NetWrite(...) range
-" call Dfunc("NetWrite(a:0=".a:0.")")
+ call Dfunc("NetWrite(a:0=".a:0.")")
" option handling
let mod= 0
@@ -646,7 +664,7 @@ fun! s:NetWrite(...) range
" attempt to repeat with previous host-file-etc
if exists("b:netrw_lastfile") && a:0 == 0
-" call Decho("using b:netrw_lastfile<" . b:netrw_lastfile . ">")
+ call Decho("using b:netrw_lastfile<" . b:netrw_lastfile . ">")
let choice = b:netrw_lastfile
let ichoice= ichoice + 1
else
@@ -681,7 +699,7 @@ fun! s:NetWrite(...) range
let ichoice = ichoice + 1
if choice > a:0
echoerr "Unbalanced string in filename '". wholechoice ."'"
-" call Dret("NetWrite")
+ call Dret("NetWrite")
return
endif
let choice= a:{ichoice}
@@ -690,7 +708,7 @@ fun! s:NetWrite(...) range
endif
endif
endif
-" call Decho("choice<" . choice . ">")
+ call Decho("choice<" . choice . ">")
let ichoice= ichoice + 1
" fix up windows urls
@@ -711,7 +729,7 @@ fun! s:NetWrite(...) range
".........................................
" rcp: NetWrite Method #1
if b:netrw_method == 1 " write with rcp
-" Decho "write via rcp (method #1)"
+ Decho "write via rcp (method #1)"
if s:netrw_has_nt_rcp == 1
if exists("g:netrw_uid") && ( g:netrw_uid != "" )
let uid_machine = g:netrw_machine .'.'. g:netrw_uid
@@ -725,7 +743,7 @@ fun! s:NetWrite(...) range
let uid_machine = g:netrw_machine
endif
endif
-" call Decho("executing: !".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".tmpfile." ".uid_machine.":".escape(b:netrw_fname,' ?&'))
+ call Decho("executing: !".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".tmpfile." ".uid_machine.":".escape(b:netrw_fname,' ?&'))
exe g:netrw_silentxfer."!".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".tmpfile." ".uid_machine.":".escape(b:netrw_fname,' ?&')
let b:netrw_lastfile = choice
@@ -736,14 +754,14 @@ fun! s:NetWrite(...) range
new
set ff=unix
exe "put ='".g:netrw_ftpmode."'"
-" call Decho(" NetWrite: put ='".g:netrw_ftpmode."'")
+ call Decho(" NetWrite: put ='".g:netrw_ftpmode."'")
exe "put ='put ".tmpfile." ".netrw_fname."'"
-" call Decho("put ='put ".tmpfile." ".netrw_fname."'")
+ call Decho("put ='put ".tmpfile." ".netrw_fname."'")
if exists("g:netrw_port") && g:netrw_port != ""
-" call Decho("executing: %!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port)
+ call Decho("executing: %!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port)
exe g:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port
else
-" call Decho("executing: %!".g:netrw_ftp_cmd." -i ".g:netrw_machine)
+ call Decho("executing: %!".g:netrw_ftp_cmd." -i ".g:netrw_machine)
exe g:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".g:netrw_machine
endif
" If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar)
@@ -779,9 +797,9 @@ fun! s:NetWrite(...) range
" -i : turns off interactive prompting from ftp
" -n unix : DON'T use <.netrc>, even though it exists
" -n win32: quit being obnoxious about password
-" call Decho('performing ftp -i -n')
+ call Decho('performing ftp -i -n')
norm 1Gdd
-" call Decho("executing: %!".g:netrw_ftp_cmd." -i -n")
+ call Decho("executing: %!".g:netrw_ftp_cmd." -i -n")
exe g:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i -n"
" If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar)
if getline(1) !~ "^$"
@@ -800,10 +818,10 @@ fun! s:NetWrite(...) range
endif
if g:netrw_cygwin == 1
let cygtmpfile=substitute(tmpfile,'^\(\a\):','/cygdrive/\1/','e')
-" call Decho("executing: !".g:netrw_scp_cmd.useport." ".cygtmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&'))
+ call Decho("executing: !".g:netrw_scp_cmd.useport." ".cygtmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&'))
exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".cygtmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')
else
-" call Decho("executing: !".g:netrw_scp_cmd.useport." ".tmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&'))
+ call Decho("executing: !".g:netrw_scp_cmd.useport." ".tmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&'))
exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".tmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')
endif
let b:netrw_lastfile = choice
@@ -816,7 +834,7 @@ fun! s:NetWrite(...) range
".........................................
" dav: NetWrite Method #6
elseif b:netrw_method == 6 " write with cadaver
-" call Decho("write via cadaver (method #6)")
+ call Decho("write via cadaver (method #6)")
" Construct execution string (four lines) which will be passed through filter
let netrw_fname= b:netrw_fname
@@ -838,7 +856,7 @@ fun! s:NetWrite(...) range
" perform cadaver operation:
norm 1Gdd
-" call Decho("executing: %!".g:netrw_dav_cmd)
+ call Decho("executing: %!".g:netrw_dav_cmd)
exe g:netrw_silentxfer."%!".g:netrw_dav_cmd
bd!
let b:netrw_lastfile = choice
@@ -848,10 +866,10 @@ fun! s:NetWrite(...) range
elseif b:netrw_method == 7 " write with rsync
if g:netrw_cygwin == 1
let cygtmpfile=substitute(tmpfile,'^\(\a\):','/cygdrive/\1/','e')
-" call Decho("executing: !".g:netrw_rsync_cmd." ".cygtmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&'))
+ call Decho("executing: !".g:netrw_rsync_cmd." ".cygtmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&'))
exe g:netrw_silentxfer."!".g:netrw_rsync_cmd." ".cygtmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')
else
-" call Decho("executing: !".g:netrw_rsync_cmd." ".tmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&'))
+ call Decho("executing: !".g:netrw_rsync_cmd." ".tmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&'))
exe g:netrw_silentxfer."!".g:netrw_rsync_cmd." ".tmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')
endif
let b:netrw_lastfile = choice
@@ -869,7 +887,7 @@ fun! s:NetWrite(...) range
set ff=unix
put ='put '.tmpfile.' '.netrw_fname
norm 1Gdd
-" call Decho("executing: %!".g:netrw_sftp_cmd.' '.uid_machine)
+ call Decho("executing: %!".g:netrw_sftp_cmd.' '.uid_machine)
exe g:netrw_silentxfer."%!".g:netrw_sftp_cmd.' '.uid_machine
bd!
let b:netrw_lastfile= choice
@@ -881,7 +899,7 @@ fun! s:NetWrite(...) range
endwhile
" cleanup
-" call Decho("cleanup")
+ call Decho("cleanup")
let result=delete(tmpfile)
call s:NetOptionRestore()
@@ -889,17 +907,25 @@ fun! s:NetWrite(...) range
let &mod= mod " usually equivalent to set nomod
endif
-" call Dret("NetWrite")
+ call Dret("NetWrite")
endfun
" end of NetWrite
" ------------------------------------------------------------------------
-" NetList: This function uses the command in g:netrw_list_cmd to get a list {{{1
+" Remote Directory Browsing Support: {{{1
+" NetBrowse: This function uses the command in g:netrw_list_cmd to get a list {{{2
" of the contents of a remote directory. It is assumed that the
" g:netrw_list_cmd has a string, HOSTNAME, that needs to be substituted
" with the requested remote hostname first.
-fun! <SID>NetList(dirname)
-" call Dfunc("NetList(dirname<".a:dirname.">)")
+fun! <SID>NetBrowse(dirname)
+ call Dfunc("NetBrowse(dirname<".a:dirname.">)")
+
+ " sanity check
+ if !exists("g:netrw_list_cmd") || g:netrw_list_cmd == ''
+ echoerr "***netrw*** this system doesn't support remote directory listing"
+ call Dret("NetBrowse 0")
+ return 0
+ endif
" make this buffer modifiable
setlocal ma
@@ -907,8 +933,8 @@ fun! <SID>NetList(dirname)
" analyze a:dirname and g:netrw_list_cmd
let dirpat = '^\(\w\{-}\)://\(\w\+@\)\=\([^/]\+\)/\(.*\)$'
if a:dirname !~ dirpat
- echoerr "NetList: I don't understand your dirname<".a:dirname.">"
-" call Dret("NetList 0 : badly formatted dirname")
+ echoerr "NetBrowse: I don't understand your dirname<".a:dirname.">"
+ call Dret("NetBrowse 0 : badly formatted dirname")
return 0
endif
let method = substitute(a:dirname,dirpat,'\1','')
@@ -916,57 +942,57 @@ fun! <SID>NetList(dirname)
let machine = substitute(a:dirname,dirpat,'\3','')
let path = substitute(a:dirname,dirpat,'\4','')
let fname = substitute(a:dirname,'^.*/\ze.','','')
-" call Decho("set up method <".method .">")
-" call Decho("set up user <".user .">")
-" call Decho("set up machine<".machine.">")
-" call Decho("set up path <".path .">")
-" call Decho("set up fname <".fname .">")
+ call Decho("set up method <".method .">")
+ call Decho("set up user <".user .">")
+ call Decho("set up machine<".machine.">")
+ call Decho("set up path <".path .">")
+ call Decho("set up fname <".fname .">")
let listcmd = substitute(g:netrw_list_cmd,'\<HOSTNAME\>',user.machine,'')
-" call Decho("set up listcmd<".listcmd.">")
+ call Decho("set up listcmd<".listcmd.">")
if fname =~ '@$' && fname !~ '^"'
-" call Decho("attempt transfer of symlink as file")
- call s:NetList(substitute(a:dirname,'@$','','e'))
+ call Decho("attempt transfer of symlink as file")
+ call s:NetBrowse(substitute(a:dirname,'@$','','e'))
redraw!
-" call Dret("NetList 0 : symlink")
+ call Dret("NetBrowse 0 : symlink")
return 0
elseif fname !~ '/$' && fname !~ '^"'
" looks like a regular file, attempt transfer
-" call Decho("attempt transfer as regular file<".a:dirname.">")
+ call Decho("attempt transfer as regular file<".a:dirname.">")
" remove any filetype indicator from end of dirname, except for the
" "this is a directory" indicator (/). There shouldn't be one of those,
" anyway.
let path= substitute(path,'[*=@|]$','','e')
-" call Decho("new path<".path.">")
+ call Decho("new path<".path.">")
" remote-read the requested file into current buffer
enew!
- exe "file ".method."://".machine."/".path
+ exe "file ".method."://".user.machine."/".path
exe "silent doau BufReadPre ".fname
- silent call s:NetRead(method."://".machine."/".path)
+ silent call s:NetRead(method."://".user.machine."/".path)
exe "silent doau BufReadPost ".fname
1d
set nomod
-" call Dret("NetList 0 : file<".fname.">")
+ call Dret("NetBrowse 0 : file<".fname.">")
return 0
endif
" ---------------------------------------------------------------------
" Perform Directory Listing:
-" call Decho("Perform directory listing...")
+ call Decho("Perform directory listing...")
" set up new buffer and map
let bufname = method.'://'.user.machine.'/'.path
let bufnamenr = bufnr(bufname)
-" call Decho("bufname<".bufname."> bufnamenr=".bufnamenr)
+ call Decho("bufname<".bufname."> bufnamenr=".bufnamenr)
if bufnamenr != -1
" buffer already exists, switch to it!
exe "b ".bufnamenr
if line("$") >= 5
-" call Dret("NetList 1")
+ call Dret("NetBrowse 1")
return 1
endif
else
@@ -975,22 +1001,46 @@ fun! <SID>NetList(dirname)
setlocal bt=nofile bh=wipe nobl
exe 'file '.bufname
set bt=nowrite bh=hide nobl
- nnoremap <buffer> <cr> :exe "norm! 0"<bar>call <SID>NetList(<SID>NetListChgDir(expand("%")))<cr>
+ nnoremap <buffer> <silent> <cr> :exe "norm! 0"<bar>call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),expand("<cWORD>")))<cr>
+ nnoremap <buffer> <silent> <c-l> :exe "norm! 0"<bar>call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),'./'))<cr>
+ nnoremap <buffer> <silent> - :exe "norm! 0"<bar>call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),'../'))<cr>
+ nnoremap <buffer> <silent> a :let g:netrw_list_showall=1<bar>exe "norm! 0"<bar>call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),'./'))<cr>
+ nnoremap <buffer> <silent> o :exe g:netrw_winsize."wincmd s"<bar>exe "norm! 0"<bar>call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),expand("<cWORD>")))<cr>
+ nnoremap <buffer> <silent> v :exe g:netrw_winsize."wincmd v"<bar>exe "norm! 0"<bar>call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),expand("<cWORD>")))<cr>
+ nnoremap <buffer> <silent> x :exe "norm! 0"<bar>call <SID>NetBrowseX(<SID>NetBrowseChgDir(expand("%"),expand("<cWORD>")))<cr>
+ exe 'nnoremap <buffer> <silent> <del> :exe "norm! 0"<bar>call <SID>NetBrowseRm("'.user.machine.'","'.path.'")<cr>'
+ exe 'vnoremap <buffer> <silent> <del> :call <SID>NetBrowseRm("'.user.machine.'","'.path.'")<cr>'
+ exe 'nnoremap <buffer> <silent> D :exe "norm! 0"<bar>call <SID>NetBrowseRm("'.user.machine.'","'.path.'")<cr>'
+ exe 'vnoremap <buffer> <silent> D :call <SID>NetBrowseRm("'.user.machine.'","'.path.'")<cr>'
+ exe 'nnoremap <buffer> <silent> R :exe "norm! 0"<bar>call <SID>NetBrowseRename("'.user.machine.'","'.path.'")<cr>'
+ nnoremap <buffer> ? :he netrw-dir<cr>
setlocal ma
-" call Decho("executing: r! ".listcmd." '".path."'")
+ call Decho("executing: r! ".listcmd." '".path."'")
keepjumps put ='\" =============================='
keepjumps put ='\" Netrw Remote Directory Listing'
keepjumps put ='\" '.bufname
+ let g:netrw_bannercnt= 5
+ if g:netrw_list_hide != "" && !exists("g:netrw_list_showall")
+ keepjumps put ='\" Hiding: '.g:netrw_list_hide
+ let g:netrw_bannercnt= g:netrw_bannercnt + 1
+ endif
keepjumps put ='\" =============================='
exe "silent r! ".listcmd." '".path."'"
keepjumps 1d
set ft=netrwlist
- if line("$") >= 5
- keepjumps silent 5,$s/^\(.*\)\([/@]\)$/ \2\1/e
- keepjumps silent 5,$call s:NetSort()
- keepjumps silent 5,$s/^ \(.\)\(.*\)$/\2\1/e
- keepjumps 5
+ if line("$") >= g:netrw_bannercnt
+ if !exists("g:netrw_list_showall")
+ if g:netrw_list_hide != ""
+ call s:NetrwListHide()
+ endif
+ else
+ unlet g:netrw_list_showall
+ endif
+ exe 'keepjumps silent '.g:netrw_bannercnt.',$s/^\(.*\)\([/@]\)$/ \2\1/e'
+ exe 'keepjumps silent '.g:netrw_bannercnt.',$call s:NetSort()'
+ exe 'keepjumps silent '.g:netrw_bannercnt.',$s/^ \(.\)\(.*\)$/\2\1/e'
+ exe 'keepjumps '.g:netrw_bannercnt
endif
let prvbuf= bufnr(bufname)
if prvbuf != -1
@@ -999,26 +1049,27 @@ fun! <SID>NetList(dirname)
setlocal noma nomod
-" call Dret("NetList 1")
+ call Dret("NetBrowse 1")
return 1
endfun
" ---------------------------------------------------------------------
-" NetListCombine:
-fun! <SID>NetListChgDir(dirname)
- let newdir= expand("<cWORD>")
-" call Dfunc("NetListChgDir(dirname<".a:dirname.">) newdir<".newdir.">")
+" NetBrowseChgDir: {{{2
+fun! <SID>NetBrowseChgDir(dirname,newdir)
+ call Dfunc("NetBrowseChgDir(dirname<".a:dirname."> newdir<".a:newdir.">)")
let dirname= a:dirname
+ let newdir = a:newdir
if newdir !~ '/$'
" handling a file
let dirname= dirname.newdir
-" call Decho("handling a file: dirname<".dirname.">")
+ call Decho("handling a file: dirname<".dirname.">")
elseif newdir == './'
" refresh the directory list
-" call Decho("refresh directory listing")
+ call Decho("refresh directory listing")
+ set ma
%d
elseif newdir == '../'
@@ -1033,18 +1084,154 @@ fun! <SID>NetListChgDir(dirname)
" strip off a directory name from dirname
let dirname= substitute(dirname,'^\(.*/\)[^/]\+/','\1','')
endif
-" call Decho("go up one dir: dirname<".dirname."> trailer<".trailer.">")
+ call Decho("go up one dir: dirname<".dirname."> trailer<".trailer.">")
else
" go down one directory
let dirname= dirname.newdir
-" call Decho("go down one dir: dirname<".dirname."> newdir<".newdir.">")
+ call Decho("go down one dir: dirname<".dirname."> newdir<".newdir.">")
endif
-" call Dret("NetListChgDir <".dirname.">")
+ call Dret("NetBrowseChgDir <".dirname.">")
return dirname
endfun
+" ---------------------------------------------------------------------
+" NetBrowseRm: remove a remote file or directory {{{2
+fun! <SID>NetBrowseRm(usrhost,path) range
+ call Dfunc("NetBrowseRm(usrhost<".a:usrhost."> path<".a:path.">)")
+ call Decho("firstline=".a:firstline." lastline=".a:lastline)
+
+ " preparation for removing multiple files/directories
+ let ctr= a:firstline
+
+ " remove multiple files and directories
+ while ctr <= a:lastline
+ exe ctr
+
+ norm! 0
+ let rmfile= a:path.expand("<cWORD>")
+ call Decho("rmfile<".rmfile.">")
+
+ if rmfile !~ '^"' && (rmfile =~ '@$' || rmfile !~ '/$')
+ " attempt to remove file
+ let netrw_rm_cmd= substitute(g:netrw_rm_cmd,'HOSTNAME',a:usrhost,'').' '.rmfile
+ call Decho("attempt to remove file: system(".netrw_rm_cmd.")")
+ call inputsave()
+ let ok= input("Confirm deletion of file<".rmfile."> ","y")
+ call inputrestore()
+ if ok == "y"
+ let ret= system(netrw_rm_cmd)
+ call Decho("returned=".ret." errcode=".v:shell_error)
+ endif
+
+ else
+ " attempt to remove directory
+ let netrw_rmdir_cmd= substitute(g:netrw_rmdir_cmd,'HOSTNAME',a:usrhost,'').' '.rmfile
+ call Decho("attempt to remove dir: system(".netrw_rmdir_cmd.")")
+ call inputsave()
+ let ok= input("Confirm deletion of directory<".rmfile."> ","y")
+ call inputrestore()
+
+ if ok == "y"
+ let ret= system(netrw_rmdir_cmd)
+ call Decho("returned=".ret." errcode=".v:shell_error)
+
+ if v:shell_error != 0
+ let netrw_rmf_cmd= substitute(g:netrw_rmf_cmd,'HOSTNAME',a:usrhost,'').' '.substitute(rmfile,'/$','','e')
+ call Decho("2nd attempt to remove dir: system(".netrw_rmf_cmd.")")
+ let ret= system(netrw_rmf_cmd)
+ call Decho("returned=".ret." errcode=".v:shell_error)
+
+ if v:shell_error != 0
+ echoerr "unable to remove directory<".rmfile."> -- is it empty?"
+ endif
+ endif
+ endif
+ endif
+
+ let ctr= ctr + 1
+ endwhile
+
+ " refresh the directory
+ let curline= line(".")-1
+ call Decho("refresh the directory")
+ call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),'./'))
+ exe curline
+
+ call Dret("NetBrowseRm")
+endfun
+
+" ---------------------------------------------------------------------
+" NetBrowseRename: rename a remote file or directory {{{2
+fun! <SID>NetBrowseRename(usrhost,path)
+ call Dfunc("NetBrowseRename(usrhost<".a:usrhost."> path<".a:path.">)")
+
+ " preparation for removing multiple files/directories
+ let ctr = a:firstline
+ let rename_cmd = substitute(g:netrw_rename_cmd,'\<HOSTNAME\>',a:usrhost,'')
+
+ " attempt to rename files/directories
+ while ctr <= a:lastline
+ exe ctr
+
+ norm! 0
+ let oldname= a:path.expand("<cWORD>")
+ call Decho("oldname<".oldname.">")
+
+ call inputsave()
+ let newname= input("Moving ".a:usrhost."'s ".oldname." to : ",oldname)
+ call inputrestore()
+
+ let ret= system(rename_cmd." ".oldname." ".newname)
+ call Decho("executing system(".rename_cmd." ".oldname." ".newname)
+
+ let ctr= ctr + 1
+ endwhile
+
+ " refresh the directory
+ let curline= line(".")
+ call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),'./'))
+ exe curline
+ call Dret("NetBrowseRename")
+endfun
+
+" ---------------------------------------------------------------------
+" NetBrowseX: allows users to write custom functions to operate on {{{2
+" files given their extension
+fun! <SID>NetBrowseX(fname)
+ call Dfunc("NetBrowseX(".a:fname.")")
+
+ let exten= substitute(a:fname,'.*\.\(.\{-}\)','\1','e')
+ call Decho("exten<".exten."> "."NetrwFileHandler_".exten."():exists=".exists("*NetrwFileHandler_".exten))
+ if exten != "" && exists("*NetrwFileHandler_".exten)
+ exe "call NetrwFileHandler_".exten.'("'.a:fname.'")'
+ endif
+ call Dret("NetBrowseX")
+endfun
+
+" ---------------------------------------------------------------------
+" NetrwListHide: uses [range]g~...~d to delete files that match comma {{{2
+" separated patterns given in g:netrw_list_hide
+fun! <SID>NetrwListHide()
+ call Dfunc("NetrwListHide() listhide<".g:netrw_list_hide.">")
+
+ let listhide= g:netrw_list_hide
+ while listhide != ""
+ if listhide =~ ','
+ let hide = substitute(listhide,',.*$','','e')
+ let listhide = substitute(listhide,'^.\{-},\(.*\)$','\1','e')
+ else
+ let hide = listhide
+ let listhide= ""
+ endif
+ call Decho("pruning <".hide."> listhide<".listhide.">")
+ exe 'keepjumps silent '.g:netrw_bannercnt.',$g~'.hide.'~d'
+ endwhile
+
+ call Dret("NetrwListHide")
+endfun
+
" ------------------------------------------------------------------------
" NetMethod: determine method of transfer {{{1
" method == 1: rcp
@@ -1057,7 +1244,7 @@ endfun
" 8: fetch
" 9: sftp
fun! s:NetMethod(choice) " globals: method machine id passwd fname
-" call Dfunc("NetMethod(a:choice<".a:choice.">)")
+ call Dfunc("NetMethod(a:choice<".a:choice.">)")
" initialization
let b:netrw_method = 0
@@ -1089,11 +1276,11 @@ fun! s:NetMethod(choice) " globals: method machine id passwd fname
let fetchurm = '^fetch://\(\([^/@]\{-}\)@\)\=\([^/#:]\{-}\)\(:http\)\=/\(.*\)$'
let sftpurm = '^sftp://\([^/]\{-}\)/\(.*\)\=$'
-" call Decho("determine method:")
+ call Decho("determine method:")
" Determine Method
" rcp://user@hostname/...path-to-file
if match(a:choice,rcpurm) == 0