updated for version 7.0002
This commit is contained in:
@ -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
|
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
|
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
|
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}
|
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}
|
GTK GUI}
|
||||||
|
|
||||||
Note: The "~ register is only used when dropping plain text onto Vim.
|
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.
|
the text. However, 'formatprg' is not used.
|
||||||
{not in Vi}
|
{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* >
|
Example: To format the current paragraph use: *gqap* >
|
||||||
gqap
|
gqap
|
||||||
|
|
||||||
|
|||||||
@ -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
|
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
|
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'
|
:let foo='bar'
|
||||||
:e `=foo . ".c" `
|
: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]*
|
*++opt* *[++opt]*
|
||||||
The [++opt] argument can be used to force the value of 'fileformat' or
|
The [++opt] argument can be used to force the value of 'fileformat' or
|
||||||
|
|||||||
@ -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
|
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
|
command Tick let s:counter = s:counter + 1 | echo s:counter
|
||||||
|
|
||||||
When calling a function and invoking a user-defined command, the context for
|
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.
|
defined.
|
||||||
|
|
||||||
The script variables are also available when a function is defined inside a
|
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()*
|
bufexists({expr}) *bufexists()*
|
||||||
The result is a Number, which is non-zero if a buffer called
|
The result is a Number, which is non-zero if a buffer called
|
||||||
{expr} exists.
|
{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
|
If the {expr} argument is a string it must match a buffer name
|
||||||
exactly.
|
exactly. The name can be:
|
||||||
If the {expr} argument is a number buffer numbers are used.
|
- 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.
|
Unlisted buffers will be found.
|
||||||
Note that help files are listed by their short name in the
|
Note that help files are listed by their short name in the
|
||||||
output of |:buffers|, but bufexists() requires using their
|
output of |:buffers|, but bufexists() requires using their
|
||||||
@ -987,12 +991,12 @@ bufexists({expr}) *bufexists()*
|
|||||||
buflisted({expr}) *buflisted()*
|
buflisted({expr}) *buflisted()*
|
||||||
The result is a Number, which is non-zero if a buffer called
|
The result is a Number, which is non-zero if a buffer called
|
||||||
{expr} exists and is listed (has the 'buflisted' option set).
|
{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()*
|
bufloaded({expr}) *bufloaded()*
|
||||||
The result is a Number, which is non-zero if a buffer called
|
The result is a Number, which is non-zero if a buffer called
|
||||||
{expr} exists and is loaded (shown in a window or hidden).
|
{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()*
|
bufname({expr}) *bufname()*
|
||||||
The result is the name of a buffer, as it is displayed by the
|
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}
|
This function checks if an executable with the name {expr}
|
||||||
exists. {expr} must be the name of the program without any
|
exists. {expr} must be the name of the program without any
|
||||||
arguments. executable() uses the normal $PATH.
|
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:
|
The result is a Number:
|
||||||
1 exists
|
1 exists
|
||||||
0 does not exist
|
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
|
This autocommand jumps to the last known position in a file
|
||||||
just after opening it, if the '" mark is set: >
|
just after opening it, if the '" mark is set: >
|
||||||
:au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal g'\"" | endif
|
:au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal g'\"" | endif
|
||||||
<
|
|
||||||
line2byte({lnum}) *line2byte()*
|
line2byte({lnum}) *line2byte()*
|
||||||
Return the byte count from the start of the buffer for line
|
Return the byte count from the start of the buffer for line
|
||||||
{lnum}. This includes the end-of-line character, depending on
|
{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|
|
gettext Compiled with message translation |multi-lang|
|
||||||
gui Compiled with GUI enabled.
|
gui Compiled with GUI enabled.
|
||||||
gui_athena Compiled with Athena GUI.
|
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_gtk Compiled with GTK+ GUI (any version).
|
||||||
gui_gtk2 Compiled with GTK+ 2 GUI (gui_gtk is also defined).
|
gui_gtk2 Compiled with GTK+ 2 GUI (gui_gtk is also defined).
|
||||||
gui_mac Compiled with Macintosh GUI.
|
gui_mac Compiled with Macintosh GUI.
|
||||||
@ -2801,7 +2808,7 @@ scrollbind Compiled with 'scrollbind' support.
|
|||||||
showcmd Compiled with 'showcmd' support.
|
showcmd Compiled with 'showcmd' support.
|
||||||
signs Compiled with |:sign| support.
|
signs Compiled with |:sign| support.
|
||||||
smartindent Compiled with 'smartindent' 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'
|
statusline Compiled with support for 'statusline', 'rulerformat'
|
||||||
and special formats of 'titlestring' and 'iconstring'.
|
and special formats of 'titlestring' and 'iconstring'.
|
||||||
sun_workshop Compiled with support for Sun |workshop|.
|
sun_workshop Compiled with support for Sun |workshop|.
|
||||||
|
|||||||
@ -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
|
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:
|
subdirectories of the '$VIM/farsi' directory:
|
||||||
|
|
||||||
+ far-a01.pcf X Windows fonts for Unix including Linux systems
|
+ 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.f16 a screen fonts for Unix including Linux systems
|
||||||
+ far-a01.fon a monospaced fonts for Windows NT/95/98
|
+ far-a01.fon a monospaced fonts for Windows NT/95/98
|
||||||
+ far-a01.com a screen fonts for DOS
|
+ far-a01.com a screen fonts for DOS
|
||||||
@ -92,7 +92,7 @@ o Installation of fonts for X Window systems (Unix/Linux)
|
|||||||
> mkfontdir
|
> mkfontdir
|
||||||
> xset +fp path_name_of_farsi_fonts_directory
|
> 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.
|
Copy far-a01.bf font into a directory of your choice.
|
||||||
Change to the directory containing the far-a01.fb fonts and
|
Change to the directory containing the far-a01.fb fonts and
|
||||||
|
|||||||
@ -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
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@ -130,8 +130,8 @@ tag char action ~
|
|||||||
|i_<C-Home>| <C-Home> cursor to start of file
|
|i_<C-Home>| <C-Home> cursor to start of file
|
||||||
|i_<End>| <End> cursor past end of line
|
|i_<End>| <End> cursor past end of line
|
||||||
|i_<C-End>| <C-End> cursor past end of file
|
|i_<C-End>| <C-End> cursor past end of file
|
||||||
|i_<PageUp>| <PageUp> one screenfull backward
|
|i_<PageUp>| <PageUp> one screenful backward
|
||||||
|i_<PageDown>| <PageDown> one screenfull forward
|
|i_<PageDown>| <PageDown> one screenful forward
|
||||||
|i_<F1>| <F1> same as <Help>
|
|i_<F1>| <F1> same as <Help>
|
||||||
|i_<Help>| <Help> stop insert mode and display help window
|
|i_<Help>| <Help> stop insert mode and display help window
|
||||||
|i_<Insert>| <Insert> toggle Insert/Replace mode
|
|i_<Insert>| <Insert> toggle Insert/Replace mode
|
||||||
|
|||||||
@ -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
|
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,
|
The position is corrected for inserted/deleted lines,
|
||||||
but NOT for inserted/deleted characters.
|
but NOT for inserted/deleted characters.
|
||||||
When the |:keepjumps| command modifier is used the |'^|
|
When the |:keepjumps| command modifier is used the |'^|
|
||||||
mark wont be changed.
|
mark won't be changed.
|
||||||
{not in Vi}
|
{not in Vi}
|
||||||
|
|
||||||
*o*
|
*o*
|
||||||
|
|||||||
@ -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.
|
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|.
|
- For all systems keymaps can be used. See |mbyte-keymap|.
|
||||||
|
|
||||||
The options 'iminsert', 'imsearch' and 'imcmdline' can be used to chose
|
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*
|
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
|
This works on not only insert-normal mode, but also search-command input and
|
||||||
replace mode.
|
replace mode.
|
||||||
The options 'iminsert', 'imsearch' and 'imcmdline' can be used to chose
|
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
|
WHAT IS IME
|
||||||
IME is a part of East asian version Windows. That helps you to input
|
IME is a part of East asian version Windows. That helps you to input
|
||||||
|
|||||||
@ -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
|
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).
|
the cursor, this is not a motion command).
|
||||||
|
|
||||||
*:ma* *:mark* *E191*
|
*: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.
|
column 0. Default is cursor line.
|
||||||
|
|
||||||
*:k*
|
*: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.
|
be omitted.
|
||||||
|
|
||||||
*'* *'a* *`* *`a*
|
*'* *'a* *`* *`a*
|
||||||
@ -692,7 +693,9 @@ g'{mark} g`{mark}
|
|||||||
jumping within the current buffer. Example: >
|
jumping within the current buffer. Example: >
|
||||||
g`"
|
g`"
|
||||||
< jumps to the last known position in a file. See
|
< 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*
|
||||||
:marks List all the current marks (not a motion command).
|
: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
|
or larger than before, all marks are kept at the
|
||||||
same line number.
|
same line number.
|
||||||
- When the number of lines decreases, the marks in the
|
- 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
|
In any case the marks below the filtered text have
|
||||||
their line numbers adjusted, thus stick to the text,
|
their line numbers adjusted, thus stick to the text,
|
||||||
as usual.
|
as usual.
|
||||||
@ -877,12 +880,22 @@ These commands are not marks themselves, but jump to a mark:
|
|||||||
|
|
||||||
*:keepj* *:keepjumps*
|
*:keepj* *:keepjumps*
|
||||||
:keepj[umps] {command}
|
:keepj[umps] {command}
|
||||||
Do not change the |''|, |'.| and |'^| marks, the
|
Moving around in {command} does not change the |''|,
|
||||||
|jumplist| or the |changelist|. Useful when making a
|
|'.| and |'^| marks, the |jumplist| or the
|
||||||
change or inserting text automatically and the user
|
|changelist|.
|
||||||
doesn't want to go to this position. E.g., when
|
Useful when making a change or inserting text
|
||||||
updating a "Last change" timestamp: >
|
automatically and the user doesn't want to go to this
|
||||||
autocmd BufWritePre,FileWritePre *.abc keepjumps call SetLastChange()
|
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*
|
8. Jumps *jump-motions*
|
||||||
|
|||||||
@ -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
|
VIM REFERENCE MANUAL by Gordon Prieur
|
||||||
@ -180,7 +180,7 @@ Region is guarded, cannot modify
|
|||||||
change.
|
change.
|
||||||
|
|
||||||
*E656*
|
*E656*
|
||||||
NetBeans dissallows writes of unmodified buffers
|
NetBeans disallows writes of unmodified buffers
|
||||||
NetBeans does not support writes of unmodified buffers that
|
NetBeans does not support writes of unmodified buffers that
|
||||||
were opened from NetBeans.
|
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
|
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
|
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
|
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
|
confusion happening again, netbeans_saved() has been renamed to
|
||||||
netbeans_save_buffer().
|
netbeans_save_buffer().
|
||||||
|
|
||||||
|
|||||||
@ -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.
|
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*
|
4. Mac Lack *mac-lack*
|
||||||
|
|
||||||
-The filenames containing both ":" and "/" are sometimes misinterpreted.
|
The filenames containing both ":" and "/" are sometimes misinterpreted. (just
|
||||||
(just re-execute the command)
|
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.
|
Scrollbar are not scrolling live, and when only the arrow or scroll area, a
|
||||||
-Syntax highlighting works on 68k Macs but is _really_ slow.
|
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*
|
5. Mac Bug Report *mac-bug*
|
||||||
|
|||||||
@ -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
|
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.
|
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.
|
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
|
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
|
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
|
then with enabled GUI in character mode. Therefore, if you do not use GUI
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
*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.
|
VIM REFERENCE MANUAL by Charles E. Campbell, Jr.
|
||||||
|
|
||||||
*dav* *http* *network* *rcp* *scp*
|
*dav* *http* *network* *rcp* *scp*
|
||||||
*fetch* *netrw* *Nread* *rsync* *sftp*
|
*fetch* *netrw* *Nread* *rsync* *sftp*
|
||||||
*ftp* *netrw.vim* *Nwrite* *netrw-file*
|
*ftp* *netrw.vim* *Nwrite* *netrw-file*
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
0. Contents *netrw-contents*
|
0. Contents *netrw-contents*
|
||||||
@ -16,15 +16,16 @@
|
|||||||
4. Transparent File Transfer...........................|netrw-transparent|
|
4. Transparent File Transfer...........................|netrw-transparent|
|
||||||
5. Ex Commands.........................................|netrw-ex|
|
5. Ex Commands.........................................|netrw-ex|
|
||||||
6. Variables and Options...............................|netrw-var|
|
6. Variables and Options...............................|netrw-var|
|
||||||
7. Debugging...........................................|netrw-debug|
|
7. Remote Directory Listing............................|netrw-dir|
|
||||||
8. New Stuff...........................................|netrw-new|
|
8. Debugging...........................................|netrw-debug|
|
||||||
9. Credits.............................................|netrw-credits|
|
9. History.............................................|netrw-history|
|
||||||
|
10. Credits.............................................|netrw-credits|
|
||||||
|
|
||||||
The functionality mentioned here is done via using |standard-plugin|
|
The functionality mentioned here is done via using |standard-plugin|
|
||||||
techniques. This plugin is only available if
|
techniques. This plugin is only available if
|
||||||
|
|
||||||
set nocp " 'compatible' is not set
|
set nocp " 'compatible' is not set
|
||||||
filetype plugin on " plugins are enabled
|
filetype plugin on " plugins are enabled
|
||||||
|
|
||||||
You can avoid loading this plugin by setting the "loaded_netrw" variable
|
You can avoid loading this plugin by setting the "loaded_netrw" variable
|
||||||
in your <.vimrc> file: >
|
in your <.vimrc> file: >
|
||||||
@ -49,16 +50,16 @@ in your <.vimrc> file: >
|
|||||||
|
|
||||||
Controlling External Applications
|
Controlling External Applications
|
||||||
|
|
||||||
Protocol Variable Default Value
|
Protocol Variable Default Value
|
||||||
-------- ---------------- -------------
|
-------- ---------------- -------------
|
||||||
dav: g:netrw_dav_cmd = "cadaver"
|
dav: g:netrw_dav_cmd = "cadaver"
|
||||||
fetch: g:netrw_fetch_cmd = "fetch -o"
|
fetch: g:netrw_fetch_cmd = "fetch -o"
|
||||||
ftp: g:netrw_ftp_cmd = "ftp"
|
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
|
http: g:netrw_http_cmd = "wget -q -O" If wget is available
|
||||||
rcp: g:netrw_rcp_cmd = "rcp"
|
rcp: g:netrw_rcp_cmd = "rcp"
|
||||||
rsync: g:netrw_rsync_cmd = "rsync -a"
|
rsync: g:netrw_rsync_cmd = "rsync -a"
|
||||||
scp: g:netrw_scp_cmd = "scp -q"
|
scp: g:netrw_scp_cmd = "scp -q"
|
||||||
sftp: g:netrw_sftp_cmd = "sftp"
|
sftp: g:netrw_sftp_cmd = "sftp"
|
||||||
|
|
||||||
READING
|
READING
|
||||||
@ -76,7 +77,7 @@ in your <.vimrc> file: >
|
|||||||
:Nread "sftp://[user@]machine/file" uses sftp
|
:Nread "sftp://[user@]machine/file" uses sftp
|
||||||
|
|
||||||
WRITING
|
WRITING
|
||||||
:Nwrite ? give help
|
:Nwrite ? give help
|
||||||
:Nwrite "machine:file" uses rcp
|
:Nwrite "machine:file" uses rcp
|
||||||
:Nwrite "machine file" uses ftp with <.netrc>
|
:Nwrite "machine file" uses ftp with <.netrc>
|
||||||
:Nwrite "machine id password file" uses ftp
|
:Nwrite "machine id password file" uses ftp
|
||||||
@ -88,6 +89,9 @@ in your <.vimrc> file: >
|
|||||||
:Nwrite "sftp://[user@]machine/file" uses sftp
|
:Nwrite "sftp://[user@]machine/file" uses sftp
|
||||||
http: not supported!
|
http: not supported!
|
||||||
|
|
||||||
|
DIRECTORY LISTING
|
||||||
|
:Nread [protocol]://[user]@hostname/path/
|
||||||
|
|
||||||
USER AND PASSWORD CHANGING
|
USER AND PASSWORD CHANGING
|
||||||
Attempts to use ftp will prompt you for a user-id and a password.
|
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
|
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.
|
clean up.
|
||||||
|
|
||||||
One may modify any protocol's implementing external application
|
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").
|
which is defaulted to "scp -q").
|
||||||
|
|
||||||
Ftp, an old protocol, seems to be blessed by numerous implementations.
|
Ftp, an old protocol, seems to be blessed by numerous implementations.
|
||||||
@ -181,57 +185,57 @@ additional prompting.
|
|||||||
|
|
||||||
*netrw-urls*
|
*netrw-urls*
|
||||||
+=================================+============================+============+
|
+=================================+============================+============+
|
||||||
| Reading | Writing | Uses |
|
| Reading | Writing | Uses |
|
||||||
+=================================+============================+============+
|
+=================================+============================+============+
|
||||||
| DAV: | | |
|
| DAV: | | |
|
||||||
| dav://host/path | | cadaver |
|
| dav://host/path | | cadaver |
|
||||||
| :Nread dav://host/path | :Nwrite dav://host/path | cadaver |
|
| :Nread dav://host/path | :Nwrite dav://host/path | cadaver |
|
||||||
+---------------------------------+----------------------------+------------+
|
+---------------------------------+----------------------------+------------+
|
||||||
| FETCH: | | |
|
| FETCH: | | |
|
||||||
| fetch://[user@]host/path | | |
|
| fetch://[user@]host/path | | |
|
||||||
| fetch://[user@]host:http/path | Not Available | fetch |
|
| fetch://[user@]host:http/path | Not Available | fetch |
|
||||||
| :Nread fetch://[user@]host/path| | |
|
| :Nread fetch://[user@]host/path| | |
|
||||||
+---------------------------------+----------------------------+------------+
|
+---------------------------------+----------------------------+------------+
|
||||||
| FILE: | | |
|
| FILE: | | |
|
||||||
| file:///* | file:///* | |
|
| file:///* | file:///* | |
|
||||||
| file://localhost/* | file://localhost/* | |
|
| file://localhost/* | file://localhost/* | |
|
||||||
+---------------------------------+----------------------------+------------+
|
+---------------------------------+----------------------------+------------+
|
||||||
| FTP: (*3) | (*3) | |
|
| FTP: (*3) | (*3) | |
|
||||||
| ftp://[user@]host/path | ftp://[user@]host/path | ftp (*2) |
|
| ftp://[user@]host/path | ftp://[user@]host/path | ftp (*2) |
|
||||||
| :Nread ftp://host/path | :Nwrite ftp://host/path | ftp+.netrc |
|
| :Nread ftp://host/path | :Nwrite ftp://host/path | ftp+.netrc |
|
||||||
| :Nread host path | :Nwrite host path | ftp+.netrc |
|
| :Nread host path | :Nwrite host path | ftp+.netrc |
|
||||||
| :Nread host uid pass path | :Nwrite host uid pass path | ftp |
|
| :Nread host uid pass path | :Nwrite host uid pass path | ftp |
|
||||||
+---------------------------------+----------------------------+------------+
|
+---------------------------------+----------------------------+------------+
|
||||||
| HTTP: wget is executable: (*4) | | |
|
| HTTP: wget is executable: (*4) | | |
|
||||||
| http://[user@]host/path | Not Available | wget |
|
| http://[user@]host/path | Not Available | wget |
|
||||||
+---------------------------------+----------------------------+------------+
|
+---------------------------------+----------------------------+------------+
|
||||||
| HTTP: fetch is executable (*4) | | |
|
| HTTP: fetch is executable (*4) | | |
|
||||||
| http://[user@]host/path | Not Available | fetch |
|
| http://[user@]host/path | Not Available | fetch |
|
||||||
+---------------------------------+----------------------------+------------+
|
+---------------------------------+----------------------------+------------+
|
||||||
| RCP: | | |
|
| RCP: | | |
|
||||||
| rcp://[user@]host/path | rcp://[user@]host/path | rcp |
|
| rcp://[user@]host/path | rcp://[user@]host/path | rcp |
|
||||||
+---------------------------------+----------------------------+------------+
|
+---------------------------------+----------------------------+------------+
|
||||||
| RSYNC: | | |
|
| RSYNC: | | |
|
||||||
| rsync://[user@]host/path | rsync://[user@]host/path | rsync |
|
| rsync://[user@]host/path | rsync://[user@]host/path | rsync |
|
||||||
| :Nread rsync://host/path | :Nwrite rsync://host/path | rsync |
|
| :Nread rsync://host/path | :Nwrite rsync://host/path | rsync |
|
||||||
| :Nread rcp://host/path | :Nwrite rcp://host/path | rcp |
|
| :Nread rcp://host/path | :Nwrite rcp://host/path | rcp |
|
||||||
+---------------------------------+----------------------------+------------+
|
+---------------------------------+----------------------------+------------+
|
||||||
| SCP: | | |
|
| SCP: | | |
|
||||||
| scp://[user@]host/path | scp://[user@]host/path | scp |
|
| scp://[user@]host/path | scp://[user@]host/path | scp |
|
||||||
| :Nread scp://host/path | :Nwrite scp://host/path | scp (*1) |
|
| :Nread scp://host/path | :Nwrite scp://host/path | scp (*1) |
|
||||||
+---------------------------------+----------------------------+------------+
|
+---------------------------------+----------------------------+------------+
|
||||||
| SFTP: | | |
|
| SFTP: | | |
|
||||||
| sftp://[user@]host/path | sftp://[user@]host/path | sftp |
|
| sftp://[user@]host/path | sftp://[user@]host/path | sftp |
|
||||||
| :Nread sftp://host/path | :Nwrite sftp://host/path | sftp (*1) |
|
| :Nread sftp://host/path | :Nwrite sftp://host/path | sftp (*1) |
|
||||||
+=================================+============================+============+
|
+=================================+============================+============+
|
||||||
|
|
||||||
(*1) For an absolute path use scp://machine//path.
|
(*1) For an absolute path use scp://machine//path.
|
||||||
|
|
||||||
(*2) if <.netrc> is present, it is assumed that it will
|
(*2) if <.netrc> is present, it is assumed that it will
|
||||||
work with your ftp client. Otherwise the script 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
|
(*3) for ftp, "machine" may be machine#port or machine:port
|
||||||
if a different port is needed than the standard ftp port
|
if a different port is needed than the standard ftp port
|
||||||
|
|
||||||
(*4) for http:..., if wget is available it will be used. Otherwise,
|
(*4) for http:..., if wget is available it will be used. Otherwise,
|
||||||
@ -327,67 +331,88 @@ additional commands available.
|
|||||||
|
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
6. Variables and Options *netrw-options* *netrw-var*
|
6. Variables and Options *netrw-options* *netrw-var*
|
||||||
|
|
||||||
The script <netrw.vim> uses several variables which can affect <netrw.vim>'s
|
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:
|
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.
|
Netrw Options
|
||||||
b:netrw_lastfile Holds latest method/machine/path.
|
-------------
|
||||||
b:netrw_line Holds current line number (during NetWrite)
|
Option Meaning
|
||||||
b:netrw_col Holds current cursor position (during NetWrite)
|
-------------- -----------------------------------------------
|
||||||
g:netrw_ftp =0 use default ftp (uid password)
|
<
|
||||||
=1 use alternate ftp (user uid password)
|
b:netrw_col Holds current cursor position (during NetWrite)
|
||||||
(see |netrw-options|)
|
g:netrw_cygwin =1 assume scp under windows is from cygwin
|
||||||
g:netrw_ftpmode ="binary" (default)
|
(default/windows)
|
||||||
="ascii" (your choice)
|
=0 assume scp under windows accepts windows
|
||||||
g:netrw_ignorenetrc =1 (default)
|
style paths (default/else)
|
||||||
if you have a <.netrc> file but you don't
|
g:netrw_ftp =0 use default ftp (uid password)
|
||||||
|
g:netrw_ftpmode ="binary" (default)
|
||||||
|
="ascii" (your choice)
|
||||||
|
g:netrw_ignorenetrc =1 (default)
|
||||||
|
if you have a <.netrc> file but you don't
|
||||||
want it used, then set this variable. Its
|
want it used, then set this variable. Its
|
||||||
mere existence is enough to cause <.netrc>
|
mere existence is enough to cause <.netrc>
|
||||||
to be ignored.
|
to be ignored.
|
||||||
g:netrw_win95ftp =0 use unix-style ftp even if win95/98/ME/etc
|
b:netrw_lastfile Holds latest method/machine/path.
|
||||||
=1 use default method to do ftp
|
b:netrw_line Holds current line number (during NetWrite)
|
||||||
g:netrw_cygwin =1 assume scp under windows is from cygwin
|
g:netrw_passwd Holds current password for ftp.
|
||||||
(default/windows)
|
g:netrw_silent =0 transfers done normally
|
||||||
=0 assume scp under windows accepts windows
|
=1 transfers done silently
|
||||||
style paths (default/else)
|
g:netrw_uid Holds current user-id for ftp.
|
||||||
g:netrw_use_nt_rcp =0 don't use WinNT/2K/XP's rcp (default)
|
=1 use alternate ftp (user uid password)
|
||||||
=1 use WinNT/2K/XP's rcp, binary mode
|
(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
|
The script will also make use of the following variables internally, albeit
|
||||||
temporarily.
|
temporarily.
|
||||||
|
>
|
||||||
|
-------------------
|
||||||
|
Temporary Variables
|
||||||
|
-------------------
|
||||||
|
Variable Meaning
|
||||||
|
-------- ------------------------------------
|
||||||
|
<
|
||||||
g:netrw_method Index indicating rcp/ftp+.netrc/ftp
|
g:netrw_method Index indicating rcp/ftp+.netrc/ftp
|
||||||
g:netrw_machine Holds machine name parsed from input
|
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-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
|
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"
|
netrw_ftp variable =doesn't exist userid set by "user userid"
|
||||||
=1 userid set by "userid"
|
=0 userid set by "user userid"
|
||||||
NetReadFixup function =doesn't exist no change
|
=1 userid set by "userid"
|
||||||
=exists Allows user to have files
|
NetReadFixup function =doesn't exist no change
|
||||||
read via ftp automatically
|
=exists Allows user to have files
|
||||||
transformed however they wish
|
read via ftp automatically
|
||||||
by NetReadFixup()
|
transformed however they wish
|
||||||
|
by NetReadFixup()
|
||||||
g:netrw_dav_cmd variable ="cadaver"
|
g:netrw_dav_cmd variable ="cadaver"
|
||||||
g:netrw_fetch_cmd variable ="fetch -o"
|
g:netrw_fetch_cmd variable ="fetch -o"
|
||||||
g:netrw_ftp_cmd variable ="ftp"
|
g:netrw_ftp_cmd variable ="ftp"
|
||||||
g:netrw_http_cmd variable ="fetch -o" else if fetch is executable
|
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_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_rcp_cmd variable ="rcp"
|
||||||
g:netrw_rsync_cmd variable ="rsync -a"
|
g:netrw_rsync_cmd variable ="rsync -a"
|
||||||
g:netrw_scp_cmd variable ="scp -q"
|
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.
|
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
|
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 g:netrw_..._cmd variables specify the external program to use handle
|
||||||
the associated protocol (rcp, ftp, etc), plus any options.
|
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:
|
temporary file:
|
||||||
>
|
>
|
||||||
IF g:netrw_ftp !exists or is not 1 IF g:netrw_ftp exists and is 1
|
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
|
open machine [port] open machine [port]
|
||||||
[g:netrw_ftpmode] password
|
user userid password userid password
|
||||||
get filename tempfile [g:netrw_ftpmode]
|
[g:netrw_ftpmode] password
|
||||||
get filename tempfile
|
get filename tempfile [g:netrw_ftpmode]
|
||||||
|
get filename tempfile >
|
||||||
|
---------------------------------------------------------------------
|
||||||
<
|
<
|
||||||
Netrw then executes the lines above by use of a filter:
|
Netrw then executes the lines above by use of a filter:
|
||||||
>
|
>
|
||||||
@ -418,14 +448,14 @@ where
|
|||||||
-n means don't use netrc and is used for Method #3 (ftp w/o <.netrc>)
|
-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
|
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
|
The temporary file is then read into the main editing session window that
|
||||||
requested it and the temporary file deleted.
|
requested it and the temporary file deleted.
|
||||||
|
|
||||||
If your ftp doesn't accept the "user" command and immediately just demands
|
If your ftp doesn't accept the "user" command and immediately just demands
|
||||||
a userid, then try putting "let netrw_ftp=1" in your <.vimrc>.
|
a userid, then try putting "let netrw_ftp=1" in your <.vimrc>.
|
||||||
|
|
||||||
*netrw-fixup*
|
*netrw-fixup*
|
||||||
If your ftp for whatever reason generates unwanted lines (such as AUTH
|
If your ftp for whatever reason generates unwanted lines (such as AUTH
|
||||||
messages) you may write a NetReadFixup(tmpfile) function:
|
messages) you may write a NetReadFixup(tmpfile) function:
|
||||||
>
|
>
|
||||||
@ -441,7 +471,7 @@ messages) you may write a NetReadFixup(tmpfile) function:
|
|||||||
elseif a:method == 7 "rsync
|
elseif a:method == 7 "rsync
|
||||||
elseif a:method == 8 "fetch
|
elseif a:method == 8 "fetch
|
||||||
elseif a:method == 9 "sftp
|
elseif a:method == 9 "sftp
|
||||||
else " complain
|
else " complain
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
>
|
>
|
||||||
@ -453,17 +483,42 @@ and so it is desirable to automate their removal. Here's some code taken
|
|||||||
from <netrw.vim> itself:
|
from <netrw.vim> itself:
|
||||||
>
|
>
|
||||||
if has("win95") && g:netrw_win95ftp
|
if has("win95") && g:netrw_win95ftp
|
||||||
fu! NetReadFixup(method, line1, line2)
|
fun! NetReadFixup(method, line1, line2)
|
||||||
if method == 3 " ftp (no <.netrc>)
|
if method == 3 " ftp (no <.netrc>)
|
||||||
let fourblanklines= line2 - 3
|
let fourblanklines= line2 - 3
|
||||||
silent fourblanklines.",".line2."g/^\s*/d"
|
silent fourblanklines.",".line2."g/^\s*/d"
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
endif
|
endif
|
||||||
>
|
>
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
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:
|
The <netrw.vim> script is typically available as:
|
||||||
|
|
||||||
@ -494,31 +549,40 @@ which is loaded automatically at startup (assuming :set nocp).
|
|||||||
drchipNOSPAM at campbellfamily.biz - NOSPAM
|
drchipNOSPAM at campbellfamily.biz - NOSPAM
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
8. New Stuff *netrw-new* *netrw-newstuff*
|
9. History *netrw-history*
|
||||||
|
|
||||||
v43: * moved "Explanation" comments to <pi_netrw.txt> help file
|
v46: * now handles remote directory browsing
|
||||||
as "Network Reference" (|netrw-ref|)
|
* g:netrw_silent (if 1) will cause all transfers to be silent'd
|
||||||
* <netrw.vim> now uses Dfunc() Decho() and Dret() for debugging
|
v45: * made the [user@]hostname:path form a bit more restrictive
|
||||||
* removed superfluous NetRestorePosn() calls
|
to better handle errors in using protocols
|
||||||
v42: * now does BufReadPre and BufReadPost events on file:///*
|
(e.g. scp:usr@host:file was being recognized as an rcp request)
|
||||||
and file://localhost/*
|
v44: * changed from "rsync -a" to just "rsync"
|
||||||
v41: * installed file:///* and file://localhost/* handling
|
* somehow an editing error messed up the test to recognize
|
||||||
v40: * prevents redraw when a protocol error occurs so that the
|
use of the fetch method for NetRead.
|
||||||
user may see it
|
* more debugging statements included
|
||||||
v39: * sftp support
|
v43: * moved "Explanation" comments to <pi_netrw.txt> help file
|
||||||
v38: * Now uses NetRestorePosn() calls with Nread/Nwrite commands
|
as "Network Reference" (|netrw-ref|)
|
||||||
* Temporary files now removed via bwipe! instead of bwipe
|
* <netrw.vim> now uses Dfunc() Decho() and Dret() for debugging
|
||||||
(thanks to Dave Roberts)
|
* removed superfluous NetRestorePosn() calls
|
||||||
v37: * Claar's modifications which test if ftp is successful, otherwise
|
v42: * now does BufReadPre and BufReadPost events on file:///*
|
||||||
give an error message
|
and file://localhost/*
|
||||||
* After a read, the alternate file was pointing to the temp file.
|
v41: * installed file:///* and file://localhost/* handling
|
||||||
The temp file buffer is now wiped out.
|
v40: * prevents redraw when a protocol error occurs so that the
|
||||||
* removed silent from transfer methods so user can see what's
|
user may see it
|
||||||
happening
|
v39: * sftp support
|
||||||
|
v38: * Now uses NetRestorePosn() calls with Nread/Nwrite commands
|
||||||
|
* Temporary files now removed via bwipe! instead of bwipe
|
||||||
|
(thanks to Dave Roberts)
|
||||||
|
v37: * Claar's modifications which test if ftp is successful, otherwise
|
||||||
|
give an error message
|
||||||
|
* After a read, the alternate file was pointing to the temp file.
|
||||||
|
The temp file buffer is now wiped out.
|
||||||
|
* removed silent from transfer methods so user can see what's
|
||||||
|
happening
|
||||||
|
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
9. Credits *netrw-credits*
|
10. Credits *netrw-credits*
|
||||||
|
|
||||||
Vim editor by Bram Moolenaar (Thanks, Bram!)
|
Vim editor by Bram Moolenaar (Thanks, Bram!)
|
||||||
dav support by C Campbell
|
dav support by C Campbell
|
||||||
|
|||||||
@ -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
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@ -795,7 +795,7 @@ processing.
|
|||||||
|
|
||||||
Maintaining the correct directory is more complicated if you don't use
|
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
|
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
|
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
|
problem here is that it doesn't print informations on leaving the directory
|
||||||
and that it doesn't print the absolute path.
|
and that it doesn't print the absolute path.
|
||||||
|
|||||||
@ -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
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@ -61,7 +61,7 @@ Disadvantages:
|
|||||||
directories (although Vim tries to avoid that by comparing the path name).
|
directories (although Vim tries to avoid that by comparing the path name).
|
||||||
This will result in bogus ATTENTION warning messages.
|
This will result in bogus ATTENTION warning messages.
|
||||||
- When you use your home directory, and somebody else tries to edit the same
|
- 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.
|
message.
|
||||||
On the Amiga you can also use a recoverable ram disk, but there is no 100%
|
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:
|
guarantee that this works. Putting swap files in a normal ram disk (like RAM:
|
||||||
|
|||||||
@ -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
|
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.
|
show others you are a registered Vim user or sponsor.
|
||||||
|
|
||||||
Cash Small amounts can be send with ordinary mail. Put something
|
Cash Small amounts can be send with ordinary mail. Put something
|
||||||
around the money, so that it's not noticable from the outside.
|
around the money, so that it's not noticeable from the
|
||||||
Mention your e-mail address if you want to vote for features
|
outside. Mention your e-mail address if you want to vote for
|
||||||
and show others you are a registered Vim user or sponsor.
|
features and show others you are a registered Vim user or
|
||||||
|
sponsor.
|
||||||
|
|
||||||
This is Bram's address: Bram Moolenaar
|
This is Bram's address: Bram Moolenaar
|
||||||
Clematisstraat 30
|
Clematisstraat 30
|
||||||
|
|||||||
@ -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
|
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
|
- They don't restore everything. For example, defined functions, autocommands
|
||||||
and ":syntax on" are not included. Things like register contents and
|
and ":syntax on" are not included. Things like register contents and
|
||||||
command line history are in viminfo, not in Sessions or Views.
|
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
|
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
|
set it back to the default value. Local options will be set back to the
|
||||||
default value though.
|
default value though.
|
||||||
|
|||||||
@ -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
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@ -739,7 +739,7 @@ variable.
|
|||||||
CYNLIB *cynlib.vim* *cynlib-syntax*
|
CYNLIB *cynlib.vim* *cynlib-syntax*
|
||||||
|
|
||||||
Cynlib files are C++ files that use the Cynlib class library to enable
|
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
|
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
|
normal C++ file. Thus, to enable Cynlib highlighting for .cc files, add this
|
||||||
line to your .vimrc file: >
|
line to your .vimrc file: >
|
||||||
@ -1664,7 +1664,7 @@ file: >
|
|||||||
|
|
||||||
let b:preprocs_as_sections = 1
|
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.
|
paragraph macro (.XP) in the ms package.
|
||||||
|
|
||||||
Finally, there is a |groff.vim| syntax file that can be used for enabling
|
Finally, there is a |groff.vim| syntax file that can be used for enabling
|
||||||
|
|||||||
@ -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
|
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*
|
||||||
-------------------- Known bugs and current work -----------------------
|
-------------------- 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:
|
For version 7.0:
|
||||||
- Include many PATCHES:
|
- Include many PATCHES:
|
||||||
9 Win32 GuI: The print dialog uses a font which doesn't display multi-byte
|
9 Merge in ideas from tutor.txt (Gabriel Zachmann)
|
||||||
messages. Include patch from Vipin Aravind? Update from Yasuhiro
|
New version 2004 June 16.
|
||||||
Matsumoto.
|
|
||||||
8 ":winpos" doesn't work. Patch from Vipin Aravind.
|
8 ":winpos" doesn't work. Patch from Vipin Aravind.
|
||||||
8 Add GTK 2.3 file dialog support. Patch by Grahame Bowland, 2004 Mar 15,
|
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)
|
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
|
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
|
fcntl(). This patch has advisory file locking while reading/writing
|
||||||
the file: ~/vim/patches/kahn_file_locking .
|
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
|
8 Add buffer-local autocommands? Reduces overhead for autocommands that
|
||||||
trigger often (inserting a character, switching mode).
|
trigger often (inserting a character, switching mode).
|
||||||
:au Event <buffer> do-something
|
:au Event <buffer> do-something
|
||||||
@ -64,10 +55,79 @@ For version 7.0:
|
|||||||
VimResized - When the Vim window has been resized (SIGWINCH)
|
VimResized - When the Vim window has been resized (SIGWINCH)
|
||||||
patch from Yakov Lerner, 2003 July 24.
|
patch from Yakov Lerner, 2003 July 24.
|
||||||
He'll write documentation and send updated patch.
|
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)
|
- Include the kvim patch. http://freenux.org/vim/ (Mickael Marchand)
|
||||||
Do not add Qtopia yet, it doesn't work very well.
|
Do not add Qtopia yet, it doesn't work very well.
|
||||||
Mickael will update the patch before 21st.
|
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).
|
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
|
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.
|
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.
|
Martin Dalecki 2002 Jan 11.
|
||||||
8 Add a few more command names to the menus. Patch from Jiri Brezina
|
8 Add a few more command names to the menus. Patch from Jiri Brezina
|
||||||
(28 feb 2002).
|
(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
|
7 ATTENTION dialog choices are more logical when "Delete it' appears
|
||||||
before "Quit". Patch by Robert Webb, 2004 May 3.
|
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
|
- Include flipcase patch: ~/vim/patches/wall.flipcase2 ? Make it work
|
||||||
for multi-byte characters.
|
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.
|
- Win32: add options to print dialog. Patch from Vipin Aravind.
|
||||||
- Patch to add highlighting for whitespace. (Tom Schumm, 2003 Jul 5)
|
- Patch to add highlighting for whitespace. (Tom Schumm, 2003 Jul 5)
|
||||||
use the patch that keeps using HLF_8 if HLF_WS has not
|
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
|
- Add possibility to highlight specific columns (for Fortran). Or put a
|
||||||
line in between columns (e.g. for 'textwidth').
|
line in between columns (e.g. for 'textwidth').
|
||||||
Patch to add 'hlcolumn' from Vit Stradal, 2004 May 20.
|
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:
|
8 Add functions:
|
||||||
tr(expr, from, to) translate chars (Patch from Ron Aaron, Apr 8
|
tr(expr, from, to) translate chars (Patch from Ron Aaron, Apr 8
|
||||||
2004)
|
2004)
|
||||||
@ -136,9 +163,9 @@ For version 7.0:
|
|||||||
Presser)
|
Presser)
|
||||||
He will send a new patch.
|
He will send a new patch.
|
||||||
Is this really useful?
|
Is this really useful?
|
||||||
---
|
|
||||||
multibyteidx(string, idx) Byte index in multi-byte character.
|
multibyteidx(string, idx) Byte index in multi-byte character.
|
||||||
Patch by Ilya Sher, 2004 Feb 25
|
Patch by Ilya Sher, 2004 Feb 25
|
||||||
|
Update June 18 (third one).
|
||||||
menuprop({name}, {idx}, {what})
|
menuprop({name}, {idx}, {what})
|
||||||
Get menu property of menu {name} item {idx}.
|
Get menu property of menu {name} item {idx}.
|
||||||
menuprop("", 1, "name") returns "File".
|
menuprop("", 1, "name") returns "File".
|
||||||
@ -148,9 +175,15 @@ For version 7.0:
|
|||||||
mapname({idx}, mode) return the name of the idx'th mapping.
|
mapname({idx}, mode) return the name of the idx'th mapping.
|
||||||
Patch by Ilya Sher, 2004 Mar 4.
|
Patch by Ilya Sher, 2004 Mar 4.
|
||||||
match({pat}, {string} [,start] [,count]) get index of count'th match
|
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
|
find() find file in 'path' (patch from Johannes
|
||||||
Zellner 2001 Dec 20)
|
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)
|
realname() Get user name (first, last, full)
|
||||||
user_fullname() patch by Nikolai Weibull, Nov
|
user_fullname() patch by Nikolai Weibull, Nov
|
||||||
3 2002)
|
3 2002)
|
||||||
@ -175,10 +208,6 @@ For version 7.0:
|
|||||||
(Patch from Yegappan Lakshmanan)
|
(Patch from Yegappan Lakshmanan)
|
||||||
raisewin() raise gvim window (see HierAssist patch for
|
raisewin() raise gvim window (see HierAssist patch for
|
||||||
Tcl implementation ~/vim/HierAssist/ )
|
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
|
7 Add patch from Benoit Cerrina to integrate Vim and Perl functions
|
||||||
better. Now also works for Ruby (2001 Nov 10)
|
better. Now also works for Ruby (2001 Nov 10)
|
||||||
7 Add 'taglistfiles' option, show file name and type when listing matching
|
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
|
7 Motif: use the menu font consistently. Patch from Martin Dalecki 2002
|
||||||
Jan 11.
|
Jan 11.
|
||||||
- Motif: add 3D shading for the menu entries? Patch from Martin Dalecki.
|
- 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
|
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.
|
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
|
(Rich Wales) This is Vi compatible, but it looks like a bug. Rich has
|
||||||
a suggestion for a patch to fix this.
|
a suggestion for a patch to fix this.
|
||||||
e-mail to Rich bounced.
|
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
|
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
|
area. Only when fewer than two lines. Use "g/" and "gb". Patch from
|
||||||
Yegappan Lakshmanan.
|
Yegappan Lakshmanan.
|
||||||
7 When 'rightleft' is set, the search pattern should be displayed right
|
7 When 'rightleft' is set, the search pattern should be displayed right
|
||||||
to left as well? See patch of Dec 26. (Nadim Shaikli)
|
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).
|
8 Lock all used memory so that it doesn't get swapped to disk (uncrypted).
|
||||||
Patch by Jason Holt, 2003 May 23.
|
Patch by Jason Holt, 2003 May 23.
|
||||||
7 Support a stronger encryption. Jason Holt implemented AES (May 6 2003).
|
7 Support a stronger encryption. Jason Holt implemented AES (May 6 2003).
|
||||||
7 Add ! register, for shell commands. (patch from Grenie)
|
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
|
8 Make 'statusline' local, so that each window can have a different
|
||||||
value. But should it also be local to a buffer? (Yegappan Lakshmanan
|
value. But should it also be local to a buffer? (Yegappan Lakshmanan
|
||||||
has a patch, 2002 feb 15)
|
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
|
8 Include a connection to an external program through a pipe? See
|
||||||
patches from Felbinger for a mathematica interface.
|
patches from Felbinger for a mathematica interface.
|
||||||
Or use emacs server kind of thing?
|
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.
|
7 Add ":justify" command. Patch from Vit Stradal 2002 Nov 25.
|
||||||
- findmatch() should be adjusted for Lisp. See remark at
|
- findmatch() should be adjusted for Lisp. See remark at
|
||||||
get_lisp_indent(). Esp. \( and \) should be skipped. (Dorai Sitaram,
|
get_lisp_indent(). Esp. \( and \) should be skipped. (Dorai Sitaram,
|
||||||
incomplete patch Mar 18)
|
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
|
- Change ga_room into ga_maxlen, so that it doesn't need to be
|
||||||
incremented/decremented each time.
|
incremented/decremented each time.
|
||||||
- new DATA TYPES: lists, dictionaries and function references.
|
- new DATA TYPES: lists, dictionaries and function references.
|
||||||
@ -716,8 +717,9 @@ Amiga:
|
|||||||
|
|
||||||
|
|
||||||
Macintosh:
|
Macintosh:
|
||||||
9 Mac: The motion type is not stored on the clipboard. Using ":set
|
7 Patch to add 'transparency' option. Disadvantage: it's slow. (Eckehard
|
||||||
clipboard=unnamed" makes "yyp" work characterwise. (Michael DeMoney)
|
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.
|
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
|
Load the Perl library dynamically see Python sources file dynload_mac
|
||||||
(Jack)
|
(Jack)
|
||||||
@ -1745,7 +1747,7 @@ Scrolling:
|
|||||||
bound windows.
|
bound windows.
|
||||||
- Add 'search' option to 'scrollopt' to allow 'scrollbind' windows to
|
- Add 'search' option to 'scrollopt' to allow 'scrollbind' windows to
|
||||||
be bound by regexp searches
|
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
|
- 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
|
fixed number used now (for terminals that scroll slow with a large number
|
||||||
of lines but not with a single line).
|
of lines but not with a single line).
|
||||||
@ -2971,7 +2973,7 @@ Registers:
|
|||||||
Debug mode:
|
Debug mode:
|
||||||
7 Add something to enable debugging when a remote message is received.
|
7 Add something to enable debugging when a remote message is received.
|
||||||
8 Add breakpoints for setting an option
|
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
|
7 Add a watchpoint in the debug mode: An expression that breaks execution
|
||||||
when evaluating to non-zero.
|
when evaluating to non-zero.
|
||||||
7 Store the history from debug mode in viminfo.
|
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)?
|
- Support mapping for replace mode and "r" command (Vi doesn't do this)?
|
||||||
5 Add 'ignorefilecase' option: Ignore case when expanding file names.
|
5 Add 'ignorefilecase' option: Ignore case when expanding file names.
|
||||||
":e ma<Tab>" would also find "Makefile" on Unix.
|
":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
|
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.
|
where the sources are. Add $(srcdir) in the Makefile in a lot of places.
|
||||||
(Netherton)
|
(Netherton)
|
||||||
|
|||||||
@ -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
|
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
|
:w !{program} execute {program} and send text to its input
|
||||||
:[range]!{program} filter text through {program}
|
:[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
|
difference. Without it executes the program normally, with the range a number
|
||||||
of text lines is filtered through the program.
|
of text lines is filtered through the program.
|
||||||
|
|
||||||
|
|||||||
@ -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
|
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
|
s Use the field the cursor is in to sort on. First
|
||||||
display the size and date with i. Then Move the
|
display the size and date with i. Then Move the
|
||||||
cursor to the size of any file and press s. The files
|
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.
|
is on a date and the items will be sorted on date.
|
||||||
r reverse the sorting order (either size or date)
|
r reverse the sorting order (either size or date)
|
||||||
|
|
||||||
|
|||||||
@ -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
|
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|.
|
current file. See |help-translated|.
|
||||||
|
|
||||||
*:helpg* *:helpgrep*
|
*:helpg* *:helpgrep*
|
||||||
:helpg[rep] {pattern}
|
:helpg[rep] {pattern}[@xx]
|
||||||
Search all help text files and make a list of lines
|
Search all help text files and make a list of lines
|
||||||
in which {pattern} matches. Jumps to the first match.
|
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
|
You can navigate through the matches with the
|
||||||
|quickfix| commands, e.g., |:cnext| to jump to the
|
|quickfix| commands, e.g., |:cnext| to jump to the
|
||||||
next one. Or use |:cwindow| to get the list of
|
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
|
:helpgrep Uganda
|
||||||
< Example for case ignoring search: >
|
< Example for case ignoring search: >
|
||||||
:helpgrep uganda\c
|
:helpgrep uganda\c
|
||||||
|
< Example for searching in French help: >
|
||||||
|
:helpgrep backspace@fr
|
||||||
< Cannot be followed by another command, everything is
|
< Cannot be followed by another command, everything is
|
||||||
used as part of the pattern. But you can use
|
used as part of the pattern. But you can use
|
||||||
|:execute| when needed.
|
|:execute| when needed.
|
||||||
|
|||||||
@ -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
|
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 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.
|
"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
|
either begin in the current directory, or that of the current buffer. (Negri
|
||||||
and Kahn)
|
and Kahn)
|
||||||
Added the 'browsedir' option, with value "current", "last" or "buffer". Tells
|
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.
|
current dir. ":browse w" is unaffected.
|
||||||
The default menus have been changed to use the ":browse" command.
|
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'
|
In the output of ":clist" the current entry is highlighted, with the 'i'
|
||||||
highlighting (same as used for 'incsearch').
|
highlighting (same as used for 'incsearch').
|
||||||
|
|
||||||
For the ":clist" command, you can scroll backwards with "b" (one screenfull),
|
For the ":clist" command, you can scroll backwards with "b" (one screenful),
|
||||||
"u" (half a screenfull) and "k" (one line).
|
"u" (half a screenful) and "k" (one line).
|
||||||
|
|
||||||
Multi-byte support:
|
Multi-byte support:
|
||||||
- X-input method for multi-byte characters. And various fixes for multi-byte
|
- 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
|
Dos and Win32 console: Setting t_me didn't work to get another color. Made
|
||||||
this works backwards compatible.
|
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)
|
translation in vim_strup() to avoid language problems. (Komur)
|
||||||
|
|
||||||
Unix: Use usleep() or nanosleep() for mch_delay() when available. Hopefully
|
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').
|
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)
|
(Dave Bodenstab)
|
||||||
|
|
||||||
dosinst.c: Added checks for too long file name.
|
dosinst.c: Added checks for too long file name.
|
||||||
|
|||||||
@ -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
|
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
|
- Use XPM bitmaps for the icon when possible. Use the Solaris XpmP.h include
|
||||||
file when it's available.
|
file when it's available.
|
||||||
- Change the shadow of the toolbar items to get a visual feedback of it being
|
- 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.
|
- Use gadgets instead of windows for some items for speed.
|
||||||
|
|
||||||
Command line completion:
|
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
|
Files: src/getchar.c
|
||||||
|
|
||||||
Patch 6.1.031
|
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)
|
Solution: Use "rb" or "rt" when needed. (Pavol Juhas)
|
||||||
Files: src/xxd/xxd.c
|
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
|
Files: src/edit.c, src/feature.h, src/gui_mac.c, src/os_mac.c
|
||||||
|
|
||||||
Patch 6.1.077
|
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
|
Solution: When the "acl" library is used, check if the "attr" library is
|
||||||
present and use it.
|
present and use it.
|
||||||
Files: src/auto/configure, src/configure.in, src/link.sh
|
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)
|
Patch 6.1.121 (depends on 6.1.098)
|
||||||
Problem: When starting Select mode from Insert mode, then using the Paste
|
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)
|
(Mario Schweigler)
|
||||||
Solution: Set the cursor for Insert mode one character to the right.
|
Solution: Set the cursor for Insert mode one character to the right.
|
||||||
Files: runtime/menu.vim
|
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
|
Problem: Double clicking with the mouse to select a word does not work for
|
||||||
multi-byte characters.
|
multi-byte characters.
|
||||||
Solution: Use vim_iswordc() instead of vim_isIDc(). This means 'iskeyword'
|
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
|
multi-byte word characters doesn't work, the mouse class for
|
||||||
punctuation and word characters was mixed up.
|
punctuation and word characters was mixed up.
|
||||||
Files: src/normal.c
|
Files: src/normal.c
|
||||||
@ -10262,7 +10262,7 @@ Files: src/ex_cmds.c
|
|||||||
|
|
||||||
Patch 6.2.053
|
Patch 6.2.053
|
||||||
Problem: Prototype for bzero() doesn't match most systems.
|
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
|
Files: src/osdef1.h.in
|
||||||
|
|
||||||
Patch 6.2.054
|
Patch 6.2.054
|
||||||
@ -10534,7 +10534,7 @@ Files: src/buffer.c
|
|||||||
Patch 6.2.096
|
Patch 6.2.096
|
||||||
Problem: Win32: ":let @* = ''" put a newline on the clipboard. (Klaus
|
Problem: Win32: ":let @* = ''" put a newline on the clipboard. (Klaus
|
||||||
Bosau)
|
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
|
Files: src/ops.c
|
||||||
|
|
||||||
Patch 6.2.097
|
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
|
runtime/doc/netbeans.txt, runtime/doc/tags
|
||||||
|
|
||||||
Patch 6.2.216 (after 6.2.206)
|
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)
|
dialog. (Mattias Erkisson)
|
||||||
Solution: Make get_keystroke() handle multi-byte characters.
|
Solution: Make get_keystroke() handle multi-byte characters.
|
||||||
Files: src/misc1.c
|
Files: src/misc1.c
|
||||||
@ -11376,7 +11376,7 @@ Files: src/ex_cmds.h
|
|||||||
Patch 6.2.222
|
Patch 6.2.222
|
||||||
Problem: Using "--remote" several times on a row only opens some of the
|
Problem: Using "--remote" several times on a row only opens some of the
|
||||||
files. (Dany St-Amant)
|
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.
|
a client, only delete typed characters.
|
||||||
Files: src/main.c
|
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
|
causes a crash. Evaluating an expression causes Vim to wait for
|
||||||
"cont" to be typed, without a prompt. (Hari Krishna Dara)
|
"cont" to be typed, without a prompt. (Hari Krishna Dara)
|
||||||
Solution: Disable debugging when evaluating an expression for a client.
|
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.
|
it may have been filled in another way.
|
||||||
Files: src/ex_getln.c, src/getchar.c, src/if_xcmdsrv.c, src/main.c,
|
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,
|
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.
|
Problem: Win32 console: no extra key modifiers are supported.
|
||||||
Solution: Encode the modifiers into the input stream. Also fix that special
|
Solution: Encode the modifiers into the input stream. Also fix that special
|
||||||
keys are converted and stop working when 'tenc' is set. Also fix
|
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.
|
not setup properly until 'enc' or 'tenc' is set.
|
||||||
Files: src/getchar.c, src/option.c, src/os_win32.c
|
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
|
Problem: When reloading a hidden buffer changed outside of Vim and the
|
||||||
current buffer is read-only, the reloaded buffer becomes
|
current buffer is read-only, the reloaded buffer becomes
|
||||||
read-only. (Hari Krishna Dara)
|
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.
|
current buffer.
|
||||||
Files: src/fileio.c
|
Files: src/fileio.c
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
" Vim indent file
|
" Vim indent file
|
||||||
" Language: VisualBasic (ft=vb) / Basic (ft=basic) / SaxBasic (ft=vb)
|
" Language: VisualBasic (ft=vb) / Basic (ft=basic) / SaxBasic (ft=vb)
|
||||||
" Author: Johannes Zellner <johannes@zellner.org>
|
" 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")
|
if exists("b:did_indent")
|
||||||
finish
|
finish
|
||||||
@ -10,7 +10,7 @@ let b:did_indent = 1
|
|||||||
|
|
||||||
setlocal indentexpr=VbGetIndent(v:lnum)
|
setlocal indentexpr=VbGetIndent(v:lnum)
|
||||||
setlocal indentkeys&
|
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.
|
" Only define the function once.
|
||||||
if exists("*VbGetIndent")
|
if exists("*VbGetIndent")
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
" netrw.vim: (global plugin) Handles file transfer across a network
|
" 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>
|
" Maintainer: Charles E. Campbell, Jr. PhD <drchipNOSPAM at campbellfamily.biz>
|
||||||
" Version: 44
|
" Version: 46
|
||||||
" License: Vim License (see vim's :help license)
|
" License: Vim License (see vim's :help license)
|
||||||
"
|
"
|
||||||
" But be doers of the word, and not only hearers, deluding your own selves
|
" But be doers of the word, and not only hearers, deluding your own selves
|
||||||
@ -12,7 +12,7 @@
|
|||||||
if exists("loaded_netrw") || &cp
|
if exists("loaded_netrw") || &cp
|
||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
let loaded_netrw = "v44"
|
let loaded_netrw = "v46"
|
||||||
let s:save_cpo = &cpo
|
let s:save_cpo = &cpo
|
||||||
set cpo&vim
|
set cpo&vim
|
||||||
|
|
||||||
@ -68,6 +68,20 @@ if !exists("g:netrw_fetch_cmd")
|
|||||||
let g:netrw_fetch_cmd = ""
|
let g:netrw_fetch_cmd = ""
|
||||||
endif
|
endif
|
||||||
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")
|
if has("win32")
|
||||||
\ && exists("g:netrw_use_nt_rcp")
|
\ && exists("g:netrw_use_nt_rcp")
|
||||||
@ -97,7 +111,7 @@ if version >= 600
|
|||||||
endif
|
endif
|
||||||
au BufReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://* exe "doau BufReadPre ".expand("<afile>")|exe "Nread 0r ".expand("<afile>")|exe "doau BufReadPost ".expand("<afile>")
|
au BufReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://* exe "doau BufReadPre ".expand("<afile>")|exe "Nread 0r ".expand("<afile>")|exe "doau BufReadPost ".expand("<afile>")
|
||||||
au FileReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://* exe "doau BufReadPre ".expand("<afile>")|exe "Nread " .expand("<afile>")|exe "doau BufReadPost ".expand("<afile>")
|
au FileReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://* exe "doau BufReadPre ".expand("<afile>")|exe "Nread " .expand("<afile>")|exe "doau BufReadPost ".expand("<afile>")
|
||||||
au BufWriteCmd ftp://*,rcp://*,scp://*,dav://*,rsync://*,sftp://* exe "Nwrite " .expand("<afile>")|call <SID>NetRestorePosn()
|
au BufWriteCmd ftp://*,rcp://*,scp://*,dav://*,rsync://*,sftp://* exe "Nwrite " .expand("<afile>")|call <SID>NetRestorePosn()
|
||||||
augroup END
|
augroup END
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -151,9 +165,6 @@ fun! s:NetRead(...)
|
|||||||
" save options
|
" save options
|
||||||
call s:NetOptionSave()
|
call s:NetOptionSave()
|
||||||
|
|
||||||
" get name of a temporary file
|
|
||||||
let tmpfile= tempname()
|
|
||||||
|
|
||||||
" Special Exception: if a file is named "0r", then
|
" Special Exception: if a file is named "0r", then
|
||||||
" "0r" will be used to read the
|
" "0r" will be used to read the
|
||||||
" following files instead of "r"
|
" following files instead of "r"
|
||||||
@ -168,6 +179,10 @@ fun! s:NetRead(...)
|
|||||||
let ichoice = 1
|
let ichoice = 1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
" get name of a temporary file
|
||||||
|
let tmpfile= tempname()
|
||||||
|
|
||||||
|
" call Decho("ichoice=".ichoice." readcmd<".readcmd.">")
|
||||||
while ichoice <= a:0
|
while ichoice <= a:0
|
||||||
|
|
||||||
" attempt to repeat with previous host-file-etc
|
" attempt to repeat with previous host-file-etc
|
||||||
@ -178,7 +193,7 @@ fun! s:NetRead(...)
|
|||||||
|
|
||||||
else
|
else
|
||||||
exe "let choice= a:" . ichoice
|
exe "let choice= a:" . ichoice
|
||||||
" call Decho("NetRead1: choice<" . choice . ">")
|
" call Decho("no lastfile: choice<" . choice . ">")
|
||||||
|
|
||||||
" Reconstruct Choice if choice starts with '"'
|
" Reconstruct Choice if choice starts with '"'
|
||||||
if match(choice,"?") == 0
|
if match(choice,"?") == 0
|
||||||
@ -219,13 +234,13 @@ fun! s:NetRead(...)
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
" call Decho("NetRead2: choice<" . choice . ">")
|
" call Decho("choice<" . choice . ">")
|
||||||
let ichoice= ichoice + 1
|
let ichoice= ichoice + 1
|
||||||
|
|
||||||
" fix up windows urls
|
" fix up windows urls
|
||||||
if has("win32")
|
if has("win32")
|
||||||
let choice = substitute(choice,'\\','/','ge')
|
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')
|
exe 'lcd ' . fnamemodify(tmpfile,':h')
|
||||||
let tmpfile = fnamemodify(tmpfile,':t')
|
let tmpfile = fnamemodify(tmpfile,':t')
|
||||||
endif
|
endif
|
||||||
@ -233,12 +248,24 @@ fun! s:NetRead(...)
|
|||||||
" Determine method of read (ftp, rcp, etc)
|
" Determine method of read (ftp, rcp, etc)
|
||||||
call s:NetMethod(choice)
|
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
|
" Perform Read
|
||||||
" ============
|
" ============
|
||||||
|
|
||||||
".........................................
|
".........................................
|
||||||
" rcp: Method #1
|
" rcp: NetRead Method #1
|
||||||
if b:netrw_method == 1 " read with rcp
|
if b:netrw_method == 1 " read with rcp
|
||||||
" call Decho("read via rcp (method #1)")
|
" call Decho("read via rcp (method #1)")
|
||||||
" ER: noting done with g:netrw_uid yet?
|
" ER: noting done with g:netrw_uid yet?
|
||||||
@ -260,12 +287,12 @@ fun! s:NetRead(...)
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
" call Decho("executing: !".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".uid_machine.":".escape(b:netrw_fname,' ?&')." ".tmpfile)
|
" call Decho("executing: !".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".uid_machine.":".escape(b:netrw_fname,' ?&')." ".tmpfile)
|
||||||
exe "!".g:netrw_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 result = s:NetGetFile(readcmd, tmpfile, b:netrw_method)
|
||||||
let b:netrw_lastfile = choice
|
let b:netrw_lastfile = choice
|
||||||
|
|
||||||
".........................................
|
".........................................
|
||||||
" ftp + <.netrc>: Method #2
|
" ftp + <.netrc>: NetRead Method #2
|
||||||
elseif b:netrw_method == 2 " read with ftp + <.netrc>
|
elseif b:netrw_method == 2 " read with ftp + <.netrc>
|
||||||
" call Decho("read via ftp+.netrc (method #2)")
|
" call Decho("read via ftp+.netrc (method #2)")
|
||||||
let netrw_fname= b:netrw_fname
|
let netrw_fname= b:netrw_fname
|
||||||
@ -275,10 +302,10 @@ fun! s:NetRead(...)
|
|||||||
exe "put ='get ".netrw_fname." ".tmpfile."'"
|
exe "put ='get ".netrw_fname." ".tmpfile."'"
|
||||||
if exists("g:netrw_port") && g:netrw_port != ""
|
if exists("g:netrw_port") && g:netrw_port != ""
|
||||||
" call Decho("executing: %!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port)
|
" call Decho("executing: %!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port)
|
||||||
exe "%!".g:netrw_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
|
else
|
||||||
" call Decho("executing: %!".g:netrw_ftp_cmd." -i ".g:netrw_machine)
|
" call Decho("executing: %!".g:netrw_ftp_cmd." -i ".g:netrw_machine)
|
||||||
exe "%!".g:netrw_ftp_cmd." -i ".g:netrw_machine
|
exe g:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".g:netrw_machine
|
||||||
endif
|
endif
|
||||||
" If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar)
|
" If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar)
|
||||||
if getline(1) !~ "^$"
|
if getline(1) !~ "^$"
|
||||||
@ -289,7 +316,7 @@ fun! s:NetRead(...)
|
|||||||
let b:netrw_lastfile = choice
|
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
|
elseif b:netrw_method == 3 " read with ftp + machine, id, passwd, and fname
|
||||||
" Construct execution string (four lines) which will be passed through filter
|
" Construct execution string (four lines) which will be passed through filter
|
||||||
" call Decho("read via ftp+mipf (method #3)")
|
" call Decho("read via ftp+mipf (method #3)")
|
||||||
@ -321,7 +348,7 @@ fun! s:NetRead(...)
|
|||||||
" call Decho('performing ftp -i -n')
|
" call Decho('performing ftp -i -n')
|
||||||
norm 1Gdd
|
norm 1Gdd
|
||||||
" call Decho("executing: %!".g:netrw_ftp_cmd." -i -n")
|
" 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 the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar)
|
||||||
if getline(1) !~ "^$"
|
if getline(1) !~ "^$"
|
||||||
echoerr getline(1)
|
echoerr getline(1)
|
||||||
@ -331,7 +358,7 @@ fun! s:NetRead(...)
|
|||||||
let b:netrw_lastfile = choice
|
let b:netrw_lastfile = choice
|
||||||
|
|
||||||
".........................................
|
".........................................
|
||||||
" scp: Method #4
|
" scp: NetRead Method #4
|
||||||
elseif b:netrw_method == 4 " read with scp
|
elseif b:netrw_method == 4 " read with scp
|
||||||
" call Decho("read via scp (method #4)")
|
" call Decho("read via scp (method #4)")
|
||||||
if exists("g:netrw_port") && g:netrw_port != ""
|
if exists("g:netrw_port") && g:netrw_port != ""
|
||||||
@ -342,10 +369,10 @@ fun! s:NetRead(...)
|
|||||||
if g:netrw_cygwin == 1
|
if g:netrw_cygwin == 1
|
||||||
let cygtmpfile=substitute(tmpfile,'^\(\a\):','/cygdrive/\1/','e')
|
let cygtmpfile=substitute(tmpfile,'^\(\a\):','/cygdrive/\1/','e')
|
||||||
" call Decho("executing: !".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".cygtmpfile)
|
" call Decho("executing: !".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".cygtmpfile)
|
||||||
exe "!".g:netrw_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
|
else
|
||||||
" call Decho("executing: !".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".tmpfile)
|
" call Decho("executing: !".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".tmpfile)
|
||||||
exe "!".g:netrw_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
|
endif
|
||||||
let result = s:NetGetFile(readcmd, tmpfile, b:netrw_method)
|
let result = s:NetGetFile(readcmd, tmpfile, b:netrw_method)
|
||||||
let b:netrw_lastfile = choice
|
let b:netrw_lastfile = choice
|
||||||
@ -361,7 +388,7 @@ fun! s:NetRead(...)
|
|||||||
if match(b:netrw_fname,"#") == -1
|
if match(b:netrw_fname,"#") == -1
|
||||||
" simple wget
|
" simple wget
|
||||||
" call Decho("executing: !".g:netrw_http_cmd." ".tmpfile." http://".g:netrw_machine.escape(b:netrw_fname,' ?&'))
|
" call Decho("executing: !".g:netrw_http_cmd." ".tmpfile." http://".g:netrw_machine.escape(b:netrw_fname,' ?&'))
|
||||||
exe "!".g:netrw_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)
|
let result = s:NetGetFile(readcmd, tmpfile, b:netrw_method)
|
||||||
|
|
||||||
else
|
else
|
||||||
@ -371,7 +398,7 @@ fun! s:NetRead(...)
|
|||||||
" call Decho("netrw_html<".netrw_html.">")
|
" call Decho("netrw_html<".netrw_html.">")
|
||||||
" call Decho("netrw_tag <".netrw_tag.">")
|
" call Decho("netrw_tag <".netrw_tag.">")
|
||||||
" call Decho("executing: !".g:netrw_http_cmd." ".tmpfile." http://".g:netrw_machine.netrw_html)
|
" 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)
|
let result = s:NetGetFile(readcmd, tmpfile, b:netrw_method)
|
||||||
" call Decho('<\s*a\s*name=\s*"'.netrw_tag.'"/')
|
" call Decho('<\s*a\s*name=\s*"'.netrw_tag.'"/')
|
||||||
exe 'norm! 1G/<\s*a\s*name=\s*"'.netrw_tag.'"/'."\<CR>"
|
exe 'norm! 1G/<\s*a\s*name=\s*"'.netrw_tag.'"/'."\<CR>"
|
||||||
@ -379,7 +406,7 @@ fun! s:NetRead(...)
|
|||||||
let b:netrw_lastfile = choice
|
let b:netrw_lastfile = choice
|
||||||
|
|
||||||
".........................................
|
".........................................
|
||||||
" cadaver: Method #6
|
" cadaver: NetRead Method #6
|
||||||
elseif b:netrw_method == 6 " read with cadaver
|
elseif b:netrw_method == 6 " read with cadaver
|
||||||
" call Decho("read via cadaver (method #6)")
|
" call Decho("read via cadaver (method #6)")
|
||||||
|
|
||||||
@ -404,28 +431,28 @@ fun! s:NetRead(...)
|
|||||||
" perform cadaver operation:
|
" perform cadaver operation:
|
||||||
norm 1Gdd
|
norm 1Gdd
|
||||||
" call Decho("executing: %!".g:netrw_dav_cmd)
|
" call Decho("executing: %!".g:netrw_dav_cmd)
|
||||||
exe "%!".g:netrw_dav_cmd
|
exe g:netrw_silentxfer."%!".g:netrw_dav_cmd
|
||||||
bd!
|
bd!
|
||||||
let result = s:NetGetFile(readcmd, tmpfile, b:netrw_method)
|
let result = s:NetGetFile(readcmd, tmpfile, b:netrw_method)
|
||||||
let b:netrw_lastfile = choice
|
let b:netrw_lastfile = choice
|
||||||
|
|
||||||
".........................................
|
".........................................
|
||||||
" rsync: Method #7
|
" rsync: NetRead Method #7
|
||||||
elseif b:netrw_method == 7 " read with rsync
|
elseif b:netrw_method == 7 " read with rsync
|
||||||
" call Decho("read via rsync (method #7)")
|
" call Decho("read via rsync (method #7)")
|
||||||
if g:netrw_cygwin == 1
|
if g:netrw_cygwin == 1
|
||||||
let cygtmpfile=substitute(tmpfile,'^\(\a\):','/cygdrive/\1/','e')
|
let cygtmpfile=substitute(tmpfile,'^\(\a\):','/cygdrive/\1/','e')
|
||||||
" call Decho("executing: !".g:netrw_rsync_cmd." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".cygtmpfile)
|
" call Decho("executing: !".g:netrw_rsync_cmd." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".cygtmpfile)
|
||||||
exe "!".g:netrw_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
|
else
|
||||||
" call Decho("executing: !".g:netrw_rsync_cmd." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".tmpfile)
|
" call Decho("executing: !".g:netrw_rsync_cmd." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".tmpfile)
|
||||||
exe "!".g:netrw_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
|
endif
|
||||||
let result = s:NetGetFile(readcmd,tmpfile, b:netrw_method)
|
let result = s:NetGetFile(readcmd,tmpfile, b:netrw_method)
|
||||||
let b:netrw_lastfile = choice
|
let b:netrw_lastfile = choice
|
||||||
|
|
||||||
".........................................
|
".........................................
|
||||||
" fetch: Method #8
|
" fetch: NetRead Method #8
|
||||||
" fetch://[user@]host[:http]/path
|
" fetch://[user@]host[:http]/path
|
||||||
elseif b:netrw_method == 8 " read with fetch
|
elseif b:netrw_method == 8 " read with fetch
|
||||||
if g:netrw_fetch_cmd == ""
|
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 != ""
|
if exists("g:netrw_uid") && g:netrw_uid != "" && exists("g:netrw_passwd") && g:netrw_passwd != ""
|
||||||
" call Decho("executing: !".g:netrw_fetch_cmd." ".tmpfile." ".netrw_option."://".g:netrw_uid.':'.g:netrw_passwd.'@'.g:netrw_machine."/".escape(b:netrw_fname,' ?&'))
|
" call Decho("executing: !".g:netrw_fetch_cmd." ".tmpfile." ".netrw_option."://".g:netrw_uid.':'.g:netrw_passwd.'@'.g:netrw_machine."/".escape(b:netrw_fname,' ?&'))
|
||||||
exe "!".g:netrw_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
|
else
|
||||||
" call Decho("executing: !".g:netrw_fetch_cmd." ".tmpfile." ".netrw_option."://".g:netrw_machine."/".escape(b:netrw_fname,' ?&'))
|
" call Decho("executing: !".g:netrw_fetch_cmd." ".tmpfile." ".netrw_option."://".g:netrw_machine."/".escape(b:netrw_fname,' ?&'))
|
||||||
exe "!".g:netrw_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
|
endif
|
||||||
|
|
||||||
let result = s:NetGetFile(readcmd,tmpfile, b:netrw_method)
|
let result = s:NetGetFile(readcmd,tmpfile, b:netrw_method)
|
||||||
let b:netrw_lastfile = choice
|
let b:netrw_lastfile = choice
|
||||||
|
|
||||||
".........................................
|
".........................................
|
||||||
" sftp: Method #9
|
" sftp: NetRead Method #9
|
||||||
elseif b:netrw_method == 9 " read with sftp
|
elseif b:netrw_method == 9 " read with sftp
|
||||||
" call Decho("read via sftp (method #4)")
|
" call Decho("read via sftp (method #4)")
|
||||||
if g:netrw_cygwin == 1
|
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
|
exe "!".g:netrw_sftp_cmd." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".cygtmpfile
|
||||||
else
|
else
|
||||||
" call Decho("executing: !".g:netrw_sftp_cmd." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".tmpfile)
|
" call Decho("executing: !".g:netrw_sftp_cmd." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".tmpfile)
|
||||||
exe "!".g:netrw_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
|
endif
|
||||||
let result = s:NetGetFile(readcmd, tmpfile, b:netrw_method)
|
let result = s:NetGetFile(readcmd, tmpfile, b:netrw_method)
|
||||||
let b:netrw_lastfile = choice
|
let b:netrw_lastfile = choice
|
||||||
@ -488,7 +515,7 @@ endfun
|
|||||||
" ------------------------------------------------------------------------
|
" ------------------------------------------------------------------------
|
||||||
" NetGetFile: Function to read file "fname" with command "readcmd". {{{1
|
" NetGetFile: Function to read file "fname" with command "readcmd". {{{1
|
||||||
fun! s:NetGetFile(readcmd, fname, method)
|
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")
|
if exists("*NetReadFixup")
|
||||||
" for the use of NetReadFixup (not otherwise used internally)
|
" for the use of NetReadFixup (not otherwise used internally)
|
||||||
@ -499,14 +526,14 @@ fun! s:NetGetFile(readcmd, fname, method)
|
|||||||
if &term == "win32"
|
if &term == "win32"
|
||||||
if &shell == "bash"
|
if &shell == "bash"
|
||||||
let fname=a:fname
|
let fname=a:fname
|
||||||
" call Decho("(win32 && bash) fname<".fname.">")
|
"" call Decho("(win32 && bash) fname<".fname.">")
|
||||||
else
|
else
|
||||||
let fname=substitute(a:fname,'/','\\\\','ge')
|
let fname=substitute(a:fname,'/','\\\\','ge')
|
||||||
" call Decho("(win32 && !bash) fname<".fname.">")
|
"" call Decho("(win32 && !bash) fname<".fname.">")
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
let fname= a:fname
|
let fname= a:fname
|
||||||
" call Decho("(copied) fname<".fname.">")
|
"" call Decho("(copied) fname<".fname.">")
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" get the file, but disable undo when reading a new buffer
|
" get the file, but disable undo when reading a new buffer
|
||||||
@ -576,21 +603,21 @@ fun! s:NetGetFile(readcmd, fname, method)
|
|||||||
else
|
else
|
||||||
let line2= line("$") - line2
|
let line2= line("$") - line2
|
||||||
endif
|
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)
|
call NetReadFixup(a:method, line1, line2)
|
||||||
endif
|
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
|
" insure that we have the right filetype and that its being displayed
|
||||||
filetype detect
|
filetype detect
|
||||||
redraw!
|
redraw!
|
||||||
" call Dret("NetGetFile")
|
"" call Dret("NetGetFile")
|
||||||
endfun
|
endfun
|
||||||
|
|
||||||
" ------------------------------------------------------------------------
|
" ------------------------------------------------------------------------
|
||||||
" NetWrite: responsible for writing a file over the net {{{1
|
" NetWrite: responsible for writing a file over the net {{{1
|
||||||
fun! s:NetWrite(...) range
|
fun! s:NetWrite(...) range
|
||||||
" call Dfunc("NetWrite(a:0=".a:0.")")
|
"" call Dfunc("NetWrite(a:0=".a:0.")")
|
||||||
|
|
||||||
" option handling
|
" option handling
|
||||||
let mod= 0
|
let mod= 0
|
||||||
@ -612,7 +639,7 @@ fun! s:NetWrite(...) range
|
|||||||
|
|
||||||
" attempt to repeat with previous host-file-etc
|
" attempt to repeat with previous host-file-etc
|
||||||
if exists("b:netrw_lastfile") && a:0 == 0
|
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 choice = b:netrw_lastfile
|
||||||
let ichoice= ichoice + 1
|
let ichoice= ichoice + 1
|
||||||
else
|
else
|
||||||
@ -647,7 +674,7 @@ fun! s:NetWrite(...) range
|
|||||||
let ichoice = ichoice + 1
|
let ichoice = ichoice + 1
|
||||||
if choice > a:0
|
if choice > a:0
|
||||||
echoerr "Unbalanced string in filename '". wholechoice ."'"
|
echoerr "Unbalanced string in filename '". wholechoice ."'"
|
||||||
" call Dret("NetWrite")
|
"" call Dret("NetWrite")
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
let choice= a:{ichoice}
|
let choice= a:{ichoice}
|
||||||
@ -656,7 +683,7 @@ fun! s:NetWrite(...) range
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
" call Decho("choice<" . choice . ">")
|
"" call Decho("choice<" . choice . ">")
|
||||||
let ichoice= ichoice + 1
|
let ichoice= ichoice + 1
|
||||||
|
|
||||||
" fix up windows urls
|
" 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
|
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 s:netrw_has_nt_rcp == 1
|
||||||
if exists("g:netrw_uid") && ( g:netrw_uid != "" )
|
if exists("g:netrw_uid") && ( g:netrw_uid != "" )
|
||||||
let uid_machine = g:netrw_machine .'.'. 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
|
let uid_machine = g:netrw_machine
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
" call Decho("executing: !".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".tmpfile." ".uid_machine.":".escape(b:netrw_fname,' ?&'))
|
"" call Decho("executing: !".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".tmpfile." ".uid_machine.":".escape(b:netrw_fname,' ?&'))
|
||||||
exe "!".g:netrw_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
|
let b:netrw_lastfile = choice
|
||||||
|
|
||||||
".........................................
|
".........................................
|
||||||
" ftp + <.netrc>: Method #2
|
" ftp + <.netrc>: NetWrite Method #2
|
||||||
elseif b:netrw_method == 2 " write with ftp + <.netrc>
|
elseif b:netrw_method == 2 " write with ftp + <.netrc>
|
||||||
let netrw_fname = b:netrw_fname
|
let netrw_fname = b:netrw_fname
|
||||||
new
|
new
|
||||||
set ff=unix
|
set ff=unix
|
||||||
exe "put ='".g:netrw_ftpmode."'"
|
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."'"
|
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 != ""
|
if exists("g:netrw_port") && g:netrw_port != ""
|
||||||
" call Decho("executing: %!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port)
|
"" call Decho("executing: %!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port)
|
||||||
exe "%!".g:netrw_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
|
else
|
||||||
" call Decho("executing: %!".g:netrw_ftp_cmd." -i ".g:netrw_machine)
|
"" call Decho("executing: %!".g:netrw_ftp_cmd." -i ".g:netrw_machine)
|
||||||
exe "%!".g:netrw_ftp_cmd." -i ".g:netrw_machine
|
exe g:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".g:netrw_machine
|
||||||
endif
|
endif
|
||||||
" If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar)
|
" If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar)
|
||||||
if getline(1) !~ "^$"
|
if getline(1) !~ "^$"
|
||||||
@ -721,7 +748,7 @@ fun! s:NetWrite(...) range
|
|||||||
let b:netrw_lastfile = choice
|
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
|
elseif b:netrw_method == 3 " write with ftp + machine, id, passwd, and fname
|
||||||
let netrw_fname= b:netrw_fname
|
let netrw_fname= b:netrw_fname
|
||||||
new
|
new
|
||||||
@ -745,10 +772,10 @@ fun! s:NetWrite(...) range
|
|||||||
" -i : turns off interactive prompting from ftp
|
" -i : turns off interactive prompting from ftp
|
||||||
" -n unix : DON'T use <.netrc>, even though it exists
|
" -n unix : DON'T use <.netrc>, even though it exists
|
||||||
" -n win32: quit being obnoxious about password
|
" -n win32: quit being obnoxious about password
|
||||||
" call Decho('performing ftp -i -n')
|
"" call Decho('performing ftp -i -n')
|
||||||
norm 1Gdd
|
norm 1Gdd
|
||||||
" call Decho("executing: %!".g:netrw_ftp_cmd." -i -n")
|
"" 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 the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar)
|
||||||
if getline(1) !~ "^$"
|
if getline(1) !~ "^$"
|
||||||
echoerr getline(1)
|
echoerr getline(1)
|
||||||
@ -757,7 +784,7 @@ fun! s:NetWrite(...) range
|
|||||||
bd!
|
bd!
|
||||||
|
|
||||||
".........................................
|
".........................................
|
||||||
" scp: Method #4
|
" scp: NetWrite Method #4
|
||||||
elseif b:netrw_method == 4 " write with scp
|
elseif b:netrw_method == 4 " write with scp
|
||||||
if exists("g:netrw_port") && g:netrw_port != ""
|
if exists("g:netrw_port") && g:netrw_port != ""
|
||||||
let useport= " -P ".g:netrw_port
|
let useport= " -P ".g:netrw_port
|
||||||
@ -766,23 +793,23 @@ fun! s:NetWrite(...) range
|
|||||||
endif
|
endif
|
||||||
if g:netrw_cygwin == 1
|
if g:netrw_cygwin == 1
|
||||||
let cygtmpfile=substitute(tmpfile,'^\(\a\):','/cygdrive/\1/','e')
|
let cygtmpfile=substitute(tmpfile,'^\(\a\):','/cygdrive/\1/','e')
|
||||||
" call Decho("executing: !".g:netrw_scp_cmd.useport." ".cygtmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&'))
|
"" call Decho("executing: !".g:netrw_scp_cmd.useport." ".cygtmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&'))
|
||||||
exe "!".g:netrw_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
|
else
|
||||||
" call Decho("executing: !".g:netrw_scp_cmd.useport." ".tmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&'))
|
"" call Decho("executing: !".g:netrw_scp_cmd.useport." ".tmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&'))
|
||||||
exe "!".g:netrw_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
|
endif
|
||||||
let b:netrw_lastfile = choice
|
let b:netrw_lastfile = choice
|
||||||
|
|
||||||
".........................................
|
".........................................
|
||||||
" http: Method #5
|
" http: NetWrite Method #5
|
||||||
elseif b:netrw_method == 5
|
elseif b:netrw_method == 5
|
||||||
echoerr "***warning*** currently <netrw.vim> does not support writing using http:"
|
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
|
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
|
" Construct execution string (four lines) which will be passed through filter
|
||||||
let netrw_fname= b:netrw_fname
|
let netrw_fname= b:netrw_fname
|
||||||
@ -804,26 +831,26 @@ fun! s:NetWrite(...) range
|
|||||||
|
|
||||||
" perform cadaver operation:
|
" perform cadaver operation:
|
||||||
norm 1Gdd
|
norm 1Gdd
|
||||||
" call Decho("executing: %!".g:netrw_dav_cmd)
|
"" call Decho("executing: %!".g:netrw_dav_cmd)
|
||||||
exe "%!".g:netrw_dav_cmd
|
exe g:netrw_silentxfer."%!".g:netrw_dav_cmd
|
||||||
bd!
|
bd!
|
||||||
let b:netrw_lastfile = choice
|
let b:netrw_lastfile = choice
|
||||||
|
|
||||||
".........................................
|
".........................................
|
||||||
" rsync: Method #7
|
" rsync: NetWrite Method #7
|
||||||
elseif b:netrw_method == 7 " write with rsync
|
elseif b:netrw_method == 7 " write with rsync
|
||||||
if g:netrw_cygwin == 1
|
if g:netrw_cygwin == 1
|
||||||
let cygtmpfile=substitute(tmpfile,'^\(\a\):','/cygdrive/\1/','e')
|
let cygtmpfile=substitute(tmpfile,'^\(\a\):','/cygdrive/\1/','e')
|
||||||
" call Decho("executing: !".g:netrw_rsync_cmd." ".cygtmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&'))
|
"" call Decho("executing: !".g:netrw_rsync_cmd." ".cygtmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&'))
|
||||||
exe "!".g:netrw_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
|
else
|
||||||
" call Decho("executing: !".g:netrw_rsync_cmd." ".tmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&'))
|
"" call Decho("executing: !".g:netrw_rsync_cmd." ".tmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&'))
|
||||||
exe "!".g:netrw_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
|
endif
|
||||||
let b:netrw_lastfile = choice
|
let b:netrw_lastfile = choice
|
||||||
|
|
||||||
".........................................
|
".........................................
|
||||||
" scp: Method #9
|
" scp: NetWrite Method #9
|
||||||
elseif b:netrw_method == 9 " write with sftp
|
elseif b:netrw_method == 9 " write with sftp
|
||||||
let netrw_fname= b:netrw_fname
|
let netrw_fname= b:netrw_fname
|
||||||
if exists("g:netrw_uid") && ( g:netrw_uid != "" )
|
if exists("g:netrw_uid") && ( g:netrw_uid != "" )
|
||||||
@ -835,8 +862,8 @@ fun! s:NetWrite(...) range
|
|||||||
set ff=unix
|
set ff=unix
|
||||||
put ='put '.tmpfile.' '.netrw_fname
|
put ='put '.tmpfile.' '.netrw_fname
|
||||||
norm 1Gdd
|
norm 1Gdd
|
||||||
" call Decho("executing: %!".g:netrw_sftp_cmd.' '.uid_machine)
|
"" call Decho("executing: %!".g:netrw_sftp_cmd.' '.uid_machine)
|
||||||
exe "%!".g:netrw_sftp_cmd.' '.uid_machine
|
exe g:netrw_silentxfer."%!".g:netrw_sftp_cmd.' '.uid_machine
|
||||||
bd!
|
bd!
|
||||||
let b:netrw_lastfile= choice
|
let b:netrw_lastfile= choice
|
||||||
|
|
||||||
@ -847,7 +874,7 @@ fun! s:NetWrite(...) range
|
|||||||
endwhile
|
endwhile
|
||||||
|
|
||||||
" cleanup
|
" cleanup
|
||||||
" call Decho("cleanup")
|
"" call Decho("cleanup")
|
||||||
let result=delete(tmpfile)
|
let result=delete(tmpfile)
|
||||||
call s:NetOptionRestore()
|
call s:NetOptionRestore()
|
||||||
|
|
||||||
@ -855,10 +882,145 @@ fun! s:NetWrite(...) range
|
|||||||
let &mod= mod " usually equivalent to set nomod
|
let &mod= mod " usually equivalent to set nomod
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" call Dret("NetWrite")
|
"" call Dret("NetWrite")
|
||||||
endfun
|
endfun
|
||||||
" end of NetWrite
|
" 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
|
" NetMethod: determine method of transfer {{{1
|
||||||
" method == 1: rcp
|
" method == 1: rcp
|
||||||
@ -871,7 +1033,7 @@ endfun
|
|||||||
" 8: fetch
|
" 8: fetch
|
||||||
" 9: sftp
|
" 9: sftp
|
||||||
fun! s:NetMethod(choice) " globals: method machine id passwd fname
|
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
|
" initialization
|
||||||
let b:netrw_method = 0
|
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
|
" rsyncurm : rsync://host[:port]/path Use rsync
|
||||||
" fetchurm : fetch://[user@]host[:http]/filename Use fetch (defaults to ftp, override for http)
|
" fetchurm : fetch://[user@]host[:http]/filename Use fetch (defaults to ftp, override for http)
|
||||||
" sftpurm : sftp://[user@]host/filename Use scp
|
" sftpurm : sftp://[user@]host/filename Use scp
|
||||||
let mipf = '\(\S\+\)\s\+\(\S\+\)\s\+\(\S\+\)\s\+\(\S\+\)'
|
let mipf = '^\(\S\+\)\s\+\(\S\+\)\s\+\(\S\+\)\s\+\(\S\+\)$'
|
||||||
let mf = '\(\S\+\)\s\+\(\S\+\)'
|
let mf = '^\(\S\+\)\s\+\(\S\+\)$'
|
||||||
let ftpurm = 'ftp://\(\([^/@]\{-}\)@\)\=\([^/#:]\{-}\)\([#:]\d\+\)\=/\(.*\)$'
|
let ftpurm = '^ftp://\(\([^/@]\{-}\)@\)\=\([^/#:]\{-}\)\([#:]\d\+\)\=/\(.*\)$'
|
||||||
let rcpurm = 'rcp://\(\([^/@]\{-}\)@\)\=\([^/]\{-}\)/\(.*\)$'
|
let rcpurm = '^rcp://\(\([^/@]\{-}\)@\)\=\([^/]\{-}\)/\(.*\)$'
|
||||||
let rcphf = '\(\([^@]\{-}\)@\)\=\(\I\i*\):\(\S\+\)'
|
let rcphf = '^\(\(\h\w*\)@\)\=\(\h\w*\):\([^@]\+\)$'
|
||||||
let scpurm = 'scp://\([^/]\{-}\)\([#:]\d\+\)\=/\(.*\)$'
|
let scpurm = '^scp://\([^/]\{-}\)\([#:]\d\+\)\=/\(.*\)$'
|
||||||
let httpurm = 'http://\([^/]\{-}\)\(/.*\)\=$'
|
let httpurm = '^http://\([^/]\{-}\)\(/.*\)\=$'
|
||||||
let davurm = 'dav://\([^/]\{-}\)/\(.*\)\=$'
|
let davurm = '^dav://\([^/]\{-}\)/\(.*\)\=$'
|
||||||
let rsyncurm = 'rsync://\([^/]\{-}\)/\(.*\)\=$'
|
let rsyncurm = '^rsync://\([^/]\{-}\)/\(.*\)\=$'
|
||||||
let fetchurm = 'fetch://\(\([^/@]\{-}\)@\)\=\([^/#:]\{-}\)\(:http\)\=/\(.*\)$'
|
let fetchurm = '^fetch://\(\([^/@]\{-}\)@\)\=\([^/#:]\{-}\)\(:http\)\=/\(.*\)$'
|
||||||
let sftpurm = 'sftp://\([^/]\{-}\)/\(.*\)\=$'
|
let sftpurm = '^sftp://\([^/]\{-}\)/\(.*\)\=$'
|
||||||
|
|
||||||
" call Decho("determine method:")
|
"" call Decho("determine method:")
|
||||||
" Determine Method
|
" Determine Method
|
||||||
" rcp://user@hostname/...path-to-file
|
" rcp://user@hostname/...path-to-file
|
||||||
if match(a:choice,rcpurm) == 0
|
if match(a:choice,rcpurm) == 0
|
||||||
" call Decho("rcp://...")
|
"" call Decho("rcp://...")
|
||||||
let b:netrw_method = 1
|
let b:netrw_method = 1
|
||||||
let userid = substitute(a:choice,rcpurm,'\2',"")
|
let userid = substitute(a:choice,rcpurm,'\2',"")
|
||||||
let g:netrw_machine= substitute(a:choice,rcpurm,'\3',"")
|
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
|
" scp://user@hostname/...path-to-file
|
||||||
elseif match(a:choice,scpurm) == 0
|
elseif match(a:choice,scpurm) == 0
|
||||||
" call Decho("scp://...")
|
"" call Decho("scp://...")
|
||||||
let b:netrw_method = 4
|
let b:netrw_method = 4
|
||||||
let g:netrw_machine= substitute(a:choice,scpurm,'\1',"")
|
let g:netrw_machine= substitute(a:choice,scpurm,'\1',"")
|
||||||
let b:netrw_port = substitute(a:choice,scpurm,'\2',"")
|
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
|
" http://user@hostname/...path-to-file
|
||||||
elseif match(a:choice,httpurm) == 0
|
elseif match(a:choice,httpurm) == 0
|
||||||
" call Decho("http://...")
|
"" call Decho("http://...")
|
||||||
let b:netrw_method = 5
|
let b:netrw_method = 5
|
||||||
let g:netrw_machine= substitute(a:choice,httpurm,'\1',"")
|
let g:netrw_machine= substitute(a:choice,httpurm,'\1',"")
|
||||||
let b:netrw_fname = substitute(a:choice,httpurm,'\2',"")
|
let b:netrw_fname = substitute(a:choice,httpurm,'\2',"")
|
||||||
|
|
||||||
" dav://hostname[:port]/..path-to-file..
|
" dav://hostname[:port]/..path-to-file..
|
||||||
elseif match(a:choice,davurm) == 0
|
elseif match(a:choice,davurm) == 0
|
||||||
" call Decho("dav://...")
|
"" call Decho("dav://...")
|
||||||
let b:netrw_method= 6
|
let b:netrw_method= 6
|
||||||
let g:netrw_machine= substitute(a:choice,davurm,'\1',"")
|
let g:netrw_machine= substitute(a:choice,davurm,'\1',"")
|
||||||
let b:netrw_fname = substitute(a:choice,davurm,'\2',"")
|
let b:netrw_fname = substitute(a:choice,davurm,'\2',"")
|
||||||
|
|
||||||
" rsync://user@hostname/...path-to-file
|
" rsync://user@hostname/...path-to-file
|
||||||
elseif match(a:choice,rsyncurm) == 0
|
elseif match(a:choice,rsyncurm) == 0
|
||||||
" call Decho("rsync://...")
|
"" call Decho("rsync://...")
|
||||||
let b:netrw_method = 7
|
let b:netrw_method = 7
|
||||||
let g:netrw_machine= substitute(a:choice,rsyncurm,'\1',"")
|
let g:netrw_machine= substitute(a:choice,rsyncurm,'\1',"")
|
||||||
let b:netrw_fname = substitute(a:choice,rsyncurm,'\2',"")
|
let b:netrw_fname = substitute(a:choice,rsyncurm,'\2',"")
|
||||||
|
|
||||||
" ftp://[user@]hostname[[:#]port]/...path-to-file
|
" ftp://[user@]hostname[[:#]port]/...path-to-file
|
||||||
elseif match(a:choice,ftpurm) == 0
|
elseif match(a:choice,ftpurm) == 0
|
||||||
" call Decho("ftp://...")
|
"" call Decho("ftp://...")
|
||||||
let userid = substitute(a:choice,ftpurm,'\2',"")
|
let userid = substitute(a:choice,ftpurm,'\2',"")
|
||||||
let g:netrw_machine= substitute(a:choice,ftpurm,'\3',"")
|
let g:netrw_machine= substitute(a:choice,ftpurm,'\3',"")
|
||||||
let g:netrw_port = substitute(a:choice,ftpurm,'\4',"")
|
let g:netrw_port = substitute(a:choice,ftpurm,'\4',"")
|
||||||
@ -975,7 +1137,7 @@ fun! s:NetMethod(choice) " globals: method machine id passwd fname
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
elseif match(a:choice,fetchurm) == 0
|
elseif match(a:choice,fetchurm) == 0
|
||||||
" call Decho("fetch://...")
|
"" call Decho("fetch://...")
|
||||||
let b:netrw_method = 8
|
let b:netrw_method = 8
|
||||||
let g:netrw_userid = substitute(a:choice,fetchurm,'\2',"")
|
let g:netrw_userid = substitute(a:choice,fetchurm,'\2',"")
|
||||||
let g:netrw_machine= substitute(a:choice,fetchurm,'\3',"")
|
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"
|
" Issue an ftp : "machine id password [path/]filename"
|
||||||
elseif match(a:choice,mipf) == 0
|
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 b:netrw_method = 3
|
||||||
let g:netrw_machine = substitute(a:choice,mipf,'\1',"")
|
let g:netrw_machine = substitute(a:choice,mipf,'\1',"")
|
||||||
let g:netrw_uid = substitute(a:choice,mipf,'\2',"")
|
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"
|
" Issue an ftp: "hostname [path/]filename"
|
||||||
elseif match(a:choice,mf) == 0
|
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")
|
if exists("g:netrw_uid") && exists("g:netrw_passwd")
|
||||||
let b:netrw_method = 3
|
let b:netrw_method = 3
|
||||||
let g:netrw_machine = substitute(a:choice,mf,'\1',"")
|
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
|
" sftp://user@hostname/...path-to-file
|
||||||
elseif match(a:choice,sftpurm) == 0
|
elseif match(a:choice,sftpurm) == 0
|
||||||
" call Decho("sftp://...")
|
"" call Decho("sftp://...")
|
||||||
let b:netrw_method = 9
|
let b:netrw_method = 9
|
||||||
let g:netrw_machine= substitute(a:choice,sftpurm,'\1',"")
|
let g:netrw_machine= substitute(a:choice,sftpurm,'\1',"")
|
||||||
let b:netrw_fname = substitute(a:choice,sftpurm,'\2',"")
|
let b:netrw_fname = substitute(a:choice,sftpurm,'\2',"")
|
||||||
|
|
||||||
" Issue an rcp: hostname:filename" (this one should be last)
|
" Issue an rcp: hostname:filename" (this one should be last)
|
||||||
elseif match(a:choice,rcphf) == 0
|
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 b:netrw_method = 1
|
||||||
let userid = substitute(a:choice,rcphf,'\2',"")
|
let userid = substitute(a:choice,rcphf,'\2',"")
|
||||||
let g:netrw_machine= substitute(a:choice,rcphf,'\3',"")
|
let g:netrw_machine= substitute(a:choice,rcphf,'\3',"")
|
||||||
let b:netrw_fname = substitute(a:choice,rcphf,'\4',"")
|
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 != ""
|
if userid != ""
|
||||||
let g:netrw_uid= userid
|
let g:netrw_uid= userid
|
||||||
endif
|
endif
|
||||||
@ -1032,18 +1198,18 @@ fun! s:NetMethod(choice) " globals: method machine id passwd fname
|
|||||||
let b:netrw_method = -1
|
let b:netrw_method = -1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" call Decho("a:choice <".a:choice.">")
|
"" call Decho("a:choice <".a:choice.">")
|
||||||
" call Decho("b:netrw_method <".b:netrw_method.">")
|
"" call Decho("b:netrw_method <".b:netrw_method.">")
|
||||||
" call Decho("g:netrw_machine<".g:netrw_machine.">")
|
"" call Decho("g:netrw_machine<".g:netrw_machine.">")
|
||||||
" call Decho("g:netrw_port <".g:netrw_port.">")
|
"" call Decho("g:netrw_port <".g:netrw_port.">")
|
||||||
" if exists("g:netrw_uid") "Decho
|
"" if exists("g:netrw_uid") "Decho
|
||||||
" call Decho("g:netrw_uid <".g:netrw_uid.">")
|
"" call Decho("g:netrw_uid <".g:netrw_uid.">")
|
||||||
" endif "Decho
|
"" endif "Decho
|
||||||
" if exists("g:netrw_passwd") "Decho
|
"" if exists("g:netrw_passwd") "Decho
|
||||||
" call Decho("g:netrw_passwd <".g:netrw_passwd.">")
|
"" call Decho("g:netrw_passwd <".g:netrw_passwd.">")
|
||||||
" endif "Decho
|
"" endif "Decho
|
||||||
" call Decho("b:netrw_fname <".b:netrw_fname.">")
|
"" call Decho("b:netrw_fname <".b:netrw_fname.">")
|
||||||
" call Dret("NetMethod")
|
"" call Dret("NetMethod")
|
||||||
endfun
|
endfun
|
||||||
" end of NetMethod
|
" end of NetMethod
|
||||||
|
|
||||||
@ -1056,32 +1222,32 @@ fun! NetUserPass(...)
|
|||||||
|
|
||||||
" get/set userid
|
" get/set userid
|
||||||
if a:0 == 0
|
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 == ""
|
if !exists("g:netrw_uid") || g:netrw_uid == ""
|
||||||
" via prompt
|
" via prompt
|
||||||
let g:netrw_uid= input('Enter username: ')
|
let g:netrw_uid= input('Enter username: ')
|
||||||
endif
|
endif
|
||||||
else " from command line
|
else " from command line
|
||||||
" call Dfunc("NetUserPass(a:1<".a:1.">) {")
|
"" call Dfunc("NetUserPass(a:1<".a:1.">) {")
|
||||||
let g:netrw_uid= a:1
|
let g:netrw_uid= a:1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" get password
|
" get password
|
||||||
if a:0 <= 1 " via prompt
|
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: ")
|
let g:netrw_passwd= inputsecret("Enter Password: ")
|
||||||
else " from command line
|
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
|
let g:netrw_passwd=a:2
|
||||||
endif
|
endif
|
||||||
" call Dret("NetUserPass")
|
"" call Dret("NetUserPass")
|
||||||
endfun
|
endfun
|
||||||
" end NetUserPass
|
" end NetUserPass
|
||||||
|
|
||||||
" ------------------------------------------------------------------------
|
" ------------------------------------------------------------------------
|
||||||
" NetOptionSave: save options and set to "standard" form {{{1
|
" NetOptionSave: save options and set to "standard" form {{{1
|
||||||
fun!s:NetOptionSave()
|
fun!s:NetOptionSave()
|
||||||
" call Dfunc("NetOptionSave()")
|
"" call Dfunc("NetOptionSave()")
|
||||||
|
|
||||||
" Get Temporary Filename
|
" Get Temporary Filename
|
||||||
let s:aikeep = &ai
|
let s:aikeep = &ai
|
||||||
@ -1100,16 +1266,16 @@ fun!s:NetOptionSave()
|
|||||||
if has("win32") && !has("win95")
|
if has("win32") && !has("win95")
|
||||||
let s:swfkeep= &swf
|
let s:swfkeep= &swf
|
||||||
set noswf
|
set noswf
|
||||||
" call Decho("setting s:swfkeep to <".&swf.">")
|
"" call Decho("setting s:swfkeep to <".&swf.">")
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" call Dret("NetOptionSave")
|
"" call Dret("NetOptionSave")
|
||||||
endfun
|
endfun
|
||||||
|
|
||||||
" ------------------------------------------------------------------------
|
" ------------------------------------------------------------------------
|
||||||
" NetOptionRestore: restore options {{{1
|
" NetOptionRestore: restore options {{{1
|
||||||
fun! s:NetOptionRestore()
|
fun! s:NetOptionRestore()
|
||||||
" call Dfunc("NetOptionRestore()")
|
"" call Dfunc("NetOptionRestore()")
|
||||||
|
|
||||||
let &ai = s:aikeep
|
let &ai = s:aikeep
|
||||||
let &cin = s:cinkeep
|
let &cin = s:cinkeep
|
||||||
@ -1132,27 +1298,55 @@ fun! s:NetOptionRestore()
|
|||||||
unlet s:twkeep
|
unlet s:twkeep
|
||||||
unlet s:dirkeep
|
unlet s:dirkeep
|
||||||
|
|
||||||
" call Dret("NetOptionRestore")
|
"" call Dret("NetOptionRestore")
|
||||||
endfun
|
endfun
|
||||||
|
|
||||||
" ------------------------------------------------------------------------
|
" ------------------------------------------------------------------------
|
||||||
" NetReadFixup: this sort of function is typically written by the user {{{1
|
" NetReadFixup: this sort of function is typically written by the user {{{1
|
||||||
" to handle extra junk that their system's ftp dumps
|
" to handle extra junk that their system's ftp dumps
|
||||||
" into the transfer. This function is provided as an
|
" into the transfer. This function is provided as an
|
||||||
" example and as a fix for a Windows 95 problem: in my
|
" example and as a fix for a Windows 95 problem: in my
|
||||||
" experience, win95's ftp always dumped four blank lines
|
" experience, win95's ftp always dumped four blank lines
|
||||||
" at the end of the transfer.
|
" at the end of the transfer.
|
||||||
if has("win95") && g:netrw_win95ftp
|
if has("win95") && g:netrw_win95ftp
|
||||||
fun! NetReadFixup(method, line1, line2)
|
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>)
|
if method == 3 " ftp (no <.netrc>)
|
||||||
let fourblanklines= line2 - 3
|
let fourblanklines= line2 - 3
|
||||||
silent fourblanklines.",".line2."g/^\s*/d"
|
silent fourblanklines.",".line2."g/^\s*/d"
|
||||||
endif
|
endif
|
||||||
" call Dret("NetReadFixup")
|
"" call Dret("NetReadFixup")
|
||||||
endfun
|
endfun
|
||||||
endif
|
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
|
" Restore {{{1
|
||||||
let &cpo= s:save_cpo
|
let &cpo= s:save_cpo
|
||||||
|
|||||||
29
runtime/syntax/netrwlist.vim
Normal file
29
runtime/syntax/netrwlist.vim
Normal 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
|
||||||
@ -19,6 +19,8 @@ syn match poFormat "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|
|
|||||||
syn match poFormat "%%" contained
|
syn match poFormat "%%" contained
|
||||||
syn region poString start=+"+ skip=+\\\\\|\\"+ end=+"+
|
syn region poString start=+"+ skip=+\\\\\|\\"+ end=+"+
|
||||||
\ contains=poSpecial,poFormat
|
\ contains=poSpecial,poFormat
|
||||||
|
syn region poFuzzy start=+^#,\sfuzzy+ end=+^$+
|
||||||
|
syn match poUntranslated +^msgstr\s""\n\n+
|
||||||
|
|
||||||
" Define the default highlighting.
|
" Define the default highlighting.
|
||||||
" For version 5.7 and earlier: only when not done already
|
" 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 poSpecial Special
|
||||||
HiLink poFormat poSpecial
|
HiLink poFormat poSpecial
|
||||||
HiLink poString String
|
HiLink poString String
|
||||||
|
HiLink poFuzzy Todo
|
||||||
|
HiLink poUntranslated Todo
|
||||||
|
|
||||||
delcommand HiLink
|
delcommand HiLink
|
||||||
endif
|
endif
|
||||||
|
|||||||
@ -432,7 +432,7 @@ CClink = $(CC)
|
|||||||
#CONF_OPT_FEAT = --with-features=small
|
#CONF_OPT_FEAT = --with-features=small
|
||||||
#CONF_OPT_FEAT = --with-features=normal
|
#CONF_OPT_FEAT = --with-features=normal
|
||||||
#CONF_OPT_FEAT = --with-features=big
|
#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".
|
# COMPILED BY - For including a specific e-mail address for ":version".
|
||||||
#CONF_OPT_COMPBY = "--with-compiledby=John Doe <JohnDoe@yahoo.com>"
|
#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
|
# 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 -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 = -O6 -fno-strength-reduce -Wall -Wshadow -Wmissing-prototypes
|
||||||
#CFLAGS = -g -DDEBUG -Wall -Wshadow -Wmissing-prototypes
|
#CFLAGS = -g -DDEBUG -Wall -Wshadow -Wmissing-prototypes
|
||||||
#CFLAGS = -g -O2 -DSTARTUPTIME=\"vimstartup\" -fno-strength-reduce -Wall -Wmissing-prototypes
|
#CFLAGS = -g -O2 -DSTARTUPTIME=\"vimstartup\" -fno-strength-reduce -Wall -Wmissing-prototypes
|
||||||
|
|||||||
@ -4579,7 +4579,7 @@ buf_spname(buf)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (buf->b_fname == NULL)
|
if (buf->b_fname == NULL)
|
||||||
return _("[No File]");
|
return _("[No Name]");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
28
src/eval.c
28
src/eval.c
@ -598,6 +598,20 @@ eval_to_string_skip(arg, nextcmd, skip)
|
|||||||
return retval;
|
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.
|
* Top level evaluation function, returning a string.
|
||||||
* Return pointer to allocated memory, or NULL for failure.
|
* Return pointer to allocated memory, or NULL for failure.
|
||||||
@ -3375,6 +3389,20 @@ find_buffer(avar)
|
|||||||
buf = buflist_findname(name);
|
buf = buflist_findname(name);
|
||||||
vim_free(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;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4573,7 +4573,7 @@ ex_help(eap)
|
|||||||
buf_T *buf;
|
buf_T *buf;
|
||||||
#ifdef FEAT_MULTI_LANG
|
#ifdef FEAT_MULTI_LANG
|
||||||
int len;
|
int len;
|
||||||
char_u *lang = NULL;
|
char_u *lang;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (eap != NULL)
|
if (eap != NULL)
|
||||||
@ -4613,13 +4613,7 @@ ex_help(eap)
|
|||||||
|
|
||||||
#ifdef FEAT_MULTI_LANG
|
#ifdef FEAT_MULTI_LANG
|
||||||
/* Check for a specified language */
|
/* Check for a specified language */
|
||||||
len = STRLEN(arg);
|
lang = check_help_lang(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 '@' */
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* When no argument given go to the index. */
|
/* 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
|
* Return a heuristic indicating how well the given string matches. The
|
||||||
* smaller the number, the better the match. This is the order of priorities,
|
* smaller the number, the better the match. This is the order of priorities,
|
||||||
@ -5180,7 +5196,9 @@ ex_helptags(eap)
|
|||||||
garray_T ga;
|
garray_T ga;
|
||||||
int i, j;
|
int i, j;
|
||||||
int len;
|
int len;
|
||||||
|
#ifdef FEAT_MULTI_LANG
|
||||||
char_u lang[2];
|
char_u lang[2];
|
||||||
|
#endif
|
||||||
char_u ext[5];
|
char_u ext[5];
|
||||||
char_u fname[8];
|
char_u fname[8];
|
||||||
int filecount;
|
int filecount;
|
||||||
|
|||||||
@ -2319,8 +2319,8 @@ do_one_cmd(cmdlinep, sourcing,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* no arguments allowed */
|
/* no arguments allowed */
|
||||||
if (!ni && !(ea.argt & EXTRA) && *ea.arg != NUL &&
|
if (!ni && !(ea.argt & EXTRA) && *ea.arg != NUL
|
||||||
vim_strchr((char_u *)"|\"", *ea.arg) == NULL)
|
&& vim_strchr((char_u *)"|\"", *ea.arg) == NULL)
|
||||||
{
|
{
|
||||||
errormsg = (char_u *)_(e_trailing);
|
errormsg = (char_u *)_(e_trailing);
|
||||||
goto doend;
|
goto doend;
|
||||||
@ -3885,6 +3885,17 @@ expand_filename(eap, cmdlinep, errormsgp)
|
|||||||
has_wildcards = mch_has_wildcard(eap->arg);
|
has_wildcards = mch_has_wildcard(eap->arg);
|
||||||
for (p = eap->arg; *p; )
|
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.
|
* Quick check if this cannot be the start of a special string.
|
||||||
* Also removes backslash before '%', '#' and '<'.
|
* Also removes backslash before '%', '#' and '<'.
|
||||||
@ -4157,6 +4168,18 @@ separate_nextcmd(eap)
|
|||||||
if (*p == NUL) /* stop at NUL after CTRL-V */
|
if (*p == NUL) /* stop at NUL after CTRL-V */
|
||||||
break;
|
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 */
|
/* Check for '"': start of comment or '|': next command */
|
||||||
/* :@" and :*" do not start a comment!
|
/* :@" and :*" do not start a comment!
|
||||||
* :redir @" doesn't either. */
|
* :redir @" doesn't either. */
|
||||||
|
|||||||
@ -5290,8 +5290,11 @@ shorten_fnames(force)
|
|||||||
}
|
}
|
||||||
if (p == NULL || buf->b_fname == NULL)
|
if (p == NULL || buf->b_fname == NULL)
|
||||||
buf->b_fname = buf->b_ffname;
|
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
|
#ifdef FEAT_WINDOWS
|
||||||
status_redraw_all();
|
status_redraw_all();
|
||||||
|
|||||||
907
src/gui_mac.c
907
src/gui_mac.c
File diff suppressed because it is too large
Load Diff
@ -818,9 +818,11 @@ FindWindowTitle(HWND hwnd, LPARAM lParam)
|
|||||||
{
|
{
|
||||||
if (strstr(buf, title) != NULL)
|
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);
|
vim_parent_hwnd = FindWindowEx(hwnd, NULL, "MDIClient", NULL);
|
||||||
return FALSE;
|
if (vim_parent_hwnd != NULL)
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return TRUE; /* continue searching */
|
return TRUE; /* continue searching */
|
||||||
|
|||||||
@ -1518,7 +1518,7 @@ swapfile_info(fname)
|
|||||||
{
|
{
|
||||||
MSG_PUTS(_(" file name: "));
|
MSG_PUTS(_(" file name: "));
|
||||||
if (b0.b0_fname[0] == NUL)
|
if (b0.b0_fname[0] == NUL)
|
||||||
MSG_PUTS(_("[No File]"));
|
MSG_PUTS(_("[No Name]"));
|
||||||
else
|
else
|
||||||
msg_outtrans(b0.b0_fname);
|
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.
|
* Change the ".swp" extension to find another file that can be used.
|
||||||
* First decrement the last char: ".swo", ".swn", etc.
|
* First decrement the last char: ".swo", ".swn", etc.
|
||||||
* If that still isn't enough decrement the last but one char: ".svz"
|
* 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" */
|
if (fname[n - 1] == 'a') /* ".s?a" */
|
||||||
{
|
{
|
||||||
|
|||||||
35
src/normal.c
35
src/normal.c
@ -5186,7 +5186,23 @@ nv_scroll(cap)
|
|||||||
if (cap->count1 - 1 >= curwin->w_cursor.lnum)
|
if (cap->count1 - 1 >= curwin->w_cursor.lnum)
|
||||||
curwin->w_cursor.lnum = 1;
|
curwin->w_cursor.lnum = 1;
|
||||||
else
|
else
|
||||||
curwin->w_cursor.lnum -= cap->count1 - 1;
|
{
|
||||||
|
#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
|
else
|
||||||
{
|
{
|
||||||
@ -5222,8 +5238,23 @@ nv_scroll(cap)
|
|||||||
if (n > 0 && used > curwin->w_height)
|
if (n > 0 && used > curwin->w_height)
|
||||||
--n;
|
--n;
|
||||||
}
|
}
|
||||||
else
|
else /* (cap->cmdchar == 'H') */
|
||||||
|
{
|
||||||
n = cap->count1 - 1;
|
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;
|
curwin->w_cursor.lnum = curwin->w_topline + n;
|
||||||
if (curwin->w_cursor.lnum > curbuf->b_ml.ml_line_count)
|
if (curwin->w_cursor.lnum > curbuf->b_ml.ml_line_count)
|
||||||
curwin->w_cursor.lnum = curbuf->b_ml.ml_line_count;
|
curwin->w_cursor.lnum = curbuf->b_ml.ml_line_count;
|
||||||
|
|||||||
@ -527,7 +527,7 @@ mch_breakcheck()
|
|||||||
*/
|
*/
|
||||||
EventRecord theEvent;
|
EventRecord theEvent;
|
||||||
|
|
||||||
if (EventAvail (keyDownMask, &theEvent))
|
if (EventAvail(keyDownMask, &theEvent))
|
||||||
if ((theEvent.message & charCodeMask) == Ctrl_C && ctrl_c_interrupts)
|
if ((theEvent.message & charCodeMask) == Ctrl_C && ctrl_c_interrupts)
|
||||||
got_int = TRUE;
|
got_int = TRUE;
|
||||||
#if 0
|
#if 0
|
||||||
|
|||||||
@ -2987,7 +2987,12 @@ mch_isdir(char_u *name)
|
|||||||
mch_can_exe(name)
|
mch_can_exe(name)
|
||||||
char_u *name;
|
char_u *name;
|
||||||
{
|
{
|
||||||
return (searchpath(name) != NULL);
|
char *p;
|
||||||
|
|
||||||
|
p = searchpath(name);
|
||||||
|
if (p == NULL || mch_isdir(p))
|
||||||
|
return FALSE;
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@ -1519,29 +1519,45 @@ theend:
|
|||||||
# include <shellapi.h> /* required for FindExecutable() */
|
# include <shellapi.h> /* required for FindExecutable() */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Return TRUE if "name" is in $PATH.
|
||||||
|
* TODO: Should also check if it's really executable.
|
||||||
|
*/
|
||||||
static int
|
static int
|
||||||
executable_exists(char *name)
|
executable_exists(char *name)
|
||||||
{
|
{
|
||||||
char location[2 * _MAX_PATH + 2];
|
char *dum;
|
||||||
char widename[2 * _MAX_PATH];
|
char fname[_MAX_PATH];
|
||||||
|
|
||||||
/* There appears to be a bug in FindExecutableA() on Windows NT.
|
#ifdef FEAT_MBYTE
|
||||||
* Use FindExecutableW() instead... */
|
if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
|
||||||
if (g_PlatformId == VER_PLATFORM_WIN32_NT)
|
|
||||||
{
|
{
|
||||||
MultiByteToWideChar(CP_ACP, 0, (LPCTSTR)name, -1,
|
WCHAR *p = enc_to_ucs2(name, NULL);
|
||||||
(LPWSTR)widename, _MAX_PATH);
|
WCHAR fnamew[_MAX_PATH];
|
||||||
if (FindExecutableW((LPCWSTR)widename, (LPCWSTR)"",
|
WCHAR *dumw;
|
||||||
(LPWSTR)location) > (HINSTANCE)32)
|
long n;
|
||||||
return TRUE;
|
|
||||||
|
if (p != NULL)
|
||||||
|
{
|
||||||
|
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). */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
#endif
|
||||||
{
|
if (SearchPath(NULL, name, NULL, _MAX_PATH, fname, &dum) == 0)
|
||||||
if (FindExecutableA((LPCTSTR)name, (LPCTSTR)"",
|
return FALSE;
|
||||||
(LPTSTR)location) > (HINSTANCE)32)
|
if (mch_isdir(fname))
|
||||||
return TRUE;
|
return FALSE;
|
||||||
}
|
return TRUE;
|
||||||
return FALSE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef FEAT_GUI_W32
|
#ifdef FEAT_GUI_W32
|
||||||
|
|||||||
@ -97,8 +97,8 @@ zh_CN.cp936.po: zh_CN.po
|
|||||||
# Convert ru.po to create ru.cp1251.po.
|
# Convert ru.po to create ru.cp1251.po.
|
||||||
ru.cp1251.po: ru.po
|
ru.cp1251.po: ru.po
|
||||||
rm -f ru.cp1251.po
|
rm -f ru.cp1251.po
|
||||||
iconv -f koi8-r -t cp1251 ru.po | \
|
iconv -f utf-8 -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
|
sed -e 's/charset=utf-8/charset=cp1251/' -e 's/# Original translations/# Generated from ru.po, DO NOT EDIT/' > ru.cp1251.po
|
||||||
|
|
||||||
check:
|
check:
|
||||||
@if test "x" = "x$(prefix)"; then \
|
@if test "x" = "x$(prefix)"; then \
|
||||||
|
|||||||
1661
src/po/ru.cp1251.po
1661
src/po/ru.cp1251.po
File diff suppressed because it is too large
Load Diff
@ -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));
|
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));
|
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));
|
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 __ARGS((char_u *arg, char_u **nextcmd));
|
||||||
char_u *eval_to_string_safe __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));
|
int eval_to_number __ARGS((char_u *expr));
|
||||||
|
|||||||
@ -38,6 +38,7 @@ int read_viminfo_sub_string __ARGS((vir_T *virp, int force));
|
|||||||
void write_viminfo_sub_string __ARGS((FILE *fp));
|
void write_viminfo_sub_string __ARGS((FILE *fp));
|
||||||
void prepare_tagpreview __ARGS((void));
|
void prepare_tagpreview __ARGS((void));
|
||||||
void ex_help __ARGS((exarg_T *eap));
|
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 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));
|
int find_help_tags __ARGS((char_u *arg, int *num_matches, char_u ***matches, int keep_lang));
|
||||||
void fix_help_buffer __ARGS((void));
|
void fix_help_buffer __ARGS((void));
|
||||||
|
|||||||
@ -1006,6 +1006,7 @@ qf_jump(dir, errornr, forceit)
|
|||||||
#ifdef FEAT_FOLDING
|
#ifdef FEAT_FOLDING
|
||||||
int old_KeyTyped = KeyTyped; /* getting file may reset it */
|
int old_KeyTyped = KeyTyped; /* getting file may reset it */
|
||||||
#endif
|
#endif
|
||||||
|
int ok = OK;
|
||||||
|
|
||||||
if (qf_curlist >= qf_listcount || qf_lists[qf_curlist].qf_count == 0)
|
if (qf_curlist >= qf_listcount || qf_lists[qf_curlist].qf_count == 0)
|
||||||
{
|
{
|
||||||
@ -1096,6 +1097,42 @@ qf_jump(dir, errornr, forceit)
|
|||||||
* window */
|
* window */
|
||||||
print_message = FALSE;
|
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
|
* If currently in the quickfix window, find another window to show the
|
||||||
* file in.
|
* file in.
|
||||||
@ -1170,8 +1207,28 @@ qf_jump(dir, errornr, forceit)
|
|||||||
*/
|
*/
|
||||||
old_curbuf = curbuf;
|
old_curbuf = curbuf;
|
||||||
old_lnum = curwin->w_cursor.lnum;
|
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 */
|
/* When not switched to another buffer, still need to set pc mark */
|
||||||
if (curbuf == old_curbuf)
|
if (curbuf == old_curbuf)
|
||||||
@ -2145,11 +2202,19 @@ ex_helpgrep(eap)
|
|||||||
int fi;
|
int fi;
|
||||||
struct qf_line *prevp = NULL;
|
struct qf_line *prevp = NULL;
|
||||||
long lnum;
|
long lnum;
|
||||||
|
#ifdef FEAT_MULTI_LANG
|
||||||
|
char_u *lang;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Make 'cpoptions' empty, the 'l' flag should not be used here. */
|
/* Make 'cpoptions' empty, the 'l' flag should not be used here. */
|
||||||
save_cpo = p_cpo;
|
save_cpo = p_cpo;
|
||||||
p_cpo = (char_u *)"";
|
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.regprog = vim_regcomp(eap->arg, RE_MAGIC + RE_STRING);
|
||||||
regmatch.rm_ic = FALSE;
|
regmatch.rm_ic = FALSE;
|
||||||
if (regmatch.regprog != NULL)
|
if (regmatch.regprog != NULL)
|
||||||
@ -2172,6 +2237,16 @@ ex_helpgrep(eap)
|
|||||||
{
|
{
|
||||||
for (fi = 0; fi < fcount && !got_int; ++fi)
|
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");
|
fd = fopen((char *)fnames[fi], "r");
|
||||||
if (fd != NULL)
|
if (fd != NULL)
|
||||||
{
|
{
|
||||||
@ -2227,6 +2302,8 @@ ex_helpgrep(eap)
|
|||||||
/* Jump to first match. */
|
/* Jump to first match. */
|
||||||
if (qf_lists[qf_curlist].qf_count > 0)
|
if (qf_lists[qf_curlist].qf_count > 0)
|
||||||
qf_jump(0, 0, FALSE);
|
qf_jump(0, 0, FALSE);
|
||||||
|
else
|
||||||
|
EMSG2(_(e_nomatch2), eap->arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* FEAT_QUICKFIX */
|
#endif /* FEAT_QUICKFIX */
|
||||||
|
|||||||
@ -3052,13 +3052,16 @@ current_word(oap, count, include, bigword)
|
|||||||
--count;
|
--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
|
* If we don't include white space at the end, move the start
|
||||||
* to include some white space there. This makes "daw" work
|
* to include some white space there. This makes "daw" work
|
||||||
* better on the last word in a sentence (and "2daw" on last-but-one
|
* 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 */
|
pos = curwin->w_cursor; /* save cursor position */
|
||||||
curwin->w_cursor = start_pos;
|
curwin->w_cursor = start_pos;
|
||||||
|
|||||||
Reference in New Issue
Block a user