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

updated for version 7.0002

This commit is contained in:
Bram Moolenaar 2004-06-20 12:51:53 +00:00
parent ed20346f0b
commit 69a7cb473c
46 changed files with 2334 additions and 1734 deletions

View File

@ -1,4 +1,4 @@
*change.txt* For Vim version 7.0aa. Last change: 2004 Jun 15
*change.txt* For Vim version 7.0aa. Last change: 2004 Jun 16
VIM REFERENCE MANUAL by Bram Moolenaar
@ -1048,7 +1048,7 @@ operation. When something has been dropped onto Vim, the "~ register is
filled in and the <Drop> pseudo key is sent for notification. You can remap
this key if you want; the default action (for all modes) is to insert the
contents of the "~ register at the cursor position. {not in Vi}
{only available when compiled with the |+dnd| feature, curently only with the
{only available when compiled with the |+dnd| feature, currently only with the
GTK GUI}
Note: The "~ register is only used when dropping plain text onto Vim.
@ -1138,6 +1138,13 @@ gw{motion} Format the lines that {motion} moves over. Similar to
the text. However, 'formatprg' is not used.
{not in Vi}
gwgw *gwgw* *gww*
gww Format the current line as with "gw". {not in Vi}
*v_gw*
{Visual}gw Format the highlighted text as with "gw". (for
{Visual} see |Visual-mode|). {not in Vi}
Example: To format the current paragraph use: *gqap* >
gqap

View File

@ -1,4 +1,4 @@
*editing.txt* For Vim version 7.0aa. Last change: 2004 Jun 14
*editing.txt* For Vim version 7.0aa. Last change: 2004 Jun 17
VIM REFERENCE MANUAL by Bram Moolenaar
@ -340,10 +340,11 @@ directly before the first or just after the last backtick.
*`=*
You can have the backticks expanded as a Vim expression, instead of
an external command, by using the syntax `={expr}` e.g. >
an external command, by using the syntax `={expr}` e.g.: >
:let foo='bar'
:e `=foo . ".c" `
edits "bar.c". Note that the expression cannot contain a backtick.
This will edit "bar.c". The expression can contain just about anything, thus
this can also be used to avoid the special meaning of '"', '|', '%' and '#'.
*++opt* *[++opt]*
The [++opt] argument can be used to force the value of 'fileformat' or

View File

@ -1,4 +1,4 @@
*eval.txt* For Vim version 7.0aa. Last change: 2004 May 18
*eval.txt* For Vim version 7.0aa. Last change: 2004 Jun 20
VIM REFERENCE MANUAL by Bram Moolenaar
@ -515,7 +515,7 @@ Another example that does the same: >
command Tick let s:counter = s:counter + 1 | echo s:counter
When calling a function and invoking a user-defined command, the context for
script varialbes is set to the script where the function or command was
script variables is set to the script where the function or command was
defined.
The script variables are also available when a function is defined inside a
@ -972,9 +972,13 @@ browse({save}, {title}, {initdir}, {default})
bufexists({expr}) *bufexists()*
The result is a Number, which is non-zero if a buffer called
{expr} exists.
If the {expr} argument is a number, buffer numbers are used.
If the {expr} argument is a string it must match a buffer name
exactly.
If the {expr} argument is a number buffer numbers are used.
exactly. The name can be:
- Relative to the current directory.
- A full path.
- The name of a buffer with 'filetype' set to "nofile".
- A URL name.
Unlisted buffers will be found.
Note that help files are listed by their short name in the
output of |:buffers|, but bufexists() requires using their
@ -987,12 +991,12 @@ bufexists({expr}) *bufexists()*
buflisted({expr}) *buflisted()*
The result is a Number, which is non-zero if a buffer called
{expr} exists and is listed (has the 'buflisted' option set).
The {expr} argument is used like with bufexists().
The {expr} argument is used like with |bufexists()|.
bufloaded({expr}) *bufloaded()*
The result is a Number, which is non-zero if a buffer called
{expr} exists and is loaded (shown in a window or hidden).
The {expr} argument is used like with bufexists().
The {expr} argument is used like with |bufexists()|.
bufname({expr}) *bufname()*
The result is the name of a buffer, as it is displayed by the
@ -1233,6 +1237,9 @@ executable({expr}) *executable()*
This function checks if an executable with the name {expr}
exists. {expr} must be the name of the program without any
arguments. executable() uses the normal $PATH.
On MS-DOS and MS-Windows the ".exe", ".bat", etc. must be
included. It only checks if the file exists and is not a
directory, not if it's really executable.
The result is a Number:
1 exists
0 does not exist
@ -1910,7 +1917,7 @@ line({expr}) The result is a Number, which is the line number of the file
This autocommand jumps to the last known position in a file
just after opening it, if the '" mark is set: >
:au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal g'\"" | endif
<
line2byte({lnum}) *line2byte()*
Return the byte count from the start of the buffer for line
{lnum}. This includes the end-of-line character, depending on
@ -2746,7 +2753,7 @@ fork Compiled to use fork()/exec() instead of system().
gettext Compiled with message translation |multi-lang|
gui Compiled with GUI enabled.
gui_athena Compiled with Athena GUI.
gui_beos Compiled with BeOs 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_mac Compiled with Macintosh GUI.
@ -2801,7 +2808,7 @@ scrollbind Compiled with 'scrollbind' support.
showcmd Compiled with 'showcmd' support.
signs Compiled with |:sign| support.
smartindent Compiled with 'smartindent' support.
sniff Compiled with SniFF interface support.
sniff Compiled with SNiFF interface support.
statusline Compiled with support for 'statusline', 'rulerformat'
and special formats of 'titlestring' and 'iconstring'.
sun_workshop Compiled with support for Sun |workshop|.

View File

@ -1,4 +1,4 @@
*farsi.txt* For Vim version 7.0aa. Last change: 2002 Oct 29
*farsi.txt* For Vim version 7.0aa. Last change: 2004 Jun 16
VIM REFERENCE MANUAL by Mortaza Ghassab Shiran
@ -66,7 +66,7 @@ If the "extra" archive has been unpacked, the following files are found in the
subdirectories of the '$VIM/farsi' directory:
+ far-a01.pcf X Windows fonts for Unix including Linux systems
+ far-a01.bf X Windows fonts for SunOs
+ far-a01.bf X Windows fonts for SunOS
+ far-a01.f16 a screen fonts for Unix including Linux systems
+ far-a01.fon a monospaced fonts for Windows NT/95/98
+ far-a01.com a screen fonts for DOS
@ -92,7 +92,7 @@ o Installation of fonts for X Window systems (Unix/Linux)
> mkfontdir
> xset +fp path_name_of_farsi_fonts_directory
o Installation of fonts for X Window systems (SunOs)
o Installation of fonts for X Window systems (SunOS)
Copy far-a01.bf font into a directory of your choice.
Change to the directory containing the far-a01.fb fonts and

View File

@ -1,4 +1,4 @@
*index.txt* For Vim version 7.0aa. Last change: 2004 May 24
*index.txt* For Vim version 7.0aa. Last change: 2004 Jun 16
VIM REFERENCE MANUAL by Bram Moolenaar
@ -130,8 +130,8 @@ tag char action ~
|i_<C-Home>| <C-Home> cursor to start of file
|i_<End>| <End> cursor past end of line
|i_<C-End>| <C-End> cursor past end of file
|i_<PageUp>| <PageUp> one screenfull backward
|i_<PageDown>| <PageDown> one screenfull forward
|i_<PageUp>| <PageUp> one screenful backward
|i_<PageDown>| <PageDown> one screenful forward
|i_<F1>| <F1> same as <Help>
|i_<Help>| <Help> stop insert mode and display help window
|i_<Insert>| <Insert> toggle Insert/Replace mode

View File

@ -1,4 +1,4 @@
*insert.txt* For Vim version 7.0aa. Last change: 2004 Apr 09
*insert.txt* For Vim version 7.0aa. Last change: 2004 Jun 16
VIM REFERENCE MANUAL by Bram Moolenaar
@ -908,7 +908,7 @@ gi Insert text in the same position as where Insert mode
The position is corrected for inserted/deleted lines,
but NOT for inserted/deleted characters.
When the |:keepjumps| command modifier is used the |'^|
mark wont be changed.
mark won't be changed.
{not in Vi}
*o*

View File

@ -1,4 +1,4 @@
*mbyte.txt* For Vim version 7.0aa. Last change: 2004 Jun 07
*mbyte.txt* For Vim version 7.0aa. Last change: 2004 Jun 16
VIM REFERENCE MANUAL by Bram Moolenaar et al.
@ -141,7 +141,7 @@ There are several ways to enter multi-byte characters:
- For all systems keymaps can be used. See |mbyte-keymap|.
The options 'iminsert', 'imsearch' and 'imcmdline' can be used to chose
the different input medhods or disable them temporarily.
the different input methods or disable them temporarily.
==============================================================================
2. Locale *mbyte-locale*
@ -906,7 +906,7 @@ IME status to that memorized automatically.
This works on not only insert-normal mode, but also search-command input and
replace mode.
The options 'iminsert', 'imsearch' and 'imcmdline' can be used to chose
the different input medhods or disable them temporarily.
the different input methods or disable them temporarily.
WHAT IS IME
IME is a part of East asian version Windows. That helps you to input

View File

@ -1,4 +1,4 @@
*motion.txt* For Vim version 7.0aa. Last change: 2004 May 13
*motion.txt* For Vim version 7.0aa. Last change: 2004 Jun 17
VIM REFERENCE MANUAL by Bram Moolenaar
@ -672,11 +672,12 @@ m[ or m] Set the |'[| or |']| mark. Useful when an operator is
the cursor, this is not a motion command).
*:ma* *:mark* *E191*
:[range]ma[rk] {a-zA-Z} Set mark {a-zA-Z} at last line number in [range],
:[range]ma[rk] {a-zA-Z'}
Set mark {a-zA-Z'} at last line number in [range],
column 0. Default is cursor line.
*:k*
:[range]k{a-zA-Z} Same as :mark, but the space before the mark name can
:[range]k{a-zA-Z'} Same as :mark, but the space before the mark name can
be omitted.
*'* *'a* *`* *`a*
@ -692,7 +693,9 @@ g'{mark} g`{mark}
jumping within the current buffer. Example: >
g`"
< jumps to the last known position in a file. See
$VIMRUNTIME/vimrc_example.vim. {not in Vi}
$VIMRUNTIME/vimrc_example.vim.
Also see |:keepjumps|.
{not in Vi}
*:marks*
:marks List all the current marks (not a motion command).
@ -868,7 +871,7 @@ These commands are not marks themselves, but jump to a mark:
or larger than before, all marks are kept at the
same line number.
- When the number of lines decreases, the marks in the
ilnes that disappeared are deleted.
lines that disappeared are deleted.
In any case the marks below the filtered text have
their line numbers adjusted, thus stick to the text,
as usual.
@ -877,12 +880,22 @@ These commands are not marks themselves, but jump to a mark:
*:keepj* *:keepjumps*
:keepj[umps] {command}
Do not change the |''|, |'.| and |'^| marks, the
|jumplist| or the |changelist|. Useful when making a
change or inserting text automatically and the user
doesn't want to go to this position. E.g., when
updating a "Last change" timestamp: >
autocmd BufWritePre,FileWritePre *.abc keepjumps call SetLastChange()
Moving around in {command} does not change the |''|,
|'.| and |'^| marks, the |jumplist| or the
|changelist|.
Useful when making a change or inserting text
automatically and the user doesn't want to go to this
position. E.g., when updating a "Last change"
timestamp in the first line: >
:let lnum = getline(".")
:keepjumps normal gg
:call SetLastChange()
:keepjumps exe "normal " . lnum . "G"
<
Note that ":keepjumps" must be used for every command.
When invoking a function the commands in that function
can still change the jumplist.
==============================================================================
8. Jumps *jump-motions*

View File

@ -1,4 +1,4 @@
*netbeans.txt* For Vim version 7.0aa. Last change: 2004 May 01
*netbeans.txt* For Vim version 7.0aa. Last change: 2004 Jun 16
VIM REFERENCE MANUAL by Gordon Prieur
@ -180,7 +180,7 @@ Region is guarded, cannot modify
change.
*E656*
NetBeans dissallows writes of unmodified buffers
NetBeans disallows writes of unmodified buffers
NetBeans does not support writes of unmodified buffers that
were opened from NetBeans.
@ -245,7 +245,7 @@ could cause confusion. The netbeans_saved() function sent a "save" protocol
command. In protocol version 2.1 and earlier this was incorrectly interpreted
as a notification that a write had taken place. In reality, it told NetBeans
to save the file so multiple writes were being done. This caused various
problems and has been fixed in 2.2. To decrease the likelyhood of this
problems and has been fixed in 2.2. To decrease the likelihood of this
confusion happening again, netbeans_saved() has been renamed to
netbeans_save_buffer().

View File

@ -1,4 +1,4 @@
*os_mac.txt* For Vim version 7.0aa. Last change: 2004 Apr 27
*os_mac.txt* For Vim version 7.0aa. Last change: 2004 Jun 19
VIM REFERENCE MANUAL by Bram Moolenaar et al.
@ -74,11 +74,16 @@ A: Under Window Settings, Emulation, make sure that "Escape non-ASCII
==============================================================================
4. Mac Lack *mac-lack*
-The filenames containing both ":" and "/" are sometimes misinterpreted.
(just re-execute the command)
-Scrollbar are not scrolling live, and when only the arrow or scroll area,
a limit of 32 line or page is scrolled.
-Syntax highlighting works on 68k Macs but is _really_ slow.
The filenames containing both ":" and "/" are sometimes misinterpreted. (just
re-execute the command)
Scrollbar are not scrolling live, and when only the arrow or scroll area, a
limit of 32 line or page is scrolled.
Syntax highlighting works on 68k Macs but is _really_ slow.
In a terminal CTRL-^ needs to be entered as Shift-Control-6. CTRL-@ as
Shift-Control-2.
==============================================================================
5. Mac Bug Report *mac-bug*

View File

@ -1,4 +1,4 @@
*os_vms.txt* For Vim version 7.0aa. Last change: 2004 May 16
*os_vms.txt* For Vim version 7.0aa. Last change: 2004 Jun 16
VIM REFERENCE MANUAL
@ -280,7 +280,7 @@ For more information type $help set disp in VMS prompt.
You need to set up one X server and run Vim as in point 2.
For MS Windows there are available free X servers as MIX , Omni X etc.
as well as excellent commercial products as eXcursion or ReflectionX with
buit in DEC support.
built in DEC support.
Please note, that executables without GUI are slightly faster during startup
then with enabled GUI in character mode. Therefore, if you do not use GUI

View File

@ -1,4 +1,4 @@
*pi_netrw.txt* For Vim version 7.0aa. Last change: Apr 21, 2004
*pi_netrw.txt* For Vim version 6.2. Last change: Jun 15, 2004
VIM REFERENCE MANUAL by Charles E. Campbell, Jr.
@ -16,9 +16,10 @@
4. Transparent File Transfer...........................|netrw-transparent|
5. Ex Commands.........................................|netrw-ex|
6. Variables and Options...............................|netrw-var|
7. Debugging...........................................|netrw-debug|
8. New Stuff...........................................|netrw-new|
9. Credits.............................................|netrw-credits|
7. Remote Directory Listing............................|netrw-dir|
8. Debugging...........................................|netrw-debug|
9. History.............................................|netrw-history|
10. Credits.............................................|netrw-credits|
The functionality mentioned here is done via using |standard-plugin|
techniques. This plugin is only available if
@ -54,7 +55,7 @@ in your <.vimrc> file: >
dav: g:netrw_dav_cmd = "cadaver"
fetch: g:netrw_fetch_cmd = "fetch -o"
ftp: g:netrw_ftp_cmd = "ftp"
http: g:netrw_http_cmd = "fetch -o" else if fetch is available
http: g:netrw_http_cmd = "fetch -o" if fetch is available
http: g:netrw_http_cmd = "wget -q -O" If wget is available
rcp: g:netrw_rcp_cmd = "rcp"
rsync: g:netrw_rsync_cmd = "rsync -a"
@ -88,6 +89,9 @@ in your <.vimrc> file: >
:Nwrite "sftp://[user@]machine/file" uses sftp
http: not supported!
DIRECTORY LISTING
:Nread [protocol]://[user]@hostname/path/
USER AND PASSWORD CHANGING
Attempts to use ftp will prompt you for a user-id and a password.
These will be saved in g:netrw_uid and g:netrw_passwd Subsequent uses
@ -148,7 +152,7 @@ transfer/protocol. Files are read from/written to a temporary file
clean up.
One may modify any protocol's implementing external application
by setting a variable (ex. scp uses the variable g:netrw_scp_cmd,
by settinbg a variable (ex. scp uses the variable g:netrw_scp_cmd,
which is defaulted to "scp -q").
Ftp, an old protocol, seems to be blessed by numerous implementations.
@ -229,7 +233,7 @@ additional prompting.
(*2) if <.netrc> is present, it is assumed that it will
work with your ftp client. Otherwise the script will
prompt for user-id and password.
prompt for user-id and pasword.
(*3) for ftp, "machine" may be machine#port or machine:port
if a different port is needed than the standard ftp port
@ -331,15 +335,19 @@ additional commands available.
The script <netrw.vim> uses several variables which can affect <netrw.vim>'s
behavior. These variables typically may be set in the user's <.vimrc> file:
g:netrw_uid Holds current user-id for ftp.
g:netrw_passwd Holds current password for ftp.
b:netrw_lastfile Holds latest method/machine/path.
b:netrw_line Holds current line number (during NetWrite)
>
-------------
Netrw Options
-------------
Option Meaning
-------------- -----------------------------------------------
<
b:netrw_col Holds current cursor position (during NetWrite)
g:netrw_cygwin =1 assume scp under windows is from cygwin
(default/windows)
=0 assume scp under windows accepts windows
style paths (default/else)
g:netrw_ftp =0 use default ftp (uid password)
=1 use alternate ftp (user uid password)
(see |netrw-options|)
g:netrw_ftpmode ="binary" (default)
="ascii" (your choice)
g:netrw_ignorenetrc =1 (default)
@ -347,30 +355,45 @@ behavior. These variables typically may be set in the user's <.vimrc> file:
want it used, then set this variable. Its
mere existence is enough to cause <.netrc>
to be ignored.
g:netrw_win95ftp =0 use unix-style ftp even if win95/98/ME/etc
=1 use default method to do ftp
g:netrw_cygwin =1 assume scp under windows is from cygwin
(default/windows)
=0 assume scp under windows accepts windows
style paths (default/else)
b:netrw_lastfile Holds latest method/machine/path.
b:netrw_line Holds current line number (during NetWrite)
g:netrw_passwd Holds current password for ftp.
g:netrw_silent =0 transfers done normally
=1 transfers done silently
g:netrw_uid Holds current user-id for ftp.
=1 use alternate ftp (user uid password)
(see |netrw-options|)
g:netrw_use_nt_rcp =0 don't use WinNT/2K/XP's rcp (default)
=1 use WinNT/2K/XP's rcp, binary mode
g:netrw_win95ftp =0 use unix-style ftp even if win95/98/ME/etc
=1 use default method to do ftp >
-----------------------------------------------------------------------
<
The script will also make use of the following variables internally, albeit
temporarily.
>
-------------------
Temporary Variables
-------------------
Variable Meaning
-------- ------------------------------------
<
g:netrw_method Index indicating rcp/ftp+.netrc/ftp
g:netrw_machine Holds machine name parsed from input
g:netrw_fname Holds filename being accessed
g:netrw_fname Holds filename being accessed >
------------------------------------------------------------
<
*netrw-protocol*
Netrw supports a number of protocols. These protocols are invoked using the
variables listed below, and may be modified by the user.
>
------------------------
Protocol Control Options
------------------------
Option Type Setting Meaning ~
--------- -------- -------------- --------------------------- >
Option Type Setting Meaning
--------- -------- -------------- ---------------------------
<
netrw_ftp variable =doesn't exist userid set by "user userid"
=0 userid set by "user userid"
=1 userid set by "userid"
@ -384,10 +407,12 @@ temporarily.
g:netrw_ftp_cmd variable ="ftp"
g:netrw_http_cmd variable ="fetch -o" else if fetch is executable
g:netrw_http_cmd variable ="wget -O" if wget is executable
g:netrw_list_cmd variable ="ssh HOSTNAME ls -Fa"
g:netrw_rcp_cmd variable ="rcp"
g:netrw_rsync_cmd variable ="rsync -a"
g:netrw_scp_cmd variable ="scp -q"
g:netrw_sftp_cmd variable ="sftp"
g:netrw_sftp_cmd variable ="sftp" >
-------------------------------------------------------------------------
<
The first two options both help with certain ftp's that give trouble otherwise.
In order to best understand how to use these options if ftp is giving you
@ -396,16 +421,21 @@ troubles, a bit of discussion follows on how netrw does ftp reads.
The g:netrw_..._cmd variables specify the external program to use handle
the associated protocol (rcp, ftp, etc), plus any options.
Netrw typically builds up lines of one of the following formats in a
The g:netrw_list_cmd's HOSTNAME entry will be changed via substitution with
whatever the current request is for a hostname.
For ftp, netrw typically builds up lines of one of the following formats in a
temporary file:
>
IF g:netrw_ftp !exists or is not 1 IF g:netrw_ftp exists and is 1
---------------------------------- ------------------------------
<
open machine [port] open machine [port]
user userid password userid password
[g:netrw_ftpmode] password
get filename tempfile [g:netrw_ftpmode]
get filename tempfile
get filename tempfile >
---------------------------------------------------------------------
<
Netrw then executes the lines above by use of a filter:
>
@ -418,7 +448,7 @@ where
-n means don't use netrc and is used for Method #3 (ftp w/o <.netrc>)
If <.netrc> exists it will be used to avoid having to query the user for
userid and password). The transferred file is put into a temporary file.
userid and password. The transferred file is put into a temporary file.
The temporary file is then read into the main editing session window that
requested it and the temporary file deleted.
@ -453,7 +483,7 @@ and so it is desirable to automate their removal. Here's some code taken
from <netrw.vim> itself:
>
if has("win95") && g:netrw_win95ftp
fu! NetReadFixup(method, line1, line2)
fun! NetReadFixup(method, line1, line2)
if method == 3 " ftp (no <.netrc>)
let fourblanklines= line2 - 3
silent fourblanklines.",".line2."g/^\s*/d"
@ -463,7 +493,32 @@ from <netrw.vim> itself:
>
==============================================================================
7. Debugging *netrw-debug*
7. Remote Directory Listing *netrw-dir* *netrw-list*
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:
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:
ssh HOSTNAME ls -Fa
where the HOSTNAME becomes the hostname as requested by the attempted
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.
==============================================================================
8. Debugging *netrw-debug*
The <netrw.vim> script is typically available as:
@ -494,8 +549,17 @@ which is loaded automatically at startup (assuming :set nocp).
drchipNOSPAM at campbellfamily.biz - NOSPAM
==============================================================================
8. New Stuff *netrw-new* *netrw-newstuff*
9. History *netrw-history*
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
to better handle errors in using protocols
(e.g. scp:usr@host:file was being recognized as an rcp request)
v44: * changed from "rsync -a" to just "rsync"
* somehow an editing error messed up the test to recognize
use of the fetch method for NetRead.
* more debugging statements included
v43: * moved "Explanation" comments to <pi_netrw.txt> help file
as "Network Reference" (|netrw-ref|)
* <netrw.vim> now uses Dfunc() Decho() and Dret() for debugging
@ -518,7 +582,7 @@ which is loaded automatically at startup (assuming :set nocp).
==============================================================================
9. Credits *netrw-credits*
10. Credits *netrw-credits*
Vim editor by Bram Moolenaar (Thanks, Bram!)
dav support by C Campbell

View File

@ -1,4 +1,4 @@
*quickfix.txt* For Vim version 7.0aa. Last change: 2004 May 20
*quickfix.txt* For Vim version 7.0aa. Last change: 2004 Jun 16
VIM REFERENCE MANUAL by Bram Moolenaar
@ -795,7 +795,7 @@ processing.
Maintaining the correct directory is more complicated if you don't use
GNU-make. AIX-make for example doesn't print any information about its working
directory. Then you need to enhance the makefile. In the makefile of lesstiff
directory. Then you need to enhance the makefile. In the makefile of LessTif
there is a command which echoes "Making {target} in {dir}". The special
problem here is that it doesn't print informations on leaving the directory
and that it doesn't print the absolute path.

View File

@ -1,4 +1,4 @@
*recover.txt* For Vim version 7.0aa. Last change: 2004 Apr 16
*recover.txt* For Vim version 7.0aa. Last change: 2004 Jun 16
VIM REFERENCE MANUAL by Bram Moolenaar
@ -61,7 +61,7 @@ Disadvantages:
directories (although Vim tries to avoid that by comparing the path name).
This will result in bogus ATTENTION warning messages.
- When you use your home directory, and somebody else tries to edit the same
file, he will not see your swap file and will not get the ATTENTION waring
file, he will not see your swap file and will not get the ATTENTION warning
message.
On the Amiga you can also use a recoverable ram disk, but there is no 100%
guarantee that this works. Putting swap files in a normal ram disk (like RAM:

View File

@ -1,4 +1,4 @@
*sponsor.txt* For Vim version 7.0aa. Last change: 2004 Apr 23
*sponsor.txt* For Vim version 7.0aa. Last change: 2004 Jun 16
VIM REFERENCE MANUAL by Bram Moolenaar
@ -83,9 +83,10 @@ Bank transfer Transfer to Bram's account at the Postbank: 1644503. For
show others you are a registered Vim user or sponsor.
Cash Small amounts can be send with ordinary mail. Put something
around the money, so that it's not noticable from the outside.
Mention your e-mail address if you want to vote for features
and show others you are a registered Vim user or sponsor.
around the money, so that it's not noticeable from the
outside. Mention your e-mail address if you want to vote for
features and show others you are a registered Vim user or
sponsor.
This is Bram's address: Bram Moolenaar
Clematisstraat 30

View File

@ -1,4 +1,4 @@
*starting.txt* For Vim version 7.0aa. Last change: 2004 Jun 15
*starting.txt* For Vim version 7.0aa. Last change: 2004 Jun 18
VIM REFERENCE MANUAL by Bram Moolenaar
@ -1222,7 +1222,7 @@ Note that Views and Sessions are not perfect:
- They don't restore everything. For example, defined functions, autocommands
and ":syntax on" are not included. Things like register contents and
command line history are in viminfo, not in Sessions or Views.
- Global option values are only set when the differ from the default value.
- Global option values are only set when they differ from the default value.
When the current value is not the default value, loading a Session will not
set it back to the default value. Local options will be set back to the
default value though.

View File

@ -1,4 +1,4 @@
*syntax.txt* For Vim version 7.0aa. Last change: 2004 Jun 15
*syntax.txt* For Vim version 7.0aa. Last change: 2004 Jun 16
VIM REFERENCE MANUAL by Bram Moolenaar
@ -739,7 +739,7 @@ variable.
CYNLIB *cynlib.vim* *cynlib-syntax*
Cynlib files are C++ files that use the Cynlib class library to enable
hardware modeling and simulation using C++. Typically Cynlib files have a .cc
hardware modelling and simulation using C++. Typically Cynlib files have a .cc
or a .cpp extension, which makes it very difficult to distinguish them from a
normal C++ file. Thus, to enable Cynlib highlighting for .cc files, add this
line to your .vimrc file: >
@ -1664,7 +1664,7 @@ file: >
let b:preprocs_as_sections = 1
As well, the syntax file adds an extra paragraph marker for the exdented
As well, the syntax file adds an extra paragraph marker for the extended
paragraph macro (.XP) in the ms package.
Finally, there is a |groff.vim| syntax file that can be used for enabling

View File

@ -1,4 +1,4 @@
*todo.txt* For Vim version 7.0aa. Last change: 2004 Jun 16
*todo.txt* For Vim version 7.0aa. Last change: 2004 Jun 20
VIM REFERENCE MANUAL by Bram Moolenaar
@ -30,19 +30,10 @@ be worked on, but only if you sponsor Vim development. See |sponsor|.
*known-bugs*
-------------------- Known bugs and current work -----------------------
This example doesn't work:
:e `=foo . ".c" `
Inside `` don't use " as the start of a comment.
Also don't expand % or #.
Corrections for docs from A3. Skip ones already done.
For version 7.0:
- Include many PATCHES:
9 Win32 GuI: The print dialog uses a font which doesn't display multi-byte
messages. Include patch from Vipin Aravind? Update from Yasuhiro
Matsumoto.
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)
@ -51,7 +42,7 @@ For version 7.0:
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/
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
@ -64,10 +55,79 @@ For version 7.0:
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.
Mickael will update the patch before 21st.
--- responses above
8 Unix: When libcall() fails there is no clear error message. Johannes
Zellner has a patch for this.
updated patch 2004 June 16.
7 Add the MzScheme interface. Patch on http://iamphet.nm.ru/scheme/
(Sergey Khorev)
Alt URL: http://cyber.miem.edu.ru/~iamphet/scheme/mzvim-0.560.tar.gz
8 Add patch from Muraoka Taro (Mar 16) to support input method on Mac?
New patch 2004 Jun 16
8 Add expression-expansion, so that the user can define his own kind of
completion. Patch from Taro Muraoka, 2003 Aug 26.
New patch 2004 Jun 16
8 Text objects: Add "a'" and 'a"': a single or double quoted string.
(Tim Chase) Patch from Taro Muraoka (2003 Dec 16).
New patch 2004 Jun 16
7 Add "nbsp" in 'listchars'? Patch from David Blanchet, 2003 Jul 28.
again 2004 Jun 16
8 Add ":n" to fnamemodify(): normalize path, remove "../" when possible.
Aric Blumer has a patch for this.
He will update the patch for 6.3.
9 Add cursor-column highlighting. Enable it with 'cursorcolumn' option,
set highlighting with "CursorColumn" group. Useful for aligning text.
Also cursor-row highlighting. Patch from Yasuhiro Matsumoto for
underlining the cursor line, 2004 Mar 24. Update 2004 Jun 17
Alternatie: when 'number' is set highlight the number of the current
line.
7 Completion of network shares, patch by Yasuhiro Matsumoto.
Update 2004 Jun 17.
8 Patches from Peter "Rain Dog" Cucka:
- guifont selector (2002 Dec 15) will send update
7 Add an option to set the width of the 'number' column. Eight
positions is often more than needed. Or adjust the width to the
length of the file?
Add patch that adds 'numberlen' option. (James Harvey)
Other patch with min and max from Emmanuel Renieris (2002 Jul 24)
Other patch without an option by Gilles Roy (2002 Jul 25)
New patch from Emmanuel Renieris, 2004 Jun 17
Needs more work: use one option with one or two numbers
7 Be able to call a function while passing on a variable number of
arguments:
:function Foo(abc, ...)
: call Bar(a:abc, a:*)
Charles Campbell has a patch for this
He lost the patch himself.
7 Make ":startinsert" command work directly for functions and scripts?
Also make it possible to append (it's difficult at end of line).
And add ":startreplace" (patch by Charles Campbell, 2004 Jan 9,
http://www.erols.com/astronaut/vim/index.html#Patch)
Update 2004 June 18
8 Add patch from Charles Campbell to have ":0file!" remove the name of
the current buffer. (2003 June 17)
Lost the patch himself.
8 Make it possible to delete marks. Charles Campbell has a patch that
does this with the markclear() function (2004 Jan 9). And the
":delmark" command (2004 Feb 9)
Update 2004 June 18
8 ":hardcopy":
- Patch to append CTRL-D to PostScript output (Mike Williams, 2004 Jun
14)
- support printing multi-byte characters. Patch from Motonobu
Ichimura. New (better) patch from Mike Williams (2004 Jan 20)
Updated patch: http://www.eandem.co.uk/mrw/vim/special/index.html
7 Add patch from Wall for this one ( ~/Mail/oldmail/wall/in.00019 ):
'flipcase' variable: upper/lowercase pairs.
Insert comma's between pairs and allow a range, make it look like
'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.
--- 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
line should delete the last line. Patch from greenx 2002 Apr 11.
@ -77,30 +137,10 @@ For version 7.0:
Martin Dalecki 2002 Jan 11.
8 Add a few more command names to the menus. Patch from Jiri Brezina
(28 feb 2002).
8 Patch to add 'transparency' option. Disadvantage: it's slow. (Eckehard
Berns, 2004 May 9) http://ecki.to/vim-icns/TransBack.diff
8 Patches from "Rain Dog" Cucka:
- guifont selector (2002 Dec 15)
- scrollbar (2002 Dec 8)
- Quartz fonts (2002 Dec 8)
7 ATTENTION dialog choices are more logical when "Delete it' appears
before "Quit". Patch by Robert Webb, 2004 May 3.
8 Unix: When libcall() fails there is no clear error message. Johannes
Zellner has a patch for this.
8 ":hardcopy":
- Patch to append CTRL-D to PostScript output (Mike Williams, 2004 Jun
14)
- support printing multi-byte characters. Patch from Motonobu
Ichimura. New (better) patch from Mike Williams (2004 Jan 20)
9 Merge in ideas from ~/vim/patches/tutor.txt (Gabriel Zachmann)
8 Add patch from Muraoka Taro (Mar 16) to support input method on Mac?
- Include flipcase patch: ~/vim/patches/wall.flipcase2 ? Make it work
for multi-byte characters.
7 Add patch from Wall for this one ( ~/Mail/oldmail/wall/in.00019 ):
'flipcase' variable: upper/lowercase pairs.
Insert comma's between pairs and allow a range, make it look like
'isfname'. E.g. ":set flipcase=a-zA-Z,xX,23-33:143-153". The colon to
separate the from and to part is optional.
- Win32: add options to print dialog. Patch from Vipin Aravind.
- Patch to add highlighting for whitespace. (Tom Schumm, 2003 Jul 5)
use the patch that keeps using HLF_8 if HLF_WS has not
@ -113,19 +153,6 @@ For version 7.0:
- Add possibility to highlight specific columns (for Fortran). Or put a
line in between columns (e.g. for 'textwidth').
Patch to add 'hlcolumn' from Vit Stradal, 2004 May 20.
9 Add cursor-column highlighting. Enable it with 'cursorcolumn' option,
set highlighting with "CursorColumn" group. Useful for aligning text.
Also cursor-row highlighting. Patch from Yasuhiro Matsumoto for
underlining the cursor line, 2004 Mar 24.
Alternatie: when 'number' is set highlight the number of the current
line.
7 Be able to call a function while passing on a variable number of
arguments:
:function Foo(abc, ...)
: call Bar(a:abc, a:*)
Charles Campbell has a patch for this
8 Add ":n" to fnamemodify(): normalize path, remove "../" when possible.
Aric Blumer has a patch for this.
8 Add functions:
tr(expr, from, to) translate chars (Patch from Ron Aaron, Apr 8
2004)
@ -136,9 +163,9 @@ For version 7.0:
Presser)
He will send a new patch.
Is this really useful?
---
multibyteidx(string, idx) Byte index in multi-byte character.
Patch by Ilya Sher, 2004 Feb 25
Update June 18 (third one).
menuprop({name}, {idx}, {what})
Get menu property of menu {name} item {idx}.
menuprop("", 1, "name") returns "File".
@ -148,9 +175,15 @@ For version 7.0:
mapname({idx}, mode) return the name of the idx'th mapping.
Patch by Ilya Sher, 2004 Mar 4.
match({pat}, {string} [,start] [,count]) get index of count'th match
Patch by Ilya Sher, 2004 Mar 31
Patch by Ilya Sher, 2004 Jun 19
find() find file in 'path' (patch from Johannes
Zellner 2001 Dec 20)
Update 2004 Jun 16.
gettext() Translate a message. (Patch from Yasuhiro
Matsumoto) How to get the messages into the
.po files?
Update 2004 Jun 17
---
realname() Get user name (first, last, full)
user_fullname() patch by Nikolai Weibull, Nov
3 2002)
@ -175,10 +208,6 @@ For version 7.0:
(Patch from Yegappan Lakshmanan)
raisewin() raise gvim window (see HierAssist patch for
Tcl implementation ~/vim/HierAssist/ )
gettext() Translate a message. (Patch from Yasuhiro
Matsumoto) How to get the messages into the
.po files?
7 Add "nbsp" in 'listchars'? Patch from David Blanchet, 2003 Jul 28.
7 Add patch from Benoit Cerrina to integrate Vim and Perl functions
better. Now also works for Ruby (2001 Nov 10)
7 Add 'taglistfiles' option, show file name and type when listing matching
@ -186,37 +215,20 @@ For version 7.0:
7 Motif: use the menu font consistently. Patch from Martin Dalecki 2002
Jan 11.
- Motif: add 3D shading for the menu entries? Patch from Martin Dalecki.
8 Add expression-expansion, so that the user can define his own kind of
completion. Patch from Taro Muraoka, 2003 Aug 26.
7 Completion of network shares, patch by Yasuhiro Matsumoto.
9 When 'autoindent' is set, hitting <CR> twice, while there is text after
the cursor, doesn't delete the autoindent in the resulting blank line.
(Rich Wales) This is Vi compatible, but it looks like a bug. Rich has
a suggestion for a patch to fix this.
e-mail to Rich bounced.
7 Make ":startinsert" command work directly for functions and scripts?
Also make it possible to append (it's difficult at end of line).
And add ":startreplace" (patch by Charles Campbell, 2004 Jan 9,
http://www.erols.com/astronaut/vim/index.html#Patch)
8 Text objects: Add "a'" and 'a"': a single or double quoted string.
(Tim Chase) Patch from Taro Muraoka (2003 Dec 16).
7 For Visual mode: Command to do a search for the string in the marked
area. Only when fewer than two lines. Use "g/" and "gb". Patch from
Yegappan Lakshmanan.
7 When 'rightleft' is set, the search pattern should be displayed right
to left as well? See patch of Dec 26. (Nadim Shaikli)
8 Add patch from Charles Campbell to have ":0file!" remove the name of
the current buffer. (2003 June 17)
8 Make it possible to delete marks. Charles Campbell has a patch that
does this with the markclear() function (2004 Jan 9). And the
":delmark" command (2004 Feb 9)
7 Win32: Add patch for 5-button mouse. (Michael Geddes 2001 Nov 26)
8 Lock all used memory so that it doesn't get swapped to disk (uncrypted).
Patch by Jason Holt, 2003 May 23.
7 Support a stronger encryption. Jason Holt implemented AES (May 6 2003).
7 Add ! register, for shell commands. (patch from Grenie)
7 Add the MzScheme interface. Patch on http://iamphet.nm.ru/scheme/
(Sergey Khorev)
8 Make 'statusline' local, so that each window can have a different
value. But should it also be local to a buffer? (Yegappan Lakshmanan
has a patch, 2002 feb 15)
@ -233,21 +245,10 @@ For version 7.0:
8 Include a connection to an external program through a pipe? See
patches from Felbinger for a mathematica interface.
Or use emacs server kind of thing?
7 Add an option to set the width of the 'number' column. Eight
positions is often more than needed. Or adjust the width to the
length of the file?
Add patch that adds 'numberlen' option. (James Harvey)
Other patch with min and max from Emmanuel Renieris (2002 Jul 24)
Other patch without an option by Gilles Roy (2002 Jul 25)
7 Add ":justify" command. Patch from Vit Stradal 2002 Nov 25.
- findmatch() should be adjusted for Lisp. See remark at
get_lisp_indent(). Esp. \( and \) should be skipped. (Dorai Sitaram,
incomplete patch Mar 18)
8 Sorting of filenames for completion is wrong on systems that ignore
case of filenames. Add 'ignorefncase' option. When set, case in
filenames is ignored for sorting them. Patch by Mike Williams:
~/vim/patches/ignorefncase. Also change what matches? Or use another
option name.
- Change ga_room into ga_maxlen, so that it doesn't need to be
incremented/decremented each time.
- new DATA TYPES: lists, dictionaries and function references.
@ -716,8 +717,9 @@ Amiga:
Macintosh:
9 Mac: The motion type is not stored on the clipboard. Using ":set
clipboard=unnamed" makes "yyp" work characterwise. (Michael DeMoney)
7 Patch to add 'transparency' option. Disadvantage: it's slow. (Eckehard
Berns, 2004 May 9) http://ecki.to/vim/TransBack-2004-05-09.diff
Needs more work. Add when someone really wants it.
7 Loading the Perl library only works on OS/X 10.2 or 10.3, never on both.
Load the Perl library dynamically see Python sources file dynload_mac
(Jack)
@ -1745,7 +1747,7 @@ Scrolling:
bound windows.
- Add 'search' option to 'scrollopt' to allow 'scrollbind' windows to
be bound by regexp searches
- Add "z>" and "z<": scroll sideways one screenfull. (Campbell)
- Add "z>" and "z<": scroll sideways one screenful. (Campbell)
- Add option to set the number of lines when not to scroll, instead of the
fixed number used now (for terminals that scroll slow with a large number
of lines but not with a single line).
@ -2971,7 +2973,7 @@ Registers:
Debug mode:
7 Add something to enable debugging when a remote message is received.
8 Add breakpoints for setting an option
8 Add breakpoits for assigning to a variable.
8 Add breakpoints for assigning to a variable.
7 Add a watchpoint in the debug mode: An expression that breaks execution
when evaluating to non-zero.
7 Store the history from debug mode in viminfo.
@ -3361,6 +3363,11 @@ Various improvements:
- Support mapping for replace mode and "r" command (Vi doesn't do this)?
5 Add 'ignorefilecase' option: Ignore case when expanding file names.
":e ma<Tab>" would also find "Makefile" on Unix.
8 Sorting of filenames for completion is wrong on systems that ignore
case of filenames. Add 'ignorefncase' option. When set, case in
filenames is ignored for sorting them. Patch by Mike Williams:
~/vim/patches/ignorefncase. Also change what matches? Or use another
option name.
8 Should be able to compile Vim in another directory, with $(srcdir) set to
where the sources are. Add $(srcdir) in the Makefile in a lot of places.
(Netherton)

View File

@ -1,4 +1,4 @@
*usr_21.txt* For Vim version 7.0aa. Last change: 2004 Mar 29
*usr_21.txt* For Vim version 7.0aa. Last change: 2004 Jun 16
VIM USER MANUAL - by Bram Moolenaar
@ -65,7 +65,7 @@ a look at an overview:
:w !{program} execute {program} and send text to its input
:[range]!{program} filter text through {program}
Notice that the precense of a range before "!{program}" makes a big
Notice that the presense of a range before "!{program}" makes a big
difference. Without it executes the program normally, with the range a number
of text lines is filtered through the program.

View File

@ -1,4 +1,4 @@
*usr_22.txt* For Vim version 7.0aa. Last change: 2003 Mar 17
*usr_22.txt* For Vim version 7.0aa. Last change: 2004 Jun 16
VIM USER MANUAL - by Bram Moolenaar
@ -95,7 +95,7 @@ The following commands are used to display other information:
s Use the field the cursor is in to sort on. First
display the size and date with i. Then Move the
cursor to the size of any file and press s. The files
will now be sorted on size. Press s wile the cursor
will now be sorted on size. Press s while the cursor
is on a date and the items will be sorted on date.
r reverse the sorting order (either size or date)

View File

@ -1,4 +1,4 @@
*various.txt* For Vim version 7.0aa. Last change: 2004 Jun 14
*various.txt* For Vim version 7.0aa. Last change: 2004 Jun 18
VIM REFERENCE MANUAL by Bram Moolenaar
@ -571,9 +571,11 @@ g CTRL-A Only when Vim was compiled with MEM_PROFILING defined
current file. See |help-translated|.
*:helpg* *:helpgrep*
:helpg[rep] {pattern}
:helpg[rep] {pattern}[@xx]
Search all help text files and make a list of lines
in which {pattern} matches. Jumps to the first match.
The optional [@xx] specifies that only matches in the
"xx" language are to be found.
You can navigate through the matches with the
|quickfix| commands, e.g., |:cnext| to jump to the
next one. Or use |:cwindow| to get the list of
@ -584,6 +586,8 @@ g CTRL-A Only when Vim was compiled with MEM_PROFILING defined
:helpgrep Uganda
< Example for case ignoring search: >
:helpgrep uganda\c
< Example for searching in French help: >
:helpgrep backspace@fr
< Cannot be followed by another command, everything is
used as part of the pattern. But you can use
|:execute| when needed.

View File

@ -1,4 +1,4 @@
*version5.txt* For Vim version 7.0aa. Last change: 2004 Jan 17
*version5.txt* For Vim version 7.0aa. Last change: 2004 Jun 16
VIM REFERENCE MANUAL by Bram Moolenaar
@ -1517,7 +1517,7 @@ Menus defined in the .vimrc were removed when GUI started.
Crash when pasting with the mouse in insert mode.
Crash whith ":unmenu *" in .gvimrc for Athena.
Crash with ":unmenu *" in .gvimrc for Athena.
"5>>" shifted 5 lines 5 times, instead of 1 time.
@ -2026,7 +2026,7 @@ $vim/macros". If no initial dir specified for ":browse e", can be compiled to
either begin in the current directory, or that of the current buffer. (Negri
and Kahn)
Added the 'browsedir' option, with value "current", "last" or "buffer". Tells
wether a browse dialog starts in last used dir, dir of current buffer, or
whether a browse dialog starts in last used dir, dir of current buffer, or
current dir. ":browse w" is unaffected.
The default menus have been changed to use the ":browse" command.
@ -3667,8 +3667,8 @@ and starts Vim on it. "make install" now also copies the tutor.
In the output of ":clist" the current entry is highlighted, with the 'i'
highlighting (same as used for 'incsearch').
For the ":clist" command, you can scroll backwards with "b" (one screenfull),
"u" (half a screenfull) and "k" (one line).
For the ":clist" command, you can scroll backwards with "b" (one screenful),
"u" (half a screenful) and "k" (one line).
Multi-byte support:
- X-input method for multi-byte characters. And various fixes for multi-byte
@ -4582,7 +4582,7 @@ buffers, only beep and continue with the insert command.
Dos and Win32 console: Setting t_me didn't work to get another color. Made
this works backwards compatible.
For turkish (LANG = "tr") uppercase 'i' is not an 'I'. Use ASCII uppercase
For Turkish (LANG = "tr") uppercase 'i' is not an 'I'. Use ASCII uppercase
translation in vim_strup() to avoid language problems. (Komur)
Unix: Use usleep() or nanosleep() for mch_delay() when available. Hopefully
@ -7578,7 +7578,7 @@ Fixed compiling under NeXT. (Jeroen C.M. Goudswaard)
optwin.vim gave an error when used in Vi compatible mode ('cpo' contains 'C').
Tcl interpreter: "buffer" command didn't check for precense of an argument.
Tcl interpreter: "buffer" command didn't check for presense of an argument.
(Dave Bodenstab)
dosinst.c: Added checks for too long file name.

View File

@ -1,4 +1,4 @@
*version6.txt* For Vim version 7.0aa. Last change: 2004 Jun 07
*version6.txt* For Vim version 7.0aa. Last change: 2004 Jun 16
VIM REFERENCE MANUAL by Bram Moolenaar
@ -1764,7 +1764,7 @@ Motif: (Martin Dalecki)
- Use XPM bitmaps for the icon when possible. Use the Solaris XpmP.h include
file when it's available.
- Change the shadow of the toolbar items to get a visual feedback of it being
pressed on non-LessTiff.
pressed on non-LessTif.
- Use gadgets instead of windows for some items for speed.
Command line completion:
@ -6645,7 +6645,7 @@ Solution: Don't map CTRL-N after CTRL-X CTRL-N. Same for CTRL-P.
Files: src/getchar.c
Patch 6.1.031
Problem: Cygwin: Xxd could read a file in text mode intead of binary mode.
Problem: Cygwin: Xxd could read a file in text mode instead of binary mode.
Solution: Use "rb" or "rt" when needed. (Pavol Juhas)
Files: src/xxd/xxd.c
@ -6947,7 +6947,7 @@ Solution: Fix explorer plugin and key modifiers. (Axel Kielhorn)
Files: src/edit.c, src/feature.h, src/gui_mac.c, src/os_mac.c
Patch 6.1.077
Problem: On a Debian systEm wht ACL linking fails. (Lubomir Host)
Problem: On a Debian system with ACL linking fails. (Lubomir Host)
Solution: When the "acl" library is used, check if the "attr" library is
present and use it.
Files: src/auto/configure, src/configure.in, src/link.sh
@ -7229,7 +7229,7 @@ Files: src/move.c
Patch 6.1.121 (depends on 6.1.098)
Problem: When starting Select mode from Insert mode, then using the Paste
menu entry, the cursor is left before the laste pasted character.
menu entry, the cursor is left before the last pasted character.
(Mario Schweigler)
Solution: Set the cursor for Insert mode one character to the right.
Files: runtime/menu.vim
@ -7963,7 +7963,7 @@ Patch 6.1.231
Problem: Double clicking with the mouse to select a word does not work for
multi-byte characters.
Solution: Use vim_iswordc() instead of vim_isIDc(). This means 'iskeyword'
is used intead of 'isident'. Also fix that mixing ASCII with
is used instead of 'isident'. Also fix that mixing ASCII with
multi-byte word characters doesn't work, the mouse class for
punctuation and word characters was mixed up.
Files: src/normal.c
@ -10262,7 +10262,7 @@ Files: src/ex_cmds.c
Patch 6.2.053
Problem: Prototype for bzero() doesn't match most systems.
Solution: Use "void *" instead of "char *" and "size_t" intead of "int".
Solution: Use "void *" instead of "char *" and "size_t" instead of "int".
Files: src/osdef1.h.in
Patch 6.2.054
@ -10534,7 +10534,7 @@ Files: src/buffer.c
Patch 6.2.096
Problem: Win32: ":let @* = ''" put a newline on the clipboard. (Klaus
Bosau)
Solution: Put zero bytes on the clibpoard for an empty string.
Solution: Put zero bytes on the clipboard for an empty string.
Files: src/ops.c
Patch 6.2.097
@ -11339,7 +11339,7 @@ Files: src/fileio.c, src/netbeans.c, src/proto/netbeans.pro,
runtime/doc/netbeans.txt, runtime/doc/tags
Patch 6.2.216 (after 6.2.206)
Problem: Multi-byte characters stil cannot be used as hotkeys in a console
Problem: Multi-byte characters still cannot be used as hotkeys in a console
dialog. (Mattias Erkisson)
Solution: Make get_keystroke() handle multi-byte characters.
Files: src/misc1.c
@ -11376,7 +11376,7 @@ Files: src/ex_cmds.h
Patch 6.2.222
Problem: Using "--remote" several times on a row only opens some of the
files. (Dany St-Amant)
Solution: Don't delete all typehead when the server receives a command from
Solution: Don't delete all typeahead when the server receives a command from
a client, only delete typed characters.
Files: src/main.c
@ -11874,7 +11874,7 @@ Problem: When in debug mode, receiving a message from a remote client
causes a crash. Evaluating an expression causes Vim to wait for
"cont" to be typed, without a prompt. (Hari Krishna Dara)
Solution: Disable debugging when evaluating an expression for a client.
(Michael Geddes) Don't try reading into the typehead buffer when
(Michael Geddes) Don't try reading into the typeahead buffer when
it may have been filled in another way.
Files: src/ex_getln.c, src/getchar.c, src/if_xcmdsrv.c, src/main.c,
src/misc1.c, src/proto/getchar.pro, src/proto/main.pro,
@ -12556,7 +12556,7 @@ Patch 6.2.398 (extra)
Problem: Win32 console: no extra key modifiers are supported.
Solution: Encode the modifiers into the input stream. Also fix that special
keys are converted and stop working when 'tenc' is set. Also fix
that when 'tenc' is intialized the input and output conversion is
that when 'tenc' is initialized the input and output conversion is
not setup properly until 'enc' or 'tenc' is set.
Files: src/getchar.c, src/option.c, src/os_win32.c
@ -13081,7 +13081,7 @@ Patch 6.2.476
Problem: When reloading a hidden buffer changed outside of Vim and the
current buffer is read-only, the reloaded buffer becomes
read-only. (Hari Krishna Dara)
Solution: Save the 'readonly' flag of the realoaded buffer instead of the
Solution: Save the 'readonly' flag of the reloaded buffer instead of the
current buffer.
Files: src/fileio.c

View File

@ -1,7 +1,7 @@
" Vim indent file
" Language: VisualBasic (ft=vb) / Basic (ft=basic) / SaxBasic (ft=vb)
" Author: Johannes Zellner <johannes@zellner.org>
" Last Change: Tue, 27 Apr 2004 14:54:59 CEST
" Last Change: Fri, 18 Jun 2004 07:22:42 CEST
if exists("b:did_indent")
finish
@ -10,7 +10,7 @@ let b:did_indent = 1
setlocal indentexpr=VbGetIndent(v:lnum)
setlocal indentkeys&
setlocal indentkeys+==~else,=~elseif,=~end,=~wend,=~case,=~next,=~select,~=loop,<:>
setlocal indentkeys+==~else,=~elseif,=~end,=~wend,=~case,=~next,=~select,=~loop,<:>
" Only define the function once.
if exists("*VbGetIndent")

View File

@ -1,7 +1,7 @@
" netrw.vim: (global plugin) Handles file transfer across a network
" Last Change: Jun 04, 2004
" Last Change: Jun 18, 2004
" Maintainer: Charles E. Campbell, Jr. PhD <drchipNOSPAM at campbellfamily.biz>
" Version: 44
" Version: 46
" 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 = "v44"
let loaded_netrw = "v46"
let s:save_cpo = &cpo
set cpo&vim
@ -68,6 +68,20 @@ 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 -Fa"
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")
@ -151,9 +165,6 @@ fun! s:NetRead(...)
" save options
call s:NetOptionSave()
" get name of a temporary file
let tmpfile= tempname()
" Special Exception: if a file is named "0r", then
" "0r" will be used to read the
" following files instead of "r"
@ -168,6 +179,10 @@ fun! s:NetRead(...)
let ichoice = 1
endif
" get name of a temporary file
let tmpfile= tempname()
" call Decho("ichoice=".ichoice." readcmd<".readcmd.">")
while ichoice <= a:0
" attempt to repeat with previous host-file-etc
@ -178,7 +193,7 @@ fun! s:NetRead(...)
else
exe "let choice= a:" . ichoice
" call Decho("NetRead1: choice<" . choice . ">")
" call Decho("no lastfile: choice<" . choice . ">")
" Reconstruct Choice if choice starts with '"'
if match(choice,"?") == 0
@ -219,13 +234,13 @@ fun! s:NetRead(...)
endif
endif
endif
" call Decho("NetRead2: 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.">")
" call Decho("fixing up windows url to <".choice."> tmpfile<".tmpfile)
exe 'lcd ' . fnamemodify(tmpfile,':h')
let tmpfile = fnamemodify(tmpfile,':t')
endif
@ -233,12 +248,24 @@ 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.">")
if choice =~ "^.*/$"
if strlen(g:netrw_list_cmd) > 0
call s:NetList(choice)
" call Dret("NetRead")
else
echoerr "sorry, can't do a remote listing; ssh isn't executable"
endif
return
endif
" ============
" Perform Read
" ============
".........................................
" rcp: Method #1
" rcp: NetRead Method #1
if b:netrw_method == 1 " read with rcp
" call Decho("read via rcp (method #1)")
" ER: noting done with g:netrw_uid yet?
@ -260,12 +287,12 @@ fun! s:NetRead(...)
endif
endif
" call Decho("executing: !".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".uid_machine.":".escape(b:netrw_fname,' ?&')." ".tmpfile)
exe "!".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
".........................................
" ftp + <.netrc>: Method #2
" ftp + <.netrc>: NetRead Method #2
elseif b:netrw_method == 2 " read with ftp + <.netrc>
" call Decho("read via ftp+.netrc (method #2)")
let netrw_fname= b:netrw_fname
@ -275,10 +302,10 @@ fun! s:NetRead(...)
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)
exe "%!".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)
exe "%!".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)
if getline(1) !~ "^$"
@ -289,7 +316,7 @@ fun! s:NetRead(...)
let b:netrw_lastfile = choice
".........................................
" ftp + machine,id,passwd,filename: Method #3
" 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)")
@ -321,7 +348,7 @@ fun! s:NetRead(...)
" call Decho('performing ftp -i -n')
norm 1Gdd
" call Decho("executing: %!".g:netrw_ftp_cmd." -i -n")
exe "%!".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) !~ "^$"
echoerr getline(1)
@ -331,7 +358,7 @@ fun! s:NetRead(...)
let b:netrw_lastfile = choice
".........................................
" scp: Method #4
" scp: NetRead Method #4
elseif b:netrw_method == 4 " read with scp
" call Decho("read via scp (method #4)")
if exists("g:netrw_port") && g:netrw_port != ""
@ -342,10 +369,10 @@ fun! s:NetRead(...)
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)
exe "!".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)
exe "!".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".tmpfile
exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".tmpfile
endif
let result = s:NetGetFile(readcmd, tmpfile, b:netrw_method)
let b:netrw_lastfile = choice
@ -361,7 +388,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,' ?&'))
exe "!".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)
else
@ -371,7 +398,7 @@ fun! s:NetRead(...)
" 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_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.'"/')
exe 'norm! 1G/<\s*a\s*name=\s*"'.netrw_tag.'"/'."\<CR>"
@ -379,7 +406,7 @@ fun! s:NetRead(...)
let b:netrw_lastfile = choice
".........................................
" cadaver: Method #6
" cadaver: NetRead Method #6
elseif b:netrw_method == 6 " read with cadaver
" call Decho("read via cadaver (method #6)")
@ -404,28 +431,28 @@ fun! s:NetRead(...)
" perform cadaver operation:
norm 1Gdd
" call Decho("executing: %!".g:netrw_dav_cmd)
exe "%!".g:netrw_dav_cmd
exe g:netrw_silentxfer."%!".g:netrw_dav_cmd
bd!
let result = s:NetGetFile(readcmd, tmpfile, b:netrw_method)
let b:netrw_lastfile = choice
".........................................
" rsync: Method #7
" rsync: NetRead Method #7
elseif b:netrw_method == 7 " read with rsync
" 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)
exe "!".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)
exe "!".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)
let b:netrw_lastfile = choice
".........................................
" fetch: Method #8
" fetch: NetRead Method #8
" fetch://[user@]host[:http]/path
elseif b:netrw_method == 8 " read with fetch
if g:netrw_fetch_cmd == ""
@ -441,17 +468,17 @@ fun! s:NetRead(...)
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,' ?&'))
exe "!".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,' ?&'))
exe "!".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
let result = s:NetGetFile(readcmd,tmpfile, b:netrw_method)
let b:netrw_lastfile = choice
".........................................
" sftp: Method #9
" sftp: NetRead Method #9
elseif b:netrw_method == 9 " read with sftp
" call Decho("read via sftp (method #4)")
if g:netrw_cygwin == 1
@ -461,7 +488,7 @@ fun! s:NetRead(...)
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)
exe "!".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)
let b:netrw_lastfile = choice
@ -488,7 +515,7 @@ endfun
" ------------------------------------------------------------------------
" 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)
@ -499,14 +526,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
@ -576,21 +603,21 @@ 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
@ -612,7 +639,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
@ -647,7 +674,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}
@ -656,7 +683,7 @@ fun! s:NetWrite(...) range
endif
endif
endif
" call Decho("choice<" . choice . ">")
"" call Decho("choice<" . choice . ">")
let ichoice= ichoice + 1
" fix up windows urls
@ -675,9 +702,9 @@ fun! s:NetWrite(...) range
" =============
".........................................
" rcp: Method #1
" 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
@ -691,26 +718,26 @@ 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,' ?&'))
exe "!".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
".........................................
" ftp + <.netrc>: Method #2
" ftp + <.netrc>: NetWrite Method #2
elseif b:netrw_method == 2 " write with ftp + <.netrc>
let netrw_fname = b:netrw_fname
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)
exe "%!".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)
exe "%!".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)
if getline(1) !~ "^$"
@ -721,7 +748,7 @@ fun! s:NetWrite(...) range
let b:netrw_lastfile = choice
".........................................
" ftp + machine, id, passwd, filename: Method #3
" ftp + machine, id, passwd, filename: NetWrite Method #3
elseif b:netrw_method == 3 " write with ftp + machine, id, passwd, and fname
let netrw_fname= b:netrw_fname
new
@ -745,10 +772,10 @@ 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")
exe "%!".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) !~ "^$"
echoerr getline(1)
@ -757,7 +784,7 @@ fun! s:NetWrite(...) range
bd!
".........................................
" scp: Method #4
" scp: NetWrite Method #4
elseif b:netrw_method == 4 " write with scp
if exists("g:netrw_port") && g:netrw_port != ""
let useport= " -P ".g:netrw_port
@ -766,23 +793,23 @@ 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,' ?&'))
exe "!".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,' ?&'))
exe "!".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
".........................................
" http: Method #5
" http: NetWrite Method #5
elseif b:netrw_method == 5
echoerr "***warning*** currently <netrw.vim> does not support writing using http:"
".........................................
" dav: Method #6
" 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
@ -804,26 +831,26 @@ fun! s:NetWrite(...) range
" perform cadaver operation:
norm 1Gdd
" call Decho("executing: %!".g:netrw_dav_cmd)
exe "%!".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
".........................................
" rsync: Method #7
" rsync: NetWrite Method #7
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,' ?&'))
exe "!".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,' ?&'))
exe "!".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
".........................................
" scp: Method #9
" scp: NetWrite Method #9
elseif b:netrw_method == 9 " write with sftp
let netrw_fname= b:netrw_fname
if exists("g:netrw_uid") && ( g:netrw_uid != "" )
@ -835,8 +862,8 @@ fun! s:NetWrite(...) range
set ff=unix
put ='put '.tmpfile.' '.netrw_fname
norm 1Gdd
" call Decho("executing: %!".g:netrw_sftp_cmd.' '.uid_machine)
exe "%!".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
@ -847,7 +874,7 @@ fun! s:NetWrite(...) range
endwhile
" cleanup
" call Decho("cleanup")
"" call Decho("cleanup")
let result=delete(tmpfile)
call s:NetOptionRestore()
@ -855,10 +882,145 @@ 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
" 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.">)")
" sanity maintenance
let dirname= a:dirname
if dirname !~ '/$' && (!exists("g:netrw_machine") || !exists("b:netlist_method") || !exists("b:netlist_path"))
let dirname= dirname."/"
endif
set ma
if dirname !~ '/$' && dirname !~ '^"'
" looks like a regular file, attempt transfer
"" call Decho("attempt transfer with regular file<".dirname.">")
"" call Decho("netlist method<".b:netlist_method."> cmd<".b:netlist_cmd."> path<".b:netlist_path.">")
%d
" remove any filetype indicator from end of dirname, except for the
" "this is a directory" indicator (/)
let dirname= substitute(dirname,"[*=@|]$","","e")
"" call Decho("modified dirname<".dirname.">")
" remote-read the requested file into current buffer
let machine= g:netrw_machine
let method = b:netlist_method
let path = b:netlist_path
enew!
exe "file ".method."://".machine."/".path.dirname
exe "doau BufReadPre ".dirname
silent call s:NetRead(method."://".machine."/".path.dirname)
exe "doau BufReadPost ".dirname
1d
set nomod noma
silent! unlet b:netlist_method
silent! unlet b:netlist_cmd
silent! unlet b:netlist_path
"" call Dret("NetList")
return
elseif dirname == './'
" refresh the directory list
"" call Decho("refresh directory listing")
"" call Decho("netlist method<".b:netlist_method."> cmd<".b:netlist_cmd."> path<".b:netlist_path.">")
%d
elseif dirname == '../'
" go up one directory
if b:netlist_path !~ '/' && strlen(b:netlist_path) > 0
" go to top (rltv) directory
"" call Decho("go up one directory : 1 path<".b:netlist_path.">")
let b:netlist_path= ""
elseif b:netlist_path !~ '^[./]\+$' && strlen(b:netlist_path) > 0
" remove a directory from the netlist_path
"" call Decho("go up one directory : 2 path<".b:netlist_path.">")
if b:netlist_path =~ '^[^/]*/$'
let b:netlist_path= ""
else
let b:netlist_path= substitute(b:netlist_path,'^\(.*/\)[^/]*/$','\1','')
endif
else
" append ../
"" call Decho("go up one directory : 3 path<".b:netlist_path.">")
let b:netlist_path= b:netlist_path.'../'
endif
"" call Decho("netlist method<".b:netlist_method."> cmd<".b:netlist_cmd."> path<".b:netlist_path.">")
%d
elseif dirname !~ '^\w\+:' && dirname =~ '/$'
" go down one directory
"" call Decho("go down one directory<".dirname.">")
let b:netlist_path=b:netlist_path.dirname
"" call Decho("netlist method<".b:netlist_method."> cmd<".b:netlist_cmd."> path<".b:netlist_path.">")
%d
else
" normal initial directory listing
"" call Decho("normal initial directory listing")
let listcmd = substitute(g:netrw_list_cmd,'\<HOSTNAME\>',g:netrw_machine,'')
let method = substitute(dirname,'^\(\w\+\):.*$','\1','')
let fname = b:netrw_fname
"" call Decho("set up listcmd<".listcmd.">")
"" call Decho("set up method <".method.">")
"" call Decho("set up fname <".fname.">")
" set up window
if &mod == 1
wincmd s
endif
enew!
if v:version >= 602
setlocal bh=wipe
endif
" set up buffer-local variables
let b:netlist_method = method
let b:netlist_cmd = listcmd
let b:netlist_path = fname
" set up buffer-local map
nnoremap <buffer> <cr> :call <SID>NetList(expand("<cWORD>"))<cr>
"" call Decho("netlist method<".b:netlist_method."> cmd<".b:netlist_cmd."> path<".b:netlist_path.">")
endif
"" call Decho("executing: r! ".b:netlist_cmd." '".b:netlist_path."'")
put ='\" =============================='
put ='\" Netrw Remote Directory Listing'
put ='\" '.g:netrw_machine.':'.b:netlist_path
put ='\" =============================='
exe "silent r! ".b:netlist_cmd." '".b:netlist_path."'"
1d
set ft=netrwlist
silent 5,$s/^\(.*\)\/$/ \1/e
silent 5,$call s:NetSort()
silent 5,$s/^ \(.*\)$/\1\//e
5
exe 'file ['.g:netrw_machine.':'.b:netlist_path.']'
if v:version >= 602
setlocal nomod bh=wipe bt=nofile nobl noma
else
setlocal nomod
endif
"" call Dret("NetList")
endfun
" ------------------------------------------------------------------------
" NetMethod: determine method of transfer {{{1
" method == 1: rcp
@ -871,7 +1033,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
@ -891,23 +1053,23 @@ fun! s:NetMethod(choice) " globals: method machine id passwd fname
" rsyncurm : rsync://host[:port]/path Use rsync
" fetchurm : fetch://[user@]host[:http]/filename Use fetch (defaults to ftp, override for http)
" sftpurm : sftp://[user@]host/filename Use scp
let mipf = '\(\S\+\)\s\+\(\S\+\)\s\+\(\S\+\)\s\+\(\S\+\)'
let mf = '\(\S\+\)\s\+\(\S\+\)'
let ftpurm = 'ftp://\(\([^/@]\{-}\)@\)\=\([^/#:]\{-}\)\([#:]\d\+\)\=/\(.*\)$'
let rcpurm = 'rcp://\(\([^/@]\{-}\)@\)\=\([^/]\{-}\)/\(.*\)$'
let rcphf = '\(\([^@]\{-}\)@\)\=\(\I\i*\):\(\S\+\)'
let scpurm = 'scp://\([^/]\{-}\)\([#:]\d\+\)\=/\(.*\)$'
let httpurm = 'http://\([^/]\{-}\)\(/.*\)\=$'
let davurm = 'dav://\([^/]\{-}\)/\(.*\)\=$'
let rsyncurm = 'rsync://\([^/]\{-}\)/\(.*\)\=$'
let fetchurm = 'fetch://\(\([^/@]\{-}\)@\)\=\([^/#:]\{-}\)\(:http\)\=/\(.*\)$'
let sftpurm = 'sftp://\([^/]\{-}\)/\(.*\)\=$'
let mipf = '^\(\S\+\)\s\+\(\S\+\)\s\+\(\S\+\)\s\+\(\S\+\)$'
let mf = '^\(\S\+\)\s\+\(\S\+\)$'
let ftpurm = '^ftp://\(\([^/@]\{-}\)@\)\=\([^/#:]\{-}\)\([#:]\d\+\)\=/\(.*\)$'
let rcpurm = '^rcp://\(\([^/@]\{-}\)@\)\=\([^/]\{-}\)/\(.*\)$'
let rcphf = '^\(\(\h\w*\)@\)\=\(\h\w*\):\([^@]\+\)$'
let scpurm = '^scp://\([^/]\{-}\)\([#:]\d\+\)\=/\(.*\)$'
let httpurm = '^http://\([^/]\{-}\)\(/.*\)\=$'
let davurm = '^dav://\([^/]\{-}\)/\(.*\)\=$'
let rsyncurm = '^rsync://\([^/]\{-}\)/\(.*\)\=$'
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
" call Decho("rcp://...")
"" call Decho("rcp://...")
let b:netrw_method = 1
let userid = substitute(a:choice,rcpurm,'\2',"")
let g:netrw_machine= substitute(a:choice,rcpurm,'\3',"")
@ -918,7 +1080,7 @@ fun! s:NetMethod(choice) " globals: method machine id passwd fname
" scp://user@hostname/...path-to-file
elseif match(a:choice,scpurm) == 0
" call Decho("scp://...")
"" call Decho("scp://...")
let b:netrw_method = 4
let g:netrw_machine= substitute(a:choice,scpurm,'\1',"")
let b:netrw_port = substitute(a:choice,scpurm,'\2',"")
@ -926,28 +1088,28 @@ fun! s:NetMethod(choice) " globals: method machine id passwd fname
" http://user@hostname/...path-to-file
elseif match(a:choice,httpurm) == 0
" call Decho("http://...")
"" call Decho("http://...")
let b:netrw_method = 5
let g:netrw_machine= substitute(a:choice,httpurm,'\1',"")
let b:netrw_fname = substitute(a:choice,httpurm,'\2',"")
" dav://hostname[:port]/..path-to-file..
elseif match(a:choice,davurm) == 0
" call Decho("dav://...")
"" call Decho("dav://...")
let b:netrw_method= 6
let g:netrw_machine= substitute(a:choice,davurm,'\1',"")
let b:netrw_fname = substitute(a:choice,davurm,'\2',"")
" rsync://user@hostname/...path-to-file
elseif match(a:choice,rsyncurm) == 0
" call Decho("rsync://...")
"" call Decho("rsync://...")
let b:netrw_method = 7
let g:netrw_machine= substitute(a:choice,rsyncurm,'\1',"")
let b:netrw_fname = substitute(a:choice,rsyncurm,'\2',"")
" ftp://[user@]hostname[[:#]port]/...path-to-file
elseif match(a:choice,ftpurm) == 0
" call Decho("ftp://...")
"" call Decho("ftp://...")
let userid = substitute(a:choice,ftpurm,'\2',"")
let g:netrw_machine= substitute(a:choice,ftpurm,'\3',"")
let g:netrw_port = substitute(a:choice,ftpurm,'\4',"")
@ -975,7 +1137,7 @@ fun! s:NetMethod(choice) " globals: method machine id passwd fname
endif
elseif match(a:choice,fetchurm) == 0
" call Decho("fetch://...")
"" call Decho("fetch://...")
let b:netrw_method = 8
let g:netrw_userid = substitute(a:choice,fetchurm,'\2',"")
let g:netrw_machine= substitute(a:choice,fetchurm,'\3',"")
@ -984,7 +1146,7 @@ fun! s:NetMethod(choice) " globals: method machine id passwd fname
" Issue an ftp : "machine id password [path/]filename"
elseif match(a:choice,mipf) == 0
" call Decho("(ftp) host id pass file")
"" call Decho("(ftp) host id pass file")
let b:netrw_method = 3
let g:netrw_machine = substitute(a:choice,mipf,'\1',"")
let g:netrw_uid = substitute(a:choice,mipf,'\2',"")
@ -993,7 +1155,7 @@ fun! s:NetMethod(choice) " globals: method machine id passwd fname
" Issue an ftp: "hostname [path/]filename"
elseif match(a:choice,mf) == 0
" call Decho("(ftp) host file")
"" call Decho("(ftp) host file")
if exists("g:netrw_uid") && exists("g:netrw_passwd")
let b:netrw_method = 3
let g:netrw_machine = substitute(a:choice,mf,'\1',"")
@ -1007,18 +1169,22 @@ fun! s:NetMethod(choice) " globals: method machine id passwd fname
" sftp://user@hostname/...path-to-file
elseif match(a:choice,sftpurm) == 0
" call Decho("sftp://...")
"" call Decho("sftp://...")
let b:netrw_method = 9
let g:netrw_machine= substitute(a:choice,sftpurm,'\1',"")
let b:netrw_fname = substitute(a:choice,sftpurm,'\2',"")
" Issue an rcp: hostname:filename" (this one should be last)
elseif match(a:choice,rcphf) == 0
" call Decho("(rcp) host:file)")
"" call Decho("(rcp) [user@]host:file) rcphf<".rcphf.">")
let b:netrw_method = 1
let userid = substitute(a:choice,rcphf,'\2',"")
let g:netrw_machine= substitute(a:choice,rcphf,'\3',"")
let b:netrw_fname = substitute(a:choice,rcphf,'\4',"")
"" call Decho('\1<'.substitute(a:choice,rcphf,'\1',"").">")
"" call Decho('\2<'.substitute(a:choice,rcphf,'\2',"").">")
"" call Decho('\3<'.substitute(a:choice,rcphf,'\3',"").">")
"" call Decho('\4<'.substitute(a:choice,rcphf,'\4',"").">")
if userid != ""
let g:netrw_uid= userid
endif
@ -1032,18 +1198,18 @@ fun! s:NetMethod(choice) " globals: method machine id passwd fname
let b:netrw_method = -1
endif
" call Decho("a:choice <".a:choice.">")
" call Decho("b:netrw_method <".b:netrw_method.">")
" call Decho("g:netrw_machine<".g:netrw_machine.">")
" call Decho("g:netrw_port <".g:netrw_port.">")
" if exists("g:netrw_uid") "Decho
" call Decho("g:netrw_uid <".g:netrw_uid.">")
" endif "Decho
" if exists("g:netrw_passwd") "Decho
" call Decho("g:netrw_passwd <".g:netrw_passwd.">")
" endif "Decho
" call Decho("b:netrw_fname <".b:netrw_fname.">")
" call Dret("NetMethod")
"" call Decho("a:choice <".a:choice.">")
"" call Decho("b:netrw_method <".b:netrw_method.">")
"" call Decho("g:netrw_machine<".g:netrw_machine.">")
"" call Decho("g:netrw_port <".g:netrw_port.">")
"" if exists("g:netrw_uid") "Decho
"" call Decho("g:netrw_uid <".g:netrw_uid.">")
"" endif "Decho
"" if exists("g:netrw_passwd") "Decho
"" call Decho("g:netrw_passwd <".g:netrw_passwd.">")
"" endif "Decho
"" call Decho("b:netrw_fname <".b:netrw_fname.">")
"" call Dret("NetMethod")
endfun
" end of NetMethod
@ -1056,32 +1222,32 @@ fun! NetUserPass(...)
" get/set userid
if a:0 == 0
" call Dfunc("NetUserPass(a:0<".a:0.">)")
"" call Dfunc("NetUserPass(a:0<".a:0.">)")
if !exists("g:netrw_uid") || g:netrw_uid == ""
" via prompt
let g:netrw_uid= input('Enter username: ')
endif
else " from command line
" call Dfunc("NetUserPass(a:1<".a:1.">) {")
"" call Dfunc("NetUserPass(a:1<".a:1.">) {")
let g:netrw_uid= a:1
endif
" get password
if a:0 <= 1 " via prompt
" call Decho("a:0=".a:0." case <=1:")
"" call Decho("a:0=".a:0." case <=1:")
let g:netrw_passwd= inputsecret("Enter Password: ")
else " from command line
" call Decho("a:0=".a:0." case >1: a:2<".a:2.">")
"" call Decho("a:0=".a:0." case >1: a:2<".a:2.">")
let g:netrw_passwd=a:2
endif
" call Dret("NetUserPass")
"" call Dret("NetUserPass")
endfun
" end NetUserPass
" ------------------------------------------------------------------------
" NetOptionSave: save options and set to "standard" form {{{1
fun!s:NetOptionSave()
" call Dfunc("NetOptionSave()")
"" call Dfunc("NetOptionSave()")
" Get Temporary Filename
let s:aikeep = &ai
@ -1100,16 +1266,16 @@ fun!s:NetOptionSave()
if has("win32") && !has("win95")
let s:swfkeep= &swf
set noswf
" call Decho("setting s:swfkeep to <".&swf.">")
"" call Decho("setting s:swfkeep to <".&swf.">")
endif
" call Dret("NetOptionSave")
"" call Dret("NetOptionSave")
endfun
" ------------------------------------------------------------------------
" NetOptionRestore: restore options {{{1
fun! s:NetOptionRestore()
" call Dfunc("NetOptionRestore()")
"" call Dfunc("NetOptionRestore()")
let &ai = s:aikeep
let &cin = s:cinkeep
@ -1132,7 +1298,7 @@ fun! s:NetOptionRestore()
unlet s:twkeep
unlet s:dirkeep
" call Dret("NetOptionRestore")
"" call Dret("NetOptionRestore")
endfun
" ------------------------------------------------------------------------
@ -1144,15 +1310,43 @@ endfun
" at the end of the transfer.
if has("win95") && g:netrw_win95ftp
fun! NetReadFixup(method, line1, line2)
" call Dfunc("NetReadFixup(method<".a:method."> line1=".a:line1." line2=".a:line2.")")
"" call Dfunc("NetReadFixup(method<".a:method."> line1=".a:line1." line2=".a:line2.")")
if method == 3 " ftp (no <.netrc>)
let fourblanklines= line2 - 3
silent fourblanklines.",".line2."g/^\s*/d"
endif
" call Dret("NetReadFixup")
"" call Dret("NetReadFixup")
endfun
endif
" ---------------------------------------------------------------------
" NetSort: Piet Delport's BISort2() function, modified to take a range
fun! <SID>NetSort() range
let i = a:firstline + 1
while i <= a:lastline
" find insertion point via binary search
let i_val = getline(i)
let lo = a:firstline
let hi = i
while lo < hi
let mid = (lo + hi) / 2
let mid_val = getline(mid)
if i_val < mid_val
let hi = mid
else
let lo = mid + 1
if i_val == mid_val | break | endif
endif
endwhile
" do insert
if lo < i
exec i.'d_'
call append(lo - 1, i_val)
endif
let i = i + 1
endwhile
endfun
" ------------------------------------------------------------------------
" Restore {{{1
let &cpo= s:save_cpo

View File

@ -0,0 +1,29 @@
" Language : Netrw Remote-Directory Listing Syntax
" Maintainer : Charles E. Campbell, Jr.
" Last change: Jun 10, 2004
" Version : 1
" Syntax Clearing: {{{1
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
" Directory List Syntax Highlighting: {{{1
syn match netrwDir "^.*/$" contains=netrwSpecial
syn match netrwSpecial "[*=@|/]$"
syn match netrwSlash contained "/"
syn match netrwComment '".*$'
" Highlighting Links: {{{1
if !exists("did_drchip_dbg_syntax")
let did_drchip_netrwlist_syntax= 1
hi link netrwComment Comment
hi link netrwDir Directory
hi link netrwSpecial Function
endif
" Current Syntax: {{{1
let b:current_syntax = "netrwlist"
" vim: ts=8 fdm=marker

View File

@ -19,6 +19,8 @@ syn match poFormat "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|
syn match poFormat "%%" contained
syn region poString start=+"+ skip=+\\\\\|\\"+ end=+"+
\ contains=poSpecial,poFormat
syn region poFuzzy start=+^#,\sfuzzy+ end=+^$+
syn match poUntranslated +^msgstr\s""\n\n+
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
@ -37,6 +39,8 @@ if version >= 508 || !exists("did_po_syn_inits")
HiLink poSpecial Special
HiLink poFormat poSpecial
HiLink poString String
HiLink poFuzzy Todo
HiLink poUntranslated Todo
delcommand HiLink
endif

View File

@ -432,7 +432,7 @@ CClink = $(CC)
#CONF_OPT_FEAT = --with-features=small
#CONF_OPT_FEAT = --with-features=normal
#CONF_OPT_FEAT = --with-features=big
CONF_OPT_FEAT = --with-features=huge
#CONF_OPT_FEAT = --with-features=huge
# COMPILED BY - For including a specific e-mail address for ":version".
#CONF_OPT_COMPBY = "--with-compiledby=John Doe <JohnDoe@yahoo.com>"
@ -493,7 +493,7 @@ CONF_OPT_FEAT = --with-features=huge
# Often used for GCC: mixed optimizing, lot of optimizing, debugging
#CFLAGS = -g -O2 -fno-strength-reduce -Wall -Wshadow -Wmissing-prototypes
CFLAGS = -g -O2 -fno-strength-reduce -Wall -Wmissing-prototypes
#CFLAGS = -g -O2 -fno-strength-reduce -Wall -Wmissing-prototypes
#CFLAGS = -O6 -fno-strength-reduce -Wall -Wshadow -Wmissing-prototypes
#CFLAGS = -g -DDEBUG -Wall -Wshadow -Wmissing-prototypes
#CFLAGS = -g -O2 -DSTARTUPTIME=\"vimstartup\" -fno-strength-reduce -Wall -Wmissing-prototypes

View File

@ -4579,7 +4579,7 @@ buf_spname(buf)
}
#endif
if (buf->b_fname == NULL)
return _("[No File]");
return _("[No Name]");
return NULL;
}

View File

@ -598,6 +598,20 @@ eval_to_string_skip(arg, nextcmd, skip)
return retval;
}
/*
* Skip over an expression at "*pp".
* Return FAIL for an error, OK otherwise.
*/
int
skip_expr(pp)
char_u **pp;
{
var retvar;
*pp = skipwhite(*pp);
return eval1(pp, &retvar, FALSE);
}
/*
* Top level evaluation function, returning a string.
* Return pointer to allocated memory, or NULL for failure.
@ -3375,6 +3389,20 @@ find_buffer(avar)
buf = buflist_findname(name);
vim_free(name);
}
if (buf == NULL)
{
/* No full path name match, try a match with a URL or a "nofile"
* buffer, these don't use the full path. */
for (buf = firstbuf; buf != NULL; buf = buf->b_next)
if (buf->b_fname != NULL
&& (path_with_url(buf->b_fname)
#ifdef FEAT_QUICKFIX
|| bt_nofile(buf)
#endif
)
&& STRCMP(buf->b_fname, avar->var_val.var_string) == 0)
break;
}
}
return buf;
}

View File

@ -4573,7 +4573,7 @@ ex_help(eap)
buf_T *buf;
#ifdef FEAT_MULTI_LANG
int len;
char_u *lang = NULL;
char_u *lang;
#endif
if (eap != NULL)
@ -4613,13 +4613,7 @@ ex_help(eap)
#ifdef FEAT_MULTI_LANG
/* Check for a specified language */
len = STRLEN(arg);
if (len >= 3 && arg[len - 3] == '@' && ASCII_ISALPHA(arg[len - 2])
&& ASCII_ISALPHA(arg[len - 1]))
{
lang = arg + len - 2;
lang[-1] = NUL; /* remove the '@' */
}
lang = check_help_lang(arg);
#endif
/* When no argument given go to the index. */
@ -4748,6 +4742,28 @@ erret:
}
#if defined(FEAT_MULTI_LANG) || defined(PROTO)
/*
* In an argument search for a language specifiers in the form "@xx".
* Changes the "@" to NUL if found, and returns a pointer to "xx".
* Returns NULL if not found.
*/
char_u *
check_help_lang(arg)
char_u *arg;
{
int len = STRLEN(arg);
if (len >= 3 && arg[len - 3] == '@' && ASCII_ISALPHA(arg[len - 2])
&& ASCII_ISALPHA(arg[len - 1]))
{
arg[len - 3] = NUL; /* remove the '@' */
return arg + len - 2;
}
return NULL;
}
#endif
/*
* Return a heuristic indicating how well the given string matches. The
* smaller the number, the better the match. This is the order of priorities,
@ -5180,7 +5196,9 @@ ex_helptags(eap)
garray_T ga;
int i, j;
int len;
#ifdef FEAT_MULTI_LANG
char_u lang[2];
#endif
char_u ext[5];
char_u fname[8];
int filecount;

View File

@ -2319,8 +2319,8 @@ do_one_cmd(cmdlinep, sourcing,
}
}
/* no arguments allowed */
if (!ni && !(ea.argt & EXTRA) && *ea.arg != NUL &&
vim_strchr((char_u *)"|\"", *ea.arg) == NULL)
if (!ni && !(ea.argt & EXTRA) && *ea.arg != NUL
&& vim_strchr((char_u *)"|\"", *ea.arg) == NULL)
{
errormsg = (char_u *)_(e_trailing);
goto doend;
@ -3885,6 +3885,17 @@ expand_filename(eap, cmdlinep, errormsgp)
has_wildcards = mch_has_wildcard(eap->arg);
for (p = eap->arg; *p; )
{
#ifdef FEAT_EVAL
/* Skip over `=expr`, wildcards in it are not expanded. */
if (p[0] == '`' && p[1] == '=')
{
p += 2;
(void)skip_expr(&p);
if (*p == '`')
++p;
continue;
}
#endif
/*
* Quick check if this cannot be the start of a special string.
* Also removes backslash before '%', '#' and '<'.
@ -4157,6 +4168,18 @@ separate_nextcmd(eap)
if (*p == NUL) /* stop at NUL after CTRL-V */
break;
}
#ifdef FEAT_EVAL
/* Skip over `=expr` when wildcards are expanded. */
else if (p[0] == '`' && p[1] == '=')
{
p += 2;
(void)skip_expr(&p);
if (*p == '`')
++p;
}
#endif
/* Check for '"': start of comment or '|': next command */
/* :@" and :*" do not start a comment!
* :redir @" doesn't either. */

View File

@ -5290,8 +5290,11 @@ shorten_fnames(force)
}
if (p == NULL || buf->b_fname == NULL)
buf->b_fname = buf->b_ffname;
mf_fullname(buf->b_ml.ml_mfp);
}
/* Always make the swap file name a full path, a "nofile" buffer may
* also have a swap file. */
mf_fullname(buf->b_ml.ml_mfp);
}
#ifdef FEAT_WINDOWS
status_redraw_all();

View File

@ -74,6 +74,9 @@ static OSType _ftype = 'TEXT';
# endif
#endif
/* Vim's Scrap flavor. */
#define VIMSCRAPFLAVOR 'VIM!'
/* CARBON version only tested with Project Builder under MacOS X */
#undef USE_CARBONIZED
#if (defined(__APPLE_CC__) || defined(__MRC__)) && defined(TARGET_API_MAC_CARBON)
@ -591,7 +594,8 @@ struct WindowSearch /* for handling class 'KAHL', event 'SRCH', keyDirectObject
# pragma options align=reset
#endif
pascal OSErr Handle_KAHL_SRCH_AE (const AppleEvent *theAEvent, AppleEvent *theReply, long refCon)
pascal OSErr
Handle_KAHL_SRCH_AE(const AppleEvent *theAEvent, AppleEvent *theReply, long refCon)
{
OSErr error = noErr;
buf_T *buf;
@ -684,7 +688,8 @@ struct ModificationInfo /* for replying to class 'KAHL', event 'MOD ', keyDirect
# pragma options align=reset
#endif
pascal OSErr Handle_KAHL_MOD_AE (const AppleEvent *theAEvent, AppleEvent *theReply, long refCon)
pascal OSErr
Handle_KAHL_MOD_AE(const AppleEvent *theAEvent, AppleEvent *theReply, long refCon)
{
OSErr error = noErr;
AEDescList replyList;
@ -819,7 +824,8 @@ struct CW_GetText /* for handling class 'KAHL', event 'GTTX', keyDirectObject ty
# pragma options align=reset
#endif
pascal OSErr Handle_KAHL_GTTX_AE (const AppleEvent *theAEvent, AppleEvent *theReply, long refCon)
pascal OSErr
Handle_KAHL_GTTX_AE(const AppleEvent *theAEvent, AppleEvent *theReply, long refCon)
{
OSErr error = noErr;
buf_T *buf;
@ -937,25 +943,22 @@ pascal OSErr FindProcessBySignature( const OSType targetType,
{
anErr = GetNextProcess(psnPtr);
if (anErr != noErr)
{
lookingForProcess = false;
}
else
{
anErr = GetProcessInformation(psnPtr, &infoRec);
if ((anErr == noErr)
&& (infoRec.processType == targetType)
&& (infoRec.processSignature == targetCreator))
{
lookingForProcess = false;
}
}
}
return anErr;
}//end FindProcessBySignature
void Send_KAHL_MOD_AE (buf_T *buf)
void
Send_KAHL_MOD_AE(buf_T *buf)
{
OSErr anErr = noErr;
AEDesc targetAppDesc = { typeNull, nil };
@ -1024,7 +1027,8 @@ void Send_KAHL_MOD_AE (buf_T *buf)
* Handle the Unused parms of an AppleEvent
*/
OSErr HandleUnusedParms (const AppleEvent *theAEvent)
OSErr
HandleUnusedParms(const AppleEvent *theAEvent)
{
OSErr error;
long actualSize;
@ -1086,7 +1090,8 @@ struct SelectionRange /* for handling kCoreClassEvent:kOpenDocuments:keyAEPositi
endRange are all negative, there is no selection range specified.
*/
pascal OSErr HandleODocAE (const AppleEvent *theAEvent, AppleEvent *theReply, long refCon)
pascal OSErr
HandleODocAE(const AppleEvent *theAEvent, AppleEvent *theReply, long refCon)
{
/*
* TODO: Clean up the code with convert the AppleEvent into
@ -1231,7 +1236,8 @@ pascal OSErr HandleODocAE (const AppleEvent *theAEvent, AppleEvent *theReply, lo
*
*/
pascal OSErr Handle_aevt_oapp_AE (const AppleEvent *theAEvent, AppleEvent *theReply, long refCon)
pascal OSErr
Handle_aevt_oapp_AE(const AppleEvent *theAEvent, AppleEvent *theReply, long refCon)
{
OSErr error = noErr;
@ -1252,7 +1258,8 @@ pascal OSErr Handle_aevt_oapp_AE (const AppleEvent *theAEvent, AppleEvent *theRe
*
*/
pascal OSErr Handle_aevt_quit_AE (const AppleEvent *theAEvent, AppleEvent *theReply, long refCon)
pascal OSErr
Handle_aevt_quit_AE(const AppleEvent *theAEvent, AppleEvent *theReply, long refCon)
{
OSErr error = noErr;
@ -1276,7 +1283,8 @@ pascal OSErr Handle_aevt_quit_AE (const AppleEvent *theAEvent, AppleEvent *theRe
*
*/
pascal OSErr Handle_aevt_pdoc_AE (const AppleEvent *theAEvent, AppleEvent *theReply, long refCon)
pascal OSErr
Handle_aevt_pdoc_AE(const AppleEvent *theAEvent, AppleEvent *theReply, long refCon)
{
OSErr error = noErr;
@ -1298,7 +1306,8 @@ pascal OSErr Handle_aevt_pdoc_AE (const AppleEvent *theAEvent, AppleEvent *theRe
*
* (Just get rid of all the parms)
*/
pascal OSErr Handle_unknown_AE (const AppleEvent *theAEvent, AppleEvent *theReply, long refCon)
pascal OSErr
Handle_unknown_AE(const AppleEvent *theAEvent, AppleEvent *theReply, long refCon)
{
OSErr error = noErr;
@ -1324,7 +1333,8 @@ pascal OSErr Handle_unknown_AE (const AppleEvent *theAEvent, AppleEvent *theRepl
/*
* Install the various AppleEvent Handlers
*/
OSErr InstallAEHandlers (void)
OSErr
InstallAEHandlers(void)
{
OSErr error;
@ -2099,8 +2109,20 @@ gui_mac_doKeyEvent(EventRecord *theEvent)
/* Intercept CTRL-C */
if (theEvent->modifiers & controlKey)
{
if (key_char == Ctrl_C && ctrl_c_interrupts)
got_int = TRUE;
else if ((theEvent->modifiers & ~(controlKey|shiftKey)) == 0
&& (key_char == '2' || key_char == '6'))
{
/* CTRL-^ and CTRL-@ don't work in the normal way. */
if (key_char == '2')
key_char = Ctrl_AT;
else
key_char = Ctrl_HAT;
theEvent->modifiers = 0;
}
}
/* Intercept CMD-. */
if (theEvent->modifiers & cmdKey)
@ -2162,9 +2184,9 @@ gui_mac_doKeyEvent(EventRecord *theEvent)
{
#if 1
/* Clear modifiers when only one modifier is set */
if( (modifiers == MOD_MASK_SHIFT) ||
(modifiers == MOD_MASK_CTRL) ||
(modifiers == MOD_MASK_ALT))
if ((modifiers == MOD_MASK_SHIFT)
|| (modifiers == MOD_MASK_CTRL)
|| (modifiers == MOD_MASK_ALT))
modifiers = 0;
#else
if (modifiers & MOD_MASK_CTRL)
@ -2191,7 +2213,9 @@ gui_mac_doKeyEvent(EventRecord *theEvent)
else
{
#ifdef FEAT_MBYTE
if (input_conv.vc_type != CONV_NONE)
/* Convert characters when needed (e.g., from MacRoman to latin1).
* This doesn't work for the NUL byte. */
if (input_conv.vc_type != CONV_NONE && key_char > 0)
{
char_u from[2], *to;
int l;
@ -2341,8 +2365,7 @@ gui_mac_doMouseUpEvent (theEvent)
clickIsPopup = FALSE;
}
#endif
gui_send_mouse_event
(MOUSE_RELEASE, thePoint.h, thePoint.v, FALSE, vimModifiers);
gui_send_mouse_event(MOUSE_RELEASE, thePoint.h, thePoint.v, FALSE, vimModifiers);
}
#ifdef USE_MOUSEWHEEL
@ -4028,6 +4051,7 @@ clip_mch_request_selection(cbd)
ScrapFlavorFlags scrapFlags;
ScrapRef scrap = nil;
OSStatus error;
int flavor;
#else
long scrapOffset;
long scrapSize;
@ -4042,6 +4066,17 @@ clip_mch_request_selection(cbd)
if (error != noErr)
return;
flavor = 0;
error = GetScrapFlavorFlags(scrap, VIMSCRAPFLAVOR, &scrapFlags);
if (error == noErr)
{
error = GetScrapFlavorSize(scrap, VIMSCRAPFLAVOR, &scrapSize);
if (error == noErr && scrapSize > 1)
flavor = 1;
}
if (flavor == 0)
{
error = GetScrapFlavorFlags(scrap, kScrapFlavorTypeText, &scrapFlags);
if (error != noErr)
return;
@ -4049,6 +4084,7 @@ clip_mch_request_selection(cbd)
error = GetScrapFlavorSize(scrap, kScrapFlavorTypeText, &scrapSize);
if (error != noErr)
return;
}
ReserveMem(scrapSize);
#else
@ -4068,16 +4104,21 @@ clip_mch_request_selection(cbd)
#endif
HLock(textOfClip);
#ifdef USE_CARBONIZED
error = GetScrapFlavorData (scrap, kScrapFlavorTypeText, &scrapSize, *textOfClip);
error = GetScrapFlavorData(scrap,
flavor ? VIMSCRAPFLAVOR : kScrapFlavorTypeText,
&scrapSize, *textOfClip);
#else
scrapSize = GetScrap(textOfClip, 'TEXT', &scrapOffset);
#endif
if (flavor)
type = **textOfClip;
else
type = (strchr(*textOfClip, '\r') != NULL) ? MLINE : MCHAR;
tempclip = lalloc(scrapSize+1, TRUE);
STRNCPY(tempclip, *textOfClip, scrapSize);
tempclip[scrapSize] = 0;
STRNCPY(tempclip, *textOfClip + flavor, scrapSize - flavor);
tempclip[scrapSize - flavor] = 0;
searchCR = (char *)tempclip;
while (searchCR != NULL)
@ -4184,15 +4225,23 @@ clip_mch_set_selection(cbd)
ZeroScrap();
#endif
#ifdef USE_CARBONIZED
textOfClip = NewHandle(scrapSize + 1);
#else
textOfClip = NewHandle(scrapSize);
#endif
HLock(textOfClip);
STRNCPY(*textOfClip, str, scrapSize);
#ifdef USE_CARBONIZED
**textOfClip = type;
STRNCPY(*textOfClip + 1, str, scrapSize);
GetCurrentScrap(&scrap);
PutScrapFlavor(scrap, kScrapFlavorTypeText, kScrapFlavorMaskNone,
scrapSize, *textOfClip);
scrapSize, *textOfClip + 1);
PutScrapFlavor(scrap, VIMSCRAPFLAVOR, kScrapFlavorMaskNone,
scrapSize + 1, *textOfClip);
#else
STRNCPY(*textOfClip, str, scrapSize);
PutScrap(scrapSize, 'TEXT', *textOfClip);
#endif
HUnlock(textOfClip);

View File

@ -818,8 +818,10 @@ FindWindowTitle(HWND hwnd, LPARAM lParam)
{
if (strstr(buf, title) != NULL)
{
/* Found it. Store the window ref. and quit searching. */
/* Found it. Store the window ref. and quit searching if MDI
* works. */
vim_parent_hwnd = FindWindowEx(hwnd, NULL, "MDIClient", NULL);
if (vim_parent_hwnd != NULL)
return FALSE;
}
}

View File

@ -1518,7 +1518,7 @@ swapfile_info(fname)
{
MSG_PUTS(_(" file name: "));
if (b0.b0_fname[0] == NUL)
MSG_PUTS(_("[No File]"));
MSG_PUTS(_("[No Name]"));
else
msg_outtrans(b0.b0_fname);
@ -3781,7 +3781,7 @@ findswapname(buf, dirp, old_fname)
* Change the ".swp" extension to find another file that can be used.
* First decrement the last char: ".swo", ".swn", etc.
* If that still isn't enough decrement the last but one char: ".svz"
* Can happen when editing many "No File" buffers.
* Can happen when editing many "No Name" buffers.
*/
if (fname[n - 1] == 'a') /* ".s?a" */
{

View File

@ -5186,8 +5186,24 @@ nv_scroll(cap)
if (cap->count1 - 1 >= curwin->w_cursor.lnum)
curwin->w_cursor.lnum = 1;
else
{
#ifdef FEAT_FOLDING
if (hasAnyFolding(curwin))
{
/* Count a fold for one screen line. */
for (n = cap->count1 - 1; n > 0
&& curwin->w_cursor.lnum > curwin->w_topline; --n)
{
(void)hasFolding(curwin->w_cursor.lnum,
&curwin->w_cursor.lnum, NULL);
--curwin->w_cursor.lnum;
}
}
else
#endif
curwin->w_cursor.lnum -= cap->count1 - 1;
}
}
else
{
if (cap->cmdchar == 'M')
@ -5222,8 +5238,23 @@ nv_scroll(cap)
if (n > 0 && used > curwin->w_height)
--n;
}
else
else /* (cap->cmdchar == 'H') */
{
n = cap->count1 - 1;
#ifdef FEAT_FOLDING
if (hasAnyFolding(curwin))
{
/* Count a fold for one screen line. */
lnum = curwin->w_topline;
while (n-- > 0 && lnum < curwin->w_botline - 1)
{
hasFolding(lnum, NULL, &lnum);
++lnum;
}
n = lnum - curwin->w_topline;
}
#endif
}
curwin->w_cursor.lnum = curwin->w_topline + n;
if (curwin->w_cursor.lnum > curbuf->b_ml.ml_line_count)
curwin->w_cursor.lnum = curbuf->b_ml.ml_line_count;

View File

@ -2987,7 +2987,12 @@ mch_isdir(char_u *name)
mch_can_exe(name)
char_u *name;
{
return (searchpath(name) != NULL);
char *p;
p = searchpath(name);
if (p == NULL || mch_isdir(p))
return FALSE;
return TRUE;
}
#endif

View File

@ -1519,29 +1519,45 @@ theend:
# include <shellapi.h> /* required for FindExecutable() */
#endif
/*
* Return TRUE if "name" is in $PATH.
* TODO: Should also check if it's really executable.
*/
static int
executable_exists(char *name)
{
char location[2 * _MAX_PATH + 2];
char widename[2 * _MAX_PATH];
char *dum;
char fname[_MAX_PATH];
/* There appears to be a bug in FindExecutableA() on Windows NT.
* Use FindExecutableW() instead... */
if (g_PlatformId == VER_PLATFORM_WIN32_NT)
#ifdef FEAT_MBYTE
if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
{
MultiByteToWideChar(CP_ACP, 0, (LPCTSTR)name, -1,
(LPWSTR)widename, _MAX_PATH);
if (FindExecutableW((LPCWSTR)widename, (LPCWSTR)"",
(LPWSTR)location) > (HINSTANCE)32)
return TRUE;
}
else
WCHAR *p = enc_to_ucs2(name, NULL);
WCHAR fnamew[_MAX_PATH];
WCHAR *dumw;
long n;
if (p != NULL)
{
if (FindExecutableA((LPCTSTR)name, (LPCTSTR)"",
(LPTSTR)location) > (HINSTANCE)32)
return TRUE;
}
n = (long)SearchPathW(NULL, p, NULL, _MAX_PATH, fnamew, &dumw);
vim_free(p);
if (n > 0 || GetLastError() != ERROR_CALL_NOT_IMPLEMENTED)
{
if (n == 0)
return FALSE;
if (GetFileAttributesW(fnamew) & FILE_ATTRIBUTE_DIRECTORY)
return FALSE;
return TRUE;
}
/* Retry with non-wide function (for Windows 98). */
}
}
#endif
if (SearchPath(NULL, name, NULL, _MAX_PATH, fname, &dum) == 0)
return FALSE;
if (mch_isdir(fname))
return FALSE;
return TRUE;
}
#ifdef FEAT_GUI_W32

View File

@ -97,8 +97,8 @@ zh_CN.cp936.po: zh_CN.po
# Convert ru.po to create ru.cp1251.po.
ru.cp1251.po: ru.po
rm -f ru.cp1251.po
iconv -f koi8-r -t cp1251 ru.po | \
sed -e 's/charset=koi8-r/charset=cp1251/' -e 's/# Original translations/# Generated from ru.po, DO NOT EDIT/' > ru.cp1251.po
iconv -f utf-8 -t cp1251 ru.po | \
sed -e 's/charset=utf-8/charset=cp1251/' -e 's/# Original translations/# Generated from ru.po, DO NOT EDIT/' > ru.cp1251.po
check:
@if test "x" = "x$(prefix)"; then \

File diff suppressed because it is too large Load Diff

View File

@ -11,6 +11,7 @@ void eval_diff __ARGS((char_u *origfile, char_u *newfile, char_u *outfile));
void eval_patch __ARGS((char_u *origfile, char_u *difffile, char_u *outfile));
int eval_to_bool __ARGS((char_u *arg, int *error, char_u **nextcmd, int skip));
char_u *eval_to_string_skip __ARGS((char_u *arg, char_u **nextcmd, int skip));
int skip_expr __ARGS((char_u **pp));
char_u *eval_to_string __ARGS((char_u *arg, char_u **nextcmd));
char_u *eval_to_string_safe __ARGS((char_u *arg, char_u **nextcmd));
int eval_to_number __ARGS((char_u *expr));

View File

@ -38,6 +38,7 @@ int read_viminfo_sub_string __ARGS((vir_T *virp, int force));
void write_viminfo_sub_string __ARGS((FILE *fp));
void prepare_tagpreview __ARGS((void));
void ex_help __ARGS((exarg_T *eap));
char_u *check_help_lang __ARGS((char_u *arg));
int help_heuristic __ARGS((char_u *matched_string, int offset, int wrong_case));
int find_help_tags __ARGS((char_u *arg, int *num_matches, char_u ***matches, int keep_lang));
void fix_help_buffer __ARGS((void));

View File

@ -1006,6 +1006,7 @@ qf_jump(dir, errornr, forceit)
#ifdef FEAT_FOLDING
int old_KeyTyped = KeyTyped; /* getting file may reset it */
#endif
int ok = OK;
if (qf_curlist >= qf_listcount || qf_lists[qf_curlist].qf_count == 0)
{
@ -1096,6 +1097,42 @@ qf_jump(dir, errornr, forceit)
* window */
print_message = FALSE;
/*
* For ":helpgrep" find a help window or open one.
*/
if (qf_ptr->qf_type == 1 && !curwin->w_buffer->b_help)
{
win_T *wp;
int n;
for (wp = firstwin; wp != NULL; wp = wp->w_next)
if (wp->w_buffer != NULL && wp->w_buffer->b_help)
break;
if (wp != NULL && wp->w_buffer->b_nwindows > 0)
win_enter(wp, TRUE);
else
{
/*
* Split off help window; put it at far top if no position
* specified, the current window is vertically split and narrow.
*/
n = WSP_HELP;
# ifdef FEAT_VERTSPLIT
if (cmdmod.split == 0 && curwin->w_width != Columns
&& curwin->w_width < 80)
n |= WSP_TOP;
# endif
if (win_split(0, n) == FAIL)
goto theend;
if (curwin->w_height < p_hh)
win_setheight((int)p_hh);
}
if (!p_im)
restart_edit = 0; /* don't want insert mode in help file */
}
/*
* If currently in the quickfix window, find another window to show the
* file in.
@ -1170,8 +1207,28 @@ qf_jump(dir, errornr, forceit)
*/
old_curbuf = curbuf;
old_lnum = curwin->w_cursor.lnum;
if (qf_ptr->qf_fnum == 0 || buflist_getfile(qf_ptr->qf_fnum,
(linenr_T)1, GETF_SETMARK | GETF_SWITCH, forceit) == OK)
if (qf_ptr->qf_fnum != 0)
{
if (qf_ptr->qf_type == 1)
{
/* Open help file (do_ecmd() will set b_help flag, readfile() will
* set b_p_ro flag). */
if (!can_abandon(curbuf, forceit))
{
EMSG(_(e_nowrtmsg));
ok = FALSE;
}
else
ok = do_ecmd(qf_ptr->qf_fnum, NULL, NULL, NULL, (linenr_T)1,
ECMD_HIDE + ECMD_SET_HELP);
}
else
ok = buflist_getfile(qf_ptr->qf_fnum,
(linenr_T)1, GETF_SETMARK | GETF_SWITCH, forceit);
}
if (ok == OK)
{
/* When not switched to another buffer, still need to set pc mark */
if (curbuf == old_curbuf)
@ -2145,11 +2202,19 @@ ex_helpgrep(eap)
int fi;
struct qf_line *prevp = NULL;
long lnum;
#ifdef FEAT_MULTI_LANG
char_u *lang;
#endif
/* Make 'cpoptions' empty, the 'l' flag should not be used here. */
save_cpo = p_cpo;
p_cpo = (char_u *)"";
#ifdef FEAT_MULTI_LANG
/* Check for a specified language */
lang = check_help_lang(eap->arg);
#endif
regmatch.regprog = vim_regcomp(eap->arg, RE_MAGIC + RE_STRING);
regmatch.rm_ic = FALSE;
if (regmatch.regprog != NULL)
@ -2172,6 +2237,16 @@ ex_helpgrep(eap)
{
for (fi = 0; fi < fcount && !got_int; ++fi)
{
#ifdef FEAT_MULTI_LANG
/* Skip files for a different language. */
if (lang != NULL
&& STRNICMP(lang, fnames[fi]
+ STRLEN(fnames[fi]) - 3, 2) != 0
&& !(STRNICMP(lang, "en", 2) == 0
&& STRNICMP("txt", fnames[fi]
+ STRLEN(fnames[fi]) - 3, 3) == 0))
continue;
#endif
fd = fopen((char *)fnames[fi], "r");
if (fd != NULL)
{
@ -2227,6 +2302,8 @@ ex_helpgrep(eap)
/* Jump to first match. */
if (qf_lists[qf_curlist].qf_count > 0)
qf_jump(0, 0, FALSE);
else
EMSG2(_(e_nomatch2), eap->arg);
}
#endif /* FEAT_QUICKFIX */

View File

@ -3052,13 +3052,16 @@ current_word(oap, count, include, bigword)
--count;
}
if (include_white && cls() != 0)
if (include_white && (cls() != 0
|| (curwin->w_cursor.col == 0 && !inclusive)))
{
/*
* If we don't include white space at the end, move the start
* to include some white space there. This makes "daw" work
* better on the last word in a sentence (and "2daw" on last-but-one
* word). But don't delete white space at start of line (indent).
* word). Also when "2daw" deletes "word." at the end of the line
* (cursor is at start of next line).
* But don't delete white space at start of line (indent).
*/
pos = curwin->w_cursor; /* save cursor position */
curwin->w_cursor = start_pos;