Skip to content
Browse files

updated for version 7.2b-000

  • Loading branch information...
1 parent 73626b6 commit 7a75fec5ca855b758ccdb3373e2e8aee4546de84 vimboss committed Jul 13, 2008
Showing with 3,786 additions and 2,068 deletions.
  1. +4 −4 Contents
  2. +1 −0 Filelist
  3. +2 −2 Makefile
  4. +1 −1 README.txt
  5. +1 −1 README_ami.txt
  6. +1 −1 README_amibin.txt
  7. +1 −1 README_amisrc.txt
  8. +1 −1 README_bindos.txt
  9. +1 −1 README_dos.txt
  10. +1 −1 README_extra.txt
  11. +1 −1 README_lang.txt
  12. +1 −1 README_mac.txt
  13. +1 −1 README_ole.txt
  14. +1 −1 README_os2.txt
  15. +1 −1 README_os390.txt
  16. +1 −1 README_src.txt
  17. +1 −1 README_srcdos.txt
  18. +1 −1 README_unix.txt
  19. +1 −1 README_vms.txt
  20. +1 −1 README_w32s.txt
  21. +1 −1 nsis/gvim.nsi
  22. +61 −26 runtime/autoload/ada.vim
  23. +2 −2 runtime/autoload/adacomplete.vim
  24. +4 −4 runtime/autoload/decada.vim
  25. +14 −6 runtime/autoload/getscript.vim
  26. +18 −10 runtime/autoload/gnat.vim
  27. +5 −5 runtime/autoload/gzip.vim
  28. +469 −426 runtime/autoload/netrw.vim
  29. +4 −15 runtime/autoload/netrwSettings.vim
  30. +7 −7 runtime/autoload/rubycomplete.vim
  31. +47 −43 runtime/autoload/tar.vim
  32. +34 −34 runtime/autoload/zip.vim
  33. +11 −10 runtime/compiler/decada.vim
  34. +1 −1 runtime/compiler/eruby.vim
  35. +7 −5 runtime/compiler/gnat.vim
  36. +41 −0 runtime/compiler/rspec.vim
  37. +1 −1 runtime/doc/arabic.txt
  38. +5 −4 runtime/doc/autocmd.txt
  39. +5 −5 runtime/doc/change.txt
  40. +4 −2 runtime/doc/cmdline.txt
  41. +1 −1 runtime/doc/debug.txt
  42. +1 −1 runtime/doc/debugger.txt
  43. +1 −1 runtime/doc/develop.txt
  44. +1 −1 runtime/doc/diff.txt
  45. +1 −1 runtime/doc/digraph.txt
  46. +24 −19 runtime/doc/editing.txt
  47. +34 −16 runtime/doc/eval.txt
  48. +1 −1 runtime/doc/farsi.txt
  49. +5 −5 runtime/doc/filetype.txt
  50. +1 −1 runtime/doc/fold.txt
  51. +1 −1 runtime/doc/ft_ada.txt
  52. +1 −1 runtime/doc/ft_sql.txt
  53. +1 −1 runtime/doc/gui.txt
  54. +1 −1 runtime/doc/gui_w16.txt
  55. +2 −2 runtime/doc/gui_w32.txt
  56. +1 −1 runtime/doc/gui_x11.txt
  57. +1 −1 runtime/doc/hangulin.txt
  58. +1 −1 runtime/doc/hebrew.txt
  59. +1 −1 runtime/doc/help.txt
  60. +1 −1 runtime/doc/howto.txt
  61. +1 −1 runtime/doc/if_cscop.txt
  62. +3 −3 runtime/doc/if_mzsch.txt
  63. +1 −1 runtime/doc/if_ole.txt
  64. +1 −1 runtime/doc/if_perl.txt
  65. +1 −1 runtime/doc/if_pyth.txt
  66. +1 −1 runtime/doc/if_ruby.txt
  67. +1 −1 runtime/doc/if_sniff.txt
  68. +2 −2 runtime/doc/if_tcl.txt
  69. +76 −1 runtime/doc/indent.txt
  70. +1 −1 runtime/doc/index.txt
  71. +1 −1 runtime/doc/insert.txt
  72. +2 −2 runtime/doc/intro.txt
  73. +3 −3 runtime/doc/map.txt
  74. +1 −1 runtime/doc/mbyte.txt
  75. +1 −1 runtime/doc/message.txt
  76. +1 −1 runtime/doc/mlang.txt
  77. +1 −1 runtime/doc/motion.txt
  78. +3 −3 runtime/doc/netbeans.txt
  79. +9 −18 runtime/doc/options.txt
  80. +1 −1 runtime/doc/os_390.txt
  81. +1 −1 runtime/doc/os_amiga.txt
  82. +1 −1 runtime/doc/os_beos.txt
  83. +1 −1 runtime/doc/os_dos.txt
  84. +1 −1 runtime/doc/os_mac.txt
  85. +1 −1 runtime/doc/os_mint.txt
  86. +1 −1 runtime/doc/os_msdos.txt
  87. +1 −1 runtime/doc/os_os2.txt
  88. +1 −1 runtime/doc/os_qnx.txt
  89. +33 −33 runtime/doc/os_risc.txt
  90. +1 −1 runtime/doc/os_unix.txt
  91. +1 −1 runtime/doc/os_vms.txt
  92. +1 −1 runtime/doc/os_win32.txt
  93. +1 −1 runtime/doc/pattern.txt
  94. +4 −1 runtime/doc/pi_getscript.txt
  95. +1 −1 runtime/doc/pi_gzip.txt
  96. +44 −17 runtime/doc/pi_netrw.txt
  97. +1 −1 runtime/doc/pi_paren.txt
  98. +1 −1 runtime/doc/pi_spec.txt
  99. +1 −1 runtime/doc/pi_tar.txt
  100. +2 −2 runtime/doc/pi_vimball.txt
  101. +2 −2 runtime/doc/pi_zip.txt
  102. +1 −1 runtime/doc/print.txt
  103. +1 −1 runtime/doc/quickfix.txt
  104. +1 −1 runtime/doc/quickref.txt
  105. +1 −1 runtime/doc/quotes.txt
  106. +1 −1 runtime/doc/recover.txt
  107. +1 −1 runtime/doc/remote.txt
  108. +1 −1 runtime/doc/repeat.txt
  109. +1 −1 runtime/doc/rileft.txt
  110. +1 −1 runtime/doc/russian.txt
  111. +1 −1 runtime/doc/scroll.txt
  112. +1 −1 runtime/doc/sign.txt
  113. +1 −1 runtime/doc/spell.txt
  114. +1 −1 runtime/doc/sponsor.txt
  115. +1 −1 runtime/doc/starting.txt
  116. +1 −1 runtime/doc/syntax.txt
  117. +1 −1 runtime/doc/tabpage.txt
  118. +8 −2 runtime/doc/tags
  119. +1 −1 runtime/doc/tagsrch.txt
  120. +1 −1 runtime/doc/term.txt
  121. +1 −1 runtime/doc/tips.txt
  122. +58 −28 runtime/doc/todo.txt
  123. +1 −1 runtime/doc/uganda.txt
  124. +1 −1 runtime/doc/undo.txt
  125. +1 −1 runtime/doc/usr_01.txt
  126. +1 −1 runtime/doc/usr_02.txt
  127. +1 −1 runtime/doc/usr_03.txt
  128. +1 −1 runtime/doc/usr_04.txt
  129. +1 −1 runtime/doc/usr_05.txt
  130. +1 −1 runtime/doc/usr_06.txt
  131. +1 −1 runtime/doc/usr_07.txt
  132. +1 −1 runtime/doc/usr_08.txt
  133. +1 −1 runtime/doc/usr_09.txt
  134. +1 −1 runtime/doc/usr_10.txt
  135. +1 −1 runtime/doc/usr_11.txt
  136. +1 −1 runtime/doc/usr_12.txt
  137. +1 −1 runtime/doc/usr_20.txt
  138. +1 −1 runtime/doc/usr_21.txt
  139. +1 −1 runtime/doc/usr_22.txt
  140. +1 −1 runtime/doc/usr_23.txt
  141. +1 −1 runtime/doc/usr_24.txt
  142. +1 −1 runtime/doc/usr_25.txt
  143. +1 −1 runtime/doc/usr_26.txt
  144. +1 −1 runtime/doc/usr_27.txt
  145. +1 −1 runtime/doc/usr_28.txt
  146. +3 −3 runtime/doc/usr_29.txt
  147. +1 −1 runtime/doc/usr_30.txt
  148. +1 −1 runtime/doc/usr_31.txt
  149. +1 −1 runtime/doc/usr_32.txt
  150. +1 −1 runtime/doc/usr_40.txt
  151. +1 −1 runtime/doc/usr_41.txt
  152. +1 −1 runtime/doc/usr_42.txt
  153. +1 −1 runtime/doc/usr_43.txt
  154. +1 −1 runtime/doc/usr_44.txt
  155. +1 −1 runtime/doc/usr_45.txt
  156. +1 −1 runtime/doc/usr_90.txt
  157. +1 −1 runtime/doc/usr_toc.txt
  158. +2 −2 runtime/doc/various.txt
  159. +1 −1 runtime/doc/version4.txt
  160. +3 −3 runtime/doc/version5.txt
  161. +2 −2 runtime/doc/version6.txt
  162. +179 −14 runtime/doc/version7.txt
  163. +2 −2 runtime/doc/vi_diff.txt
  164. +1 −1 runtime/doc/visual.txt
  165. +3 −3 runtime/doc/windows.txt
  166. +1 −1 runtime/doc/workshop.txt
  167. +20 −7 runtime/filetype.vim
  168. +25 −5 runtime/ftplugin/ada.vim
  169. +62 −17 runtime/ftplugin/debchangelog.vim
  170. +1 −1 runtime/ftplugin/eruby.vim
  171. +2 −2 runtime/ftplugin/git.vim
  172. +66 −0 runtime/ftplugin/haml.vim
  173. +164 −0 runtime/ftplugin/logtalk.dict
  174. +18 −0 runtime/ftplugin/logtalk.vim
  175. +18 −0 runtime/ftplugin/sass.vim
  176. +12 −9 runtime/indent/ada.vim
  177. +12 −7 runtime/indent/eruby.vim
  178. +73 −0 runtime/indent/haml.vim
  179. +61 −0 runtime/indent/logtalk.vim
  180. +61 −39 runtime/indent/php.vim
  181. +18 −13 runtime/indent/ruby.vim
  182. +39 −0 runtime/indent/sass.vim
  183. +59 −27 runtime/keymap/bulgarian-bds.vim
  184. +58 −25 runtime/keymap/bulgarian-phonetic.vim
  185. +0 −90 runtime/keymap/bulgarian.vim
  186. +4 −3 runtime/macros/justify.vim
  187. +4 −1 runtime/makemenu.vim
  188. +1 −1 runtime/plugin/getscriptPlugin.vim
  189. +1 −1 runtime/plugin/netrwPlugin.vim
  190. +1 −1 runtime/plugin/tarPlugin.vim
  191. +10 −1 runtime/plugin/zipPlugin.vim
  192. +2 −2 runtime/scripts.vim
  193. +65 −62 runtime/synmenu.vim
  194. +5 −9 runtime/syntax/ada.vim
  195. +1 −1 runtime/syntax/debchangelog.vim
  196. +4 −1 runtime/syntax/debcontrol.vim
  197. +8 −11 runtime/syntax/debsources.vim
  198. +8 −19 runtime/syntax/eruby.vim
  199. +85 −0 runtime/syntax/haml.vim
  200. +19 −24 runtime/syntax/haste.vim
  201. +49 −0 runtime/syntax/hastepreproc.vim
  202. +6 −4 runtime/syntax/lhaskell.vim
  203. +33 −27 runtime/syntax/logtalk.vim
  204. +15 −2 runtime/syntax/messages.vim
  205. +24 −17 runtime/syntax/muttrc.vim
  206. +103 −67 runtime/syntax/ruby.vim
  207. +56 −0 runtime/syntax/sass.vim
  208. +103 −74 runtime/syntax/sh.vim
  209. +31 −15 runtime/syntax/vim.vim
  210. +3 −3 runtime/tutor/tutor.pl
  211. +3 −3 runtime/tutor/tutor.pl.cp1250
  212. +3 −3 runtime/tutor/tutor.pl.utf-8
  213. +4 −2 runtime/vimrc_example.vim
  214. +2 −2 src/GvimExt/GvimExt.reg
  215. +10 −0 src/INSTALL
  216. +10 −3 src/INSTALLpc.txt
  217. +5 −4 src/Make_mvc.mak
  218. +4 −2 src/Makefile
  219. +41 −9 src/auto/configure
  220. +27 −9 src/configure.in
  221. +9 −5 src/eval.c
  222. +2 −2 src/ex_cmds.c
  223. +1 −1 src/ex_cmds2.c
  224. +4 −0 src/ex_docmd.c
  225. +19 −1 src/gui.c
  226. +3 −11 src/gui_mac.c
  227. +65 −3 src/if_perl.xs
  228. +1 −1 src/if_python.c
  229. +1 −1 src/main.c
  230. +14 −1 src/mbyte.c
  231. +1 −1 src/memfile.c
  232. +1 −1 src/memline.c
  233. +1 −1 src/message.c
  234. +8 −2 src/move.c
  235. +1 −2 src/netbeans.c
  236. +7 −7 src/po/af.po
  237. +11 −11 src/po/ca.po
  238. +6 −6 src/po/cs.cp1250.po
  239. +6 −6 src/po/cs.po
  240. +10 −10 src/po/de.po
  241. +76 −39 src/po/eo.po
  242. +7 −7 src/po/es.po
  243. +11 −11 src/po/fi.po
  244. +50 −30 src/po/fr.po
  245. +11 −11 src/po/ga.po
  246. +32 −18 src/po/it.po
  247. +11 −11 src/po/ja.po
  248. +11 −11 src/po/ja.sjis.po
  249. +7 −7 src/po/ko.po
  250. +11 −11 src/po/no.po
  251. +107 −41 src/po/pl.UTF-8.po
  252. +107 −41 src/po/pl.cp1250.po
  253. +107 −41 src/po/pl.po
  254. +7 −7 src/po/ru.cp1251.po
  255. +7 −7 src/po/ru.po
  256. +10 −10 src/po/sk.cp1250.po
  257. +10 −10 src/po/sk.po
  258. +11 −11 src/po/sv.po
  259. +11 −11 src/po/uk.cp1251.po
  260. +11 −11 src/po/uk.po
  261. +7 −7 src/po/vi.po
  262. +10 −10 src/po/zh_CN.UTF-8.po
  263. +10 −10 src/po/zh_CN.cp936.po
  264. +10 −10 src/po/zh_CN.po
  265. +7 −7 src/po/zh_TW.UTF-8.po
  266. +7 −7 src/po/zh_TW.po
  267. +2 −3 src/popupmnu.c
  268. +1 −0 src/proto/mbyte.pro
  269. +1 −1 src/quickfix.c
  270. +38 −0 src/screen.c
  271. +1 −1 src/tag.c
  272. +2 −0 src/testdir/test30.in
  273. +0 −38 src/version.c
  274. +8 −8 src/version.h
  275. +1 −1 src/vim.def
  276. +1 −1 src/vim.h
  277. +1 −1 src/vim16.def
View
8 Contents
@@ -9,10 +9,10 @@ Vim Vi IMproved. A clone of the UNIX text editor Vi. Very useful
messages, shows current file name in window title, on-line
help, rectangular cut/paste, etc., etc., etc...
- Version 7.2a. Also runs under UNIX, MSDOS and other systems.
- vim72art.tgz contains the documentation and syntax files.
- vim72abin.tgz contains the binaries.
- vim72asrc.tgz contains the sources.
+ Version 7.2b. Also runs under UNIX, MSDOS and other systems.
+ vim72brt.tgz contains the documentation and syntax files.
+ vim72bbin.tgz contains the binaries.
+ vim72bsrc.tgz contains the sources.
Author: Bram Moolenaar et al.
View
1 Filelist
@@ -516,6 +516,7 @@ RT_SCRIPTS = \
runtime/indent/*.vim \
runtime/indent/README.txt \
runtime/ftplugin/*.vim \
+ runtime/ftplugin/logtalk.dict \
runtime/ftplugin/README.txt \
runtime/plugin/*.vim \
runtime/plugin/README.txt \
View
4 Makefile
@@ -69,7 +69,7 @@ all install uninstall tools config configure reconfig proto depend lint tags typ
# Before creating an archive first delete all backup files, *.orig, etc.
MAJOR = 7
-MINOR = 2a
+MINOR = 2b
# Uncomment this line if the Win32s version is to be included.
DOSBIN_S = dosbin_s
@@ -133,7 +133,7 @@ DOSBIN_S = dosbin_s
# Win32 console version:
# - Set environment for Visual C++ 2008 Express Edition: "msvc2008.bat". Or,
# when using the Visual C++ Toolkit 2003: "msvcsetup.bat" (adjust the paths
-# when necessary).
+# when necessary). For Windows 98 the 2003 version is required.
# - "nmake -f Make_mvc.mak"
# - "rm testdir/*.out", "nmake -f Make_mvc.mak test" and check the output.
# - Rename the executables to "vimw32.exe", "xxdw32.exe".
View
2 README.txt
@@ -1,4 +1,4 @@
-README.txt for version 7.2a of Vim: Vi IMproved.
+README.txt for version 7.2b of Vim: Vi IMproved.
WHAT IS VIM
View
2 README_ami.txt
@@ -1,4 +1,4 @@
-README_ami.txt for version 7.2a of Vim: Vi IMproved.
+README_ami.txt for version 7.2b of Vim: Vi IMproved.
This file explains the installation of Vim on Amiga systems.
See README.txt for general information about Vim.
View
2 README_amibin.txt
@@ -1,4 +1,4 @@
-README_amibin.txt for version 7.2a of Vim: Vi IMproved.
+README_amibin.txt for version 7.2b of Vim: Vi IMproved.
See "README.txt" for general information about Vim.
See "README_ami.txt" for installation instructions for the Amiga.
View
2 README_amisrc.txt
@@ -1,4 +1,4 @@
-README_amisrc.txt for version 7.2a of Vim: Vi IMproved.
+README_amisrc.txt for version 7.2b of Vim: Vi IMproved.
See "README.txt" for general information about Vim.
See "README_ami.txt" for installation instructions for the Amiga.
View
2 README_bindos.txt
@@ -1,4 +1,4 @@
-README_bindos.txt for version 7.2a of Vim: Vi IMproved.
+README_bindos.txt for version 7.2b of Vim: Vi IMproved.
See "README.txt" for general information about Vim.
See "README_dos.txt" for installation instructions for MS-DOS and MS-Windows.
View
2 README_dos.txt
@@ -1,4 +1,4 @@
-README_dos.txt for version 7.2a of Vim: Vi IMproved.
+README_dos.txt for version 7.2b of Vim: Vi IMproved.
This file explains the installation of Vim on MS-DOS and MS-Windows systems.
See "README.txt" for general information about Vim.
View
2 README_extra.txt
@@ -1,4 +1,4 @@
-README_extra.txt for version 7.2a of Vim: Vi IMproved.
+README_extra.txt for version 7.2b of Vim: Vi IMproved.
The extra archive of Vim is to be used in combination with the source archive
(vim-7.0-src.tar.gz). The extra archive is useless without it.
View
2 README_lang.txt
@@ -1,4 +1,4 @@
-README_lang.txt for version 7.2a of Vim: Vi IMproved.
+README_lang.txt for version 7.2b of Vim: Vi IMproved.
This file contains files for non-English languages:
- Translated messages.
View
2 README_mac.txt
@@ -1,4 +1,4 @@
-README_mac.txt for version 7.2a of Vim: Vi IMproved.
+README_mac.txt for version 7.2b of Vim: Vi IMproved.
This file explains the installation of Vim on Macintosh systems.
See "README.txt" for general information about Vim.
View
2 README_ole.txt
@@ -1,4 +1,4 @@
-README_ole.txt for version 7.2a of Vim: Vi IMproved.
+README_ole.txt for version 7.2b of Vim: Vi IMproved.
This archive contains gvim.exe with OLE interface and VisVim.
This version of gvim.exe can also load a number of interface dynamically (you
View
2 README_os2.txt
@@ -1,4 +1,4 @@
-README_os2.txt for version 7.2a of Vim: Vi IMproved.
+README_os2.txt for version 7.2b of Vim: Vi IMproved.
This file explains the installation of Vim on OS/2 systems.
See "README.txt" for general information about Vim.
View
2 README_os390.txt
@@ -1,4 +1,4 @@
-README_os_390.txt for version 7.2a of Vim: Vi IMproved.
+README_os_390.txt for version 7.2b of Vim: Vi IMproved.
Welcome to the OS/390 Unix port of VIM.
View
2 README_src.txt
@@ -1,4 +1,4 @@
-README_src.txt for version 7.2a of Vim: Vi IMproved.
+README_src.txt for version 7.2b of Vim: Vi IMproved.
The source archive contains the files needed to compile Vim on Unix systems.
It is packed for Unix systems (NL line separator). It is also used for other
View
2 README_srcdos.txt
@@ -1,4 +1,4 @@
-README_srcdos.txt for version 7.2a of Vim: Vi IMproved.
+README_srcdos.txt for version 7.2b of Vim: Vi IMproved.
See "README.txt" for general information about Vim.
See "README_dos.txt" for installation instructions for MS-DOS and MS-Windows.
View
2 README_unix.txt
@@ -1,4 +1,4 @@
-README_unix.txt for version 7.2a of Vim: Vi IMproved.
+README_unix.txt for version 7.2b of Vim: Vi IMproved.
This file explains the installation of Vim on Unix systems.
See "README.txt" for general information about Vim.
View
2 README_vms.txt
@@ -1,4 +1,4 @@
-README_vms.txt for version 7.2a of Vim: Vi IMproved.
+README_vms.txt for version 7.2b of Vim: Vi IMproved.
This file explains the installation of Vim on VMS systems.
See "README.txt" in the runtime archive for information about Vim.
View
2 README_w32s.txt
@@ -1,4 +1,4 @@
-README_w32s.txt for version 7.2a of Vim: Vi IMproved.
+README_w32s.txt for version 7.2b of Vim: Vi IMproved.
This archive contains the gvim.exe that was specifically compiled for use in
the Win32s subsystem in MS-Windows 3.1 and 3.11.
View
2 nsis/gvim.nsi
@@ -22,7 +22,7 @@
!define HAVE_NLS
!define VER_MAJOR 7
-!define VER_MINOR 2a
+!define VER_MINOR 2b
# ----------- No configurable settings below this line -----------
View
87 runtime/autoload/ada.vim
@@ -2,13 +2,15 @@
" Description: Perform Ada specific completion & tagging.
" Language: Ada (2005)
" $Id$
-" Maintainer: Martin Krischik
+" Maintainer: Martin Krischik <krischik@users.sourceforge.net>
+" Taylor Venable <taylor@metasyntax.net>
" Neil Bird <neil@fnxweb.com>
+" Ned Okie <nokie@radford.edu>
" $Author$
" $Date$
-" Version: 4.2
+" Version: 4.6
" $Revision$
-" $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/ada.vim $
+" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/ada.vim $
" History: 24.05.2006 MK Unified Headers
" 26.05.2006 MK ' should not be in iskeyword.
" 16.07.2006 MK Ada-Mode as vim-ball
@@ -17,6 +19,10 @@
" 05.11.2006 MK Bram suggested not to use include protection for
" autoload
" 05.11.2006 MK Bram suggested to save on spaces
+" 08.07.2007 TV fix mapleader problems.
+" 09.05.2007 MK Session just won't work no matter how much
+" tweaking is done
+" 19.09.2007 NO still some mapleader problems
" Help Page: ft-ada-functions
"------------------------------------------------------------------------------
@@ -425,30 +431,49 @@ function ada#Create_Tags (option)
execute '!ctags --excmd=number ' . l:Filename
endfunction ada#Create_Tags
-function ada#Switch_Session (New_Session) "{{{1
- if a:New_Session != v:this_session
- "
- " We actualy got a new session - otherwise there
- " is nothing to do.
- "
- if strlen (v:this_session) > 0
- execute 'mksession! ' . v:this_session
- endif
+" Section: ada#Switch_Session {{{1
+"
+function ada#Switch_Session (New_Session)
+ "
+ " you should not save to much date into the seession since they will
+ " be sourced
+ "
+ let l:sessionoptions=&sessionoptions
- let v:this_session = a:New_Session
+ try
+ set sessionoptions=buffers,curdir,folds,globals,resize,slash,tabpages,tabpages,unix,winpos,winsize
- if filereadable (v:this_session)
- execute 'source ' . v:this_session
- endif
+ if a:New_Session != v:this_session
+ "
+ " We actualy got a new session - otherwise there
+ " is nothing to do.
+ "
+ if strlen (v:this_session) > 0
+ execute 'mksession! ' . v:this_session
+ endif
- augroup ada_session
- autocmd!
- autocmd VimLeavePre * execute 'mksession! ' . v:this_session
- augroup END
- endif
+ let v:this_session = a:New_Session
+
+ "if filereadable (v:this_session)
+ "execute 'source ' . v:this_session
+ "endif
+
+ augroup ada_session
+ autocmd!
+ autocmd VimLeavePre * execute 'mksession! ' . v:this_session
+ augroup END
+
+ "if exists ("g:Tlist_Auto_Open") && g:Tlist_Auto_Open
+ "TlistOpen
+ "endif
+
+ endif
+ finally
+ let &sessionoptions=l:sessionoptions
+ endtry
return
-endfunction ada#Switch_Session "}}}1
+endfunction ada#Switch_Session
" Section: GNAT Pretty Printer folding {{{1
"
@@ -546,18 +571,23 @@ function ada#Map_Menu (Text, Keys, Command)
\ a:Keys .
\" <C-O>:" . a:Command . "<CR>"
else
+ if exists("g:mapleader")
+ let l:leader = g:mapleader
+ else
+ let l:leader = '\'
+ endif
execute
\ "50amenu " .
\ "Ada." . escape(a:Text, ' ') .
- \ "<Tab>" . escape(g:mapleader . "a" . a:Keys , '\') .
+ \ "<Tab>" . escape(l:leader . "a" . a:Keys , '\') .
\ " :" . a:Command . "<CR>"
execute
\ "nnoremap <buffer>" .
- \ escape(g:mapleader . "a" . a:Keys , '\') .
+ \ escape(l:leader . "a" . a:Keys , '\') .
\" :" . a:Command
execute
\ "inoremap <buffer>" .
- \ escape(g:mapleader . "a" . a:Keys , '\') .
+ \ escape(l:leader . "a" . a:Keys , '\') .
\" <C-O>:" . a:Command
endif
return
@@ -566,10 +596,15 @@ endfunction
" Section: ada#Map_Popup {{{2
"
function ada#Map_Popup (Text, Keys, Command)
+ if exists("g:mapleader")
+ let l:leader = g:mapleader
+ else
+ let l:leader = '\'
+ endif
execute
\ "50amenu " .
\ "PopUp." . escape(a:Text, ' ') .
- \ "<Tab>" . escape(g:mapleader . "a" . a:Keys , '\') .
+ \ "<Tab>" . escape(l:leader . "a" . a:Keys , '\') .
\ " :" . a:Command . "<CR>"
call ada#Map_Menu (a:Text, a:Keys, a:Command)
View
4 runtime/autoload/adacomplete.vim
@@ -5,9 +5,9 @@
" Maintainer: Martin Krischik
" $Author$
" $Date$
-" Version: 4.2
+" Version: 4.6
" $Revision$
-" $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/adacomplete.vim $
+" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/adacomplete.vim $
" History: 24.05.2006 MK Unified Headers
" 26.05.2006 MK improved search for begin of word.
" 16.07.2006 MK Ada-Mode as vim-ball
View
8 runtime/autoload/decada.vim
@@ -3,12 +3,12 @@
" Language: Ada (Dec Ada)
" $Id$
" Copyright: Copyright (C) 2006 Martin Krischik
-" Maintainer: Martin Krischik
+" Maintainer: Martin Krischik <krischik@users.sourceforge.net>
" $Author$
" $Date$
-" Version: 4.2
+" Version: 4.6
" $Revision$
-" $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/decada.vim $
+" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/decada.vim $
" History: 21.07.2006 MK New Dec Ada
" 15.10.2006 MK Bram's suggestion for runtime integration
" 05.11.2006 MK Bram suggested not to use include protection for
@@ -45,7 +45,7 @@ function decada#Set_Session (...) dict " {{{1
call ada#Switch_Session (a:1)
elseif argc() == 0 && strlen (v:servername) > 0
call ada#Switch_Session (
- \ expand('~')[0:-2] . ".vimfiles.session]" .
+ \ expand('~')[0:-2] . ".vimfiles.session]decada_" .
\ v:servername . ".vim")
endif
return
View
20 runtime/autoload/getscript.vim
@@ -1,8 +1,8 @@
" ---------------------------------------------------------------------
" getscript.vim
" Author: Charles E. Campbell, Jr.
-" Date: May 30, 2008
-" Version: 30
+" Date: Jul 10, 2008
+" Version: 31
" Installing: :help glvs-install
" Usage: :help glvs
"
@@ -23,7 +23,7 @@ set cpo&vim
if exists("g:loaded_getscript")
finish
endif
-let g:loaded_getscript= "v30"
+let g:loaded_getscript= "v31"
" ---------------------------
" Global Variables: {{{1
@@ -140,6 +140,12 @@ fun! getscript#GetLatestVimScripts()
return
endif
+ " insure that fnameescape() is available
+ if !exists("*fnameescape")
+ echoerr "GetLatestVimScripts needs fnameescape() (provided by 7.1.299 or later)"
+ return
+ endif
+
" Find the .../GetLatest subdirectory under the runtimepath
for datadir in split(&rtp,',') + ['']
if isdirectory(datadir."/GetLatest")
@@ -181,7 +187,8 @@ fun! getscript#GetLatestVimScripts()
" don't let any events interfere (like winmanager's, taglist's, etc)
let eikeep= &ei
- set ei=all
+ let hlskeep= &hls
+ set ei=all hls&vim
" record current directory, change to datadir, open split window with
" datafile
@@ -316,6 +323,7 @@ fun! getscript#GetLatestVimScripts()
" restore events and current directory
exe "cd ".fnameescape(substitute(origdir,'\','/','ge'))
let &ei= eikeep
+ let &hls= hlskeep
setlocal nolz
" call Dredir("BUFFER TEST (GetLatestVimScripts 2)","ls!")
" call Dret("GetLatestVimScripts : did ".s:downloads." downloads")
@@ -506,14 +514,14 @@ fun! s:GetOneScript(...)
new|exe "silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".s:Escape(sname)." ".s:Escape('http://vim.sf.net/scripts/download_script.php?src_id='.latestsrcid)|q
else
" call Decho("exe silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".s:Escape(sname)." ".s:Escape('http://vim.sf.net/scripts/download_script.php?src_id='))
- exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".s:Escape(sname)." ".s:Escape('http://vim.sf.net/scripts/download_script.php?src_id=')
+ exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".s:Escape(sname)." ".s:Escape('http://vim.sf.net/scripts/download_script.php?src_id=').latestsrcid
endif
" AutoInstall: only if doautoinstall has been requested by the plugin itself
if doautoinstall
" call Decho("attempting to do autoinstall: getcwd<".getcwd()."> filereadable(".sname.")=".filereadable(sname))
if filereadable(sname)
- call Decho("exe silent !".g:GetLatestVimScripts_mv." ".s:Escape(sname)." ".s:Escape(s:autoinstall))
+" call Decho("exe silent !".g:GetLatestVimScripts_mv." ".s:Escape(sname)." ".s:Escape(s:autoinstall))
exe "silent !".g:GetLatestVimScripts_mv." ".s:Escape(sname)." ".s:Escape(s:autoinstall)
let curdir = escape(substitute(getcwd(),'\','/','ge'),"|[]*'\" #")
let installdir= curdir."/Installed"
View
28 runtime/autoload/gnat.vim
@@ -3,19 +3,21 @@
" Language: Ada (GNAT)
" $Id$
" Copyright: Copyright (C) 2006 Martin Krischik
-" Maintainer: Martin Krischik
+" Maintainer: Martin Krischi <krischik@users.sourceforge.net>k
+" Ned Okie <nokie@radford.edu>
" $Author$
" $Date$
-" Version: 4.2
+" Version: 4.6
" $Revision$
-" $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/gnat.vim $
+" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/gnat.vim $
" History: 24.05.2006 MK Unified Headers
" 16.07.2006 MK Ada-Mode as vim-ball
" 05.08.2006 MK Add session support
" 15.10.2006 MK Bram's suggestion for runtime integration
" 05.11.2006 MK Bram suggested not to use include protection for
" autoload
" 05.11.2006 MK Bram suggested to save on spaces
+" 19.09.2007 NO use project file only when there is a project
" Help Page: compiler-gnat
"------------------------------------------------------------------------------
@@ -71,13 +73,19 @@ function gnat#Set_Project_File (...) dict " {{{1
execute 'mksession! ' . v:this_session
endif
- if strlen (self.Project_File) > 0
- call ada#Switch_Session (
- \ expand('~') . "/vimfiles/session/" .
- \ fnamemodify (self.Project_File, ":t:r") . ".vim")
- else
- call ada#Switch_Session ('')
- endif
+ "if strlen (self.Project_File) > 0
+ "if has("vms")
+ "call ada#Switch_Session (
+ "\ expand('~')[0:-2] . ".vimfiles.session]gnat_" .
+ "\ fnamemodify (self.Project_File, ":t:r") . ".vim")
+ "else
+ "call ada#Switch_Session (
+ "\ expand('~') . "/vimfiles/session/gnat_" .
+ "\ fnamemodify (self.Project_File, ":t:r") . ".vim")
+ "endif
+ "else
+ "call ada#Switch_Session ('')
+ "endif
return
endfunction gnat#Set_Project_File " }}}1
View
10 runtime/autoload/gzip.vim
@@ -1,6 +1,6 @@
" Vim autoload file for editing compressed files.
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2008 May 29
+" Last Change: 2008 Jul 04
" These functions are used by the gzip plugin.
@@ -153,9 +153,9 @@ fun gzip#write(cmd)
let nmt = s:tempname(nm)
if rename(nm, nmt) == 0
if exists("b:gzip_comp_arg")
- call system(a:cmd . " " . b:gzip_comp_arg . " " . s:escape(nmt))
+ call system(a:cmd . " " . b:gzip_comp_arg . " -- " . s:escape(nmt))
else
- call system(a:cmd . " " . s:escape(nmt))
+ call system(a:cmd . " -- " . s:escape(nmt))
endif
call rename(nmt . "." . expand("<afile>:e"), nm)
endif
@@ -180,10 +180,10 @@ fun gzip#appre(cmd)
if rename(nm, nmte) == 0
if &patchmode != "" && getfsize(nm . &patchmode) == -1
" Create patchmode file by creating the decompressed file new
- call system(a:cmd . " -c " . s:escape(nmte) . " > " . s:escape(nmt))
+ call system(a:cmd . " -c -- " . s:escape(nmte) . " > " . s:escape(nmt))
call rename(nmte, nm . &patchmode)
else
- call system(a:cmd . " " . s:escape(nmte))
+ call system(a:cmd . " -- " . s:escape(nmte))
endif
call rename(nmt, nm)
endif
View
895 runtime/autoload/netrw.vim
@@ -1,7 +1,7 @@
" netrw.vim: Handles file transfer and remote directory listing across
" AUTOLOAD SECTION
-" Date: Jun 12, 2008
-" Version: 125
+" Date: Jul 12, 2008
+" Version: 127
" Maintainer: Charles E Campbell, Jr <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
" Copyright: Copyright (C) 1999-2008 Charles E. Campbell, Jr. {{{1
@@ -27,19 +27,13 @@ if !exists("s:NOTE")
let s:WARNING = 1
let s:ERROR = 2
endif
-let g:loaded_netrw = "v125"
+let g:loaded_netrw = "v127"
" sanity checks
if v:version < 700
call netrw#ErrorMsg(s:WARNING,"you need vim version 7.0 or later for version ".g:loaded_netrw." of netrw",1)
finish
endif
-if !exists("*shellescape")
- call netrw#ErrorMsg(s:ERROR,"you need to upgade your vim so that it has shellescape()",64)
-endif
-if !exists("*fnameescape")
- call netrw#ErrorMsg(s:ERROR,"you need to upgade your vim so that it has fnameescape()",65)
-endif
let s:keepcpo= &cpo
setlocal cpo&vim
@@ -312,6 +306,9 @@ if !exists("g:netrw_sort_by")
" alternatives: date size
let g:netrw_sort_by= "name"
endif
+if !exists("g:netrw_sort_options")
+ let g:netrw_sort_options= ""
+endif
if !exists("g:netrw_sort_direction")
" alternative: reverse (z y x ...)
let g:netrw_sort_direction= "normal"
@@ -415,7 +412,7 @@ fun! s:NetrwOptionSave(vt)
let {a:vt}netrw_twkeep = &l:tw " textwidth
let {a:vt}netrw_wigkeep = &l:wig " wildignore
if has("win32") && !has("win95")
- let {a:vt}netrw_swfkeep= &l:swf " swapfile
+ let {a:vt}netrw_swfkeep = &l:swf " swapfile
endif
if &go =~ 'a' | silent! let {a:vt}netrw_regstar = @* | endif
silent! let {a:vt}netrw_regslash= @/
@@ -428,7 +425,7 @@ endfun
fun! s:NetrwOptionRestore(vt)
" call Dfunc("s:NetrwOptionRestore(vt<".a:vt.">) win#".winnr()." buf#".bufnr("%"))
if !exists("{a:vt}netrw_optionsave")
-" call Decho("ro=".&ro." ma=".&ma." mod=".&mod." wrap=".&wrap)
+" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap)
" call Dret("s:NetrwOptionRestore : ".a:vt."netrw_optionsave doesn't exist")
return
endif
@@ -492,7 +489,7 @@ fun! s:NetrwOptionRestore(vt)
" call Decho("g:netrw_keepdir=".g:netrw_keepdir.": getcwd<".getcwd()."> acd=".&acd)
" call Decho("fo=".&fo.(exists("&acd")? " acd=".&acd : " acd doesn't exist"))
-" call Decho("ro=".&ro." ma=".&ma." mod=".&mod." wrap=".&wrap)
+" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap)
" call Dret("s:NetrwOptionRestore : win#".winnr()." buf#".bufnr("%"))
endfun
@@ -536,12 +533,12 @@ fun! netrw#NetrwClean(sys)
for dir in split(&rtp,',')
if filereadable(dir."/plugin/netrwPlugin.vim")
" call Decho("removing netrw-related files from ".dir)
- if s:System("delete",dir."/plugin/netrwPlugin.vim") |call netrw#ErrorMsg(1,"unable to remove ".dir."/plugin/netrwPlugin.vim",55) |endif
- if s:System("delete",dir."/autoload/netrwFileHandlers.vim")|call netrw#ErrorMsg(1,"unable to remove ".dir."/autoload/netrwFileHandlers.vim",55)|endif
- if s:System("delete",dir."/autoload/netrwSettings.vim") |call netrw#ErrorMsg(1,"unable to remove ".dir."/autoload/netrwSettings.vim",55) |endif
- if s:System("delete",dir."/autoload/netrw.vim") |call netrw#ErrorMsg(1,"unable to remove ".dir."/autoload/netrw.vim",55) |endif
- if s:System("delete",dir."/syntax/netrw.vim") |call netrw#ErrorMsg(1,"unable to remove ".dir."/syntax/netrw.vim",55) |endif
- if s:System("delete",dir."/syntax/netrwlist.vim") |call netrw#ErrorMsg(1,"unable to remove ".dir."/syntax/netrwlist.vim",55) |endif
+ if s:NetrwDelete(dir."/plugin/netrwPlugin.vim") |call netrw#ErrorMsg(1,"unable to remove ".dir."/plugin/netrwPlugin.vim",55) |endif
+ if s:NetrwDelete(dir."/autoload/netrwFileHandlers.vim")|call netrw#ErrorMsg(1,"unable to remove ".dir."/autoload/netrwFileHandlers.vim",55)|endif
+ if s:NetrwDelete(dir."/autoload/netrwSettings.vim") |call netrw#ErrorMsg(1,"unable to remove ".dir."/autoload/netrwSettings.vim",55) |endif
+ if s:NetrwDelete(dir."/autoload/netrw.vim") |call netrw#ErrorMsg(1,"unable to remove ".dir."/autoload/netrw.vim",55) |endif
+ if s:NetrwDelete(dir."/syntax/netrw.vim") |call netrw#ErrorMsg(1,"unable to remove ".dir."/syntax/netrw.vim",55) |endif
+ if s:NetrwDelete(dir."/syntax/netrwlist.vim") |call netrw#ErrorMsg(1,"unable to remove ".dir."/syntax/netrwlist.vim",55) |endif
let diddir= dir
let diddel= diddel + 1
if !a:sys|break|endif
@@ -704,8 +701,8 @@ fun! netrw#NetRead(mode,...)
let uid_machine = g:netrw_machine
endif
endif
-" call Decho("executing: !".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".shellescape(uid_machine.":".escape(b:netrw_fname,' ?&;')." ".tmpfile)
- exe s:netrw_silentxfer."!".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".shellescape(uid_machine.":".escape(b:netrw_fname,' ?&;')." ".tmpfile)
+" call Decho("executing: !".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".shellescape(uid_machine.":".b:netrw_fname,1)." ".shellescape(tmpfile,1))
+ exe s:netrw_silentxfer."!".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".shellescape(uid_machine.":".b:netrw_fname,1)." ".shellescape(tmpfile,1))
let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method)
let b:netrw_lastfile = choice
@@ -725,18 +722,18 @@ fun! netrw#NetRead(mode,...)
exe "put ='".'get \"'.netrw_fname.'\" '.tmpfile."'"
" call Decho("filter input: ".getline('.'))
if exists("g:netrw_port") && g:netrw_port != ""
-" call Decho("executing: %!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port)
- exe s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port
+" call Decho("executing: %!".g:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine." ".g:netrw_port,1))
+ exe s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine." ".g:netrw_port,1)
else
-" call Decho("executing: %!".g:netrw_ftp_cmd." -i ".g:netrw_machine)
- exe s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".g:netrw_machine
+" call Decho("executing: %!".g:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1))
+ exe s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)
endif
" If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar)
if getline(1) !~ "^$" && !exists("g:netrw_quiet") && getline(1) !~ '^Trying '
- let debugkeep= &debug
+ let debugkeep = &debug
setlocal debug=msg
call netrw#ErrorMsg(s:ERROR,getline(1),4)
- let &debug= debugkeep
+ let &debug = debugkeep
endif
call s:SaveBufVars()|bd!|call s:RestoreBufVars()
let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method)
@@ -806,8 +803,8 @@ fun! netrw#NetRead(mode,...)
else
let useport= ""
endif
-" call Decho("exe s:netrw_silentxfer.!".g:netrw_scp_cmd.useport." ".shellescape(g:netrw_machine.":".escape(b:netrw_fname,g:netrw_fname_escape))." ".tmpfile)
- exe s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".shellescape(g:netrw_machine.":".escape(b:netrw_fname,g:netrw_fname_escape))." ".tmpfile
+" call Decho("exe s:netrw_silentxfer.!".g:netrw_scp_cmd.useport." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)." ".shellescape(tmpfile,1))
+ exe s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)." ".shellescape(tmpfile,1)
let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method)
let b:netrw_lastfile = choice
@@ -823,23 +820,22 @@ fun! netrw#NetRead(mode,...)
return
endif
- let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape)
if match(b:netrw_fname,"#") == -1
- " simple wget
-" call Decho('using simple wget (# not in b:netrw_fname<'.b:netrw_fname.">)")
-" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile)." ".shellescape("http://".g:netrw_machine.netrw_fname))
- exe s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile)." ".shellescape("http://".g:netrw_machine.netrw_fname)
+ " using g:netrw_http_cmd (usually wget or curl)
+" call Decho('using '.g:netrw_http_cmd.' (# not in b:netrw_fname<'.b:netrw_fname.">)")
+" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile,1)." ".shellescape("http://".g:netrw_machine.netrw_fname,1))
+ exe s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile,1)." ".shellescape("http://".g:netrw_machine.b:netrw_fname,1)
let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method)
else
- " wget plus a jump to an in-page marker (ie. http://abc/def.html#aMarker)
+ " wget/curl plus a jump to an in-page marker (ie. http://abc/def.html#aMarker)
" call Decho(("wget/curl plus jump (# in b:netrw_fname<".b:netrw_fname.">)")
- let netrw_html= substitute(netrw_fname,"#.*$","","")
- let netrw_tag = substitute(netrw_fname,"^.*#","","")
+ 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("exe ".s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile)." ".shellescape("http://".g:netrw_machine.netrw_html))
- exe s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile)." ".shellescape("http://".g:netrw_machine.netrw_html)
+" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile,1)." ".shellescape("http://".g:netrw_machine.netrw_html,1))
+ exe s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile,1)." ".shellescape("http://".g:netrw_machine.netrw_html,1)
let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method)
" call Decho('<\s*a\s*name=\s*"'.netrw_tag.'"/')
exe 'norm! 1G/<\s*a\s*name=\s*"'.netrw_tag.'"/'."\<CR>"
@@ -877,9 +873,8 @@ fun! netrw#NetRead(mode,...)
" rsync: NetRead Method #7 {{{3
elseif b:netrw_method == 7
" call Decho("read via rsync (method #7)")
- let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape)
-" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_rsync_cmd." ".shellescape(g:netrw_machine.":".netrw_fname)." ".tmpfile)
- exe s:netrw_silentxfer."!".g:netrw_rsync_cmd." ".shellescape(g:netrw_machine.":".netrw_fname)." ".tmpfile
+" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_rsync_cmd." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)." ".shellescape(tmpfile,1))
+ exe s:netrw_silentxfer."!".g:netrw_rsync_cmd." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)." ".shellescape(tmpfile,1)
let result = s:NetrwGetFile(readcmd,tmpfile, b:netrw_method)
let b:netrw_lastfile = choice
@@ -888,7 +883,6 @@ fun! netrw#NetRead(mode,...)
" fetch://[user@]host[:http]/path
elseif b:netrw_method == 8
" call Decho("read via fetch (method #8)")
- let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape)
if g:netrw_fetch_cmd == ""
if !exists("g:netrw_quiet")
call netrw#ErrorMsg(s:ERROR,"fetch command not available",7)
@@ -903,11 +897,11 @@ fun! netrw#NetRead(mode,...)
" call Decho("read via fetch for ".netrw_option)
if exists("g:netrw_uid") && g:netrw_uid != "" && exists("s:netrw_passwd") && s:netrw_passwd != ""
-" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_fetch_cmd." ".tmpfile." ".shellescape(netrw_option."://".g:netrw_uid.':'.s:netrw_passwd.'@'.g:netrw_machine."/".netrw_fname))
- exe s:netrw_silentxfer."!".g:netrw_fetch_cmd." ".tmpfile." ".shellescape(netrw_option."://".g:netrw_uid.':'.s:netrw_passwd.'@'.g:netrw_machine."/".netrw_fname)
+" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_fetch_cmd." ".shellescape(tmpfile,1)." ".shellescape(netrw_option."://".g:netrw_uid.':'.s:netrw_passwd.'@'.g:netrw_machine."/".b:netrw_fname,1))
+ exe s:netrw_silentxfer."!".g:netrw_fetch_cmd." ".shellescape(tmpfile,1)." ".shellescape(netrw_option."://".g:netrw_uid.':'.s:netrw_passwd.'@'.g:netrw_machine."/".b:netrw_fname,1)
else
-" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_fetch_cmd." ".tmpfile." ".shellescape(netrw_option."://".g:netrw_machine."/".netrw_fname))
- exe s:netrw_silentxfer."!".g:netrw_fetch_cmd." ".tmpfile." ".shellescape(netrw_option."://".g:netrw_machine."/".netrw_fname)
+" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_fetch_cmd." ".shellescape(tmpfile,1)." ".shellescape(netrw_option."://".g:netrw_machine."/".b:netrw_fname,1))
+ exe s:netrw_silentxfer."!".g:netrw_fetch_cmd." ".shellescape(tmpfile,1)." ".shellescape(netrw_option."://".g:netrw_machine."/".b:netrw_fname,1)
endif
let result = s:NetrwGetFile(readcmd,tmpfile, b:netrw_method)
@@ -918,9 +912,8 @@ fun! netrw#NetRead(mode,...)
" sftp: NetRead Method #9 {{{3
elseif b:netrw_method == 9
" call Decho("read via sftp (method #9)")
- let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape)
-" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_sftp_cmd." ".shellescape(g:netrw_machine.":".netrw_fname)." ".tmpfile)
- exe s:netrw_silentxfer."!".g:netrw_sftp_cmd." ".shellescape(g:netrw_machine.":".netrw_fname)." ".tmpfile
+" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_sftp_cmd." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)." ".tmpfile)
+ exe s:netrw_silentxfer."!".g:netrw_sftp_cmd." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)." ".tmpfile
let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method)
let b:netrw_lastfile = choice
@@ -939,7 +932,7 @@ fun! netrw#NetRead(mode,...)
endif
if s:FileReadable(tmpfile) && tmpfile !~ '.tar.bz2$' && tmpfile !~ '.tar.gz$' && tmpfile !~ '.zip' && tmpfile !~ '.tar' && readcmd != 't'
" call Decho("cleanup by deleting tmpfile<".tmpfile.">")
- call s:System("delete",fnameescape(tmpfile))
+ call s:NetrwDelete(fnameescape(tmpfile))
endif
call s:NetrwOptionRestore("w:")
@@ -975,17 +968,17 @@ fun! netrw#NetWrite(...) range
" For binary writes, always write entire file.
" (line numbers don't really make sense for that).
" Also supports the writing of tar and zip files.
-" call Decho("(write entire file) silent exe w! ".v:cmdarg." ".tmpfile)
- silent exe "w! ".v:cmdarg." ".tmpfile
+" call Decho("(write entire file) silent exe w! ".fnameescape(v:cmdarg)." ".fnameescape(tmpfile))
+ silent exe "w! ".fnameescape(v:cmdarg)." ".fnameescape(tmpfile)
elseif g:netrw_cygwin
" write (selected portion of) file to temporary
let cygtmpfile= substitute(tmpfile,'/cygdrive/\(.\)','\1:','')
-" call Decho("(write selected portion) silent exe ".a:firstline."," . a:lastline . "w! ".v:cmdarg." ".cygtmpfile)
- silent exe a:firstline."," . a:lastline . "w! ".v:cmdarg." ".cygtmpfile
+" call Decho("(write selected portion) silent exe ".a:firstline."," . a:lastline . "w! ".fnameescape(v:cmdarg)." ".fnameescape(cygtmpfile))
+ silent exe a:firstline."," . a:lastline . "w! ".fnameescape(v:cmdarg)." ".fnameescape(cygtmpfile)
else
" write (selected portion of) file to temporary
-" call Decho("(write selected portion) silent exe ".a:firstline."," . a:lastline . "w! ".v:cmdarg." ".tmpfile)
- silent exe a:firstline."," . a:lastline . "w! ".v:cmdarg." ".tmpfile
+" call Decho("(write selected portion) silent exe ".a:firstline."," . a:lastline . "w! ".fnameescape(v:cmdarg)." ".fnameescape(tmpfile))
+ silent exe a:firstline."," . a:lastline . "w! ".fnameescape(v:cmdarg)." ".fnameescape(tmpfile)
endif
if curbufname == ""
@@ -1079,9 +1072,8 @@ fun! netrw#NetWrite(...) range
let uid_machine = g:netrw_machine
endif
endif
- let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape)
-" call Decho("executing: !".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".shellescape(tmpfile)." ".shellescape(uid_machine.":".netrw_fname))
- exe s:netrw_silentxfer."!".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".shellescape(tmpfile)." ".shellescape(uid_machine.":".netrw_fname)
+" call Decho("executing: !".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".shellescape(tmpfile,1)." ".shellescape(uid_machine.":".b:netrw_fname,1))
+ exe s:netrw_silentxfer."!".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".shellescape(tmpfile,1)." ".shellescape(uid_machine.":".b:netrw_fname,1)
let b:netrw_lastfile = choice
".........................................
@@ -1101,12 +1093,12 @@ fun! netrw#NetWrite(...) range
exe "put ='".'put \"'.tmpfile.'\" \"'.netrw_fname.'\"'."'"
" call Decho("filter input: ".getline('.'))
if exists("g:netrw_port") && g:netrw_port != ""
-" call Decho("executing: %!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port)
- exe s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port
+" call Decho("executing: %!".g:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)." ".shellescape(g:netrw_port,1))
+ exe s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)." ".shellescape(g:netrw_port,1)
else
" call Decho("filter input window#".winnr())
-" call Decho("executing: %!".g:netrw_ftp_cmd." -i ".g:netrw_machine)
- exe s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".g:netrw_machine
+" call Decho("executing: %!".g:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1))
+ exe s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)
endif
" If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar)
if getline(1) !~ "^$"
@@ -1167,14 +1159,13 @@ fun! netrw#NetWrite(...) range
" scp: NetWrite Method #4 {{{4
elseif b:netrw_method == 4
" call Decho("write via scp (method #4)")
- let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape)
if exists("g:netrw_port") && g:netrw_port != ""
- let useport= " ".g:netrw_scpport." ".g:netrw_port
+ let useport= " ".g:netrw_scpport." ".fnameescape(g:netrw_port)
else
let useport= ""
endif
-" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".shellescape(tmpfile)." ".shellescape(g:netrw_machine.":".netrw_fname))
- exe s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".shellescape(tmpfile)." ".shellescape(g:netrw_machine.":".netrw_fname)
+" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".shellescape(tmpfile,1)." ".shellescape(g:netrw_machine.":".b:netrw_fname,1))
+ exe s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".shellescape(tmpfile,1)." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)
let b:netrw_lastfile = choice
".........................................
@@ -1215,9 +1206,8 @@ fun! netrw#NetWrite(...) range
" rsync: NetWrite Method #7 {{{4
elseif b:netrw_method == 7
" call Decho("write via rsync (method #7)")
- let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape)
-" call Decho("executing: !".g:netrw_rsync_cmd." ".tmpfile." ".g:netrw_machine.":".netrw_fname)
- exe s:netrw_silentxfer."!".g:netrw_rsync_cmd." ".tmpfile." ".g:netrw_machine.":".netrw_fname
+" call Decho("executing: !".g:netrw_rsync_cmd." ".shellescape(tmpfile,1)." ".shellescape(g:netrw_machine.":".b:netrw_fname,1))
+ exe s:netrw_silentxfer."!".g:netrw_rsync_cmd." ".shellescape(tmpfile,1)." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)
let b:netrw_lastfile = choice
".........................................
@@ -1235,8 +1225,8 @@ fun! netrw#NetWrite(...) range
put ='put \"'.escape(tmpfile,'\').'\" '.netrw_fname
" call Decho("filter input: ".getline('.'))
norm! 1Gdd
-" call Decho("executing: %!".g:netrw_sftp_cmd.' '.uid_machine)
- exe s:netrw_silentxfer."%!".g:netrw_sftp_cmd.' '.uid_machine
+" call Decho("executing: %!".g:netrw_sftp_cmd.' '.shellescape(uid_machine,1))
+ exe s:netrw_silentxfer."%!".g:netrw_sftp_cmd.' '.shellescape(uid_machine,1)
bd!
let b:netrw_lastfile= choice
@@ -1251,7 +1241,7 @@ fun! netrw#NetWrite(...) range
" call Decho("cleanup")
if s:FileReadable(tmpfile)
" call Decho("tmpfile<".tmpfile."> readable, will now delete it")
- call s:System("delete",tmpfile)
+ call s:NetrwDelete(tmpfile)
endif
call s:NetrwOptionRestore("w:")
@@ -1312,7 +1302,7 @@ fun! s:NetrwGetFile(readcmd, tfile, method)
" readcmd=='t': simply do nothing
if a:readcmd == 't'
-" call Decho("ro=".&ro." ma=".&ma." mod=".&mod." wrap=".&wrap)
+" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap)
" call Dret("NetrwGetFile : skip read of <".a:tfile.">")
return
endif
@@ -1336,8 +1326,8 @@ fun! s:NetrwGetFile(readcmd, tfile, method)
else
let tfile= a:tfile
endif
-" " call Decho("exe silent! keepalt file ".tfile)
- exe "silent! keepalt file ".tfile
+" call Decho("exe silent! keepalt file ".fnameescape(tfile))
+ exe "silent! keepalt file ".fnameescape(tfile)
" edit temporary file (ie. read the temporary file in)
if rfile =~ '\.zip$'
@@ -1358,8 +1348,8 @@ fun! s:NetrwGetFile(readcmd, tfile, method)
endif
" rename buffer back to remote filename
-" call Decho("exe silent! keepalt file ".escape(rfile,' '))
- exe "silent! keepalt file ".escape(rfile,' ')
+" call Decho("exe silent! keepalt file ".fnameescape(rfile))
+ exe "silent! keepalt file ".fnameescape(rfile)
if a:method == 5
set ft=html
else
@@ -1374,14 +1364,14 @@ fun! s:NetrwGetFile(readcmd, tfile, method)
" call Decho("read file<".a:tfile."> after current line")
let curline = line(".")
let lastline= line("$")
-" call Decho("exe<".a:readcmd." ".v:cmdarg." ".a:tfile."> line#".curline)
- exe a:readcmd." ".v:cmdarg." ".a:tfile
+" call Decho("exe<".a:readcmd." ".fnameescape(v:cmdarg)." ".fnameescape(a:tfile)."> line#".curline)
+ exe a:readcmd." ".fnameescape(v:cmdarg)." ".fnameescape(a:tfile)
let line1= curline + 1
let line2= line("$") - lastline + 1
else
" not readable
-" call Decho("ro=".&ro." ma=".&ma." mod=".&mod." wrap=".&wrap)
+" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap)
" call Decho("tfile<".a:tfile."> not readable")
call netrw#ErrorMsg(s:WARNING,"file <".a:tfile."> not readable",9)
" call Dret("NetrwGetFile : tfile<".a:tfile."> not readable")
@@ -1406,7 +1396,7 @@ fun! s:NetrwGetFile(readcmd, tfile, method)
" make sure file is being displayed
" redraw!
-" call Decho("ro=".&ro." ma=".&ma." mod=".&mod." wrap=".&wrap)
+" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap)
" call Dret("NetrwGetFile")
endfun
@@ -1704,6 +1694,7 @@ fun! s:BrowserMaps(islocal)
nnoremap <buffer> <silent> U :<c-u>call <SID>NetrwBookmarkDir(5,expand("%"))<cr>
nnoremap <buffer> <silent> v :call <SID>NetrwSplit(5)<cr>
nnoremap <buffer> <silent> x :call netrw#NetrwBrowseX(<SID>NetrwBrowseChgDir(1,<SID>NetrwGetWord(),0),0)"<cr>
+ nnoremap <buffer> <silent> % :call <SID>NetrwOpenFile(1)<cr>
if !hasmapto('<Plug>NetrwHideEdit')
nmap <buffer> <unique> <c-h> <Plug>NetrwHideEdit
endif
@@ -1775,6 +1766,7 @@ fun! s:BrowserMaps(islocal)
nnoremap <buffer> <silent> U :<c-u>call <SID>NetrwBookmarkDir(5,b:netrw_curdir)<cr>
nnoremap <buffer> <silent> v :call <SID>NetrwSplit(2)<cr>
nnoremap <buffer> <silent> x :call netrw#NetrwBrowseX(<SID>NetrwBrowseChgDir(0,<SID>NetrwGetWord()),1)<cr>
+ nnoremap <buffer> <silent> % :call <SID>NetrwOpenFile(0)<cr>
if !hasmapto('<Plug>NetrwHideEdit')
nmap <buffer> <c-h> <Plug>NetrwHideEdit
endif
@@ -1797,7 +1789,7 @@ fun! s:BrowserMaps(islocal)
exe 'vnoremap <buffer> <silent> D :call <SID>NetrwRemoteRm("'.s:user.s:machine.'","'.s:path.'")<cr>'
exe 'nnoremap <buffer> <silent> R :call <SID>NetrwRemoteRename("'.s:user.s:machine.'","'.s:path.'")<cr>'
exe 'vnoremap <buffer> <silent> R :call <SID>NetrwRemoteRename("'.s:user.s:machine.'","'.s:path.'")<cr>'
- nnoremap <buffer> <F1> :he netrw-browse-cmds<cr>
+ nnoremap <buffer> <F1> :he netrw-quickhelp<cr>
endif
call s:SetRexDir(a:islocal,b:netrw_curdir)
" call Dret("s:BrowserMaps")
@@ -1921,8 +1913,8 @@ fun! s:NetrwBookmarkDir(chg,curdir)
setlocal nomod
" call Decho("setlocal nomod")
endif
-" call Decho("exe e! ".g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT})
- exe "e! ".g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT}
+" " call Decho("exe e! ".fnameescape(g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT}))
+ exe "e! ".fnameescape(g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT})
else
let g:NETRW_DIRHIST_CNT= ( g:NETRW_DIRHIST_CNT + 1 ) % g:netrw_dirhistmax
echo "Sorry, no predecessor directory exists yet"
@@ -1942,8 +1934,8 @@ fun! s:NetrwBookmarkDir(chg,curdir)
setlocal nomod
" call Decho("setlocal nomod")
endif
-" call Decho("exe e! ".g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT})
- exe "e! ".g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT}
+" call Decho("exe e! ".fnameescape(g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT}))
+ exe "e! ".fnameescape(g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT})
else
let g:NETRW_DIRHIST_CNT= ( g:NETRW_DIRHIST_CNT - 1 ) % g:netrw_dirhistmax
if g:NETRW_DIRHIST_CNT < 0
@@ -2008,7 +2000,7 @@ fun! s:NetrwBrowse(islocal,dirname)
if exists("s:netrw_skipbrowse")
unlet s:netrw_skipbrowse
-" call Decho("ro=".&ro." ma=".&ma." mod=".&mod." wrap=".&wrap)
+" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap)
" call Dret("s:NetrwBrowse : s:netrw_skipbrowse=".s:netrw_skipbrowse)
return
endif
@@ -2055,21 +2047,21 @@ fun! s:NetrwBrowse(islocal,dirname)
setlocal ma noro
" call Decho("setlocal ma noro")
let b:netrw_curdir= a:dirname
-" call Decho("exe silent! keepalt file ".s:method."://".s:user.s:machine."/".fnameescape(s:path)." (bt=".&bt.")")
- exe "silent! keepalt file ".s:method."://".s:user.s:machine."/".fnameescape(s:path)
- exe "silent keepalt doau BufReadPre ".s:fname
+" call Decho("exe silent! keepalt file ".fnameescape(s:method."://".s:user.s:machine."/".s:path)." (bt=".&bt.")")
+ exe "silent! keepalt file ".fnameescape(s:method."://".s:user.s:machine."/".s:path)
+ exe "silent keepalt doau BufReadPre ".fnameescape(s:fname)
silent call netrw#NetRead(2,s:method."://".s:user.s:machine."/".s:path)
if s:path !~ '.tar.bz2$' && s:path !~ '.tar.gz'
" netrw.vim and tar.vim have already handled decompression of the tarball; avoiding gzip.vim error
- exe "silent keepalt doau BufReadPost ".s:fname
+ exe "silent keepalt doau BufReadPost ".fnameescape(s:fname)
endif
" save certain window-oriented variables into buffer-oriented variables {{{3
call s:SetBufWinVars()
call s:NetrwOptionRestore("w:")
setlocal ma nomod
-" call Decho("ro=".&ro." ma=".&ma." mod=".&mod." wrap=".&wrap)
+" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap)
" call Dret("s:NetrwBrowse : file<".s:fname.">")
return
endif
@@ -2099,7 +2091,7 @@ fun! s:NetrwBrowse(islocal,dirname)
if reusing
call s:NetrwOptionRestore("w:")
setlocal noma nomod nowrap
-" call Decho("ro=".&ro." ma=".&ma." mod=".&mod." wrap=".&wrap)
+" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap)
" call Dret("s:NetrwBrowse : re-using buffer")
return
endif
@@ -2150,7 +2142,7 @@ fun! s:NetrwBrowse(islocal,dirname)
call s:NetrwOptionRestore("w:")
setlocal noma nomod nowrap
let b:netrw_curdir= dirname
-" call Decho("ro=".&ro." ma=".&ma." mod=".&mod." wrap=".&wrap)
+" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap)
" call Dret("s:NetrwBrowse : reusing buffer#".(exists("bufnum")? bufnum : 'N/A')."<".dirname."> getcwd<".getcwd().">")
return
endif
@@ -2188,7 +2180,7 @@ fun! s:NetrwBrowse(islocal,dirname)
endif
call s:NetrwOptionRestore("w:")
setlocal noma nomod nowrap
-" call Decho("ro=".&ro." ma=".&ma." mod=".&mod." wrap=".&wrap)
+" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap)
" call Dret("s:NetrwBrowse : badly formatted dirname<".dirname.">")
return
endif
@@ -2202,7 +2194,7 @@ fun! s:NetrwBrowse(islocal,dirname)
call s:BrowserMaps(a:islocal)
call s:PerformListing(a:islocal)
-" call Decho("ro=".&ro." ma=".&ma." mod=".&mod." wrap=".&wrap)
+" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap)
" call Dret("s:NetrwBrowse : did PerformListing")
return
endfun
@@ -2299,14 +2291,15 @@ fun! s:NetrwGetBuffer(islocal,dirname)
" note: !~ was used just below, but that means using ../ to go back would match (ie. abc/def/ and abc/ matches)
if bufnum > 0 && bufname(bufnum) != dirname && bufname(bufnum) != '.'
" handle approximate matches
-" call Decho(" handling approx match: bufnum#%d<".bufname(bufnum)."> approx= dirname<".dirname.">")
+" call Decho(" handling approx match: bufnum#%d<".bufname(bufnum)."> approx=dirname<".dirname.">")
let ibuf = 1
let buflast = bufnr("$")
" call Decho(" findbuf2: buflast=".buflast)
while ibuf <= buflast
let bname= substitute(bufname(ibuf),'\\','/','g')
+ let bname= substitute(bname,'.\zs/$','','')
" call Decho(" findbuf3: dirname<".dirname."> bufname(".ibuf.")<".bname.">")
- if bname != '' && bname !~ '/' && dirname =~ '/'.bname.'/\=$' | break | endif
+ if bname != '' && dirname =~ '/'.bname.'/\=$' | break | endif
if bname =~ '^'.dirname.'/\=$' | break | endif
if dirname =~ '^'.bname.'/$' | break | endif
let ibuf= ibuf + 1
@@ -2336,8 +2329,8 @@ fun! s:NetrwGetBuffer(islocal,dirname)
let s:netrw_treelistnum= s:netrw_treelistnum + 1
endif
let w:netrw_treebufnr= bufnr("%")
-" call Decho(" exe silent! keepalt file NetrwTreeListing ".s:netrw_treelistnum)
- exe 'silent! keepalt file NetrwTreeListing\ '.s:netrw_treelistnum
+" call Decho(" exe silent! keepalt file NetrwTreeListing ".fnameescape(s:netrw_treelistnum))
+ exe 'silent! keepalt file NetrwTreeListing\ '.fnameescape(s:netrw_treelistnum)
nnoremap <silent> <buffer> [ :silent call <SID>TreeListMove('[')<cr>
nnoremap <silent> <buffer> ] :silent call <SID>TreeListMove(']')<cr>
nnoremap <silent> <buffer> [[ :silent call <SID>TreeListMove('[')<cr>
@@ -2347,8 +2340,8 @@ fun! s:NetrwGetBuffer(islocal,dirname)
" let v:errmsg= "" " Decho
let escdirname= fnameescape(dirname)
" call Decho(" errmsg<".v:errmsg."> bufnr(".escdirname.")=".bufnr(escdirname)."<".bufname(bufnr(escdirname)).">")
-" call Decho(' exe silent! keepalt file '.escdirname)
- exe 'silent! keepalt file '.escdirname
+" call Decho(' exe silent! keepalt file '.fnameescape(escdirname))
+ exe 'silent! keepalt file '.fnameescape(escdirname)
" call Decho(" errmsg<".v:errmsg."> bufnr(".escdirname.")=".bufnr(escdirname)."<".bufname(bufnr(escdirname)).">")
endif
" call Decho(" named enew buffer#".bufnr("%")."<".bufname("%").">")
@@ -2365,7 +2358,8 @@ fun! s:NetrwGetBuffer(islocal,dirname)
exe "b ".bufnum
endif
if bufname("%") == '.'
- exe "silent! keepalt file ".escape(getcwd(),' ')
+" call Decho("exe silent! keepalt file ".fnameescape(getcwd()))
+ exe "silent! keepalt file ".fnameescape(getcwd())
endif
let &ei= eikeep
if line("$") <= 1
@@ -2393,7 +2387,8 @@ fun! s:NetrwGetBuffer(islocal,dirname)
" call Decho("--do netrw settings: make this buffer not-a-file, modifiable, not line-numbered, etc--")
let fname= expand("%")
call s:NetrwListSettings(a:islocal)
- exe "keepalt file ".escape(fname,' ')
+" call Decho("exe keepalt file ".fnameescape(fname))
+ exe "keepalt file ".fnameescape(fname)
" delete all lines from buffer {{{3
" call Decho("--delete all lines from buffer--")
@@ -2502,8 +2497,13 @@ fun! s:NetrwGetWord()
norm! ma
endif
let rega= @a
- call cursor(line("."),filestart+b:netrw_cpf+1)
- norm! "ay`a
+ let eofname= filestart + b:netrw_cpf + 1
+ if eofname <= col("$")
+ call cursor(line("."),filestart+b:netrw_cpf+1)
+ norm! "ay`a
+ else
+ norm! "ay$
+ endif
let dirname = @a
let @a = rega
" call Decho("2: dirname<".dirname.">")
@@ -2526,9 +2526,10 @@ endfun
fun! s:NetrwListSettings(islocal)
" call Dfunc("s:NetrwListSettings(islocal=".a:islocal.")")
let fname= bufname("%")
- setlocal bt=nofile nobl ma nonu nowrap noro
" call Decho("setlocal bt=nofile nobl ma nonu nowrap noro")
- exe "keepalt file ".escape(fname,' ')
+ setlocal bt=nofile nobl ma nonu nowrap noro
+" call Decho("exe keepalt file ".fnameescape(fname))
+ exe "keepalt file ".fnameescape(fname)
if g:netrw_use_noswf
setlocal noswf
endif
@@ -2642,7 +2643,7 @@ fun! s:NetrwBookmarkMenu()
let histcnt = histcnt + 1
let priority = g:NETRW_DIRHIST_CNT + histcnt
if exists("g:NETRW_DIRHIST_{cnt}")
- let bmdir= escape(g:NETRW_DIRHIST_{cnt},'. ')
+ let bmdir= escape(g:NETRW_DIRHIST_{cnt},'/&? ')
" call Decho('silent! menu '.g:NetrwMenuPriority.".3.".priority." ".g:NetrwTopLvlMenu.'History.'.bmdir.' :e '.bmdir)
exe 'silent! menu '.g:NetrwMenuPriority.".3.".priority." ".g:NetrwTopLvlMenu.'History.'.bmdir.' :e '.bmdir."\<cr>"
endif
@@ -2718,7 +2719,6 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...)
" call Decho("handling a file: dirname<".dirname."> (a:0=".a:0.")")
" this lets NetrwBrowseX avoid the edit
if a:0 < 1
-" call Decho("dirname<".dirname."> netrw_cd_escape<".g:netrw_cd_escape."> browse_split=".g:netrw_browse_split)
" call Decho("set up windows for editing<".fnameescape(dirname)."> didsplit=".(exists("s:didsplit")? s:didsplit : "doesn't exist"))
call s:NetrwOptionRestore("s:")
if !exists("s:didsplit")
@@ -2900,15 +2900,13 @@ fun! netrw#NetrwBrowseX(fname,remote)
if has("win32") || has("win95") || has("win64") || has("win16")
let exten= substitute(exten,'^.*$','\L&\E','')
endif
- let fname= escape(a:fname,"%#")
-" call Decho("fname<".fname."> after escape()")
" seems kde systems often have gnome-open due to dependencies, even though
" gnome-open's subsidiary display tools are largely absent. Kde systems
" usually have "kdeinit" running, though... (tnx Mikolaj Machowski)
if !exists("s:haskdeinit")
if has("unix")
- let s:haskdeinit= s:System("system",'ps -e') =~ 'kdeinit'
+ let s:haskdeinit= system("ps -e") =~ 'kdeinit'
if v:shell_error
let s:haskdeinit = 0
endif
@@ -2921,12 +2919,14 @@ fun! netrw#NetrwBrowseX(fname,remote)
if a:remote == 1
" create a local copy
let fname= fnamemodify(tempname(),":r").".".exten
-" call Decho("a:remote=".a:remote.": create a local copy of <".a:fname."> as <".fname.">")
- exe "silent keepjumps bot 1new ".a:fname
+" call Decho("a:remote=".a:remote.": create a local copy of <".fname."> as <".fname.">")
+ exe "silent keepjumps bot 1new ".fnameescape(fname)
setlocal bh=delete
-" call Decho("read <".fname.">, now writing: exe w! ".fname)
- exe "silent! w! ".fname
+" call Decho("read <".fnameescape(fname).">, now writing: exe w! ".fnameescape(fname))
+ exe "silent! w! ".fnameescape(fname)
q
+ else
+ let fname= a:fname
endif
" call Decho("exten<".exten."> "."netrwFileHandlers#NFH_".exten."():exists=".exists("*netrwFileHandlers#NFH_".exten))
@@ -2972,29 +2972,29 @@ fun! netrw#NetrwBrowseX(fname,remote)
elseif exists("g:netrw_browsex_viewer") && executable(viewer)
" call Decho("g:netrw_browsex_viewer<".g:netrw_browsex_viewer.">")
-" call Decho("exe silent !".viewer." ".viewopt.shellescape(fname).redir)
- exe "silent !".viewer." ".viewopt.shellescape(fname).redir
+" call Decho("exe silent !".viewer." ".viewopt.shellescape(fname,1).redir)
+ exe "silent !".viewer." ".viewopt.shellescape(fname,1).redir
let ret= v:shell_error
elseif has("win32") || has("win64")
-" call Decho('exe silent !start rundll32 url.dll,FileProtocolHandler '.shellescape(fname))
- exe 'silent !start rundll32 url.dll,FileProtocolHandler '.shellescape(fname)
+" call Decho('exe silent !start rundll32 url.dll,FileProtocolHandler '.shellescape(fname,1))
+ exe 'silent !start rundll32 url.dll,FileProtocolHandler '.shellescape(fname,1)
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
let ret= v:shell_error
elseif has("unix") && executable("gnome-open") && !s:haskdeinit
-" call Decho("exe silent !gnome-open ".shellescape(fname)." ".redir)
- exe "silent !gnome-open ".shellescape(fname).redir
+" call Decho("exe silent !gnome-open ".shellescape(fname,1)." ".redir)
+ exe "silent !gnome-open ".shellescape(fname,1).redir
let ret= v:shell_error
elseif has("unix") && executable("kfmclient") && s:haskdeinit
-" call Decho("exe silent !kfmclient exec ".shellescape(fname)." ".redir)
- exe "silent !kfmclient exec ".shellescape(fname)." ".redir
+" call Decho("exe silent !kfmclient exec ".shellescape(fname,1)." ".redir)
+ exe "silent !kfmclient exec ".shellescape(fname,1)." ".redir
let ret= v:shell_error
elseif has("macunix") && executable("open")
-" call Decho("exe silent !open ".shellescape(fname)." ".redir)
- exe "silent !open ".shellescape(fname)." ".redir
+" call Decho("exe silent !open ".shellescape(fname,1)." ".redir)
+ exe "silent !open ".shellescape(fname,1)." ".redir
let ret= v:shell_error
else
@@ -3007,7 +3007,8 @@ fun! netrw#NetrwBrowseX(fname,remote)
let ret= netrwFileHandlers#Invoke(exten,fname)
endif
-" redraw!
+ " restoring redraw! after external file handlers
+ redraw!
" cleanup: remove temporary file,
" delete current buffer if success with handler,
@@ -3016,7 +3017,7 @@ fun! netrw#NetrwBrowseX(fname,remote)
" temporary file because it wasn't getting seen.
" if a:remote == 1 && fname != a:fname
" call Decho("deleting temporary file<".fname.">")
-" call s:System("delete",fname)
+" call s:NetrwDelete(fname)
" endif
if a:remote == 1
@@ -3652,8 +3653,8 @@ fun! s:NetrwMakeDir(usrhost)
let netrw_origdir= s:NetrwGetcwd(1)
exe 'keepjumps lcd '.fnameescape(b:netrw_curdir)
" call Decho("netrw_origdir<".netrw_origdir.">: lcd b:netrw_curdir<".fnameescape(b:netrw_curdir).">")
-" call Decho("exe silent! !".g:netrw_local_mkdir.' '.shellescape(newdirname))
- exe "silent! !".g:netrw_local_mkdir.' '.shellescape(newdirname)
+" call Decho("exe silent! !".g:netrw_local_mkdir.' '.shellescape(newdirname,1))
+ exe "silent! !".g:netrw_local_mkdir.' '.shellescape(newdirname,1)
if !g:netrw_keepdir
exe 'keepjumps lcd '.fnameescape(netrw_origdir)
" call Decho("netrw_keepdir=".g:netrw_keepdir.": keepjumps lcd ".fnameescape(netrw_origdir)." getcwd<".getcwd().">")
@@ -3676,8 +3677,8 @@ fun! s:NetrwMakeDir(usrhost)
" call Decho("remote mkdir")
let mkdircmd = s:MakeSshCmd(g:netrw_mkdir_cmd)
let newdirname= substitute(b:netrw_curdir,'^\%(.\{-}/\)\{3}\(.*\)$','\1','').newdirname
-" call Decho("exe silent! !".mkdircmd." ".shellescape(newdirname))
- exe "silent! !".mkdircmd." ".shellescape(newdirname)
+" call Decho("exe silent! !".mkdircmd." ".shellescape(newdirname,1))
+ exe "silent! !".mkdircmd." ".shellescape(newdirname,1)
if v:shell_error == 0
" refresh listing
let svpos= netrw#NetrwSavePosn()
@@ -3818,14 +3819,14 @@ fun! s:NetrwMarkFileCompress(islocal)
for sfx in sort(keys(g:netrw_decompress))
if fname =~ '\'.sfx.'$'
" fname has a suffix indicating that its compressed; apply associated decompression routine
- let exe= g:netrw_decompress[sfx]
+ let exe= s:WinPath(g:netrw_decompress[sfx])
" call Decho("fname<".fname."> is compressed so decompress with <".exe.">")
if a:islocal
if g:netrw_keepdir
- let fname= s:ComposePath(curdir,fname)
+ let fname= shellescape(s:ComposePath(curdir,fname))
endif
else
- let fname= b:netrw_curdir.fname
+ let fname= shellescape(b:netrw_curdir.fname)
endif
if executable(exe)
if a:islocal
@@ -3843,10 +3844,10 @@ fun! s:NetrwMarkFileCompress(islocal)
unlet exe
elseif a:islocal
" fname not a compressed file, so compress it
- call system(g:netrw_compress." ".s:ComposePath(b:netrw_curdir,fname))
+ call system(s:WinPath(g:netrw_compress)." ".shellescape(s:ComposePath(b:netrw_curdir,fname)))
else
" fname not a compressed file, so compress it
- call s:RemoteSystem(g:netrw_compress." ".fname)
+ call s:RemoteSystem(s:WinPath(g:netrw_compress)." ".shellescape(fname))
endif
endfor