mirror of
https://github.com/zoriya/vim.git
synced 2025-12-10 17:26:16 +00:00
Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c5e2b040b4 | ||
|
|
8ad80dea08 | ||
|
|
b463e8d999 | ||
|
|
6aa8cea46d | ||
|
|
9472eec83c | ||
|
|
bb7943b792 | ||
|
|
763209c57b | ||
|
|
1615b36b91 | ||
|
|
bf15b8d78b | ||
|
|
863e80b445 | ||
|
|
3e54569b17 | ||
|
|
ce876aaa9a | ||
|
|
976787d1f3 | ||
|
|
4b974d5443 | ||
|
|
28a8193e31 | ||
|
|
a3921f48c6 | ||
|
|
45e5fd135d | ||
|
|
6e62da3e14 |
@@ -10,11 +10,11 @@ Arabic Language support (options & mappings) for Vim *Arabic*
|
||||
|
||||
*E800*
|
||||
In order to use right-to-left and Arabic mapping support, it is
|
||||
necessary to compile VIM with the |+arabic| feature.
|
||||
necessary to compile Vim with the |+arabic| feature.
|
||||
|
||||
These functions have been created by Nadim Shaikli <nadim-at-arabeyes.org>
|
||||
|
||||
It is best to view this file with these settings within VIM's GUI: >
|
||||
It is best to view this file with these settings within Vim's GUI: >
|
||||
|
||||
:set encoding=utf-8
|
||||
:set arabicshape
|
||||
@@ -42,7 +42,7 @@ the user interface remains the standard Vi interface.
|
||||
|
||||
Highlights
|
||||
----------
|
||||
o Editing left-to-right files as in the original VIM hasn't changed.
|
||||
o Editing left-to-right files as in the original Vim hasn't changed.
|
||||
|
||||
o Viewing and editing files in right-to-left windows. File
|
||||
orientation is per window, so it is possible to view the same
|
||||
@@ -52,7 +52,7 @@ o No special terminal with right-to-left capabilities is required.
|
||||
The right-to-left changes are completely hardware independent.
|
||||
Only Arabic fonts are necessary.
|
||||
|
||||
o Compatible with the original VIM. Almost all features work in
|
||||
o Compatible with the original Vim. Almost all features work in
|
||||
right-to-left mode (there are liable to be bugs).
|
||||
|
||||
o Changing keyboard mapping and reverse insert modes using a single
|
||||
@@ -66,14 +66,14 @@ o While in Arabic mode, numbers are entered from left to right. Upon
|
||||
|
||||
o Arabic keymapping on the command line in reverse insert mode.
|
||||
|
||||
o Proper Bidirectional functionality is possible given VIM is
|
||||
o Proper Bidirectional functionality is possible given Vim is
|
||||
started within a Bidi capable terminal emulator.
|
||||
|
||||
|
||||
Arabic Fonts *arabicfonts*
|
||||
------------
|
||||
|
||||
VIM requires monospaced fonts of which there are many out there.
|
||||
Vim requires monospaced fonts of which there are many out there.
|
||||
Arabic requires ISO-8859-6 as well as Presentation Form-B fonts
|
||||
(without Form-B, Arabic will _NOT_ be usable). It is highly
|
||||
recommended that users search for so-called 'ISO-10646-1' fonts.
|
||||
@@ -96,13 +96,13 @@ o Installation of fonts for X Window systems (Unix/Linux)
|
||||
|
||||
Usage
|
||||
-----
|
||||
Prior to the actual usage of Arabic within VIM, a number of settings
|
||||
Prior to the actual usage of Arabic within Vim, a number of settings
|
||||
need to be accounted for and invoked.
|
||||
|
||||
o Setting the Arabic fonts
|
||||
|
||||
+ For VIM GUI set the 'guifont' to your_ARABIC_FONT. This is done
|
||||
by entering the following command in the VIM window.
|
||||
+ For Vim GUI set the 'guifont' to your_ARABIC_FONT. This is done
|
||||
by entering the following command in the Vim window.
|
||||
>
|
||||
:set guifont=your_ARABIC_FONT
|
||||
<
|
||||
@@ -115,7 +115,7 @@ o Setting the Arabic fonts
|
||||
you can include ':set guifont=your_ARABIC_FONT' to your .vimrc
|
||||
file.
|
||||
|
||||
+ Under the X Window environment, you can also start VIM with
|
||||
+ Under the X Window environment, you can also start Vim with
|
||||
'-fn your_ARABIC_FONT' option.
|
||||
|
||||
o Setting the appropriate character Encoding
|
||||
@@ -124,7 +124,7 @@ o Setting the appropriate character Encoding
|
||||
>
|
||||
:set encoding=utf-8
|
||||
<
|
||||
to your .vimrc file (entering the command manually into you VIM
|
||||
to your .vimrc file (entering the command manually into you Vim
|
||||
window is highly discouraged). In short, include ':set
|
||||
encoding=utf-8' to your .vimrc file.
|
||||
|
||||
@@ -137,11 +137,11 @@ o Setting the appropriate character Encoding
|
||||
o Enable Arabic settings [short-cut]
|
||||
|
||||
In order to simplify and streamline things, you can either invoke
|
||||
VIM with the command-line option,
|
||||
Vim with the command-line option,
|
||||
|
||||
% vim -A my_utf8_arabic_file ...
|
||||
|
||||
or enable 'arabic' via the following command within VIM
|
||||
or enable 'arabic' via the following command within Vim
|
||||
>
|
||||
:set arabic
|
||||
<
|
||||
@@ -189,7 +189,7 @@ o Enable Arabic settings [short-cut]
|
||||
>
|
||||
:set keymap=arabic
|
||||
<
|
||||
in your VIM window. You can also append the 'keymap' set command to
|
||||
in your Vim window. You can also append the 'keymap' set command to
|
||||
your .vimrc file. In other words, you can include ':set keymap=arabic'
|
||||
to your .vimrc file.
|
||||
|
||||
@@ -202,7 +202,7 @@ o Enable Arabic settings [short-cut]
|
||||
|
||||
+ Arabic deletion of a combined pair character
|
||||
|
||||
By default VIM has the 'delcombine' option disabled. This option
|
||||
By default Vim has the 'delcombine' option disabled. This option
|
||||
allows the deletion of ALEF in a LAM_ALEF (LAA) combined character
|
||||
and still retain the LAM (i.e. it reverts to treating the combined
|
||||
character as its natural two characters form -- this also pertains
|
||||
@@ -211,13 +211,13 @@ o Enable Arabic settings [short-cut]
|
||||
>
|
||||
:set delcombine
|
||||
<
|
||||
in our VIM window. You can also append the 'delcombine' set command
|
||||
in our Vim window. You can also append the 'delcombine' set command
|
||||
to your .vimrc file. In other words, you can include ':set delcombine'
|
||||
to your .vimrc file.
|
||||
|
||||
+ Arabic right-to-left Mode
|
||||
|
||||
By default VIM starts in Left-to-right mode. 'rightleft' is the
|
||||
By default Vim starts in Left-to-right mode. 'rightleft' is the
|
||||
command that allows one to alter a window's orientation - that can
|
||||
be accomplished via,
|
||||
|
||||
@@ -253,7 +253,7 @@ o Enable Arabic settings [short-cut]
|
||||
>
|
||||
:set arabicshape
|
||||
<
|
||||
in our VIM window. You can also append the 'arabicshape' set
|
||||
in our Vim window. You can also append the 'arabicshape' set
|
||||
command to your .vimrc file. In other words, you can include
|
||||
':set arabicshape' to your .vimrc file.
|
||||
|
||||
@@ -261,7 +261,7 @@ o Enable Arabic settings [short-cut]
|
||||
Keymap/Keyboard *arabickeymap*
|
||||
---------------
|
||||
|
||||
The character/letter encoding used in VIM is the standard UTF-8.
|
||||
The character/letter encoding used in Vim is the standard UTF-8.
|
||||
It is widely discouraged that any other encoding be used or even
|
||||
attempted.
|
||||
|
||||
@@ -294,7 +294,7 @@ o Keyboard
|
||||
Restrictions
|
||||
------------
|
||||
|
||||
o VIM in its GUI form does not currently support Bi-directionality
|
||||
o Vim in its GUI form does not currently support Bi-directionality
|
||||
(i.e. the ability to see both Arabic and Latin intermixed within
|
||||
the same line).
|
||||
|
||||
|
||||
@@ -610,7 +610,7 @@ FileChangedShell When Vim notices that the modification time of
|
||||
|timestamp|
|
||||
Mostly triggered after executing a shell
|
||||
command, but also with a |:checktime| command
|
||||
or when Gvim regains input focus.
|
||||
or when gvim regains input focus.
|
||||
This autocommand is triggered for each changed
|
||||
file. It is not used when 'autoread' is set
|
||||
and the buffer was not changed. If a
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 8.0. Last change: 2017 May 02
|
||||
*eval.txt* For Vim version 8.0. Last change: 2017 Jun 04
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -3373,6 +3373,7 @@ did_filetype() Returns |TRUE| when autocommands are being executed and the
|
||||
FileType event has been triggered at least once. Can be used
|
||||
to avoid triggering the FileType event again in the scripts
|
||||
that detect the file type. |FileType|
|
||||
Returns |FALSE| when `:setf FALLBACK` was used.
|
||||
When editing another file, the counter is reset, thus this
|
||||
really checks if the FileType event has been triggered for the
|
||||
current buffer. This allows an autocommand that starts
|
||||
|
||||
@@ -116,7 +116,7 @@ NOTE: "gnat xref -v" is very tricky to use as it has almost no diagnostic
|
||||
then "gnat xref -v *.ad?"
|
||||
4) Project manager support is completely broken - don't even try "gnat xref
|
||||
-Padacl.gpr".
|
||||
5) VIM is faster when the tags file is sorted - use "sort --unique
|
||||
5) Vim is faster when the tags file is sorted - use "sort --unique
|
||||
--ignore-case --output=tags tags" .
|
||||
6) Remember to insert "!_TAG_FILE_SORTED 2 %sort ui" as first line to mark
|
||||
the file assorted.
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
Introduction *hangul*
|
||||
------------
|
||||
It is to input hangul, the Korean language, with VIM GUI version.
|
||||
It is to input hangul, the Korean language, with Vim GUI version.
|
||||
If you have a XIM program, you can use another |+xim| feature.
|
||||
Basically, it is for anybody who has no XIM program.
|
||||
|
||||
@@ -31,7 +31,7 @@ You should set LANG variable to Korean locale such as ko, ko_KR.eucKR
|
||||
or ko_KR.UTF-8.
|
||||
If you set LC_ALL variable, it should be set to Korean locale also.
|
||||
|
||||
VIM resource
|
||||
Vim resource
|
||||
------------
|
||||
You may want to set 'encoding' and 'fileencodings'.
|
||||
Next are examples: >
|
||||
@@ -53,12 +53,12 @@ If both are set, VIM_KEYBOARD has higher priority.
|
||||
|
||||
Hangul Fonts
|
||||
------------
|
||||
If you use GTK version of GVIM, you should set 'guifont' and 'guifontwide'.
|
||||
If you use GTK version of gvim, you should set 'guifont' and 'guifontwide'.
|
||||
For example: >
|
||||
set guifont=Courier\ 12
|
||||
set guifontwide=NanumGothicCoding\ 12
|
||||
|
||||
If you use Motif or Athena version of GVIM, you should set 'guifontset' in
|
||||
If you use Motif or Athena version of gvim, you should set 'guifontset' in
|
||||
your vimrc. You can set fontset in the .Xdefaults file.
|
||||
|
||||
$HOME/.gvimrc: >
|
||||
@@ -77,11 +77,11 @@ $HOME/.Xdefaults: >
|
||||
|
||||
attention! the , (comma) or ; (semicolon)
|
||||
|
||||
And there should be no ':set guifont'. If it exists, then Gvim ignores
|
||||
':set guifontset'. It means VIM runs without fontset supporting.
|
||||
And there should be no ':set guifont'. If it exists, then gvim ignores
|
||||
':set guifontset'. It means Vim runs without fontset supporting.
|
||||
So, you can see only English. Hangul does not be correctly displayed.
|
||||
|
||||
After "fontset" feature is enabled, VIM does not allow using english
|
||||
After "fontset" feature is enabled, Vim does not allow using english
|
||||
font only in "font" setting for syntax.
|
||||
For example, if you use >
|
||||
:set guifontset=eng_font,your_font
|
||||
@@ -99,7 +99,7 @@ We don't support Johab font.
|
||||
We don't support Hanja input.
|
||||
And We don't have any plan to support them.
|
||||
|
||||
If you really need such features, you can use console version of VIM with a
|
||||
If you really need such features, you can use console version of Vim with a
|
||||
capable terminal emulator.
|
||||
|
||||
Bug or Comment
|
||||
|
||||
@@ -31,7 +31,7 @@ Get specific help: It is possible to go directly to whatever you want help
|
||||
help entries for "word".
|
||||
Or use ":helpgrep word". |:helpgrep|
|
||||
|
||||
VIM stands for Vi IMproved. Most of VIM was made by Bram Moolenaar, but only
|
||||
Vim stands for Vi IMproved. Most of Vim was made by Bram Moolenaar, but only
|
||||
through the help of many others. See |credits|.
|
||||
------------------------------------------------------------------------------
|
||||
*doc-file-list* *Q_ct*
|
||||
|
||||
@@ -41,9 +41,9 @@ instance), code similar to the following should be used:
|
||||
$vim = new Win32::OLE 'Vim.Application';
|
||||
|
||||
[C#] >
|
||||
// Add a reference to VIM in your project.
|
||||
// Add a reference to Vim in your project.
|
||||
// Choose the COM tab.
|
||||
// Select "VIM Ole Interface 1.1 Type Library"
|
||||
// Select "Vim Ole Interface 1.1 Type Library"
|
||||
Vim.Vim vimobj = new Vim.Vim();
|
||||
|
||||
Vim does not support acting as a "hidden" OLE server, like some other OLE
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
Perl and Vim *perl* *Perl*
|
||||
|
||||
1. Editing Perl files |perl-editing|
|
||||
2. Compiling VIM with Perl interface |perl-compiling|
|
||||
2. Compiling Vim with Perl interface |perl-compiling|
|
||||
3. Using the Perl interface |perl-using|
|
||||
4. Dynamic loading |perl-dynamic|
|
||||
|
||||
@@ -33,7 +33,7 @@ Vim in the $VIMRUNTIME/tools directory. This script has currently more
|
||||
features than Exuberant ctags' Perl support.
|
||||
|
||||
==============================================================================
|
||||
2. Compiling VIM with Perl interface *perl-compiling*
|
||||
2. Compiling Vim with Perl interface *perl-compiling*
|
||||
|
||||
To compile Vim with Perl interface, you need Perl 5.004 (or later). Perl must
|
||||
be installed before you compile Vim. Vim's Perl interface does NOT work with
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*insert.txt* For Vim version 8.0. Last change: 2017 Apr 07
|
||||
*insert.txt* For Vim version 8.0. Last change: 2017 May 30
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -634,13 +634,13 @@ Completion can be done for:
|
||||
10. User defined completion |i_CTRL-X_CTRL-U|
|
||||
11. omni completion |i_CTRL-X_CTRL-O|
|
||||
12. Spelling suggestions |i_CTRL-X_s|
|
||||
13. keywords in 'complete' |i_CTRL-N|
|
||||
13. keywords in 'complete' |i_CTRL-N| |i_CTRL-P|
|
||||
|
||||
All these (except 2) are done in CTRL-X mode. This is a sub-mode of Insert
|
||||
and Replace modes. You enter CTRL-X mode by typing CTRL-X and one of the
|
||||
CTRL-X commands. You exit CTRL-X mode by typing a key that is not a valid
|
||||
CTRL-X mode command. Valid keys are the CTRL-X command itself, CTRL-N (next),
|
||||
and CTRL-P (previous).
|
||||
All these, except CTRL-N and CTRL-P, are done in CTRL-X mode. This is a
|
||||
sub-mode of Insert and Replace modes. You enter CTRL-X mode by typing CTRL-X
|
||||
and one of the CTRL-X commands. You exit CTRL-X mode by typing a key that is
|
||||
not a valid CTRL-X mode command. Valid keys are the CTRL-X command itself,
|
||||
CTRL-N (next), and CTRL-P (previous).
|
||||
|
||||
Also see the 'infercase' option if you want to adjust the case of the match.
|
||||
|
||||
|
||||
@@ -84,8 +84,8 @@ The Vim pages contain the most recent information about Vim. They also
|
||||
contain links to the most recent version of Vim. The FAQ is a list of
|
||||
Frequently Asked Questions. Read this if you have problems.
|
||||
|
||||
VIM home page: http://www.vim.org/
|
||||
VIM FAQ: http://vimdoc.sf.net/
|
||||
Vim home page: http://www.vim.org/
|
||||
Vim FAQ: http://vimdoc.sf.net/
|
||||
Downloading: ftp://ftp.vim.org/pub/vim/MIRRORS
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*map.txt* For Vim version 8.0. Last change: 2017 Mar 10
|
||||
*map.txt* For Vim version 8.0. Last change: 2017 May 30
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -185,7 +185,7 @@ that starts with ",". Then you need to type another character for Vim to know
|
||||
whether to use the "," mapping or the longer one. To avoid this add the
|
||||
<nowait> argument. Then the mapping will be used when it matches, Vim does
|
||||
not wait for more characters to be typed. However, if the characters were
|
||||
already type they are used.
|
||||
already typed they are used.
|
||||
|
||||
*:map-<silent>* *:map-silent*
|
||||
To define a mapping which will not be echoed on the command line, add
|
||||
@@ -798,7 +798,7 @@ Bear in mind that convert-meta has been reported to have troubles when used in
|
||||
UTF-8 locales. On terminals like xterm, the "metaSendsEscape" resource can be
|
||||
toggled on the fly through the "Main Options" menu, by pressing Ctrl-LeftClick
|
||||
on the terminal; that's a good last resource in case you want to send ESC when
|
||||
using other applications but not when inside VIM.
|
||||
using other applications but not when inside Vim.
|
||||
|
||||
|
||||
1.11 MAPPING AN OPERATOR *:map-operator*
|
||||
|
||||
@@ -120,7 +120,7 @@ In case you do not want the NetBeans interface you can disable it by
|
||||
uncommenting a line with "--disable-netbeans" in the Makefile.
|
||||
|
||||
Currently the NetBeans interface is supported by Vim running in a terminal and
|
||||
by GVim when it is run with one of the following GUIs: GTK, GNOME, Windows,
|
||||
by gvim when it is run with one of the following GUIs: GTK, GNOME, Windows,
|
||||
Athena and Motif.
|
||||
|
||||
If Motif support is required the user must supply XPM libraries. See
|
||||
@@ -996,7 +996,7 @@ to "Vim". In the Expert tab make sure the "Vim Command" is correct.
|
||||
You should be careful if you change the "Vim Command". There are command
|
||||
line options there which must be there for the connection to be properly
|
||||
set up. You can change the command name but that's about it. If your gvim
|
||||
can be found by your $PATH then the VIM Command can start with "gvim". If
|
||||
can be found by your $PATH then the Vim Command can start with "gvim". If
|
||||
you don't want gvim searched from your $PATH then hard code in the full
|
||||
Unix path name. At this point you should get a gvim for any source file
|
||||
you open in NetBeans.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 8.0. Last change: 2017 May 08
|
||||
*options.txt* For Vim version 8.0. Last change: 2017 Jun 04
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -370,7 +370,7 @@ Note: In the future more global options can be made global-local. Using
|
||||
|
||||
Setting the filetype
|
||||
|
||||
:setf[iletype] {filetype} *:setf* *:setfiletype*
|
||||
:setf[iletype] [FALLBACK] {filetype} *:setf* *:setfiletype*
|
||||
Set the 'filetype' option to {filetype}, but only if
|
||||
not done yet in a sequence of (nested) autocommands.
|
||||
This is short for: >
|
||||
@@ -380,6 +380,13 @@ Setting the filetype
|
||||
< This command is used in a filetype.vim file to avoid
|
||||
setting the 'filetype' option twice, causing different
|
||||
settings and syntax files to be loaded.
|
||||
|
||||
When the optional FALLBACK argument is present, a
|
||||
later :setfiletype command will override the
|
||||
'filetype'. This is to used for filetype detections
|
||||
that are just a guess. |did_filetype()| will return
|
||||
false after this command.
|
||||
|
||||
{not in Vi}
|
||||
|
||||
*option-window* *optwin*
|
||||
@@ -7735,6 +7742,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
compatible terminal.
|
||||
If setting this option does not work (produces a colorless UI)
|
||||
reading |xterm-true-color| might help.
|
||||
Note that the "cterm" attributes are still used, not the "gui" ones.
|
||||
NOTE: This option is reset when 'compatible' is set.
|
||||
|
||||
*'terse'* *'noterse'*
|
||||
|
||||
@@ -144,7 +144,7 @@ The default value for $VIM is set at compile time and can be determined with >
|
||||
:version
|
||||
|
||||
The normal value is /boot/home/config/share/vim. If you don't like it you can
|
||||
set the VIM environment variable to override this, or set 'helpfile' in your
|
||||
set the Vim environment variable to override this, or set 'helpfile' in your
|
||||
.vimrc: >
|
||||
|
||||
:if version >= 500
|
||||
|
||||
@@ -539,7 +539,7 @@ More info under :help hardcopy
|
||||
|
||||
8.10 Setting up the symbols
|
||||
|
||||
When I use GVIM this way and press CTRL-Y in the parent terminal, gvim exits.
|
||||
When I use gvim this way and press CTRL-Y in the parent terminal, gvim exits.
|
||||
I now use a different symbol that seems to work OK and fixes the problem.
|
||||
I suggest this instead: >
|
||||
|
||||
@@ -547,7 +547,7 @@ I suggest this instead: >
|
||||
|
||||
The /INPUT=NLA0: separates the standard input of the gvim process from the
|
||||
parent terminal, to block signals from the parent window.
|
||||
Without the -GEOMETRY, the GVIM window size will be minimal and the menu
|
||||
Without the -GEOMETRY, the gvim window size will be minimal and the menu
|
||||
will be confused after a window-resize.
|
||||
|
||||
(Carlo Mekenkamp, Coen Engelbarts, Vim 6.0ac)
|
||||
@@ -764,14 +764,14 @@ GNU_TOOLS.ZIP package downloadable from http://www.polarhome.com/vim/
|
||||
|
||||
9. VMS related changes *vms-changes*
|
||||
|
||||
Version 7.4
|
||||
- Undo: VMS can not handle more than one dot in the filenames use "dir/name" -> "dir/_un_name"
|
||||
Version 7.4
|
||||
- Undo: VMS can not handle more than one dot in the filenames use "dir/name" -> "dir/_un_name"
|
||||
add _un_ at the beginning to keep the extension
|
||||
- correct swap file name wildcard handling
|
||||
- handle iconv usage correctly
|
||||
- do not optimize on vax - otherwise it hangs compiling crypto files
|
||||
- fileio.c fix the comment
|
||||
- correct RealWaitForChar
|
||||
- correct RealWaitForChar
|
||||
- after 7.4-119 use different functions lib$cvtf_to_internal_time because Alpha and VAX have
|
||||
G_FLOAT but IA64 uses IEEE float otherwise Vim crashes
|
||||
- guard against crashes that are caused by mixed filenames
|
||||
|
||||
@@ -135,7 +135,7 @@ you will need to get a version older than that.
|
||||
6. Running under Windows 3.1 *win32-win3.1*
|
||||
|
||||
*win32s* *windows-3.1* *gui-w32s*
|
||||
There was a special version of Gvim that runs under Windows 3.1 and 3.11.
|
||||
There was a special version of gvim that runs under Windows 3.1 and 3.11.
|
||||
Support was removed in patch 7.4.1363.
|
||||
|
||||
==============================================================================
|
||||
|
||||
@@ -9,7 +9,7 @@ Copyright: (c) 2004-2012 by Charles E. Campbell *glvs-copyright*
|
||||
The VIM LICENSE (see |copyright|) applies to the files in this
|
||||
package, including getscriptPlugin.vim, getscript.vim,
|
||||
GetLatestVimScripts.dist, and pi_getscript.txt, except use "getscript"
|
||||
instead of "VIM". Like anything else that's free, getscript and its
|
||||
instead of "Vim". Like anything else that's free, getscript and its
|
||||
associated files are provided *as is* and comes with no warranty of
|
||||
any kind, either expressed or implied. No guarantees of
|
||||
merchantability. No guarantees of suitability for any purpose. By
|
||||
@@ -68,7 +68,7 @@ Your computer needs to have wget or curl for GetLatestVimScripts to do its work.
|
||||
mv GetLatestVimScripts.dist GetLatestVimScripts.dat
|
||||
(edit GetLatestVimScripts.dat to install your own personal
|
||||
list of desired plugins -- see |GetLatestVimScripts_dat|)
|
||||
|
||||
|
||||
3. Windows:
|
||||
vim getscript.vba
|
||||
:so %
|
||||
|
||||
@@ -99,25 +99,25 @@ If the option is empty, then vim will use the system default printer for
|
||||
HPUX: hp-roman8,
|
||||
EBCDIC: ebcdic-uk)
|
||||
global
|
||||
Sets the character encoding used when printing. This option tells VIM which
|
||||
Sets the character encoding used when printing. This option tells Vim which
|
||||
print character encoding file from the "print" directory in 'runtimepath' to
|
||||
use.
|
||||
|
||||
This option will accept any value from |encoding-names|. Any recognized names
|
||||
are converted to VIM standard names - see 'encoding' for more details. Names
|
||||
not recognized by VIM will just be converted to lower case and underscores
|
||||
are converted to Vim standard names - see 'encoding' for more details. Names
|
||||
not recognized by Vim will just be converted to lower case and underscores
|
||||
replaced with '-' signs.
|
||||
|
||||
If 'printencoding' is empty or VIM cannot find the file then it will use
|
||||
'encoding' (if VIM is compiled with |+multi_byte| and it is set an 8-bit
|
||||
encoding) to find the print character encoding file. If VIM is unable to find
|
||||
If 'printencoding' is empty or Vim cannot find the file then it will use
|
||||
'encoding' (if Vim is compiled with |+multi_byte| and it is set an 8-bit
|
||||
encoding) to find the print character encoding file. If Vim is unable to find
|
||||
a character encoding file then it will use the "latin1" print character
|
||||
encoding file.
|
||||
|
||||
When 'encoding' is set to a multi-byte encoding, VIM will try to convert
|
||||
When 'encoding' is set to a multi-byte encoding, Vim will try to convert
|
||||
characters to the printing encoding for printing (if 'printencoding' is empty
|
||||
then the conversion will be to latin1). Conversion to a printing encoding
|
||||
other than latin1 will require VIM to be compiled with the |+iconv| feature.
|
||||
other than latin1 will require Vim to be compiled with the |+iconv| feature.
|
||||
If no conversion is possible then printing will fail. Any characters that
|
||||
cannot be converted will be replaced with upside down question marks.
|
||||
|
||||
@@ -203,7 +203,7 @@ header is used when this option is empty.
|
||||
'printmbcharset' 'pmbcs' string (default "")
|
||||
global
|
||||
Sets the CJK character set to be used when generating CJK output from
|
||||
|:hardcopy|. The following predefined values are currently recognised by VIM:
|
||||
|:hardcopy|. The following predefined values are currently recognised by Vim:
|
||||
|
||||
Value Description ~
|
||||
Chinese GB_2312-80
|
||||
@@ -270,7 +270,7 @@ Japanese text you would do the following; >
|
||||
|
||||
If 'printmbcharset' is not one of the above values then it is assumed to
|
||||
specify a custom multi-byte character set and no check will be made that it is
|
||||
compatible with the value for 'printencoding'. VIM will look for a file
|
||||
compatible with the value for 'printencoding'. Vim will look for a file
|
||||
defining the character set in the "print" directory in 'runtimepath'.
|
||||
|
||||
*pmbfn-option*
|
||||
@@ -420,10 +420,10 @@ There are currently a number of limitations with PostScript printing:
|
||||
possible to get all the characters in an encoding to print by installing a
|
||||
new version of the Courier font family.
|
||||
|
||||
- Multi-byte support - Currently VIM will try to convert multi-byte characters
|
||||
- Multi-byte support - Currently Vim will try to convert multi-byte characters
|
||||
to the 8-bit encoding specified by 'printencoding' (or latin1 if it is
|
||||
empty). Any characters that are not successfully converted are shown as
|
||||
unknown characters. Printing will fail if VIM cannot convert the multi-byte
|
||||
unknown characters. Printing will fail if Vim cannot convert the multi-byte
|
||||
to the 8-bit encoding.
|
||||
|
||||
==============================================================================
|
||||
@@ -434,11 +434,11 @@ you need to define your own PostScript font encoding vector. Details on how
|
||||
to define a font encoding vector is beyond the scope of this help file, but
|
||||
you can find details in the PostScript Language Reference Manual, 3rd Edition,
|
||||
published by Addison-Wesley and available in PDF form at
|
||||
http://www.adobe.com/. The following describes what you need to do for VIM to
|
||||
http://www.adobe.com/. The following describes what you need to do for Vim to
|
||||
locate and use your print character encoding.
|
||||
|
||||
i. Decide on a unique name for your encoding vector, one that does not clash
|
||||
with any of the recognized or standard encoding names that VIM uses (see
|
||||
with any of the recognized or standard encoding names that Vim uses (see
|
||||
|encoding-names| for a list), and that no one else is likely to use.
|
||||
ii. Copy $VIMRUNTIME/print/latin1.ps to the print subdirectory in your
|
||||
'runtimepath' and rename it with your unique name.
|
||||
@@ -446,23 +446,23 @@ iii. Edit your renamed copy of latin1.ps, replacing all occurrences of latin1
|
||||
with your unique name (don't forget the line starting %%Title:), and
|
||||
modify the array of glyph names to define your new encoding vector. The
|
||||
array must have exactly 256 entries or you will not be able to print!
|
||||
iv. Within VIM, set 'printencoding' to your unique encoding name and then
|
||||
print your file. VIM will now use your custom print character encoding.
|
||||
iv. Within Vim, set 'printencoding' to your unique encoding name and then
|
||||
print your file. Vim will now use your custom print character encoding.
|
||||
|
||||
VIM will report an error with the resource file if you change the order or
|
||||
Vim will report an error with the resource file if you change the order or
|
||||
content of the first 3 lines, other than the name of the encoding on the line
|
||||
starting %%Title: or the version number on the line starting %%Version:.
|
||||
|
||||
[Technical explanation for those that know PostScript - VIM looks for a file
|
||||
[Technical explanation for those that know PostScript - Vim looks for a file
|
||||
with the same name as the encoding it will use when printing. The file
|
||||
defines a new PostScript Encoding resource called /VIM-name, where name is the
|
||||
print character encoding VIM will use.]
|
||||
print character encoding Vim will use.]
|
||||
|
||||
==============================================================================
|
||||
5. PostScript CJK Printing *postscript-cjk-printing*
|
||||
*E673* *E674* *E675*
|
||||
|
||||
VIM supports printing of Chinese, Japanese, and Korean files. Setting up VIM
|
||||
Vim supports printing of Chinese, Japanese, and Korean files. Setting up Vim
|
||||
to correctly print CJK files requires setting up a few more options.
|
||||
|
||||
Each of these countries has many standard character sets and encodings which
|
||||
@@ -483,7 +483,7 @@ option allows you to specify different fonts to use when printing characters
|
||||
which are syntax highlighted with the font styles normal, italic, bold and
|
||||
bold-italic.
|
||||
|
||||
No CJK fonts are supplied with VIM. There are some free Korean, Japanese, and
|
||||
No CJK fonts are supplied with Vim. There are some free Korean, Japanese, and
|
||||
Traditional Chinese fonts available at:
|
||||
|
||||
http://examples.oreilly.com/cjkvinfo/adobe/samples/
|
||||
@@ -498,7 +498,7 @@ CJK fonts can be large containing several thousand glyphs, and it is not
|
||||
uncommon to find that they only contain a subset of a national standard. It
|
||||
is not unusual to find the fonts to not include characters for codes in the
|
||||
ASCII code range. If you find half-width Roman characters are not appearing
|
||||
in your printout then you should configure VIM to use the Courier font the
|
||||
in your printout then you should configure Vim to use the Courier font the
|
||||
half-width ASCII characters with 'printmbfont'. If your font does not include
|
||||
other characters then you will need to find another font that does.
|
||||
|
||||
@@ -506,7 +506,7 @@ Another issue with ASCII characters, is that the various national character
|
||||
sets specify a couple of different glyphs in the ASCII code range. If you
|
||||
print ASCII text using the national character set you may see some unexpected
|
||||
characters. If you want true ASCII code printing then you need to configure
|
||||
VIM to output ASCII characters for the ASCII code range with 'printmbfont'.
|
||||
Vim to output ASCII characters for the ASCII code range with 'printmbfont'.
|
||||
|
||||
It is possible to define your own multi-byte character set although this
|
||||
should not be attempted lightly. A discussion on the process if beyond the
|
||||
@@ -525,13 +525,13 @@ print job completing.
|
||||
There are a number of possible causes as to why the printing may have failed:
|
||||
|
||||
- Wrong version of the prolog resource file. The prolog resource file
|
||||
contains some PostScript that VIM needs to be able to print. Each version
|
||||
of VIM needs one particular version. Make sure you have correctly installed
|
||||
contains some PostScript that Vim needs to be able to print. Each version
|
||||
of Vim needs one particular version. Make sure you have correctly installed
|
||||
the runtime files, and don't have any old versions of a file called prolog
|
||||
in the print directory in your 'runtimepath' directory.
|
||||
|
||||
- Paper size. Some PostScript printers will abort printing a file if they do
|
||||
not support the requested paper size. By default VIM uses A4 paper. Find
|
||||
not support the requested paper size. By default Vim uses A4 paper. Find
|
||||
out what size paper your printer normally uses and set the appropriate paper
|
||||
size with 'printoptions'. If you cannot find the name of the paper used,
|
||||
measure a sheet and compare it with the table of supported paper sizes listed
|
||||
@@ -668,7 +668,7 @@ complex print document creation.
|
||||
|
||||
N-UP PRINTING
|
||||
|
||||
The psnup utility takes an existing PostScript file generated from VIM and
|
||||
The psnup utility takes an existing PostScript file generated from Vim and
|
||||
convert it to an n-up version. The simplest way to create a 2-up printout is
|
||||
to first create a PostScript file with: >
|
||||
|
||||
@@ -724,16 +724,16 @@ There are a couple of points to bear in mind:
|
||||
==============================================================================
|
||||
8. Formfeed Characters *printing-formfeed*
|
||||
|
||||
By default VIM does not do any special processing of |formfeed| control
|
||||
characters. Setting the 'printoptions' formfeed item will make VIM recognize
|
||||
By default Vim does not do any special processing of |formfeed| control
|
||||
characters. Setting the 'printoptions' formfeed item will make Vim recognize
|
||||
formfeed characters and continue printing the current line at the beginning
|
||||
of the first line on a new page. The use of formfeed characters provides
|
||||
rudimentary print control but there are certain things to be aware of.
|
||||
|
||||
VIM will always start printing a line (including a line number if enabled)
|
||||
Vim will always start printing a line (including a line number if enabled)
|
||||
containing a formfeed character, even if it is the first character on the
|
||||
line. This means if a line starting with a formfeed character is the first
|
||||
line of a page then VIM will print a blank page.
|
||||
line of a page then Vim will print a blank page.
|
||||
|
||||
Since the line number is printed at the start of printing the line containing
|
||||
the formfeed character, the remainder of the line printed on the new page
|
||||
@@ -742,7 +742,7 @@ lines of a long line when wrap in 'printoptions' is enabled).
|
||||
|
||||
If the formfeed character is the last character on a line, then printing will
|
||||
continue on the second line of the new page, not the first. This is due to
|
||||
VIM processing the end of the line after the formfeed character and moving
|
||||
Vim processing the end of the line after the formfeed character and moving
|
||||
down a line to continue printing.
|
||||
|
||||
Due to the points made above it is recommended that when formfeed character
|
||||
|
||||
@@ -63,53 +63,53 @@ versions of 'emacs' in the late 1970's and was relieved by finding 'vi' in the
|
||||
first UNIX I came across in 1983). In my opinion, it's about time 'VIM'
|
||||
replace 'emacs' as the standard for top editors. (Bo Thide', Sweden)
|
||||
|
||||
I love and use VIM heavily too. (Larry Wall)
|
||||
I love and use Vim heavily too. (Larry Wall)
|
||||
|
||||
Vi is like a Ferrari, if you're a beginner, it handles like a bitch, but once
|
||||
you get the hang of it, it's small, powerful and FAST! (Unknown)
|
||||
VIM is like a new model Ferrari, and sounds like one too - "VIIIIIIMMM!"
|
||||
Vim is like a new model Ferrari, and sounds like one too - "VIIIIIIMMM!"
|
||||
(Stephen Riehm, Germany)
|
||||
|
||||
Schon bei Nutzung eines Bruchteils der VIM-Funktionen wird der Benutzer recht
|
||||
Schon bei Nutzung eines Bruchteils der Vim-Funktionen wird der Benutzer recht
|
||||
schnell die Vorzuege dieses Editors kennen- und schaetzenlernen.
|
||||
Translated: Even when only using a fraction of VIM-functions, the user will
|
||||
Translated: Even when only using a fraction of Vim-functions, the user will
|
||||
quickly get used to and appreciate the advantages of this editor. (Garry
|
||||
Glendown, conclusion of an article on VIM in iX magazine 9/1998)
|
||||
Glendown, conclusion of an article on Vim in iX magazine 9/1998)
|
||||
|
||||
I've recently acquired the O'Reilly book on VI (it also discusses VIM
|
||||
I've recently acquired the O'Reilly book on Vi (it also discusses Vim
|
||||
in-depth), and I'm amazed at just how powerful this application is. (Jeffrey
|
||||
Rankin)
|
||||
|
||||
This guide was written using the Windows 9.x distribution of GVIM, which is
|
||||
This guide was written using the Windows 9.x distribution of gvim, which is
|
||||
quite possibly the greatest thing to come along since God created the naked
|
||||
girl. (Michael DiBernardo)
|
||||
|
||||
Boy, I thought I knew almost everything about VIM, but every time I browse the
|
||||
online documentation, I hit upon a minor but cool aspect of a VIM feature that
|
||||
Boy, I thought I knew almost everything about Vim, but every time I browse the
|
||||
online documentation, I hit upon a minor but cool aspect of a Vim feature that
|
||||
I didn't know before! I must say the documentation is one the finest I've
|
||||
ever seen in a product -- even better than most commercial products.
|
||||
(Gautam Mudunuri)
|
||||
|
||||
VIM 4.5 is really a fantastic editor. It has sooooo many features and more
|
||||
Vim 4.5 is really a fantastic editor. It has sooooo many features and more
|
||||
importantly, the defaults are so well thought out that you really don't have
|
||||
to change anything!! Words cannot express my amazement and gratitude to the
|
||||
creators of VIM. Keep it up. (Vikas, USA)
|
||||
creators of Vim. Keep it up. (Vikas, USA)
|
||||
|
||||
I wonder how long it will be before people will refer to other Vi editors as
|
||||
VIM clones? (Darren Hiebert)
|
||||
Vim clones? (Darren Hiebert)
|
||||
|
||||
I read about [auto-positioning-in-file-based-on-the-errors-from-make] in one
|
||||
of those "Perfect Programmer's Editor" threads and was delighted to discover
|
||||
that VIM already supports it. (Brendan Macmillan, Australia)
|
||||
that Vim already supports it. (Brendan Macmillan, Australia)
|
||||
|
||||
I just discovered VIM (5.0) and I'm telling everyone I know about it!
|
||||
I tell them VIM stands for VI for the new (M)illenium. Thanks so much!
|
||||
I just discovered Vim (5.0) and I'm telling everyone I know about it!
|
||||
I tell them Vim stands for Vi for the new (M)illenium. Thanks so much!
|
||||
(Matt F. Valentine)
|
||||
|
||||
I think from now on "vi" should be called "Vim Imitation", not the other way
|
||||
around. (Rungun Ramanathan)
|
||||
|
||||
The Law of VIM:
|
||||
The Law of Vim:
|
||||
For each member b of the possible behaviour space B of program P, there exists
|
||||
a finite time t before which at least one user u in the total user space U of
|
||||
program P will request b becomes a member of the allowed behaviour space B'
|
||||
@@ -118,42 +118,42 @@ In other words: Sooner or later everyone wants everything as an option.
|
||||
(Negri)
|
||||
|
||||
Whenever I move to a new computing platform, the first thing I do is to port
|
||||
VIM. Lately, I am simply stunned by its ease of compilation using the
|
||||
Vim. Lately, I am simply stunned by its ease of compilation using the
|
||||
configure facility. (A.M. Sabuncu, Turkey)
|
||||
|
||||
The options are really excellent and very powerful. (Anish Maharaj)
|
||||
|
||||
The Spring user-interface designs are in, and word from the boutiques is that
|
||||
80x24 text-only mode is back with a *vengeance! Vi editor clone VIM burst onto
|
||||
80x24 text-only mode is back with a *vengeance! Vi editor clone Vim burst onto
|
||||
March desk-tops with a dazzling show of pastel syntax highlights for its 5.0
|
||||
look. Strident and customizable, VIM raises eyebrows with its interpretation
|
||||
look. Strident and customizable, Vim raises eyebrows with its interpretation
|
||||
of the classic Vi single-key macro collection.
|
||||
http://www.ntk.net/index.cgi?back=archive98/now0327.txt&line=179#l
|
||||
|
||||
I just wanted to take this opportunity to let you know that VIM 5 ROCKS!
|
||||
I just wanted to take this opportunity to let you know that Vim 5 ROCKS!
|
||||
Syntax highlighting: how did I survive without it?! Thank you for creating
|
||||
mankind's best editor! (Mun Johl, USA)
|
||||
|
||||
Thanks again for VIM. I use it every day on Linux. (Eric Foster-Johnson,
|
||||
Thanks again for Vim. I use it every day on Linux. (Eric Foster-Johnson,
|
||||
author of the book "UNIX Programming Tools")
|
||||
|
||||
The BEST EDITOR EVER (Stuart Woolford)
|
||||
|
||||
I have used most of VIM's fancy features at least once, many frequently, and I
|
||||
I have used most of Vim's fancy features at least once, many frequently, and I
|
||||
can honestly say that I couldn't live with anything less anymore. My
|
||||
productivity has easily doubled compared to what it was when I used vi.
|
||||
(Sitaram Chamarty)
|
||||
|
||||
I luv VIM. It is incredible. I'm naming my first-born Vimberly. (Jose
|
||||
I luv Vim. It is incredible. I'm naming my first-born Vimberly. (Jose
|
||||
Unpingco, USA)
|
||||
|
||||
Hint: "VIM" is "vi improved" - much better! (Sven Guckes, Germany)
|
||||
Hint: "Vim" is "vi improved" - much better! (Sven Guckes, Germany)
|
||||
|
||||
I use VIM every day. I spend more time in VIM than in any other program...
|
||||
I use Vim every day. I spend more time in Vim than in any other program...
|
||||
It's the best vi clone there is. I think it's great. (Craig Sanders,
|
||||
Australia)
|
||||
|
||||
I strongly advise using VIM--its infinite undo/redo saved me much grief.
|
||||
I strongly advise using Vim--its infinite undo/redo saved me much grief.
|
||||
(Terry Brown)
|
||||
|
||||
Thanks very much for writing what in my opinion is the finest text editor on
|
||||
@@ -163,98 +163,98 @@ the planet. If I were to get another cat, I would name it "Vim".
|
||||
I typed :set all and the screen FILLED up with options. A whole screen of
|
||||
things to be set and unset. I saw some of my old friends like wrapmargin,
|
||||
modelines and showmode, but the screen was FILLED with new friends! I love
|
||||
them all! I love VIM! I'm so happy that I've found this editor! I feel
|
||||
them all! I love Vim! I'm so happy that I've found this editor! I feel
|
||||
like how I once felt when I started using vi after a couple of years of using
|
||||
ed. I never thought I'd forsake my beloved ed, but vi ... oh god, vi was
|
||||
great. And now, VIM. (Peter Jay Salzman, USA)
|
||||
great. And now, Vim. (Peter Jay Salzman, USA)
|
||||
|
||||
I am really happy with such a wonderful software package. Much better than
|
||||
almost any expensive, off the shelf program. (Jeff Walker)
|
||||
|
||||
Whenever I reread the VIM documentation I'm overcome with excitement at the
|
||||
Whenever I reread the Vim documentation I'm overcome with excitement at the
|
||||
power of the editor. (William Edward Webber, Australia)
|
||||
|
||||
Hurrah for VIM!! It is "at your fingertips" like vi, and has the extensions
|
||||
Hurrah for Vim!! It is "at your fingertips" like vi, and has the extensions
|
||||
that vi sorely needs: highlighting for executing commands on blocks, an easily
|
||||
navigable and digestible help screen, and more. (Paul Pax)
|
||||
|
||||
The reason WHY I don't have this amazingly useful macro anymore, is that I
|
||||
now use VIM - and this is built in!! (Stephen Riehm, Germany)
|
||||
now use Vim - and this is built in!! (Stephen Riehm, Germany)
|
||||
|
||||
I am a user of VIM and I love it. I use it to do all my programming, C,
|
||||
I am a user of Vim and I love it. I use it to do all my programming, C,
|
||||
C++, HTML what ever. (Tim Allwine)
|
||||
|
||||
I discovered VIM after years of struggling with the original vi, and I just
|
||||
I discovered Vim after years of struggling with the original vi, and I just
|
||||
can't live without it anymore. (Emmanuel Mogenet, USA)
|
||||
|
||||
Emacs has not a bit of chance to survive so long as VIM is around. Besides,
|
||||
Emacs has not a bit of chance to survive so long as Vim is around. Besides,
|
||||
it also has the most detailed software documentation I have ever seen---much
|
||||
better than most commercial software! (Leiming Qian)
|
||||
|
||||
This version of VIM will just blow people apart when they discover just how
|
||||
This version of Vim will just blow people apart when they discover just how
|
||||
fantastic it is! (Tony Nugent, Australia)
|
||||
|
||||
I took your advice & finally got VIM & I'm really impressed. Instant convert.
|
||||
I took your advice & finally got Vim & I'm really impressed. Instant convert.
|
||||
(Patrick Killelea, USA)
|
||||
|
||||
VIM is by far my favorite piece of shareware and I have been particularly
|
||||
Vim is by far my favorite piece of shareware and I have been particularly
|
||||
pleased with version 3.0. This is really a solid piece of work. (Robert
|
||||
Colon, USA)
|
||||
|
||||
VIM is a joy to use, it is so well thought and practical that I wonder why
|
||||
anybody would use visual development tools. VIM is powerful and elegant, it
|
||||
Vim is a joy to use, it is so well thought and practical that I wonder why
|
||||
anybody would use visual development tools. Vim is powerful and elegant, it
|
||||
looks deceptively simple but is almost as complex as a 747 (especially when I
|
||||
look at my growing .vimrc), keep up that wonderful job, VIM is a centerpiece
|
||||
look at my growing .vimrc), keep up that wonderful job, Vim is a centerpiece
|
||||
of the free software world. (Louis-David Mitterand, USA)
|
||||
|
||||
I cannot believe how great it is to use VIM. I think the guys at work are
|
||||
I cannot believe how great it is to use Vim. I think the guys at work are
|
||||
getting tired of hearing me bragging about it. Others eyes are lighting up.
|
||||
(Rick Croote)
|
||||
|
||||
Emacs takes way too much time to start up and run, it is too big and bulky for
|
||||
effective use and the interface is more confusing than it is of any help. VIM
|
||||
effective use and the interface is more confusing than it is of any help. Vim
|
||||
however is short, it is fast, it is powerful, it has a good interface and it
|
||||
is all purpose. (Paal Ditlefsen Ekran)
|
||||
|
||||
From the first time I got VIM3.0, I was very enthusiastic. It has almost no
|
||||
From the first time I got Vim3.0, I was very enthusiastic. It has almost no
|
||||
problems. The swapfile handling and the backup possibilities are robust, also
|
||||
the protection against editing one file twice. It is very compatible to the
|
||||
real VI (and that is a MUST, because my brain is trained over years in using
|
||||
it). (Gert van Antwerpen, Holland)
|
||||
|
||||
Visual mode in VIM is a very powerful thing! (Tony Nugent, Australia)
|
||||
Visual mode in Vim is a very powerful thing! (Tony Nugent, Australia)
|
||||
|
||||
I have to say that VIM is =THE= single greatest piece of source code to ever
|
||||
I have to say that Vim is =THE= single greatest piece of source code to ever
|
||||
come across the net (Jim Battle, USA).
|
||||
|
||||
In fact, if you do want to get a new vi I'd suggest VIM-3.0. This is, by
|
||||
In fact, if you do want to get a new vi I'd suggest Vim-3.0. This is, by
|
||||
far, the best version of vi I've ever seen (Albert W. Schueller).
|
||||
|
||||
I should mention that VIM is a very good editor and can compete with anything
|
||||
I should mention that Vim is a very good editor and can compete with anything
|
||||
(Ilya Beloozerov).
|
||||
|
||||
To tell the truth sometimes I used elvis, vile, xvi, calvin, etc. And this is
|
||||
the reason that I can state that VIM is the best! (Ferenc Deak, Hungary)
|
||||
the reason that I can state that Vim is the best! (Ferenc Deak, Hungary)
|
||||
|
||||
VIM is by far the best editor that I have used in a long time, and I have
|
||||
Vim is by far the best editor that I have used in a long time, and I have
|
||||
looked at just about every thing that is available for every platform that I
|
||||
use. VIM is the best on all of them. (Guy L. Oliver)
|
||||
use. Vim is the best on all of them. (Guy L. Oliver)
|
||||
|
||||
VIM is the greatest editor since the stone chisel. (Jose Unpingco, USA)
|
||||
Vim is the greatest editor since the stone chisel. (Jose Unpingco, USA)
|
||||
|
||||
I would like to say that with VIM I am finally making the 'emacs to vi'
|
||||
I would like to say that with Vim I am finally making the 'emacs to vi'
|
||||
transition - as an Editor it is so much better in many ways: keyboard layout,
|
||||
memory usage, text alteration to name 3. (Mark Adam)
|
||||
|
||||
In fact, now if I want to know what a particular setting does in vi, I fire up
|
||||
VIM and check out its help! (Nikhil Patel, USA)
|
||||
Vim and check out its help! (Nikhil Patel, USA)
|
||||
|
||||
As a vi user, VIM has made working with text a far more pleasant task than
|
||||
As a vi user, Vim has made working with text a far more pleasant task than
|
||||
before I encountered this program. (Steinar Knutsen, Norway)
|
||||
|
||||
I use VIM since version 3.0. Since that time, it is the ONLY editor I use,
|
||||
with Solaris, Linux and OS/2 Warp. I suggest all my friends to use VIM, they
|
||||
try, and they continue using it. VIM is really the best software I have ever
|
||||
I use Vim since version 3.0. Since that time, it is the ONLY editor I use,
|
||||
with Solaris, Linux and OS/2 Warp. I suggest all my friends to use Vim, they
|
||||
try, and they continue using it. Vim is really the best software I have ever
|
||||
downloaded from the Internet, and the best editor I know of. (Marco
|
||||
Eccettuato, Italy)
|
||||
|
||||
|
||||
@@ -478,7 +478,7 @@ Vim uses a binary file format for spelling. This greatly speeds up loading
|
||||
the word list and keeps it small.
|
||||
*.aff* *.dic* *Myspell*
|
||||
You can create a Vim spell file from the .aff and .dic files that Myspell
|
||||
uses. Myspell is used by OpenOffice.org and Mozilla. The OpenOffice .oxt
|
||||
uses. Myspell is used by OpenOffice.org and Mozilla. The OpenOffice .oxt
|
||||
files are zip files which contain the .aff and .dic files. You should be able
|
||||
to find them here:
|
||||
http://extensions.services.openoffice.org/dictionary
|
||||
@@ -1614,7 +1614,7 @@ COMPOUNDSYLLABLE (Hunspell) *spell-COMPOUNDSYLLABLE*
|
||||
KEY (Hunspell) *spell-KEY*
|
||||
Define characters that are close together on the keyboard.
|
||||
Used to give better suggestions. Not supported.
|
||||
|
||||
|
||||
LANG (Hunspell) *spell-LANG*
|
||||
This specifies language-specific behavior. This actually
|
||||
moves part of the language knowledge into the program,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*syntax.txt* For Vim version 8.0. Last change: 2017 Feb 06
|
||||
*syntax.txt* For Vim version 8.0. Last change: 2017 Jun 04
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -4812,10 +4812,11 @@ ctermbg={color-nr} *highlight-ctermbg*
|
||||
Example: >
|
||||
:highlight Normal ctermfg=grey ctermbg=darkblue
|
||||
< When setting the "ctermbg" color for the Normal group, the
|
||||
'background' option will be adjusted automatically. This causes the
|
||||
highlight groups that depend on 'background' to change! This means
|
||||
you should set the colors for Normal first, before setting other
|
||||
colors.
|
||||
'background' option will be adjusted automatically, under the
|
||||
condition that the color is recognized and 'background' was not set
|
||||
explicitly. This causes the highlight groups that depend on
|
||||
'background' to change! This means you should set the colors for
|
||||
Normal first, before setting other colors.
|
||||
When a colorscheme is being used, changing 'background' causes it to
|
||||
be reloaded, which may reset all colors (including Normal). First
|
||||
delete the "g:colors_name" variable when you don't want this.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 8.0. Last change: 2017 May 27
|
||||
*todo.txt* For Vim version 8.0. Last change: 2017 Jun 05
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -112,30 +112,19 @@ Regexp problems:
|
||||
With foldmethod=syntax and nofoldenable comment highlighting isn't removed.
|
||||
(Marcin Szewczyk, 2017 Apr 26)
|
||||
|
||||
Patch for Murphy filetype detection. (Matthew Fernandez, 2017 May 17)
|
||||
|
||||
ZoomWin plugin ratings went down a lot. Bot problem? (Charles Campbell, 2017
|
||||
May 18)
|
||||
ml_get error when using a Python. (Yggdroot, 2017 Jun 1, #1737)
|
||||
|
||||
ml_get errors with buggy script. (Dominique, 2017 Apr 30)
|
||||
|
||||
Error in emsg with buggy script. (Dominique, 2017 Apr 30)
|
||||
|
||||
Patch to update 'runtimepath' earlier. (Ingo Karkat, 2017 May 5, #1680)
|
||||
|
||||
Patch to make float2nr() more accurate. (Hirohito Higashi, 2017 May 7, #1688)
|
||||
|
||||
Patch to make :hardcopy handle spaces correctly. (Christian Brabandt, 2017 May
|
||||
7, #1682)
|
||||
|
||||
Add options_default() / options_restore() to set several options to Vim
|
||||
defaults for a plugin. Comments from Zyx, 2017 May 10.
|
||||
Perhaps use a vimcontext / endvimcontext command block.
|
||||
|
||||
Patch to recognize 'bg' detection. (Lemonboy, 2017 May 18, #1710)
|
||||
|
||||
Patch to recognize 1.0 as a whole as a float. (Yasuhiro Matsumoto, 2017 May
|
||||
11)
|
||||
Using freed memory with "qf" FileType autocommand that does :cclose.
|
||||
(Lemonboy, 2017 May 28, #1730, fix in 1734, with test that doesn't fail, but
|
||||
it fails when run manually) Add "starting" to test_override()?
|
||||
|
||||
Problem with three-piece comment. (Michael Lee, 2017 May 11, #1696)
|
||||
|
||||
@@ -144,13 +133,6 @@ case of :bwipe followed by :new.
|
||||
|
||||
Files for Latvian language. (Vitolins, 2017 May 3, #1675)
|
||||
|
||||
Adding a filetype in a "start" package is not picked up as expected.
|
||||
(comment by Ingo Karkat, #1679)
|
||||
Patch for a fix, Ingo Karkat, #1693.
|
||||
|
||||
Patch to fix character class detection in NFA engine.
|
||||
(James McCoy, 2017 May 12, update May 24, #1703)
|
||||
|
||||
Setting 'clipboard' to "unnamed" makes a global command very slow (Daniel
|
||||
Drucker, 2017 May 8).
|
||||
This was supposed to be fixed, did it break again somehow?
|
||||
@@ -160,13 +142,17 @@ Better TeX indent file. (Christian Brabandt, 2017 May 3)
|
||||
|
||||
Openhab syntax file (mueller, #1678)
|
||||
|
||||
Followup patch for 8.0.0590 for "context" in locations. (Yegappan, 2017 May 4)
|
||||
|
||||
Use gvimext.dll from the nightly build? (Issue #249)
|
||||
|
||||
Patch to remove HAVE_GTK_MULTIHEAD-relevant code. (Kazunobu Kuriyama, 2017 May
|
||||
5) Update May 11
|
||||
|
||||
'synmaxcol' works with bytes instead of screen cells. (Llandon, 2017 May 31,
|
||||
#1736)
|
||||
|
||||
Patch to pass quickfix list index to functions. (Yegappan Lakshmanan, 2017 May
|
||||
31)
|
||||
|
||||
Problem with using :cd when remotely editing a file. (Gerd Wachsmuth, 2017 May
|
||||
8, #1690)
|
||||
|
||||
@@ -184,6 +170,8 @@ Bogus characters inserted when triggering indent while changing text.
|
||||
|
||||
Patch to have ":stag" respect 'switchbuf'. (Ingo Karkat, 2017 May 5, #1681)
|
||||
|
||||
Patch to improve building with MSVC. (Leonardo Manera, #1747)
|
||||
|
||||
Wrong selection of quoted text (Guraga, #1687)
|
||||
Patch to fix selection of quoted text. (Christian Brabandt, 2017 May 7, #1687)
|
||||
|
||||
@@ -199,8 +187,9 @@ Is it possible to keep the complete menu open when calling complete()?
|
||||
|
||||
Calling may_req_ambiguous_char_width() and may_req_bg_color() only after
|
||||
executing command line commands may not work properly.
|
||||
Set "starting" to 0 earlier, and move the may_req calls above exe_commands()?
|
||||
(Rastislav Barlink, 2017 May 18)
|
||||
Set "starting" to 0 earlier, and move the may_req calls above exe_commands()?
|
||||
No, that's a problem with using "-c quit", not running Vim interactive.
|
||||
|
||||
Memory leak in test97? The string is actually freed. Weird.
|
||||
|
||||
@@ -219,6 +208,9 @@ Even better: add a way to disable a mapping temporarily and re-enable it
|
||||
later. This is for a sub-mode that is active for a short while (one buffer).
|
||||
Still need maplist() to find the mappings. What can we use to identify a
|
||||
mapping? Something unique would be better than the LHS.
|
||||
Perhaps simpler: actually delete the mappings. Use maplist() to list matching
|
||||
mappings (with a lhs prefix, like maparg()), mapdelete() to delete,
|
||||
maprestore() to restore (using the output of maplist().
|
||||
|
||||
Patch to support chinese wordcount in utf-8. (Rain, 2017 May 24, #1722)
|
||||
Or not?
|
||||
@@ -232,6 +224,10 @@ Wrong memory access using p_fdm, found in patch to add tests for diff mode
|
||||
Patch to improve test coverage for diff mode. (Dominique Pelle, 2017 May 11,
|
||||
#1685)
|
||||
|
||||
Add an argument to :mkvimrc (or add aother command) to skip mappings from
|
||||
plugins (source is a Vim script). No need to put these in a .vimrc, they will
|
||||
be defined when the plugin is loaded.
|
||||
|
||||
Use tb_set(winid, [{'text': 'stop', 'cb': callback, 'hi': 'Green'}])
|
||||
tb_highlight(winid, 'ToolBar')
|
||||
tb_get(winid)
|
||||
@@ -265,6 +261,10 @@ Error in test_startup_utf8 on Solaris. (Danek Duvall, 2016 Aug 17)
|
||||
|
||||
Completion for :!cmd shows each match twice. #1435
|
||||
|
||||
Patch to change GUI behavior: instead of changing the window size change the
|
||||
lines/columns when menu/toolbar/etc. is added/removed. (Ychin, 2016 Mar 20,
|
||||
#703)
|
||||
|
||||
GTK: When adding a timer from 'balloonexpr' it won't fire, because
|
||||
g_main_context_iteration() doesn't return. Need to trigger an event when the
|
||||
timer expires.
|
||||
@@ -598,10 +598,6 @@ When command names are very long :command output is difficult to read. Use a
|
||||
maximum for the column width? (#871)
|
||||
Patcy by varmanishant, 2016 Jun 18, #876
|
||||
|
||||
Patch to change GUI behavior: instead of changing the window size change the
|
||||
lines/columns when menu/toolbar/etc. is added/removed. (Ychin, 2016 Mar 20,
|
||||
#703)
|
||||
|
||||
Installation of .desktop files does not work everywhere.
|
||||
It's now fixed, but the target directory probably isn't right.
|
||||
Add configure check?
|
||||
@@ -720,7 +716,8 @@ Value of virtcol() for '[ and '] depend on multi-byte character.
|
||||
(Luchr, #277)
|
||||
|
||||
Can we cache the syntax attributes, so that updates for 'relativenumber' and
|
||||
'cursorline'/'cursorcolumn' are a lot faster?
|
||||
'cursorline'/'cursorcolumn' are a lot faster? Thus store the attributes
|
||||
before combining them.
|
||||
|
||||
C highlighting: modern C allows: /* comment */ #ifdef
|
||||
and also line continuation after #include.
|
||||
|
||||
@@ -191,7 +191,7 @@ mouse button. The selected text will be inserted.
|
||||
The "current selection" will only remain valid until some other text is
|
||||
selected. After doing the paste in the other gVim, now select some characters
|
||||
in that window. You will notice that the words that were previously selected
|
||||
in the other gVim window are displayed differently. This means that it no
|
||||
in the other gvim window are displayed differently. This means that it no
|
||||
longer is the current selection.
|
||||
|
||||
You don't need to select text with the mouse, using the keyboard commands for
|
||||
@@ -215,7 +215,7 @@ USING BOTH
|
||||
|
||||
This use of both the "current selection" and the "real clipboard" might sound
|
||||
a bit confusing. But it is very useful. Let's show this with an example.
|
||||
Use one gVim with a text file and perform these actions:
|
||||
Use one gvim with a text file and perform these actions:
|
||||
|
||||
- Select two words in Visual mode.
|
||||
- Use the Edit/Copy menu to get these words onto the clipboard.
|
||||
|
||||
@@ -9250,7 +9250,7 @@ Files: runtime/doc/various.txt, src/ex_cmds.h, src/ex_docmd.c,
|
||||
src/proto/quickfix.pro, src/quickfix.c
|
||||
|
||||
Patch 6.1.424 (extra)
|
||||
Problem: Win32: Gvim compiled with VC++ 7.0 run on Windows 95 does not show
|
||||
Problem: Win32: gvim compiled with VC++ 7.0 run on Windows 95 does not show
|
||||
menu items.
|
||||
Solution: Define $WINVER to avoid an extra item is added to MENUITEMINFO.
|
||||
(Muraoka Taro)
|
||||
@@ -12319,7 +12319,7 @@ Solution: Don't ignore the WM_SYSKEYUP event when the menu is disabled.
|
||||
Files: src/gui_w32.c
|
||||
|
||||
Patch 6.2.362 (extra, after 6.2.347)
|
||||
Problem: Win32: The manifest causes Gvim not to work. (Dave Roberts)
|
||||
Problem: Win32: The manifest causes gvim not to work. (Dave Roberts)
|
||||
Solution: Change "x86" to "X86". (Serge Pirotte)
|
||||
Files: src/gvim.exe.mnf
|
||||
|
||||
|
||||
@@ -4151,7 +4151,7 @@ Patch 7.0.173
|
||||
Problem: ":call f().TT()" doesn't work. (Richard Emberson)
|
||||
Solution: When a function returns a Dictionary or another composite continue
|
||||
evaluating what follows.
|
||||
Files: src/eval.c
|
||||
Files: src/eval.c
|
||||
|
||||
Patch 7.0.174
|
||||
Problem: ":mksession" doesn't restore window layout correctly in tab pages
|
||||
@@ -4265,7 +4265,7 @@ Problem: When 'swapfile' is switched off in an empty file it is possible
|
||||
that not all blocks are loaded into memory, causing ml_get errors
|
||||
later.
|
||||
Solution: Rename "dont_release" to "mf_dont_release" and also use it to
|
||||
avoid using the cached line and locked block.
|
||||
avoid using the cached line and locked block.
|
||||
Files: src/globals.h, src/memfile.c, src/memline.c
|
||||
|
||||
Patch 7.0.193
|
||||
@@ -6031,7 +6031,7 @@ Solution: Add type casts. (Ben Schmidt)
|
||||
Files: src/version.c
|
||||
|
||||
Patch 7.1.207
|
||||
Problem: Netbeans: "remove" cannot delete one line.
|
||||
Problem: Netbeans: "remove" cannot delete one line.
|
||||
Solution: Remove partial lines and whole lines properly. Avoid a memory
|
||||
leak. (Xavier de Gaye)
|
||||
Files: src/netbeans.c
|
||||
@@ -7991,7 +7991,7 @@ Files: src/ex_cmds.c
|
||||
|
||||
Patch 7.2.097
|
||||
Problem: "!xterm&" doesn't work when 'shell' is "bash".
|
||||
Solution: Ignore SIGHUP after calling setsid(). (Simon Schubert)
|
||||
Solution: Ignore SIGHUP after calling setsid(). (Simon Schubert)
|
||||
Files: src/os_unix.c
|
||||
|
||||
Patch 7.2.098
|
||||
@@ -8740,7 +8740,7 @@ Files: src/gui_gtk_x11.c, src/message.c, src/ops.c, src/proto/ui.pro,
|
||||
src/ui.c
|
||||
|
||||
Patch 7.2.222
|
||||
Problem: ":mksession" doesn't work properly with 'acd' set.
|
||||
Problem: ":mksession" doesn't work properly with 'acd' set.
|
||||
Solution: Make it work. (Yakov Lerner)
|
||||
Files: src/ex_docmd.c
|
||||
|
||||
@@ -9150,7 +9150,7 @@ Solution: Add the missing "else". (Lech Lorens)
|
||||
Files: src/ops.c
|
||||
|
||||
Patch 7.2.293
|
||||
Problem: When setting 'comments' option it may be used in a wrong way.
|
||||
Problem: When setting 'comments' option it may be used in a wrong way.
|
||||
Solution: Don't increment after skipping over digits. (Yukihiro Nakadaira)
|
||||
Files: src/misc1.c
|
||||
|
||||
@@ -10191,32 +10191,32 @@ More information here: |two-engines|
|
||||
Better Python interface *better-python-interface*
|
||||
-----------------------
|
||||
|
||||
Added |python-bindeval| function. Unlike |python-eval| this one returns
|
||||
|python-Dictionary|, |python-List| and |python-Function| objects for
|
||||
dictionaries lists and functions respectively in place of their Python
|
||||
Added |python-bindeval| function. Unlike |python-eval| this one returns
|
||||
|python-Dictionary|, |python-List| and |python-Function| objects for
|
||||
dictionaries lists and functions respectively in place of their Python
|
||||
built-in equivalents (or None if we are talking about function references).
|
||||
For simple types this function returns Python built-in types and not only
|
||||
Python `str()` like |python-eval| does. On Python 3 it will return `bytes()`
|
||||
For simple types this function returns Python built-in types and not only
|
||||
Python `str()` like |python-eval| does. On Python 3 it will return `bytes()`
|
||||
objects in place of `str()` ones avoiding possibility of UnicodeDecodeError.
|
||||
Interface of new objects mimics standard Python `dict()` and `list()`
|
||||
interfaces to some extent. Extent will be improved in the future.
|
||||
|
||||
Added special |python-vars| objects also available for |python-buffer| and
|
||||
Added special |python-vars| objects also available for |python-buffer| and
|
||||
|python-window|. They ease access to Vim script variables from Python.
|
||||
|
||||
Now you no longer need to alter `sys.path` to import your module: special
|
||||
hooks are responsible for importing from {rtp}/python2, {rtp}/python3 and
|
||||
{rtp}/pythonx directories (for Python 2, Python 3 and both respectively).
|
||||
Now you no longer need to alter `sys.path` to import your module: special
|
||||
hooks are responsible for importing from {rtp}/python2, {rtp}/python3 and
|
||||
{rtp}/pythonx directories (for Python 2, Python 3 and both respectively).
|
||||
See |python-special-path|.
|
||||
|
||||
Added possibility to work with |tabpage|s through |python-tabpage| object.
|
||||
|
||||
Added automatic conversion of Vim errors and exceptions to Python
|
||||
Added automatic conversion of Vim errors and exceptions to Python
|
||||
exceptions.
|
||||
|
||||
Changed the behavior of the |python-buffers| object: it now uses buffer numbers
|
||||
as keys in place of the index of the buffer in the internal buffer list.
|
||||
This should not break anything as the only way to get this index was
|
||||
Changed the behavior of the |python-buffers| object: it now uses buffer numbers
|
||||
as keys in place of the index of the buffer in the internal buffer list.
|
||||
This should not break anything as the only way to get this index was
|
||||
iterating over |python-buffers|.
|
||||
|
||||
Added |:pydo| and |:py3do| commands.
|
||||
@@ -10226,7 +10226,7 @@ Added the |pyeval()| and |py3eval()| functions.
|
||||
Now in all places which previously accepted `str()` objects, `str()` and
|
||||
`unicode()` (Python 2) or `bytes()` and `str()` (Python 3) are accepted.
|
||||
|
||||
|python-window| has gained `.col` and `.row` attributes that are currently
|
||||
|python-window| has gained `.col` and `.row` attributes that are currently
|
||||
the only way to get internal window positions.
|
||||
|
||||
Added or fixed support for `dir()` in Vim Python objects.
|
||||
@@ -10235,12 +10235,12 @@ Added or fixed support for `dir()` in Vim Python objects.
|
||||
Changed *changed-7.4*
|
||||
-------
|
||||
|
||||
Old Python versions (≤2.2) are no longer supported. Building with them did
|
||||
Old Python versions (≤2.2) are no longer supported. Building with them did
|
||||
not work anyway.
|
||||
|
||||
Options:
|
||||
Added ability to automatically save the selection into the system
|
||||
clipboard when using non-GUI version of Vim (autoselectplus in
|
||||
Added ability to automatically save the selection into the system
|
||||
clipboard when using non-GUI version of Vim (autoselectplus in
|
||||
'clipboard'). Also added ability to use the system clipboard as
|
||||
default register (previously only primary selection could be used).
|
||||
(Ivan Krasilnikov, Christian Brabandt, Bram Moolenaar)
|
||||
@@ -10255,12 +10255,12 @@ Options:
|
||||
'relativenumber'. (Christian Brabandt)
|
||||
|
||||
Commands:
|
||||
|:diffoff| now saves the local values of some settings and restores
|
||||
them in place of blindly resetting them to the defaults. (Christian
|
||||
|:diffoff| now saves the local values of some settings and restores
|
||||
them in place of blindly resetting them to the defaults. (Christian
|
||||
Brabandt)
|
||||
|
||||
Other:
|
||||
Lua interface now also uses userdata binded to Vim structures. (Taro
|
||||
Lua interface now also uses userdata binded to Vim structures. (Taro
|
||||
Muraoka, Luis Carvalho)
|
||||
|
||||
glob() and autocommand patterns used to work with the undocumented
|
||||
@@ -10285,74 +10285,74 @@ Functions:
|
||||
|
||||
Added |wildmenumode()| function. (Christian Brabandt)
|
||||
|
||||
Debugging functions: |screenattr()|, |screenchar()|, |screencol()|,
|
||||
Debugging functions: |screenattr()|, |screenchar()|, |screencol()|,
|
||||
|screenrow()|. (Simon Ruderich, Bram Moolenaar)
|
||||
|
||||
Added ability to use |Dictionary-function|s for |sort()|ing, via
|
||||
Added ability to use |Dictionary-function|s for |sort()|ing, via
|
||||
optional third argument. (Nikolay Pavlov)
|
||||
|
||||
Added special |expand()| argument that expands to the current line
|
||||
Added special |expand()| argument that expands to the current line
|
||||
number.
|
||||
|
||||
Made it possible to force |char2nr()| to always give unicode codepoints
|
||||
Made it possible to force |char2nr()| to always give unicode codepoints
|
||||
regardless of current encoding. (Yasuhiro Matsumoto)
|
||||
|
||||
Made it possible for functions generating file list generate |List|
|
||||
and not NL-separated string. (e.g. |glob()|, |expand()|) (Christian
|
||||
Made it possible for functions generating file list generate |List|
|
||||
and not NL-separated string. (e.g. |glob()|, |expand()|) (Christian
|
||||
Brabandt)
|
||||
|
||||
Functions that obtain variables from the specific window, tabpage or
|
||||
buffer scope dictionary can now return specified default value in
|
||||
place of empty string in case variable is not found. (|gettabvar()|,
|
||||
Functions that obtain variables from the specific window, tabpage or
|
||||
buffer scope dictionary can now return specified default value in
|
||||
place of empty string in case variable is not found. (|gettabvar()|,
|
||||
|getwinvar()|, |getbufvar()|) (Shougo Matsushita, Hirohito Higashi)
|
||||
|
||||
Autocommands:
|
||||
Added |InsertCharPre| event launched before inserting character.
|
||||
Added |InsertCharPre| event launched before inserting character.
|
||||
(Jakson A. Aquino)
|
||||
|
||||
Added |CompleteDone| event launched after finishing completion in
|
||||
Added |CompleteDone| event launched after finishing completion in
|
||||
insert mode. (idea by Florian Klein)
|
||||
|
||||
Added |QuitPre| event launched when commands that can either close Vim
|
||||
Added |QuitPre| event launched when commands that can either close Vim
|
||||
or only some window(s) are launched.
|
||||
|
||||
Added |TextChanged| and |TextChangedI| events launched when text is
|
||||
Added |TextChanged| and |TextChangedI| events launched when text is
|
||||
changed.
|
||||
|
||||
Commands:
|
||||
|:syntime| command useful for debugging.
|
||||
|
||||
Made it possible to remove all signs from the current buffer using
|
||||
Made it possible to remove all signs from the current buffer using
|
||||
|:sign-unplace|. (Christian Brabandt)
|
||||
|
||||
Added |:language| autocompletion. (Dominique Pelle)
|
||||
|
||||
Added more |:command-complete| completion types: |:behave| suboptions,
|
||||
color schemes, compilers, |:cscope| suboptions, files from 'path',
|
||||
|:history| suboptions, locale names, |:syntime| suboptions, user
|
||||
Added more |:command-complete| completion types: |:behave| suboptions,
|
||||
color schemes, compilers, |:cscope| suboptions, files from 'path',
|
||||
|:history| suboptions, locale names, |:syntime| suboptions, user
|
||||
names. (Dominique Pelle)
|
||||
|
||||
Added |:map-nowait| creating mapping which when having lhs that is the
|
||||
prefix of another mapping’s lhs will not allow Vim to wait for user to
|
||||
type more characters to resolve ambiguity, forcing Vim to take the
|
||||
Added |:map-nowait| creating mapping which when having lhs that is the
|
||||
prefix of another mapping’s lhs will not allow Vim to wait for user to
|
||||
type more characters to resolve ambiguity, forcing Vim to take the
|
||||
shorter alternative: one with <nowait>.
|
||||
|
||||
Options:
|
||||
Made it possible to ignore case when completing: 'wildignorecase'.
|
||||
|
||||
Added ability to delete comment leader when using |J| by `j` flag in
|
||||
Added ability to delete comment leader when using |J| by `j` flag in
|
||||
'formatoptions' (|fo-table|). (Lech Lorens)
|
||||
|
||||
Added ability to control indentation inside namespaces: |cino-N|.
|
||||
Added ability to control indentation inside namespaces: |cino-N|.
|
||||
(Konstantin Lepa)
|
||||
|
||||
Added ability to control alignment inside `if` condition separately
|
||||
Added ability to control alignment inside `if` condition separately
|
||||
from alignment inside function arguments: |cino-k|. (Lech Lorens)
|
||||
|
||||
Other:
|
||||
Improved support for cmd.exe. (Ben Fritz, Bram Moolenaar)
|
||||
|
||||
Added |v:windowid| variable containing current window number in GUI
|
||||
Added |v:windowid| variable containing current window number in GUI
|
||||
Vim. (Christian J. Robinson, Lech Lorens)
|
||||
|
||||
Added rxvt-unicode and SGR mouse support. (Yiding Jia, Hayaki Saito)
|
||||
@@ -11923,7 +11923,7 @@ Solution: Pass the separator character to in_history(). (Taro Muraoka)
|
||||
Files: src/ex_getln.c
|
||||
|
||||
Patch 7.3.266
|
||||
Problem: In Gvim with iBus typing space in Insert mode doesn't work.
|
||||
Problem: In gvim with iBus typing space in Insert mode doesn't work.
|
||||
Solution: Clear xim_expected_char after checking it.
|
||||
Files: src/mbyte.c
|
||||
|
||||
@@ -11938,7 +11938,7 @@ Solution: Use O_NOCTTY both in the master and slave. (Bjorn Winckler)
|
||||
Files: src/os_unix.c
|
||||
|
||||
Patch 7.3.269
|
||||
Problem: 'shellcmdflag' only works with one flag.
|
||||
Problem: 'shellcmdflag' only works with one flag.
|
||||
Solution: Split into multiple arguments. (Gary Johnson)
|
||||
Files: src/os_unix.c
|
||||
|
||||
@@ -13118,7 +13118,7 @@ Files: src/ops.c
|
||||
Patch 7.3.477
|
||||
Problem: Using ":echo" to output enough lines to scroll, then using "j" and
|
||||
"k" at the more prompt, displays the command on top of the output.
|
||||
(Marcin Szamotulski)
|
||||
(Marcin Szamotulski)
|
||||
Solution: Put the output below the command. (Christian Brabandt)
|
||||
Files: src/eval.c
|
||||
|
||||
@@ -13371,7 +13371,7 @@ Solution: Recognize completefunction returning -3. (Matsushita Shougo)
|
||||
Files: src/edit.c
|
||||
|
||||
Patch 7.3.520
|
||||
Problem: Gvim starts up slow on Ubuntu 12.04.
|
||||
Problem: gvim starts up slow on Ubuntu 12.04.
|
||||
Solution: Move the call to gui_mch_init_check() to after fork(). (Yasuhiro
|
||||
Matsumoto) Do check $DISPLAY being set.
|
||||
Files: src/gui.c, src/gui_gtk_x11.c, src/proto/gui_gtk_x11.pro
|
||||
@@ -13424,7 +13424,7 @@ Solution: Make the count select that many characters or lines. (Christian
|
||||
Files: src/normal.c
|
||||
|
||||
Patch 7.3.530 (after 7.3.520)
|
||||
Problem: Gvim does not work when 'guioptions' includes "f". (Davido)
|
||||
Problem: gvim does not work when 'guioptions' includes "f". (Davido)
|
||||
Solution: Call gui_mch_init_check() when running GUI in the foreground.
|
||||
(Yasuhiro Matsumoto)
|
||||
Files: src/gui.c
|
||||
@@ -14287,7 +14287,7 @@ Files: Filelist
|
||||
Patch 7.3.682 (after 7.3.677)
|
||||
Problem: Compiler complains about incompatible types.
|
||||
Solution: Remove type casts. (hint by Danek Duvall)
|
||||
Files: src/edit.c
|
||||
Files: src/edit.c
|
||||
|
||||
Patch 7.3.683
|
||||
Problem: ":python" may crash when vimbindeval() returns None.
|
||||
@@ -16340,7 +16340,7 @@ Solution: Avoid negative argument to vim_strncpy(). (Narendran
|
||||
Files: src/if_cscope.c
|
||||
|
||||
Patch 7.3.1039
|
||||
Problem: New regexp engine does not support \%23c, \%<23c and the like.
|
||||
Problem: New regexp engine does not support \%23c, \%<23c and the like.
|
||||
Solution: Implement them. (partly by Yasuhiro Matsumoto)
|
||||
Files: src/regexp.h, src/regexp_nfa.c, src/testdir/test64.in,
|
||||
src/testdir/test64.ok
|
||||
@@ -17552,9 +17552,9 @@ Solution: Specify a separate viminfo file.
|
||||
Files: src/testdir/test61.in
|
||||
|
||||
Patch 7.3.1252
|
||||
Problem: Gvim does not find the toolbar bitmap files in ~/vimfiles/bitmaps
|
||||
Problem: gvim does not find the toolbar bitmap files in ~/vimfiles/bitmaps
|
||||
if the corresponding menu command contains additional characters
|
||||
like the shortcut marker '&' or if you use a non-english locale.
|
||||
like the shortcut marker '&' or if you use a non-english locale.
|
||||
Solution: Use menu->en_dname or menu->dname. (Martin Gieseking)
|
||||
Files: src/gui_w32.c
|
||||
|
||||
@@ -18175,7 +18175,7 @@ Files: src/window.c
|
||||
|
||||
Patch 7.4a.045
|
||||
Problem: Configure does not always find the right library for Lua. Missing
|
||||
support for LuaJit.
|
||||
support for LuaJit.
|
||||
Solution: Improve the configure detection of Lua. (Hiroshi Shirosaki)
|
||||
Files: src/Makefile, src/configure.in, src/auto/configure
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2017 May 27
|
||||
" Last Change: 2017 Jun 04
|
||||
|
||||
" Listen very carefully, I will say this only once
|
||||
if exists("did_load_filetypes")
|
||||
@@ -1181,14 +1181,21 @@ au BufNewFile,BufRead *.markdown,*.mdown,*.mkd,*.mkdn,*.mdwn,*.md setf markdown
|
||||
" Mason
|
||||
au BufNewFile,BufRead *.mason,*.mhtml,*.comp setf mason
|
||||
|
||||
" Matlab or Objective C
|
||||
" Mathematica, Matlab, Murphi or Objective C
|
||||
au BufNewFile,BufRead *.m call s:FTm()
|
||||
|
||||
func! s:FTm()
|
||||
let n = 1
|
||||
while n < 10
|
||||
let saw_comment = 0 " Whether we've seen a multiline comment leader.
|
||||
while n < 100
|
||||
let line = getline(n)
|
||||
if line =~ '^\s*\(#\s*\(include\|import\)\>\|@import\>\|/\*\|//\)'
|
||||
if line =~ '^\s*/\*'
|
||||
" /* ... */ is a comment in Objective C and Murphi, so we can't conclude
|
||||
" it's either of them yet, but track this as a hint in case we don't see
|
||||
" anything more definitive.
|
||||
let saw_comment = 1
|
||||
endif
|
||||
if line =~ '^\s*\(#\s*\(include\|import\)\>\|@import\>\|//\)'
|
||||
setf objc
|
||||
return
|
||||
endif
|
||||
@@ -1200,11 +1207,23 @@ func! s:FTm()
|
||||
setf mma
|
||||
return
|
||||
endif
|
||||
if line =~ '^\c\s*\(\(type\|var\)\>\|--\)'
|
||||
setf murphi
|
||||
return
|
||||
endif
|
||||
let n = n + 1
|
||||
endwhile
|
||||
if exists("g:filetype_m")
|
||||
|
||||
if saw_comment
|
||||
" We didn't see anything definitive, but this looks like either Objective C
|
||||
" or Murphi based on the comment leader. Assume the former as it is more
|
||||
" common.
|
||||
setf objc
|
||||
elseif exists("g:filetype_m")
|
||||
" Use user specified default filetype for .m
|
||||
exe "setf " . g:filetype_m
|
||||
else
|
||||
" Default is matlab
|
||||
setf matlab
|
||||
endif
|
||||
endfunc
|
||||
@@ -2777,12 +2796,12 @@ runtime! ftdetect/*.vim
|
||||
" state.
|
||||
augroup END
|
||||
|
||||
" Generic configuration file (check this last, it's just guessing!)
|
||||
" Generic configuration file. Use FALLBACK, it's just guessing!
|
||||
au filetypedetect BufNewFile,BufRead,StdinReadPost *
|
||||
\ if !did_filetype() && expand("<amatch>") !~ g:ft_ignore_pat
|
||||
\ && (getline(1) =~ '^#' || getline(2) =~ '^#' || getline(3) =~ '^#'
|
||||
\ || getline(4) =~ '^#' || getline(5) =~ '^#') |
|
||||
\ setf conf |
|
||||
\ setf FALLBACK conf |
|
||||
\ endif
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: C++
|
||||
" Current Maintainer: vim-jp (https://github.com/vim-jp/vim-cpp)
|
||||
" Previous Maintainer: Ken Shan <ccshan@post.harvard.edu>
|
||||
" Last Change: 2016 Oct 28
|
||||
" Last Change: 2017 Jun 05
|
||||
|
||||
" quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
@@ -48,7 +48,7 @@ endif
|
||||
if !exists("cpp_no_cpp14")
|
||||
syn case ignore
|
||||
syn match cppNumber display "\<0b[01]\('\=[01]\+\)*\(u\=l\{0,2}\|ll\=u\)\>"
|
||||
syn match cppNumber display "\<[1-9]\('\=\d\+\)*\(u\=l\{0,2}\|ll\=u\)\>"
|
||||
syn match cppNumber display "\<[1-9]\('\=\d\+\)*\(u\=l\{0,2}\|ll\=u\)\>" contains=cFloat
|
||||
syn match cppNumber display "\<0x\x\('\=\x\+\)*\(u\=l\{0,2}\|ll\=u\)\>"
|
||||
syn case match
|
||||
endif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: Haskell
|
||||
" Maintainer: Haskell Cafe mailinglist <haskell-cafe@haskell.org>
|
||||
" Last Change: 2008 Dec 15
|
||||
" Last Change: 2017 Jun 04
|
||||
" Original Author: John Williams <jrw@pobox.com>
|
||||
"
|
||||
" Thanks to Ryan Crumley for suggestions and John Meacham for
|
||||
@@ -62,7 +62,7 @@ syn match hsCharacter "^'\([^\\]\|\\[^']\+\|\\'\)'" contains=hsSpecialChar,hs
|
||||
syn match hsNumber "\<[0-9]\+\>\|\<0[xX][0-9a-fA-F]\+\>\|\<0[oO][0-7]\+\>"
|
||||
syn match hsFloat "\<[0-9]\+\.[0-9]\+\([eE][-+]\=[0-9]\+\)\=\>"
|
||||
|
||||
" Keyword definitions. These must be patters instead of keywords
|
||||
" Keyword definitions. These must be patterns instead of keywords
|
||||
" because otherwise they would match as keywords at the start of a
|
||||
" "literate" comment (see lhs.vim).
|
||||
syn match hsModule "\<module\>"
|
||||
|
||||
@@ -2087,7 +2087,7 @@ test1 \
|
||||
test30 test31 test32 test33 test34 test36 test37 test38 test39 \
|
||||
test40 test41 test42 test43 test44 test45 test48 test49 \
|
||||
test50 test51 test52 test53 test54 test55 test56 test57 test58 test59 \
|
||||
test60 test64 test65 test66 test67 test68 test69 \
|
||||
test60 test64 test66 test67 test68 test69 \
|
||||
test70 test72 test73 test74 test75 test77 test78 test79 \
|
||||
test80 test82 test83 test84 test85 test86 test87 test88 \
|
||||
test90 test91 test94 test95 test97 test98 test99 \
|
||||
@@ -2133,6 +2133,7 @@ test_arglist \
|
||||
test_feedkeys \
|
||||
test_file_perm \
|
||||
test_fileformat \
|
||||
test_filetype \
|
||||
test_filter_cmd \
|
||||
test_filter_map \
|
||||
test_findfile \
|
||||
|
||||
7
src/auto/configure
vendored
7
src/auto/configure
vendored
@@ -8997,11 +8997,6 @@ $as_echo "no" >&6; }
|
||||
fi
|
||||
fi
|
||||
if test "x$GUITYPE" = "xGTK"; then
|
||||
if test "$gtk_minor_version" = 1 -a "0$gtk_micro_version" -ge 1 \
|
||||
|| test "0$gtk_minor_version" -ge 2; then
|
||||
$as_echo "#define HAVE_GTK_MULTIHEAD 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
if test -z "$SKIP_GNOME"; then
|
||||
{
|
||||
|
||||
@@ -9294,8 +9289,6 @@ $as_echo "no" >&6; }
|
||||
SKIP_MOTIF=YES
|
||||
GUITYPE=GTK
|
||||
|
||||
$as_echo "#define HAVE_GTK_MULTIHEAD 1" >>confdefs.h
|
||||
|
||||
$as_echo "#define USE_GTK3 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
23
src/buffer.c
23
src/buffer.c
@@ -372,18 +372,23 @@ open_buffer(
|
||||
set_bufref(bufref_T *bufref, buf_T *buf)
|
||||
{
|
||||
bufref->br_buf = buf;
|
||||
bufref->br_fnum = buf->b_fnum;
|
||||
bufref->br_buf_free_count = buf_free_count;
|
||||
}
|
||||
|
||||
/*
|
||||
* Return TRUE if "bufref->br_buf" points to a valid buffer.
|
||||
* Return TRUE if "bufref->br_buf" points to the same buffer as when
|
||||
* set_bufref() was called and it is a valid buffer.
|
||||
* Only goes through the buffer list if buf_free_count changed.
|
||||
* Also checks if b_fnum is still the same, a :bwipe followed by :new might get
|
||||
* the same allocated memory, but it's a different buffer.
|
||||
*/
|
||||
int
|
||||
bufref_valid(bufref_T *bufref)
|
||||
{
|
||||
return bufref->br_buf_free_count == buf_free_count
|
||||
? TRUE : buf_valid(bufref->br_buf);
|
||||
? TRUE : buf_valid(bufref->br_buf)
|
||||
&& bufref->br_fnum == bufref->br_buf->b_fnum;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2261,14 +2266,14 @@ free_buf_options(
|
||||
}
|
||||
|
||||
/*
|
||||
* get alternate file n
|
||||
* set linenr to lnum or altfpos.lnum if lnum == 0
|
||||
* also set cursor column to altfpos.col if 'startofline' is not set.
|
||||
* Get alternate file "n".
|
||||
* Set linenr to "lnum" or altfpos.lnum if "lnum" == 0.
|
||||
* Also set cursor column to altfpos.col if 'startofline' is not set.
|
||||
* if (options & GETF_SETMARK) call setpcmark()
|
||||
* if (options & GETF_ALT) we are jumping to an alternate file.
|
||||
* if (options & GETF_SWITCH) respect 'switchbuf' settings when jumping
|
||||
*
|
||||
* return FAIL for failure, OK for success
|
||||
* Return FAIL for failure, OK for success.
|
||||
*/
|
||||
int
|
||||
buflist_getfile(
|
||||
@@ -2347,8 +2352,8 @@ buflist_getfile(
|
||||
#endif
|
||||
|
||||
++RedrawingDisabled;
|
||||
if (getfile(buf->b_fnum, NULL, NULL, (options & GETF_SETMARK),
|
||||
lnum, forceit) <= 0)
|
||||
if (GETFILE_SUCCESS(getfile(buf->b_fnum, NULL, NULL,
|
||||
(options & GETF_SETMARK), lnum, forceit)))
|
||||
{
|
||||
--RedrawingDisabled;
|
||||
|
||||
@@ -2999,7 +3004,7 @@ buflist_findlnum(buf_T *buf)
|
||||
|
||||
#if defined(FEAT_LISTCMDS) || defined(PROTO)
|
||||
/*
|
||||
* List all know file names (for :files and :buffers command).
|
||||
* List all known file names (for :files and :buffers command).
|
||||
*/
|
||||
void
|
||||
buflist_list(exarg_T *eap)
|
||||
|
||||
@@ -398,9 +398,6 @@
|
||||
/* Define if you use KDE and want KDE Toolbar support. */
|
||||
#undef FEAT_KDETOOLBAR
|
||||
|
||||
/* Define if GTK+ multihead support is available (requires GTK+ >= 2.1.1). */
|
||||
#undef HAVE_GTK_MULTIHEAD
|
||||
|
||||
/* Define if your X has own locale library */
|
||||
#undef X_LOCALE
|
||||
|
||||
|
||||
@@ -2606,10 +2606,6 @@ if test -z "$SKIP_GTK2"; then
|
||||
fi
|
||||
fi
|
||||
if test "x$GUITYPE" = "xGTK"; then
|
||||
if test "$gtk_minor_version" = 1 -a "0$gtk_micro_version" -ge 1 \
|
||||
|| test "0$gtk_minor_version" -ge 2; then
|
||||
AC_DEFINE(HAVE_GTK_MULTIHEAD)
|
||||
fi
|
||||
dnl
|
||||
dnl if GTK exists, then check for GNOME.
|
||||
dnl
|
||||
@@ -2658,7 +2654,6 @@ if test -z "$SKIP_GTK3"; then
|
||||
SKIP_MOTIF=YES
|
||||
GUITYPE=GTK
|
||||
AC_SUBST(GTK_LIBNAME)
|
||||
AC_DEFINE(HAVE_GTK_MULTIHEAD)
|
||||
AC_DEFINE(USE_GTK3)
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -3352,9 +3352,9 @@ f_float2nr(typval_T *argvars, typval_T *rettv)
|
||||
|
||||
if (get_float_arg(argvars, &f) == OK)
|
||||
{
|
||||
if (f < -VARNUM_MAX)
|
||||
if (f <= -VARNUM_MAX + DBL_EPSILON)
|
||||
rettv->vval.v_number = -VARNUM_MAX;
|
||||
else if (f > VARNUM_MAX)
|
||||
else if (f >= VARNUM_MAX - DBL_EPSILON)
|
||||
rettv->vval.v_number = VARNUM_MAX;
|
||||
else
|
||||
rettv->vval.v_number = (varnumber_T)f;
|
||||
|
||||
@@ -3520,11 +3520,14 @@ check_readonly(int *forceit, buf_T *buf)
|
||||
|
||||
/*
|
||||
* Try to abandon current file and edit a new or existing file.
|
||||
* 'fnum' is the number of the file, if zero use ffname/sfname.
|
||||
* "fnum" is the number of the file, if zero use ffname/sfname.
|
||||
* "lnum" is the line number for the cursor in the new file (if non-zero).
|
||||
*
|
||||
* Return 1 for "normal" error, 2 for "not written" error, 0 for success
|
||||
* -1 for successfully opening another file.
|
||||
* 'lnum' is the line number for the cursor in the new file (if non-zero).
|
||||
* Return:
|
||||
* GETFILE_ERROR for "normal" error,
|
||||
* GETFILE_NOT_WRITTEN for "not written" error,
|
||||
* GETFILE_SAME_FILE for success
|
||||
* GETFILE_OPEN_OTHER for successfully opening another file.
|
||||
*/
|
||||
int
|
||||
getfile(
|
||||
@@ -3540,10 +3543,10 @@ getfile(
|
||||
char_u *free_me = NULL;
|
||||
|
||||
if (text_locked())
|
||||
return 1;
|
||||
return GETFILE_ERROR;
|
||||
#ifdef FEAT_AUTOCMD
|
||||
if (curbuf_locked())
|
||||
return 1;
|
||||
return GETFILE_ERROR;
|
||||
#endif
|
||||
|
||||
if (fnum == 0)
|
||||
@@ -3570,7 +3573,7 @@ getfile(
|
||||
if (other)
|
||||
--no_wait_return;
|
||||
EMSG(_(e_nowrtmsg));
|
||||
retval = 2; /* file has been changed */
|
||||
retval = GETFILE_NOT_WRITTEN; /* file has been changed */
|
||||
goto theend;
|
||||
}
|
||||
}
|
||||
@@ -3584,14 +3587,14 @@ getfile(
|
||||
curwin->w_cursor.lnum = lnum;
|
||||
check_cursor_lnum();
|
||||
beginline(BL_SOL | BL_FIX);
|
||||
retval = 0; /* it's in the same file */
|
||||
retval = GETFILE_SAME_FILE; /* it's in the same file */
|
||||
}
|
||||
else if (do_ecmd(fnum, ffname, sfname, NULL, lnum,
|
||||
(P_HID(curbuf) ? ECMD_HIDE : 0) + (forceit ? ECMD_FORCEIT : 0),
|
||||
curwin) == OK)
|
||||
retval = -1; /* opened another file */
|
||||
retval = GETFILE_OPEN_OTHER; /* opened another file */
|
||||
else
|
||||
retval = 1; /* error encountered */
|
||||
retval = GETFILE_ERROR; /* error encountered */
|
||||
|
||||
theend:
|
||||
vim_free(free_me);
|
||||
|
||||
@@ -3633,27 +3633,41 @@ theend:
|
||||
vim_free(ffname);
|
||||
}
|
||||
|
||||
static int did_source_packages = FALSE;
|
||||
/*
|
||||
* Add all packages in the "start" directory to 'runtimepath'.
|
||||
*/
|
||||
void
|
||||
add_pack_start_dirs(void)
|
||||
{
|
||||
do_in_path(p_pp, (char_u *)"pack/*/start/*", DIP_ALL + DIP_DIR,
|
||||
add_pack_plugin, &APP_ADD_DIR);
|
||||
}
|
||||
|
||||
/*
|
||||
* Load plugins from all packages in the "start" directory.
|
||||
*/
|
||||
void
|
||||
load_start_packages(void)
|
||||
{
|
||||
did_source_packages = TRUE;
|
||||
do_in_path(p_pp, (char_u *)"pack/*/start/*", DIP_ALL + DIP_DIR,
|
||||
add_pack_plugin, &APP_LOAD);
|
||||
}
|
||||
|
||||
/*
|
||||
* ":packloadall"
|
||||
* Find plugins in the package directories and source them.
|
||||
* "eap" is NULL when invoked during startup.
|
||||
*/
|
||||
void
|
||||
ex_packloadall(exarg_T *eap)
|
||||
{
|
||||
if (!did_source_packages || (eap != NULL && eap->forceit))
|
||||
if (!did_source_packages || eap->forceit)
|
||||
{
|
||||
did_source_packages = TRUE;
|
||||
|
||||
/* First do a round to add all directories to 'runtimepath', then load
|
||||
* the plugins. This allows for plugins to use an autoload directory
|
||||
* of another plugin. */
|
||||
do_in_path(p_pp, (char_u *)"pack/*/start/*", DIP_ALL + DIP_DIR,
|
||||
add_pack_plugin, &APP_ADD_DIR);
|
||||
do_in_path(p_pp, (char_u *)"pack/*/start/*", DIP_ALL + DIP_DIR,
|
||||
add_pack_plugin, &APP_LOAD);
|
||||
add_pack_start_dirs();
|
||||
load_start_packages();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5042,6 +5042,7 @@ expand_filename(
|
||||
&& eap->cmdidx != CMD_lgrep
|
||||
&& eap->cmdidx != CMD_grepadd
|
||||
&& eap->cmdidx != CMD_lgrepadd
|
||||
&& eap->cmdidx != CMD_hardcopy
|
||||
#ifndef UNIX
|
||||
&& !(eap->argt & NOSPC)
|
||||
#endif
|
||||
@@ -12172,13 +12173,22 @@ ex_filetype(exarg_T *eap)
|
||||
}
|
||||
|
||||
/*
|
||||
* ":setfiletype {name}"
|
||||
* ":setfiletype [FALLBACK] {name}"
|
||||
*/
|
||||
static void
|
||||
ex_setfiletype(exarg_T *eap)
|
||||
{
|
||||
if (!did_filetype)
|
||||
set_option_value((char_u *)"filetype", 0L, eap->arg, OPT_LOCAL);
|
||||
{
|
||||
char_u *arg = eap->arg;
|
||||
|
||||
if (STRNCMP(arg, "FALLBACK ", 9) == 0)
|
||||
arg += 9;
|
||||
|
||||
set_option_value((char_u *)"filetype", 0L, arg, OPT_LOCAL);
|
||||
if (arg != eap->arg)
|
||||
did_filetype = FALSE;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -326,6 +326,8 @@ EXTERN int garbage_collect_at_exit INIT(= FALSE);
|
||||
EXTERN scid_T current_SID INIT(= 0);
|
||||
#endif
|
||||
|
||||
EXTERN int did_source_packages INIT(= FALSE);
|
||||
|
||||
/* Magic number used for hashitem "hi_key" value indicating a deleted item.
|
||||
* Only the address is used. */
|
||||
EXTERN char_u hash_removed;
|
||||
@@ -385,7 +387,7 @@ EXTERN int keep_filetype INIT(= FALSE); /* value for did_filetype when
|
||||
|
||||
/* When deleting the current buffer, another one must be loaded. If we know
|
||||
* which one is preferred, au_new_curbuf is set to it */
|
||||
EXTERN bufref_T au_new_curbuf INIT(= {NULL COMMA 0});
|
||||
EXTERN bufref_T au_new_curbuf INIT(= {NULL COMMA 0 COMMA 0});
|
||||
|
||||
/* When deleting a buffer/window and autocmd_busy is TRUE, do not free the
|
||||
* buffer/window. but link it in the list starting with
|
||||
|
||||
13
src/gui.c
13
src/gui.c
@@ -2849,6 +2849,10 @@ gui_insert_lines(int row, int count)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns OK if a character was found to be available within the given time,
|
||||
* or FAIL otherwise.
|
||||
*/
|
||||
static int
|
||||
gui_wait_for_chars_or_timer(long wtime)
|
||||
{
|
||||
@@ -2869,16 +2873,16 @@ gui_wait_for_chars_or_timer(long wtime)
|
||||
if (typebuf.tb_change_cnt != tb_change_cnt)
|
||||
{
|
||||
/* timer may have used feedkeys() */
|
||||
return FALSE;
|
||||
return FAIL;
|
||||
}
|
||||
if (due_time <= 0 || (wtime > 0 && due_time > remaining))
|
||||
due_time = remaining;
|
||||
if (gui_mch_wait_for_chars(due_time))
|
||||
return TRUE;
|
||||
return OK;
|
||||
if (wtime > 0)
|
||||
remaining -= due_time;
|
||||
}
|
||||
return FALSE;
|
||||
return FAIL;
|
||||
#else
|
||||
return gui_mch_wait_for_chars(wtime);
|
||||
#endif
|
||||
@@ -2896,6 +2900,7 @@ gui_wait_for_chars_or_timer(long wtime)
|
||||
gui_wait_for_chars(long wtime)
|
||||
{
|
||||
int retval;
|
||||
int tb_change_cnt = typebuf.tb_change_cnt;
|
||||
|
||||
#ifdef FEAT_MENU
|
||||
/*
|
||||
@@ -2953,7 +2958,7 @@ gui_wait_for_chars(long wtime)
|
||||
}
|
||||
#endif
|
||||
|
||||
if (retval == FAIL)
|
||||
if (retval == FAIL && typebuf.tb_change_cnt == tb_change_cnt)
|
||||
{
|
||||
/* Blocking wait. */
|
||||
before_blocking();
|
||||
|
||||
@@ -1177,8 +1177,7 @@ drawBalloon(BalloonEval *beval)
|
||||
int x_offset = EVAL_OFFSET_X;
|
||||
int y_offset = EVAL_OFFSET_Y;
|
||||
PangoLayout *layout;
|
||||
# ifdef HAVE_GTK_MULTIHEAD
|
||||
# if GTK_CHECK_VERSION(3,22,2)
|
||||
# if GTK_CHECK_VERSION(3,22,2)
|
||||
GdkRectangle rect;
|
||||
GdkMonitor * const mon = gdk_display_get_monitor_at_window(
|
||||
gtk_widget_get_display(beval->balloonShell),
|
||||
@@ -1187,17 +1186,13 @@ drawBalloon(BalloonEval *beval)
|
||||
|
||||
screen_w = rect.width;
|
||||
screen_h = rect.height;
|
||||
# else
|
||||
# else
|
||||
GdkScreen *screen;
|
||||
|
||||
screen = gtk_widget_get_screen(beval->target);
|
||||
gtk_window_set_screen(GTK_WINDOW(beval->balloonShell), screen);
|
||||
screen_w = gdk_screen_get_width(screen);
|
||||
screen_h = gdk_screen_get_height(screen);
|
||||
# endif
|
||||
# else
|
||||
screen_w = gdk_screen_width();
|
||||
screen_h = gdk_screen_height();
|
||||
# endif
|
||||
# if !GTK_CHECK_VERSION(3,0,0)
|
||||
gtk_widget_ensure_style(beval->balloonShell);
|
||||
|
||||
@@ -102,12 +102,8 @@ extern void bonobo_dock_item_set_behavior(BonoboDockItem *dock_item, BonoboDockI
|
||||
/*
|
||||
* Easy-to-use macro for multihead support.
|
||||
*/
|
||||
#ifdef HAVE_GTK_MULTIHEAD
|
||||
# define GET_X_ATOM(atom) gdk_x11_atom_to_xatom_for_display( \
|
||||
#define GET_X_ATOM(atom) gdk_x11_atom_to_xatom_for_display( \
|
||||
gtk_widget_get_display(gui.mainwin), atom)
|
||||
#else
|
||||
# define GET_X_ATOM(atom) ((Atom)(atom))
|
||||
#endif
|
||||
|
||||
/* Selection type distinguishers */
|
||||
enum
|
||||
@@ -2846,7 +2842,7 @@ mainwin_realize(GtkWidget *widget UNUSED, gpointer data UNUSED)
|
||||
/*
|
||||
* Cannot handle "XLib-only" windows with gtk event routines, we'll
|
||||
* have to change the "server" registration to that of the main window
|
||||
* If we have not registered a name yet, remember the window
|
||||
* If we have not registered a name yet, remember the window.
|
||||
*/
|
||||
# if GTK_CHECK_VERSION(3,0,0)
|
||||
serverChangeRegisteredWindow(GDK_WINDOW_XDISPLAY(mainwin_win),
|
||||
@@ -2884,16 +2880,14 @@ create_blank_pointer(void)
|
||||
char blank_data[] = { 0x0 };
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GTK_MULTIHEAD
|
||||
# if GTK_CHECK_VERSION(3,12,0)
|
||||
#if GTK_CHECK_VERSION(3,12,0)
|
||||
{
|
||||
GdkWindow * const win = gtk_widget_get_window(gui.mainwin);
|
||||
GdkScreen * const scrn = gdk_window_get_screen(win);
|
||||
root_window = gdk_screen_get_root_window(scrn);
|
||||
}
|
||||
# else
|
||||
#else
|
||||
root_window = gtk_widget_get_root_window(gui.mainwin);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Create a pseudo blank pointer, which is in fact one pixel by one pixel
|
||||
@@ -2932,7 +2926,6 @@ create_blank_pointer(void)
|
||||
return cursor;
|
||||
}
|
||||
|
||||
#ifdef HAVE_GTK_MULTIHEAD
|
||||
static void
|
||||
mainwin_screen_changed_cb(GtkWidget *widget,
|
||||
GdkScreen *previous_screen UNUSED,
|
||||
@@ -2945,22 +2938,22 @@ mainwin_screen_changed_cb(GtkWidget *widget,
|
||||
* Recreate the invisible mouse cursor.
|
||||
*/
|
||||
if (gui.blank_pointer != NULL)
|
||||
# if GTK_CHECK_VERSION(3,0,0)
|
||||
#if GTK_CHECK_VERSION(3,0,0)
|
||||
g_object_unref(G_OBJECT(gui.blank_pointer));
|
||||
# else
|
||||
#else
|
||||
gdk_cursor_unref(gui.blank_pointer);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
gui.blank_pointer = create_blank_pointer();
|
||||
|
||||
# if GTK_CHECK_VERSION(3,0,0)
|
||||
#if GTK_CHECK_VERSION(3,0,0)
|
||||
if (gui.pointer_hidden && gtk_widget_get_window(gui.drawarea) != NULL)
|
||||
gdk_window_set_cursor(gtk_widget_get_window(gui.drawarea),
|
||||
gui.blank_pointer);
|
||||
# else
|
||||
#else
|
||||
if (gui.pointer_hidden && gui.drawarea->window != NULL)
|
||||
gdk_window_set_cursor(gui.drawarea->window, gui.blank_pointer);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Create a new PangoContext for this screen, and initialize it
|
||||
@@ -2978,7 +2971,6 @@ mainwin_screen_changed_cb(GtkWidget *widget,
|
||||
gui_set_shellsize(FALSE, FALSE, RESIZE_BOTH);
|
||||
}
|
||||
}
|
||||
#endif /* HAVE_GTK_MULTIHEAD */
|
||||
|
||||
/*
|
||||
* After the drawing area comes up, we calculate all colors and create the
|
||||
@@ -3907,12 +3899,8 @@ gui_mch_init(void)
|
||||
GtkWidget *plug;
|
||||
|
||||
/* Use GtkSocket from another app. */
|
||||
#ifdef HAVE_GTK_MULTIHEAD
|
||||
plug = gtk_plug_new_for_display(gdk_display_get_default(),
|
||||
gtk_socket_id);
|
||||
#else
|
||||
plug = gtk_plug_new(gtk_socket_id);
|
||||
#endif
|
||||
#if GTK_CHECK_VERSION(3,0,0)
|
||||
if (plug != NULL && gtk_plug_get_socket_window(GTK_PLUG(plug)) != NULL)
|
||||
#else
|
||||
@@ -3972,10 +3960,10 @@ gui_mch_init(void)
|
||||
gtk_signal_connect(GTK_OBJECT(gui.mainwin), "realize",
|
||||
GTK_SIGNAL_FUNC(&mainwin_realize), NULL);
|
||||
#endif
|
||||
#ifdef HAVE_GTK_MULTIHEAD
|
||||
g_signal_connect(G_OBJECT(gui.mainwin), "screen_changed",
|
||||
|
||||
g_signal_connect(G_OBJECT(gui.mainwin), "screen-changed",
|
||||
G_CALLBACK(&mainwin_screen_changed_cb), NULL);
|
||||
#endif
|
||||
|
||||
gui.accel_group = gtk_accel_group_new();
|
||||
gtk_window_add_accel_group(GTK_WINDOW(gui.mainwin), gui.accel_group);
|
||||
|
||||
@@ -4992,8 +4980,7 @@ gui_mch_set_shellsize(int width, int height,
|
||||
void
|
||||
gui_mch_get_screen_dimensions(int *screen_w, int *screen_h)
|
||||
{
|
||||
#ifdef HAVE_GTK_MULTIHEAD
|
||||
# if GTK_CHECK_VERSION(3,22,2)
|
||||
#if GTK_CHECK_VERSION(3,22,2)
|
||||
GdkRectangle rect;
|
||||
GdkMonitor * const mon = gdk_display_get_monitor_at_window(
|
||||
gtk_widget_get_display(gui.mainwin),
|
||||
@@ -5001,8 +4988,10 @@ gui_mch_get_screen_dimensions(int *screen_w, int *screen_h)
|
||||
gdk_monitor_get_geometry(mon, &rect);
|
||||
|
||||
*screen_w = rect.width;
|
||||
/* Subtract 'guiheadroom' from the height to allow some room for the
|
||||
* window manager (task list and window title bar). */
|
||||
*screen_h = rect.height - p_ghr;
|
||||
# else
|
||||
#else
|
||||
GdkScreen* screen;
|
||||
|
||||
if (gui.mainwin != NULL && gtk_widget_has_screen(gui.mainwin))
|
||||
@@ -5011,13 +5000,9 @@ gui_mch_get_screen_dimensions(int *screen_w, int *screen_h)
|
||||
screen = gdk_screen_get_default();
|
||||
|
||||
*screen_w = gdk_screen_get_width(screen);
|
||||
*screen_h = gdk_screen_get_height(screen) - p_ghr;
|
||||
# endif
|
||||
#else
|
||||
*screen_w = gdk_screen_width();
|
||||
/* Subtract 'guiheadroom' from the height to allow some room for the
|
||||
* window manager (task list and window title bar). */
|
||||
*screen_h = gdk_screen_height() - p_ghr;
|
||||
*screen_h = gdk_screen_get_height(screen) - p_ghr;
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -6335,23 +6320,19 @@ gui_mch_get_display(void)
|
||||
void
|
||||
gui_mch_beep(void)
|
||||
{
|
||||
#ifdef HAVE_GTK_MULTIHEAD
|
||||
GdkDisplay *display;
|
||||
|
||||
# if GTK_CHECK_VERSION(3,0,0)
|
||||
#if GTK_CHECK_VERSION(3,0,0)
|
||||
if (gui.mainwin != NULL && gtk_widget_get_realized(gui.mainwin))
|
||||
# else
|
||||
#else
|
||||
if (gui.mainwin != NULL && GTK_WIDGET_REALIZED(gui.mainwin))
|
||||
# endif
|
||||
#endif
|
||||
display = gtk_widget_get_display(gui.mainwin);
|
||||
else
|
||||
display = gdk_display_get_default();
|
||||
|
||||
if (display != NULL)
|
||||
gdk_display_beep(display);
|
||||
#else
|
||||
gdk_beep();
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
@@ -6698,16 +6679,12 @@ theend:
|
||||
void
|
||||
gui_mch_flush(void)
|
||||
{
|
||||
#ifdef HAVE_GTK_MULTIHEAD
|
||||
# if GTK_CHECK_VERSION(3,0,0)
|
||||
#if GTK_CHECK_VERSION(3,0,0)
|
||||
if (gui.mainwin != NULL && gtk_widget_get_realized(gui.mainwin))
|
||||
# else
|
||||
if (gui.mainwin != NULL && GTK_WIDGET_REALIZED(gui.mainwin))
|
||||
# endif
|
||||
gdk_display_flush(gtk_widget_get_display(gui.mainwin));
|
||||
#else
|
||||
gdk_flush(); /* historical misnomer: calls XSync(), not XFlush() */
|
||||
if (gui.mainwin != NULL && GTK_WIDGET_REALIZED(gui.mainwin))
|
||||
#endif
|
||||
gdk_display_flush(gtk_widget_get_display(gui.mainwin));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -7298,12 +7275,8 @@ mch_set_mouse_shape(int shape)
|
||||
id = mshape_ids[shape];
|
||||
else
|
||||
return;
|
||||
# ifdef HAVE_GTK_MULTIHEAD
|
||||
c = gdk_cursor_new_for_display(
|
||||
gtk_widget_get_display(gui.drawarea), (GdkCursorType)id);
|
||||
# else
|
||||
c = gdk_cursor_new((GdkCursorType)id);
|
||||
# endif
|
||||
# if GTK_CHECK_VERSION(3,0,0)
|
||||
gdk_window_set_cursor(gtk_widget_get_window(gui.drawarea), c);
|
||||
# else
|
||||
|
||||
@@ -4311,7 +4311,7 @@ restore_win_for_buf(
|
||||
static int
|
||||
SetBufferLine(buf_T *buf, PyInt n, PyObject *line, PyInt *len_change)
|
||||
{
|
||||
bufref_T save_curbuf = {NULL, 0};
|
||||
bufref_T save_curbuf = {NULL, 0, 0};
|
||||
win_T *save_curwin = NULL;
|
||||
tabpage_T *save_curtab = NULL;
|
||||
|
||||
@@ -4415,7 +4415,7 @@ SetBufferLineList(
|
||||
PyObject *list,
|
||||
PyInt *len_change)
|
||||
{
|
||||
bufref_T save_curbuf = {NULL, 0};
|
||||
bufref_T save_curbuf = {NULL, 0, 0};
|
||||
win_T *save_curwin = NULL;
|
||||
tabpage_T *save_curtab = NULL;
|
||||
|
||||
@@ -4616,7 +4616,7 @@ SetBufferLineList(
|
||||
static int
|
||||
InsertBufferLines(buf_T *buf, PyInt n, PyObject *lines, PyInt *len_change)
|
||||
{
|
||||
bufref_T save_curbuf = {NULL, 0};
|
||||
bufref_T save_curbuf = {NULL, 0, 0};
|
||||
win_T *save_curwin = NULL;
|
||||
tabpage_T *save_curtab = NULL;
|
||||
|
||||
|
||||
@@ -364,6 +364,9 @@
|
||||
# if !defined(NAN)
|
||||
# define NAN (INFINITY-INFINITY)
|
||||
# endif
|
||||
# if !defined(DBL_EPSILON)
|
||||
# define DBL_EPSILON 2.2204460492503131e-16
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
19
src/main.c
19
src/main.c
@@ -449,6 +449,12 @@ vim_main2(void)
|
||||
*/
|
||||
if (p_lpl)
|
||||
{
|
||||
/* First add all package directories to 'runtimepath', so that their
|
||||
* autoload directories can be found. Only if not done already with a
|
||||
* :packloadall command. */
|
||||
if (!did_source_packages)
|
||||
add_pack_start_dirs();
|
||||
|
||||
# ifdef VMS /* Somehow VMS doesn't handle the "**". */
|
||||
source_runtime((char_u *)"plugin/*.vim", DIP_ALL | DIP_NOAFTER);
|
||||
# else
|
||||
@@ -456,7 +462,10 @@ vim_main2(void)
|
||||
# endif
|
||||
TIME_MSG("loading plugins");
|
||||
|
||||
ex_packloadall(NULL);
|
||||
/* Only source "start" packages if not done already with a :packloadall
|
||||
* command. */
|
||||
if (!did_source_packages)
|
||||
load_start_packages();
|
||||
TIME_MSG("loading packages");
|
||||
|
||||
# ifdef VMS /* Somehow VMS doesn't handle the "**". */
|
||||
@@ -783,6 +792,11 @@ vim_main2(void)
|
||||
if (params.n_commands > 0)
|
||||
exe_commands(¶ms);
|
||||
|
||||
#if defined(FEAT_TERMRESPONSE) && defined(FEAT_MBYTE)
|
||||
/* Must be done before redrawing, puts a few characters on the screen. */
|
||||
may_req_ambiguous_char_width();
|
||||
#endif
|
||||
|
||||
RedrawingDisabled = 0;
|
||||
redraw_all_later(NOT_VALID);
|
||||
no_wait_return = FALSE;
|
||||
@@ -796,9 +810,6 @@ vim_main2(void)
|
||||
* argument doesn't make it appear in the shell Vim was started from. */
|
||||
may_req_termresponse();
|
||||
|
||||
# if defined(FEAT_MBYTE)
|
||||
may_req_ambiguous_char_width();
|
||||
# endif
|
||||
may_req_bg_color();
|
||||
#endif
|
||||
|
||||
|
||||
13
src/mbyte.c
13
src/mbyte.c
@@ -5304,17 +5304,12 @@ im_synthesize_keypress(unsigned int keyval, unsigned int state)
|
||||
{
|
||||
GdkEventKey *event;
|
||||
|
||||
# ifdef HAVE_GTK_MULTIHEAD
|
||||
event = (GdkEventKey *)gdk_event_new(GDK_KEY_PRESS);
|
||||
# if GTK_CHECK_VERSION(3,0,0)
|
||||
# if GTK_CHECK_VERSION(3,0,0)
|
||||
g_object_ref(gtk_widget_get_window(gui.drawarea));
|
||||
/* unreffed by gdk_event_free() */
|
||||
# else
|
||||
g_object_ref(gui.drawarea->window); /* unreffed by gdk_event_free() */
|
||||
# endif
|
||||
# else
|
||||
event = (GdkEventKey *)g_malloc0((gulong)sizeof(GdkEvent));
|
||||
event->type = GDK_KEY_PRESS;
|
||||
g_object_ref(gui.drawarea->window); /* unreffed by gdk_event_free() */
|
||||
# endif
|
||||
# if GTK_CHECK_VERSION(3,0,0)
|
||||
event->window = gtk_widget_get_window(gui.drawarea);
|
||||
@@ -5337,11 +5332,7 @@ im_synthesize_keypress(unsigned int keyval, unsigned int state)
|
||||
event->send_event = FALSE;
|
||||
gtk_im_context_filter_keypress(xic, event);
|
||||
|
||||
# ifdef HAVE_GTK_MULTIHEAD
|
||||
gdk_event_free((GdkEvent *)event);
|
||||
# else
|
||||
g_free(event);
|
||||
# endif
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -8986,7 +8986,7 @@ nv_esc(cmdarg_T *cap)
|
||||
#endif
|
||||
&& !VIsual_active
|
||||
&& no_reason)
|
||||
MSG(_("Type :quit<Enter> to exit Vim"));
|
||||
MSG(_("Type :qa! and press <Enter> to abandon all changes and exit Vim"));
|
||||
|
||||
/* Don't reset "restart_edit" when 'insertmode' is set, it won't be
|
||||
* set again below when halfway a mapping. */
|
||||
|
||||
914
src/po/it.po
914
src/po/it.po
File diff suppressed because it is too large
Load Diff
@@ -72,6 +72,8 @@ void ex_runtime(exarg_T *eap);
|
||||
int source_runtime(char_u *name, int flags);
|
||||
int do_in_path(char_u *path, char_u *name, int flags, void (*callback)(char_u *fname, void *ck), void *cookie);
|
||||
int do_in_runtimepath(char_u *name, int flags, void (*callback)(char_u *fname, void *ck), void *cookie);
|
||||
void add_pack_start_dirs(void);
|
||||
void load_start_packages(void);
|
||||
void ex_packloadall(exarg_T *eap);
|
||||
void ex_packadd(exarg_T *eap);
|
||||
void ex_options(exarg_T *eap);
|
||||
|
||||
@@ -118,10 +118,10 @@ struct efm_S
|
||||
static efm_T *fmt_start = NULL; /* cached across qf_parse_line() calls */
|
||||
|
||||
static int qf_init_ext(qf_info_T *qi, char_u *efile, buf_T *buf, typval_T *tv, char_u *errorformat, int newlist, linenr_T lnumfirst, linenr_T lnumlast, char_u *qf_title, char_u *enc);
|
||||
static void qf_store_title(qf_info_T *qi, char_u *title);
|
||||
static void qf_store_title(qf_info_T *qi, int qf_idx, char_u *title);
|
||||
static void qf_new_list(qf_info_T *qi, char_u *qf_title);
|
||||
static void ll_free_all(qf_info_T **pqi);
|
||||
static int qf_add_entry(qf_info_T *qi, char_u *dir, char_u *fname, int bufnum, char_u *mesg, long lnum, int col, int vis_col, char_u *pattern, int nr, int type, int valid);
|
||||
static int qf_add_entry(qf_info_T *qi, int qf_idx, char_u *dir, char_u *fname, int bufnum, char_u *mesg, long lnum, int col, int vis_col, char_u *pattern, int nr, int type, int valid);
|
||||
static qf_info_T *ll_new_list(void);
|
||||
static void qf_free(qf_info_T *qi, int idx);
|
||||
static char_u *qf_types(int, int);
|
||||
@@ -161,8 +161,8 @@ static qf_info_T *ll_get_or_alloc_list(win_T *);
|
||||
* Looking up a buffer can be slow if there are many. Remember the last one
|
||||
* to make this a lot faster if there are multiple matches in the same file.
|
||||
*/
|
||||
static char_u *qf_last_bufname = NULL;
|
||||
static bufref_T qf_last_bufref = {NULL, 0};
|
||||
static char_u *qf_last_bufname = NULL;
|
||||
static bufref_T qf_last_bufref = {NULL, 0, 0};
|
||||
|
||||
/*
|
||||
* Read the errorfile "efile" into memory, line by line, building the error
|
||||
@@ -1277,6 +1277,7 @@ qf_init_ext(
|
||||
continue;
|
||||
|
||||
if (qf_add_entry(qi,
|
||||
qi->qf_curlist,
|
||||
qi->qf_directory,
|
||||
(*fields.namebuf || qi->qf_directory != NULL)
|
||||
? fields.namebuf
|
||||
@@ -1344,13 +1345,13 @@ qf_init_end:
|
||||
}
|
||||
|
||||
static void
|
||||
qf_store_title(qf_info_T *qi, char_u *title)
|
||||
qf_store_title(qf_info_T *qi, int qf_idx, char_u *title)
|
||||
{
|
||||
if (title != NULL)
|
||||
{
|
||||
char_u *p = alloc((int)STRLEN(title) + 2);
|
||||
|
||||
qi->qf_lists[qi->qf_curlist].qf_title = p;
|
||||
qi->qf_lists[qf_idx].qf_title = p;
|
||||
if (p != NULL)
|
||||
sprintf((char *)p, ":%s", (char *)title);
|
||||
}
|
||||
@@ -1386,7 +1387,7 @@ qf_new_list(qf_info_T *qi, char_u *qf_title)
|
||||
else
|
||||
qi->qf_curlist = qi->qf_listcount++;
|
||||
vim_memset(&qi->qf_lists[qi->qf_curlist], 0, (size_t)(sizeof(qf_list_T)));
|
||||
qf_store_title(qi, qf_title);
|
||||
qf_store_title(qi, qi->qf_curlist, qf_title);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1438,6 +1439,7 @@ qf_free_all(win_T *wp)
|
||||
static int
|
||||
qf_add_entry(
|
||||
qf_info_T *qi, /* quickfix list */
|
||||
int qf_idx, /* list index */
|
||||
char_u *dir, /* optional directory name */
|
||||
char_u *fname, /* file name or NULL */
|
||||
int bufnum, /* buffer number or zero */
|
||||
@@ -1488,13 +1490,13 @@ qf_add_entry(
|
||||
qfp->qf_type = type;
|
||||
qfp->qf_valid = valid;
|
||||
|
||||
lastp = &qi->qf_lists[qi->qf_curlist].qf_last;
|
||||
if (qi->qf_lists[qi->qf_curlist].qf_count == 0)
|
||||
lastp = &qi->qf_lists[qf_idx].qf_last;
|
||||
if (qi->qf_lists[qf_idx].qf_count == 0)
|
||||
/* first element in the list */
|
||||
{
|
||||
qi->qf_lists[qi->qf_curlist].qf_start = qfp;
|
||||
qi->qf_lists[qi->qf_curlist].qf_ptr = qfp;
|
||||
qi->qf_lists[qi->qf_curlist].qf_index = 0;
|
||||
qi->qf_lists[qf_idx].qf_start = qfp;
|
||||
qi->qf_lists[qf_idx].qf_ptr = qfp;
|
||||
qi->qf_lists[qf_idx].qf_index = 0;
|
||||
qfp->qf_prev = NULL;
|
||||
}
|
||||
else
|
||||
@@ -1505,13 +1507,13 @@ qf_add_entry(
|
||||
qfp->qf_next = NULL;
|
||||
qfp->qf_cleared = FALSE;
|
||||
*lastp = qfp;
|
||||
++qi->qf_lists[qi->qf_curlist].qf_count;
|
||||
if (qi->qf_lists[qi->qf_curlist].qf_index == 0 && qfp->qf_valid)
|
||||
++qi->qf_lists[qf_idx].qf_count;
|
||||
if (qi->qf_lists[qf_idx].qf_index == 0 && qfp->qf_valid)
|
||||
/* first valid entry */
|
||||
{
|
||||
qi->qf_lists[qi->qf_curlist].qf_index =
|
||||
qi->qf_lists[qi->qf_curlist].qf_count;
|
||||
qi->qf_lists[qi->qf_curlist].qf_ptr = qfp;
|
||||
qi->qf_lists[qf_idx].qf_index =
|
||||
qi->qf_lists[qf_idx].qf_count;
|
||||
qi->qf_lists[qf_idx].qf_ptr = qfp;
|
||||
}
|
||||
|
||||
return OK;
|
||||
@@ -1628,6 +1630,7 @@ copy_loclist(win_T *from, win_T *to)
|
||||
++i, from_qfp = from_qfp->qf_next)
|
||||
{
|
||||
if (qf_add_entry(to->w_llist,
|
||||
to->w_llist->qf_curlist,
|
||||
NULL,
|
||||
NULL,
|
||||
0,
|
||||
@@ -2732,7 +2735,7 @@ qf_history(exarg_T *eap)
|
||||
}
|
||||
|
||||
/*
|
||||
* Free error list "idx".
|
||||
* Free all the entries in the error list "idx".
|
||||
*/
|
||||
static void
|
||||
qf_free(qf_info_T *qi, int idx)
|
||||
@@ -4240,6 +4243,7 @@ ex_vimgrep(exarg_T *eap)
|
||||
* dummy buffer, unless duplicate_name is set, then the
|
||||
* buffer will be wiped out below. */
|
||||
if (qf_add_entry(qi,
|
||||
qi->qf_curlist,
|
||||
NULL, /* dir */
|
||||
fname,
|
||||
duplicate_name ? 0 : buf->b_fnum,
|
||||
@@ -4744,6 +4748,7 @@ get_errorlist_properties(win_T *wp, dict_T *what, dict_T *retdict)
|
||||
static int
|
||||
qf_add_entries(
|
||||
qf_info_T *qi,
|
||||
int qf_idx,
|
||||
list_T *list,
|
||||
char_u *title,
|
||||
int action)
|
||||
@@ -4762,18 +4767,21 @@ qf_add_entries(
|
||||
int retval = OK;
|
||||
int did_bufnr_emsg = FALSE;
|
||||
|
||||
if (action == ' ' || qi->qf_curlist == qi->qf_listcount)
|
||||
if (action == ' ' || qf_idx == qi->qf_listcount)
|
||||
{
|
||||
/* make place for a new list */
|
||||
qf_new_list(qi, title);
|
||||
qf_idx = qi->qf_curlist;
|
||||
}
|
||||
#ifdef FEAT_WINDOWS
|
||||
else if (action == 'a' && qi->qf_lists[qi->qf_curlist].qf_count > 0)
|
||||
else if (action == 'a' && qi->qf_lists[qf_idx].qf_count > 0)
|
||||
/* Adding to existing list, use last entry. */
|
||||
old_last = qi->qf_lists[qi->qf_curlist].qf_last;
|
||||
old_last = qi->qf_lists[qf_idx].qf_last;
|
||||
#endif
|
||||
else if (action == 'r')
|
||||
{
|
||||
qf_free(qi, qi->qf_curlist);
|
||||
qf_store_title(qi, title);
|
||||
qf_free(qi, qf_idx);
|
||||
qf_store_title(qi, qf_idx, title);
|
||||
}
|
||||
|
||||
for (li = list->lv_first; li != NULL; li = li->li_next)
|
||||
@@ -4819,6 +4827,7 @@ qf_add_entries(
|
||||
valid = (int)get_dict_number(d, (char_u *)"valid");
|
||||
|
||||
status = qf_add_entry(qi,
|
||||
qf_idx,
|
||||
NULL, /* dir */
|
||||
filename,
|
||||
bufnum,
|
||||
@@ -4843,17 +4852,17 @@ qf_add_entries(
|
||||
}
|
||||
}
|
||||
|
||||
if (qi->qf_lists[qi->qf_curlist].qf_index == 0)
|
||||
if (qi->qf_lists[qf_idx].qf_index == 0)
|
||||
/* no valid entry */
|
||||
qi->qf_lists[qi->qf_curlist].qf_nonevalid = TRUE;
|
||||
qi->qf_lists[qf_idx].qf_nonevalid = TRUE;
|
||||
else
|
||||
qi->qf_lists[qi->qf_curlist].qf_nonevalid = FALSE;
|
||||
qi->qf_lists[qf_idx].qf_nonevalid = FALSE;
|
||||
if (action != 'a')
|
||||
{
|
||||
qi->qf_lists[qi->qf_curlist].qf_ptr =
|
||||
qi->qf_lists[qi->qf_curlist].qf_start;
|
||||
if (qi->qf_lists[qi->qf_curlist].qf_count > 0)
|
||||
qi->qf_lists[qi->qf_curlist].qf_index = 1;
|
||||
qi->qf_lists[qf_idx].qf_ptr =
|
||||
qi->qf_lists[qf_idx].qf_start;
|
||||
if (qi->qf_lists[qf_idx].qf_count > 0)
|
||||
qi->qf_lists[qf_idx].qf_index = 1;
|
||||
}
|
||||
|
||||
#ifdef FEAT_WINDOWS
|
||||
@@ -4881,7 +4890,9 @@ qf_set_properties(qf_info_T *qi, dict_T *what, int action)
|
||||
/* Use the specified quickfix/location list */
|
||||
if (di->di_tv.v_type == VAR_NUMBER)
|
||||
{
|
||||
qf_idx = di->di_tv.vval.v_number - 1;
|
||||
/* for zero use the current list */
|
||||
if (di->di_tv.vval.v_number != 0)
|
||||
qf_idx = di->di_tv.vval.v_number - 1;
|
||||
if (qf_idx < 0 || qf_idx >= qi->qf_listcount)
|
||||
return FAIL;
|
||||
}
|
||||
@@ -4912,11 +4923,11 @@ qf_set_properties(qf_info_T *qi, dict_T *what, int action)
|
||||
if ((di = dict_find(what, (char_u *)"context", -1)) != NULL)
|
||||
{
|
||||
typval_T *ctx;
|
||||
free_tv(qi->qf_lists[qi->qf_curlist].qf_ctx);
|
||||
free_tv(qi->qf_lists[qf_idx].qf_ctx);
|
||||
ctx = alloc_tv();
|
||||
if (ctx != NULL)
|
||||
copy_tv(&di->di_tv, ctx);
|
||||
qi->qf_lists[qi->qf_curlist].qf_ctx = ctx;
|
||||
qi->qf_lists[qf_idx].qf_ctx = ctx;
|
||||
}
|
||||
|
||||
return retval;
|
||||
@@ -5022,7 +5033,7 @@ set_errorlist(
|
||||
else if (what != NULL)
|
||||
retval = qf_set_properties(qi, what, action);
|
||||
else
|
||||
retval = qf_add_entries(qi, list, title, action);
|
||||
retval = qf_add_entries(qi, qi->qf_curlist, list, title, action);
|
||||
|
||||
return retval;
|
||||
}
|
||||
@@ -5385,6 +5396,7 @@ ex_helpgrep(exarg_T *eap)
|
||||
line[--l] = NUL;
|
||||
|
||||
if (qf_add_entry(qi,
|
||||
qi->qf_curlist,
|
||||
NULL, /* dir */
|
||||
fnames[fi],
|
||||
0,
|
||||
|
||||
@@ -628,37 +628,39 @@ nfa_recognize_char_class(char_u *start, char_u *end, int extra_newl)
|
||||
config |= CLASS_o9;
|
||||
break;
|
||||
}
|
||||
else
|
||||
if (*(p + 2) == '7')
|
||||
{
|
||||
config |= CLASS_o7;
|
||||
break;
|
||||
}
|
||||
return FAIL;
|
||||
|
||||
case 'a':
|
||||
if (*(p + 2) == 'z')
|
||||
{
|
||||
config |= CLASS_az;
|
||||
break;
|
||||
}
|
||||
else
|
||||
if (*(p + 2) == 'f')
|
||||
{
|
||||
config |= CLASS_af;
|
||||
break;
|
||||
}
|
||||
return FAIL;
|
||||
|
||||
case 'A':
|
||||
if (*(p + 2) == 'Z')
|
||||
{
|
||||
config |= CLASS_AZ;
|
||||
break;
|
||||
}
|
||||
else
|
||||
if (*(p + 2) == 'F')
|
||||
{
|
||||
config |= CLASS_AF;
|
||||
break;
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
return FAIL;
|
||||
|
||||
default:
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
29
src/search.c
29
src/search.c
@@ -1524,9 +1524,9 @@ end_do_search:
|
||||
* search_for_exact_line(buf, pos, dir, pat)
|
||||
*
|
||||
* Search for a line starting with the given pattern (ignoring leading
|
||||
* white-space), starting from pos and going in direction dir. pos will
|
||||
* white-space), starting from pos and going in direction "dir". "pos" will
|
||||
* contain the position of the match found. Blank lines match only if
|
||||
* ADDING is set. if p_ic is set then the pattern must be in lowercase.
|
||||
* ADDING is set. If p_ic is set then the pattern must be in lowercase.
|
||||
* Return OK for success, or FAIL if no line found.
|
||||
*/
|
||||
int
|
||||
@@ -4364,7 +4364,7 @@ current_quote(
|
||||
int selected_quote = FALSE; /* Has quote inside selection */
|
||||
int i;
|
||||
|
||||
/* Correct cursor when 'selection' is exclusive */
|
||||
/* Correct cursor when 'selection' is "exclusive". */
|
||||
if (VIsual_active)
|
||||
{
|
||||
/* this only works within one line */
|
||||
@@ -4372,8 +4372,19 @@ current_quote(
|
||||
return FALSE;
|
||||
|
||||
vis_bef_curs = LT_POS(VIsual, curwin->w_cursor);
|
||||
if (*p_sel == 'e' && vis_bef_curs)
|
||||
if (*p_sel == 'e')
|
||||
{
|
||||
if (!vis_bef_curs)
|
||||
{
|
||||
/* VIsual needs to be start of Visual selection. */
|
||||
pos_T t = curwin->w_cursor;
|
||||
|
||||
curwin->w_cursor = VIsual;
|
||||
VIsual = t;
|
||||
vis_bef_curs = TRUE;
|
||||
}
|
||||
dec_cursor();
|
||||
}
|
||||
vis_empty = EQUAL_POS(VIsual, curwin->w_cursor);
|
||||
}
|
||||
|
||||
@@ -5397,8 +5408,9 @@ search_line:
|
||||
#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
|
||||
if (g_do_tagpreview != 0)
|
||||
{
|
||||
if (getfile(0, curwin_save->w_buffer->b_fname,
|
||||
NULL, TRUE, lnum, FALSE) > 0)
|
||||
if (!GETFILE_SUCCESS(getfile(
|
||||
0, curwin_save->w_buffer->b_fname,
|
||||
NULL, TRUE, lnum, FALSE)))
|
||||
break; /* failed to jump to file */
|
||||
}
|
||||
else
|
||||
@@ -5408,8 +5420,9 @@ search_line:
|
||||
}
|
||||
else
|
||||
{
|
||||
if (getfile(0, files[depth].name, NULL, TRUE,
|
||||
files[depth].lnum, FALSE) > 0)
|
||||
if (!GETFILE_SUCCESS(getfile(
|
||||
0, files[depth].name, NULL, TRUE,
|
||||
files[depth].lnum, FALSE)))
|
||||
break; /* failed to jump to file */
|
||||
/* autocommands may have changed the lnum, we don't
|
||||
* want that here */
|
||||
|
||||
@@ -69,11 +69,13 @@ typedef struct frame_S frame_T;
|
||||
typedef int scid_T; /* script ID */
|
||||
typedef struct file_buffer buf_T; /* forward declaration */
|
||||
|
||||
/* Reference to a buffer that stores the value of buf_free_count.
|
||||
/*
|
||||
* Reference to a buffer that stores the value of buf_free_count.
|
||||
* bufref_valid() only needs to check "buf" when the count differs.
|
||||
*/
|
||||
typedef struct {
|
||||
buf_T *br_buf;
|
||||
int br_fnum;
|
||||
int br_buf_free_count;
|
||||
} bufref_T;
|
||||
|
||||
|
||||
19
src/syntax.c
19
src/syntax.c
@@ -7834,18 +7834,25 @@ do_highlight(
|
||||
must_redraw = CLEAR;
|
||||
if (color >= 0)
|
||||
{
|
||||
int dark = -1;
|
||||
|
||||
if (termcap_active)
|
||||
term_bg_color(color);
|
||||
if (t_colors < 16)
|
||||
i = (color == 0 || color == 4);
|
||||
else
|
||||
i = (color < 7 || color == 8);
|
||||
dark = (color == 0 || color == 4);
|
||||
/* Limit the heuristic to the standard 16 colors */
|
||||
else if (color < 16)
|
||||
dark = (color < 7 || color == 8);
|
||||
/* Set the 'background' option if the value is
|
||||
* wrong. */
|
||||
if (i != (*p_bg == 'd'))
|
||||
if (dark != -1
|
||||
&& dark != (*p_bg == 'd')
|
||||
&& !option_was_set((char_u *)"bg"))
|
||||
{
|
||||
set_option_value((char_u *)"bg", 0L,
|
||||
i ? (char_u *)"dark"
|
||||
: (char_u *)"light", 0);
|
||||
(char_u *)(dark ? "dark" : "light"), 0);
|
||||
reset_option_was_set((char_u *)"bg");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
33
src/tag.c
33
src/tag.c
@@ -3088,7 +3088,7 @@ jumpto_tag(
|
||||
char_u *fname;
|
||||
tagptrs_T tagp;
|
||||
int retval = FAIL;
|
||||
int getfile_result;
|
||||
int getfile_result = GETFILE_UNUSED;
|
||||
int search_options;
|
||||
#ifdef FEAT_SEARCH_EXTRA
|
||||
int save_no_hlsearch;
|
||||
@@ -3202,7 +3202,29 @@ jumpto_tag(
|
||||
|
||||
/* If it was a CTRL-W CTRL-] command split window now. For ":tab tag"
|
||||
* open a new tab page. */
|
||||
if (postponed_split || cmdmod.tab != 0)
|
||||
if (postponed_split && (swb_flags & (SWB_USEOPEN | SWB_USETAB)))
|
||||
{
|
||||
buf_T *existing_buf = buflist_findname_exp(fname);
|
||||
|
||||
if (existing_buf != NULL)
|
||||
{
|
||||
win_T *wp = NULL;
|
||||
|
||||
if (swb_flags & SWB_USEOPEN)
|
||||
wp = buf_jump_open_win(existing_buf);
|
||||
|
||||
/* If 'switchbuf' contains "usetab": jump to first window in any tab
|
||||
* page containing "existing_buf" if one exists */
|
||||
if (wp == NULL && (swb_flags & SWB_USETAB))
|
||||
wp = buf_jump_open_tab(existing_buf);
|
||||
/* We've switched to the buffer, the usual loading of the file must
|
||||
* be skipped. */
|
||||
if (wp != NULL)
|
||||
getfile_result = GETFILE_SAME_FILE;
|
||||
}
|
||||
}
|
||||
if (getfile_result == GETFILE_UNUSED
|
||||
&& (postponed_split || cmdmod.tab != 0))
|
||||
{
|
||||
if (win_split(postponed_split > 0 ? postponed_split : 0,
|
||||
postponed_split_flags) == FAIL)
|
||||
@@ -3225,10 +3247,11 @@ jumpto_tag(
|
||||
#endif
|
||||
keep_help_flag = curbuf->b_help;
|
||||
}
|
||||
getfile_result = getfile(0, fname, NULL, TRUE, (linenr_T)0, forceit);
|
||||
if (getfile_result == GETFILE_UNUSED)
|
||||
getfile_result = getfile(0, fname, NULL, TRUE, (linenr_T)0, forceit);
|
||||
keep_help_flag = FALSE;
|
||||
|
||||
if (getfile_result <= 0) /* got to the right file */
|
||||
if (GETFILE_SUCCESS(getfile_result)) /* got to the right file */
|
||||
{
|
||||
curwin->w_set_curswant = TRUE;
|
||||
#ifdef FEAT_WINDOWS
|
||||
@@ -3377,7 +3400,7 @@ jumpto_tag(
|
||||
#endif
|
||||
|
||||
/* Return OK if jumped to another file (at least we found the file!). */
|
||||
if (getfile_result == -1)
|
||||
if (getfile_result == GETFILE_OPEN_OTHER)
|
||||
retval = OK;
|
||||
|
||||
if (retval == OK)
|
||||
|
||||
22
src/term.c
22
src/term.c
@@ -3333,9 +3333,13 @@ may_req_ambiguous_char_width(void)
|
||||
out_str(T_U7);
|
||||
u7_status = U7_SENT;
|
||||
out_flush();
|
||||
|
||||
/* This overwrites a few characters on the screen, a redraw is needed
|
||||
* after this. Clear them out for now. */
|
||||
term_windgoto(1, 0);
|
||||
out_str((char_u *)" ");
|
||||
term_windgoto(0, 0);
|
||||
|
||||
/* check for the characters now, otherwise they might be eaten by
|
||||
* get_keystroke() */
|
||||
out_flush();
|
||||
@@ -4385,14 +4389,20 @@ check_termcode(
|
||||
if (i - j >= 21 && STRNCMP(tp + j + 3, "rgb:", 4) == 0
|
||||
&& tp[j + 11] == '/' && tp[j + 16] == '/'
|
||||
&& !option_was_set((char_u *)"bg"))
|
||||
{/* TODO: don't set option when already the right value */
|
||||
{
|
||||
char *newval = (3 * '6' < tp[j+7] + tp[j+12]
|
||||
+ tp[j+17]) ? "light" : "dark";
|
||||
|
||||
LOG_TR("Received RBG");
|
||||
rbg_status = RBG_GOT;
|
||||
set_option_value((char_u *)"bg", 0L, (char_u *)(
|
||||
(3 * '6' < tp[j+7] + tp[j+12] + tp[j+17])
|
||||
? "light" : "dark"), 0);
|
||||
reset_option_was_set((char_u *)"bg");
|
||||
redraw_asap(CLEAR);
|
||||
if (STRCMP(p_bg, newval) != 0)
|
||||
{
|
||||
/* value differs, apply it */
|
||||
set_option_value((char_u *)"bg", 0L,
|
||||
(char_u *)newval, 0);
|
||||
reset_option_was_set((char_u *)"bg");
|
||||
redraw_asap(CLEAR);
|
||||
}
|
||||
}
|
||||
|
||||
/* got finished code: consume it */
|
||||
|
||||
@@ -50,7 +50,6 @@ SCRIPTS_ALL = \
|
||||
test57.out \
|
||||
test60.out \
|
||||
test64.out \
|
||||
test65.out \
|
||||
test66.out \
|
||||
test67.out \
|
||||
test68.out \
|
||||
|
||||
@@ -87,7 +87,7 @@ SCRIPT = test1.out test3.out test4.out test5.out \
|
||||
test43.out test44.out test45.out \
|
||||
test48.out test49.out test51.out test53.out test54.out \
|
||||
test55.out test56.out test57.out test60.out \
|
||||
test64.out test65.out \
|
||||
test64.out \
|
||||
test66.out test67.out test68.out test69.out \
|
||||
test72.out test75.out \
|
||||
test77a.out test78.out test79.out test80.out \
|
||||
|
||||
@@ -98,9 +98,15 @@ p:s/\%#=2\U//g
|
||||
p:s/\%#=0[^A-Z]//g
|
||||
p:s/\%#=1[^A-Z]//g
|
||||
p:s/\%#=2[^A-Z]//g
|
||||
p:s/\%#=0\%204l^\t...//g
|
||||
p:s/\%#=1\%205l^\t...//g
|
||||
p:s/\%#=2\%206l^\t...//g
|
||||
p:s/\%#=0\%210l^\t...//g
|
||||
p:s/\%#=1\%211l^\t...//g
|
||||
p:s/\%#=2\%212l^\t...//g
|
||||
p:s/\%#=0[0-z]//g
|
||||
p:s/\%#=1[0-z]//g
|
||||
p:s/\%#=2[0-z]//g
|
||||
p:s/\%#=0[^0-z]//g
|
||||
p:s/\%#=1[^0-z]//g
|
||||
p:s/\%#=2[^0-z]//g
|
||||
:/^start-here/+1,$wq! test.out
|
||||
ENDTEST
|
||||
|
||||
|
||||
@@ -97,3 +97,9 @@ ABCDEFGHIXYZ
|
||||
|
||||
!"#$%&'()#+'-./0123456789:;<=>?@[\]^_`{|}~<><7F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
!"#$%&'()#+'-./0123456789:;<=>?@[\]^_`{|}~<><7F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
!"#$%&'()#+'-./0123456789:;<=>?@[\]^_`{|}~<><7F><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
ABCDEFGHIXYZabcdefghiwxyz
|
||||
ABCDEFGHIXYZabcdefghiwxyz
|
||||
ABCDEFGHIXYZabcdefghiwxyz
|
||||
|
||||
@@ -1,95 +0,0 @@
|
||||
Test for floating point and logical operators.
|
||||
|
||||
STARTTEST
|
||||
:so small.vim
|
||||
:if !has("float")
|
||||
: e! test.ok
|
||||
: wq! test.out
|
||||
:endif
|
||||
:"
|
||||
:$put =printf('%f', 123.456)
|
||||
:$put =printf('%e', 123.456)
|
||||
:$put =printf('%g', 123.456)
|
||||
:" check we don't crash on division by zero
|
||||
:echo 1.0 / 0.0
|
||||
:$put ='+='
|
||||
:let v = 1.234
|
||||
:let v += 6.543
|
||||
:$put =printf('%g', v)
|
||||
:let v = 1.234
|
||||
:let v += 5
|
||||
:$put =printf('%g', v)
|
||||
:let a = 5
|
||||
:let a += 3.333
|
||||
:$put =string(a)
|
||||
:$put ='=='
|
||||
:let v = 1.234
|
||||
:$put =v == 1.234
|
||||
:$put =v == 1.2341
|
||||
:$put ='add-subtract'
|
||||
:$put =printf('%g', 4 + 1.234)
|
||||
:$put =printf('%g', 1.234 - 8)
|
||||
:$put ='mult-div'
|
||||
:$put =printf('%g', 4 * 1.234)
|
||||
:$put =printf('%g', 4.0 / 1234)
|
||||
:$put ='dict'
|
||||
:$put =string({'x': 1.234, 'y': -2.0e20})
|
||||
:$put ='list'
|
||||
:$put =string([-123.4, 2.0e-20])
|
||||
:$put ='abs'
|
||||
:$put =printf('%d', abs(1456))
|
||||
:$put =printf('%d', abs(-4))
|
||||
:$put =printf('%d', abs([1, 2, 3]))
|
||||
:$put =printf('%g', abs(14.56))
|
||||
:$put =printf('%g', abs(-54.32))
|
||||
:$put ='ceil'
|
||||
:$put =printf('%g', ceil(1.456))
|
||||
:$put =printf('%g', ceil(-5.456))
|
||||
:$put =printf('%g', ceil(-4.000))
|
||||
:$put ='floor'
|
||||
:$put =printf('%g', floor(1.856))
|
||||
:$put =printf('%g', floor(-5.456))
|
||||
:$put =printf('%g', floor(4.0))
|
||||
:$put ='log10'
|
||||
:$put =printf('%g', log10(1000))
|
||||
:$put =printf('%g', log10(0.01000))
|
||||
:$put ='pow'
|
||||
:$put =printf('%g', pow(3, 3.0))
|
||||
:$put =printf('%g', pow(2, 16))
|
||||
:$put ='round'
|
||||
:$put =printf('%g', round(0.456))
|
||||
:$put =printf('%g', round(4.5))
|
||||
:$put =printf('%g', round(-4.50))
|
||||
:$put ='sqrt'
|
||||
:$put =printf('%g', sqrt(100))
|
||||
:echo sqrt(-4.01)
|
||||
:$put ='str2float'
|
||||
:$put =printf('%g', str2float('1e40'))
|
||||
:$put ='trunc'
|
||||
:$put =printf('%g', trunc(1.456))
|
||||
:$put =printf('%g', trunc(-5.456))
|
||||
:$put =printf('%g', trunc(4.000))
|
||||
:$put ='float2nr'
|
||||
:$put =float2nr(123.456)
|
||||
:$put =float2nr(-123.456)
|
||||
:$put ='AND'
|
||||
:$put =and(127, 127)
|
||||
:$put =and(127, 16)
|
||||
:$put =and(127, 128)
|
||||
:$put ='OR'
|
||||
:$put =or(16, 7)
|
||||
:$put =or(8, 7)
|
||||
:$put =or(0, 123)
|
||||
:$put ='XOR'
|
||||
:$put =xor(127, 127)
|
||||
:$put =xor(127, 16)
|
||||
:$put =xor(127, 128)
|
||||
:$put ='invert'
|
||||
:$put =and(invert(127), 65535)
|
||||
:$put =and(invert(16), 65535)
|
||||
:$put =and(invert(128), 65535)
|
||||
:$put =invert(1.0)
|
||||
:/^Results/,$wq! test.out
|
||||
ENDTEST
|
||||
|
||||
Results of test65:
|
||||
@@ -1,73 +0,0 @@
|
||||
Results of test65:
|
||||
123.456000
|
||||
1.234560e+02
|
||||
123.456
|
||||
+=
|
||||
7.777
|
||||
6.234
|
||||
8.333
|
||||
==
|
||||
1
|
||||
0
|
||||
add-subtract
|
||||
5.234
|
||||
-6.766
|
||||
mult-div
|
||||
4.936
|
||||
0.003241
|
||||
dict
|
||||
{'x': 1.234, 'y': -2.0e20}
|
||||
list
|
||||
[-123.4, 2.0e-20]
|
||||
abs
|
||||
1456
|
||||
4
|
||||
-1
|
||||
14.56
|
||||
54.32
|
||||
ceil
|
||||
2.0
|
||||
-5.0
|
||||
-4.0
|
||||
floor
|
||||
1.0
|
||||
-6.0
|
||||
4.0
|
||||
log10
|
||||
3.0
|
||||
-2.0
|
||||
pow
|
||||
27.0
|
||||
65536.0
|
||||
round
|
||||
0.0
|
||||
5.0
|
||||
-5.0
|
||||
sqrt
|
||||
10.0
|
||||
str2float
|
||||
1.0e40
|
||||
trunc
|
||||
1.0
|
||||
-5.0
|
||||
4.0
|
||||
float2nr
|
||||
123
|
||||
-123
|
||||
AND
|
||||
127
|
||||
16
|
||||
0
|
||||
OR
|
||||
23
|
||||
15
|
||||
123
|
||||
XOR
|
||||
0
|
||||
111
|
||||
255
|
||||
invert
|
||||
65408
|
||||
65519
|
||||
65407
|
||||
0
|
||||
@@ -16,6 +16,7 @@ source test_expr.vim
|
||||
source test_feedkeys.vim
|
||||
source test_file_perm.vim
|
||||
source test_fileformat.vim
|
||||
source test_filetype.vim
|
||||
source test_filter_cmd.vim
|
||||
source test_filter_map.vim
|
||||
source test_findfile.vim
|
||||
|
||||
43
src/testdir/test_filetype.vim
Normal file
43
src/testdir/test_filetype.vim
Normal file
@@ -0,0 +1,43 @@
|
||||
" Test :setfiletype
|
||||
|
||||
func Test_detection()
|
||||
filetype on
|
||||
augroup filetypedetect
|
||||
au BufNewFile,BufRead * call assert_equal(1, did_filetype())
|
||||
augroup END
|
||||
new something.vim
|
||||
call assert_equal('vim', &filetype)
|
||||
|
||||
bwipe!
|
||||
filetype off
|
||||
endfunc
|
||||
|
||||
func Test_conf_type()
|
||||
filetype on
|
||||
call writefile(['# some comment', 'must be conf'], 'Xfile')
|
||||
augroup filetypedetect
|
||||
au BufNewFile,BufRead * call assert_equal(0, did_filetype())
|
||||
augroup END
|
||||
split Xfile
|
||||
call assert_equal('conf', &filetype)
|
||||
|
||||
bwipe!
|
||||
call delete('Xfile')
|
||||
filetype off
|
||||
endfunc
|
||||
|
||||
func Test_other_type()
|
||||
filetype on
|
||||
augroup filetypedetect
|
||||
au BufNewFile,BufRead * call assert_equal(0, did_filetype())
|
||||
au BufNewFile,BufRead Xfile setf testfile
|
||||
au BufNewFile,BufRead * call assert_equal(1, did_filetype())
|
||||
augroup END
|
||||
call writefile(['# some comment', 'must be conf'], 'Xfile')
|
||||
split Xfile
|
||||
call assert_equal('testfile', &filetype)
|
||||
|
||||
bwipe!
|
||||
call delete('Xfile')
|
||||
filetype off
|
||||
endfunc
|
||||
@@ -224,6 +224,20 @@ func Test_str2float()
|
||||
call assert_fails("call str2float(function('string'))", 'E729:')
|
||||
endfunc
|
||||
|
||||
func Test_float2nr()
|
||||
call assert_equal(1, float2nr(1.234))
|
||||
call assert_equal(123, float2nr(1.234e2))
|
||||
call assert_equal(12, float2nr(123.4e-1))
|
||||
let max_number = 1/0
|
||||
let min_number = -max_number
|
||||
call assert_equal(max_number/2+1, float2nr(pow(2, 62)))
|
||||
call assert_equal(max_number, float2nr(pow(2, 63)))
|
||||
call assert_equal(max_number, float2nr(pow(2, 64)))
|
||||
call assert_equal(min_number/2-1, float2nr(-pow(2, 62)))
|
||||
call assert_equal(min_number, float2nr(-pow(2, 63)))
|
||||
call assert_equal(min_number, float2nr(-pow(2, 64)))
|
||||
endfunc
|
||||
|
||||
func Test_floor()
|
||||
call assert_equal('2.0', string(floor(2.0)))
|
||||
call assert_equal('2.0', string(floor(2.11)))
|
||||
@@ -282,3 +296,36 @@ func Test_isnan()
|
||||
call assert_equal(0, isnan([]))
|
||||
call assert_equal(0, isnan({}))
|
||||
endfunc
|
||||
|
||||
" This was converted from test65
|
||||
func Test_float_misc()
|
||||
call assert_equal('123.456000', printf('%f', 123.456))
|
||||
call assert_equal('1.234560e+02', printf('%e', 123.456))
|
||||
call assert_equal('123.456', printf('%g', 123.456))
|
||||
" +=
|
||||
let v = 1.234
|
||||
let v += 6.543
|
||||
call assert_equal('7.777', printf('%g', v))
|
||||
let v = 1.234
|
||||
let v += 5
|
||||
call assert_equal('6.234', printf('%g', v))
|
||||
let v = 5
|
||||
let v += 3.333
|
||||
call assert_equal('8.333', string(v))
|
||||
" ==
|
||||
let v = 1.234
|
||||
call assert_true(v == 1.234)
|
||||
call assert_false(v == 1.2341)
|
||||
" add-subtract
|
||||
call assert_equal('5.234', printf('%g', 4 + 1.234))
|
||||
call assert_equal('-6.766', printf('%g', 1.234 - 8))
|
||||
" mult-div
|
||||
call assert_equal('4.936', printf('%g', 4 * 1.234))
|
||||
call assert_equal('0.003241', printf('%g', 4.0 / 1234))
|
||||
" dict
|
||||
call assert_equal("{'x': 1.234, 'y': -2.0e20}", string({'x': 1.234, 'y': -2.0e20}))
|
||||
" list
|
||||
call assert_equal('[-123.4, 2.0e-20]', string([-123.4, 2.0e-20]))
|
||||
endfunc
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
|
||||
@@ -60,3 +60,14 @@ func Test_with_syntax()
|
||||
set printoptions&
|
||||
endif
|
||||
endfunc
|
||||
|
||||
func Test_fname_with_spaces()
|
||||
if has('postscript')
|
||||
split t\ e\ s\ t.txt
|
||||
call setline(1, ['just', 'some', 'text'])
|
||||
hardcopy > %.ps
|
||||
call assert_true(filereadable('t e s t.txt.ps'))
|
||||
call delete('t e s t.txt.ps')
|
||||
bwipe!
|
||||
endif
|
||||
endfunc
|
||||
|
||||
@@ -1804,6 +1804,37 @@ func Xproperty_tests(cchar)
|
||||
call setloclist(0, [], 'f')
|
||||
call assert_equal({}, getloclist(0, {'context':1}))
|
||||
endif
|
||||
|
||||
" Test for changing the context of previous quickfix lists
|
||||
call g:Xsetlist([], 'f')
|
||||
Xexpr "One"
|
||||
Xexpr "Two"
|
||||
Xexpr "Three"
|
||||
call g:Xsetlist([], ' ', {'context' : [1], 'nr' : 1})
|
||||
call g:Xsetlist([], ' ', {'context' : [2], 'nr' : 2})
|
||||
" Also, check for setting the context using quickfix list number zero.
|
||||
call g:Xsetlist([], ' ', {'context' : [3], 'nr' : 0})
|
||||
call test_garbagecollect_now()
|
||||
let l = g:Xgetlist({'nr' : 1, 'context' : 1})
|
||||
call assert_equal([1], l.context)
|
||||
let l = g:Xgetlist({'nr' : 2, 'context' : 1})
|
||||
call assert_equal([2], l.context)
|
||||
let l = g:Xgetlist({'nr' : 3, 'context' : 1})
|
||||
call assert_equal([3], l.context)
|
||||
|
||||
" Test for changing the context through reference and for garbage
|
||||
" collection of quickfix context
|
||||
let l = ["red"]
|
||||
call g:Xsetlist([], ' ', {'context' : l})
|
||||
call add(l, "blue")
|
||||
let x = g:Xgetlist({'context' : 1})
|
||||
call add(x.context, "green")
|
||||
call assert_equal(["red", "blue", "green"], l)
|
||||
call assert_equal(["red", "blue", "green"], x.context)
|
||||
unlet l
|
||||
call test_garbagecollect_now()
|
||||
let m = g:Xgetlist({'context' : 1})
|
||||
call assert_equal(["red", "blue", "green"], m.context)
|
||||
endfunc
|
||||
|
||||
func Test_qf_property()
|
||||
@@ -2073,3 +2104,19 @@ func Test_qf_free()
|
||||
call XfreeTests('c')
|
||||
call XfreeTests('l')
|
||||
endfunc
|
||||
|
||||
" Test for buffer overflow when parsing lines and adding new entries to
|
||||
" the quickfix list.
|
||||
func Test_bufoverflow()
|
||||
set efm=%f:%l:%m
|
||||
cgetexpr ['File1:100:' . repeat('x', 1025)]
|
||||
|
||||
set efm=%+GCompiler:\ %.%#,%f:%l:%m
|
||||
cgetexpr ['Compiler: ' . repeat('a', 1015), 'File1:10:Hello World']
|
||||
|
||||
set efm=%DEntering\ directory\ %f,%f:%l:%m
|
||||
cgetexpr ['Entering directory ' . repeat('a', 1006),
|
||||
\ 'File1:10:Hello World']
|
||||
set efm&vim
|
||||
endfunc
|
||||
|
||||
|
||||
@@ -61,6 +61,38 @@ func Test_after_comes_later()
|
||||
call delete('Xafter', 'rf')
|
||||
endfunc
|
||||
|
||||
func Test_pack_in_rtp_when_plugins_run()
|
||||
if !has('packages')
|
||||
return
|
||||
endif
|
||||
let before = [
|
||||
\ 'set nocp viminfo+=nviminfo',
|
||||
\ 'set guioptions+=M',
|
||||
\ 'let $HOME = "/does/not/exist"',
|
||||
\ 'set loadplugins',
|
||||
\ 'set rtp=Xhere',
|
||||
\ 'set packpath=Xhere',
|
||||
\ 'set nomore',
|
||||
\ ]
|
||||
let after = [
|
||||
\ 'quit',
|
||||
\ ]
|
||||
call mkdir('Xhere/plugin', 'p')
|
||||
call writefile(['redir! > Xtestout', 'silent set runtimepath?', 'silent! call foo#Trigger()', 'redir END'], 'Xhere/plugin/here.vim')
|
||||
call mkdir('Xhere/pack/foo/start/foobar/autoload', 'p')
|
||||
call writefile(['function! foo#Trigger()', 'echo "autoloaded foo"', 'endfunction'], 'Xhere/pack/foo/start/foobar/autoload/foo.vim')
|
||||
|
||||
if RunVim(before, after, '')
|
||||
|
||||
let lines = filter(readfile('Xtestout'), '!empty(v:val)')
|
||||
call assert_match('Xhere[/\\]pack[/\\]foo[/\\]start[/\\]foobar', get(lines, 0))
|
||||
call assert_match('autoloaded foo', get(lines, 1))
|
||||
endif
|
||||
|
||||
call delete('Xtestout')
|
||||
call delete('Xhere', 'rf')
|
||||
endfunc
|
||||
|
||||
func Test_help_arg()
|
||||
if !has('unix') && has('gui')
|
||||
" this doesn't work with gvim on MS-Windows
|
||||
|
||||
@@ -401,3 +401,26 @@ func Test_highlight_invalid_arg()
|
||||
call assert_fails('hi XXX xxx=White', 'E423:')
|
||||
endfunc
|
||||
|
||||
func Test_bg_detection()
|
||||
if has('gui_running')
|
||||
return
|
||||
endif
|
||||
" auto-detection of &bg, make sure sure it isn't set anywhere before
|
||||
" this test
|
||||
hi Normal ctermbg=0
|
||||
call assert_equal('dark', &bg)
|
||||
hi Normal ctermbg=4
|
||||
call assert_equal('dark', &bg)
|
||||
hi Normal ctermbg=12
|
||||
call assert_equal('light', &bg)
|
||||
hi Normal ctermbg=15
|
||||
call assert_equal('light', &bg)
|
||||
|
||||
" manually-set &bg takes precendence over auto-detection
|
||||
set bg=light
|
||||
hi Normal ctermbg=4
|
||||
call assert_equal('light', &bg)
|
||||
set bg=dark
|
||||
hi Normal ctermbg=12
|
||||
call assert_equal('dark', &bg)
|
||||
endfunc
|
||||
|
||||
@@ -65,6 +65,48 @@ func Test_duplicate_tagjump()
|
||||
call delete('Xfile1')
|
||||
endfunc
|
||||
|
||||
func Test_tagjump_switchbuf()
|
||||
set tags=Xtags
|
||||
call writefile(["!_TAG_FILE_ENCODING\tutf-8\t//",
|
||||
\ "second\tXfile1\t2",
|
||||
\ "third\tXfile1\t3",],
|
||||
\ 'Xtags')
|
||||
call writefile(['first', 'second', 'third'], 'Xfile1')
|
||||
|
||||
enew | only
|
||||
set switchbuf=
|
||||
stag second
|
||||
call assert_equal(2, winnr('$'))
|
||||
call assert_equal(2, line('.'))
|
||||
stag third
|
||||
call assert_equal(3, winnr('$'))
|
||||
call assert_equal(3, line('.'))
|
||||
|
||||
enew | only
|
||||
set switchbuf=useopen
|
||||
stag second
|
||||
call assert_equal(2, winnr('$'))
|
||||
call assert_equal(2, line('.'))
|
||||
stag third
|
||||
call assert_equal(2, winnr('$'))
|
||||
call assert_equal(3, line('.'))
|
||||
|
||||
enew | only
|
||||
set switchbuf=usetab
|
||||
tab stag second
|
||||
call assert_equal(2, tabpagenr('$'))
|
||||
call assert_equal(2, line('.'))
|
||||
1tabnext | stag third
|
||||
call assert_equal(2, tabpagenr('$'))
|
||||
call assert_equal(3, line('.'))
|
||||
|
||||
tabclose!
|
||||
enew | only
|
||||
call delete('Xfile1')
|
||||
call delete('Xtags')
|
||||
set switchbuf&vim
|
||||
endfunc
|
||||
|
||||
" Tests for [ CTRL-I and CTRL-W CTRL-I commands
|
||||
function Test_keyword_jump()
|
||||
call writefile(["#include Xinclude", "",
|
||||
|
||||
@@ -5,7 +5,7 @@ if !has('textobjects')
|
||||
endif
|
||||
|
||||
set belloff=all
|
||||
function! CpoM(line, useM, expected)
|
||||
func CpoM(line, useM, expected)
|
||||
new
|
||||
|
||||
if a:useM
|
||||
@@ -29,16 +29,26 @@ function! CpoM(line, useM, expected)
|
||||
call assert_equal(getreg('"'), a:expected[2])
|
||||
|
||||
q!
|
||||
endfunction
|
||||
endfunc
|
||||
|
||||
function! Test_inner_block_without_cpo_M()
|
||||
func Test_inner_block_without_cpo_M()
|
||||
call CpoM('(red \(blue) green)', 0, ['red \(blue', 'red \(blue', ''])
|
||||
endfunction
|
||||
endfunc
|
||||
|
||||
function! Test_inner_block_with_cpo_M_left_backslash()
|
||||
func Test_inner_block_with_cpo_M_left_backslash()
|
||||
call CpoM('(red \(blue) green)', 1, ['red \(blue) green', 'blue', 'red \(blue) green'])
|
||||
endfunction
|
||||
endfunc
|
||||
|
||||
function! Test_inner_block_with_cpo_M_right_backslash()
|
||||
func Test_inner_block_with_cpo_M_right_backslash()
|
||||
call CpoM('(red (blue\) green)', 1, ['red (blue\) green', 'blue\', 'red (blue\) green'])
|
||||
endfunction
|
||||
endfunc
|
||||
|
||||
func Test_quote_selection_selection_exclusive()
|
||||
new
|
||||
call setline(1, "a 'bcde' f")
|
||||
set selection=exclusive
|
||||
exe "norm! fdvhi'y"
|
||||
call assert_equal('bcde', @")
|
||||
set selection&vim
|
||||
bw!
|
||||
endfunc
|
||||
|
||||
@@ -1320,6 +1320,49 @@ func Test_script_emty_line_continuation()
|
||||
\
|
||||
endfunc
|
||||
|
||||
"-------------------------------------------------------------------------------
|
||||
" Test 97: bitwise functions {{{1
|
||||
"-------------------------------------------------------------------------------
|
||||
func Test_bitwise_functions()
|
||||
" and
|
||||
call assert_equal(127, and(127, 127))
|
||||
call assert_equal(16, and(127, 16))
|
||||
call assert_equal(0, and(127, 128))
|
||||
call assert_fails("call and(1.0, 1)", 'E805:')
|
||||
call assert_fails("call and([], 1)", 'E745:')
|
||||
call assert_fails("call and({}, 1)", 'E728:')
|
||||
call assert_fails("call and(1, 1.0)", 'E805:')
|
||||
call assert_fails("call and(1, [])", 'E745:')
|
||||
call assert_fails("call and(1, {})", 'E728:')
|
||||
" or
|
||||
call assert_equal(23, or(16, 7))
|
||||
call assert_equal(15, or(8, 7))
|
||||
call assert_equal(123, or(0, 123))
|
||||
call assert_fails("call or(1.0, 1)", 'E805:')
|
||||
call assert_fails("call or([], 1)", 'E745:')
|
||||
call assert_fails("call or({}, 1)", 'E728:')
|
||||
call assert_fails("call or(1, 1.0)", 'E805:')
|
||||
call assert_fails("call or(1, [])", 'E745:')
|
||||
call assert_fails("call or(1, {})", 'E728:')
|
||||
" xor
|
||||
call assert_equal(0, xor(127, 127))
|
||||
call assert_equal(111, xor(127, 16))
|
||||
call assert_equal(255, xor(127, 128))
|
||||
call assert_fails("call xor(1.0, 1)", 'E805:')
|
||||
call assert_fails("call xor([], 1)", 'E745:')
|
||||
call assert_fails("call xor({}, 1)", 'E728:')
|
||||
call assert_fails("call xor(1, 1.0)", 'E805:')
|
||||
call assert_fails("call xor(1, [])", 'E745:')
|
||||
call assert_fails("call xor(1, {})", 'E728:')
|
||||
" invert
|
||||
call assert_equal(65408, and(invert(127), 65535))
|
||||
call assert_equal(65519, and(invert(16), 65535))
|
||||
call assert_equal(65407, and(invert(128), 65535))
|
||||
call assert_fails("call invert(1.0)", 'E805:')
|
||||
call assert_fails("call invert([])", 'E745:')
|
||||
call assert_fails("call invert({})", 'E728:')
|
||||
endfunc
|
||||
|
||||
"-------------------------------------------------------------------------------
|
||||
" Modelines {{{1
|
||||
" vim: ts=8 sw=4 tw=80 fdm=marker
|
||||
|
||||
@@ -764,6 +764,40 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
622,
|
||||
/**/
|
||||
621,
|
||||
/**/
|
||||
620,
|
||||
/**/
|
||||
619,
|
||||
/**/
|
||||
618,
|
||||
/**/
|
||||
617,
|
||||
/**/
|
||||
616,
|
||||
/**/
|
||||
615,
|
||||
/**/
|
||||
614,
|
||||
/**/
|
||||
613,
|
||||
/**/
|
||||
612,
|
||||
/**/
|
||||
611,
|
||||
/**/
|
||||
610,
|
||||
/**/
|
||||
609,
|
||||
/**/
|
||||
608,
|
||||
/**/
|
||||
607,
|
||||
/**/
|
||||
606,
|
||||
/**/
|
||||
605,
|
||||
/**/
|
||||
|
||||
@@ -958,6 +958,14 @@ extern int (*dyn_libintl_putenv)(const char *envstring);
|
||||
#define GETF_ALT 0x02 /* jumping to alternate file (not buf num) */
|
||||
#define GETF_SWITCH 0x04 /* respect 'switchbuf' settings when jumping */
|
||||
|
||||
/* Return values of getfile() */
|
||||
#define GETFILE_ERROR 1 /* normal error */
|
||||
#define GETFILE_NOT_WRITTEN 2 /* "not written" error */
|
||||
#define GETFILE_SAME_FILE 0 /* success, same file */
|
||||
#define GETFILE_OPEN_OTHER -1 /* success, opened another file */
|
||||
#define GETFILE_UNUSED 8
|
||||
#define GETFILE_SUCCESS(x) ((x) <= 0)
|
||||
|
||||
/* Values for buflist_new() flags */
|
||||
#define BLN_CURBUF 1 /* may re-use curbuf for new buffer */
|
||||
#define BLN_LISTED 2 /* put new buffer in buffer list */
|
||||
|
||||
Reference in New Issue
Block a user