mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-02 11:19:22 +02:00
Compare commits
57 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 944363144a | |||
| 7cdd910164 | |||
| 24d55e3b5f | |||
| 8015cac16f | |||
| e268fb8d67 | |||
| 2791ea7877 | |||
| b5690794cf | |||
| 1738058e27 | |||
| da22ab4d96 | |||
| 8a3df4e50b | |||
| 7ae4136fcd | |||
| 616c7a5e61 | |||
| ef2b5036b3 | |||
| 7ae4fbca55 | |||
| fdab75e5b9 | |||
| 0fa9a5392d | |||
| adaa23b0e4 | |||
| d79e55016c | |||
| 507edf63df | |||
| a52dfaed10 | |||
| e1edc1caba | |||
| 4514d2769b | |||
| 858b96f382 | |||
| 254b105b75 | |||
| f32c5cd6e0 | |||
| b86a343280 | |||
| acb4f221c7 | |||
| d08a8d4a31 | |||
| 30a89473ee | |||
| 6a3c8aff04 | |||
| 05fe017c1a | |||
| 5fa4d448fb | |||
| 523f23de6e | |||
| 28fb79db6b | |||
| 44132a10ae | |||
| 450919587d | |||
| cfc0a350a9 | |||
| 8a5115cf18 | |||
| 5f24542e5e | |||
| 71bcfdf301 | |||
| 449538c3d2 | |||
| 64496ffc9c | |||
| 25e4fcde76 | |||
| 7b877b3605 | |||
| 4d1c0a4441 | |||
| d161d7b64a | |||
| eca99bd45f | |||
| 0bee2fe25a | |||
| 285bf84b4b | |||
| 6602af7fe0 | |||
| fd39d08fb6 | |||
| 75bdf6aa30 | |||
| 2b7db933b0 | |||
| ca1fe98517 | |||
| a61018d7e0 | |||
| 72c357d44d | |||
| e7893a4088 |
@@ -7,6 +7,7 @@ SRC_ALL = \
|
||||
.travis.yml \
|
||||
appveyor.yml \
|
||||
src/README.txt \
|
||||
src/alloc.h \
|
||||
src/arabic.c \
|
||||
src/arabic.h \
|
||||
src/ascii.h \
|
||||
|
||||
+10
-1
@@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 7.4. Last change: 2016 Jan 03
|
||||
*eval.txt* For Vim version 7.4. Last change: 2016 Jan 09
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1739,6 +1739,8 @@ USAGE RESULT DESCRIPTION ~
|
||||
abs( {expr}) Float or Number absolute value of {expr}
|
||||
acos( {expr}) Float arc cosine of {expr}
|
||||
add( {list}, {item}) List append {item} to |List| {list}
|
||||
alloc_fail( {id}, {countdown}, {repeat})
|
||||
none make memory allocation fail
|
||||
and( {expr}, {expr}) Number bitwise AND
|
||||
append( {lnum}, {string}) Number append {string} below line {lnum}
|
||||
append( {lnum}, {list}) Number append lines {list} below line {lnum}
|
||||
@@ -2118,6 +2120,13 @@ add({list}, {expr}) *add()*
|
||||
Use |insert()| to add an item at another position.
|
||||
|
||||
|
||||
alloc_fail({id}, {countdown}, {repeat}) *alloc_fail()*
|
||||
This is for testing: If the memory allocation with {id} is
|
||||
called, then decrement {countdown}, and when it reaches zero
|
||||
let memory allocation fail {repeat} times. When {repeat} is
|
||||
smaller than one it fails one time.
|
||||
|
||||
|
||||
and({expr}, {expr}) *and()*
|
||||
Bitwise AND on the two arguments. The arguments are converted
|
||||
to a number. A List, Dict or Float argument causes an error.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*help.txt* For Vim version 7.4. Last change: 2015 Jun 21
|
||||
*help.txt* For Vim version 7.4. Last change: 2016 Jan 09
|
||||
|
||||
VIM - main help file
|
||||
k
|
||||
@@ -25,6 +25,8 @@ Get specific help: It is possible to go directly to whatever you want help
|
||||
Vim command argument - :help -r
|
||||
Option ' :help 'textwidth'
|
||||
Regular expression / :help /[
|
||||
Also see |help-summary| for a verbose explanation.
|
||||
|
||||
Search for help: Type ":help word", then hit CTRL-D to see matching
|
||||
help entries for "word".
|
||||
Or use ":helpgrep word". |:helpgrep|
|
||||
|
||||
+15
-5
@@ -515,12 +515,15 @@ startup file (usually "~/.vimrc" on Unix):
|
||||
==============================================================================
|
||||
9. Dynamic loading *tcl-dynamic*
|
||||
|
||||
On MS-Windows the Tcl library can be loaded dynamically. The |:version|
|
||||
output then includes |+tcl/dyn|.
|
||||
On MS-Windows and Unix the Tcl library can be loaded dynamically. The
|
||||
|:version| output then includes |+tcl/dyn|.
|
||||
|
||||
This means that Vim will search for the Tcl DLL file only when needed. When
|
||||
you don't use the Tcl interface you don't need it, thus you can use Vim
|
||||
without this DLL file.
|
||||
This means that Vim will search for the Tcl DLL or shared library file only
|
||||
when needed. When you don't use the Tcl interface you don't need it, thus you
|
||||
can use Vim without this file.
|
||||
|
||||
|
||||
MS-Windows ~
|
||||
|
||||
To use the Tcl interface the Tcl DLL must be in your search path. In a
|
||||
console window type "path" to see what directories are used.
|
||||
@@ -529,5 +532,12 @@ The name of the DLL must match the Tcl version Vim was compiled with.
|
||||
Currently the name is "tcl86.dll". That is for Tcl 8.6. To know for sure
|
||||
edit "gvim.exe" and search for "tcl\d*.dll\c".
|
||||
|
||||
|
||||
Unix ~
|
||||
|
||||
The 'tcldll' option can be used to specify the Tcl shared library file instead
|
||||
of DYNAMIC_TCL_DLL file what was specified at compile time. The version of
|
||||
the shared library must match the Tcl version Vim was compiled with.
|
||||
|
||||
==============================================================================
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*index.txt* For Vim version 7.4. Last change: 2016 Jan 03
|
||||
*index.txt* For Vim version 7.4. Last change: 2016 Jan 10
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1055,7 +1055,7 @@ tag command action in Command-line editing mode ~
|
||||
|c_<Insert>| <Insert> toggle insert/overstrike mode
|
||||
|c_<LeftMouse>| <LeftMouse> cursor at mouse click
|
||||
|
||||
You found it, Arthur! *holy-grail*
|
||||
You found it, Arthur! *holy-grail* *:smile*
|
||||
|
||||
==============================================================================
|
||||
5. EX commands *ex-cmd-index* *:index*
|
||||
@@ -1176,7 +1176,7 @@ tag command action ~
|
||||
|:cpfile| :cpf[ile] go to last error in previous file
|
||||
|:cquit| :cq[uit] quit Vim with an error code
|
||||
|:crewind| :cr[ewind] go to the specified error, default first one
|
||||
|:cscope| :cs[cope] execute cscope command
|
||||
|:cscope| :cs[cope] execute cscope command
|
||||
|:cstag| :cst[ag] use cscope to jump to a tag
|
||||
|:cunmap| :cu[nmap] like ":unmap" but for Command-line mode
|
||||
|:cunabbrev| :cuna[bbrev] like ":unabbrev" but for Command-line mode
|
||||
@@ -1297,7 +1297,7 @@ tag command action ~
|
||||
|:lcd| :lc[d] change directory locally
|
||||
|:lchdir| :lch[dir] change directory locally
|
||||
|:lclose| :lcl[ose] close location window
|
||||
|:lcscope| :lcs[cope] like ":cscope" but uses location list
|
||||
|:lcscope| :lcs[cope] like ":cscope" but uses location list
|
||||
|:ldo| :ld[o] execute command in valid location list entries
|
||||
|:lfdo| :lfd[o] execute command in each file in location list
|
||||
|:left| :le[ft] left align lines
|
||||
@@ -1353,7 +1353,7 @@ tag command action ~
|
||||
|:marks| :marks list all marks
|
||||
|:match| :mat[ch] define a match to highlight
|
||||
|:menu| :me[nu] enter a new menu item
|
||||
|:menutranslate| :menut[ranslate] add a menu translation item
|
||||
|:menutranslate| :menut[ranslate] add a menu translation item
|
||||
|:messages| :mes[sages] view previously displayed messages
|
||||
|:mkexrc| :mk[exrc] write current mappings and settings to a file
|
||||
|:mksession| :mks[ession] write session info to a file
|
||||
@@ -1497,7 +1497,7 @@ tag command action ~
|
||||
|:smap| :smap like ":map" but for Select mode
|
||||
|:smapclear| :smapc[lear] remove all mappings for Select mode
|
||||
|:smenu| :sme[nu] add menu for Select mode
|
||||
|:smile| :smi[le] make the user happy
|
||||
|:smile| :smi[le] make the user happy
|
||||
|:snext| :sn[ext] split window and go to next file in the
|
||||
argument list
|
||||
|:sniff| :sni[ff] send request to sniff
|
||||
@@ -1520,7 +1520,7 @@ tag command action ~
|
||||
|:stop| :st[op] suspend the editor or escape to a shell
|
||||
|:stag| :sta[g] split window and jump to a tag
|
||||
|:startinsert| :star[tinsert] start Insert mode
|
||||
|:startgreplace| :startg[replace] start Virtual Replace mode
|
||||
|:startgreplace| :startg[replace] start Virtual Replace mode
|
||||
|:startreplace| :startr[eplace] start Replace mode
|
||||
|:stopinsert| :stopi[nsert] stop Insert mode
|
||||
|:stjump| :stj[ump] do ":tjump" and split window
|
||||
|
||||
+36
-22
@@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 7.4. Last change: 2016 Jan 03
|
||||
*options.txt* For Vim version 7.4. Last change: 2016 Jan 09
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -4958,13 +4958,13 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
reset this option. |-u| |--noplugin|
|
||||
|
||||
*'luadll'*
|
||||
'luadll' string (default empty)
|
||||
'luadll' string (default depends on the build)
|
||||
global
|
||||
{not in Vi} {only for Unix}
|
||||
{not in Vi}
|
||||
{only available when compiled with the |+lua/dyn|
|
||||
feature}
|
||||
Specifies the path of the Lua shared library instead of DYNAMIC_LUA_DLL
|
||||
what was specified at compile time.
|
||||
Specifies the name of the Lua shared library. The default is
|
||||
DYNAMIC_LUA_DLL, which was specified at compile time.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
@@ -5433,7 +5433,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Negative or zero value means no thread scheduling.
|
||||
|
||||
*'nrformats'* *'nf'*
|
||||
'nrformats' 'nf' string (default "octal,hex")
|
||||
'nrformats' 'nf' string (default "bin,octal,hex")
|
||||
local to buffer
|
||||
{not in Vi}
|
||||
This defines what bases Vim will consider for numbers when using the
|
||||
@@ -5447,6 +5447,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
hex If included, numbers starting with "0x" or "0X" will be
|
||||
considered to be hexadecimal. Example: Using CTRL-X on
|
||||
"0x100" results in "0x0ff".
|
||||
bin If included, numbers starting with "0b" or "0B" will be
|
||||
considered to be binary. Example: Using CTRL-X on
|
||||
"0b1000" subtracts one, resulting in "0b0111".
|
||||
Numbers which simply begin with a digit in the range 1-9 are always
|
||||
considered decimal. This also happens for numbers that are not
|
||||
recognized as octal or hex.
|
||||
@@ -5701,13 +5704,13 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
this doesn't work when $INCL contains a comma or white space.
|
||||
|
||||
*'perldll'*
|
||||
'perldll' string (default empty)
|
||||
'perldll' string (default depends on the build)
|
||||
global
|
||||
{not in Vi} {only for Unix}
|
||||
{not in Vi}
|
||||
{only available when compiled with the |+perl/dyn|
|
||||
feature}
|
||||
Specifies the path of the Perl shared library instead of
|
||||
DYNAMIC_PERL_DLL what was specified at compile time.
|
||||
Specifies the name of the Perl shared library. The default is
|
||||
DYNAMIC_PERL_DLL, which was specified at compile time.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
@@ -5838,24 +5841,24 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|ins-completion-menu|.
|
||||
|
||||
*'pythondll'*
|
||||
'pythondll' string (default empty)
|
||||
'pythondll' string (default depends on the build)
|
||||
global
|
||||
{not in Vi} {only for Unix}
|
||||
{not in Vi}
|
||||
{only available when compiled with the |+python/dyn|
|
||||
feature}
|
||||
Specifies the path of the Python 2.x shared library instead of
|
||||
DYNAMIC_PYTHON_DLL what was specified at compile time.
|
||||
Specifies the name of the Python 2.x shared library. The default is
|
||||
DYNAMIC_PYTHON_DLL, which was specified at compile time.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
*'pythonthreedll'*
|
||||
'pythonthreedll' string (default empty)
|
||||
'pythonthreedll' string (default depends on the build)
|
||||
global
|
||||
{not in Vi} {only for Unix}
|
||||
{not in Vi}
|
||||
{only available when compiled with the |+python3/dyn|
|
||||
feature}
|
||||
Specifies the path of the Python 3 shared library instead of
|
||||
DYNAMIC_PYTHON3_DLL what was specified at compile time.
|
||||
Specifies the name of the Python 3 shared library. The default is
|
||||
DYNAMIC_PYTHON3_DLL, which was specified at compile time.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
@@ -6079,13 +6082,13 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
The 'rightleft' option must be set for 'rightleftcmd' to take effect.
|
||||
|
||||
*'rubydll'*
|
||||
'rubydll' string (default empty)
|
||||
'rubydll' string (default: depends on the build)
|
||||
global
|
||||
{not in Vi} {only for Unix}
|
||||
{not in Vi}
|
||||
{only available when compiled with the |+ruby/dyn|
|
||||
feature}
|
||||
Specifies the path of the Ruby shared library instead of
|
||||
DYNAMIC_RUBY_DLL what was specified at compile time.
|
||||
Specifies the name of the Ruby shared library. The default is
|
||||
DYNAMIC_RUBY_DLL, which was specified at compile time.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
@@ -7570,6 +7573,17 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Resetting this option is useful when using a ":tag" command in a
|
||||
mapping which should not change the tagstack.
|
||||
|
||||
*'tcldll'*
|
||||
'tcldll' string (default depends on the build)
|
||||
global
|
||||
{not in Vi}
|
||||
{only available when compiled with the |+tcl/dyn|
|
||||
feature}
|
||||
Specifies the name of the Tcl shared library. The default is
|
||||
DYNAMIC_TCL_DLL, which was specified at compile time.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
*'term'* *E529* *E530* *E531*
|
||||
'term' string (default is $TERM, if that fails:
|
||||
in the GUI: "builtin_gui"
|
||||
|
||||
@@ -914,6 +914,7 @@ Short explanation of each option: *option-list*
|
||||
'tagrelative' 'tr' file names in tag file are relative
|
||||
'tags' 'tag' list of file names used by the tag command
|
||||
'tagstack' 'tgst' push tags onto the tag stack
|
||||
'tcldll' name of the Tcl dynamic library
|
||||
'term' name of the terminal
|
||||
'termbidi' 'tbidi' terminal takes care of bi-directionality
|
||||
'termencoding' 'tenc' character encoding used by the terminal
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*spell.txt* For Vim version 7.4. Last change: 2014 Sep 19
|
||||
*spell.txt* For Vim version 7.4. Last change: 2016 Jan 08
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1386,6 +1386,14 @@ the item name. Case is always ignored.
|
||||
|
||||
The Hunspell feature to use three arguments and flags is not supported.
|
||||
|
||||
*spell-NOCOMPOUNDSUGS*
|
||||
This item indicates that using compounding to make suggestions is not a good
|
||||
idea. Use this when compounding is used with very short or one-character
|
||||
words. E.g. to make numbers out of digits. Without this flag creating
|
||||
suggestions would spend most time trying all kind of weird compound words.
|
||||
|
||||
NOCOMPOUNDSUGS ~
|
||||
|
||||
*spell-SYLLABLE*
|
||||
The SYLLABLE item defines characters or character sequences that are used to
|
||||
count the number of syllables in a word. Example:
|
||||
|
||||
@@ -1048,6 +1048,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
'tbis' options.txt /*'tbis'*
|
||||
'tbs' options.txt /*'tbs'*
|
||||
'tc' options.txt /*'tc'*
|
||||
'tcldll' options.txt /*'tcldll'*
|
||||
'tenc' options.txt /*'tenc'*
|
||||
'term' options.txt /*'term'*
|
||||
'termbidi' options.txt /*'termbidi'*
|
||||
@@ -2872,6 +2873,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
:smapclear map.txt /*:smapclear*
|
||||
:sme gui.txt /*:sme*
|
||||
:smenu gui.txt /*:smenu*
|
||||
:smile index.txt /*:smile*
|
||||
:sn windows.txt /*:sn*
|
||||
:snext windows.txt /*:snext*
|
||||
:sni if_sniff.txt /*:sni*
|
||||
@@ -4922,6 +4924,7 @@ added-win32-GUI version5.txt /*added-win32-GUI*
|
||||
aff-dic-format spell.txt /*aff-dic-format*
|
||||
after-directory options.txt /*after-directory*
|
||||
aleph options.txt /*aleph*
|
||||
alloc_fail() eval.txt /*alloc_fail()*
|
||||
alt intro.txt /*alt*
|
||||
alt-input debugger.txt /*alt-input*
|
||||
alt-movement gui_mac.txt /*alt-movement*
|
||||
@@ -8077,6 +8080,7 @@ spell-NAME spell.txt /*spell-NAME*
|
||||
spell-NEEDAFFIX spell.txt /*spell-NEEDAFFIX*
|
||||
spell-NEEDCOMPOUND spell.txt /*spell-NEEDCOMPOUND*
|
||||
spell-NOBREAK spell.txt /*spell-NOBREAK*
|
||||
spell-NOCOMPOUNDSUGS spell.txt /*spell-NOCOMPOUNDSUGS*
|
||||
spell-NOSPLITSUGS spell.txt /*spell-NOSPLITSUGS*
|
||||
spell-NOSUGFILE spell.txt /*spell-NOSUGFILE*
|
||||
spell-NOSUGGEST spell.txt /*spell-NOSUGGEST*
|
||||
@@ -9048,6 +9052,7 @@ winwidth() eval.txt /*winwidth()*
|
||||
word motion.txt /*word*
|
||||
word-count editing.txt /*word-count*
|
||||
word-motions motion.txt /*word-motions*
|
||||
wordcount() eval.txt /*wordcount()*
|
||||
workbench starting.txt /*workbench*
|
||||
workshop workshop.txt /*workshop*
|
||||
workshop-commands workshop.txt /*workshop-commands*
|
||||
|
||||
+46
-24
@@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 7.4. Last change: 2016 Jan 03
|
||||
*todo.txt* For Vim version 7.4. Last change: 2016 Jan 10
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -34,6 +34,8 @@ not be repeated below, unless there is extra information.
|
||||
*known-bugs*
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
/tmp/test_increment_new_style.patch.2
|
||||
|
||||
Regexp problems:
|
||||
- The regexp engines are not reentrant, causing havoc when interrupted by a
|
||||
remote expression or something else. Move global variables onto the stack
|
||||
@@ -76,10 +78,13 @@ Regexp problems:
|
||||
matches the empty string. (Dominique Pelle, 2015 Oct 2, Nov 24)
|
||||
- Search for \\~ causes error E874.
|
||||
|
||||
Need better instructions about how to install all interfaces and how to build
|
||||
Vim with them.
|
||||
For Ruby: https://github.com/ruby/ruby/tree/trunk/win32
|
||||
Or use Ken Takata's hack.
|
||||
Help to build with interfaces. (Ken Takata, 2015 Jan 5)
|
||||
|
||||
Need to try out instructions in INSSTALLpc.txt about how to install all
|
||||
interfaces and how to build Vim with them.
|
||||
Appveyor build with self-installing executable, includes getting most
|
||||
interfaces: https://github.com/k-takata/vim/tree/chrisbra-appveyor-build
|
||||
result: https://ci.appveyor.com/project/k-takata/vim/history
|
||||
|
||||
Still using freed memory after using setloclist(). (lcd, 2014 Jul 23)
|
||||
More info Jul 24. Not clear why.
|
||||
@@ -96,6 +101,10 @@ Should use /usr/local/share/applications or /usr/share/applications.
|
||||
Or use $XDG_DATA_DIRS.
|
||||
Also need to run update-desktop-database (Kuriyama Kazunobu, 2015 Nov 4)
|
||||
|
||||
Patch to update the help summary. (Christian Brabandt, 2015 Jan 10)
|
||||
|
||||
Add has('crypt-blowfish') and has('crypt-blowfish2') (Smu Johnson)
|
||||
|
||||
Access to uninitialized memory in match_backref() regexp_nda.c:4882
|
||||
(Dominique Pelle, 2015 Nov 6)
|
||||
|
||||
@@ -105,12 +114,23 @@ directory exists. (Sergio Gallelli, 2013 Dec 29)
|
||||
Using ":windo" to set options in all windows has the side effect that it
|
||||
changes the window layout and the current window. Make a variant that saves
|
||||
and restores. Use in the matchparen plugin.
|
||||
Perhaps we can use "window <restore> {cmd}"?
|
||||
Perhaps we can use ":windo <restore> {cmd}"?
|
||||
Patch to add <restore> to :windo, :bufdo, etc. (Christian Brabandt, 2015 Jan
|
||||
6, 2nd message)
|
||||
Alternative: ":keeppos" command modifier: ":keeppos windo {cmd}".
|
||||
|
||||
Illegal memory access, requires ASAN to see. (Dominique Pelle, 2015 Jul 28)
|
||||
|
||||
Gvim: when both Tab and CTRL-I are mapped, use CTRL-I not for Tab.
|
||||
|
||||
Patch to fix "." after CTRL-A in Visual block mode. (Ozaki Kiichi, 2015 Oct
|
||||
24)
|
||||
|
||||
Patch to have CTRL-A and CTRL-X update the '[ and '] marks.
|
||||
(Yukihiro Nakadaira, 2015 Aug 23)
|
||||
|
||||
Patch for GVimExt building with VS2015. (Mike Williams, 2015 Jan 10)
|
||||
|
||||
Unexpected delay when using CTRL-O u. It's not timeoutlen.
|
||||
(Gary Johnson, 2015 Aug 28)
|
||||
|
||||
@@ -128,27 +148,28 @@ set_color_count().
|
||||
|
||||
Python: ":py raw_input('prompt')" doesn't work. (Manu Hack)
|
||||
|
||||
Patch to add wordcount(). (Christian Brabandt, 2015 Nov 27)
|
||||
|
||||
Plugin to use Vim in MANPAGER. Konfekt, PR #491
|
||||
|
||||
Using uninitialized memory. (Dominique Pelle, 2015 Nov 4)
|
||||
|
||||
Patch for explaining the help. (Christian Brabandt, 2015 Jan 8)
|
||||
Should be in the user manual?
|
||||
|
||||
Patch to recognize string slice for variable followed by colon.
|
||||
(Hirohito Higashi, 2015 Nov 24)
|
||||
|
||||
Patch to add debug backtrace. (Alberto Fanjul, 2015 Sep 27)
|
||||
Update 2016 Jan 2. Issue #433
|
||||
|
||||
Patch to make mzscheme (racket) interface work. (Yukihiro Nakadaira, 2015 Jan
|
||||
10) Doesn't work for me, need to build from source.
|
||||
|
||||
MS-Windows: When editing a file with a leading space, writing it uses the
|
||||
wrong name. (Aram, 2014 Nov 7) Vim 7.4.
|
||||
|
||||
Can't recognize the $ProgramFiles(x86) environment variable. Recognize it
|
||||
specifically? First try with the parens, then without.
|
||||
|
||||
Patch to fix "." after CTRL-A in Visual block mode. (Ozaki Kiichi, 2015 Oct
|
||||
24)
|
||||
|
||||
Half-finished patch to fix the Problem using cgn to change a search hit when
|
||||
replacement includes hit. Reported by John Beckett, fix by Christian Brabandt,
|
||||
2015 Dec 14, Update Dec 15.
|
||||
@@ -159,7 +180,7 @@ Patch to make building GVimExt with VS2015. (Mike Williams, 2015 Dec 13)
|
||||
Value returned by virtcol() changes depending on how lines wrap. This is
|
||||
inconsistent with the documentation.
|
||||
|
||||
Patch to add perleval(). (Damien, 2015 Dec 8)
|
||||
Patch to add perleval(). (Damien, 2015 Dec 8, update 2016 Jan 4)
|
||||
|
||||
Can we cache the syntax attributes, so that updates for 'relativenumber' and
|
||||
'cursorline'/'cursorcolumn' are a lot faster?
|
||||
@@ -195,6 +216,11 @@ Nov 29)
|
||||
If libiconv.dll is not found search for libiconv2.dll. (Yasuhiro Matsumoto,
|
||||
2015 Oct 7)
|
||||
|
||||
Using an external diff is inefficient. Not all systems have a good diff
|
||||
program available (esp. MS-Windows). Would be nice to have in internal diff
|
||||
implementation. Can then also use this for displaying changes within a line.
|
||||
Olaf Dabrunz is working on this.
|
||||
|
||||
The OptionSet autocommand event is not always triggered. (Rick Howe, 2015 Sep
|
||||
24): :diffthis, :diffoff.
|
||||
|
||||
@@ -227,12 +253,16 @@ Sep 10)
|
||||
Patch to be able to use hex numbers with :digraph. (Lcd, 2015 Sep 6)
|
||||
Update Sep 7. Update by Christian Brabandt, 2015 Sep 8.
|
||||
|
||||
Patch to improve I/O for Perl. (Damine, 2015 Jan 9)
|
||||
|
||||
Patch to set antialiasing style on Windows. (Ondrej Balaz, 2013 Mar 14)
|
||||
Needs a different check for CLEARTYPE_QUALITY.
|
||||
Problem mentioned by Christian Brabandt, 2016 Jan 4.
|
||||
|
||||
Example in editing.txt uses $HOME with the expectating that it ends in a
|
||||
slash. For me it does, but perhaps not for everybody. Add a function that
|
||||
inserts a slash when needed? pathconcat(dir, path) (Thilo Six, 2015 Aug 12)
|
||||
|
||||
Patch to load TCL dynamically. (Ken Takata, 2015 Nov 11)
|
||||
|
||||
ml_updatechunk() is slow when retrying for another encoding. (John Little,
|
||||
2014 Sep 11)
|
||||
|
||||
@@ -263,9 +293,6 @@ Work in progress.
|
||||
Patch for global-local options consistency. (Arnaud Decara, 2015 Jul 22)
|
||||
Is this right?
|
||||
|
||||
Patch to have CTRL-A and CTRL-X update the '[ and '] marks.
|
||||
(Yukihiro Nakadaira, 2015 Aug 23)
|
||||
|
||||
Patch to make getregtype() return the right size for non-linux systems.
|
||||
(Yasuhiro Matsumoto, 2014 Jul 8)
|
||||
Breaks test_eval. Inefficient, can we only compute y_width when needed?
|
||||
@@ -359,7 +386,7 @@ Patch for ordered dict. (Ozaki Kiichi, 2015 May 7)
|
||||
Patch to make closed folds line up. (Charles Campbell, 2014 Sep 12)
|
||||
Remark from Roland Eggner: does it cause crashes? (2014 Dec 12)
|
||||
Updated patch by Roland Eggner, Dec 16
|
||||
Updated patch from Charles, Dec 29.
|
||||
Updated patch from Charles, 2016 Jan 4.
|
||||
|
||||
Patch to open folds for 'incsearch'. (Christian Brabandt, 2015 Jan 6)
|
||||
|
||||
@@ -672,9 +699,6 @@ Patch by Christian Brabandt, 2013 Apr 20, unfinished.
|
||||
|
||||
Bug: findfile("any", "file:///tmp;") does not work.
|
||||
|
||||
Patch to set antialiasing style on Windows. (Ondrej Balaz, 2013 Mar 14)
|
||||
Needs a different check for CLEARTYPE_QUALITY.
|
||||
|
||||
In the ATTENTION message about an existing swap file, mention the name of the
|
||||
process that is running. It might actually be some other program, e.g. after
|
||||
a reboot.
|
||||
@@ -2746,8 +2770,7 @@ Macintosh:
|
||||
8 On MS-Windows ":make" doesn't show output while it is working. Use the
|
||||
tee.exe from http://unxutils.sourceforge.net/ ? About 16 Kbyte in the
|
||||
UnxUtils.zip archive.
|
||||
Alternate one: http://www.pramodx.20m.com/tee_for_win32.htm, but Walter
|
||||
Briscoe says it's not as good.
|
||||
Is it better than what we have in src/tee?
|
||||
8 When doing Insert mode completion a mapping cannot recursively call
|
||||
edit(), because the completion information is global. Put everything in
|
||||
an allocated structure?
|
||||
@@ -4632,7 +4655,6 @@ Visual mode:
|
||||
6 ":left" and ":right" should work in Visual block mode.
|
||||
7 CTRL-I and CTRL-O should work in Visual mode, but only jump to marks in the
|
||||
current buffer.
|
||||
7 CTRL-A and CTRL-X should increase/decrease all numbers in the Visual area.
|
||||
6 In non-Block mode, "I" should insert the same text in front of each line,
|
||||
before the first non-blank, "gI" in column 1.
|
||||
6 In non-Block mode, "A" should append the same text after each line.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_03.txt* For Vim version 7.4. Last change: 2015 Dec 12
|
||||
*usr_03.txt* For Vim version 7.4. Last change: 2016 Jan 05
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -413,8 +413,8 @@ in "the" use: >
|
||||
/the\>
|
||||
|
||||
The "\>" item is a special marker that only matches at the end of a word.
|
||||
Similarly "\<" only matches at the begin of a word. Thus to search for the
|
||||
word "the" only: >
|
||||
Similarly "\<" only matches at the beginning of a word. Thus to search for
|
||||
the word "the" only: >
|
||||
|
||||
/\<the\>
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: hg (Mercurial) commit file
|
||||
" Maintainer: Ken Takata <kentkt at csc dot jp>
|
||||
" Last Change: 2016 Jan 6
|
||||
" Filenames: hg-editor-*.txt
|
||||
" License: VIM License
|
||||
" URL: https://github.com/k-takata/hg-vim
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
setlocal nomodeline
|
||||
|
||||
let b:undo_ftplugin = 'setl modeline<'
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: Lua script
|
||||
" Maintainer: Marcus Aurelius Farias <marcus.cf 'at' bol.com.br>
|
||||
" First Author: Max Ischenko <mfi 'at' ukr.net>
|
||||
" Last Change: 2014 Nov 12
|
||||
" Last Change: 2016 Jan 10
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
@@ -52,9 +52,9 @@ function! GetLuaIndent()
|
||||
endif
|
||||
endif
|
||||
|
||||
" Subtract a 'shiftwidth' on end, else (and elseif), until and '}'
|
||||
" Subtract a 'shiftwidth' on end, else, elseif, until and '}'
|
||||
" This is the part that requires 'indentkeys'.
|
||||
let midx = match(getline(v:lnum), '^\s*\%(end\>\|else\>\|until\>\|}\)')
|
||||
let midx = match(getline(v:lnum), '^\s*\%(end\>\|else\>\|elseif\>\|until\>\|}\)')
|
||||
if midx != -1 && synIDattr(synID(v:lnum, midx + 1, 1), "name") != "luaComment"
|
||||
let ind = ind - &shiftwidth
|
||||
endif
|
||||
|
||||
+6
-2
@@ -809,7 +809,7 @@ call append("$", "infercase\tadjust case of a keyword completion match")
|
||||
call append("$", "\t(local to buffer)")
|
||||
call <SID>BinOptionL("inf")
|
||||
if has("digraphs")
|
||||
call append("$", "digraph\tenable entering digraps with c1 <BS> c2")
|
||||
call append("$", "digraph\tenable entering digraphs with c1 <BS> c2")
|
||||
call <SID>BinOptionG("dg", &dg)
|
||||
endif
|
||||
call append("$", "tildeop\tthe \"~\" command behaves like an operator")
|
||||
@@ -1214,7 +1214,7 @@ if has("arabic")
|
||||
call <SID>BinOptionG("tbidi", &tbidi)
|
||||
endif
|
||||
if has("keymap")
|
||||
call append("$", "keymap\tname of a keyboard mappping")
|
||||
call append("$", "keymap\tname of a keyboard mapping")
|
||||
call <SID>OptionL("kmp")
|
||||
endif
|
||||
if has("langmap")
|
||||
@@ -1346,6 +1346,10 @@ if exists("&rubydll")
|
||||
call append("$", "rubydll\tname of the Ruby dynamic library")
|
||||
call <SID>OptionG("rubydll", &rubydll)
|
||||
endif
|
||||
if exists("&tcldll")
|
||||
call append("$", "tcldll\tname of the Tcl dynamic library")
|
||||
call <SID>OptionG("tcldll", &tcldll)
|
||||
endif
|
||||
|
||||
set cpo&vim
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+77
-48
@@ -1,5 +1,5 @@
|
||||
*** en_AU.orig.aff 2010-05-15 13:03:47.000000000 +0200
|
||||
--- en_AU.aff 2015-12-30 19:08:16.916527503 +0100
|
||||
--- en_AU.aff 2016-01-09 13:15:38.426627871 +0100
|
||||
***************
|
||||
*** 7,9 ****
|
||||
SET ISO8859-1
|
||||
@@ -148,7 +148,8 @@
|
||||
!
|
||||
REP 24
|
||||
***************
|
||||
*** 34,53 ****
|
||||
*** 33,53 ****
|
||||
REP ght t
|
||||
PFX A Y 2
|
||||
! PFX A 0 re [^e]
|
||||
! PFX A 0 re- e
|
||||
@@ -169,7 +170,25 @@
|
||||
PFX E Y 1
|
||||
! PFX E 0 dis .
|
||||
PFX F Y 5
|
||||
--- 172,191 ----
|
||||
--- 171,208 ----
|
||||
REP ght t
|
||||
+
|
||||
+ # This is disabled, because if Vim does not support NOCOMPOUNDSUGS giving
|
||||
+ # suggestions is extremely slow.
|
||||
+ ## ordinal numbers
|
||||
+ #COMPOUNDMIN 1
|
||||
+ ## only in compounds: 1th, 2th, 3th
|
||||
+ #ONLYINCOMPOUND ,
|
||||
+ ## compound rules:
|
||||
+ ## 1. [0-9]*1[0-9]th (10th, 11th, 12th, 56714th, etc.)
|
||||
+ ## 2. [0-9]*[02-9](1st|2nd|3rd|[4-9]th) (21st, 22nd, 123rd, 1234th, etc.)
|
||||
+ #COMPOUNDRULE 2
|
||||
+ #COMPOUNDRULE (*:)
|
||||
+ #COMPOUNDRULE (*{}
|
||||
+ #NOCOMPOUNDSUGS
|
||||
+
|
||||
+ # WORDCHARS 0123456789
|
||||
+
|
||||
PFX A Y 2
|
||||
! PFX A 0 re [^e]
|
||||
! PFX A 0 re- e
|
||||
@@ -587,7 +606,7 @@
|
||||
SFX T y iest [^aeiou]y
|
||||
! SFX T 0 er [aeiou]y
|
||||
SFX T 0 est [aeiou]y
|
||||
--- 195,589 ----
|
||||
--- 212,606 ----
|
||||
PFX F 0 col l
|
||||
! PFX F 0 con [^abehilmopru].
|
||||
PFX K Y 1
|
||||
@@ -1671,7 +1690,7 @@
|
||||
! SFX 3 0 ist's [aeioubp]y
|
||||
! SFX 3 o ist's o
|
||||
! SFX 3 0 ist's [^eoy]
|
||||
--- 596,1305 ----
|
||||
--- 613,1322 ----
|
||||
SFX R Y 72
|
||||
! SFX R 0 r e
|
||||
! SFX R 0 rs e
|
||||
@@ -2383,20 +2402,30 @@
|
||||
! # a few more for consistency
|
||||
! COMMON five six seven eight nine ten hundred thousand
|
||||
*** en_AU.orig.dic 2010-05-15 13:03:48.000000000 +0200
|
||||
--- en_AU.dic 2015-12-30 19:07:42.620898655 +0100
|
||||
--- en_AU.dic 2016-01-08 23:03:18.342461841 +0100
|
||||
***************
|
||||
*** 1,2 ****
|
||||
! 45654
|
||||
AA
|
||||
--- 1,2 ----
|
||||
--- 1,12 ----
|
||||
! 45653
|
||||
! 0th
|
||||
! 1st
|
||||
! 2nd
|
||||
! 3rd
|
||||
! 4th
|
||||
! 5th
|
||||
! 6th
|
||||
! 7th
|
||||
! 8th
|
||||
! 9th
|
||||
AA
|
||||
***************
|
||||
*** 912,914 ****
|
||||
Alaska/M
|
||||
! al/AY
|
||||
albacore/MS
|
||||
--- 912,914 ----
|
||||
--- 922,924 ----
|
||||
Alaska/M
|
||||
! really
|
||||
albacore/MS
|
||||
@@ -2405,10 +2434,10 @@
|
||||
bozo/SM
|
||||
- b/pb
|
||||
bpi
|
||||
--- 4885,4886 ----
|
||||
--- 4895,4896 ----
|
||||
***************
|
||||
*** 4921,4922 ****
|
||||
--- 4920,4922 ----
|
||||
--- 4930,4932 ----
|
||||
Brahms
|
||||
+ Bram/M
|
||||
braid/DGS
|
||||
@@ -2417,22 +2446,22 @@
|
||||
cad/ZSM
|
||||
- c/aE
|
||||
CAE
|
||||
--- 5753,5754 ----
|
||||
--- 5763,5764 ----
|
||||
***************
|
||||
*** 8535,8537 ****
|
||||
coniferous
|
||||
- conj
|
||||
conjectural
|
||||
--- 8534,8535 ----
|
||||
--- 8544,8545 ----
|
||||
***************
|
||||
*** 8544,8545 ****
|
||||
--- 8542,8544 ----
|
||||
--- 8552,8554 ----
|
||||
conjunctiva/MS
|
||||
+ conj.
|
||||
conjunctive/S
|
||||
***************
|
||||
*** 10288,10289 ****
|
||||
--- 10287,10291 ----
|
||||
--- 10297,10301 ----
|
||||
dB/M
|
||||
+ dBi
|
||||
+ dBm
|
||||
@@ -2443,10 +2472,10 @@
|
||||
DNA
|
||||
- d/o
|
||||
DOB
|
||||
--- 11783,11784 ----
|
||||
--- 11793,11794 ----
|
||||
***************
|
||||
*** 12468,12469 ****
|
||||
--- 12469,12471 ----
|
||||
--- 12479,12481 ----
|
||||
Dutch/5m
|
||||
+ Farsi
|
||||
Dutchwomen/M
|
||||
@@ -2455,19 +2484,19 @@
|
||||
dystrophy/M
|
||||
- e
|
||||
ea
|
||||
--- 12518,12519 ----
|
||||
--- 12528,12529 ----
|
||||
***************
|
||||
*** 12792,12794 ****
|
||||
e.g.
|
||||
- e.g..
|
||||
egad
|
||||
--- 12793,12794 ----
|
||||
--- 12803,12804 ----
|
||||
***************
|
||||
*** 13779,13781 ****
|
||||
estuary/MS
|
||||
! et
|
||||
ETA
|
||||
--- 13779,13782 ----
|
||||
--- 13789,13792 ----
|
||||
estuary/MS
|
||||
! et cetera
|
||||
! et al.
|
||||
@@ -2477,7 +2506,7 @@
|
||||
fjord/SM
|
||||
! f/K
|
||||
flab/2zZM
|
||||
--- 15297,15299 ----
|
||||
--- 15307,15309 ----
|
||||
fjord/SM
|
||||
! pref
|
||||
flab/2zZM
|
||||
@@ -2486,19 +2515,19 @@
|
||||
FYI
|
||||
- g/7
|
||||
gabardine/SM
|
||||
--- 16481,16482 ----
|
||||
--- 16491,16492 ----
|
||||
***************
|
||||
*** 18599,18601 ****
|
||||
HDTV
|
||||
- h/E
|
||||
headache/SM
|
||||
--- 18599,18600 ----
|
||||
--- 18609,18610 ----
|
||||
***************
|
||||
*** 19214,19216 ****
|
||||
Hobbes
|
||||
! hobbit
|
||||
hobble/RGSD
|
||||
--- 19213,19215 ----
|
||||
--- 19223,19225 ----
|
||||
Hobbes
|
||||
! hobbit/MS
|
||||
hobble/RGSD
|
||||
@@ -2507,34 +2536,34 @@
|
||||
jive/DSMG
|
||||
- j/k
|
||||
jnr.
|
||||
--- 21790,21791 ----
|
||||
--- 21800,21801 ----
|
||||
***************
|
||||
*** 22125,22127 ****
|
||||
kcal
|
||||
- k/E
|
||||
Keane
|
||||
--- 22123,22124 ----
|
||||
--- 22133,22134 ----
|
||||
***************
|
||||
*** 22606,22608 ****
|
||||
Kyushu/M
|
||||
- l/3
|
||||
label/AGaSD
|
||||
--- 22603,22604 ----
|
||||
--- 22613,22614 ----
|
||||
***************
|
||||
*** 22885,22887 ****
|
||||
lass/SM
|
||||
- last-ditch
|
||||
lasted/e
|
||||
--- 22881,22882 ----
|
||||
--- 22891,22892 ----
|
||||
***************
|
||||
*** 22890,22892 ****
|
||||
last/kJYDSG
|
||||
- last-minute
|
||||
lasts/e
|
||||
--- 22885,22886 ----
|
||||
--- 22895,22896 ----
|
||||
***************
|
||||
*** 26417,26418 ****
|
||||
--- 26411,26413 ----
|
||||
--- 26421,26423 ----
|
||||
Moolawatana
|
||||
+ Moolenaar/M
|
||||
Moomba
|
||||
@@ -2545,7 +2574,7 @@
|
||||
nationhood/M
|
||||
! nation/M
|
||||
nationwide
|
||||
--- 27183,27187 ----
|
||||
--- 27193,27197 ----
|
||||
nationals/4
|
||||
! national/sQq3SZ
|
||||
nationhood/M
|
||||
@@ -2553,7 +2582,7 @@
|
||||
nationwide
|
||||
***************
|
||||
*** 27194,27195 ****
|
||||
--- 27189,27192 ----
|
||||
--- 27199,27202 ----
|
||||
nativity/MS
|
||||
+ natively
|
||||
+ nativeness
|
||||
@@ -2563,28 +2592,28 @@
|
||||
nuzzle/SDG
|
||||
- n/xvuNVn
|
||||
Nyah
|
||||
--- 28362,28363 ----
|
||||
--- 28372,28373 ----
|
||||
***************
|
||||
*** 29464,29466 ****
|
||||
oz
|
||||
- o/z
|
||||
Ozark/MS
|
||||
--- 29460,29461 ----
|
||||
--- 29470,29471 ----
|
||||
***************
|
||||
*** 31035,31037 ****
|
||||
Pk
|
||||
- p/KF
|
||||
pl.
|
||||
--- 31030,31031 ----
|
||||
--- 31040,31041 ----
|
||||
***************
|
||||
*** 31288,31289 ****
|
||||
--- 31282,31284 ----
|
||||
--- 31292,31294 ----
|
||||
pneumonia/MS
|
||||
+ pneumonic
|
||||
PO
|
||||
***************
|
||||
*** 31460,31461 ****
|
||||
--- 31455,31457 ----
|
||||
--- 31465,31467 ----
|
||||
pompom/MS
|
||||
+ pompon/M
|
||||
pomposity/MS
|
||||
@@ -2593,25 +2622,25 @@
|
||||
pyx/S
|
||||
- q
|
||||
Qatar
|
||||
--- 32861,32862 ----
|
||||
--- 32871,32872 ----
|
||||
***************
|
||||
*** 33378,33380 ****
|
||||
razzmatazz
|
||||
- r/d
|
||||
Rd/M
|
||||
--- 33373,33374 ----
|
||||
--- 33383,33384 ----
|
||||
***************
|
||||
*** 34979,34981 ****
|
||||
RSPCA
|
||||
- rte
|
||||
rub-a-dub
|
||||
--- 34973,34974 ----
|
||||
--- 34983,34984 ----
|
||||
***************
|
||||
*** 36012,36014 ****
|
||||
sec.
|
||||
! s/eca
|
||||
secant/MS
|
||||
--- 36005,36007 ----
|
||||
--- 36015,36017 ----
|
||||
sec.
|
||||
! outs
|
||||
secant/MS
|
||||
@@ -2620,7 +2649,7 @@
|
||||
Szechwan/M
|
||||
! t/7k
|
||||
Ta
|
||||
--- 40235,40237 ----
|
||||
--- 40245,40247 ----
|
||||
Szechwan/M
|
||||
! tingly
|
||||
Ta
|
||||
@@ -2629,10 +2658,10 @@
|
||||
Tyson/M
|
||||
- u
|
||||
ubiquitousness
|
||||
--- 42609,42610 ----
|
||||
--- 42619,42620 ----
|
||||
***************
|
||||
*** 42990,42991 ****
|
||||
--- 42982,42984 ----
|
||||
--- 42992,42994 ----
|
||||
unscrupulous
|
||||
+ searchable
|
||||
unsearchable
|
||||
@@ -2641,13 +2670,13 @@
|
||||
Uzi/M
|
||||
- v
|
||||
vacancy/MS
|
||||
--- 43245,43246 ----
|
||||
--- 43255,43256 ----
|
||||
***************
|
||||
*** 43749,43751 ****
|
||||
Vilnius/M
|
||||
! vim/M
|
||||
vinaigrette/MS
|
||||
--- 43741,43744 ----
|
||||
--- 43751,43754 ----
|
||||
Vilnius/M
|
||||
! Vim/M
|
||||
! vim/?
|
||||
@@ -2657,16 +2686,16 @@
|
||||
yippee
|
||||
- y/K
|
||||
YMCA
|
||||
--- 45487,45488 ----
|
||||
--- 45497,45498 ----
|
||||
***************
|
||||
*** 45586,45588 ****
|
||||
zap/SGRD
|
||||
- z/d
|
||||
Zealanders
|
||||
--- 45578,45579 ----
|
||||
--- 45588,45589 ----
|
||||
***************
|
||||
*** 45655 ****
|
||||
--- 45646,45660 ----
|
||||
--- 45656,45670 ----
|
||||
zymurgy/S
|
||||
+ nd
|
||||
+ PayPal
|
||||
|
||||
+208
-151
@@ -1,14 +1,25 @@
|
||||
*** en_CA.orig.aff 2015-12-30 18:18:20.076952127 +0100
|
||||
--- en_CA.aff 2015-12-30 18:32:50.395546116 +0100
|
||||
--- en_CA.aff 2016-01-09 13:15:51.306488848 +0100
|
||||
***************
|
||||
*** 2,7 ****
|
||||
*** 2,18 ****
|
||||
TRY esianrtolcdugmphbyfvkwzESIANRTOLCDUGMPHBYFVKWZ'
|
||||
! ICONV 1
|
||||
! ICONV ’ '
|
||||
NOSUGGEST !
|
||||
|
||||
# ordinal numbers
|
||||
--- 2,146 ----
|
||||
! # ordinal numbers
|
||||
! COMPOUNDMIN 1
|
||||
! # only in compounds: 1th, 2th, 3th
|
||||
! ONLYINCOMPOUND c
|
||||
! # compound rules:
|
||||
! # 1. [0-9]*1[0-9]th (10th, 11th, 12th, 56714th, etc.)
|
||||
! # 2. [0-9]*[02-9](1st|2nd|3rd|[4-9]th) (21st, 22nd, 123rd, 1234th, etc.)
|
||||
! COMPOUNDRULE 2
|
||||
! COMPOUNDRULE n*1t
|
||||
! COMPOUNDRULE n*mp
|
||||
! WORDCHARS 0123456789
|
||||
|
||||
--- 2,161 ----
|
||||
TRY esianrtolcdugmphbyfvkwzESIANRTOLCDUGMPHBYFVKWZ'
|
||||
!
|
||||
! # ICONV 1
|
||||
@@ -16,158 +27,204 @@
|
||||
!
|
||||
NOSUGGEST !
|
||||
|
||||
+ FOL àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
|
||||
+ LOW àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
|
||||
+ UPP ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßÿ
|
||||
+
|
||||
+ MIDWORD '
|
||||
+
|
||||
+ RARE ?
|
||||
+ BAD %
|
||||
+
|
||||
+ MAP 9
|
||||
+ MAP aàáâãäå
|
||||
+ MAP eèéêë
|
||||
+ MAP iìíîï
|
||||
+ MAP oòóôõö
|
||||
+ MAP uùúûü
|
||||
+ MAP nñ
|
||||
+ MAP cç
|
||||
+ MAP yÿý
|
||||
+ MAP sß
|
||||
+
|
||||
+ # This comes from Aspell en_phonet.dat, version 1.1, 2000-01-07
|
||||
+
|
||||
+ SAL AH(AEIOUY)-^ *H
|
||||
+ SAL AR(AEIOUY)-^ *R
|
||||
+ SAL A(HR)^ *
|
||||
+ SAL A^ *
|
||||
+ SAL AH(AEIOUY)- H
|
||||
+ SAL AR(AEIOUY)- R
|
||||
+ SAL A(HR) _
|
||||
+ SAL À^ *
|
||||
+ SAL Å^ *
|
||||
+ SAL BB- _
|
||||
+ SAL B B
|
||||
+ SAL CQ- _
|
||||
+ SAL CIA X
|
||||
+ SAL CH X
|
||||
+ SAL C(EIY)- S
|
||||
+ SAL CK K
|
||||
+ SAL COUGH^ KF
|
||||
+ SAL CC< C
|
||||
+ SAL C K
|
||||
+ SAL DG(EIY) K
|
||||
+ SAL DD- _
|
||||
+ SAL D T
|
||||
+ SAL É< E
|
||||
+ SAL EH(AEIOUY)-^ *H
|
||||
+ SAL ER(AEIOUY)-^ *R
|
||||
+ SAL E(HR)^ *
|
||||
+ SAL ENOUGH^$ *NF
|
||||
+ SAL E^ *
|
||||
+ SAL EH(AEIOUY)- H
|
||||
+ SAL ER(AEIOUY)- R
|
||||
+ SAL E(HR) _
|
||||
+ SAL FF- _
|
||||
+ SAL F F
|
||||
+ SAL GN^ N
|
||||
+ SAL GN$ N
|
||||
+ SAL GNS$ NS
|
||||
+ SAL GNED$ N
|
||||
+ SAL GH(AEIOUY)- K
|
||||
+ SAL GH _
|
||||
+ SAL GG9 K
|
||||
+ SAL G K
|
||||
+ SAL H H
|
||||
+ SAL IH(AEIOUY)-^ *H
|
||||
+ SAL IR(AEIOUY)-^ *R
|
||||
+ SAL I(HR)^ *
|
||||
+ SAL I^ *
|
||||
+ SAL ING6 N
|
||||
+ SAL IH(AEIOUY)- H
|
||||
+ SAL IR(AEIOUY)- R
|
||||
+ SAL I(HR) _
|
||||
+ SAL J K
|
||||
+ SAL KN^ N
|
||||
+ SAL KK- _
|
||||
+ SAL K K
|
||||
+ SAL LAUGH^ LF
|
||||
+ SAL LL- _
|
||||
+ SAL L L
|
||||
+ SAL MB$ M
|
||||
+ SAL MM M
|
||||
+ SAL M M
|
||||
+ SAL NN- _
|
||||
+ SAL N N
|
||||
+ SAL OH(AEIOUY)-^ *H
|
||||
+ SAL OR(AEIOUY)-^ *R
|
||||
+ SAL O(HR)^ *
|
||||
+ SAL O^ *
|
||||
+ SAL OH(AEIOUY)- H
|
||||
+ SAL OR(AEIOUY)- R
|
||||
+ SAL O(HR) _
|
||||
+ SAL PH F
|
||||
+ SAL PN^ N
|
||||
+ SAL PP- _
|
||||
+ SAL P P
|
||||
+ SAL Q K
|
||||
+ SAL RH^ R
|
||||
+ SAL ROUGH^ RF
|
||||
+ SAL RR- _
|
||||
+ SAL R R
|
||||
+ SAL SCH(EOU)- SK
|
||||
+ SAL SC(IEY)- S
|
||||
+ SAL SH X
|
||||
+ SAL SI(AO)- X
|
||||
+ SAL SS- _
|
||||
+ SAL S S
|
||||
+ SAL TI(AO)- X
|
||||
+ SAL TH @
|
||||
+ SAL TCH-- _
|
||||
+ SAL TOUGH^ TF
|
||||
+ SAL TT- _
|
||||
+ SAL T T
|
||||
+ SAL UH(AEIOUY)-^ *H
|
||||
+ SAL UR(AEIOUY)-^ *R
|
||||
+ SAL U(HR)^ *
|
||||
+ SAL U^ *
|
||||
+ SAL UH(AEIOUY)- H
|
||||
+ SAL UR(AEIOUY)- R
|
||||
+ SAL U(HR) _
|
||||
+ SAL V^ W
|
||||
+ SAL V F
|
||||
+ SAL WR^ R
|
||||
+ SAL WH^ W
|
||||
+ SAL W(AEIOU)- W
|
||||
+ SAL X^ S
|
||||
+ SAL X KS
|
||||
+ SAL Y(AEIOU)- Y
|
||||
+ SAL ZZ- _
|
||||
+ SAL Z S
|
||||
+
|
||||
+ # When soundfolding "th" is turned into "@". When this is mistyped as "ht" it
|
||||
+ # soundfolds to "ht". This difference is too big, thus use REP items to lower
|
||||
+ # the score.
|
||||
+ REPSAL 2
|
||||
+ REPSAL ht @
|
||||
+ REPSAL @ ht
|
||||
+
|
||||
# ordinal numbers
|
||||
***************
|
||||
*** 16,18 ****
|
||||
COMPOUNDRULE n*mp
|
||||
! WORDCHARS 0123456789
|
||||
|
||||
--- 155,157 ----
|
||||
COMPOUNDRULE n*mp
|
||||
! FOL àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
|
||||
! LOW àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
|
||||
! UPP ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßÿ
|
||||
!
|
||||
! MIDWORD '
|
||||
!
|
||||
! RARE ?
|
||||
! BAD %
|
||||
!
|
||||
! MAP 9
|
||||
! MAP aàáâãäå
|
||||
! MAP eèéêë
|
||||
! MAP iìíîï
|
||||
! MAP oòóôõö
|
||||
! MAP uùúûü
|
||||
! MAP nñ
|
||||
! MAP cç
|
||||
! MAP yÿý
|
||||
! MAP sß
|
||||
!
|
||||
! # This comes from Aspell en_phonet.dat, version 1.1, 2000-01-07
|
||||
!
|
||||
! SAL AH(AEIOUY)-^ *H
|
||||
! SAL AR(AEIOUY)-^ *R
|
||||
! SAL A(HR)^ *
|
||||
! SAL A^ *
|
||||
! SAL AH(AEIOUY)- H
|
||||
! SAL AR(AEIOUY)- R
|
||||
! SAL A(HR) _
|
||||
! SAL À^ *
|
||||
! SAL Å^ *
|
||||
! SAL BB- _
|
||||
! SAL B B
|
||||
! SAL CQ- _
|
||||
! SAL CIA X
|
||||
! SAL CH X
|
||||
! SAL C(EIY)- S
|
||||
! SAL CK K
|
||||
! SAL COUGH^ KF
|
||||
! SAL CC< C
|
||||
! SAL C K
|
||||
! SAL DG(EIY) K
|
||||
! SAL DD- _
|
||||
! SAL D T
|
||||
! SAL É< E
|
||||
! SAL EH(AEIOUY)-^ *H
|
||||
! SAL ER(AEIOUY)-^ *R
|
||||
! SAL E(HR)^ *
|
||||
! SAL ENOUGH^$ *NF
|
||||
! SAL E^ *
|
||||
! SAL EH(AEIOUY)- H
|
||||
! SAL ER(AEIOUY)- R
|
||||
! SAL E(HR) _
|
||||
! SAL FF- _
|
||||
! SAL F F
|
||||
! SAL GN^ N
|
||||
! SAL GN$ N
|
||||
! SAL GNS$ NS
|
||||
! SAL GNED$ N
|
||||
! SAL GH(AEIOUY)- K
|
||||
! SAL GH _
|
||||
! SAL GG9 K
|
||||
! SAL G K
|
||||
! SAL H H
|
||||
! SAL IH(AEIOUY)-^ *H
|
||||
! SAL IR(AEIOUY)-^ *R
|
||||
! SAL I(HR)^ *
|
||||
! SAL I^ *
|
||||
! SAL ING6 N
|
||||
! SAL IH(AEIOUY)- H
|
||||
! SAL IR(AEIOUY)- R
|
||||
! SAL I(HR) _
|
||||
! SAL J K
|
||||
! SAL KN^ N
|
||||
! SAL KK- _
|
||||
! SAL K K
|
||||
! SAL LAUGH^ LF
|
||||
! SAL LL- _
|
||||
! SAL L L
|
||||
! SAL MB$ M
|
||||
! SAL MM M
|
||||
! SAL M M
|
||||
! SAL NN- _
|
||||
! SAL N N
|
||||
! SAL OH(AEIOUY)-^ *H
|
||||
! SAL OR(AEIOUY)-^ *R
|
||||
! SAL O(HR)^ *
|
||||
! SAL O^ *
|
||||
! SAL OH(AEIOUY)- H
|
||||
! SAL OR(AEIOUY)- R
|
||||
! SAL O(HR) _
|
||||
! SAL PH F
|
||||
! SAL PN^ N
|
||||
! SAL PP- _
|
||||
! SAL P P
|
||||
! SAL Q K
|
||||
! SAL RH^ R
|
||||
! SAL ROUGH^ RF
|
||||
! SAL RR- _
|
||||
! SAL R R
|
||||
! SAL SCH(EOU)- SK
|
||||
! SAL SC(IEY)- S
|
||||
! SAL SH X
|
||||
! SAL SI(AO)- X
|
||||
! SAL SS- _
|
||||
! SAL S S
|
||||
! SAL TI(AO)- X
|
||||
! SAL TH @
|
||||
! SAL TCH-- _
|
||||
! SAL TOUGH^ TF
|
||||
! SAL TT- _
|
||||
! SAL T T
|
||||
! SAL UH(AEIOUY)-^ *H
|
||||
! SAL UR(AEIOUY)-^ *R
|
||||
! SAL U(HR)^ *
|
||||
! SAL U^ *
|
||||
! SAL UH(AEIOUY)- H
|
||||
! SAL UR(AEIOUY)- R
|
||||
! SAL U(HR) _
|
||||
! SAL V^ W
|
||||
! SAL V F
|
||||
! SAL WR^ R
|
||||
! SAL WH^ W
|
||||
! SAL W(AEIOU)- W
|
||||
! SAL X^ S
|
||||
! SAL X KS
|
||||
! SAL Y(AEIOU)- Y
|
||||
! SAL ZZ- _
|
||||
! SAL Z S
|
||||
!
|
||||
! # When soundfolding "th" is turned into "@". When this is mistyped as "ht" it
|
||||
! # soundfolds to "ht". This difference is too big, thus use REP items to lower
|
||||
! # the score.
|
||||
! REPSAL 2
|
||||
! REPSAL ht @
|
||||
! REPSAL @ ht
|
||||
!
|
||||
! # This is disabled, because if Vim does not support NOCOMPOUNDSUGS giving
|
||||
! # suggestions is extremely slow.
|
||||
! ## ordinal numbers
|
||||
! #COMPOUNDMIN 1
|
||||
! ## only in compounds: 1th, 2th, 3th
|
||||
! #ONLYINCOMPOUND c
|
||||
! ## compound rules:
|
||||
! ## 1. [0-9]*1[0-9]th (10th, 11th, 12th, 56714th, etc.)
|
||||
! ## 2. [0-9]*[02-9](1st|2nd|3rd|[4-9]th) (21st, 22nd, 123rd, 1234th, etc.)
|
||||
! #COMPOUNDRULE 2
|
||||
! #COMPOUNDRULE n*1t
|
||||
! #COMPOUNDRULE n*mp
|
||||
! #NOCOMPOUNDSUGS
|
||||
!
|
||||
! # WORDCHARS 0123456789
|
||||
|
||||
*** en_CA.orig.dic 2015-12-30 18:20:47.803358258 +0100
|
||||
--- en_CA.dic 2015-12-30 18:59:26.490267196 +0100
|
||||
--- en_CA.dic 2016-01-08 23:03:52.562085247 +0100
|
||||
***************
|
||||
*** 1,25 ****
|
||||
48929
|
||||
! 0/nm
|
||||
! 0th/pt
|
||||
! 1/n1
|
||||
! 1st/p
|
||||
! 1th/tc
|
||||
! 2/nm
|
||||
! 2nd/p
|
||||
! 2th/tc
|
||||
! 3/nm
|
||||
! 3rd/p
|
||||
! 3th/tc
|
||||
! 4/nm
|
||||
! 4th/pt
|
||||
! 5/nm
|
||||
! 5th/pt
|
||||
! 6/nm
|
||||
! 6th/pt
|
||||
! 7/nm
|
||||
! 7th/pt
|
||||
! 8/nm
|
||||
! 8th/pt
|
||||
! 9/nm
|
||||
! 9th/pt
|
||||
A/SM
|
||||
--- 1,12 ----
|
||||
48929
|
||||
! 0th
|
||||
! 1st
|
||||
! 2nd
|
||||
! 3rd
|
||||
! 4th
|
||||
! 5th
|
||||
! 6th
|
||||
! 7th
|
||||
! 8th
|
||||
! 9th
|
||||
A/SM
|
||||
***************
|
||||
*** 48930 ****
|
||||
--- 48930,48940 ----
|
||||
--- 48917,48927 ----
|
||||
zymurgy/M
|
||||
+ a a/%
|
||||
+ a an/%
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
*** en_GB.orig.aff 2015-12-30 18:49:37.568638905 +0100
|
||||
--- en_GB.aff 2015-12-30 18:59:04.186508433 +0100
|
||||
--- en_GB.aff 2016-01-09 13:15:56.490432894 +0100
|
||||
***************
|
||||
*** 20,21 ****
|
||||
--- 20,158 ----
|
||||
@@ -142,29 +142,65 @@
|
||||
+ REPSAL @ ht
|
||||
+
|
||||
REP 27
|
||||
***************
|
||||
*** 49,50 ****
|
||||
--- 186,203 ----
|
||||
|
||||
+ # This is disabled, because if Vim does not support NOCOMPOUNDSUGS giving
|
||||
+ # suggestions is extremely slow.
|
||||
+ ## ordinal numbers
|
||||
+ #COMPOUNDMIN 1
|
||||
+ ## only in compounds: 1th, 2th, 3th
|
||||
+ #ONLYINCOMPOUND ,
|
||||
+ ## compound rules:
|
||||
+ ## 1. [0-9]*1[0-9]th (10th, 11th, 12th, 56714th, etc.)
|
||||
+ ## 2. [0-9]*[02-9](1st|2nd|3rd|[4-9]th) (21st, 22nd, 123rd, 1234th, etc.)
|
||||
+ #COMPOUNDRULE 2
|
||||
+ #COMPOUNDRULE (*:)
|
||||
+ #COMPOUNDRULE (*{}
|
||||
+ #NOCOMPOUNDSUGS
|
||||
+
|
||||
+ # WORDCHARS 0123456789
|
||||
+
|
||||
PFX A Y 2
|
||||
*** en_GB.orig.dic 2015-12-30 18:49:42.360587040 +0100
|
||||
--- en_GB.dic 2015-12-30 19:03:23.035708178 +0100
|
||||
--- en_GB.dic 2016-01-08 23:03:35.510272903 +0100
|
||||
***************
|
||||
*** 1,2 ****
|
||||
--- 1,12 ----
|
||||
56453
|
||||
+ 0th
|
||||
+ 1st
|
||||
+ 2nd
|
||||
+ 3rd
|
||||
+ 4th
|
||||
+ 5th
|
||||
+ 6th
|
||||
+ 7th
|
||||
+ 8th
|
||||
+ 9th
|
||||
'gainst
|
||||
***************
|
||||
*** 3615,3617 ****
|
||||
autosuggestion
|
||||
- autosuggestion
|
||||
autotest/S
|
||||
--- 3615,3616 ----
|
||||
--- 3625,3626 ----
|
||||
***************
|
||||
*** 9325,9327 ****
|
||||
Church
|
||||
- church
|
||||
Church-of-England
|
||||
--- 9324,9325 ----
|
||||
--- 9334,9335 ----
|
||||
***************
|
||||
*** 22885,22887 ****
|
||||
hand-painted
|
||||
- hand-pick/D
|
||||
hand-pick/GSD
|
||||
--- 22883,22884 ----
|
||||
--- 22893,22894 ----
|
||||
***************
|
||||
*** 56454 ****
|
||||
--- 56451,56461 ----
|
||||
--- 56461,56471 ----
|
||||
émigré/S
|
||||
+ a a/%
|
||||
+ a an/%
|
||||
|
||||
+87
-53
@@ -1,5 +1,5 @@
|
||||
*** en_NZ.orig.aff 2010-05-15 13:03:47.000000000 +0200
|
||||
--- en_NZ.aff 2015-12-30 19:08:13.884560313 +0100
|
||||
--- en_NZ.aff 2016-01-09 13:16:01.734376292 +0100
|
||||
***************
|
||||
*** 7,9 ****
|
||||
SET ISO8859-1
|
||||
@@ -148,7 +148,8 @@
|
||||
!
|
||||
REP 66
|
||||
***************
|
||||
*** 76,95 ****
|
||||
*** 75,95 ****
|
||||
REP ura aru
|
||||
PFX A Y 2
|
||||
! PFX A 0 re [^e]
|
||||
! PFX A 0 re- e
|
||||
@@ -169,7 +170,25 @@
|
||||
PFX E Y 1
|
||||
! PFX E 0 dis .
|
||||
PFX F Y 5
|
||||
--- 214,233 ----
|
||||
--- 213,250 ----
|
||||
REP ura aru
|
||||
+
|
||||
+ # This is disabled, because if Vim does not support NOCOMPOUNDSUGS giving
|
||||
+ # suggestions is extremely slow.
|
||||
+ ## ordinal numbers
|
||||
+ #COMPOUNDMIN 1
|
||||
+ ## only in compounds: 1th, 2th, 3th
|
||||
+ #ONLYINCOMPOUND ,
|
||||
+ ## compound rules:
|
||||
+ ## 1. [0-9]*1[0-9]th (10th, 11th, 12th, 56714th, etc.)
|
||||
+ ## 2. [0-9]*[02-9](1st|2nd|3rd|[4-9]th) (21st, 22nd, 123rd, 1234th, etc.)
|
||||
+ #COMPOUNDRULE 2
|
||||
+ #COMPOUNDRULE (*:)
|
||||
+ #COMPOUNDRULE (*{}
|
||||
+ #NOCOMPOUNDSUGS
|
||||
+
|
||||
+ # WORDCHARS 0123456789
|
||||
+
|
||||
PFX A Y 2
|
||||
! PFX A 0 re [^e]
|
||||
! PFX A 0 re- e
|
||||
@@ -587,7 +606,7 @@
|
||||
SFX T y iest [^aeiou]y
|
||||
! SFX T 0 er [aeiou]y
|
||||
SFX T 0 est [aeiou]y
|
||||
--- 237,631 ----
|
||||
--- 254,648 ----
|
||||
PFX F 0 col l
|
||||
! PFX F 0 con [^abehilmopru].
|
||||
PFX K Y 1
|
||||
@@ -1672,7 +1691,7 @@
|
||||
! SFX 3 o ist's o
|
||||
! SFX 3 0 ist's [^eoy]
|
||||
\ No newline at end of file
|
||||
--- 638,1323 ----
|
||||
--- 655,1340 ----
|
||||
SFX R Y 72
|
||||
! SFX R 0 r e
|
||||
! SFX R 0 rs e
|
||||
@@ -2360,29 +2379,44 @@
|
||||
! SFX 3 o ist's o
|
||||
! SFX 3 0 ist's [^eoy]
|
||||
*** en_NZ.orig.dic 2010-05-15 13:03:48.000000000 +0200
|
||||
--- en_NZ.dic 2015-12-30 19:08:04.928657238 +0100
|
||||
--- en_NZ.dic 2016-01-08 23:04:05.825939282 +0100
|
||||
***************
|
||||
*** 1,2 ****
|
||||
--- 1,12 ----
|
||||
47141
|
||||
+ 0th
|
||||
+ 1st
|
||||
+ 2nd
|
||||
+ 3rd
|
||||
+ 4th
|
||||
+ 5th
|
||||
+ 6th
|
||||
+ 7th
|
||||
+ 8th
|
||||
+ 9th
|
||||
3GPP
|
||||
***************
|
||||
*** 4,6 ****
|
||||
2ZB
|
||||
- A
|
||||
a/o
|
||||
--- 4,5 ----
|
||||
--- 14,15 ----
|
||||
***************
|
||||
*** 927,929 ****
|
||||
Al-Zawahiri
|
||||
- al/FAC
|
||||
Al/M
|
||||
--- 926,927 ----
|
||||
--- 936,937 ----
|
||||
***************
|
||||
*** 2941,2944 ****
|
||||
B.Sc.
|
||||
- bless
|
||||
- bible
|
||||
baa/GSD
|
||||
--- 2939,2940 ----
|
||||
--- 2949,2950 ----
|
||||
***************
|
||||
*** 4974,4975 ****
|
||||
--- 4970,4972 ----
|
||||
--- 4980,4982 ----
|
||||
Brampton/M
|
||||
+ Bram/M
|
||||
bran/SDGM
|
||||
@@ -2391,7 +2425,7 @@
|
||||
C.Lit.
|
||||
! cation/SM
|
||||
Ca/y
|
||||
--- 5704,5706 ----
|
||||
--- 5714,5716 ----
|
||||
C.Lit.
|
||||
! cation/MWS
|
||||
Ca/y
|
||||
@@ -2400,10 +2434,10 @@
|
||||
Cathy
|
||||
- cation/MW
|
||||
catkin/SM
|
||||
--- 6447,6448 ----
|
||||
--- 6457,6458 ----
|
||||
***************
|
||||
*** 8589,8590 ****
|
||||
--- 8585,8587 ----
|
||||
--- 8595,8597 ----
|
||||
coniferous
|
||||
+ conj.
|
||||
conjectural
|
||||
@@ -2412,16 +2446,16 @@
|
||||
red's
|
||||
- dally
|
||||
dab/TSGD
|
||||
--- 10150,10151 ----
|
||||
--- 10160,10161 ----
|
||||
***************
|
||||
*** 10360,10361 ****
|
||||
--- 10356,10358 ----
|
||||
--- 10366,10368 ----
|
||||
dBm
|
||||
+ dBd
|
||||
DBMS
|
||||
***************
|
||||
*** 12535,12536 ****
|
||||
--- 12532,12534 ----
|
||||
--- 12542,12544 ----
|
||||
Dutchwomen/M
|
||||
+ Farsi
|
||||
duteous/Y
|
||||
@@ -2430,13 +2464,13 @@
|
||||
duvet/SM
|
||||
- duxes
|
||||
DVD/MS
|
||||
--- 12540,12541 ----
|
||||
--- 12550,12551 ----
|
||||
***************
|
||||
*** 13901,13903 ****
|
||||
estuary/MS
|
||||
! et
|
||||
ETA
|
||||
--- 13898,13901 ----
|
||||
--- 13908,13911 ----
|
||||
estuary/MS
|
||||
! et cetera
|
||||
! et al.
|
||||
@@ -2447,13 +2481,13 @@
|
||||
- fable
|
||||
- fist/MS
|
||||
fa/M
|
||||
--- 14529,14530 ----
|
||||
--- 14539,14540 ----
|
||||
***************
|
||||
*** 15323,15325 ****
|
||||
fissure/DSMG
|
||||
! fist/6GD
|
||||
fistfight/MS
|
||||
--- 15319,15321 ----
|
||||
--- 15329,15331 ----
|
||||
fissure/DSMG
|
||||
! fist/6GDMS
|
||||
fistfight/MS
|
||||
@@ -2462,44 +2496,44 @@
|
||||
g's
|
||||
- gable
|
||||
gist/MS
|
||||
--- 16602,16603 ----
|
||||
--- 16612,16613 ----
|
||||
***************
|
||||
*** 16797,16799 ****
|
||||
Garvey
|
||||
- Gary/M
|
||||
gas-permeable
|
||||
--- 16792,16793 ----
|
||||
--- 16802,16803 ----
|
||||
***************
|
||||
*** 18177,18179 ****
|
||||
gyroscope/SWM
|
||||
- dish
|
||||
ha
|
||||
--- 18171,18172 ----
|
||||
--- 18181,18182 ----
|
||||
***************
|
||||
*** 22321,22323 ****
|
||||
K-factor
|
||||
- disk/MS
|
||||
kabob's
|
||||
--- 22314,22315 ----
|
||||
--- 22324,22325 ----
|
||||
***************
|
||||
*** 23129,23132 ****
|
||||
lassoer/M
|
||||
- last-ditch
|
||||
- last-minute
|
||||
last/YSDGkJ
|
||||
--- 23121,23122 ----
|
||||
--- 23131,23132 ----
|
||||
***************
|
||||
*** 26396,26398 ****
|
||||
Missy
|
||||
! mist/CDRGS
|
||||
mistakable/U
|
||||
--- 26386,26388 ----
|
||||
--- 26396,26398 ----
|
||||
Missy
|
||||
! mist/CDRGSM
|
||||
mistakable/U
|
||||
***************
|
||||
*** 26745,26746 ****
|
||||
--- 26735,26737 ----
|
||||
--- 26745,26747 ----
|
||||
Moog
|
||||
+ Moolenaar/M
|
||||
moon/MGpDS
|
||||
@@ -2508,7 +2542,7 @@
|
||||
mozzarella/SM
|
||||
- MP3
|
||||
mpg
|
||||
--- 27009,27010 ----
|
||||
--- 27019,27020 ----
|
||||
***************
|
||||
*** 27365,27372 ****
|
||||
N'Djamena
|
||||
@@ -2519,7 +2553,7 @@
|
||||
- national
|
||||
- nationally
|
||||
Na/M
|
||||
--- 27355,27359 ----
|
||||
--- 27365,27369 ----
|
||||
N'Djamena
|
||||
! native/SP
|
||||
natively
|
||||
@@ -2530,7 +2564,7 @@
|
||||
Nathaniel/M
|
||||
! nation/M
|
||||
national/sQ3Sq
|
||||
--- 27494,27496 ----
|
||||
--- 27504,27506 ----
|
||||
Nathaniel/M
|
||||
! nation/MS
|
||||
national/sQ3Sq
|
||||
@@ -2539,7 +2573,7 @@
|
||||
nationwide
|
||||
- native/SP
|
||||
nativity/SM
|
||||
--- 27508,27509 ----
|
||||
--- 27518,27519 ----
|
||||
***************
|
||||
*** 29852,29857 ****
|
||||
P.O.
|
||||
@@ -2548,16 +2582,16 @@
|
||||
- imply
|
||||
- comply
|
||||
pa/oM
|
||||
--- 29838,29839 ----
|
||||
--- 29848,29849 ----
|
||||
***************
|
||||
*** 31702,31703 ****
|
||||
--- 31684,31686 ----
|
||||
--- 31694,31696 ----
|
||||
pneumonia/MS
|
||||
+ pneumonic
|
||||
PO
|
||||
***************
|
||||
*** 31885,31886 ****
|
||||
--- 31868,31870 ----
|
||||
--- 31878,31880 ----
|
||||
pompom/SM
|
||||
+ pompon/M
|
||||
pomposity/SM
|
||||
@@ -2566,30 +2600,30 @@
|
||||
qwertys
|
||||
- r/d
|
||||
Ra
|
||||
--- 33545,33546 ----
|
||||
--- 33555,33556 ----
|
||||
***************
|
||||
*** 35456,35458 ****
|
||||
rt
|
||||
- rte
|
||||
Ru/M
|
||||
--- 35439,35440 ----
|
||||
--- 35449,35450 ----
|
||||
***************
|
||||
*** 35619,35622 ****
|
||||
singly
|
||||
- sable
|
||||
- sally/DSG
|
||||
SA
|
||||
--- 35601,35602 ----
|
||||
--- 35611,35612 ----
|
||||
***************
|
||||
*** 40763,40766 ****
|
||||
T's
|
||||
- mist/MS
|
||||
- overt
|
||||
Ta
|
||||
--- 40743,40744 ----
|
||||
--- 40753,40754 ----
|
||||
***************
|
||||
*** 43574,43575 ****
|
||||
--- 43552,43554 ----
|
||||
--- 43562,43564 ----
|
||||
unsearchable
|
||||
+ searchable
|
||||
unseeing/Y
|
||||
@@ -2598,7 +2632,7 @@
|
||||
Vilnius/M
|
||||
! vim/M
|
||||
vinaigrette/MS
|
||||
--- 44313,44316 ----
|
||||
--- 44323,44326 ----
|
||||
Vilnius/M
|
||||
! Vim/M
|
||||
! vim/?
|
||||
@@ -2608,79 +2642,79 @@
|
||||
y'all
|
||||
- prey/M
|
||||
yacht/M5SmGD
|
||||
--- 45886,45887 ----
|
||||
--- 45896,45897 ----
|
||||
***************
|
||||
*** 46152,46154 ****
|
||||
zymurgy/S
|
||||
- à
|
||||
font/SM
|
||||
--- 46131,46132 ----
|
||||
--- 46141,46142 ----
|
||||
***************
|
||||
*** 46198,46200 ****
|
||||
rata/M
|
||||
- kaka/M
|
||||
waka/M
|
||||
--- 46176,46177 ----
|
||||
--- 46186,46187 ----
|
||||
***************
|
||||
*** 46216,46218 ****
|
||||
jandal/MS
|
||||
- Swanndri/M
|
||||
hoon/MS
|
||||
--- 46193,46194 ----
|
||||
--- 46203,46204 ----
|
||||
***************
|
||||
*** 46242,46244 ****
|
||||
Invercargill/M
|
||||
- Te
|
||||
Alexandra/M
|
||||
--- 46218,46219 ----
|
||||
--- 46228,46229 ----
|
||||
***************
|
||||
*** 46261,46263 ****
|
||||
Kawerau/M
|
||||
- Kerikeri/M
|
||||
Lyttelton/M
|
||||
--- 46236,46237 ----
|
||||
--- 46246,46247 ----
|
||||
***************
|
||||
*** 46491,46493 ****
|
||||
Waianakarua
|
||||
- Hakatere
|
||||
Swin
|
||||
--- 46465,46466 ----
|
||||
--- 46475,46476 ----
|
||||
***************
|
||||
*** 46690,46692 ****
|
||||
Omarama/M
|
||||
- Wairarapa/M
|
||||
Kilda/M
|
||||
--- 46663,46664 ----
|
||||
--- 46673,46674 ----
|
||||
***************
|
||||
*** 46711,46713 ****
|
||||
Wellsford/M
|
||||
- Akaroa/M
|
||||
Avonhead/M
|
||||
--- 46683,46684 ----
|
||||
--- 46693,46694 ----
|
||||
***************
|
||||
*** 46838,46840 ****
|
||||
Ballantyne's
|
||||
- DB
|
||||
Monteith's
|
||||
--- 46809,46810 ----
|
||||
--- 46819,46820 ----
|
||||
***************
|
||||
*** 46920,46922 ****
|
||||
Egmont/M
|
||||
- Waitaki/M
|
||||
katipo/M
|
||||
--- 46890,46891 ----
|
||||
--- 46900,46901 ----
|
||||
***************
|
||||
*** 46956,46958 ****
|
||||
Sunnyside/M
|
||||
- Wairau/M
|
||||
Waikoropupu
|
||||
--- 46925,46926 ----
|
||||
--- 46935,46936 ----
|
||||
***************
|
||||
*** 47141,47142 ****
|
||||
Burkina
|
||||
! Faso/M
|
||||
\ No newline at end of file
|
||||
--- 47109,47124 ----
|
||||
--- 47119,47134 ----
|
||||
Burkina
|
||||
! Faso/M
|
||||
! nd
|
||||
|
||||
+77
-11
@@ -1,12 +1,28 @@
|
||||
*** en_US.orig.aff 2015-12-30 18:55:30.352821552 +0100
|
||||
--- en_US.aff 2015-12-30 19:01:19.849041178 +0100
|
||||
--- en_US.aff 2016-01-09 13:16:31.514054846 +0100
|
||||
***************
|
||||
*** 2,5 ****
|
||||
*** 1,18 ****
|
||||
SET UTF8
|
||||
TRY esianrtolcdugmphbyfvkwzESIANRTOLCDUGMPHBYFVKWZ'
|
||||
! ICONV 1
|
||||
! ICONV ’ '
|
||||
NOSUGGEST !
|
||||
--- 2,144 ----
|
||||
|
||||
! # ordinal numbers
|
||||
! COMPOUNDMIN 1
|
||||
! # only in compounds: 1th, 2th, 3th
|
||||
! ONLYINCOMPOUND c
|
||||
! # compound rules:
|
||||
! # 1. [0-9]*1[0-9]th (10th, 11th, 12th, 56714th, etc.)
|
||||
! # 2. [0-9]*[02-9](1st|2nd|3rd|[4-9]th) (21st, 22nd, 123rd, 1234th, etc.)
|
||||
! COMPOUNDRULE 2
|
||||
! COMPOUNDRULE n*1t
|
||||
! COMPOUNDRULE n*mp
|
||||
! WORDCHARS 0123456789
|
||||
|
||||
--- 1,164 ----
|
||||
+ # Affix file for US English MySpell dictionary
|
||||
SET UTF8
|
||||
TRY esianrtolcdugmphbyfvkwzESIANRTOLCDUGMPHBYFVKWZ'
|
||||
!
|
||||
! FOL àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
|
||||
@@ -150,20 +166,70 @@
|
||||
! # ICONV ’ '
|
||||
!
|
||||
NOSUGGEST !
|
||||
***************
|
||||
*** 16,18 ****
|
||||
COMPOUNDRULE n*mp
|
||||
! WORDCHARS 0123456789
|
||||
|
||||
--- 155,157 ----
|
||||
COMPOUNDRULE n*mp
|
||||
! # This is disabled, because if Vim does not support NOCOMPOUNDSUGS giving
|
||||
! # suggestions is extremely slow.
|
||||
! # This is disabled, because without NOCOMPOUNDSUGS support giving suggestions
|
||||
! # is extremely slow.
|
||||
! ## ordinal numbers
|
||||
! #COMPOUNDMIN 1
|
||||
! ## only in compounds: 1th, 2th, 3th
|
||||
! #ONLYINCOMPOUND c
|
||||
! ## compound rules:
|
||||
! ## 1. [0-9]*1[0-9]th (10th, 11th, 12th, 56714th, etc.)
|
||||
! ## 2. [0-9]*[02-9](1st|2nd|3rd|[4-9]th) (21st, 22nd, 123rd, 1234th, etc.)
|
||||
! #COMPOUNDRULE 2
|
||||
! #COMPOUNDRULE n*1t
|
||||
! #COMPOUNDRULE n*mp
|
||||
! #NOCOMPOUNDSUGS
|
||||
!
|
||||
! # WORDCHARS 0123456789
|
||||
|
||||
*** en_US.orig.dic 2015-12-30 18:55:58.928512408 +0100
|
||||
--- en_US.dic 2015-12-30 18:58:56.026596695 +0100
|
||||
--- en_US.dic 2016-01-08 23:04:15.241835664 +0100
|
||||
***************
|
||||
*** 1,25 ****
|
||||
48756
|
||||
! 0/nm
|
||||
! 0th/pt
|
||||
! 1/n1
|
||||
! 1st/p
|
||||
! 1th/tc
|
||||
! 2/nm
|
||||
! 2nd/p
|
||||
! 2th/tc
|
||||
! 3/nm
|
||||
! 3rd/p
|
||||
! 3th/tc
|
||||
! 4/nm
|
||||
! 4th/pt
|
||||
! 5/nm
|
||||
! 5th/pt
|
||||
! 6/nm
|
||||
! 6th/pt
|
||||
! 7/nm
|
||||
! 7th/pt
|
||||
! 8/nm
|
||||
! 8th/pt
|
||||
! 9/nm
|
||||
! 9th/pt
|
||||
A/SM
|
||||
--- 1,12 ----
|
||||
48756
|
||||
! 0th
|
||||
! 1st
|
||||
! 2nd
|
||||
! 3rd
|
||||
! 4th
|
||||
! 5th
|
||||
! 6th
|
||||
! 7th
|
||||
! 8th
|
||||
! 9th
|
||||
A/SM
|
||||
***************
|
||||
*** 48757 ****
|
||||
--- 48757,48767 ----
|
||||
--- 48744,48754 ----
|
||||
zymurgy/M
|
||||
+ a a/%
|
||||
+ a an/%
|
||||
|
||||
@@ -50,10 +50,12 @@ $SPELLDIR/en.ascii.spl : $FILES
|
||||
# Fetching the files from OpenOffice.org.
|
||||
# THIS URL NO LONGER WORKS.
|
||||
#
|
||||
# Files for en_US, en_CA and en_GB obtaind from
|
||||
# Files for en_US, en_CA and en_GB can be obtained from:
|
||||
# github.com/marcoagpinto/aoo-mozilla-en-dict
|
||||
# Unfortunately, giving suggestions becomes terribly slow with these.
|
||||
# TODO: find out why suggestions are slow and fix that.
|
||||
#
|
||||
# NOTE: en_AU and en_NZ use older libraries.
|
||||
# For now we use the older libraries.
|
||||
#
|
||||
OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries
|
||||
:attr {fetch = $OODIR/%file%} en_US.zip en_CA.zip en_NZ.zip
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
" Language: shell (sh) Korn shell (ksh) bash (sh)
|
||||
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
|
||||
" Previous Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int>
|
||||
" Last Change: Nov 09, 2015
|
||||
" Version: 142
|
||||
" Last Change: Dec 11, 2015
|
||||
" Version: 143
|
||||
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH
|
||||
" For options and settings, please use: :help ft-sh-syntax
|
||||
" This file includes many ideas from Eric Brunet (eric.brunet@ens.fr)
|
||||
@@ -119,7 +119,7 @@ syn cluster shCaseList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSu
|
||||
syn cluster shCommandSubList contains=shAlias,shArithmetic,shComment,shCmdParenRegion,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shEcho,shEscape,shExDoubleQuote,shExpr,shExSingleQuote,shNumber,shOperator,shOption,shPosnParm,shSingleQuote,shSpecial,shStatement,shSubSh,shTest,shVariable
|
||||
syn cluster shCurlyList contains=shNumber,shComma,shDeref,shDerefSimple,shDerefSpecial
|
||||
syn cluster shDblQuoteList contains=shCommandSub,shDeref,shDerefSimple,shEscape,shPosnParm,shCtrlSeq,shSpecial
|
||||
syn cluster shDerefList contains=shDeref,shDerefSimple,shDerefVar,shDerefSpecial,shDerefWordError,shDerefPPS
|
||||
syn cluster shDerefList contains=shDeref,shDerefSimple,shDerefVar,shDerefSpecial,shDerefWordError,shDerefPSR,shDerefPPS
|
||||
syn cluster shDerefVarList contains=shDerefOp,shDerefVarArray,shDerefOpError
|
||||
syn cluster shEchoList contains=shArithmetic,shCommandSub,shDeref,shDerefSimple,shEscape,shExpr,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shCtrlSeq,shEchoQuote
|
||||
syn cluster shExprList1 contains=shCharClass,shNumber,shOperator,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shDblBrace,shDeref,shDerefSimple,shCtrlSeq
|
||||
@@ -493,6 +493,11 @@ if exists("b:is_bash")
|
||||
syn match shDerefPPS contained '/\{1,2}' nextgroup=shDerefPPSleft
|
||||
syn region shDerefPPSleft contained start='.' skip=@\%(\\\\\)*\\/@ matchgroup=shDerefOp end='/' end='\ze}' nextgroup=shDerefPPSright contains=@shCommandSubList
|
||||
syn region shDerefPPSright contained start='.' skip=@\%(\\\\\)\+@ end='\ze}' contains=@shCommandSubList
|
||||
|
||||
" bash : ${parameter/#substring/replacement}
|
||||
syn match shDerefPSR contained '/#' nextgroup=shDerefPSRleft
|
||||
syn region shDerefPSRleft contained start='.' skip=@\%(\\\\\)*\\/@ matchgroup=shDerefOp end='/' end='\ze}' nextgroup=shDerefPSRright
|
||||
syn region shDerefPSRright contained start='.' skip=@\%(\\\\\)\+@ end='\ze}'
|
||||
endif
|
||||
|
||||
" Arithmetic Parenthesized Expressions: {{{1
|
||||
@@ -563,6 +568,7 @@ hi def link shColon shComment
|
||||
hi def link shDerefOp shOperator
|
||||
hi def link shDerefPOL shDerefOp
|
||||
hi def link shDerefPPS shDerefOp
|
||||
hi def link shDerefPSR shDerefOp
|
||||
hi def link shDeref shShellVariables
|
||||
hi def link shDerefDelim shOperator
|
||||
hi def link shDerefSimple shDeref
|
||||
|
||||
+21
-21
@@ -1,8 +1,8 @@
|
||||
" Vim syntax file
|
||||
" Language: Vim 7.4 script
|
||||
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
|
||||
" Last Change: November 30, 2015
|
||||
" Version: 7.4-38
|
||||
" Last Change: January 04, 2016
|
||||
" Version: 7.4-39
|
||||
" Automatically generated keyword lists: {{{1
|
||||
|
||||
" Quit when a syntax file was already loaded {{{2
|
||||
@@ -18,24 +18,24 @@ syn keyword vimTodo contained COMBAK FIXME TODO XXX
|
||||
syn cluster vimCommentGroup contains=vimTodo,@Spell
|
||||
|
||||
" regular vim commands {{{2
|
||||
syn keyword vimCommand contained a arga[dd] argl[ocal] ba[ll] bn[ext] breakd[el] bufdo cabc[lear] cb[uffer] cf[ile] changes cl[ist] cn[ext] col[der] conf[irm] cq[uit] cw[indow] delc[ommand] deletl delp diffpu[t] dir doau ea e[dit] endfo[r] ene[w] files fini[sh] foldd[oopen] g h helpt[ags] iabc[lear] intro k l lan lc[d] lefta[bove] lg[etfile] lla[st] lnew[er] lNf[ile] lockv[ar] ls lvimgrepa[dd] mat[ch] mk[exrc] mo n n[ext] nore on[ly] pe popu[p] pro pta[g] ptn[ext] pw[d] py[thon] r red[o] retu[rn] rub[y] rv[iminfo] sba[ll] sbN[ext] scripte[ncoding] setf[iletype] sh[ell] sl sme sno[magic] so[urce] spellr[epall] sre[wind] startg[replace] stopi[nsert] sus[pend] sync tab tabfir[st] tabn[ext] tabs tclf[ile] tl[ast] tn[ext] tr[ewind] u undol[ist] up[date] vert[ical] vi[sual] w windo wp[revious] wundo xmapc[lear] xprop
|
||||
syn keyword vimCommand contained ab argd ar[gs] bd[elete] bN[ext] breakl[ist] b[uffer] cad[dbuffer] cc cfir[st] chd[ir] clo[se] cN[ext] colo[rscheme] con[tinue] cr[ewind] d delel deletp dep diffs[plit] di[splay] dp earlier el[se] endfun ex filet fir[st] foldo[pen] go[to] ha[rdcopy] hi if is[earch] keepa la lan[guage] lch[dir] lex[pr] lgr[ep] lli[st] lne[xt] lo lol[der] lt[ag] lw[indow] menut mks[ession] mod[e] nbc[lose] nmapc[lear] nos[wapfile] o[pen] ped[it] pp[op] profd[el] ptf[irst] ptN[ext] py python3 re redr[aw] rew[ind] rubyd[o] sal[l] sbf[irst] sbp[revious] scr[iptnames] setg[lobal] sig sla[st] smenu snoreme spe spellu[ndo] st star[tinsert] sts[elect] sv[iew] syncbind tabc[lose] tabl[ast] tabN[ext] ta[g] te[aroff] tm tN[ext] try un unh[ide] v vi viu[sage] wa[ll] winp[os] wq wv[iminfo] xme xunme
|
||||
syn keyword vimCommand contained abc[lear] argd[elete] argu[ment] bel[owright] bo[tright] br[ewind] buffers cadde[xpr] ccl[ose] cgetb[uffer] che[ckpath] cmapc[lear] cnf com cope[n] cs de delep delf di difft[his] dj[ump] dr[op] ec elsei[f] endf[unction] exi[t] filetype fix[del] for gr[ep] h[elp] hid[e] ij[ump] isp[lit] keepalt lad la[st] lcl[ose] lf[ile] lgrepa[dd] lmak[e] lN[ext] loadk lop[en] lua ma menut[ranslate] mksp[ell] m[ove] nb[key] noa nu[mber] opt[ions] pe[rl] pr prof[ile] ptj[ump] ptp[revious] py3 q r[ead] redraws[tatus] ri[ght] rubyf[ile] san[dbox] sbl[ast] sbr[ewind] scs setl[ocal] sign sl[eep] sn[ext] snoremenu spelld[ump] spellw[rong] sta[g] startr[eplace] sun[hide] sw[apname] syntime tabd[o] tabm[ove] tabo[nly] tags tf[irst] tm[enu] to[pleft] ts[elect] una[bbreviate] unl ve vie[w] vmapc[lear] wh[ile] win[size] wqa[ll] x xmenu xunmenu
|
||||
syn keyword vimCommand contained abo[veleft] argdo as[cii] bf[irst] bp[revious] bro[wse] bun[load] caddf[ile] cd cgete[xpr] checkt[ime] cn cNf comc[lear] co[py] cscope debug d[elete] delf[unction] diffg[et] diffu[pdate] dl ds[earch] echoe[rr] em[enu] en[dif] exu[sage] fin fo[ld] fu grepa[dd] helpc[lose] his[tory] il[ist] iuna[bbrev] keepj[umps] laddb[uffer] lat lcs lfir[st] lh[elpgrep] lmapc[lear] lnf loadkeymap lpf[ile] luado mak[e] mes mkv mz nbs[tart] noautocmd o ownsyntax perld[o] pre[serve] promptf[ind] ptl[ast] ptr[ewind] py3do qa[ll] rec[over] reg[isters] rightb[elow] rundo sa[rgument] sbm[odified] sb[uffer] scscope sf[ind] sil[ent] sm[agic] sN[ext] so spe[llgood] sp[lit] star stj[ump] sunme sy t tabe[dit] tabN tabp[revious] tc[l] th[row] tn tp[revious] tu u[ndo] unlo[ckvar] verb[ose] vim[grep] vne[w] win wn[ext] w[rite] xa[ll] xnoreme xwininfo
|
||||
syn keyword vimCommand contained al[l] arge[dit] au bl[ast] brea[k] bu bw[ipeout] cal[l] ce[nter] cg[etfile] cl cN cnf[ile] comp[iler] cpf[ile] cstag debugg[reedy] deletel dell diffo[ff] dig dli[st] dsp[lit] echom[sg] en endt[ry] f fina[lly] foldc[lose] fun gui helpf[ind] i imapc[lear] j[oin] kee[pmarks] lad[dexpr] later lcscope lgetb[uffer] l[ist] lN lNf lo[adview] lp[revious] luafile ma[rk] messages mkvie[w] mzf[ile] ne noh[lsearch] ol[dfiles] p po[p] prev[ious] promptr[epl] ptn pts[elect] pydo q[uit] red res[ize] ru ru[ntime] sav[eas] sbn[ext] scr se[t] sfir[st] sim[alt] sm[ap] sni[ff] sor[t] spelli[nfo] spr[evious] start st[op] sunmenu syn ta tabf[ind] tabnew tabr[ewind] tcld[o] tj[ump] tN tr tu[nmenu] undoj[oin] uns[ilent] ve[rsion] vimgrepa[dd] vs[plit] winc[md] wN[ext] ws[verb] x[it] xnoremenu y[ank]
|
||||
syn keyword vimCommand contained ar argg[lobal] bad[d] bm[odified] breaka[dd] buf c cat[ch] cex[pr] c[hange] cla[st] cnew[er] cNf[ile] con cp[revious] cuna[bbrev] del deletep delm[arks] diffp[atch] dig[raphs] do e echon endf endw[hile] f[ile] fin[d] folddoc[losed] fu[nction] gvim helpg[rep] ia in ju[mps] keepp[atterns] laddf[ile] lb[uffer] le[ft] lgete[xpr] ll lne lnf[ile] loc[kmarks] lr[ewind] lv[imgrep] marks mk mkv[imrc] mz[scheme] new nor omapc[lear] pc[lose] popu p[rint] ps[earch] ptN pu[t] pyf[ile] quita[ll] redi[r] ret[ab]
|
||||
syn keyword vimCommand contained a arga[dd] argl[ocal] ba[ll] bn[ext] breakd[el] bufdo cabc[lear] cat[ch] ce[nter] cgetb[uffer] che[ckpath] cmapc[lear] cnf com cope[n] cs de delep delf di difft[his] dj[ump] dr[op] ec elsei[f] endf[unction] exi[t] filetype fix[del] for gr[ep] h[elp] hid[e] ij[ump] isp[lit] keepalt lad la[st] lcl[ose] lex[pr] lgete[xpr] ll lne lnf[ile] loc[kmarks] lr[ewind] lv[imgrep] marks mk mkv[imrc] mz[scheme] new noswap[file] o[pen] ped[it] pp[op] profd[el] ptf[irst] ptN[ext] py python3 re redr[aw] rew[ind] rubyf[ile] sa[rgument] sbn[ext] scripte[ncoding] setf[iletype] sh[ell] sim[alt] sm[ap] sni[ff] sor[t] spelli[nfo] spr[evious] start st[op] sunmenu syn ta tabf[ind] tabnew tabr[ewind] tcld[o] tj[ump] tN tr tu[nmenu] undoj[oin] uns[ilent] ve[rsion] vimgrepa[dd] vs[plit] winc[md] wN[ext] ws[verb] x[it] xnoremenu
|
||||
syn keyword vimCommand contained ab argd ar[gs] bd[elete] bN[ext] breakl[ist] b[uffer] cad cb[uffer] cex[pr] cgete[xpr] checkt[ime] cn cNf comc[lear] co[py] cscope debug d[elete] delf[unction] diffg[et] diffu[pdate] dl ds[earch] echoe[rr] em[enu] en[dif] exu[sage] fin fo[ld] fu grepa[dd] helpc[lose] his[tory] il[ist] iuna[bbrev] keepj[umps] laddb[uffer] lat lcs lf lg[etfile] lla[st] lnew[er] lNf[ile] lockv[ar] ls lvimgrepa[dd] mat[ch] mk[exrc] mo n n[ext] nu[mber] opt[ions] pe[rl] pr prof[ile] ptj[ump] ptp[revious] py3 q r[ead] redraws[tatus] ri[ght] rundo sav[eas] sbN[ext] scrip[tnames] setg[lobal] si sl sme sno[magic] so[urce] spellr[epall] sre[wind] startg[replace] stopi[nsert] sus[pend] sync tab tabfir[st] tabn[ext] tabs tclf[ile] tl[ast] tn[ext] tr[ewind] u undol[ist] up[date] vert[ical] vi[sual] w windo wp[revious] wundo xmapc[lear] xunme
|
||||
syn keyword vimCommand contained abc[lear] argd[elete] argu[ment] bel[owright] bo[tright] br[ewind] buffers caddb[uffer] cc cf cg[etfile] cl cN cnf[ile] comp[iler] cpf[ile] cstag debugg[reedy] deletel dell diffo[ff] dig dli[st] dsp[lit] echom[sg] en endt[ry] f fina[lly] foldc[lose] fun gui helpf[ind] i imapc[lear] j[oin] kee[pmarks] lad[dexpr] later lcscope lfdo lgr[ep] lli[st] lne[xt] lo lol[der] lt[ag] lw[indow] menut mks[ession] mod[e] nbc[lose] nmapc[lear] o ownsyntax perld[o] pre[serve] promptf[ind] ptl[ast] ptr[ewind] py3do qa[ll] rec[over] reg[isters] rightb[elow] ru[ntime] sba[ll] sbp[revious] scs setl[ocal] sig sla[st] smenu snoreme spe spellu[ndo] st star[tinsert] sts[elect] sv[iew] syncbind tabc[lose] tabl[ast] tabN[ext] ta[g] te[aroff] tm tN[ext] try un unh[ide] v vi viu[sage] wa[ll] winp[os] wq wv[iminfo] xme xunmenu
|
||||
syn keyword vimCommand contained abo[veleft] argdo as[cii] bf[irst] bp[revious] bro[wse] bun[load] cad[dexpr] ccl[ose] cfdo c[hange] cla[st] cnew[er] cNf[ile] con cp[revious] cuna[bbrev] del deletep delm[arks] diffp[atch] dig[raphs] do e echon endf endw[hile] f[ile] fin[d] folddoc[losed] fu[nction] gvim helpg[rep] ia in ju[mps] keepp[atterns] laddf[ile] lb[uffer] ld[o] lf[ile] lgrepa[dd] lmak[e] lN[ext] loadk lop[en] lua ma menut[ranslate] mksp[ell] m[ove] nb[key] noa ol[dfiles] p po[p] prev[ious] promptr[epl] ptn pts[elect] pydo q[uit] red res[ize] ru rv[iminfo] sbf[irst] sbr[ewind] scscope sf[ind] sign sl[eep] sn[ext] snoremenu spelld[ump] spellw[rong] sta[g] startr[eplace] sun[hide] sw[apname] syntime tabd[o] tabm[ove] tabo[nly] tags tf[irst] tm[enu] to[pleft] ts[elect] una[bbreviate] unl ve vie[w] vmapc[lear] wh[ile] win[size] wqa[ll] x xmenu xwininfo
|
||||
syn keyword vimCommand contained al[l] arge[dit] au bl[ast] brea[k] bu bw[ipeout] caddf[ile] cd cf[ile] changes cl[ist] cn[ext] col[der] conf[irm] cq[uit] cw[indow] delc[ommand] deletl delp diffpu[t] dir doau ea e[dit] endfo[r] ene[w] files fini[sh] foldd[oopen] g h helpt[ags] iabc[lear] intro k l lan lc[d] le[ft] lfir[st] lh[elpgrep] lmapc[lear] lnf loadkeymap lpf[ile] luado mak[e] mes mkv mz nbs[tart] noautocmd omapc[lear] pc[lose] popu p[rint] ps[earch] ptN pu[t] pyf[ile] quita[ll] redi[r] ret[ab] rub[y] sal[l] sbl[ast] sb[uffer] se[t] sfir[st] sil[ent] sm[agic] sN[ext] so spe[llgood] sp[lit] star stj[ump] sunme sy t tabe[dit] tabN tabp[revious] tc[l] th[row] tn tp[revious] tu u[ndo] unlo[ckvar] verb[ose] vim[grep] vne[w] win wn[ext] w[rite] xa[ll] xnoreme y[ank]
|
||||
syn keyword vimCommand contained ar argg[lobal] bad[d] bm[odified] breaka[dd] buf c cal[l] cdo cfir[st] chd[ir] clo[se] cN[ext] colo[rscheme] con[tinue] cr[ewind] d delel deletp dep diffs[plit] di[splay] dp earlier el[se] endfun ex filet fir[st] foldo[pen] go[to] ha[rdcopy] hi if is[earch] keepa la lan[guage] lch[dir] lefta[bove] lgetb[uffer] l[ist] lN lNf lo[adview] lp[revious] luafile ma[rk] messages mkvie[w] mzf[ile] ne noh[lsearch] on[ly] pe popu[p] pro pta[g] ptn[ext] pw[d] py[thon] r red[o] retu[rn] rubyd[o] san[dbox] sbm[odified] scrip
|
||||
syn match vimCommand contained "\<z[-+^.=]\=\>"
|
||||
syn keyword vimStdPlugin contained DiffOrig Man N[ext] P[rint] S TOhtml XMLent XMLns
|
||||
|
||||
" vimOptions are caught only when contained in a vimSet {{{2
|
||||
syn keyword vimOption contained acd ambw arshape background ballooneval bg bl brk buftype cf cinkeys cmdwinheight com concealcursor cp cscopeprg csprg cul def diff display edcompatible endofline errorformat fcl fdm fex fileformats fkmap foldenable foldminlines formatprg gdefault gp guifontset helpfile hidden hl ignorecase imcmdline imsf indentexpr is isp keywordprg laststatus lisp loadplugins ma matchtime mco ml modeline mousefocus mousetime nrformats ofu para pdev pheader previewheight printmbcharset pvw readonly restorescreen rnu ruf sc scrollopt selectmode shellpipe shellxquote showcmd sidescroll smartindent sol spellsuggest sr stal sua swf syntax tagcase tbi termbidi tgst titleold top ttimeoutlen ttyscroll ul ur verbosefile visualbell wcm wi wildmenu winfixwidth wm wrapscan
|
||||
syn keyword vimOption contained ai anti autochdir backspace balloonexpr bh bo browsedir casemap cfu cino cmp comments conceallevel cpo cscopequickfix csqf cursorbind define diffexpr dy ef eol esckeys fcs fdn ff fileignorecase flp foldexpr foldnestmax fp gfm grepformat guifontwide helpheight highlight hlg im imd imstatusfunc indentkeys isf isprint km lazyredraw lispwords lpl macatsui maxcombine mef mls modelines mousehide mp nu omnifunc paragraphs penc pi previewwindow printmbfont pythondll redrawtime revins ro ruler scb scs sessionoptions shellquote shiftround showfulltag sidescrolloff smarttab sp spf srr startofline suffixes switchbuf ta taglength tbidi termencoding thesaurus titlestring tpm ttm ttytype undodir ut vfile vop wd wic wildmode winheight wmh write
|
||||
syn keyword vimOption contained akm antialias autoindent backup bdir bin bomb bs cb ch cinoptions cms commentstring confirm cpoptions cscoperelative csre cursorcolumn delcombine diffopt ea efm ep et fdc fdo ffs filetype fml foldignore foldopen fs gfn grepprg guiheadroom helplang history hls imactivatefunc imdisable inc indk isfname joinspaces kmp lbr list ls magic maxfuncdepth menuitems mm modifiable mousem mps number opendevice paste perldll pm printdevice printoptions pythonthreedll regexpengine ri rop rulerformat scr sect sft shellredir shiftwidth showmatch siso smc spc spl ss statusline suffixesadd sws tabline tagrelative tbis terse tildeop tl tr tty tw undofile vb vi wa weirdinvert wig wildoptions winminheight wmnu writeany
|
||||
syn keyword vimOption contained al ar autoread backupcopy bdlay binary breakat bsdir cc charconvert cinw co compatible consk cpt cscopetag cst cursorline dex digraph ead ei equalalways eventignore fde fdt fic fillchars fmr foldlevel foldtext fsync gfs gtl guioptions hf hk hlsearch imactivatekey imi include inex isi js kp lcs listchars lsp makeef maxmapdepth mfd mmd modified mousemodel msm numberwidth operatorfunc pastetoggle pex pmbcs printencoding prompt qe relativenumber rightleft rs runtimepath scroll sections sh shellslash shm showmode sj smd spell splitbelow ssl stl sw sxe tabpagemax tags tbs textauto timeout tm ts ttybuiltin tx undolevels vbs viewdir wak wfh wildchar wim winminwidth wmw writebackup
|
||||
syn keyword vimOption contained aleph arab autowrite backupdir belloff biosk breakindent bsk ccv ci cinwords cocu complete conskey crb cscopetagorder csto cwh dg dip eadirection ek equalprg ex fdi fen fileencoding fixendofline fo foldlevelstart formatexpr ft gfw gtt guipty hh hkmap ic imaf iminsert includeexpr inf isident key langmap linebreak lm luadll makeprg maxmem mh mmp more mouses mzq nuw opfunc patchexpr pexpr pmbfn printexpr pt quoteescape remap rightleftcmd rtp sb scrollbind secure shcf shelltemp shortmess showtabline slm sn spellcapcheck splitright ssop stmp swapfile sxq tabstop tagstack tc textmode timeoutlen to tsl ttyfast uc undoreload vdir viewoptions warn wfw wildcharm winaltkeys winwidth wop writedelay
|
||||
syn keyword vimOption contained allowrevins arabic autowriteall backupext beval bioskey breakindentopt bt cd cin clipboard cole completefunc copyindent cryptmethod cscopeverbose csverb debug dict dir eb enc errorbells expandtab fdl fenc fileencodings fixeol foldclose foldmarker formatlistpat gcr ghr guicursor guitablabel hi hkmapp icon imak ims incsearch infercase isk keymap langmenu lines lmap lw mat maxmempattern mis mmt mouse mouseshape mzquantum odev osfiletype patchmode pfn popt printfont pumheight rdt renderoptions rl ru sbo scrolljump sel shell shelltype shortname shq sm so spellfile spr st sts swapsync syn tag tal tenc textwidth title toolbar tsr ttym udf updatecount ve viminfo wb wh wildignore window wiv wrap ws
|
||||
syn keyword vimOption contained altkeymap arabicshape aw backupskip bex bk bri bufhidden cdpath cindent cm colorcolumn completeopt cot cscopepathcomp cspc cuc deco dictionary directory ed encoding errorfile exrc fdls fencs fileformat fk foldcolumn foldmethod formatoptions gd go guifont guitabtooltip hid hkp iconstring imc imsearch inde insertmode iskeyword keymodel langnoremap linespace lnr lz matchpairs maxmemtot mkspellmem mod mousef mouset nf oft pa path ph preserveindent printheader pvh re report rlc rubydll sbr scrolloff selection shellcmdflag shellxescape showbreak si smartcase softtabstop spelllang sps sta su swb synmaxcol tagbsearch tb term tf titlelen toolbariconsize ttimeout ttymouse udir updatetime verbose virtualedit wc whichwrap wildignorecase winfixheight wiw wrapmargin ww
|
||||
syn keyword vimOption contained ambiwidth ari awa balloondelay bexpr bkc briopt buflisted cedit cink cmdheight columns
|
||||
syn keyword vimOption contained acd ambw arshape background ballooneval bg bl brk buftype cf cinkeys cmp com concealcursor cp cscopeprg csprg cul def diff display edcompatible endofline errorformat fcl fdm fex fileformats fkmap foldenable foldminlines formatprg gdefault gp guifontset helpfile hidden hl ignorecase imcmdline imsf indentexpr is isp keywordprg laststatus lisp loadplugins ma matchtime mco ml modeline mousefocus mousetime nrformats ofu para pdev pheader previewheight printmbcharset pvw readonly restorescreen rnu ruf sc scrollopt selectmode shellpipe shellxquote showcmd sidescroll smartindent sol spellsuggest sr stal sua swf syntax tagcase tbi termbidi tgst titleold top ttimeoutlen ttyscroll ul ur verbosefile visualbell wcm wi wildmenu winfixwidth wm wrapscan
|
||||
syn keyword vimOption contained ai anti autochdir backspace balloonexpr bh bo browsedir casemap cfu cino cms comments conceallevel cpo cscopequickfix csqf cursorbind define diffexpr dy ef eol esckeys fcs fdn ff fileignorecase flp foldexpr foldnestmax fp gfm grepformat guifontwide helpheight highlight hlg im imd imstatusfunc indentkeys isf isprint km lazyredraw lispwords lpl macatsui maxcombine mef mls modelines mousehide mp nu omnifunc paragraphs penc pi previewwindow printmbfont pythondll redrawtime revins ro ruler scb scs sessionoptions shellquote shiftround showfulltag sidescrolloff smarttab sp spf srr startofline suffixes switchbuf ta taglength tbidi termencoding thesaurus titlestring tpm ttm ttytype undodir ut vfile vop wd wic wildmode winheight wmh write
|
||||
syn keyword vimOption contained akm antialias autoindent backup bdir bin bomb bs cb ch cinoptions co commentstring confirm cpoptions cscoperelative csre cursorcolumn delcombine diffopt ea efm ep et fdc fdo ffs filetype fml foldignore foldopen fs gfn grepprg guiheadroom helplang history hls imactivatefunc imdisable inc indk isfname joinspaces kmp lbr list ls magic maxfuncdepth menuitems mm modifiable mousem mps number opendevice paste perldll pm printdevice printoptions pythonthreedll regexpengine ri rop rulerformat scr sect sft shellredir shiftwidth showmatch siso smc spc spl ss statusline suffixesadd sws tabline tagrelative tbis terse tildeop tl tr tty tw undofile vb vi wa weirdinvert wig wildoptions winminheight wmnu writeany
|
||||
syn keyword vimOption contained al ar autoread backupcopy bdlay binary breakat bsdir cc charconvert cinw cocu compatible consk cpt cscopetag cst cursorline dex digraph ead ei equalalways eventignore fde fdt fic fillchars fmr foldlevel foldtext fsync gfs gtl guioptions hf hk hlsearch imactivatekey imi include inex isi js kp lcs listchars lsp makeef maxmapdepth mfd mmd modified mousemodel msm numberwidth operatorfunc pastetoggle pex pmbcs printencoding prompt qe relativenumber rightleft rs runtimepath scroll sections sh shellslash shm showmode sj smd spell splitbelow ssl stl sw sxe tabpagemax tags tbs textauto timeout tm ts ttybuiltin tx undolevels vbs viewdir wak wfh wildchar wim winminwidth wmw writebackup
|
||||
syn keyword vimOption contained aleph arab autowrite backupdir belloff biosk breakindent bsk ccv ci cinwords cole complete conskey crb cscopetagorder csto cwh dg dip eadirection ek equalprg ex fdi fen fileencoding fixendofline fo foldlevelstart formatexpr ft gfw gtt guipty hh hkmap ic imaf iminsert includeexpr inf isident key langmap linebreak lm luadll makeprg maxmem mh mmp more mouses mzq nuw opfunc patchexpr pexpr pmbfn printexpr pt quoteescape remap rightleftcmd rtp sb scrollbind secure shcf shelltemp shortmess showtabline slm sn spellcapcheck splitright ssop stmp swapfile sxq tabstop tagstack tc textmode timeoutlen to tsl ttyfast uc undoreload vdir viewoptions warn wfw wildcharm winaltkeys winwidth wop writedelay
|
||||
syn keyword vimOption contained allowrevins arabic autowriteall backupext beval bioskey breakindentopt bt cd cin clipboard colorcolumn completefunc copyindent cryptmethod cscopeverbose csverb debug dict dir eb enc errorbells expandtab fdl fenc fileencodings fixeol foldclose foldmarker formatlistpat gcr ghr guicursor guitablabel hi hkmapp icon imak ims incsearch infercase isk keymap langmenu lines lmap lw mat maxmempattern mis mmt mouse mouseshape mzquantum odev osfiletype patchmode pfn popt printfont pumheight rdt renderoptions rl ru sbo scrolljump sel shell shelltype shortname shq sm so spellfile spr st sts swapsync syn tag tal tenc textwidth title toolbar tsr ttym udf updatecount ve viminfo wb wh wildignore window wiv wrap ws
|
||||
syn keyword vimOption contained altkeymap arabicshape aw backupskip bex bk bri bufhidden cdpath cindent cmdheight columns completeopt cot cscopepathcomp cspc cuc deco dictionary directory ed encoding errorfile exrc fdls fencs fileformat fk foldcolumn foldmethod formatoptions gd go guifont guitabtooltip hid hkp iconstring imc imsearch inde insertmode iskeyword keymodel langnoremap linespace lnr lz matchpairs maxmemtot mkspellmem mod mousef mouset nf oft pa path ph preserveindent printheader pvh re report rlc rubydll sbr scrolloff selection shellcmdflag shellxescape showbreak si smartcase softtabstop spelllang sps sta su swb synmaxcol tagbsearch tb term tf titlelen toolbariconsize ttimeout ttymouse udir updatetime verbose virtualedit wc whichwrap wildignorecase winfixheight wiw wrapmargin ww
|
||||
syn keyword vimOption contained ambiwidth ari awa balloondelay bexpr bkc briopt buflisted cedit cink cmdwinheight
|
||||
|
||||
" vimOptions: These are the turn-off setting variants {{{2
|
||||
syn keyword vimOption contained noacd noallowrevins noantialias noarabic noarshape noautoread noaw noballooneval nobinary nobk nobuflisted nocin noconfirm nocopyindent nocscoperelative nocsre nocuc nocursorcolumn nodelcombine nodigraph noed noendofline noerrorbells noex nofen nofixendofline nofkmap nogdefault nohidden nohkmapp nohlsearch noicon noim noimcmdline noimdisable noinf noinsertmode nojoinspaces nolazyredraw nolinebreak nolist nolpl noma nomagic noml nomodeline nomodified nomousef nomousehide nonumber noopendevice nopi nopreviewwindow nopvw norelativenumber norestorescreen nori norl noro noru nosb noscb noscs nosft noshelltemp noshortname noshowfulltag noshowmode nosm nosmartindent nosmd nosol nosplitbelow nospr nossl nostartofline noswapfile nota notagrelative notbi notbs noterse notextmode notgst notimeout noto notr nottybuiltin notx noundofile novisualbell nowarn noweirdinvert nowfw nowildignorecase nowinfixheight nowiv nowrap nowrite nowritebackup
|
||||
@@ -48,8 +48,8 @@ syn keyword vimOption contained invai invaltkeymap invar invarabicshape invautoc
|
||||
syn keyword vimOption contained invakm invanti invarab invari invautoindent invautowriteall invbackup invbin invbioskey invbomb invci invcompatible invconskey invcrb invcscopeverbose invcsverb invcursorbind invdeco invdiff inveb invek invequalalways invet invexrc invfileignorecase invfk invgd invhid invhkmap invhls
|
||||
|
||||
" termcap codes (which can also be set) {{{2
|
||||
syn keyword vimOption contained t_AB t_al t_bc t_ce t_cl t_Co t_Cs t_CV t_db t_DL t_EI t_F1 t_F2 t_F3 t_F4 t_F5 t_F6 t_F7 t_F8 t_F9 t_fs t_IE t_IS t_k1 t_K1 t_k2 t_k3 t_K3 t_k4 t_K4 t_k5 t_K5 t_k6 t_K6 t_k7 t_K7 t_k8 t_K8 t_k9 t_K9 t_KA t_kb t_kB t_KB t_KC t_kd t_kD t_KD t_ke t_KE t_KF t_KG t_kh t_KH t_kI t_KI t_KJ t_KK t_kl t_KL t_kN t_kP t_kr t_ks t_ku t_le t_mb t_md t_me t_mr t_ms t_nd t_op t_RB t_RI t_RV t_Sb t_se t_Sf t_SI t_so t_sr t_SR t_te t_ti t_ts t_u7 t_ue t_us t_ut t_vb t_ve t_vi t_vs t_WP t_WS t_xn t_xs t_ZH t_ZR
|
||||
syn keyword vimOption contained t_AF t_AL t_cd t_Ce t_cm t_cs t_CS t_da t_dl
|
||||
syn keyword vimOption contained t_AB t_al t_bc t_ce t_cl t_Co t_Cs t_CV t_db t_dl t_DL t_EI t_F1 t_F2 t_F3 t_F4 t_F5 t_F6 t_F7 t_F8 t_F9 t_fs t_IE t_IS t_k1 t_K1 t_k2 t_k3 t_K3 t_k4 t_K4 t_k5 t_K5 t_k6 t_K6 t_k7 t_K7 t_k8 t_K8 t_k9 t_K9 t_KA t_kb t_kB t_KB t_KC t_kd t_kD t_KD t_ke t_KE t_KF t_KG t_kh t_KH t_kI t_KI t_KJ t_KK t_kl t_KL t_kN t_kP t_kr t_ks t_ku t_le t_mb t_md t_me t_mr t_ms t_nd t_op t_RI t_RV t_Sb t_se t_Sf t_SI t_so t_sr t_SR t_te t_ti t_ts t_u7 t_ue t_us t_ut t_vb t_ve t_vi t_vs t_WP t_WS t_xn t_xs t_ZH t_ZR
|
||||
syn keyword vimOption contained t_AF t_AL t_cd t_Ce t_cm t_cs t_CS t_da
|
||||
syn match vimOption contained "t_%1"
|
||||
syn match vimOption contained "t_#2"
|
||||
syn match vimOption contained "t_#4"
|
||||
@@ -75,9 +75,9 @@ syn match vimHLGroup contained "Conceal"
|
||||
syn case match
|
||||
|
||||
" Function Names {{{2
|
||||
syn keyword vimFuncName contained abs and argidx asin browse buflisted bufnr byteidx ceil cindent complete confirm cosh cursor did_filetype empty eventhandler exists expr8 filereadable finddir floor fnamemodify foldlevel foreground get getchar getcmdline getcmdwintype getfontname getftime getloclist getpos getregtype getwinposx glob has hasmapto histget hlID indent inputdialog inputsave invert items len line localtime luaeval mapcheck matchaddpos matchend max mode nr2char pow pumvisible range reltimestr remote_peek remove resolve screenattr screenrow searchpair server2client setcharsearch setloclist setqflist settabwinvar shellescape sin soundfold split str2float strchars strftime string strpart strtrans submatch synconcealed synIDattr synstack systemlist tabpagenr tagfiles tan tempname toupper trunc undofile uniq virtcol wildmenumode wincol winline winrestcmd winsaveview writefile
|
||||
syn keyword vimFuncName contained acos append arglistid atan browsedir bufloaded bufwinnr byteidxcomp changenr clearmatches complete_add copy count deepcopy diff_filler escape executable exp extend filewritable findfile fmod foldclosed foldtext function getbufline getcharmod getcmdpos getcurpos getfperm getftype getmatches getqflist gettabvar getwinposy glob2regpat has_key histadd histnr hostname index inputlist inputsecret isdirectory join libcall line2byte log map match matcharg matchlist min mzeval or prevnonblank py3eval readfile remote_expr remote_read rename reverse screenchar search searchpairpos serverlist setcmdpos setmatches setreg setwinvar shiftwidth sinh spellbadword sqrt str2nr strdisplaywidth stridx strlen strridx strwidth substitute synID synIDtrans system tabpagebuflist tabpagewinnr taglist tanh tolower tr type undotree values visualmode winbufnr winheight winnr winrestview winwidth xor
|
||||
syn keyword vimFuncName contained add argc argv atan2 bufexists bufname byte2line call char2nr col complete_check cos cscope_connection delete diff_hlID eval exepath expand feedkeys filter float2nr fnameescape foldclosedend foldtextresult garbagecollect getbufvar getcharsearch getcmdtype getcwd getfsize getline getpid getreg gettabwinvar getwinvar globpath haslocaldir histdel hlexists iconv input inputrestore insert islocked keys libcallnr lispindent log10 maparg matchadd matchdelete matchstr mkdir nextnonblank pathshorten printf pyeval reltime remote_foreground remote_send repeat round screencol searchdecl searchpos setbufvar setline setpos settabvar sha256 simplify sort spellsuggest
|
||||
syn keyword vimFuncName contained abs and argidx asin assert_true browse buflisted bufnr byteidx ceil cindent complete confirm cosh cursor did_filetype empty eventhandler exists expr8 filereadable finddir floor fnamemodify foldlevel foreground get getchar getcmdline getcmdwintype getfontname getftime getloclist getpos getregtype getwinposx glob has hasmapto histget hlID indent inputdialog inputsave invert items len line localtime luaeval mapcheck matchaddpos matchend max mode nr2char pow pumvisible range reltimestr remote_peek remove resolve screenattr screenrow searchpair server2client setcharsearch setloclist setqflist settabwinvar shellescape sin soundfold split str2nr strftime strlen strridx strwidth substitute synID synIDtrans system tabpagebuflist tabpagewinnr taglist tanh tolower tr type undotree values visualmode winbufnr winheight winnr winrestview winwidth writefile
|
||||
syn keyword vimFuncName contained acos append arglistid assert_equal atan browsedir bufloaded bufwinnr byteidxcomp changenr clearmatches complete_add copy count deepcopy diff_filler escape executable exp extend filewritable findfile fmod foldclosed foldtext function getbufline getcharmod getcmdpos getcurpos getfperm getftype getmatches getqflist gettabvar getwinposy glob2regpat has_key histadd histnr hostname index inputlist inputsecret isdirectory join libcall line2byte log map match matcharg matchlist min mzeval or prevnonblank py3eval readfile remote_expr remote_read rename reverse screenchar search searchpairpos serverlist setcmdpos setmatches setreg setwinvar shiftwidth sinh spellbadword sqrt strchars stridx strpart strtrans submatch synconcealed synIDattr synstack systemlist tabpagenr tagfiles tan tempname toupper trunc undofile uniq virtcol wildmenumode wincol winline winrestcmd winsaveview wordcount xor
|
||||
syn keyword vimFuncName contained add argc argv assert_false atan2 bufexists bufname byte2line call char2nr col complete_check cos cscope_connection delete diff_hlID eval exepath expand feedkeys filter float2nr fnameescape foldclosedend foldtextresult garbagecollect getbufvar getcharsearch getcmdtype getcwd getfsize getline getpid getreg gettabwinvar getwinvar globpath haslocaldir histdel hlexists iconv input inputrestore insert islocked keys libcallnr lispindent log10 maparg matchadd matchdelete matchstr mkdir nextnonblank pathshorten printf pyeval reltime remote_foreground remote_send repeat round screencol searchdecl searchpos setbufvar setline setpos settabvar sha256 simplify sort spellsuggest str2float strdisplaywidth string
|
||||
|
||||
"--- syntax here and above generated by mkvimvim ---
|
||||
" Special Vim Highlighting (not automatic) {{{1
|
||||
|
||||
+24
-8
@@ -12,6 +12,22 @@ APPVER=5.0
|
||||
NODEBUG = 1
|
||||
!endif
|
||||
|
||||
!ifdef PROCESSOR_ARCHITECTURE
|
||||
# On Windows NT
|
||||
! ifndef CPU
|
||||
CPU = i386
|
||||
! ifdef PLATFORM
|
||||
! if ("$(PLATFORM)" == "x64") || ("$(PLATFORM)" == "X64")
|
||||
CPU = AMD64
|
||||
! elseif ("$(PLATFORM)" != "x86") && ("$(PLATFORM)" != "X86")
|
||||
! error *** ERROR Unknown target platform "$(PLATFORM)". Make aborted.
|
||||
! endif
|
||||
! endif
|
||||
! endif
|
||||
!else
|
||||
CPU = i386
|
||||
!endif
|
||||
|
||||
!ifdef SDK_INCLUDE_DIR
|
||||
!include $(SDK_INCLUDE_DIR)\Win32.mak
|
||||
!else
|
||||
@@ -30,15 +46,15 @@ gvimext.dll: gvimext.obj \
|
||||
gvimext.obj: gvimext.h
|
||||
|
||||
.cpp.obj:
|
||||
$(cc) $(cflags) -DFEAT_GETTEXT $(cvarsmt) $*.cpp
|
||||
$(cc) $(cflags) -DFEAT_GETTEXT $(cvarsmt) $*.cpp
|
||||
|
||||
gvimext.res: gvimext.rc
|
||||
$(rc) $(rcflags) $(rcvars) gvimext.rc
|
||||
$(rc) $(rcflags) $(rcvars) gvimext.rc
|
||||
|
||||
clean:
|
||||
- if exist gvimext.dll del gvimext.dll
|
||||
- if exist gvimext.lib del gvimext.lib
|
||||
- if exist gvimext.exp del gvimext.exp
|
||||
- if exist gvimext.obj del gvimext.obj
|
||||
- if exist gvimext.res del gvimext.res
|
||||
- if exist gvimext.dll.manifest del gvimext.dll.manifest
|
||||
- if exist gvimext.dll del gvimext.dll
|
||||
- if exist gvimext.lib del gvimext.lib
|
||||
- if exist gvimext.exp del gvimext.exp
|
||||
- if exist gvimext.obj del gvimext.obj
|
||||
- if exist gvimext.res del gvimext.res
|
||||
- if exist gvimext.dll.manifest del gvimext.dll.manifest
|
||||
|
||||
+249
-29
@@ -13,7 +13,7 @@ be fine for most people.
|
||||
|
||||
With the exception of two sections (Windows 3.1 and MS-DOS), this document
|
||||
assumes that you are building Vim for Win32 or later.
|
||||
(Windows 95/98/Me/NT/2000/XP/2003/Vista/7)
|
||||
(Windows 95/98/Me/NT/2000/XP/2003/Vista/7/8/10)
|
||||
|
||||
|
||||
Contents:
|
||||
@@ -23,11 +23,16 @@ Contents:
|
||||
4. Borland
|
||||
5. Cross compiling for Win32 from a Linux machine
|
||||
6. Building with Python support
|
||||
7. Building with MzScheme support
|
||||
8. Windows 3.1
|
||||
9. MS-DOS
|
||||
7. Building with Python3 support
|
||||
8. Building with MzScheme support
|
||||
9. Building with Lua support
|
||||
10. Building with Perl support
|
||||
11. Building with Ruby support
|
||||
12. Building with Tcl support
|
||||
13. Windows 3.1
|
||||
14. MS-DOS
|
||||
|
||||
10. Installing after building from sources
|
||||
15. Installing after building from sources
|
||||
|
||||
|
||||
The currently preferred method is using the free Visual C++ Toolkit 2008
|
||||
@@ -42,8 +47,9 @@ you need the executable to run on Windows 98 or ME, use the 2003 one
|
||||
Visual Studio
|
||||
-------------
|
||||
|
||||
Building with Visual Studio (VS 98, VS .NET, VS .NET 2003, VS 2005, and VS 2008)
|
||||
is straightforward. (These instructions should also work for VS 4 and VS 5.)
|
||||
Building with Visual Studio (VS 98, VS .NET, VS .NET 2003, VS 2005, VS 2008,
|
||||
VS2010, VS2012, VS2013 and VS2015) is straightforward. (These instructions
|
||||
should also work for VS 4 and VS 5.)
|
||||
|
||||
Using VS C++ 2008 Express is recommended, the binaries build with that run on
|
||||
nearly all platforms. Binaries from later versions may not run on Windows 95
|
||||
@@ -195,7 +201,7 @@ Vim with Make_mvc.mak.
|
||||
Targeting Windows XP with new MSVC *new-msvc-windows-xp*
|
||||
----------------------------------
|
||||
|
||||
Beginning with Visual C++ 2010, Microsoft changed the behavior of LINK.EXE
|
||||
Beginning with Visual C++ 2012, Microsoft changed the behavior of LINK.EXE
|
||||
so that it targets Windows 6.0 (Vista) by default. In order to override
|
||||
this, the target Windows version number needs to be passed to LINK like
|
||||
follows:
|
||||
@@ -345,6 +351,17 @@ Now you have created the Windows binary from your Linux box! Have fun...
|
||||
For building with MSVC 2008 the "Windows Installer" from www.python.org
|
||||
works fine.
|
||||
|
||||
When building, you need to set the following variables at least:
|
||||
|
||||
PYTHON: Where Python is installed. E.g. C:\Python27
|
||||
DYNAMIC_PYTHON: Whether dynamic linking is used. Usually, set to yes.
|
||||
PYTHON_VER: Python version. E.g. 27 for Python 2.7.X.
|
||||
|
||||
E.g. When using MSVC (as one line):
|
||||
|
||||
nmake -f Make_mvc.mak
|
||||
PYTHON=C:\Python27 DYNAMIC_PYTHON=yes PYTHON_VER=27
|
||||
|
||||
(rest written by Ron Aaron: <ronaharon@yahoo.com>)
|
||||
|
||||
Building with the mingw32 compiler, and the ActiveState ActivePython:
|
||||
@@ -380,7 +397,25 @@ And if you use msys2 to build python support (as one line):
|
||||
You will end up with a Python-enabled, Win32 version. Enjoy!
|
||||
|
||||
|
||||
7. Building with MzScheme support
|
||||
7. Building with Python3 support
|
||||
================================
|
||||
|
||||
For building with MSVC 2008 the "Windows Installer" from www.python.org
|
||||
works fine. Python 3.4 is recommended.
|
||||
|
||||
When building, you need to set the following variables at least:
|
||||
|
||||
PYTHON3: Where Python3 is installed. E.g. C:\Python34
|
||||
DYNAMIC_PYTHON3: Whether dynamic linking is used. Usually, set to yes.
|
||||
PYTHON3_VER: Python3 version. E.g. 34 for Python 3.4.X.
|
||||
|
||||
E.g. When using MSVC (as one line):
|
||||
|
||||
nmake -f Make_mvc.mak
|
||||
PYTHON3=C:\Python34 DYNAMIC_PYTHON3=yes PYTHON3_VER=34
|
||||
|
||||
|
||||
8. Building with MzScheme support
|
||||
=================================
|
||||
|
||||
(written by Sergey Khorev <sergey.khorev@gmail.com>)
|
||||
@@ -416,8 +451,193 @@ After a successful build, these dlls can be freely removed, leaving them in
|
||||
%WINDOWS%\System32 only.
|
||||
|
||||
|
||||
8. Windows 3.1x
|
||||
===============
|
||||
9. Building with Lua support
|
||||
============================
|
||||
|
||||
Vim with Lua support can be built with either MSVC or MinGW (or Cygwin).
|
||||
You can use binaries from LuaBinaries.
|
||||
http://luabinaries.sourceforge.net/
|
||||
|
||||
1) Download and install LuaBinaries
|
||||
Go to the Download page of LuaBinaries:
|
||||
http://luabinaries.sourceforge.net/download.html
|
||||
|
||||
Download lua-X.Y.Z_Win32_dllw4_lib.zip for x86 or
|
||||
lua-X.Y.Z_Win64_dllw4_lib.zip for x64. You can use them for both MSVC and
|
||||
MinGW.
|
||||
|
||||
Unpack it to a working directory. E.g. C:\projects\lua53.
|
||||
Lua's header files will be installed under the include directory.
|
||||
|
||||
|
||||
2) Build
|
||||
You need to set the following variables:
|
||||
|
||||
LUA: Where Lua is installed. E.g. C:\projects\lua53.
|
||||
DYNAMIC_LUA: Whether dynamic linking is used. Usually, set to yes.
|
||||
LUA_VER: Lua version. E.g. 53 for Lua 5.3.X.
|
||||
|
||||
E.g. When using MSVC (as one line):
|
||||
|
||||
nmake -f Make_mvc.mak
|
||||
LUA=C:\projects\lua53 DYNAMIC_LUA=yes LUA_VER=53
|
||||
|
||||
Or when using MinGW (as one line):
|
||||
|
||||
mingw32-make -f Make_mingw.mak
|
||||
LUA=C:\projects\lua53 DYNAMIC_LUA=yes LUA_VER=53
|
||||
|
||||
Or when using Cygwin (as one line):
|
||||
|
||||
make -f Make_cyg.mak
|
||||
LUA=/cygdrive/c/projects/lua53 DYNAMIC_LUA=yes LUA_VER=53
|
||||
|
||||
|
||||
10. Building with Perl support
|
||||
==============================
|
||||
|
||||
Vim with Perl support can be built with either MSVC or MinGW (or Cygwin).
|
||||
You can use binaries from ActiveState (ActivePerl) or Strawberry Perl.
|
||||
|
||||
http://www.activestate.com/activeperl
|
||||
http://strawberryperl.com/
|
||||
|
||||
When building, you need to set the following variables:
|
||||
|
||||
PERL: Where perl is installed. E.g. C:\Perl, C:\Strawberry\perl
|
||||
DYNAMIC_PERL: Whether dynamic linking is used. Usually, set to yes.
|
||||
PERL_VER: Perl version. E.g. 522 for Perl 5.22.X.
|
||||
|
||||
E.g. When using MSVC (as one line):
|
||||
|
||||
nmake -f Make_mvc.mak
|
||||
PERL=C:\Perl DYNAMIC_PERL=yes PERL_VER=522
|
||||
|
||||
Or when using MinGW (as one line):
|
||||
|
||||
mingw32-make -f Make_mingw.mak
|
||||
PERL=C:\Perl DYNAMIC_PERL=yes PERL_VER=522
|
||||
|
||||
|
||||
11. Building with Ruby support
|
||||
==============================
|
||||
|
||||
Vim with Ruby support can be built with either MSVC or MinGW (or Cygwin).
|
||||
Ruby doesn't provide the official Windows binaries. The most widely used
|
||||
Windows binaries might be RubyInstaller.
|
||||
|
||||
http://rubyinstaller.org/
|
||||
|
||||
If you use MinGW you can easily build with RubyInstaller, but if you use MSVC
|
||||
you need some tricks described below.
|
||||
(Another binary distribution is ActiveScriptRuby:
|
||||
http://www.artonx.org/data/asr/)
|
||||
|
||||
When building, you need to set the following variables at least:
|
||||
|
||||
RUBY: Where ruby is installed. E.g. C:\Ruby22
|
||||
DYNAMIC_RUBY: Whether dynamic linking is used. Usually, set to yes.
|
||||
RUBY_VER: Ruby version. E.g. 22 for Ruby 2.2.X.
|
||||
RUBY_VER_LONG: Ruby API version in a long format.
|
||||
E.g. 2.2.0 for Ruby 2.2.X.
|
||||
|
||||
Ruby version vs. Ruby API version:
|
||||
|
||||
Ruby ver. | Ruby API ver.
|
||||
=========================
|
||||
1.8.X | 1.8
|
||||
1.9.[1-3] | 1.9.1
|
||||
2.0.0 | 2.0.0
|
||||
2.X.Y | 2.X.0
|
||||
|
||||
(Ruby 1.9.0 is excluded from the table because it is an unstable version.)
|
||||
|
||||
|
||||
A) Using MSVC
|
||||
|
||||
If you want to link with ruby, normally you must use the same compiler as
|
||||
which was used to build the ruby binary. RubyInstaller is built with MinGW,
|
||||
so normally you cannot use MSVC for building Vim if you want to link with
|
||||
RubyInstaller. If you use a different complier, there are mainly two problems:
|
||||
config.h and Ruby's DLL name. Here are the steps for working around them:
|
||||
|
||||
1) Download and Install RubyInstaller.
|
||||
You can install RubyInstaller with the default options and directory.
|
||||
E.g.:
|
||||
C:\Ruby22 (32-bit) or C:\Ruby22-x64 (64-bit)
|
||||
|
||||
Ruby 2.2.X is used in this example.
|
||||
|
||||
2) Download Ruby 2.2.X's source code and generate config.h:
|
||||
|
||||
cd C:\projects
|
||||
git clone https://github.com/ruby/ruby.git -b ruby_2_2
|
||||
cd ruby
|
||||
win32\configure.bat
|
||||
nmake .config.h.time
|
||||
|
||||
Note that ruby_2_2 is the branch name for Ruby 2.2.X's source code.
|
||||
There is no need to build whole Ruby, just config.h is needed.
|
||||
If you use 32-bit MSVC10, the config.h is generated in the
|
||||
.ext\include\i386-mswin32_100 directory.
|
||||
|
||||
3) Install the generated config.h.
|
||||
|
||||
xcopy /s .ext\include C:\Ruby22\include\ruby-2.2.0
|
||||
|
||||
Note that 2.2.0 is Ruby API version of Ruby 2.2.X.
|
||||
|
||||
4) Build Vim. Note that you need to adjust some variables (as one line):
|
||||
|
||||
nmake -f Make_mvc.mak
|
||||
RUBY=C:\Ruby22 DYNAMIC_RUBY=yes RUBY_VER=22 RUBY_VER_LONG=2.2.0
|
||||
RUBY_MSVCRT_NAME=msvcrt
|
||||
WINVER=0x500
|
||||
|
||||
WINVER must be set to >=0x500, when building with Ruby 2.1 or later.
|
||||
When using this trick, you also need to set RUBY_MSVCRT_NAME to msvcrt
|
||||
which is used for the Ruby's DLL name.
|
||||
|
||||
B) Using MinGW
|
||||
|
||||
Using MinGW is easier than using MSVC when linking with RubyInstaller.
|
||||
After you install RubyInstaller, just type this (as one line):
|
||||
|
||||
mingw32-make -f Make_ming.mak
|
||||
RUBY=C:/Ruby22 DYNAMIC_RUBY=yes RUBY_VER=22 RUBY_VER_LONG=2.2.0
|
||||
WINVER=0x500
|
||||
|
||||
WINVER must be set to >=0x500, when building with Ruby 2.1 or later.
|
||||
|
||||
|
||||
12. Building with Tcl support
|
||||
=============================
|
||||
|
||||
Vim with Tcl support can be built with either MSVC or MinGW (or Cygwin).
|
||||
You can use binaries from ActiveState (ActiveTcl).
|
||||
|
||||
http://www.activestate.com/activetcl
|
||||
|
||||
When building, you need to set the following variables:
|
||||
|
||||
TCL: Where tcl is installed. E.g. C:\Tcl86
|
||||
DYNAMIC_TCL: Whether dynamic linking is used. Usually, set to yes.
|
||||
TCL_VER: Tcl version in a short format. E.g. 86 for Tcl 8.6.X.
|
||||
TCL_VER_LONG: Tcl version in a long format. E.g. 8.6 for Tcl 8.6.X.
|
||||
|
||||
E.g. When using MSVC (as one line):
|
||||
|
||||
nmake -f Make_mvc.mak
|
||||
TCL=C:\Tcl86 DYNAMIC_TCL=yes TCL_VER=86 TCL_VER_LONG=8.6
|
||||
|
||||
Or when using MinGW (as one line):
|
||||
|
||||
mingw32-make -f Make_mingw.mak
|
||||
TCL=C:\Tcl86 DYNAMIC_TCL=yes TCL_VER=86 TCL_VER_LONG=8.6
|
||||
|
||||
|
||||
13. Windows 3.1x
|
||||
================
|
||||
|
||||
make -f Make_w16.mak 16 bit, Borland C++ 5.0
|
||||
|
||||
@@ -436,8 +656,8 @@ In MSVC 4.2 support for Win32s was dropped! Use this command:
|
||||
nmake -f Make_mvc.mak GUI=yes
|
||||
|
||||
|
||||
9. MS-DOS
|
||||
=========
|
||||
14. MS-DOS
|
||||
==========
|
||||
|
||||
Summary:
|
||||
ren Make_bc3.mak Makefile; make 16 bit, Borland C++ and Turbo C++
|
||||
@@ -479,48 +699,48 @@ If you get all kinds of strange error messages when compiling, try changing
|
||||
the file format from "unix" to "dos".
|
||||
|
||||
|
||||
10. Installing after building from sources
|
||||
15. Installing after building from sources
|
||||
==========================================
|
||||
|
||||
[provided by Michael Soyka]
|
||||
|
||||
After you've built the Vim binaries as described above, you're ready to
|
||||
install Vim on your system. However, if you've obtained the Vim sources
|
||||
using Mercurial or by downloading them as a unix tar file, you must first
|
||||
create a "vim73" directory. If you instead downloaded the sources as
|
||||
using Git, Mercurial or by downloading them as a unix tar file, you must
|
||||
first create a "vim74" directory. If you instead downloaded the sources as
|
||||
zip files, you can skip this setup as the zip archives already have the
|
||||
correct directory structure.
|
||||
|
||||
A. Create a Vim "runtime" subdirectory named "vim73"
|
||||
A. Create a Vim "runtime" subdirectory named "vim74"
|
||||
-----------------------------------------------------
|
||||
If you obtained your Vim sources as zip files, you can skip this step.
|
||||
Otherwise, continue reading.
|
||||
|
||||
Go to the directory that contains the Vim "src" and "runtime"
|
||||
directories and create a new subdirectory named "vim73".
|
||||
directories and create a new subdirectory named "vim74".
|
||||
|
||||
Copy the "runtime" files into "vim73":
|
||||
copy runtime\* vim73
|
||||
Copy the "runtime" files into "vim74":
|
||||
copy runtime\* vim74
|
||||
|
||||
B. Copy the new binaries into the "vim73" directory
|
||||
B. Copy the new binaries into the "vim74" directory
|
||||
----------------------------------------------------
|
||||
Regardless of how you installed the Vim sources, you need to copy the
|
||||
new binaries you created above into "vim73":
|
||||
new binaries you created above into "vim74":
|
||||
|
||||
copy src\*.exe vim73
|
||||
copy src\GvimExt\gvimext.dll vim73
|
||||
copy src\xxd\xxd.exe vim73
|
||||
copy src\*.exe vim74
|
||||
copy src\GvimExt\gvimext.dll vim74
|
||||
copy src\xxd\xxd.exe vim74
|
||||
|
||||
C. Move the "vim73" directory into the Vim installation subdirectory
|
||||
C. Move the "vim74" directory into the Vim installation subdirectory
|
||||
---------------------------------------------------------------------
|
||||
Move the "vim73" subdirectory into the subdirectory where you want Vim
|
||||
Move the "vim74" subdirectory into the subdirectory where you want Vim
|
||||
to be installed. Typically, this subdirectory will be named "vim".
|
||||
If you already have a "vim73" subdirectory in "vim", delete it first
|
||||
If you already have a "vim74" subdirectory in "vim", delete it first
|
||||
by running its uninstal.exe program.
|
||||
|
||||
D. Install Vim
|
||||
---------------
|
||||
"cd" to your Vim installation subdirectory "vim\vim73" and run the
|
||||
"cd" to your Vim installation subdirectory "vim\vim74" and run the
|
||||
"install.exe" program. It will ask you a number of questions about
|
||||
how you would like to have your Vim setup. Among these are:
|
||||
- You can tell it to write a "_vimrc" file with your preferences in the
|
||||
|
||||
+1704
-276
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -1255,7 +1255,7 @@
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>89</string>
|
||||
<string>91</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>MainMenu</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
|
||||
@@ -155,7 +155,14 @@ enum {
|
||||
[[target windowController] setWindow:self];
|
||||
|
||||
oldTabBarStyle = [[view tabBarControl] styleName];
|
||||
[[view tabBarControl] setStyleNamed:@"Unified"];
|
||||
|
||||
NSString *style;
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10
|
||||
style = @"Yosemite";
|
||||
#else
|
||||
style = @"Unified";
|
||||
#endif
|
||||
[[view tabBarControl] setStyleNamed:style];
|
||||
|
||||
// add text view
|
||||
oldPosition = [view frame].origin;
|
||||
|
||||
+10
-2
@@ -115,8 +115,8 @@ enum {
|
||||
|
||||
// Create the tab bar control (which is responsible for actually
|
||||
// drawing the tabline and tabs).
|
||||
NSRect tabFrame = { { 0, frame.size.height - 22 },
|
||||
{ frame.size.width, 22 } };
|
||||
NSRect tabFrame = { { 0, frame.size.height - kPSMTabBarControlHeight },
|
||||
{ frame.size.width, kPSMTabBarControlHeight } };
|
||||
tabBarControl = [[PSMTabBarControl alloc] initWithFrame:tabFrame];
|
||||
|
||||
[tabView setDelegate:tabBarControl];
|
||||
@@ -125,10 +125,18 @@ enum {
|
||||
[tabBarControl setDelegate:self];
|
||||
[tabBarControl setHidden:YES];
|
||||
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10
|
||||
CGFloat screenWidth = [[NSScreen mainScreen] frame].size.width;
|
||||
[tabBarControl setStyleNamed:@"Yosemite"];
|
||||
[tabBarControl setCellMinWidth:120];
|
||||
[tabBarControl setCellMaxWidth:screenWidth];
|
||||
[tabBarControl setCellOptimumWidth:screenWidth];
|
||||
#else
|
||||
[tabBarControl setCellMinWidth:[ud integerForKey:MMTabMinWidthKey]];
|
||||
[tabBarControl setCellMaxWidth:[ud integerForKey:MMTabMaxWidthKey]];
|
||||
[tabBarControl setCellOptimumWidth:
|
||||
[ud integerForKey:MMTabOptimumWidthKey]];
|
||||
#endif
|
||||
|
||||
[tabBarControl setShowAddTabButton:[ud boolForKey:MMShowAddTabButtonKey]];
|
||||
[[tabBarControl addTabButton] setTarget:self];
|
||||
|
||||
@@ -80,6 +80,14 @@
|
||||
#define FUOPT_BGCOLOR_HLGROUP 0x004
|
||||
|
||||
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10
|
||||
# define TABBAR_STYLE_UNIFINED @"Yosemite"
|
||||
# define TABBAR_STYLE_METAL @"Yosemite"
|
||||
#else
|
||||
# define TABBAR_STYLE_UNIFINED @"Unified"
|
||||
# define TABBAR_STYLE_METAL @"Metal"
|
||||
#endif
|
||||
|
||||
|
||||
@interface MMWindowController (Private)
|
||||
- (NSSize)contentSize;
|
||||
@@ -1173,7 +1181,7 @@
|
||||
[[window animator] setAlphaValue:0];
|
||||
} completionHandler:^{
|
||||
[window setStyleMask:([window styleMask] | NSFullScreenWindowMask)];
|
||||
[[vimView tabBarControl] setStyleNamed:@"Unified"];
|
||||
[[vimView tabBarControl] setStyleNamed:TABBAR_STYLE_UNIFINED];
|
||||
[self updateTablineSeparator];
|
||||
|
||||
// Stay dark for some time to wait for things to sync, then do the full screen operation
|
||||
@@ -1234,7 +1242,7 @@
|
||||
fullScreenEnabled = NO;
|
||||
[window setAlphaValue:1];
|
||||
[window setStyleMask:([window styleMask] & ~NSFullScreenWindowMask)];
|
||||
[[vimView tabBarControl] setStyleNamed:@"Metal"];
|
||||
[[vimView tabBarControl] setStyleNamed:TABBAR_STYLE_METAL];
|
||||
[self updateTablineSeparator];
|
||||
[window setFrame:preFullScreenFrame display:YES];
|
||||
}
|
||||
@@ -1264,7 +1272,7 @@
|
||||
[[window animator] setAlphaValue:0];
|
||||
} completionHandler:^{
|
||||
[window setStyleMask:([window styleMask] & ~NSFullScreenWindowMask)];
|
||||
[[vimView tabBarControl] setStyleNamed:@"Metal"];
|
||||
[[vimView tabBarControl] setStyleNamed:TABBAR_STYLE_METAL];
|
||||
[self updateTablineSeparator];
|
||||
[window setFrame:preFullScreenFrame display:YES];
|
||||
|
||||
@@ -1309,7 +1317,7 @@
|
||||
fullScreenEnabled = YES;
|
||||
[window setAlphaValue:1];
|
||||
[window setStyleMask:([window styleMask] | NSFullScreenWindowMask)];
|
||||
[[vimView tabBarControl] setStyleNamed:@"Unified"];
|
||||
[[vimView tabBarControl] setStyleNamed:TABBAR_STYLE_UNIFINED];
|
||||
[self updateTablineSeparator];
|
||||
[self maximizeWindow:fullScreenOptions];
|
||||
}
|
||||
|
||||
@@ -35,6 +35,10 @@
|
||||
52C0B9B515BDB7A9000C268F /* overflowImagePressed@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 52C0B9B315BDB7A9000C268F /* overflowImagePressed@2x.png */; };
|
||||
52C268D015BDB72B0012FECA /* overflowImage.png in Resources */ = {isa = PBXBuildFile; fileRef = 52C268CE15BDB72B0012FECA /* overflowImage.png */; };
|
||||
52C268D115BDB72B0012FECA /* overflowImagePressed.png in Resources */ = {isa = PBXBuildFile; fileRef = 52C268CF15BDB72B0012FECA /* overflowImagePressed.png */; };
|
||||
52FAFCCF1C30F4B500C6E613 /* TabNewYosemite.png in Resources */ = {isa = PBXBuildFile; fileRef = 52FAFCCD1C30F4B500C6E613 /* TabNewYosemite.png */; };
|
||||
52FAFCD01C30F4B500C6E613 /* TabNewYosemite@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 52FAFCCE1C30F4B500C6E613 /* TabNewYosemite@2x.png */; };
|
||||
52FAFCD31C30F4DF00C6E613 /* PSMYosemiteTabStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 52FAFCD11C30F4DF00C6E613 /* PSMYosemiteTabStyle.h */; };
|
||||
52FAFCD41C30F4DF00C6E613 /* PSMYosemiteTabStyle.m in Sources */ = {isa = PBXBuildFile; fileRef = 52FAFCD21C30F4DF00C6E613 /* PSMYosemiteTabStyle.m */; };
|
||||
546DEAF1067F63070098DCC4 /* PSMTabBarControl.m in Sources */ = {isa = PBXBuildFile; fileRef = 0259C576FE90428111CA0C5A /* PSMTabBarControl.m */; };
|
||||
546DEAF2067F630E0098DCC4 /* PSMTabBarControl.h in Headers */ = {isa = PBXBuildFile; fileRef = 0259C57AFE90428111CA0C5A /* PSMTabBarControl.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
A2082A9009EAEB34009AC8BE /* PSMTabDragAssistant.h in Headers */ = {isa = PBXBuildFile; fileRef = A2082A8D09EAEB33009AC8BE /* PSMTabDragAssistant.h */; };
|
||||
@@ -111,6 +115,10 @@
|
||||
52C0B9B315BDB7A9000C268F /* overflowImagePressed@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "overflowImagePressed@2x.png"; path = "images/overflowImagePressed@2x.png"; sourceTree = "<group>"; };
|
||||
52C268CE15BDB72B0012FECA /* overflowImage.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = overflowImage.png; path = images/overflowImage.png; sourceTree = "<group>"; };
|
||||
52C268CF15BDB72B0012FECA /* overflowImagePressed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = overflowImagePressed.png; path = images/overflowImagePressed.png; sourceTree = "<group>"; };
|
||||
52FAFCCD1C30F4B500C6E613 /* TabNewYosemite.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = TabNewYosemite.png; path = images/TabNewYosemite.png; sourceTree = "<group>"; };
|
||||
52FAFCCE1C30F4B500C6E613 /* TabNewYosemite@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "TabNewYosemite@2x.png"; path = "images/TabNewYosemite@2x.png"; sourceTree = "<group>"; };
|
||||
52FAFCD11C30F4DF00C6E613 /* PSMYosemiteTabStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PSMYosemiteTabStyle.h; path = source/PSMYosemiteTabStyle.h; sourceTree = "<group>"; };
|
||||
52FAFCD21C30F4DF00C6E613 /* PSMYosemiteTabStyle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PSMYosemiteTabStyle.m; path = source/PSMYosemiteTabStyle.m; sourceTree = "<group>"; };
|
||||
53DF68FD067E5B5A0090B5B0 /* PSMTabBarControl.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PSMTabBarControl.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
53DF68FE067E5B5A0090B5B0 /* PSMTabBarControlFramework-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "PSMTabBarControlFramework-Info.plist"; sourceTree = "<group>"; };
|
||||
54D33B2806778E3300C9C163 /* PSMTabBarControl.ibclassdescription */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PSMTabBarControl.ibclassdescription; sourceTree = "<group>"; };
|
||||
@@ -309,6 +317,8 @@
|
||||
A2D32EFF09A63D7A00EC8662 /* PSMMetalTabStyle.m */,
|
||||
A2D98B070A2B432C0064C6F8 /* PSMUnifiedTabStyle.h */,
|
||||
A2D98B080A2B432C0064C6F8 /* PSMUnifiedTabStyle.m */,
|
||||
52FAFCD11C30F4DF00C6E613 /* PSMYosemiteTabStyle.h */,
|
||||
52FAFCD21C30F4DF00C6E613 /* PSMYosemiteTabStyle.m */,
|
||||
A268EA5F09A9831800E082AA /* PSMRolloverButton.h */,
|
||||
A268EA6009A9831800E082AA /* PSMRolloverButton.m */,
|
||||
A251BE810959A1B90058BC7F /* PSMOverflowPopUpButton.h */,
|
||||
@@ -382,6 +392,8 @@
|
||||
523897EE15BDA9AC00498A53 /* TabClose_Front_Pressed@2x.png */,
|
||||
52A57C0E15BBA230003EC59C /* TabClose_Front_Rollover.png */,
|
||||
523897EF15BDA9AC00498A53 /* TabClose_Front_Rollover@2x.png */,
|
||||
52FAFCCD1C30F4B500C6E613 /* TabNewYosemite.png */,
|
||||
52FAFCCE1C30F4B500C6E613 /* TabNewYosemite@2x.png */,
|
||||
);
|
||||
name = Images;
|
||||
sourceTree = "<group>";
|
||||
@@ -396,6 +408,7 @@
|
||||
546DEAF2067F630E0098DCC4 /* PSMTabBarControl.h in Headers */,
|
||||
A251BE850959A1B90058BC7F /* PSMOverflowPopUpButton.h in Headers */,
|
||||
A251BE870959A1B90058BC7F /* PSMTabBarCell.h in Headers */,
|
||||
52FAFCD31C30F4DF00C6E613 /* PSMYosemiteTabStyle.h in Headers */,
|
||||
A2D32EDC09A634C900EC8662 /* PSMTabStyle.h in Headers */,
|
||||
A2D32F0009A63D7A00EC8662 /* PSMMetalTabStyle.h in Headers */,
|
||||
A268EA6209A9831800E082AA /* PSMRolloverButton.h in Headers */,
|
||||
@@ -478,8 +491,10 @@
|
||||
52A57C0F15BBA230003EC59C /* TabClose_Front.png in Resources */,
|
||||
52A57C1015BBA230003EC59C /* TabClose_Front_Pressed.png in Resources */,
|
||||
52A57C1115BBA230003EC59C /* TabClose_Front_Rollover.png in Resources */,
|
||||
52FAFCCF1C30F4B500C6E613 /* TabNewYosemite.png in Resources */,
|
||||
523897F415BDA9AC00498A53 /* TabClose_Front_Pressed@2x.png in Resources */,
|
||||
523897F515BDA9AC00498A53 /* TabClose_Front_Rollover@2x.png in Resources */,
|
||||
52FAFCD01C30F4B500C6E613 /* TabNewYosemite@2x.png in Resources */,
|
||||
523897F615BDA9AC00498A53 /* TabClose_Front@2x.png in Resources */,
|
||||
523897F715BDA9AC00498A53 /* TabNewMetal@2x.png in Resources */,
|
||||
523897F815BDA9AC00498A53 /* TabNewMetalPressed@2x.png in Resources */,
|
||||
@@ -505,6 +520,7 @@
|
||||
A268EA6309A9831800E082AA /* PSMRolloverButton.m in Sources */,
|
||||
A2129BB309AEB58F00724E6C /* PSMProgressIndicator.m in Sources */,
|
||||
A2082A9109EAEB34009AC8BE /* PSMTabDragAssistant.m in Sources */,
|
||||
52FAFCD41C30F4DF00C6E613 /* PSMYosemiteTabStyle.m in Sources */,
|
||||
A2D98B0B0A2B432C0064C6F8 /* PSMUnifiedTabStyle.m in Sources */,
|
||||
A2D98B130A2B43FA0064C6F8 /* NSBezierPath_AMShading.m in Sources */,
|
||||
);
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
@@ -393,12 +393,7 @@ void MyNSDrawWindowBackground(NSRect rect)
|
||||
if ([cell closeButtonPressed]) closeButton = metalCloseButtonDown;
|
||||
|
||||
closeButtonSize = [closeButton size];
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
|
||||
[closeButton drawInRect:closeButtonRect fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0 respectFlipped:YES hints:nil];
|
||||
#else
|
||||
[closeButton setFlipped:YES];
|
||||
[closeButton drawAtPoint:closeButtonRect.origin fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0];
|
||||
#endif
|
||||
|
||||
// scoot label over
|
||||
labelPosition += closeButtonSize.width + kPSMTabBarCellPadding;
|
||||
|
||||
@@ -40,15 +40,14 @@
|
||||
}
|
||||
|
||||
NSImage *image = (_down) ? _PSMTabBarOverflowDownPopUpImage : _PSMTabBarOverflowPopUpImage;
|
||||
NSSize imageSize = [image size];
|
||||
rect.origin.x = NSMidX(rect) - (imageSize.width * 0.5);
|
||||
rect.origin.y = NSMidY(rect) - (imageSize.height * 0.5);
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
|
||||
[image drawInRect:rect fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0 respectFlipped:YES hints:nil];
|
||||
#else
|
||||
[image setFlipped:YES];
|
||||
[image drawAtPoint:rect.origin fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0];
|
||||
#endif
|
||||
NSSize imageSize = [image size];
|
||||
NSRect bounds = [self bounds];
|
||||
NSPoint drawPoint = NSMakePoint(NSMidX(bounds) - (imageSize.width * 0.5f),
|
||||
NSMidY(bounds) - (imageSize.height * 0.5f));
|
||||
[image drawAtPoint:drawPoint
|
||||
fromRect:NSZeroRect
|
||||
operation:NSCompositeSourceOver
|
||||
fraction:1.0f];
|
||||
}
|
||||
|
||||
- (void)mouseDown:(NSEvent *)event
|
||||
|
||||
@@ -12,26 +12,18 @@
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
#ifndef NSINTEGER_DEFINED
|
||||
// NSInteger was introduced in 10.5
|
||||
# if __LP64__ || NS_BUILD_32_LIKE_64
|
||||
typedef long NSInteger;
|
||||
typedef unsigned long NSUInteger;
|
||||
# else
|
||||
typedef int NSInteger;
|
||||
typedef unsigned int NSUInteger;
|
||||
# endif
|
||||
# define NSINTEGER_DEFINED 1
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10
|
||||
# define kPSMTabBarControlHeight 25
|
||||
#else
|
||||
# define kPSMTabBarControlHeight 22
|
||||
#endif
|
||||
|
||||
#ifndef MAC_OS_X_VERSION_10_6
|
||||
# define MAC_OS_X_VERSION_10_6 1060
|
||||
#endif
|
||||
|
||||
#define kPSMTabBarControlHeight 22
|
||||
// internal cell border
|
||||
#define MARGIN_X 6
|
||||
#define MARGIN_Y 3
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10
|
||||
# define MARGIN_Y 5
|
||||
#else
|
||||
# define MARGIN_Y 3
|
||||
#endif
|
||||
// padding between objects
|
||||
#define kPSMTabBarCellPadding 4
|
||||
// fixed size objects
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#import "PSMTabStyle.h"
|
||||
#import "PSMMetalTabStyle.h"
|
||||
#import "PSMUnifiedTabStyle.h"
|
||||
#import "PSMYosemiteTabStyle.h"
|
||||
#import "PSMTabDragAssistant.h"
|
||||
|
||||
@interface PSMTabBarControl (Private)
|
||||
@@ -254,10 +255,11 @@
|
||||
- (void)setStyleNamed:(NSString *)name
|
||||
{
|
||||
[style release];
|
||||
if ([name isEqualToString:@"Unified"]){
|
||||
style = [[PSMUnifiedTabStyle alloc] init];
|
||||
}
|
||||
else {
|
||||
if([name isEqualToString:@"Unified"]){
|
||||
style = [[PSMUnifiedTabStyle alloc] init];
|
||||
} else if([name isEqualToString:@"Yosemite"]){
|
||||
style = [[PSMYosemiteTabStyle alloc] init];
|
||||
} else {
|
||||
style = [[PSMMetalTabStyle alloc] init];
|
||||
}
|
||||
|
||||
|
||||
@@ -389,13 +389,8 @@
|
||||
if ([cell closeButtonPressed]) closeButton = unifiedCloseButtonDown;
|
||||
|
||||
closeButtonSize = [closeButton size];
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
|
||||
[closeButton drawInRect:closeButtonRect fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0 respectFlipped:YES hints:nil];
|
||||
#else
|
||||
[closeButton setFlipped:YES];
|
||||
[closeButton drawAtPoint:closeButtonRect.origin fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0];
|
||||
#endif
|
||||
|
||||
|
||||
// scoot label over
|
||||
labelPosition += closeButtonSize.width + kPSMTabBarCellPadding;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
//
|
||||
// PSMYosemiteTabStyle.h
|
||||
// PSMTabBarControl
|
||||
//
|
||||
// Created by Christoffer Winterkvist on 25/08/14.
|
||||
//
|
||||
//
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import "PSMTabStyle.h"
|
||||
|
||||
@interface PSMYosemiteTabStyle : NSObject <PSMTabStyle> {
|
||||
NSImage *closeButton;
|
||||
NSImage *closeButtonDown;
|
||||
NSImage *closeButtonOver;
|
||||
NSImage *_addTabButtonImage;
|
||||
NSImage *_addTabButtonPressedImage;
|
||||
NSImage *_addTabButtonRolloverImage;
|
||||
NSMutableParagraphStyle *truncatingTailParagraphStyle;
|
||||
NSMutableParagraphStyle *centeredParagraphStyle;
|
||||
}
|
||||
|
||||
- (void)drawInteriorWithTabCell:(PSMTabBarCell *)cell inView:(NSView*)controlView;
|
||||
|
||||
- (void)encodeWithCoder:(NSCoder *)aCoder;
|
||||
- (id)initWithCoder:(NSCoder *)aDecoder;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,498 @@
|
||||
//
|
||||
// PSMYosemiteTabStyle.m
|
||||
// PSMTabBarControl
|
||||
//
|
||||
// Created by Christoffer Winterkvist on 25/08/14.
|
||||
//
|
||||
//
|
||||
|
||||
#import "PSMYosemiteTabStyle.h"
|
||||
|
||||
#define kPSMMetalObjectCounterRadius 7.0
|
||||
#define kPSMMetalCounterMinWidth 20
|
||||
|
||||
void YosemiteNSDrawWindowBackground(NSRect rect, NSColor *color)
|
||||
{
|
||||
[color set];
|
||||
NSRectFill( rect );
|
||||
}
|
||||
|
||||
@implementation PSMYosemiteTabStyle
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[closeButton release];
|
||||
[closeButtonDown release];
|
||||
[closeButtonOver release];
|
||||
[_addTabButtonImage release];
|
||||
[_addTabButtonPressedImage release];
|
||||
[_addTabButtonRolloverImage release];
|
||||
|
||||
[truncatingTailParagraphStyle release];
|
||||
[centeredParagraphStyle release];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Initializers
|
||||
|
||||
- (id)init
|
||||
{
|
||||
self = [super init];
|
||||
if (!self) return nil;
|
||||
|
||||
closeButton = [[NSImage alloc] initByReferencingFile:[[PSMTabBarControl bundle] pathForImageResource:@"TabClose_Front"]];
|
||||
//NSLog(@"closeButton=%@ path=%@", metalCloseButton,
|
||||
// [[PSMTabBarControl bundle] pathForImageResource:@"TabClose_Front"]);
|
||||
closeButtonDown = [[NSImage alloc] initByReferencingFile:[[PSMTabBarControl bundle] pathForImageResource:@"TabClose_Front_Pressed"]];
|
||||
closeButtonOver = [[NSImage alloc] initByReferencingFile:[[PSMTabBarControl bundle] pathForImageResource:@"TabClose_Front_Rollover"]];
|
||||
|
||||
_addTabButtonImage = [[NSImage alloc] initByReferencingFile:[[PSMTabBarControl bundle] pathForImageResource:@"TabNewMetal"]];
|
||||
_addTabButtonPressedImage = [[NSImage alloc] initByReferencingFile:[[PSMTabBarControl bundle] pathForImageResource:@"TabNewMetalPressed"]];
|
||||
_addTabButtonRolloverImage = [[NSImage alloc] initByReferencingFile:[[PSMTabBarControl bundle] pathForImageResource:@"TabNewMetalRollover"]];
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (NSString *)name
|
||||
{
|
||||
return @"Yosemite";
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Control Specific
|
||||
|
||||
- (float)leftMarginForTabBarControl
|
||||
{
|
||||
return -1.0f;
|
||||
}
|
||||
|
||||
- (float)rightMarginForTabBarControl
|
||||
{
|
||||
return 24.0f;
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Add Tab Button
|
||||
|
||||
- (NSImage *)addTabButtonImage
|
||||
{
|
||||
return _addTabButtonImage;
|
||||
}
|
||||
|
||||
- (NSImage *)addTabButtonPressedImage
|
||||
{
|
||||
return _addTabButtonPressedImage;
|
||||
}
|
||||
|
||||
- (NSImage *)addTabButtonRolloverImage
|
||||
{
|
||||
return _addTabButtonRolloverImage;
|
||||
}
|
||||
|
||||
- (NSColor *)backgroundColor:(BOOL)isKeyWindow
|
||||
{
|
||||
NSColor *backgroundColor;
|
||||
if (isKeyWindow) {
|
||||
backgroundColor = [NSColor colorWithCalibratedHue:0.000 saturation:0.000 brightness:0.875 alpha:1];
|
||||
} else {
|
||||
backgroundColor = [NSColor colorWithCalibratedHue:0.000 saturation:0.000 brightness:0.957 alpha:1];
|
||||
}
|
||||
|
||||
return backgroundColor;
|
||||
}
|
||||
|
||||
- (NSColor *)borderColor
|
||||
{
|
||||
return [NSColor colorWithCalibratedHue:0.000 saturation:0.000 brightness:0.678 alpha:1];
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Cell Specific
|
||||
|
||||
- (NSRect) closeButtonRectForTabCell:(PSMTabBarCell *)cell
|
||||
{
|
||||
NSRect cellFrame = [cell frame];
|
||||
|
||||
if ([cell hasCloseButton] == NO) {
|
||||
return NSZeroRect;
|
||||
}
|
||||
|
||||
NSRect result;
|
||||
result.size = [closeButton size];
|
||||
result.origin.x = cellFrame.origin.x + MARGIN_X;
|
||||
result.origin.y = cellFrame.origin.y + MARGIN_Y + 2.0;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
- (NSRect)iconRectForTabCell:(PSMTabBarCell *)cell
|
||||
{
|
||||
NSRect cellFrame = [cell frame];
|
||||
|
||||
if ([cell hasIcon] == NO) {
|
||||
return NSZeroRect;
|
||||
}
|
||||
|
||||
NSRect result;
|
||||
result.size = NSMakeSize(kPSMTabBarIconWidth, kPSMTabBarIconWidth);
|
||||
result.origin.x = cellFrame.origin.x + MARGIN_X;
|
||||
result.origin.y = cellFrame.origin.y + MARGIN_Y;
|
||||
|
||||
if([cell hasCloseButton] && ![cell isCloseButtonSuppressed])
|
||||
result.origin.x += [closeButton size].width + kPSMTabBarCellPadding;
|
||||
|
||||
if([cell state] == NSOnState){
|
||||
result.origin.y += 1;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
- (NSRect)indicatorRectForTabCell:(PSMTabBarCell *)cell
|
||||
{
|
||||
NSRect cellFrame = [cell frame];
|
||||
|
||||
if ([[cell indicator] isHidden]) {
|
||||
return NSZeroRect;
|
||||
}
|
||||
|
||||
NSRect result;
|
||||
result.size = NSMakeSize(kPSMTabBarIndicatorWidth, kPSMTabBarIndicatorWidth);
|
||||
result.origin.x = cellFrame.origin.x + cellFrame.size.width - MARGIN_X - kPSMTabBarIndicatorWidth;
|
||||
result.origin.y = cellFrame.origin.y + MARGIN_Y;
|
||||
|
||||
if([cell state] == NSOnState){
|
||||
result.origin.y -= 1;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
- (NSRect)objectCounterRectForTabCell:(PSMTabBarCell *)cell
|
||||
{
|
||||
NSRect cellFrame = [cell frame];
|
||||
|
||||
if ([cell count] == 0) {
|
||||
return NSZeroRect;
|
||||
}
|
||||
|
||||
float countWidth = [[self attributedObjectCountValueForTabCell:cell] size].width;
|
||||
countWidth += (2 * kPSMMetalObjectCounterRadius - 6.0);
|
||||
if(countWidth < kPSMMetalCounterMinWidth)
|
||||
countWidth = kPSMMetalCounterMinWidth;
|
||||
|
||||
NSRect result;
|
||||
result.size = NSMakeSize(countWidth, 2 * kPSMMetalObjectCounterRadius); // temp
|
||||
result.origin.x = cellFrame.origin.x + cellFrame.size.width - MARGIN_X - result.size.width;
|
||||
result.origin.y = cellFrame.origin.y + MARGIN_Y + 1.0;
|
||||
|
||||
if(![[cell indicator] isHidden])
|
||||
result.origin.x -= kPSMTabBarIndicatorWidth + kPSMTabBarCellPadding;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
- (float)minimumWidthOfTabCell:(PSMTabBarCell *)cell
|
||||
{
|
||||
float resultWidth = 0.0;
|
||||
|
||||
// left margin
|
||||
resultWidth = MARGIN_X;
|
||||
|
||||
// close button?
|
||||
if([cell hasCloseButton] && ![cell isCloseButtonSuppressed])
|
||||
resultWidth += [closeButton size].width + kPSMTabBarCellPadding;
|
||||
|
||||
// icon?
|
||||
if([cell hasIcon])
|
||||
resultWidth += kPSMTabBarIconWidth + kPSMTabBarCellPadding;
|
||||
|
||||
// the label
|
||||
resultWidth += kPSMMinimumTitleWidth;
|
||||
|
||||
// object counter?
|
||||
if([cell count] > 0)
|
||||
resultWidth += [self objectCounterRectForTabCell:cell].size.width + kPSMTabBarCellPadding;
|
||||
|
||||
// indicator?
|
||||
if ([[cell indicator] isHidden] == NO)
|
||||
resultWidth += kPSMTabBarCellPadding + kPSMTabBarIndicatorWidth;
|
||||
|
||||
// right margin
|
||||
resultWidth += MARGIN_X;
|
||||
|
||||
return ceil(resultWidth);
|
||||
}
|
||||
|
||||
- (float)desiredWidthOfTabCell:(PSMTabBarCell *)cell
|
||||
{
|
||||
float resultWidth = 0.0;
|
||||
|
||||
// left margin
|
||||
resultWidth = MARGIN_X;
|
||||
|
||||
// close button?
|
||||
if ([cell hasCloseButton] && ![cell isCloseButtonSuppressed])
|
||||
resultWidth += [closeButton size].width + kPSMTabBarCellPadding;
|
||||
|
||||
// icon?
|
||||
if([cell hasIcon])
|
||||
resultWidth += kPSMTabBarIconWidth + kPSMTabBarCellPadding;
|
||||
|
||||
// the label
|
||||
resultWidth += [[cell attributedStringValue] size].width;
|
||||
|
||||
// object counter?
|
||||
if([cell count] > 0)
|
||||
resultWidth += [self objectCounterRectForTabCell:cell].size.width + kPSMTabBarCellPadding;
|
||||
|
||||
// indicator?
|
||||
if ([[cell indicator] isHidden] == NO)
|
||||
resultWidth += kPSMTabBarCellPadding + kPSMTabBarIndicatorWidth;
|
||||
|
||||
// right margin
|
||||
resultWidth += MARGIN_X;
|
||||
|
||||
return ceil(resultWidth);
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Cell Values
|
||||
|
||||
- (NSAttributedString *)attributedObjectCountValueForTabCell:(PSMTabBarCell *)cell
|
||||
{
|
||||
NSMutableAttributedString *attrStr;
|
||||
NSFontManager *fm = [NSFontManager sharedFontManager];
|
||||
NSNumberFormatter *nf = [[[NSNumberFormatter alloc] init] autorelease];
|
||||
[nf setLocalizesFormat:YES];
|
||||
[nf setFormat:@"0"];
|
||||
[nf setHasThousandSeparators:YES];
|
||||
NSString *contents = [nf stringFromNumber:[NSNumber numberWithInt:[cell count]]];
|
||||
attrStr = [[[NSMutableAttributedString alloc] initWithString:contents] autorelease];
|
||||
NSRange range = NSMakeRange(0, [contents length]);
|
||||
|
||||
// Add font attribute
|
||||
[attrStr addAttribute:NSFontAttributeName value:[fm convertFont:[NSFont fontWithName:@"Helvetica" size:11.0] toHaveTrait:NSBoldFontMask] range:range];
|
||||
[attrStr addAttribute:NSForegroundColorAttributeName value:[[NSColor whiteColor] colorWithAlphaComponent:0.85] range:range];
|
||||
|
||||
return attrStr;
|
||||
}
|
||||
|
||||
- (NSAttributedString *)attributedStringValueForTabCell:(PSMTabBarCell *)cell
|
||||
{
|
||||
NSMutableAttributedString *attrStr;
|
||||
NSString *contents = [cell stringValue];
|
||||
attrStr = [[[NSMutableAttributedString alloc] initWithString:contents] autorelease];
|
||||
NSRange range = NSMakeRange(0, [contents length]);
|
||||
|
||||
// Add font attribute
|
||||
[attrStr addAttribute:NSFontAttributeName value:[NSFont systemFontOfSize:11.0] range:range];
|
||||
|
||||
PSMTabBarControl *bar = (PSMTabBarControl *)cell.controlView;
|
||||
BOOL isKeyWindow = [bar.window isKeyWindow];
|
||||
|
||||
CGFloat textAlpha;
|
||||
if ([cell state] == NSOnState) {
|
||||
textAlpha = (isKeyWindow) ? 1.0f : 0.5f;
|
||||
} else {
|
||||
textAlpha = (isKeyWindow) ? 0.5f : 0.25f;
|
||||
}
|
||||
NSColor *textColor = [[NSColor textColor] colorWithAlphaComponent:textAlpha];
|
||||
|
||||
[attrStr addAttribute:NSForegroundColorAttributeName value:textColor range:range];
|
||||
|
||||
// Paragraph Style for Truncating Long Text
|
||||
if (!truncatingTailParagraphStyle) {
|
||||
truncatingTailParagraphStyle = [[[NSParagraphStyle defaultParagraphStyle] mutableCopy] retain];
|
||||
[truncatingTailParagraphStyle setLineBreakMode:NSLineBreakByTruncatingHead];
|
||||
[truncatingTailParagraphStyle setAlignment:NSCenterTextAlignment];
|
||||
}
|
||||
[attrStr addAttribute:NSParagraphStyleAttributeName value:truncatingTailParagraphStyle range:range];
|
||||
|
||||
return attrStr;
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark ---- drawing ----
|
||||
|
||||
- (void)drawTabCell:(PSMTabBarCell *)cell
|
||||
{
|
||||
NSRect cellFrame = [cell frame];
|
||||
NSColor * lineColor = nil;
|
||||
NSBezierPath* bezier = [NSBezierPath bezierPath];
|
||||
lineColor = [self borderColor];
|
||||
|
||||
if ([cell state] == NSOnState) {
|
||||
// selected tab
|
||||
NSRect aRect = NSMakeRect(cellFrame.origin.x, cellFrame.origin.y, cellFrame.size.width, cellFrame.size.height);
|
||||
|
||||
PSMTabBarControl *bar = (PSMTabBarControl *)cell.controlView;
|
||||
BOOL isKeyWindow = [bar.window isKeyWindow];
|
||||
|
||||
// background
|
||||
YosemiteNSDrawWindowBackground(aRect, [self backgroundColor:isKeyWindow]);
|
||||
|
||||
aRect.size.height -= 1.0f;
|
||||
aRect.origin.y += 0.5f;
|
||||
// frame
|
||||
[lineColor set];
|
||||
[bezier moveToPoint:NSMakePoint(aRect.origin.x, aRect.origin.y)];
|
||||
[bezier lineToPoint:NSMakePoint(aRect.origin.x, aRect.origin.y+aRect.size.height)];
|
||||
[bezier lineToPoint:NSMakePoint(aRect.origin.x+aRect.size.width, aRect.origin.y+aRect.size.height)];
|
||||
[bezier lineToPoint:NSMakePoint(aRect.origin.x+aRect.size.width, aRect.origin.y)];
|
||||
[bezier lineToPoint:NSMakePoint(aRect.origin.x, aRect.origin.y)];
|
||||
[bezier stroke];
|
||||
} else {
|
||||
|
||||
// unselected tab
|
||||
NSRect aRect = NSMakeRect(cellFrame.origin.x, cellFrame.origin.y, cellFrame.size.width, cellFrame.size.height);
|
||||
|
||||
aRect.origin.x += 0.5;
|
||||
|
||||
[[NSColor colorWithCalibratedWhite:0.0 alpha:0.1] set];
|
||||
NSRectFillUsingOperation(aRect, NSCompositeSourceAtop);
|
||||
|
||||
// frame
|
||||
[lineColor set];
|
||||
[bezier moveToPoint:NSMakePoint(aRect.origin.x, aRect.origin.y)];
|
||||
[bezier lineToPoint:NSMakePoint(aRect.origin.x + aRect.size.width, aRect.origin.y)];
|
||||
if(!([cell tabState] & PSMTab_RightIsSelectedMask)){
|
||||
[bezier lineToPoint:NSMakePoint(aRect.origin.x + aRect.size.width, aRect.origin.y + aRect.size.height)];
|
||||
}
|
||||
[bezier stroke];
|
||||
}
|
||||
|
||||
[self drawInteriorWithTabCell:cell inView:[cell controlView]];
|
||||
}
|
||||
|
||||
|
||||
|
||||
- (void)drawInteriorWithTabCell:(PSMTabBarCell *)cell inView:(NSView*)controlView
|
||||
{
|
||||
NSRect cellFrame = [cell frame];
|
||||
float labelPosition = cellFrame.origin.x + MARGIN_X;
|
||||
|
||||
// close button
|
||||
if ([cell hasCloseButton] && ![cell isCloseButtonSuppressed]) {
|
||||
NSSize closeButtonSize = NSZeroSize;
|
||||
NSRect closeButtonRect = [cell closeButtonRectForFrame:cellFrame];
|
||||
NSImage *button = nil;
|
||||
|
||||
if ([cell closeButtonOver]) button = closeButtonOver;
|
||||
if ([cell closeButtonPressed]) button = closeButtonDown;
|
||||
|
||||
closeButtonSize = [button size];
|
||||
[button drawInRect:closeButtonRect fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0 respectFlipped:YES hints:nil];
|
||||
}
|
||||
|
||||
// object counter
|
||||
if([cell count] > 0){
|
||||
[[NSColor colorWithCalibratedWhite:0.3 alpha:0.6] set];
|
||||
NSBezierPath *path = [NSBezierPath bezierPath];
|
||||
NSRect myRect = [self objectCounterRectForTabCell:cell];
|
||||
[path moveToPoint:NSMakePoint(myRect.origin.x + kPSMMetalObjectCounterRadius, myRect.origin.y)];
|
||||
[path lineToPoint:NSMakePoint(myRect.origin.x + myRect.size.width - kPSMMetalObjectCounterRadius, myRect.origin.y)];
|
||||
[path appendBezierPathWithArcWithCenter:NSMakePoint(myRect.origin.x + myRect.size.width - kPSMMetalObjectCounterRadius, myRect.origin.y + kPSMMetalObjectCounterRadius) radius:kPSMMetalObjectCounterRadius startAngle:270.0 endAngle:90.0];
|
||||
[path lineToPoint:NSMakePoint(myRect.origin.x + kPSMMetalObjectCounterRadius, myRect.origin.y + myRect.size.height)];
|
||||
[path appendBezierPathWithArcWithCenter:NSMakePoint(myRect.origin.x + kPSMMetalObjectCounterRadius, myRect.origin.y + kPSMMetalObjectCounterRadius) radius:kPSMMetalObjectCounterRadius startAngle:90.0 endAngle:270.0];
|
||||
[path fill];
|
||||
|
||||
// draw attributed string centered in area
|
||||
NSRect counterStringRect;
|
||||
NSAttributedString *counterString = [self attributedObjectCountValueForTabCell:cell];
|
||||
counterStringRect.size = [counterString size];
|
||||
counterStringRect.origin.x = myRect.origin.x + ((myRect.size.width - counterStringRect.size.width) / 2.0) + 0.25;
|
||||
counterStringRect.origin.y = myRect.origin.y + ((myRect.size.height - counterStringRect.size.height) / 2.0) + 0.5;
|
||||
[counterString drawInRect:counterStringRect];
|
||||
}
|
||||
|
||||
// label rect
|
||||
NSRect labelRect;
|
||||
labelRect.origin.x = labelPosition;
|
||||
labelRect.size.width = cellFrame.size.width - (labelRect.origin.x - cellFrame.origin.x) - kPSMTabBarCellPadding;
|
||||
labelRect.size.height = cellFrame.size.height;
|
||||
labelRect.origin.y = cellFrame.origin.y + MARGIN_Y + 1.0;
|
||||
|
||||
if(![[cell indicator] isHidden])
|
||||
labelRect.size.width -= (kPSMTabBarIndicatorWidth + kPSMTabBarCellPadding);
|
||||
|
||||
if([cell count] > 0)
|
||||
labelRect.size.width -= ([self objectCounterRectForTabCell:cell].size.width + kPSMTabBarCellPadding);
|
||||
|
||||
// label
|
||||
[[cell attributedStringValue] drawInRect:labelRect];
|
||||
}
|
||||
|
||||
- (void)drawTabBar:(PSMTabBarControl *)bar inRect:(NSRect)rect
|
||||
{
|
||||
BOOL isKeyWindow = [bar.window isKeyWindow];
|
||||
YosemiteNSDrawWindowBackground(rect, [self backgroundColor:isKeyWindow]);
|
||||
|
||||
[[NSColor colorWithCalibratedWhite:0.0 alpha:0.0] set];
|
||||
NSRectFillUsingOperation(rect, NSCompositeSourceAtop);
|
||||
[[self borderColor] set];
|
||||
[NSBezierPath strokeLineFromPoint:NSMakePoint(rect.origin.x,rect.origin.y+0.5) toPoint:NSMakePoint(rect.origin.x+rect.size.width,rect.origin.y+0.5)];
|
||||
[NSBezierPath strokeLineFromPoint:NSMakePoint(rect.origin.x,rect.origin.y+rect.size.height-0.5) toPoint:NSMakePoint(rect.origin.x+rect.size.width,rect.origin.y+rect.size.height-0.5)];
|
||||
|
||||
// no tab view == not connected
|
||||
if(![bar tabView]){
|
||||
NSRect labelRect = rect;
|
||||
labelRect.size.height -= 4.0;
|
||||
labelRect.origin.y += 4.0;
|
||||
NSMutableAttributedString *attrStr;
|
||||
NSString *contents = @"PSMTabBarControl";
|
||||
attrStr = [[[NSMutableAttributedString alloc] initWithString:contents] autorelease];
|
||||
NSRange range = NSMakeRange(0, [contents length]);
|
||||
[attrStr addAttribute:NSFontAttributeName value:[NSFont systemFontOfSize:11.0] range:range];
|
||||
if (!centeredParagraphStyle) {
|
||||
centeredParagraphStyle = [[[NSParagraphStyle defaultParagraphStyle] mutableCopy] retain];
|
||||
[centeredParagraphStyle setAlignment:NSCenterTextAlignment];
|
||||
}
|
||||
[attrStr addAttribute:NSParagraphStyleAttributeName value:centeredParagraphStyle range:range];
|
||||
[attrStr drawInRect:labelRect];
|
||||
return;
|
||||
}
|
||||
|
||||
// draw cells
|
||||
NSEnumerator *e = [[bar cells] objectEnumerator];
|
||||
PSMTabBarCell *cell;
|
||||
while(cell = [e nextObject]){
|
||||
if(![cell isInOverflowMenu]){
|
||||
[cell drawWithFrame:[cell frame] inView:bar];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Archiving
|
||||
|
||||
- (void)encodeWithCoder:(NSCoder *)aCoder
|
||||
{
|
||||
if ([aCoder allowsKeyedCoding]) {
|
||||
[aCoder encodeObject:closeButton forKey:@"metalCloseButton"];
|
||||
[aCoder encodeObject:closeButtonDown forKey:@"metalCloseButtonDown"];
|
||||
[aCoder encodeObject:closeButtonOver forKey:@"metalCloseButtonOver"];
|
||||
[aCoder encodeObject:_addTabButtonImage forKey:@"addTabButtonImage"];
|
||||
[aCoder encodeObject:_addTabButtonPressedImage forKey:@"addTabButtonPressedImage"];
|
||||
[aCoder encodeObject:_addTabButtonRolloverImage forKey:@"addTabButtonRolloverImage"];
|
||||
}
|
||||
}
|
||||
|
||||
- (id)initWithCoder:(NSCoder *)aDecoder
|
||||
{
|
||||
if ([aDecoder allowsKeyedCoding]) {
|
||||
closeButton = [[aDecoder decodeObjectForKey:@"metalCloseButton"] retain];
|
||||
closeButtonDown = [[aDecoder decodeObjectForKey:@"metalCloseButtonDown"] retain];
|
||||
closeButtonOver = [[aDecoder decodeObjectForKey:@"metalCloseButtonOver"] retain];
|
||||
_addTabButtonImage = [[aDecoder decodeObjectForKey:@"addTabButtonImage"] retain];
|
||||
_addTabButtonPressedImage = [[aDecoder decodeObjectForKey:@"addTabButtonPressedImage"] retain];
|
||||
_addTabButtonRolloverImage = [[aDecoder decodeObjectForKey:@"addTabButtonRolloverImage"] retain];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -185,6 +185,10 @@ gui_macvim_after_fork_init()
|
||||
if (val != MMRendererDefault && val != MMRendererCoreText) {
|
||||
// Migrate from the old value to the Core Text Renderer.
|
||||
val = MMRendererCoreText;
|
||||
CFPreferencesSetAppValue((CFStringRef)MMRendererKey,
|
||||
(CFPropertyListRef)[NSNumber numberWithInt:val],
|
||||
kCFPreferencesCurrentApplication);
|
||||
CFPreferencesAppSynchronize(kCFPreferencesCurrentApplication);
|
||||
}
|
||||
if (keyValid) {
|
||||
ASLogInfo(@"Use renderer=%ld", val);
|
||||
|
||||
+16
-7
@@ -263,6 +263,8 @@ endif
|
||||
# TCL=[Path to TCL directory] (Set inside Make_cyg.mak or Make_ming.mak)
|
||||
# DYNAMIC_TCL=yes (to load the TCL DLL dynamically)
|
||||
# TCL_VER=[TCL version, eg 83, 84] (default is 83)
|
||||
# TCL_VER_LONG=[Tcl version, eg 8.3] (default is 8.3)
|
||||
# You must set TCL_VER_LONG when you set TCL_VER.
|
||||
ifdef TCL
|
||||
ifndef DYNAMIC_TCL
|
||||
DYNAMIC_TCL=yes
|
||||
@@ -270,6 +272,9 @@ endif
|
||||
ifndef TCL_VER
|
||||
TCL_VER = 83
|
||||
endif
|
||||
ifndef TCL_VER_LONG
|
||||
TCL_VER_LONG = 8.3
|
||||
endif
|
||||
TCLINC += -I$(TCL)/include
|
||||
endif
|
||||
|
||||
@@ -319,10 +324,14 @@ ifndef RUBY_INSTALL_NAME
|
||||
ifeq ($(RUBY_VER), 16)
|
||||
RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_API_VER)
|
||||
else
|
||||
ifndef RUBY_MSVCRT_NAME
|
||||
# Base name of msvcrXX.dll which is used by ruby's dll.
|
||||
RUBY_MSVCRT_NAME = msvcrt
|
||||
endif
|
||||
ifeq ($(ARCH),x86-64)
|
||||
RUBY_INSTALL_NAME = x64-msvcrt-ruby$(RUBY_API_VER)
|
||||
RUBY_INSTALL_NAME = x64-$(RUBY_MSVCRT_NAME)-ruby$(RUBY_API_VER)
|
||||
else
|
||||
RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_API_VER)
|
||||
RUBY_INSTALL_NAME = $(RUBY_MSVCRT_NAME)-ruby$(RUBY_API_VER)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
@@ -444,21 +453,21 @@ endif
|
||||
ifdef PYTHON
|
||||
CFLAGS += -DFEAT_PYTHON
|
||||
ifeq (yes, $(DYNAMIC_PYTHON))
|
||||
CFLAGS += -DDYNAMIC_PYTHON
|
||||
CFLAGS += -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL=\"$(DYNAMIC_PYTHON_DLL)\"
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef PYTHON3
|
||||
CFLAGS += -DFEAT_PYTHON3
|
||||
ifeq (yes, $(DYNAMIC_PYTHON3))
|
||||
CFLAGS += -DDYNAMIC_PYTHON3
|
||||
CFLAGS += -DDYNAMIC_PYTHON3 -DDYNAMIC_PYTHON3_DLL=\"PYTHON$(PYTHON3_VER).dll\"
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef TCL
|
||||
CFLAGS += -DFEAT_TCL $(TCLINC)
|
||||
ifeq (yes, $(DYNAMIC_TCL))
|
||||
CFLAGS += -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"tcl$(TCL_VER).dll\"
|
||||
CFLAGS += -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"tcl$(TCL_VER).dll\" -DDYNAMIC_TCL_VER=\"$(TCL_VER_LONG)\"
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -780,10 +789,10 @@ INCL = vim.h feature.h os_win32.h os_dos.h ascii.h keymap.h term.h macros.h \
|
||||
gui.h
|
||||
|
||||
$(OUTDIR)/if_python.o : if_python.c if_py_both.h $(INCL)
|
||||
$(CC) -c $(CFLAGS) $(PYTHONINC) $(PYTHON_HOME_DEF) -DDYNAMIC_PYTHON_DLL=\"$(DYNAMIC_PYTHON_DLL)\" $< -o $@
|
||||
$(CC) -c $(CFLAGS) $(PYTHONINC) $(PYTHON_HOME_DEF) $< -o $@
|
||||
|
||||
$(OUTDIR)/if_python3.o : if_python3.c if_py_both.h $(INCL)
|
||||
$(CC) -c $(CFLAGS) $(PYTHON3INC) -DDYNAMIC_PYTHON3_DLL=\"PYTHON$(PYTHON3_VER).dll\" $< -o $@
|
||||
$(CC) -c $(CFLAGS) $(PYTHON3INC) $< -o $@
|
||||
|
||||
$(OUTDIR)/%.o : %.c $(INCL)
|
||||
$(CC) -c $(CFLAGS) $< -o $@
|
||||
|
||||
+43
-4
@@ -394,8 +394,24 @@ OUTDIR=$(OBJDIR)
|
||||
|
||||
!if $(MSVCVER) < 1900
|
||||
MSVC_MAJOR = ($(MSVCVER) / 100 - 6)
|
||||
MSVCRT_VER = ($(MSVCVER) / 10 - 60)
|
||||
!else
|
||||
MSVC_MAJOR = ($(MSVCVER) / 100 - 5)
|
||||
MSVCRT_VER = ($(MSVCVER) / 10 - 50)
|
||||
!endif
|
||||
|
||||
# Calculate MSVCRT_VER
|
||||
!if [(set /a MSVCRT_VER="$(MSVCRT_VER)" > nul) && set MSVCRT_VER > msvcrtver.~] == 0
|
||||
!include msvcrtver.~
|
||||
!if [del msvcrtver.~]
|
||||
!endif
|
||||
!endif
|
||||
|
||||
# Base name of the msvcrXX.dll
|
||||
!if $(MSVCRT_VER) <= 60
|
||||
MSVCRT_NAME = msvcrt
|
||||
!else
|
||||
MSVCRT_NAME = msvcr$(MSVCRT_VER)
|
||||
!endif
|
||||
|
||||
!if $(MSVC_MAJOR) == 6
|
||||
@@ -858,19 +874,39 @@ RUBY_API_VER = $(RUBY_VER_LONG:.=)
|
||||
!endif
|
||||
|
||||
!if $(RUBY_VER) >= 18
|
||||
|
||||
!ifndef RUBY_PLATFORM
|
||||
!if "$(CPU)" == "i386"
|
||||
RUBY_PLATFORM = i386-mswin32
|
||||
!endif
|
||||
!else # CPU
|
||||
RUBY_PLATFORM = x64-mswin64
|
||||
!endif # CPU
|
||||
!if $(MSVCRT_VER) >= 70
|
||||
RUBY_PLATFORM = $(RUBY_PLATFORM)_$(MSVCRT_VER)
|
||||
!endif # MSVCRT_VER
|
||||
!endif # RUBY_PLATFORM
|
||||
|
||||
!ifndef RUBY_INSTALL_NAME
|
||||
RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_API_VER)
|
||||
!endif
|
||||
!else
|
||||
!ifndef RUBY_MSVCRT_NAME
|
||||
# Base name of msvcrXX.dll which is used by ruby's dll.
|
||||
RUBY_MSVCRT_NAME = $(MSVCRT_NAME)
|
||||
!endif # RUBY_MSVCRT_NAME
|
||||
!if "$(CPU)" == "i386"
|
||||
RUBY_INSTALL_NAME = $(RUBY_MSVCRT_NAME)-ruby$(RUBY_API_VER)
|
||||
!else # CPU
|
||||
RUBY_INSTALL_NAME = x64-$(RUBY_MSVCRT_NAME)-ruby$(RUBY_API_VER)
|
||||
!endif # CPU
|
||||
!endif # RUBY_INSTALL_NAME
|
||||
|
||||
!else # $(RUBY_VER) >= 18
|
||||
|
||||
!ifndef RUBY_PLATFORM
|
||||
RUBY_PLATFORM = i586-mswin32
|
||||
!endif
|
||||
!ifndef RUBY_INSTALL_NAME
|
||||
RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_API_VER)
|
||||
!endif
|
||||
|
||||
!endif # $(RUBY_VER) >= 18
|
||||
|
||||
!message Ruby requested (version $(RUBY_VER)) - root dir is "$(RUBY)"
|
||||
@@ -1024,6 +1060,9 @@ clean:
|
||||
cd xxd
|
||||
$(MAKE) /NOLOGO -f Make_mvc.mak clean
|
||||
cd ..
|
||||
cd tee
|
||||
$(MAKE) /NOLOGO -f Make_mvc.mak clean
|
||||
cd ..
|
||||
cd GvimExt
|
||||
$(MAKE) /NOLOGO -f Makefile clean
|
||||
cd ..
|
||||
|
||||
+15
-6
@@ -445,7 +445,9 @@ CClink = $(CC)
|
||||
|
||||
# TCL
|
||||
# Uncomment this when you want to include the Tcl interface.
|
||||
# First one is for static linking, second one for dynamic loading.
|
||||
#CONF_OPT_TCL = --enable-tclinterp
|
||||
#CONF_OPT_TCL = --enable-tclinterp=dynamic
|
||||
#CONF_OPT_TCL = --enable-tclinterp --with-tclsh=tclsh8.4
|
||||
|
||||
# CSCOPE
|
||||
@@ -1392,7 +1394,7 @@ SHELL = /bin/sh
|
||||
.SUFFIXES: .c .o .pro
|
||||
|
||||
PRE_DEFS = -Iproto $(DEFS) $(GUI_DEFS) $(GUI_IPATH) $(CPPFLAGS) $(EXTRA_IPATHS)
|
||||
POST_DEFS = $(X_CFLAGS) $(MZSCHEME_CFLAGS) $(TCL_CFLAGS) $(EXTRA_DEFS)
|
||||
POST_DEFS = $(X_CFLAGS) $(MZSCHEME_CFLAGS) $(EXTRA_DEFS)
|
||||
|
||||
ALL_CFLAGS = $(PRE_DEFS) $(CFLAGS) $(PROFILE_CFLAGS) $(SANITIZER_CFLAGS) $(LEAK_CFLAGS) $(POST_DEFS)
|
||||
|
||||
@@ -1400,7 +1402,7 @@ ALL_CFLAGS = $(PRE_DEFS) $(CFLAGS) $(PROFILE_CFLAGS) $(SANITIZER_CFLAGS) $(LEAK_
|
||||
# with "-E".
|
||||
OSDEF_CFLAGS = $(PRE_DEFS) $(POST_DEFS)
|
||||
|
||||
LINT_CFLAGS = -DLINT -I. $(PRE_DEFS) $(POST_DEFS) $(RUBY_CFLAGS) $(LUA_CFLAGS) $(PERL_CFLAGS) $(PYTHON_CFLAGS) $(PYTHON3_CFLAGS) -Dinline= -D__extension__= -Dalloca=alloca
|
||||
LINT_CFLAGS = -DLINT -I. $(PRE_DEFS) $(POST_DEFS) $(RUBY_CFLAGS) $(LUA_CFLAGS) $(PERL_CFLAGS) $(PYTHON_CFLAGS) $(PYTHON3_CFLAGS) $(TCL_CFLAGS) -Dinline= -D__extension__= -Dalloca=alloca
|
||||
|
||||
LINT_EXTRA = -DUSE_SNIFF -DHANGUL_INPUT -D"__attribute__(x)="
|
||||
|
||||
@@ -1961,7 +1963,6 @@ test1 \
|
||||
test_erasebackword \
|
||||
test_eval \
|
||||
test_fixeol \
|
||||
test_increment \
|
||||
test_insertcount \
|
||||
test_listchars \
|
||||
test_listlbr \
|
||||
@@ -1979,6 +1980,7 @@ test1 \
|
||||
test_tagcase \
|
||||
test_textobjects \
|
||||
test_utf8 \
|
||||
test_wordcount \
|
||||
test_writefile \
|
||||
test2 test3 test4 test5 test6 test7 test8 test9 \
|
||||
test10 test11 test12 test13 test14 test15 test16 test17 test18 test19 \
|
||||
@@ -1994,11 +1996,18 @@ test1 \
|
||||
cd testdir; rm -f $@.out; $(MAKE) -f Makefile $@.out VIMPROG=../$(VIMTARGET) $(GUI_TESTARG) SCRIPTSOURCE=../$(SCRIPTSOURCE)
|
||||
|
||||
test_assert \
|
||||
test_backspace_opt \
|
||||
test_cdo \
|
||||
test_hardcopy \
|
||||
test_increment \
|
||||
test_lispwords \
|
||||
test_menu \
|
||||
test_quickfix \
|
||||
test_searchpos \
|
||||
test_set \
|
||||
test_sort \
|
||||
test_undolevels \
|
||||
test_unlet \
|
||||
test_viml \
|
||||
test_alot:
|
||||
cd testdir; rm -f $@.res test.log messages; $(MAKE) -f Makefile $@.res VIMPROG=../$(VIMTARGET) $(GUI_TESTARG) SCRIPTSOURCE=../$(SCRIPTSOURCE)
|
||||
@@ -2008,7 +2017,7 @@ test_assert \
|
||||
cat testdir/messages
|
||||
|
||||
newtests:
|
||||
cd testdir; rm -f $@.res test.log messages; $(MAKE) -f Makefile newtests VIMPROG=../$(VIMTARGET) $(GUI_TESTARG) SCRIPTSOURCE=../$(SCRIPTSOURCE)
|
||||
cd testdir; rm -f $@.res test.log messages; $(MAKE) -f Makefile newtestssilent VIMPROG=../$(VIMTARGET) $(GUI_TESTARG) SCRIPTSOURCE=../$(SCRIPTSOURCE)
|
||||
@if test -f testdir/test.log; then \
|
||||
cat testdir/test.log; \
|
||||
fi
|
||||
@@ -2777,7 +2786,7 @@ objects/if_sniff.o: if_sniff.c
|
||||
$(CCC) -o $@ if_sniff.c
|
||||
|
||||
objects/if_tcl.o: if_tcl.c
|
||||
$(CCC) -o $@ if_tcl.c
|
||||
$(CCC) $(TCL_CFLAGS) -o $@ if_tcl.c
|
||||
|
||||
objects/integration.o: integration.c
|
||||
$(CCC) -o $@ integration.c
|
||||
@@ -2822,7 +2831,7 @@ objects/ops.o: ops.c
|
||||
$(CCC) -o $@ ops.c
|
||||
|
||||
objects/option.o: option.c
|
||||
$(CCC) -o $@ option.c
|
||||
$(CCC) $(LUA_CFLAGS) $(PERL_CFLAGS) $(PYTHON_CFLAGS) $(PYTHON3_CFLAGS) $(RUBY_CFLAGS) $(TCL_CFLAGS) -o $@ option.c
|
||||
|
||||
objects/os_beos.o: os_beos.c
|
||||
$(CCC) -o $@ os_beos.c
|
||||
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
/* vi:set ts=8 sts=4 sw=4:
|
||||
*
|
||||
* VIM - Vi IMproved by Bram Moolenaar
|
||||
*
|
||||
* Do ":help uganda" in Vim to read copying and usage conditions.
|
||||
* Do ":help credits" in Vim to see a list of people who contributed.
|
||||
*/
|
||||
|
||||
/*
|
||||
* alloc.h: enumeration of alloc IDs.
|
||||
* Each entry must be on exactly one line, GetAllocId() depends on that.
|
||||
*/
|
||||
typedef enum {
|
||||
aid_none = 0,
|
||||
aid_qf_dirname_start,
|
||||
aid_qf_dirname_now,
|
||||
aid_qf_namebuf,
|
||||
aid_qf_errmsg,
|
||||
aid_qf_pattern,
|
||||
} alloc_id_T;
|
||||
Vendored
+15
-3
@@ -1474,7 +1474,7 @@ Optional Features:
|
||||
--enable-perlinterp=OPTS Include Perl interpreter. default=no OPTS=no/yes/dynamic
|
||||
--enable-pythoninterp=OPTS Include Python interpreter. default=no OPTS=no/yes/dynamic
|
||||
--enable-python3interp=OPTS Include Python3 interpreter. default=no OPTS=no/yes/dynamic
|
||||
--enable-tclinterp Include Tcl interpreter.
|
||||
--enable-tclinterp=OPTS Include Tcl interpreter. default=no OPTS=no/yes/dynamic
|
||||
--enable-rubyinterp=OPTS Include Ruby interpreter. default=no OPTS=no/yes/dynamic
|
||||
--enable-cscope Include cscope interface.
|
||||
--enable-workshop Include Sun Visual Workshop support.
|
||||
@@ -6695,7 +6695,7 @@ fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_tclinterp" >&5
|
||||
$as_echo "$enable_tclinterp" >&6; }
|
||||
|
||||
if test "$enable_tclinterp" = "yes"; then
|
||||
if test "$enable_tclinterp" = "yes" -o "$enable_tclinterp" = "dynamic"; then
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-tclsh argument" >&5
|
||||
$as_echo_n "checking --with-tclsh argument... " >&6; }
|
||||
@@ -6931,6 +6931,7 @@ $as_echo_n "checking Tcl version... " >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tclver - OK" >&5
|
||||
$as_echo "$tclver - OK" >&6; };
|
||||
tclloc=`echo 'set l [info library];set i [string last lib $l];incr i -2;puts [string range $l 0 $i]' | $vi_cv_path_tcl -`
|
||||
tcldll=`echo 'puts libtcl[info tclversion][info sharedlibextension]' | $vi_cv_path_tcl -`
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of Tcl include" >&5
|
||||
$as_echo_n "checking for location of Tcl include... " >&6; }
|
||||
@@ -6967,7 +6968,11 @@ $as_echo_n "checking for location of tclConfig.sh script... " >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $try/tclConfig.sh" >&5
|
||||
$as_echo "$try/tclConfig.sh" >&6; }
|
||||
. "$try/tclConfig.sh"
|
||||
TCL_LIBS=`eval echo "$TCL_LIB_SPEC $TCL_LIBS"`
|
||||
if test "$enable_tclinterp" = "dynamic"; then
|
||||
TCL_LIBS=`eval echo "$TCL_STUB_LIB_SPEC $TCL_LIBS"`
|
||||
else
|
||||
TCL_LIBS=`eval echo "$TCL_LIB_SPEC $TCL_LIBS"`
|
||||
fi
|
||||
TCL_DEFS=`echo $TCL_DEFS | sed -e 's/\\\\ /\\\\X/g' | tr ' ' '\012' | sed -e '/^[^-]/d' -e '/^-[^D]/d' -e '/-D[^_]/d' -e 's/-D_/ -D_/' | tr '\012' ' ' | sed -e 's/\\\\X/\\\\ /g'`
|
||||
break
|
||||
fi
|
||||
@@ -7016,6 +7021,13 @@ $as_echo "<not found>" >&6; }
|
||||
$as_echo "too old; need Tcl version 8.0 or later" >&6; }
|
||||
fi
|
||||
fi
|
||||
if test "$enable_tclinterp" = "dynamic"; then
|
||||
if test "X$TCL_SRC" != "X" -a "X$tcldll" != "X"; then
|
||||
$as_echo "#define DYNAMIC_TCL 1" >>confdefs.h
|
||||
|
||||
TCL_CFLAGS="-DDYNAMIC_TCL_DLL=\\\"$tcldll\\\" -DDYNAMIC_TCL_VER=\\\"$tclver\\\" $TCL_CFLAGS"
|
||||
fi
|
||||
fi
|
||||
if test "$fail_if_missing" = "yes" -a -z "$TCL_SRC"; then
|
||||
as_fn_error $? "could not configure Tcl" "$LINENO" 5
|
||||
fi
|
||||
|
||||
@@ -2797,6 +2797,8 @@ buflist_list(eap)
|
||||
(buf->b_flags & BF_READERR) ? 'x'
|
||||
: (bufIsChanged(buf) ? '+' : ' '),
|
||||
NameBuff);
|
||||
if (len > IOSIZE - 20)
|
||||
len = IOSIZE - 20;
|
||||
|
||||
/* put "line 999" in column 40 or after the file name */
|
||||
i = 40 - vim_strsize(IObuff);
|
||||
|
||||
@@ -360,6 +360,9 @@
|
||||
/* Define if you want to include the Tcl interpreter. */
|
||||
#undef FEAT_TCL
|
||||
|
||||
/* Define for linking via dlopen() or LoadLibrary() */
|
||||
#undef DYNAMIC_TCL
|
||||
|
||||
/* Define if you want to include the Sniff interface. */
|
||||
#undef FEAT_SNIFF
|
||||
|
||||
|
||||
+14
-3
@@ -1669,11 +1669,11 @@ fi
|
||||
|
||||
AC_MSG_CHECKING(--enable-tclinterp argument)
|
||||
AC_ARG_ENABLE(tclinterp,
|
||||
[ --enable-tclinterp Include Tcl interpreter.], ,
|
||||
[ --enable-tclinterp[=OPTS] Include Tcl interpreter. [default=no] [OPTS=no/yes/dynamic]], ,
|
||||
[enable_tclinterp="no"])
|
||||
AC_MSG_RESULT($enable_tclinterp)
|
||||
|
||||
if test "$enable_tclinterp" = "yes"; then
|
||||
if test "$enable_tclinterp" = "yes" -o "$enable_tclinterp" = "dynamic"; then
|
||||
|
||||
dnl on FreeBSD tclsh is a silly script, look for tclsh8.[5420]
|
||||
AC_MSG_CHECKING(--with-tclsh argument)
|
||||
@@ -1707,6 +1707,7 @@ if test "$enable_tclinterp" = "yes"; then
|
||||
tclver=`echo 'puts [[info tclversion]]' | $vi_cv_path_tcl -`
|
||||
AC_MSG_RESULT($tclver - OK);
|
||||
tclloc=`echo 'set l [[info library]];set i [[string last lib $l]];incr i -2;puts [[string range $l 0 $i]]' | $vi_cv_path_tcl -`
|
||||
tcldll=`echo 'puts libtcl[[info tclversion]][[info sharedlibextension]]' | $vi_cv_path_tcl -`
|
||||
|
||||
AC_MSG_CHECKING(for location of Tcl include)
|
||||
if test "x$MACOSX" != "xyes"; then
|
||||
@@ -1741,7 +1742,11 @@ if test "$enable_tclinterp" = "yes"; then
|
||||
AC_MSG_RESULT($try/tclConfig.sh)
|
||||
. "$try/tclConfig.sh"
|
||||
dnl use eval, because tcl 8.2 includes ${TCL_DBGX}
|
||||
TCL_LIBS=`eval echo "$TCL_LIB_SPEC $TCL_LIBS"`
|
||||
if test "$enable_tclinterp" = "dynamic"; then
|
||||
TCL_LIBS=`eval echo "$TCL_STUB_LIB_SPEC $TCL_LIBS"`
|
||||
else
|
||||
TCL_LIBS=`eval echo "$TCL_LIB_SPEC $TCL_LIBS"`
|
||||
fi
|
||||
dnl Use $TCL_DEFS for -D_THREAD_SAFE et al. But only use the
|
||||
dnl "-D_ABC" items. Watch out for -DFOO=long\ long.
|
||||
TCL_DEFS=`echo $TCL_DEFS | sed -e 's/\\\\ /\\\\X/g' | tr ' ' '\012' | sed -e '/^[[^-]]/d' -e '/^-[[^D]]/d' -e '/-D[[^_]]/d' -e 's/-D_/ -D_/' | tr '\012' ' ' | sed -e 's/\\\\X/\\\\ /g'`
|
||||
@@ -1786,6 +1791,12 @@ if test "$enable_tclinterp" = "yes"; then
|
||||
AC_MSG_RESULT(too old; need Tcl version 8.0 or later)
|
||||
fi
|
||||
fi
|
||||
if test "$enable_tclinterp" = "dynamic"; then
|
||||
if test "X$TCL_SRC" != "X" -a "X$tcldll" != "X"; then
|
||||
AC_DEFINE(DYNAMIC_TCL)
|
||||
TCL_CFLAGS="-DDYNAMIC_TCL_DLL=\\\"$tcldll\\\" -DDYNAMIC_TCL_VER=\\\"$tclver\\\" $TCL_CFLAGS"
|
||||
fi
|
||||
fi
|
||||
if test "$fail_if_missing" = "yes" -a -z "$TCL_SRC"; then
|
||||
AC_MSG_ERROR([could not configure Tcl])
|
||||
fi
|
||||
|
||||
+43
-14
@@ -467,6 +467,7 @@ static void f_abs __ARGS((typval_T *argvars, typval_T *rettv));
|
||||
static void f_acos __ARGS((typval_T *argvars, typval_T *rettv));
|
||||
#endif
|
||||
static void f_add __ARGS((typval_T *argvars, typval_T *rettv));
|
||||
static void f_alloc_fail __ARGS((typval_T *argvars, typval_T *rettv));
|
||||
static void f_and __ARGS((typval_T *argvars, typval_T *rettv));
|
||||
static void f_append __ARGS((typval_T *argvars, typval_T *rettv));
|
||||
static void f_argc __ARGS((typval_T *argvars, typval_T *rettv));
|
||||
@@ -3737,25 +3738,30 @@ do_unlet(name, forceit)
|
||||
ht = find_var_ht(name, &varname);
|
||||
if (ht != NULL && *varname != NUL)
|
||||
{
|
||||
if (ht == &globvarht)
|
||||
d = &globvardict;
|
||||
else if (current_funccal != NULL
|
||||
&& ht == ¤t_funccal->l_vars.dv_hashtab)
|
||||
d = ¤t_funccal->l_vars;
|
||||
else if (ht == &compat_hashtab)
|
||||
d = &vimvardict;
|
||||
else
|
||||
{
|
||||
di = find_var_in_ht(ht, *name, (char_u *)"", FALSE);
|
||||
d = di == NULL ? NULL : di->di_tv.vval.v_dict;
|
||||
}
|
||||
if (d == NULL)
|
||||
{
|
||||
EMSG2(_(e_intern2), "do_unlet()");
|
||||
return FAIL;
|
||||
}
|
||||
hi = hash_find(ht, varname);
|
||||
if (!HASHITEM_EMPTY(hi))
|
||||
{
|
||||
di = HI2DI(hi);
|
||||
if (var_check_fixed(di->di_flags, name, FALSE)
|
||||
|| var_check_ro(di->di_flags, name, FALSE))
|
||||
return FAIL;
|
||||
|
||||
if (ht == &globvarht)
|
||||
d = &globvardict;
|
||||
else if (current_funccal != NULL
|
||||
&& ht == ¤t_funccal->l_vars.dv_hashtab)
|
||||
d = ¤t_funccal->l_vars;
|
||||
else
|
||||
{
|
||||
di = find_var_in_ht(ht, *name, (char_u *)"", FALSE);
|
||||
d = di->di_tv.vval.v_dict;
|
||||
}
|
||||
if (d == NULL || tv_check_lock(d->dv_lock, name, FALSE))
|
||||
|| var_check_ro(di->di_flags, name, FALSE)
|
||||
|| tv_check_lock(d->dv_lock, name, FALSE))
|
||||
return FAIL;
|
||||
|
||||
delete_var(ht, hi);
|
||||
@@ -8072,6 +8078,7 @@ static struct fst
|
||||
{"acos", 1, 1, f_acos}, /* WJMc */
|
||||
#endif
|
||||
{"add", 2, 2, f_add},
|
||||
{"alloc_fail", 3, 3, f_alloc_fail},
|
||||
{"and", 2, 2, f_and},
|
||||
{"append", 2, 2, f_append},
|
||||
{"argc", 0, 0, f_argc},
|
||||
@@ -8984,6 +8991,28 @@ f_add(argvars, rettv)
|
||||
EMSG(_(e_listreq));
|
||||
}
|
||||
|
||||
/*
|
||||
* "alloc_fail(id, countdown, repeat)" function
|
||||
*/
|
||||
static void
|
||||
f_alloc_fail(argvars, rettv)
|
||||
typval_T *argvars;
|
||||
typval_T *rettv UNUSED;
|
||||
{
|
||||
if (argvars[0].v_type != VAR_NUMBER
|
||||
|| argvars[0].vval.v_number <= 0
|
||||
|| argvars[1].v_type != VAR_NUMBER
|
||||
|| argvars[1].vval.v_number < 0
|
||||
|| argvars[2].v_type != VAR_NUMBER)
|
||||
EMSG(_(e_invarg));
|
||||
else
|
||||
{
|
||||
alloc_fail_id = argvars[0].vval.v_number;
|
||||
alloc_fail_countdown = argvars[1].vval.v_number;
|
||||
alloc_fail_repeat = argvars[2].vval.v_number;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* "and(expr, expr)" function
|
||||
*/
|
||||
|
||||
+4
-1
@@ -6933,6 +6933,7 @@ parse_addr_type_arg(value, vallen, argt, addr_type_arg)
|
||||
int *addr_type_arg;
|
||||
{
|
||||
int i, a, b;
|
||||
|
||||
for (i = 0; addr_type_complete[i].expand != -1; ++i)
|
||||
{
|
||||
a = (int)STRLEN(addr_type_complete[i].name) == vallen;
|
||||
@@ -6947,7 +6948,9 @@ parse_addr_type_arg(value, vallen, argt, addr_type_arg)
|
||||
if (addr_type_complete[i].expand == -1)
|
||||
{
|
||||
char_u *err = value;
|
||||
for (i=0; err[i] == NUL || !vim_iswhite(err[i]); i++);
|
||||
|
||||
for (i = 0; err[i] != NUL && !vim_iswhite(err[i]); i++)
|
||||
;
|
||||
err[i] = NUL;
|
||||
EMSG2(_("E180: Invalid address type value: %s"), err);
|
||||
return FAIL;
|
||||
|
||||
@@ -1623,6 +1623,15 @@ EXTERN FILE *time_fd INIT(= NULL); /* where to write startup timing */
|
||||
EXTERN int ignored;
|
||||
EXTERN char *ignoredp;
|
||||
|
||||
#ifdef FEAT_EVAL
|
||||
/* set by alloc_fail(): ID */
|
||||
EXTERN alloc_id_T alloc_fail_id INIT(= aid_none);
|
||||
/* set by alloc_fail(), when zero alloc() returns NULL */
|
||||
EXTERN int alloc_fail_countdown INIT(= -1);
|
||||
/* set by alloc_fail(), number of times alloc() returns NULL */
|
||||
EXTERN int alloc_fail_repeat INIT(= 0);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Optional Farsi support. Include it here, so EXTERN and INIT are defined.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -686,7 +686,7 @@ DWriteContext::DrawText(HDC hdc, const WCHAR* text, int len,
|
||||
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
DWRITE_TEXT_RANGE textRange = { 0, len };
|
||||
DWRITE_TEXT_RANGE textRange = { 0, (UINT32)len };
|
||||
textLayout->SetFontWeight(mFontWeight, textRange);
|
||||
textLayout->SetFontStyle(mFontStyle, textRange);
|
||||
}
|
||||
|
||||
+5
-3
@@ -1769,9 +1769,11 @@ gui_mch_init(void)
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_EVAL
|
||||
# ifndef HandleToLong
|
||||
/* HandleToLong() only exists in compilers that can do 64 bit builds */
|
||||
# define HandleToLong(h) ((long)(h))
|
||||
# if !defined(_MSC_VER) || (_MSC_VER < 1400)
|
||||
/* Define HandleToLong for old MS and non-MS compilers if not defined. */
|
||||
# ifndef HandleToLong
|
||||
# define HandleToLong(h) ((long)(h))
|
||||
# endif
|
||||
# endif
|
||||
/* set the v:windowid variable */
|
||||
set_vim_var_nr(VV_WINDOWID, HandleToLong(s_hwnd));
|
||||
|
||||
+1
-6
@@ -402,12 +402,7 @@ lua_link_init(char *libname, int verbose)
|
||||
int
|
||||
lua_enabled(int verbose)
|
||||
{
|
||||
#ifdef WIN3264
|
||||
char *dll = DYNAMIC_LUA_DLL;
|
||||
#else
|
||||
char *dll = *p_luadll ? (char *)p_luadll : DYNAMIC_LUA_DLL;
|
||||
#endif
|
||||
return lua_link_init(dll, verbose) == OK;
|
||||
return lua_link_init((char *)p_luadll, verbose) == OK;
|
||||
}
|
||||
|
||||
#endif /* DYNAMIC_LUA */
|
||||
|
||||
+1
-6
@@ -611,12 +611,7 @@ perl_runtime_link_init(char *libname, int verbose)
|
||||
perl_enabled(verbose)
|
||||
int verbose;
|
||||
{
|
||||
#ifdef WIN3264
|
||||
char *dll = DYNAMIC_PERL_DLL;
|
||||
#else
|
||||
char *dll = *p_perldll ? (char *)p_perldll : DYNAMIC_PERL_DLL;
|
||||
#endif
|
||||
return perl_runtime_link_init(dll, verbose) == OK;
|
||||
return perl_runtime_link_init((char *)p_perldll, verbose) == OK;
|
||||
}
|
||||
#endif /* DYNAMIC_PERL */
|
||||
|
||||
|
||||
+1
-6
@@ -736,12 +736,7 @@ python_runtime_link_init(char *libname, int verbose)
|
||||
int
|
||||
python_enabled(int verbose)
|
||||
{
|
||||
#ifdef WIN3264
|
||||
char *dll = DYNAMIC_PYTHON_DLL;
|
||||
#else
|
||||
char *dll = *p_pydll ? (char *)p_pydll : DYNAMIC_PYTHON_DLL;
|
||||
#endif
|
||||
return python_runtime_link_init(dll, verbose) == OK;
|
||||
return python_runtime_link_init((char *)p_pydll, verbose) == OK;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
+1
-6
@@ -686,12 +686,7 @@ py3_runtime_link_init(char *libname, int verbose)
|
||||
int
|
||||
python3_enabled(int verbose)
|
||||
{
|
||||
#ifdef WIN3264
|
||||
char *dll = DYNAMIC_PYTHON3_DLL;
|
||||
#else
|
||||
char *dll = *p_py3dll ? (char *)p_py3dll : DYNAMIC_PYTHON3_DLL;
|
||||
#endif
|
||||
return py3_runtime_link_init(dll, verbose) == OK;
|
||||
return py3_runtime_link_init((char *)p_py3dll, verbose) == OK;
|
||||
}
|
||||
|
||||
/* Load the standard Python exceptions - don't import the symbols from the
|
||||
|
||||
+1
-6
@@ -685,12 +685,7 @@ ruby_runtime_link_init(char *libname, int verbose)
|
||||
ruby_enabled(verbose)
|
||||
int verbose;
|
||||
{
|
||||
#ifdef WIN3264
|
||||
char *dll = DYNAMIC_RUBY_DLL;
|
||||
#else
|
||||
char *dll = *p_rubydll ? (char *)p_rubydll : DYNAMIC_RUBY_DLL;
|
||||
#endif
|
||||
return ruby_runtime_link_init(dll, verbose) == OK;
|
||||
return ruby_runtime_link_init((char *)p_rubydll, verbose) == OK;
|
||||
}
|
||||
#endif /* defined(DYNAMIC_RUBY) || defined(PROTO) */
|
||||
|
||||
|
||||
+26
-7
@@ -160,6 +160,20 @@ static struct ref refsdeleted; /* dummy object for deleted ref list */
|
||||
typedef int HANDLE;
|
||||
# endif
|
||||
|
||||
# ifndef WIN3264
|
||||
# include <dlfcn.h>
|
||||
# define HANDLE void*
|
||||
# define TCL_PROC void*
|
||||
# define load_dll(n) dlopen((n), RTLD_LAZY|RTLD_GLOBAL)
|
||||
# define symbol_from_dll dlsym
|
||||
# define close_dll dlclose
|
||||
# else
|
||||
# define TCL_PROC FARPROC
|
||||
# define load_dll vimLoadLib
|
||||
# define symbol_from_dll GetProcAddress
|
||||
# define close_dll FreeLibrary
|
||||
# endif
|
||||
|
||||
/*
|
||||
* Declare HANDLE for tcl.dll and function pointers.
|
||||
*/
|
||||
@@ -170,7 +184,6 @@ void (*dll_Tcl_FindExecutable)(const void *);
|
||||
/*
|
||||
* Table of name to function pointer of tcl.
|
||||
*/
|
||||
#define TCL_PROC FARPROC
|
||||
static struct {
|
||||
char* name;
|
||||
TCL_PROC* ptr;
|
||||
@@ -197,7 +210,7 @@ tcl_runtime_link_init(char *libname, int verbose)
|
||||
|
||||
if (hTclLib)
|
||||
return OK;
|
||||
if (!(hTclLib = vimLoadLib(libname)))
|
||||
if (!(hTclLib = load_dll(libname)))
|
||||
{
|
||||
if (verbose)
|
||||
EMSG2(_(e_loadlib), libname);
|
||||
@@ -205,10 +218,10 @@ tcl_runtime_link_init(char *libname, int verbose)
|
||||
}
|
||||
for (i = 0; tcl_funcname_table[i].ptr; ++i)
|
||||
{
|
||||
if (!(*tcl_funcname_table[i].ptr = GetProcAddress(hTclLib,
|
||||
if (!(*tcl_funcname_table[i].ptr = symbol_from_dll(hTclLib,
|
||||
tcl_funcname_table[i].name)))
|
||||
{
|
||||
FreeLibrary(hTclLib);
|
||||
close_dll(hTclLib);
|
||||
hTclLib = NULL;
|
||||
if (verbose)
|
||||
EMSG2(_(e_loadfunc), tcl_funcname_table[i].name);
|
||||
@@ -246,13 +259,13 @@ tcl_enabled(verbose)
|
||||
int verbose;
|
||||
{
|
||||
if (!stubs_initialized && find_executable_arg != NULL
|
||||
&& tcl_runtime_link_init(DYNAMIC_TCL_DLL, verbose) == OK)
|
||||
&& tcl_runtime_link_init((char *)p_tcldll, verbose) == OK)
|
||||
{
|
||||
Tcl_Interp *interp;
|
||||
|
||||
dll_Tcl_FindExecutable(find_executable_arg);
|
||||
|
||||
if (interp = dll_Tcl_CreateInterp())
|
||||
if ((interp = dll_Tcl_CreateInterp()) != NULL)
|
||||
{
|
||||
if (Tcl_InitStubs(interp, DYNAMIC_TCL_VER, 0))
|
||||
{
|
||||
@@ -272,7 +285,7 @@ tcl_end()
|
||||
#ifdef DYNAMIC_TCL
|
||||
if (hTclLib)
|
||||
{
|
||||
FreeLibrary(hTclLib);
|
||||
close_dll(hTclLib);
|
||||
hTclLib = NULL;
|
||||
}
|
||||
#endif
|
||||
@@ -2039,6 +2052,12 @@ tcldelallrefs(ref)
|
||||
int err;
|
||||
char *result;
|
||||
|
||||
#ifdef DYNAMIC_TCL
|
||||
/* TODO: this code currently crashes Vim on exit */
|
||||
if (exiting)
|
||||
return;
|
||||
#endif
|
||||
|
||||
while (ref != NULL)
|
||||
{
|
||||
next = ref->next;
|
||||
|
||||
+49
-2
@@ -797,6 +797,21 @@ vim_mem_profile_dump()
|
||||
|
||||
#endif /* MEM_PROFILE */
|
||||
|
||||
#ifdef FEAT_EVAL
|
||||
static int
|
||||
alloc_does_fail()
|
||||
{
|
||||
if (alloc_fail_countdown == 0)
|
||||
{
|
||||
if (--alloc_fail_repeat <= 0)
|
||||
alloc_fail_id = 0;
|
||||
return TRUE;
|
||||
}
|
||||
--alloc_fail_countdown;
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Some memory is reserved for error messages and for being able to
|
||||
* call mf_release_all(), which needs some memory for mf_trans_add().
|
||||
@@ -820,6 +835,21 @@ alloc(size)
|
||||
return (lalloc((long_u)size, TRUE));
|
||||
}
|
||||
|
||||
/*
|
||||
* alloc() with an ID for alloc_fail().
|
||||
*/
|
||||
char_u *
|
||||
alloc_id(size, id)
|
||||
unsigned size;
|
||||
alloc_id_T id UNUSED;
|
||||
{
|
||||
#ifdef FEAT_EVAL
|
||||
if (alloc_fail_id == id && alloc_does_fail())
|
||||
return NULL;
|
||||
#endif
|
||||
return (lalloc((long_u)size, TRUE));
|
||||
}
|
||||
|
||||
/*
|
||||
* Allocate memory and set all bytes to zero.
|
||||
*/
|
||||
@@ -968,6 +998,22 @@ theend:
|
||||
return p;
|
||||
}
|
||||
|
||||
/*
|
||||
* lalloc() with an ID for alloc_fail().
|
||||
*/
|
||||
char_u *
|
||||
lalloc_id(size, message, id)
|
||||
long_u size;
|
||||
int message;
|
||||
alloc_id_T id UNUSED;
|
||||
{
|
||||
#ifdef FEAT_EVAL
|
||||
if (alloc_fail_id == id && alloc_does_fail())
|
||||
return NULL;
|
||||
#endif
|
||||
return (lalloc((long_u)size, message));
|
||||
}
|
||||
|
||||
#if defined(MEM_PROFILE) || defined(PROTO)
|
||||
/*
|
||||
* realloc() with memory profiling.
|
||||
@@ -6258,8 +6304,9 @@ put_bytes(fd, nr, len)
|
||||
|
||||
/*
|
||||
* Write time_t to file "fd" in 8 bytes.
|
||||
* Returns FAIL when the write failed.
|
||||
*/
|
||||
void
|
||||
int
|
||||
put_time(fd, the_time)
|
||||
FILE *fd;
|
||||
time_t the_time;
|
||||
@@ -6267,7 +6314,7 @@ put_time(fd, the_time)
|
||||
char_u buf[8];
|
||||
|
||||
time_to_bytes(the_time, buf);
|
||||
(void)fwrite(buf, (size_t)8, (size_t)1, fd);
|
||||
return fwrite(buf, (size_t)8, (size_t)1, fd) == 1 ? OK : FAIL;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
+29
-59
@@ -40,7 +40,6 @@ static void find_start_of_word __ARGS((pos_T *));
|
||||
static void find_end_of_word __ARGS((pos_T *));
|
||||
static int get_mouse_class __ARGS((char_u *p));
|
||||
#endif
|
||||
static void prep_redo_visual __ARGS((cmdarg_T *cap));
|
||||
static void prep_redo_cmd __ARGS((cmdarg_T *cap));
|
||||
static void prep_redo __ARGS((int regname, long, int, int, int, int, int));
|
||||
static int checkclearop __ARGS((oparg_T *oap));
|
||||
@@ -1392,6 +1391,7 @@ do_pending_operator(cap, old_col, gui_yank)
|
||||
static linenr_T redo_VIsual_line_count; /* number of lines */
|
||||
static colnr_T redo_VIsual_vcol; /* number of cols or end column */
|
||||
static long redo_VIsual_count; /* count for Visual operator */
|
||||
static int redo_VIsual_arg; /* extra argument */
|
||||
#ifdef FEAT_VIRTUALEDIT
|
||||
int include_line_break = FALSE;
|
||||
#endif
|
||||
@@ -1699,6 +1699,7 @@ do_pending_operator(cap, old_col, gui_yank)
|
||||
redo_VIsual_vcol = resel_VIsual_vcol;
|
||||
redo_VIsual_line_count = resel_VIsual_line_count;
|
||||
redo_VIsual_count = cap->count0;
|
||||
redo_VIsual_arg = cap->arg;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2108,6 +2109,24 @@ do_pending_operator(cap, old_col, gui_yank)
|
||||
oap->op_type == OP_FOLDDELREC, oap->is_VIsual);
|
||||
break;
|
||||
#endif
|
||||
case OP_NR_ADD:
|
||||
case OP_NR_SUB:
|
||||
if (empty_region_error)
|
||||
{
|
||||
vim_beep(BO_OPER);
|
||||
CancelRedo();
|
||||
}
|
||||
else
|
||||
{
|
||||
VIsual_active = TRUE;
|
||||
#ifdef FEAT_LINEBREAK
|
||||
curwin->w_p_lbr = lbr_saved;
|
||||
#endif
|
||||
op_addsub(oap, cap->count1, redo_VIsual_arg);
|
||||
VIsual_active = FALSE;
|
||||
}
|
||||
check_cursor_col();
|
||||
break;
|
||||
default:
|
||||
clearopbeep(oap);
|
||||
}
|
||||
@@ -3604,43 +3623,6 @@ find_ident_at_pos(wp, lnum, startcol, string, find_type)
|
||||
return col;
|
||||
}
|
||||
|
||||
/*
|
||||
* Add commands to reselect Visual mode into the redo buffer.
|
||||
*/
|
||||
static void
|
||||
prep_redo_visual(cap)
|
||||
cmdarg_T *cap;
|
||||
{
|
||||
ResetRedobuff();
|
||||
AppendCharToRedobuff(VIsual_mode);
|
||||
if (VIsual_mode == 'V' && curbuf->b_visual.vi_end.lnum
|
||||
!= curbuf->b_visual.vi_start.lnum)
|
||||
{
|
||||
AppendNumberToRedobuff(curbuf->b_visual.vi_end.lnum
|
||||
- curbuf->b_visual.vi_start.lnum);
|
||||
AppendCharToRedobuff('j');
|
||||
}
|
||||
else if (VIsual_mode == 'v' || VIsual_mode == Ctrl_V)
|
||||
{
|
||||
/* block visual mode or char visual mmode*/
|
||||
if (curbuf->b_visual.vi_end.lnum != curbuf->b_visual.vi_start.lnum)
|
||||
{
|
||||
AppendNumberToRedobuff(curbuf->b_visual.vi_end.lnum -
|
||||
curbuf->b_visual.vi_start.lnum);
|
||||
AppendCharToRedobuff('j');
|
||||
}
|
||||
if (curbuf->b_visual.vi_curswant == MAXCOL)
|
||||
AppendCharToRedobuff('$');
|
||||
else if (curbuf->b_visual.vi_end.col > curbuf->b_visual.vi_start.col)
|
||||
{
|
||||
AppendNumberToRedobuff(curbuf->b_visual.vi_end.col
|
||||
- curbuf->b_visual.vi_start.col - 1);
|
||||
AppendCharToRedobuff(' ');
|
||||
}
|
||||
}
|
||||
AppendNumberToRedobuff(cap->count1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Prepare for redo of a normal command.
|
||||
*/
|
||||
@@ -4248,30 +4230,17 @@ nv_help(cap)
|
||||
nv_addsub(cap)
|
||||
cmdarg_T *cap;
|
||||
{
|
||||
int visual = VIsual_active;
|
||||
|
||||
if (cap->oap->op_type == OP_NOP
|
||||
&& do_addsub((int)cap->cmdchar, cap->count1, cap->arg) == OK)
|
||||
if (!VIsual_active && cap->oap->op_type == OP_NOP)
|
||||
{
|
||||
if (visual)
|
||||
{
|
||||
prep_redo_visual(cap);
|
||||
if (cap->arg)
|
||||
AppendCharToRedobuff('g');
|
||||
AppendCharToRedobuff(cap->cmdchar);
|
||||
}
|
||||
else
|
||||
prep_redo_cmd(cap);
|
||||
prep_redo_cmd(cap);
|
||||
cap->oap->op_type = cap->cmdchar == Ctrl_A ? OP_NR_ADD : OP_NR_SUB;
|
||||
op_addsub(cap->oap, cap->count1, cap->arg);
|
||||
cap->oap->op_type = OP_NOP;
|
||||
}
|
||||
else if (VIsual_active)
|
||||
nv_operator(cap);
|
||||
else
|
||||
clearopbeep(cap->oap);
|
||||
if (visual)
|
||||
{
|
||||
VIsual_active = FALSE;
|
||||
redo_VIsual_busy = FALSE;
|
||||
may_clear_cmdline();
|
||||
redraw_later(INVERTED);
|
||||
}
|
||||
clearop(cap->oap);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -7958,6 +7927,7 @@ nv_g_cmd(cap)
|
||||
{
|
||||
cap->arg = TRUE;
|
||||
cap->cmdchar = cap->nchar;
|
||||
cap->nchar = NUL;
|
||||
nv_addsub(cap);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -112,6 +112,7 @@ static void dis_msg __ARGS((char_u *p, int skip_esc));
|
||||
static char_u *skip_comment __ARGS((char_u *line, int process, int include_space, int *is_comment));
|
||||
#endif
|
||||
static void block_prep __ARGS((oparg_T *oap, struct block_def *, linenr_T, int));
|
||||
static int do_addsub __ARGS((int op_type, pos_T *pos, int length, linenr_T Prenum1));
|
||||
#if defined(FEAT_CLIPBOARD) || defined(FEAT_EVAL)
|
||||
static void str_to_reg __ARGS((struct yankreg *y_ptr, int yank_type, char_u *str, long len, long blocklen, int str_list));
|
||||
#endif
|
||||
@@ -158,6 +159,8 @@ static char opchars[][3] =
|
||||
{'z', 'D', TRUE}, /* OP_FOLDDELREC */
|
||||
{'g', 'w', TRUE}, /* OP_FORMAT2 */
|
||||
{'g', '@', FALSE}, /* OP_FUNCTION */
|
||||
{Ctrl_A, NUL, FALSE}, /* OP_NR_ADD */
|
||||
{Ctrl_X, NUL, FALSE}, /* OP_NR_SUB */
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -175,6 +178,10 @@ get_op_type(char1, char2)
|
||||
return OP_REPLACE;
|
||||
if (char1 == '~') /* when tilde is an operator */
|
||||
return OP_TILDE;
|
||||
if (char1 == 'g' && char2 == Ctrl_A) /* add */
|
||||
return OP_NR_ADD;
|
||||
if (char1 == 'g' && char2 == Ctrl_X) /* subtract */
|
||||
return OP_NR_SUB;
|
||||
for (i = 0; ; ++i)
|
||||
if (opchars[i][0] == char1 && opchars[i][1] == char2)
|
||||
break;
|
||||
@@ -5339,42 +5346,129 @@ block_prep(oap, bdp, lnum, is_del)
|
||||
bdp->textstart = pstart;
|
||||
}
|
||||
|
||||
#ifdef FEAT_RIGHTLEFT
|
||||
static void reverse_line __ARGS((char_u *s));
|
||||
|
||||
static void
|
||||
reverse_line(s)
|
||||
char_u *s;
|
||||
/*
|
||||
* Handle the add/subtract operator.
|
||||
*/
|
||||
void
|
||||
op_addsub(oap, Prenum1, g_cmd)
|
||||
oparg_T *oap;
|
||||
linenr_T Prenum1; /* Amount of add/subtract */
|
||||
int g_cmd; /* was g<c-a>/g<c-x> */
|
||||
{
|
||||
int i, j;
|
||||
char_u c;
|
||||
pos_T pos;
|
||||
struct block_def bd;
|
||||
int change_cnt = 0;
|
||||
linenr_T amount = Prenum1;
|
||||
|
||||
if ((i = (int)STRLEN(s) - 1) <= 0)
|
||||
return;
|
||||
|
||||
curwin->w_cursor.col = i - curwin->w_cursor.col;
|
||||
for (j = 0; j < i; j++, i--)
|
||||
if (!VIsual_active)
|
||||
{
|
||||
c = s[i]; s[i] = s[j]; s[j] = c;
|
||||
pos = curwin->w_cursor;
|
||||
if (u_save_cursor() == FAIL)
|
||||
return;
|
||||
change_cnt = do_addsub(oap->op_type, &pos, 0, amount);
|
||||
if (change_cnt)
|
||||
changed_lines(pos.lnum, 0, pos.lnum + 1, 0L);
|
||||
}
|
||||
else
|
||||
{
|
||||
int one_change;
|
||||
int length;
|
||||
pos_T startpos;
|
||||
|
||||
if (u_save((linenr_T)(oap->start.lnum - 1),
|
||||
(linenr_T)(oap->end.lnum + 1)) == FAIL)
|
||||
return;
|
||||
|
||||
pos = oap->start;
|
||||
for (; pos.lnum <= oap->end.lnum; ++pos.lnum)
|
||||
{
|
||||
if (oap->block_mode) /* Visual block mode */
|
||||
{
|
||||
block_prep(oap, &bd, pos.lnum, FALSE);
|
||||
pos.col = bd.textcol;
|
||||
length = bd.textlen;
|
||||
}
|
||||
else if (oap->motion_type == MLINE)
|
||||
{
|
||||
curwin->w_cursor.col = 0;
|
||||
pos.col = 0;
|
||||
length = (colnr_T)STRLEN(ml_get(pos.lnum));
|
||||
}
|
||||
else /* oap->motion_type == MCHAR */
|
||||
{
|
||||
if (!oap->inclusive)
|
||||
dec(&(oap->end));
|
||||
length = (colnr_T)STRLEN(ml_get(pos.lnum));
|
||||
pos.col = 0;
|
||||
if (pos.lnum == oap->start.lnum)
|
||||
{
|
||||
pos.col += oap->start.col;
|
||||
length -= oap->start.col;
|
||||
}
|
||||
if (pos.lnum == oap->end.lnum)
|
||||
{
|
||||
length = (int)STRLEN(ml_get(oap->end.lnum));
|
||||
if (oap->end.col >= length)
|
||||
oap->end.col = length - 1;
|
||||
length = oap->end.col - pos.col + 1;
|
||||
}
|
||||
}
|
||||
one_change = do_addsub(oap->op_type, &pos, length, amount);
|
||||
if (one_change)
|
||||
{
|
||||
/* Remember the start position of the first change. */
|
||||
if (change_cnt == 0)
|
||||
startpos = curbuf->b_op_start;
|
||||
++change_cnt;
|
||||
}
|
||||
|
||||
#ifdef FEAT_NETBEANS_INTG
|
||||
if (netbeans_active() && one_change)
|
||||
{
|
||||
char_u *ptr = ml_get_buf(curbuf, pos.lnum, FALSE);
|
||||
|
||||
netbeans_removed(curbuf, pos.lnum, pos.col, (long)length);
|
||||
netbeans_inserted(curbuf, pos.lnum, pos.col,
|
||||
&ptr[pos.col], length);
|
||||
}
|
||||
#endif
|
||||
if (g_cmd && one_change)
|
||||
amount += Prenum1;
|
||||
}
|
||||
if (change_cnt)
|
||||
changed_lines(oap->start.lnum, 0, oap->end.lnum + 1, 0L);
|
||||
|
||||
if (!change_cnt && oap->is_VIsual)
|
||||
/* No change: need to remove the Visual selection */
|
||||
redraw_curbuf_later(INVERTED);
|
||||
|
||||
/* Set '[ mark if something changed. Keep the last end
|
||||
* position from do_addsub(). */
|
||||
if (change_cnt > 0)
|
||||
curbuf->b_op_start = startpos;
|
||||
|
||||
if (change_cnt > p_report)
|
||||
{
|
||||
if (change_cnt == 1)
|
||||
MSG(_("1 line changed"));
|
||||
else
|
||||
smsg((char_u *)_("%ld lines changed"), change_cnt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# define RLADDSUBFIX(ptr) if (curwin->w_p_rl) reverse_line(ptr);
|
||||
#else
|
||||
# define RLADDSUBFIX(ptr)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* add or subtract 'Prenum1' from a number in a line
|
||||
* 'command' is CTRL-A for add, CTRL-X for subtract
|
||||
* Add or subtract 'Prenum1' from a number in a line
|
||||
* op_type is OP_NR_ADD or OP_NR_SUB
|
||||
*
|
||||
* return FAIL for failure, OK otherwise
|
||||
* Returns TRUE if some character was changed.
|
||||
*/
|
||||
int
|
||||
do_addsub(command, Prenum1, g_cmd)
|
||||
int command;
|
||||
static int
|
||||
do_addsub(op_type, pos, length, Prenum1)
|
||||
int op_type;
|
||||
pos_T *pos;
|
||||
int length;
|
||||
linenr_T Prenum1;
|
||||
int g_cmd; /* was g<c-a>/g<c-x> */
|
||||
{
|
||||
int col;
|
||||
char_u *buf1;
|
||||
@@ -5382,11 +5476,9 @@ do_addsub(command, Prenum1, g_cmd)
|
||||
int pre; /* 'X'/'x': hex; '0': octal; 'B'/'b': bin */
|
||||
static int hexupper = FALSE; /* 0xABC */
|
||||
unsigned long n;
|
||||
unsigned long offset = 0; /* line offset for Ctrl_V mode */
|
||||
long_u oldn;
|
||||
char_u *ptr;
|
||||
int c;
|
||||
int length = 0; /* character length of the number */
|
||||
int todel;
|
||||
int dohex;
|
||||
int dooct;
|
||||
@@ -5397,68 +5489,29 @@ do_addsub(command, Prenum1, g_cmd)
|
||||
int negative = FALSE;
|
||||
int was_positive = TRUE;
|
||||
int visual = VIsual_active;
|
||||
int i;
|
||||
int lnum = curwin->w_cursor.lnum;
|
||||
int lnume = curwin->w_cursor.lnum;
|
||||
int startcol = 0;
|
||||
int did_change = FALSE;
|
||||
pos_T t = curwin->w_cursor;
|
||||
pos_T save_cursor = curwin->w_cursor;
|
||||
int maxlen = 0;
|
||||
int pos = 0;
|
||||
int bit = 0;
|
||||
int bits = sizeof(unsigned long) * 8;
|
||||
pos_T startpos;
|
||||
pos_T endpos;
|
||||
|
||||
dohex = (vim_strchr(curbuf->b_p_nf, 'x') != NULL); /* "heX" */
|
||||
dooct = (vim_strchr(curbuf->b_p_nf, 'o') != NULL); /* "Octal" */
|
||||
dobin = (vim_strchr(curbuf->b_p_nf, 'b') != NULL); /* "Bin" */
|
||||
doalp = (vim_strchr(curbuf->b_p_nf, 'p') != NULL); /* "alPha" */
|
||||
|
||||
curwin->w_cursor = *pos;
|
||||
ptr = ml_get(pos->lnum);
|
||||
col = pos->col;
|
||||
|
||||
if (*ptr == NUL)
|
||||
goto theend;
|
||||
|
||||
/*
|
||||
* First check if we are on a hexadecimal number, after the "0x".
|
||||
*/
|
||||
col = curwin->w_cursor.col;
|
||||
if (VIsual_active)
|
||||
if (!VIsual_active)
|
||||
{
|
||||
if (lt(curwin->w_cursor, VIsual))
|
||||
{
|
||||
curwin->w_cursor = VIsual;
|
||||
VIsual = t;
|
||||
}
|
||||
|
||||
ptr = ml_get(VIsual.lnum);
|
||||
RLADDSUBFIX(ptr);
|
||||
if (VIsual_mode == 'V')
|
||||
{
|
||||
VIsual.col = 0;
|
||||
curwin->w_cursor.col = (colnr_T)STRLEN(ptr);
|
||||
}
|
||||
else if (VIsual_mode == Ctrl_V && VIsual.col > curwin->w_cursor.col)
|
||||
{
|
||||
t = VIsual;
|
||||
VIsual.col = curwin->w_cursor.col;
|
||||
curwin->w_cursor.col = t.col;
|
||||
}
|
||||
|
||||
/* store visual area for 'gv' */
|
||||
curbuf->b_visual.vi_start = VIsual;
|
||||
curbuf->b_visual.vi_end = curwin->w_cursor;
|
||||
curbuf->b_visual.vi_mode = VIsual_mode;
|
||||
curbuf->b_visual.vi_curswant = curwin->w_curswant;
|
||||
|
||||
if (VIsual_mode != 'v')
|
||||
startcol = VIsual.col < curwin->w_cursor.col ? VIsual.col
|
||||
: curwin->w_cursor.col;
|
||||
else
|
||||
startcol = VIsual.col;
|
||||
col = startcol;
|
||||
lnum = VIsual.lnum;
|
||||
lnume = curwin->w_cursor.lnum;
|
||||
}
|
||||
else
|
||||
{
|
||||
ptr = ml_get_curline();
|
||||
RLADDSUBFIX(ptr);
|
||||
|
||||
if (dobin)
|
||||
while (col > 0 && vim_isbdigit(ptr[col]))
|
||||
--col;
|
||||
@@ -5478,7 +5531,7 @@ do_addsub(command, Prenum1, g_cmd)
|
||||
|
||||
/* In case of binary/hexadecimal pattern overlap match, rescan */
|
||||
|
||||
col = curwin->w_cursor.col;
|
||||
col = pos->col;
|
||||
|
||||
while (col > 0 && vim_isdigit(ptr[col]))
|
||||
col--;
|
||||
@@ -5505,7 +5558,7 @@ do_addsub(command, Prenum1, g_cmd)
|
||||
/*
|
||||
* Search forward and then backward to find the start of number.
|
||||
*/
|
||||
col = curwin->w_cursor.col;
|
||||
col = pos->col;
|
||||
|
||||
while (ptr[col] != NUL
|
||||
&& !vim_isdigit(ptr[col])
|
||||
@@ -5519,308 +5572,264 @@ do_addsub(command, Prenum1, g_cmd)
|
||||
}
|
||||
}
|
||||
|
||||
for (i = lnum; i <= lnume; i++)
|
||||
{
|
||||
colnr_T stop = 0;
|
||||
|
||||
t = curwin->w_cursor;
|
||||
curwin->w_cursor.lnum = i;
|
||||
ptr = ml_get_curline();
|
||||
RLADDSUBFIX(ptr);
|
||||
if ((int)STRLEN(ptr) <= col)
|
||||
/* try again on next line */
|
||||
continue;
|
||||
if (visual)
|
||||
{
|
||||
if (VIsual_mode == 'v'
|
||||
&& i == lnume)
|
||||
stop = curwin->w_cursor.col;
|
||||
else if (VIsual_mode == Ctrl_V
|
||||
&& curbuf->b_visual.vi_curswant != MAXCOL)
|
||||
stop = curwin->w_cursor.col;
|
||||
|
||||
while (ptr[col] != NUL
|
||||
&& !vim_isdigit(ptr[col])
|
||||
&& !(doalp && ASCII_ISALPHA(ptr[col])))
|
||||
{
|
||||
if (col > 0 && col == stop)
|
||||
break;
|
||||
++col;
|
||||
}
|
||||
|
||||
if (col > startcol && ptr[col - 1] == '-')
|
||||
{
|
||||
negative = TRUE;
|
||||
was_positive = FALSE;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* If a number was found, and saving for undo works, replace the number.
|
||||
*/
|
||||
firstdigit = ptr[col];
|
||||
if ((!VIM_ISDIGIT(firstdigit) && !(doalp && ASCII_ISALPHA(firstdigit)))
|
||||
|| u_save_cursor() != OK)
|
||||
{
|
||||
if (lnum < lnume)
|
||||
{
|
||||
if (visual && VIsual_mode != Ctrl_V)
|
||||
col = 0;
|
||||
else
|
||||
col = startcol;
|
||||
/* Try again on next line */
|
||||
continue;
|
||||
}
|
||||
beep_flush();
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
if (doalp && ASCII_ISALPHA(firstdigit))
|
||||
{
|
||||
/* decrement or increment alphabetic character */
|
||||
if (command == Ctrl_X)
|
||||
{
|
||||
if (CharOrd(firstdigit) < Prenum1)
|
||||
{
|
||||
if (isupper(firstdigit))
|
||||
firstdigit = 'A';
|
||||
else
|
||||
firstdigit = 'a';
|
||||
}
|
||||
else
|
||||
#ifdef EBCDIC
|
||||
firstdigit = EBCDIC_CHAR_ADD(firstdigit, -Prenum1);
|
||||
#else
|
||||
firstdigit -= Prenum1;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
if (26 - CharOrd(firstdigit) - 1 < Prenum1)
|
||||
{
|
||||
if (isupper(firstdigit))
|
||||
firstdigit = 'Z';
|
||||
else
|
||||
firstdigit = 'z';
|
||||
}
|
||||
else
|
||||
#ifdef EBCDIC
|
||||
firstdigit = EBCDIC_CHAR_ADD(firstdigit, Prenum1);
|
||||
#else
|
||||
firstdigit += Prenum1;
|
||||
#endif
|
||||
}
|
||||
curwin->w_cursor.col = col;
|
||||
did_change = TRUE;
|
||||
(void)del_char(FALSE);
|
||||
ins_char(firstdigit);
|
||||
curwin->w_cursor.col = col;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (col > 0 && ptr[col - 1] == '-' && !visual)
|
||||
{
|
||||
/* negative number */
|
||||
--col;
|
||||
negative = TRUE;
|
||||
}
|
||||
/* get the number value (unsigned) */
|
||||
if (visual && VIsual_mode != 'V')
|
||||
{
|
||||
if (VIsual_mode == 'v')
|
||||
{
|
||||
if (i == lnum)
|
||||
maxlen = (lnum == lnume
|
||||
? curwin->w_cursor.col - col + 1
|
||||
: (int)STRLEN(ptr) - col);
|
||||
else
|
||||
maxlen = (i == lnume ? curwin->w_cursor.col - col + 1
|
||||
: (int)STRLEN(ptr) - col);
|
||||
}
|
||||
else if (VIsual_mode == Ctrl_V)
|
||||
maxlen = (curbuf->b_visual.vi_curswant == MAXCOL
|
||||
? (int)STRLEN(ptr) - col
|
||||
: curwin->w_cursor.col - col + 1);
|
||||
}
|
||||
|
||||
vim_str2nr(ptr + col, &pre, &length,
|
||||
0 + (dobin ? STR2NR_BIN : 0)
|
||||
+ (dooct ? STR2NR_OCT : 0)
|
||||
+ (dohex ? STR2NR_HEX : 0),
|
||||
NULL, &n, maxlen);
|
||||
|
||||
/* ignore leading '-' for hex and octal and bin numbers */
|
||||
if (pre && negative)
|
||||
{
|
||||
++col;
|
||||
--length;
|
||||
negative = FALSE;
|
||||
}
|
||||
|
||||
/* add or subtract */
|
||||
subtract = FALSE;
|
||||
if (command == Ctrl_X)
|
||||
subtract ^= TRUE;
|
||||
if (negative)
|
||||
subtract ^= TRUE;
|
||||
|
||||
oldn = n;
|
||||
if (subtract)
|
||||
n -= (unsigned long)Prenum1;
|
||||
else
|
||||
n += (unsigned long)Prenum1;
|
||||
|
||||
/* handle wraparound for decimal numbers */
|
||||
if (!pre)
|
||||
{
|
||||
if (subtract)
|
||||
{
|
||||
if (n > oldn)
|
||||
{
|
||||
n = 1 + (n ^ (unsigned long)-1);
|
||||
negative ^= TRUE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* add */
|
||||
if (n < oldn)
|
||||
{
|
||||
n = (n ^ (unsigned long)-1);
|
||||
negative ^= TRUE;
|
||||
}
|
||||
}
|
||||
if (n == 0)
|
||||
negative = FALSE;
|
||||
}
|
||||
|
||||
if (visual && !was_positive && !negative && col > 0)
|
||||
{
|
||||
/* need to remove the '-' */
|
||||
col--;
|
||||
length++;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Delete the old number.
|
||||
*/
|
||||
curwin->w_cursor.col = col;
|
||||
did_change = TRUE;
|
||||
todel = length;
|
||||
c = gchar_cursor();
|
||||
|
||||
/*
|
||||
* Don't include the '-' in the length, only the length of the
|
||||
* part after it is kept the same.
|
||||
*/
|
||||
if (c == '-')
|
||||
--length;
|
||||
while (todel-- > 0)
|
||||
{
|
||||
if (c < 0x100 && isalpha(c))
|
||||
{
|
||||
if (isupper(c))
|
||||
hexupper = TRUE;
|
||||
else
|
||||
hexupper = FALSE;
|
||||
}
|
||||
/* del_char() will mark line needing displaying */
|
||||
(void)del_char(FALSE);
|
||||
c = gchar_cursor();
|
||||
}
|
||||
|
||||
/*
|
||||
* Prepare the leading characters in buf1[].
|
||||
* When there are many leading zeros it could be very long.
|
||||
* Allocate a bit too much.
|
||||
*/
|
||||
buf1 = alloc((unsigned)length + NUMBUFLEN);
|
||||
if (buf1 == NULL)
|
||||
return FAIL;
|
||||
ptr = buf1;
|
||||
if (negative && (!visual || (visual && was_positive)))
|
||||
{
|
||||
*ptr++ = '-';
|
||||
}
|
||||
if (pre)
|
||||
{
|
||||
*ptr++ = '0';
|
||||
--length;
|
||||
}
|
||||
if (pre == 'b' || pre == 'B' ||
|
||||
pre == 'x' || pre == 'X')
|
||||
{
|
||||
*ptr++ = pre;
|
||||
--length;
|
||||
}
|
||||
|
||||
/*
|
||||
* Put the number characters in buf2[].
|
||||
*/
|
||||
if (pre == 'b' || pre == 'B')
|
||||
{
|
||||
/* leading zeros */
|
||||
for (bit = bits; bit > 0; bit--)
|
||||
if ((n >> (bit - 1)) & 0x1) break;
|
||||
|
||||
for (pos = 0; bit > 0; bit--)
|
||||
buf2[pos++] = ((n >> (bit - 1)) & 0x1) ? '1' : '0';
|
||||
|
||||
buf2[pos] = '\0';
|
||||
}
|
||||
else if (pre == 0)
|
||||
sprintf((char *)buf2, "%lu", n);
|
||||
else if (pre == '0')
|
||||
sprintf((char *)buf2, "%lo", n);
|
||||
else if (pre && hexupper)
|
||||
sprintf((char *)buf2, "%lX", n);
|
||||
else
|
||||
sprintf((char *)buf2, "%lx", n);
|
||||
length -= (int)STRLEN(buf2);
|
||||
|
||||
/*
|
||||
* Adjust number of zeros to the new number of digits, so the
|
||||
* total length of the number remains the same.
|
||||
* Don't do this when
|
||||
* the result may look like an octal number.
|
||||
*/
|
||||
if (firstdigit == '0' && !(dooct && pre == 0))
|
||||
while (length-- > 0)
|
||||
*ptr++ = '0';
|
||||
*ptr = NUL;
|
||||
STRCAT(buf1, buf2);
|
||||
ins_str(buf1); /* insert the new number */
|
||||
vim_free(buf1);
|
||||
if (lnum < lnume)
|
||||
curwin->w_cursor.col = t.col;
|
||||
else if (did_change && curwin->w_cursor.col)
|
||||
--curwin->w_cursor.col;
|
||||
}
|
||||
|
||||
if (g_cmd)
|
||||
{
|
||||
offset = (unsigned long)Prenum1;
|
||||
g_cmd = 0;
|
||||
}
|
||||
/* reset */
|
||||
subtract = FALSE;
|
||||
negative = FALSE;
|
||||
was_positive = TRUE;
|
||||
if (visual && VIsual_mode == Ctrl_V)
|
||||
col = startcol;
|
||||
else
|
||||
col = 0;
|
||||
Prenum1 += offset;
|
||||
curwin->w_set_curswant = TRUE;
|
||||
#ifdef FEAT_RIGHTLEFT
|
||||
ptr = ml_get_buf(curbuf, curwin->w_cursor.lnum, TRUE);
|
||||
RLADDSUBFIX(ptr);
|
||||
#endif
|
||||
}
|
||||
if (visual)
|
||||
/* cursor at the top of the selection */
|
||||
curwin->w_cursor = VIsual;
|
||||
return OK;
|
||||
{
|
||||
while (ptr[col] != NUL && length > 0
|
||||
&& !vim_isdigit(ptr[col])
|
||||
&& !(doalp && ASCII_ISALPHA(ptr[col])))
|
||||
{
|
||||
++col;
|
||||
--length;
|
||||
}
|
||||
|
||||
if (length == 0)
|
||||
goto theend;
|
||||
|
||||
if (col > pos->col && ptr[col - 1] == '-')
|
||||
{
|
||||
negative = TRUE;
|
||||
was_positive = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* If a number was found, and saving for undo works, replace the number.
|
||||
*/
|
||||
firstdigit = ptr[col];
|
||||
if (!VIM_ISDIGIT(firstdigit) && !(doalp && ASCII_ISALPHA(firstdigit)))
|
||||
{
|
||||
beep_flush();
|
||||
goto theend;
|
||||
}
|
||||
|
||||
if (doalp && ASCII_ISALPHA(firstdigit))
|
||||
{
|
||||
/* decrement or increment alphabetic character */
|
||||
if (op_type == OP_NR_SUB)
|
||||
{
|
||||
if (CharOrd(firstdigit) < Prenum1)
|
||||
{
|
||||
if (isupper(firstdigit))
|
||||
firstdigit = 'A';
|
||||
else
|
||||
firstdigit = 'a';
|
||||
}
|
||||
else
|
||||
#ifdef EBCDIC
|
||||
firstdigit = EBCDIC_CHAR_ADD(firstdigit, -Prenum1);
|
||||
#else
|
||||
firstdigit -= Prenum1;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
if (26 - CharOrd(firstdigit) - 1 < Prenum1)
|
||||
{
|
||||
if (isupper(firstdigit))
|
||||
firstdigit = 'Z';
|
||||
else
|
||||
firstdigit = 'z';
|
||||
}
|
||||
else
|
||||
#ifdef EBCDIC
|
||||
firstdigit = EBCDIC_CHAR_ADD(firstdigit, Prenum1);
|
||||
#else
|
||||
firstdigit += Prenum1;
|
||||
#endif
|
||||
}
|
||||
curwin->w_cursor.col = col;
|
||||
if (!did_change)
|
||||
startpos = curwin->w_cursor;
|
||||
did_change = TRUE;
|
||||
(void)del_char(FALSE);
|
||||
ins_char(firstdigit);
|
||||
endpos = curwin->w_cursor;
|
||||
curwin->w_cursor.col = col;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (col > 0 && ptr[col - 1] == '-' && !visual)
|
||||
{
|
||||
/* negative number */
|
||||
--col;
|
||||
negative = TRUE;
|
||||
}
|
||||
/* get the number value (unsigned) */
|
||||
if (visual && VIsual_mode != 'V')
|
||||
maxlen = (curbuf->b_visual.vi_curswant == MAXCOL
|
||||
? (int)STRLEN(ptr) - col
|
||||
: length);
|
||||
|
||||
vim_str2nr(ptr + col, &pre, &length,
|
||||
0 + (dobin ? STR2NR_BIN : 0)
|
||||
+ (dooct ? STR2NR_OCT : 0)
|
||||
+ (dohex ? STR2NR_HEX : 0),
|
||||
NULL, &n, maxlen);
|
||||
|
||||
/* ignore leading '-' for hex and octal and bin numbers */
|
||||
if (pre && negative)
|
||||
{
|
||||
++col;
|
||||
--length;
|
||||
negative = FALSE;
|
||||
}
|
||||
/* add or subtract */
|
||||
subtract = FALSE;
|
||||
if (op_type == OP_NR_SUB)
|
||||
subtract ^= TRUE;
|
||||
if (negative)
|
||||
subtract ^= TRUE;
|
||||
|
||||
oldn = n;
|
||||
if (subtract)
|
||||
n -= (unsigned long)Prenum1;
|
||||
else
|
||||
n += (unsigned long)Prenum1;
|
||||
/* handle wraparound for decimal numbers */
|
||||
if (!pre)
|
||||
{
|
||||
if (subtract)
|
||||
{
|
||||
if (n > oldn)
|
||||
{
|
||||
n = 1 + (n ^ (unsigned long)-1);
|
||||
negative ^= TRUE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* add */
|
||||
if (n < oldn)
|
||||
{
|
||||
n = (n ^ (unsigned long)-1);
|
||||
negative ^= TRUE;
|
||||
}
|
||||
}
|
||||
if (n == 0)
|
||||
negative = FALSE;
|
||||
}
|
||||
|
||||
if (visual && !was_positive && !negative && col > 0)
|
||||
{
|
||||
/* need to remove the '-' */
|
||||
col--;
|
||||
length++;
|
||||
}
|
||||
|
||||
/*
|
||||
* Delete the old number.
|
||||
*/
|
||||
curwin->w_cursor.col = col;
|
||||
if (!did_change)
|
||||
startpos = curwin->w_cursor;
|
||||
did_change = TRUE;
|
||||
todel = length;
|
||||
c = gchar_cursor();
|
||||
/*
|
||||
* Don't include the '-' in the length, only the length of the
|
||||
* part after it is kept the same.
|
||||
*/
|
||||
if (c == '-')
|
||||
--length;
|
||||
while (todel-- > 0)
|
||||
{
|
||||
if (c < 0x100 && isalpha(c))
|
||||
{
|
||||
if (isupper(c))
|
||||
hexupper = TRUE;
|
||||
else
|
||||
hexupper = FALSE;
|
||||
}
|
||||
/* del_char() will mark line needing displaying */
|
||||
(void)del_char(FALSE);
|
||||
c = gchar_cursor();
|
||||
}
|
||||
|
||||
/*
|
||||
* Prepare the leading characters in buf1[].
|
||||
* When there are many leading zeros it could be very long.
|
||||
* Allocate a bit too much.
|
||||
*/
|
||||
buf1 = alloc((unsigned)length + NUMBUFLEN);
|
||||
if (buf1 == NULL)
|
||||
goto theend;
|
||||
ptr = buf1;
|
||||
if (negative && (!visual || (visual && was_positive)))
|
||||
{
|
||||
*ptr++ = '-';
|
||||
}
|
||||
if (pre)
|
||||
{
|
||||
*ptr++ = '0';
|
||||
--length;
|
||||
}
|
||||
if (pre == 'b' || pre == 'B' ||
|
||||
pre == 'x' || pre == 'X')
|
||||
{
|
||||
*ptr++ = pre;
|
||||
--length;
|
||||
}
|
||||
|
||||
/*
|
||||
* Put the number characters in buf2[].
|
||||
*/
|
||||
if (pre == 'b' || pre == 'B')
|
||||
{
|
||||
int i;
|
||||
int bit = 0;
|
||||
int bits = sizeof(unsigned long) * 8;
|
||||
|
||||
/* leading zeros */
|
||||
for (bit = bits; bit > 0; bit--)
|
||||
if ((n >> (bit - 1)) & 0x1) break;
|
||||
|
||||
for (i = 0; bit > 0; bit--)
|
||||
buf2[i++] = ((n >> (bit - 1)) & 0x1) ? '1' : '0';
|
||||
|
||||
buf2[i] = '\0';
|
||||
}
|
||||
else if (pre == 0)
|
||||
sprintf((char *)buf2, "%lu", n);
|
||||
else if (pre == '0')
|
||||
sprintf((char *)buf2, "%lo", n);
|
||||
else if (pre && hexupper)
|
||||
sprintf((char *)buf2, "%lX", n);
|
||||
else
|
||||
sprintf((char *)buf2, "%lx", n);
|
||||
length -= (int)STRLEN(buf2);
|
||||
|
||||
/*
|
||||
* Adjust number of zeros to the new number of digits, so the
|
||||
* total length of the number remains the same.
|
||||
* Don't do this when
|
||||
* the result may look like an octal number.
|
||||
*/
|
||||
if (firstdigit == '0' && !(dooct && pre == 0))
|
||||
while (length-- > 0)
|
||||
*ptr++ = '0';
|
||||
*ptr = NUL;
|
||||
STRCAT(buf1, buf2);
|
||||
ins_str(buf1); /* insert the new number */
|
||||
vim_free(buf1);
|
||||
endpos = curwin->w_cursor;
|
||||
if (did_change && curwin->w_cursor.col)
|
||||
--curwin->w_cursor.col;
|
||||
}
|
||||
|
||||
if (did_change)
|
||||
{
|
||||
/* set the '[ and '] marks */
|
||||
curbuf->b_op_start = startpos;
|
||||
curbuf->b_op_end = endpos;
|
||||
if (curbuf->b_op_end.col > 0)
|
||||
--curbuf->b_op_end.col;
|
||||
}
|
||||
|
||||
theend:
|
||||
if (visual)
|
||||
curwin->w_cursor = save_cursor;
|
||||
|
||||
return did_change;
|
||||
}
|
||||
|
||||
#ifdef FEAT_VIMINFO
|
||||
|
||||
+21
-10
@@ -1812,10 +1812,11 @@ static struct vimoption
|
||||
{"loadplugins", "lpl", P_BOOL|P_VI_DEF,
|
||||
(char_u *)&p_lpl, PV_NONE,
|
||||
{(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
|
||||
#if defined(DYNAMIC_LUA) && !defined(WIN3264)
|
||||
#if defined(DYNAMIC_LUA)
|
||||
{"luadll", NULL, P_STRING|P_VI_DEF|P_SECURE,
|
||||
(char_u *)&p_luadll, PV_NONE,
|
||||
{(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
|
||||
{(char_u *)DYNAMIC_LUA_DLL, (char_u *)0L}
|
||||
SCRIPTID_INIT},
|
||||
#endif
|
||||
#ifdef FEAT_GUI_MAC
|
||||
{"macatsui", NULL, P_BOOL|P_VI_DEF|P_RCLR,
|
||||
@@ -2064,10 +2065,11 @@ static struct vimoption
|
||||
# endif
|
||||
#endif
|
||||
(char_u *)0L} SCRIPTID_INIT},
|
||||
#if defined(DYNAMIC_PERL) && !defined(WIN3264)
|
||||
#if defined(DYNAMIC_PERL)
|
||||
{"perldll", NULL, P_STRING|P_VI_DEF|P_SECURE,
|
||||
(char_u *)&p_perldll, PV_NONE,
|
||||
{(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
|
||||
{(char_u *)DYNAMIC_PERL_DLL, (char_u *)0L}
|
||||
SCRIPTID_INIT},
|
||||
#endif
|
||||
{"preserveindent", "pi", P_BOOL|P_VI_DEF|P_VIM,
|
||||
(char_u *)&p_pi, PV_PI,
|
||||
@@ -2174,15 +2176,17 @@ static struct vimoption
|
||||
(char_u *)NULL, PV_NONE,
|
||||
#endif
|
||||
{(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
|
||||
#if defined(DYNAMIC_PYTHON3) && !defined(WIN3264)
|
||||
#if defined(DYNAMIC_PYTHON3)
|
||||
{"pythonthreedll", NULL, P_STRING|P_VI_DEF|P_SECURE,
|
||||
(char_u *)&p_py3dll, PV_NONE,
|
||||
{(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
|
||||
{(char_u *)DYNAMIC_PYTHON3_DLL, (char_u *)0L}
|
||||
SCRIPTID_INIT},
|
||||
#endif
|
||||
#if defined(DYNAMIC_PYTHON) && !defined(WIN3264)
|
||||
#if defined(DYNAMIC_PYTHON)
|
||||
{"pythondll", NULL, P_STRING|P_VI_DEF|P_SECURE,
|
||||
(char_u *)&p_pydll, PV_NONE,
|
||||
{(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
|
||||
{(char_u *)DYNAMIC_PYTHON_DLL, (char_u *)0L}
|
||||
SCRIPTID_INIT},
|
||||
#endif
|
||||
{"quoteescape", "qe", P_STRING|P_ALLOCED|P_VI_DEF,
|
||||
#ifdef FEAT_TEXTOBJ
|
||||
@@ -2257,10 +2261,11 @@ static struct vimoption
|
||||
{(char_u *)NULL, (char_u *)0L}
|
||||
#endif
|
||||
SCRIPTID_INIT},
|
||||
#if defined(DYNAMIC_RUBY) && !defined(WIN3264)
|
||||
#if defined(DYNAMIC_RUBY)
|
||||
{"rubydll", NULL, P_STRING|P_VI_DEF|P_SECURE,
|
||||
(char_u *)&p_rubydll, PV_NONE,
|
||||
{(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
|
||||
{(char_u *)DYNAMIC_RUBY_DLL, (char_u *)0L}
|
||||
SCRIPTID_INIT},
|
||||
#endif
|
||||
{"ruler", "ru", P_BOOL|P_VI_DEF|P_VIM|P_RSTAT,
|
||||
#ifdef FEAT_CMDL_INFO
|
||||
@@ -2652,6 +2657,12 @@ static struct vimoption
|
||||
{"tagstack", "tgst", P_BOOL|P_VI_DEF,
|
||||
(char_u *)&p_tgst, PV_NONE,
|
||||
{(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
|
||||
#if defined(DYNAMIC_TCL)
|
||||
{"tcldll", NULL, P_STRING|P_VI_DEF|P_SECURE,
|
||||
(char_u *)&p_tcldll, PV_NONE,
|
||||
{(char_u *)DYNAMIC_TCL_DLL, (char_u *)0L}
|
||||
SCRIPTID_INIT},
|
||||
#endif
|
||||
{"term", NULL, P_STRING|P_EXPAND|P_NODEFAULT|P_NO_MKRC|P_VI_DEF|P_RALL,
|
||||
(char_u *)&T_NAME, PV_NONE,
|
||||
{(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
|
||||
|
||||
+8
-5
@@ -639,7 +639,7 @@ EXTERN char_u *p_lcs; /* 'listchars' */
|
||||
|
||||
EXTERN int p_lz; /* 'lazyredraw' */
|
||||
EXTERN int p_lpl; /* 'loadplugins' */
|
||||
#if defined(DYNAMIC_LUA) && !defined(WIN3264)
|
||||
#if defined(DYNAMIC_LUA)
|
||||
EXTERN char_u *p_luadll; /* 'luadll' */
|
||||
#endif
|
||||
#ifdef FEAT_GUI_MAC
|
||||
@@ -701,13 +701,13 @@ EXTERN char_u *p_path; /* 'path' */
|
||||
#ifdef FEAT_SEARCHPATH
|
||||
EXTERN char_u *p_cdpath; /* 'cdpath' */
|
||||
#endif
|
||||
#if defined(DYNAMIC_PERL) && !defined(WIN3264)
|
||||
#if defined(DYNAMIC_PERL)
|
||||
EXTERN char_u *p_perldll; /* 'perldll' */
|
||||
#endif
|
||||
#if defined(DYNAMIC_PYTHON3) && !defined(WIN3264)
|
||||
#if defined(DYNAMIC_PYTHON3)
|
||||
EXTERN char_u *p_py3dll; /* 'pythonthreedll' */
|
||||
#endif
|
||||
#if defined(DYNAMIC_PYTHON) && !defined(WIN3264)
|
||||
#if defined(DYNAMIC_PYTHON)
|
||||
EXTERN char_u *p_pydll; /* 'pythondll' */
|
||||
#endif
|
||||
#ifdef FEAT_RELTIME
|
||||
@@ -729,7 +729,7 @@ EXTERN int p_rs; /* 'restorescreen' */
|
||||
EXTERN int p_ari; /* 'allowrevins' */
|
||||
EXTERN int p_ri; /* 'revins' */
|
||||
#endif
|
||||
#if defined(DYNAMIC_RUBY) && !defined(WIN3264)
|
||||
#if defined(DYNAMIC_RUBY)
|
||||
EXTERN char_u *p_rubydll; /* 'rubydll' */
|
||||
#endif
|
||||
#ifdef FEAT_CMDL_INFO
|
||||
@@ -847,6 +847,9 @@ EXTERN long p_tl; /* 'taglength' */
|
||||
EXTERN int p_tr; /* 'tagrelative' */
|
||||
EXTERN char_u *p_tags; /* 'tags' */
|
||||
EXTERN int p_tgst; /* 'tagstack' */
|
||||
#if defined(DYNAMIC_TCL)
|
||||
EXTERN char_u *p_tcldll; /* 'tcldll' */
|
||||
#endif
|
||||
#ifdef FEAT_ARABIC
|
||||
EXTERN int p_tbidi; /* 'termbidi' */
|
||||
#endif
|
||||
|
||||
+3
-1
@@ -20,10 +20,12 @@ void adjust_cursor_col __ARGS((void));
|
||||
int leftcol_changed __ARGS((void));
|
||||
void vim_mem_profile_dump __ARGS((void));
|
||||
char_u *alloc __ARGS((unsigned size));
|
||||
char_u *alloc_id __ARGS((unsigned size, alloc_id_T id));
|
||||
char_u *alloc_clear __ARGS((unsigned size));
|
||||
char_u *alloc_check __ARGS((unsigned size));
|
||||
char_u *lalloc_clear __ARGS((long_u size, int message));
|
||||
char_u *lalloc __ARGS((long_u size, int message));
|
||||
char_u *lalloc_id __ARGS((long_u size, int message, alloc_id_T id));
|
||||
void *mem_realloc __ARGS((void *ptr, size_t size));
|
||||
void do_outofmem_msg __ARGS((long_u size));
|
||||
void free_all_mem __ARGS((void));
|
||||
@@ -103,7 +105,7 @@ int get4c __ARGS((FILE *fd));
|
||||
time_t get8ctime __ARGS((FILE *fd));
|
||||
char_u *read_string __ARGS((FILE *fd, int cnt));
|
||||
int put_bytes __ARGS((FILE *fd, long_u nr, int len));
|
||||
void put_time __ARGS((FILE *fd, time_t the_time));
|
||||
int put_time __ARGS((FILE *fd, time_t the_time));
|
||||
void time_to_bytes __ARGS((time_t the_time, char_u *buf));
|
||||
int has_non_ascii __ARGS((char_u *s));
|
||||
void parse_queued_messages __ARGS((void));
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ void op_formatexpr __ARGS((oparg_T *oap));
|
||||
int fex_format __ARGS((linenr_T lnum, long count, int c));
|
||||
void format_lines __ARGS((linenr_T line_count, int avoid_fex));
|
||||
int paragraph_start __ARGS((linenr_T lnum));
|
||||
int do_addsub __ARGS((int command, linenr_T Prenum1, int g_cmd));
|
||||
void op_addsub __ARGS((oparg_T *oap, linenr_T Prenum1, int g_cmd));
|
||||
int read_viminfo_register __ARGS((vir_T *virp, int force));
|
||||
void write_viminfo_registers __ARGS((FILE *fp));
|
||||
void x11_export_final_selection __ARGS((void));
|
||||
|
||||
+5
-8
@@ -162,9 +162,6 @@ qf_init(wp, efile, errorformat, newlist, qf_title)
|
||||
{
|
||||
qf_info_T *qi = &ql_info;
|
||||
|
||||
if (efile == NULL)
|
||||
return FAIL;
|
||||
|
||||
if (wp != NULL)
|
||||
{
|
||||
qi = ll_get_or_alloc_list(wp);
|
||||
@@ -253,9 +250,9 @@ qf_init_ext(qi, efile, buf, tv, errorformat, newlist, lnumfirst, lnumlast,
|
||||
{'s', ".\\+"}
|
||||
};
|
||||
|
||||
namebuf = alloc(CMDBUFFSIZE + 1);
|
||||
errmsg = alloc(CMDBUFFSIZE + 1);
|
||||
pattern = alloc(CMDBUFFSIZE + 1);
|
||||
namebuf = alloc_id(CMDBUFFSIZE + 1, aid_qf_namebuf);
|
||||
errmsg = alloc_id(CMDBUFFSIZE + 1, aid_qf_errmsg);
|
||||
pattern = alloc_id(CMDBUFFSIZE + 1, aid_qf_pattern);
|
||||
if (namebuf == NULL || errmsg == NULL || pattern == NULL)
|
||||
goto qf_init_end;
|
||||
|
||||
@@ -3465,8 +3462,8 @@ ex_vimgrep(eap)
|
||||
goto theend;
|
||||
}
|
||||
|
||||
dirname_start = alloc(MAXPATHL);
|
||||
dirname_now = alloc(MAXPATHL);
|
||||
dirname_start = alloc_id(MAXPATHL, aid_qf_dirname_start);
|
||||
dirname_now = alloc_id(MAXPATHL, aid_qf_dirname_now);
|
||||
if (dirname_start == NULL || dirname_now == NULL)
|
||||
goto theend;
|
||||
|
||||
|
||||
+146
-10
@@ -59,6 +59,12 @@
|
||||
# define SPELL_PRINTTREE
|
||||
#endif
|
||||
|
||||
/* Use SPELL_COMPRESS_ALLWAYS for debugging: compress the word tree after
|
||||
* adding a word. Only use it for small word lists! */
|
||||
#if 0
|
||||
# define SPELL_COMPRESS_ALLWAYS
|
||||
#endif
|
||||
|
||||
/* Use DEBUG_TRIEWALK to print the changes made in suggest_trie_walk() for a
|
||||
* specific word. */
|
||||
#if 0
|
||||
@@ -177,6 +183,8 @@
|
||||
* <timestamp> 8 bytes time in seconds that must match with .sug file
|
||||
*
|
||||
* sectionID == SN_NOSPLITSUGS: nothing
|
||||
*
|
||||
* sectionID == SN_NOCOMPOUNDSUGS: nothing
|
||||
*
|
||||
* sectionID == SN_WORDS: <word> ...
|
||||
* <word> N bytes NUL terminated common word
|
||||
@@ -501,6 +509,7 @@ struct slang_S
|
||||
garray_T sl_repsal; /* list of fromto_T entries from REPSAL lines */
|
||||
short sl_repsal_first[256]; /* sl_rep_first for REPSAL lines */
|
||||
int sl_nosplitsugs; /* don't suggest splitting a word */
|
||||
int sl_nocompoundsugs; /* don't suggest compounding */
|
||||
|
||||
/* Info from the .sug file. Loaded on demand. */
|
||||
time_t sl_sugtime; /* timestamp for .sug file */
|
||||
@@ -570,6 +579,7 @@ typedef struct langp_S
|
||||
#define SN_WORDS 13 /* common words */
|
||||
#define SN_NOSPLITSUGS 14 /* don't split word for suggestions */
|
||||
#define SN_INFO 15 /* info section */
|
||||
#define SN_NOCOMPOUNDSUGS 16 /* don't compound for suggestions */
|
||||
#define SN_END 255 /* end of sections */
|
||||
|
||||
#define SNF_REQUIRED 1 /* <sectionflags>: required section */
|
||||
@@ -2913,7 +2923,11 @@ spell_load_file(fname, lang, old_lp, silent)
|
||||
break;
|
||||
|
||||
case SN_NOSPLITSUGS:
|
||||
lp->sl_nosplitsugs = TRUE; /* <timestamp> */
|
||||
lp->sl_nosplitsugs = TRUE;
|
||||
break;
|
||||
|
||||
case SN_NOCOMPOUNDSUGS:
|
||||
lp->sl_nocompoundsugs = TRUE;
|
||||
break;
|
||||
|
||||
case SN_COMPOUND:
|
||||
@@ -5005,6 +5019,7 @@ typedef struct spellinfo_S
|
||||
char_u *si_sofoto; /* SOFOTO text */
|
||||
int si_nosugfile; /* NOSUGFILE item found */
|
||||
int si_nosplitsugs; /* NOSPLITSUGS item found */
|
||||
int si_nocompoundsugs; /* NOCOMPOUNDSUGS item found */
|
||||
int si_followup; /* soundsalike: ? */
|
||||
int si_collapse; /* soundsalike: ? */
|
||||
hashtab_T si_commonwords; /* hashtable for common words */
|
||||
@@ -5130,9 +5145,9 @@ spell_print_node(wordnode_T *node, int depth)
|
||||
PRINTSOME(line1, depth, "(%d)", node->wn_nr, 0);
|
||||
PRINTSOME(line2, depth, " ", 0, 0);
|
||||
PRINTSOME(line3, depth, " ", 0, 0);
|
||||
msg(line1);
|
||||
msg(line2);
|
||||
msg(line3);
|
||||
msg((char_u *)line1);
|
||||
msg((char_u *)line2);
|
||||
msg((char_u *)line3);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -5158,9 +5173,9 @@ spell_print_node(wordnode_T *node, int depth)
|
||||
|
||||
if (node->wn_byte == NUL)
|
||||
{
|
||||
msg(line1);
|
||||
msg(line2);
|
||||
msg(line3);
|
||||
msg((char_u *)line1);
|
||||
msg((char_u *)line2);
|
||||
msg((char_u *)line3);
|
||||
}
|
||||
|
||||
/* do the children */
|
||||
@@ -5598,6 +5613,10 @@ spell_read_aff(spin, fname)
|
||||
{
|
||||
spin->si_nosplitsugs = TRUE;
|
||||
}
|
||||
else if (is_aff_rule(items, itemcnt, "NOCOMPOUNDSUGS", 1))
|
||||
{
|
||||
spin->si_nocompoundsugs = TRUE;
|
||||
}
|
||||
else if (is_aff_rule(items, itemcnt, "NOSUGFILE", 1))
|
||||
{
|
||||
spin->si_nosugfile = TRUE;
|
||||
@@ -7621,7 +7640,7 @@ tree_add_word(spin, word, root, flags, region, affixID)
|
||||
node = *prev;
|
||||
}
|
||||
#ifdef SPELL_PRINTTREE
|
||||
smsg("Added \"%s\"", word);
|
||||
smsg((char_u *)"Added \"%s\"", word);
|
||||
spell_print_tree(root->wn_sibling);
|
||||
#endif
|
||||
|
||||
@@ -7647,7 +7666,7 @@ tree_add_word(spin, word, root, flags, region, affixID)
|
||||
* (si_compress_cnt == 1) and the number of free nodes drops below the
|
||||
* maximum word length.
|
||||
*/
|
||||
#ifndef SPELL_PRINTTREE
|
||||
#ifndef SPELL_COMPRESS_ALLWAYS
|
||||
if (spin->si_compress_cnt == 1
|
||||
? spin->si_free_count < MAXWLEN
|
||||
: spin->si_blocks_cnt >= compress_start)
|
||||
@@ -8295,6 +8314,16 @@ write_vim_spell(spin, fname)
|
||||
put_bytes(fd, (long_u)0, 4); /* <sectionlen> */
|
||||
}
|
||||
|
||||
/* SN_NOCOMPUNDSUGS: nothing
|
||||
* This is used to notify that no suggestions with compounds are to be
|
||||
* made. */
|
||||
if (spin->si_nocompoundsugs)
|
||||
{
|
||||
putc(SN_NOCOMPOUNDSUGS, fd); /* <sectionID> */
|
||||
putc(0, fd); /* <sectionflags> */
|
||||
put_bytes(fd, (long_u)0, 4); /* <sectionlen> */
|
||||
}
|
||||
|
||||
/* SN_COMPOUND: compound info.
|
||||
* We don't mark it required, when not supported all compound words will
|
||||
* be bad words. */
|
||||
@@ -11278,6 +11307,56 @@ suggest_try_special(su)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Change the 0 to 1 to measure how much time is spent in each state.
|
||||
* Output is dumped in "suggestprof".
|
||||
*/
|
||||
#if 0
|
||||
# define SUGGEST_PROFILE
|
||||
proftime_T current;
|
||||
proftime_T total;
|
||||
proftime_T times[STATE_FINAL + 1];
|
||||
long counts[STATE_FINAL + 1];
|
||||
|
||||
static void
|
||||
prof_init(void)
|
||||
{
|
||||
for (int i = 0; i <= STATE_FINAL; ++i)
|
||||
{
|
||||
profile_zero(×[i]);
|
||||
counts[i] = 0;
|
||||
}
|
||||
profile_start(¤t);
|
||||
profile_start(&total);
|
||||
}
|
||||
|
||||
/* call before changing state */
|
||||
static void
|
||||
prof_store(state_T state)
|
||||
{
|
||||
profile_end(¤t);
|
||||
profile_add(×[state], ¤t);
|
||||
++counts[state];
|
||||
profile_start(¤t);
|
||||
}
|
||||
# define PROF_STORE(state) prof_store(state);
|
||||
|
||||
static void
|
||||
prof_report(char *name)
|
||||
{
|
||||
FILE *fd = fopen("suggestprof", "a");
|
||||
|
||||
profile_end(&total);
|
||||
fprintf(fd, "-----------------------\n");
|
||||
fprintf(fd, "%s: %s\n", name, profile_msg(&total));
|
||||
for (int i = 0; i <= STATE_FINAL; ++i)
|
||||
fprintf(fd, "%d: %s (%ld)\n", i, profile_msg(×[i]), counts[i]);
|
||||
fclose(fd);
|
||||
}
|
||||
#else
|
||||
# define PROF_STORE(state)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Try finding suggestions by adding/removing/swapping letters.
|
||||
*/
|
||||
@@ -11309,7 +11388,13 @@ suggest_try_change(su)
|
||||
continue;
|
||||
|
||||
/* Try it for this language. Will add possible suggestions. */
|
||||
#ifdef SUGGEST_PROFILE
|
||||
prof_init();
|
||||
#endif
|
||||
suggest_trie_walk(su, lp, fword, FALSE);
|
||||
#ifdef SUGGEST_PROFILE
|
||||
prof_report("try_change");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11467,6 +11552,7 @@ suggest_trie_walk(su, lp, fword, soundfold)
|
||||
|
||||
/* Always past NUL bytes now. */
|
||||
n = (int)sp->ts_state;
|
||||
PROF_STORE(sp->ts_state)
|
||||
sp->ts_state = STATE_ENDNUL;
|
||||
sp->ts_save_badflags = su->su_badflags;
|
||||
|
||||
@@ -11510,6 +11596,7 @@ suggest_trie_walk(su, lp, fword, soundfold)
|
||||
if (sp->ts_curi > len || byts[arridx] != 0)
|
||||
{
|
||||
/* Past bytes in node and/or past NUL bytes. */
|
||||
PROF_STORE(sp->ts_state)
|
||||
sp->ts_state = STATE_ENDNUL;
|
||||
sp->ts_save_badflags = su->su_badflags;
|
||||
break;
|
||||
@@ -11825,6 +11912,7 @@ suggest_trie_walk(su, lp, fword, soundfold)
|
||||
*/
|
||||
try_compound = FALSE;
|
||||
if (!soundfold
|
||||
&& !slang->sl_nocompoundsugs
|
||||
&& slang->sl_compprog != NULL
|
||||
&& ((unsigned)flags >> 24) != 0
|
||||
&& sp->ts_twordlen - sp->ts_splitoff
|
||||
@@ -11849,7 +11937,7 @@ suggest_trie_walk(su, lp, fword, soundfold)
|
||||
|
||||
/* For NOBREAK we never try splitting, it won't make any word
|
||||
* valid. */
|
||||
if (slang->sl_nobreak)
|
||||
if (slang->sl_nobreak && !slang->sl_nocompoundsugs)
|
||||
try_compound = TRUE;
|
||||
|
||||
/* If we could add a compound word, and it's also possible to
|
||||
@@ -11909,6 +11997,7 @@ suggest_trie_walk(su, lp, fword, soundfold)
|
||||
#endif
|
||||
/* Save things to be restored at STATE_SPLITUNDO. */
|
||||
sp->ts_save_badflags = su->su_badflags;
|
||||
PROF_STORE(sp->ts_state)
|
||||
sp->ts_state = STATE_SPLITUNDO;
|
||||
|
||||
++depth;
|
||||
@@ -11983,6 +12072,7 @@ suggest_trie_walk(su, lp, fword, soundfold)
|
||||
byts = pbyts;
|
||||
idxs = pidxs;
|
||||
sp->ts_prefixdepth = PFD_PREFIXTREE;
|
||||
PROF_STORE(sp->ts_state)
|
||||
sp->ts_state = STATE_NOPREFIX;
|
||||
}
|
||||
}
|
||||
@@ -11995,6 +12085,7 @@ suggest_trie_walk(su, lp, fword, soundfold)
|
||||
su->su_badflags = sp->ts_save_badflags;
|
||||
|
||||
/* Continue looking for NUL bytes. */
|
||||
PROF_STORE(sp->ts_state)
|
||||
sp->ts_state = STATE_START;
|
||||
|
||||
/* In case we went into the prefix tree. */
|
||||
@@ -12012,9 +12103,11 @@ suggest_trie_walk(su, lp, fword, soundfold)
|
||||
)
|
||||
{
|
||||
/* The badword ends, can't use STATE_PLAIN. */
|
||||
PROF_STORE(sp->ts_state)
|
||||
sp->ts_state = STATE_DEL;
|
||||
break;
|
||||
}
|
||||
PROF_STORE(sp->ts_state)
|
||||
sp->ts_state = STATE_PLAIN;
|
||||
/*FALLTHROUGH*/
|
||||
|
||||
@@ -12028,6 +12121,7 @@ suggest_trie_walk(su, lp, fword, soundfold)
|
||||
{
|
||||
/* Done all bytes at this node, do next state. When still at
|
||||
* already changed bytes skip the other tricks. */
|
||||
PROF_STORE(sp->ts_state)
|
||||
if (sp->ts_fidx >= sp->ts_fidxtry)
|
||||
sp->ts_state = STATE_DEL;
|
||||
else
|
||||
@@ -12184,6 +12278,7 @@ suggest_trie_walk(su, lp, fword, soundfold)
|
||||
* delete/insert/swap a character. */
|
||||
if (has_mbyte && sp->ts_tcharlen > 0)
|
||||
{
|
||||
PROF_STORE(sp->ts_state)
|
||||
sp->ts_state = STATE_FINAL;
|
||||
break;
|
||||
}
|
||||
@@ -12191,6 +12286,7 @@ suggest_trie_walk(su, lp, fword, soundfold)
|
||||
/*
|
||||
* Try skipping one character in the bad word (delete it).
|
||||
*/
|
||||
PROF_STORE(sp->ts_state)
|
||||
sp->ts_state = STATE_INS_PREP;
|
||||
sp->ts_curi = 1;
|
||||
if (soundfold && sp->ts_fidx == 0 && fword[sp->ts_fidx] == '*')
|
||||
@@ -12245,6 +12341,7 @@ suggest_trie_walk(su, lp, fword, soundfold)
|
||||
{
|
||||
/* If we just deleted a byte then inserting won't make sense,
|
||||
* a substitute is always cheaper. */
|
||||
PROF_STORE(sp->ts_state)
|
||||
sp->ts_state = STATE_SWAP;
|
||||
break;
|
||||
}
|
||||
@@ -12256,12 +12353,14 @@ suggest_trie_walk(su, lp, fword, soundfold)
|
||||
if (sp->ts_curi > byts[n])
|
||||
{
|
||||
/* Only NUL bytes at this node, go to next state. */
|
||||
PROF_STORE(sp->ts_state)
|
||||
sp->ts_state = STATE_SWAP;
|
||||
break;
|
||||
}
|
||||
if (byts[n + sp->ts_curi] != NUL)
|
||||
{
|
||||
/* Found a byte to insert. */
|
||||
PROF_STORE(sp->ts_state)
|
||||
sp->ts_state = STATE_INS;
|
||||
break;
|
||||
}
|
||||
@@ -12278,6 +12377,7 @@ suggest_trie_walk(su, lp, fword, soundfold)
|
||||
if (sp->ts_curi > byts[n])
|
||||
{
|
||||
/* Done all bytes at this node, go to next state. */
|
||||
PROF_STORE(sp->ts_state)
|
||||
sp->ts_state = STATE_SWAP;
|
||||
break;
|
||||
}
|
||||
@@ -12349,6 +12449,7 @@ suggest_trie_walk(su, lp, fword, soundfold)
|
||||
if (c == NUL)
|
||||
{
|
||||
/* End of word, can't swap or replace. */
|
||||
PROF_STORE(sp->ts_state)
|
||||
sp->ts_state = STATE_FINAL;
|
||||
break;
|
||||
}
|
||||
@@ -12357,6 +12458,7 @@ suggest_trie_walk(su, lp, fword, soundfold)
|
||||
* SWAP3 etc. also don't make sense then. */
|
||||
if (!soundfold && !spell_iswordp(p, curwin))
|
||||
{
|
||||
PROF_STORE(sp->ts_state)
|
||||
sp->ts_state = STATE_REP_INI;
|
||||
break;
|
||||
}
|
||||
@@ -12387,6 +12489,7 @@ suggest_trie_walk(su, lp, fword, soundfold)
|
||||
/* When the second character is NUL we can't swap. */
|
||||
if (c2 == NUL)
|
||||
{
|
||||
PROF_STORE(sp->ts_state)
|
||||
sp->ts_state = STATE_REP_INI;
|
||||
break;
|
||||
}
|
||||
@@ -12395,6 +12498,7 @@ suggest_trie_walk(su, lp, fword, soundfold)
|
||||
* Also get here if the second char is not a word character. */
|
||||
if (c == c2)
|
||||
{
|
||||
PROF_STORE(sp->ts_state)
|
||||
sp->ts_state = STATE_SWAP3;
|
||||
break;
|
||||
}
|
||||
@@ -12406,6 +12510,7 @@ suggest_trie_walk(su, lp, fword, soundfold)
|
||||
sp->ts_twordlen, tword, fword + sp->ts_fidx,
|
||||
c, c2);
|
||||
#endif
|
||||
PROF_STORE(sp->ts_state)
|
||||
sp->ts_state = STATE_UNSWAP;
|
||||
++depth;
|
||||
#ifdef FEAT_MBYTE
|
||||
@@ -12425,8 +12530,11 @@ suggest_trie_walk(su, lp, fword, soundfold)
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* If this swap doesn't work then SWAP3 won't either. */
|
||||
PROF_STORE(sp->ts_state)
|
||||
sp->ts_state = STATE_REP_INI;
|
||||
}
|
||||
break;
|
||||
|
||||
case STATE_UNSWAP:
|
||||
@@ -12484,6 +12592,7 @@ suggest_trie_walk(su, lp, fword, soundfold)
|
||||
* Second character may any char: "a.b" -> "b.a" */
|
||||
if (c == c3 || c3 == NUL)
|
||||
{
|
||||
PROF_STORE(sp->ts_state)
|
||||
sp->ts_state = STATE_REP_INI;
|
||||
break;
|
||||
}
|
||||
@@ -12495,6 +12604,7 @@ suggest_trie_walk(su, lp, fword, soundfold)
|
||||
sp->ts_twordlen, tword, fword + sp->ts_fidx,
|
||||
c, c3);
|
||||
#endif
|
||||
PROF_STORE(sp->ts_state)
|
||||
sp->ts_state = STATE_UNSWAP3;
|
||||
++depth;
|
||||
#ifdef FEAT_MBYTE
|
||||
@@ -12515,7 +12625,10 @@ suggest_trie_walk(su, lp, fword, soundfold)
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
PROF_STORE(sp->ts_state)
|
||||
sp->ts_state = STATE_REP_INI;
|
||||
}
|
||||
break;
|
||||
|
||||
case STATE_UNSWAP3:
|
||||
@@ -12547,6 +12660,7 @@ suggest_trie_walk(su, lp, fword, soundfold)
|
||||
{
|
||||
/* Middle char is not a word char, skip the rotate. First and
|
||||
* third char were already checked at swap and swap3. */
|
||||
PROF_STORE(sp->ts_state)
|
||||
sp->ts_state = STATE_REP_INI;
|
||||
break;
|
||||
}
|
||||
@@ -12562,6 +12676,7 @@ suggest_trie_walk(su, lp, fword, soundfold)
|
||||
sp->ts_twordlen, tword, fword + sp->ts_fidx,
|
||||
p[0], p[1], p[2]);
|
||||
#endif
|
||||
PROF_STORE(sp->ts_state)
|
||||
sp->ts_state = STATE_UNROT3L;
|
||||
++depth;
|
||||
p = fword + sp->ts_fidx;
|
||||
@@ -12587,7 +12702,10 @@ suggest_trie_walk(su, lp, fword, soundfold)
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
PROF_STORE(sp->ts_state)
|
||||
sp->ts_state = STATE_REP_INI;
|
||||
}
|
||||
break;
|
||||
|
||||
case STATE_UNROT3L:
|
||||
@@ -12623,6 +12741,7 @@ suggest_trie_walk(su, lp, fword, soundfold)
|
||||
sp->ts_twordlen, tword, fword + sp->ts_fidx,
|
||||
p[0], p[1], p[2]);
|
||||
#endif
|
||||
PROF_STORE(sp->ts_state)
|
||||
sp->ts_state = STATE_UNROT3R;
|
||||
++depth;
|
||||
p = fword + sp->ts_fidx;
|
||||
@@ -12648,7 +12767,10 @@ suggest_trie_walk(su, lp, fword, soundfold)
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
PROF_STORE(sp->ts_state)
|
||||
sp->ts_state = STATE_REP_INI;
|
||||
}
|
||||
break;
|
||||
|
||||
case STATE_UNROT3R:
|
||||
@@ -12684,6 +12806,7 @@ suggest_trie_walk(su, lp, fword, soundfold)
|
||||
|| sp->ts_score + SCORE_REP >= su->su_maxscore
|
||||
|| sp->ts_fidx < sp->ts_fidxtry)
|
||||
{
|
||||
PROF_STORE(sp->ts_state)
|
||||
sp->ts_state = STATE_FINAL;
|
||||
break;
|
||||
}
|
||||
@@ -12697,10 +12820,12 @@ suggest_trie_walk(su, lp, fword, soundfold)
|
||||
|
||||
if (sp->ts_curi < 0)
|
||||
{
|
||||
PROF_STORE(sp->ts_state)
|
||||
sp->ts_state = STATE_FINAL;
|
||||
break;
|
||||
}
|
||||
|
||||
PROF_STORE(sp->ts_state)
|
||||
sp->ts_state = STATE_REP;
|
||||
/*FALLTHROUGH*/
|
||||
|
||||
@@ -12733,6 +12858,7 @@ suggest_trie_walk(su, lp, fword, soundfold)
|
||||
ftp->ft_from, ftp->ft_to);
|
||||
#endif
|
||||
/* Need to undo this afterwards. */
|
||||
PROF_STORE(sp->ts_state)
|
||||
sp->ts_state = STATE_REP_UNDO;
|
||||
|
||||
/* Change the "from" to the "to" string. */
|
||||
@@ -12754,8 +12880,11 @@ suggest_trie_walk(su, lp, fword, soundfold)
|
||||
}
|
||||
|
||||
if (sp->ts_curi >= gap->ga_len && sp->ts_state == STATE_REP)
|
||||
{
|
||||
/* No (more) matches. */
|
||||
PROF_STORE(sp->ts_state)
|
||||
sp->ts_state = STATE_FINAL;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
@@ -12775,6 +12904,7 @@ suggest_trie_walk(su, lp, fword, soundfold)
|
||||
repextra -= tl - fl;
|
||||
}
|
||||
mch_memmove(p, ftp->ft_from, fl);
|
||||
PROF_STORE(sp->ts_state)
|
||||
sp->ts_state = STATE_REP;
|
||||
break;
|
||||
|
||||
@@ -13287,7 +13417,13 @@ suggest_try_soundalike(su)
|
||||
/* try all kinds of inserts/deletes/swaps/etc. */
|
||||
/* TODO: also soundfold the next words, so that we can try joining
|
||||
* and splitting */
|
||||
#ifdef SUGGEST_PROFILE
|
||||
prof_init();
|
||||
#endif
|
||||
suggest_trie_walk(su, lp, salword, TRUE);
|
||||
#ifdef SUGGEST_PROFILE
|
||||
prof_report("soundalike");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,7 +102,6 @@ SCRIPTS_ALL = \
|
||||
test_erasebackword.out \
|
||||
test_eval.out \
|
||||
test_fixeol.out \
|
||||
test_increment.out \
|
||||
test_insertcount.out \
|
||||
test_listchars.out \
|
||||
test_listlbr.out \
|
||||
@@ -174,6 +173,8 @@ SCRIPTS_GUI = test16.out
|
||||
# Keep test_alot.res as the last one, sort the others.
|
||||
NEW_TESTS = test_assert.res \
|
||||
test_cdo.res \
|
||||
test_hardcopy.res \
|
||||
test_increment.res \
|
||||
test_quickfix.res \
|
||||
test_viml.res \
|
||||
test_alot.res
|
||||
|
||||
@@ -120,7 +120,11 @@ nolog:
|
||||
# Limitation: Only works with the +eval feature.
|
||||
RUN_VIMTEST = VIMRUNTIME=$(SCRIPTSOURCE); export VIMRUNTIME; $(VALGRIND) $(VIMPROG) -f -u unix.vim -U NONE --noplugin
|
||||
|
||||
newtests: $(NEW_TESTS)
|
||||
newtests: newtestssilent
|
||||
@/bin/sh -c "if test -f messages && grep -q 'FAILED' messages; then cat messages && cat test.log; fi"
|
||||
|
||||
newtestssilent: $(NEW_TESTS)
|
||||
|
||||
|
||||
.vim.res:
|
||||
$(RUN_VIMTEST) -u NONE -S runtest.vim $*.vim
|
||||
|
||||
+34
-13
@@ -1,20 +1,41 @@
|
||||
This directory contains tests for various Vim features.
|
||||
|
||||
If it makes sense, try to add a new test to an already existing file. You may
|
||||
want to separate it from other tests in that file using :" (that's an Ex
|
||||
command comment).
|
||||
If it makes sense, add a new test method to an already existing file. You may
|
||||
want to separate it from other tests with comment lines.
|
||||
|
||||
The numbered tests are older, we have switched to named tests.
|
||||
And the newest way of testing is to use assert functions, see test_assert.vim
|
||||
for an example.
|
||||
|
||||
To add a new test:
|
||||
1) Create test_<subject>.in and test_<subject>.ok files.
|
||||
2) Add them to all Makefiles (Make*) in alphabetical order (search for an
|
||||
existing test_file.out to see where to add the new one).
|
||||
3) Use make test_<subject>.out to run a single test file in src/testdir/.
|
||||
And then you can chose between a new style test, which is a Vim script, or an
|
||||
old style test, which uses Normal mode commands. Use a new style test if you
|
||||
can.
|
||||
|
||||
|
||||
TO ADD A NEW STYLE TEST:
|
||||
|
||||
1) Create a test_<subject>.vim file.
|
||||
2) Add test_<subject>.vim to NEW_TESTS in Make_all.mak in alphabetical order.
|
||||
3) Use make test_<subject>.res to run a single test in src/testdir/.
|
||||
Use make test_<subject> to run a single test in src/.
|
||||
4) Also add an entry in src/Makefile.
|
||||
|
||||
Keep in mind that the files are used as if everything was typed.
|
||||
A line break is like pressing Enter. If that happens on the last line you'll
|
||||
hear a beep.
|
||||
What you can use (see test_assert.vim for an example):
|
||||
- Call assert_equal(), assert_true() and assert_false().
|
||||
- Use try/catch to check for exceptions.
|
||||
- Use alloc_fail() to have memory allocation fail. This makes it possible to
|
||||
to check memory allocation failures are handled gracefully. You need to
|
||||
change the source code to add an ID to the allocation. Update LAST_ID_USED
|
||||
above alloc_id() to the highest ID used.
|
||||
|
||||
|
||||
TO ADD AN OLD STYLE TEST:
|
||||
|
||||
1) Create test_<subject>.in and test_<subject>.ok files.
|
||||
2) Add test_<subject>.out to SCRIPTS_ALL in Make_all.mak in alphabetical order.
|
||||
3) Use make test_<subject>.out to run a single test in src/testdir/.
|
||||
Use make test_<subject> to run a single test in src/.
|
||||
4) Also add an entry in src/Makefile.
|
||||
|
||||
Keep in mind that the files are used as if everything was typed:
|
||||
- To add comments use: :" (that's an Ex command comment)
|
||||
- A line break is like pressing Enter. If that happens on the last line
|
||||
you'll hear a beep!
|
||||
|
||||
+18
-1
@@ -43,6 +43,22 @@ set nomore
|
||||
" Output all messages in English.
|
||||
lang mess C
|
||||
|
||||
let s:srcdir = expand('%:p:h:h')
|
||||
|
||||
" Support function: get the alloc ID by name.
|
||||
function GetAllocId(name)
|
||||
exe 'split ' . s:srcdir . '/alloc.h'
|
||||
/typedef enum/
|
||||
let top = getline('.')
|
||||
let lnum = search('aid_' . a:name . ',')
|
||||
if lnum == 0
|
||||
call add(v:errors, 'Alloc ID ' . a:name . ' not defined')
|
||||
endif
|
||||
close
|
||||
return lnum - top
|
||||
endfunc
|
||||
|
||||
|
||||
" Source the test script. First grab the file name, in case the script
|
||||
" navigates away.
|
||||
let testname = expand('%')
|
||||
@@ -68,7 +84,8 @@ function /^Test_
|
||||
redir END
|
||||
let tests = split(substitute(@q, 'function \(\k*()\)', '\1', 'g'))
|
||||
|
||||
for test in tests
|
||||
" Execute the tests in alphabetical order.
|
||||
for test in sort(tests)
|
||||
if exists("*SetUp")
|
||||
call SetUp()
|
||||
endif
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
" Test :hardcopy
|
||||
|
||||
func Test_printoptions_parsing()
|
||||
" Only test that this doesn't throw an error.
|
||||
set printoptions=left:5in,right:10pt,top:8mm,bottom:2pc
|
||||
set printoptions=left:2in,top:30pt,right:16mm,bottom:3pc
|
||||
set printoptions=header:3,syntax:y,number:7,wrap:n
|
||||
set printoptions=duplex:short,collate:n,jobsplit:y,portrait:n
|
||||
set printoptions=paper:10x14
|
||||
set printoptions=paper:A3
|
||||
set printoptions=paper:A4
|
||||
set printoptions=paper:A5
|
||||
set printoptions=paper:B4
|
||||
set printoptions=paper:B5
|
||||
set printoptions=paper:executive
|
||||
set printoptions=paper:folio
|
||||
set printoptions=paper:ledger
|
||||
set printoptions=paper:legal
|
||||
set printoptions=paper:letter
|
||||
set printoptions=paper:quarto
|
||||
set printoptions=paper:statement
|
||||
set printoptions=paper:tabloid
|
||||
set printoptions=formfeed:y
|
||||
set printoptions=
|
||||
set printoptions&
|
||||
endfunc
|
||||
|
||||
func Test_printmbfont_parsing()
|
||||
" Only test that this doesn't throw an error.
|
||||
set printmbfont=r:WadaMin-Regular,b:WadaMin-Bold,i:WadaMin-Italic,o:WadaMin-Bold-Italic,c:yes,a:no
|
||||
set printmbfont=
|
||||
set printmbfont&
|
||||
endfunc
|
||||
|
||||
func Test_printheader_parsing()
|
||||
" Only test that this doesn't throw an error.
|
||||
set printheader=%<%f\ %h%m%r%=%-14.(%l,%c%V%)\ %P
|
||||
set printheader=%<%f%h%m%r%=%b\ 0x%B\ \ %l,%c%V\ %P
|
||||
set printheader=%<%f%=\ [%1*%M%*%n%R%H]\ %-19(%3l,%02c%03V%)%O'%02b'
|
||||
set printheader=...%r%{VarExists('b:gzflag','\ [GZ]')}%h...
|
||||
set printheader=
|
||||
set printheader&
|
||||
endfunc
|
||||
|
||||
" Test that :hardcopy produces a non-empty file.
|
||||
" We don't check much of the contents.
|
||||
func Test_with_syntax()
|
||||
set printoptions=syntax:y
|
||||
syn on
|
||||
hardcopy > Xhardcopy
|
||||
let lines = readfile('Xhardcopy')
|
||||
call assert_true(len(lines) > 20)
|
||||
call assert_true(lines[0] =~ 'PS-Adobe')
|
||||
call delete('Xhardcopy')
|
||||
set printoptions&
|
||||
endfunc
|
||||
@@ -1,734 +0,0 @@
|
||||
Tests for using Ctrl-A/Ctrl-X on visual selections
|
||||
|
||||
Test cases
|
||||
==========
|
||||
|
||||
1) Ctrl-A on visually selected number
|
||||
Text:
|
||||
foobar-10
|
||||
Expected:
|
||||
1) Ctrl-A on start of line:
|
||||
foobar-9
|
||||
2) Ctrl-A on visually selected "-10":
|
||||
foobar-9
|
||||
3) Ctrl-A on visually selected "10":
|
||||
foobar-11
|
||||
4) Ctrl-X on visually selected "-10"
|
||||
foobar-11
|
||||
5) Ctrl-X on visually selected "10"
|
||||
foobar-9
|
||||
|
||||
2) Ctrl-A on visually selected lines
|
||||
Text:
|
||||
10
|
||||
20
|
||||
30
|
||||
40
|
||||
|
||||
Expected:
|
||||
1) Ctrl-A on visually selected lines:
|
||||
11
|
||||
21
|
||||
31
|
||||
41
|
||||
|
||||
2) Ctrl-X on visually selected lines:
|
||||
9
|
||||
19
|
||||
29
|
||||
39
|
||||
|
||||
3) g Ctrl-A on visually selected lines, with non-numbers in between
|
||||
Text:
|
||||
10
|
||||
|
||||
20
|
||||
|
||||
30
|
||||
|
||||
40
|
||||
|
||||
Expected:
|
||||
1) 2 g Ctrl-A on visually selected lines:
|
||||
12
|
||||
|
||||
24
|
||||
|
||||
36
|
||||
|
||||
48
|
||||
2) 2 g Ctrl-X on visually selected lines
|
||||
8
|
||||
|
||||
16
|
||||
|
||||
24
|
||||
|
||||
32
|
||||
|
||||
4) Ctrl-A on non-number
|
||||
Text:
|
||||
foobar-10
|
||||
Expected:
|
||||
1) visually select foobar:
|
||||
foobar-10
|
||||
|
||||
5) g<Ctrl-A> on letter
|
||||
Test:
|
||||
a
|
||||
a
|
||||
a
|
||||
a
|
||||
Expected:
|
||||
1) g Ctrl-A on visually selected lines
|
||||
b
|
||||
c
|
||||
d
|
||||
e
|
||||
|
||||
6) g<Ctrl-A> on letter
|
||||
Test:
|
||||
z
|
||||
z
|
||||
z
|
||||
z
|
||||
Expected:
|
||||
1) g Ctrl-X on visually selected lines
|
||||
y
|
||||
x
|
||||
w
|
||||
v
|
||||
|
||||
7) <Ctrl-A> on letter
|
||||
Test:
|
||||
2
|
||||
1
|
||||
0
|
||||
-1
|
||||
-2
|
||||
|
||||
Expected:
|
||||
1) Ctrl-A on visually selected lines
|
||||
3
|
||||
2
|
||||
1
|
||||
0
|
||||
-1
|
||||
|
||||
2) Ctrl-X on visually selected lines
|
||||
1
|
||||
0
|
||||
-1
|
||||
-2
|
||||
-3
|
||||
8) Block increment on 0x9
|
||||
Text:
|
||||
0x9
|
||||
0x9
|
||||
Expected:
|
||||
1) Ctrl-A on visually block selected region (cursor at beginning):
|
||||
0xa
|
||||
0xa
|
||||
2) Ctrl-A on visually block selected region (cursor at end)
|
||||
0xa
|
||||
0xa
|
||||
|
||||
9) Increment and redo
|
||||
Text:
|
||||
2
|
||||
2
|
||||
|
||||
3
|
||||
3
|
||||
|
||||
Expected:
|
||||
1) 2 Ctrl-A on first 2 visually selected lines
|
||||
4
|
||||
4
|
||||
2) redo (.) on 3
|
||||
5
|
||||
5
|
||||
10) sequentially decrement 1
|
||||
Text:
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
Expected:
|
||||
1) g Ctrl-X on visually selected lines
|
||||
0
|
||||
-1
|
||||
-2
|
||||
-3
|
||||
|
||||
11) visually block selected indented lines
|
||||
Text:
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
Expexted:
|
||||
1) g Ctrl-A on block selected indented lines
|
||||
2
|
||||
1
|
||||
3
|
||||
4
|
||||
|
||||
12) visually selected several columns
|
||||
Text:
|
||||
0 0
|
||||
0 0
|
||||
0 0
|
||||
Expected:
|
||||
1) 'v' select last zero and first zeroes
|
||||
0 1
|
||||
1 0
|
||||
1 0
|
||||
|
||||
13) visually selected part of columns
|
||||
Text:
|
||||
max: 100px
|
||||
max: 200px
|
||||
max: 300px
|
||||
max: 400px
|
||||
Expected:
|
||||
1) 'v' on first two numbers Ctrl-A
|
||||
max: 110px
|
||||
max: 220px
|
||||
max: 330px
|
||||
max: 400px
|
||||
2) 'v' on first two numbers Ctrl-X
|
||||
max: 90px
|
||||
max: 190px
|
||||
max: 290px
|
||||
max: 400px
|
||||
|
||||
14) redo in block mode
|
||||
Text:
|
||||
1 1
|
||||
1 1
|
||||
Expected:
|
||||
1) Ctrl-a on first column, redo on second column
|
||||
2 2
|
||||
2 2
|
||||
|
||||
15) block select single numbers
|
||||
Text:
|
||||
101
|
||||
Expected:
|
||||
1) Ctrl-a on visually selected zero
|
||||
111
|
||||
|
||||
16) increment right aligned numbers
|
||||
Text:
|
||||
1
|
||||
19
|
||||
119
|
||||
Expected:
|
||||
1) Ctrl-a on line selected region
|
||||
2
|
||||
20
|
||||
120
|
||||
|
||||
17) block-wise increment and redo
|
||||
Text:
|
||||
100
|
||||
1
|
||||
|
||||
100
|
||||
1
|
||||
|
||||
Expected:
|
||||
1) Ctrl-V j $ on first block, afterwards '.' on second
|
||||
101
|
||||
2
|
||||
|
||||
101
|
||||
2
|
||||
|
||||
18) repeat of g<Ctrl-a>
|
||||
Text:
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
|
||||
Expected:
|
||||
1) V 4j g<ctrl-a>, repeat twice afterwards with .
|
||||
3
|
||||
6
|
||||
9
|
||||
12
|
||||
|
||||
19) increment on number with nrformat including alpha
|
||||
Text:
|
||||
1
|
||||
1a
|
||||
|
||||
Expected:
|
||||
1) <Ctrl-V>j$ <ctrl-a>
|
||||
2
|
||||
2a
|
||||
|
||||
20) increment a single letter
|
||||
Text:
|
||||
a
|
||||
|
||||
Expected:
|
||||
1) <Ctrl-a> and cursor is on a
|
||||
b
|
||||
|
||||
21) block-wise increment on part of hexadecimal
|
||||
Text:
|
||||
0x123456
|
||||
|
||||
Expected:
|
||||
1) Ctrl-V f3 <ctrl-a>
|
||||
0x124456
|
||||
|
||||
22) Block increment on 0b0
|
||||
Text:
|
||||
0b1
|
||||
0b1
|
||||
Expected:
|
||||
1) Ctrl-A on visually block selected region (cursor at beginning):
|
||||
0b10
|
||||
0b10
|
||||
2) Ctrl-A on visually block selected region (cursor at end)
|
||||
0b10
|
||||
0b10
|
||||
|
||||
23) block-wise increment on part of binary
|
||||
Text:
|
||||
0b1001
|
||||
|
||||
Expected:
|
||||
1) Ctrl-V 5l <ctrl-a>
|
||||
0b1011
|
||||
|
||||
24) increment hexadecimal
|
||||
Text:
|
||||
0x0b1001
|
||||
|
||||
Expected:
|
||||
1) <ctrl-a>
|
||||
0x0b1002
|
||||
|
||||
25) increment binary with nrformats including alpha
|
||||
Text:
|
||||
0b1001a
|
||||
|
||||
Expected:
|
||||
1) <ctrl-a>
|
||||
0b1010a
|
||||
|
||||
26) increment binary with 64 bits
|
||||
Text:
|
||||
0b1111111111111111111111111111111111111111111111111111111111111110
|
||||
|
||||
Expected:
|
||||
1) <ctrl-a>
|
||||
0b1111111111111111111111111111111111111111111111111111111111111111
|
||||
|
||||
|
||||
STARTTEST
|
||||
:so small.vim
|
||||
:"
|
||||
:" Avoid CTRL-X being mapped in Visual mode for MS-Windows
|
||||
:vmapclear
|
||||
:"
|
||||
:" Test 1
|
||||
:/^S1=/+,/^E1=/-y a
|
||||
:/^E1=/+put a
|
||||
:/^E1=/+2put a
|
||||
f-v$:/^E1=/+3put a
|
||||
f1v$:/^E1=/+4put a
|
||||
f-v$:/^E1=/+5put a
|
||||
f1v$
|
||||
|
||||
:" Test 2
|
||||
:/^S2=/+,/^E2=/-y a
|
||||
:/^E2=/+put a
|
||||
V3k$3j:.+put a
|
||||
V3k$
|
||||
|
||||
:" Test 3
|
||||
:/^S3=/+,/^E3=/-y a
|
||||
:/^E3=/+put a
|
||||
V6k2g6j:.+put a
|
||||
V6k2g
|
||||
|
||||
:" Test 4
|
||||
:/^S4=/+,/^E4=/-y a
|
||||
:/^E4=/+put a
|
||||
vf-
|
||||
|
||||
:" Test 5
|
||||
:set nrformats+=alpha
|
||||
:/^S5=/+,/^E5=/-y a
|
||||
:/^E5=/+put a
|
||||
v3kg
|
||||
|
||||
:" Test 6
|
||||
:/^S6=/+,/^E6=/-y a
|
||||
:/^E6=/+put a
|
||||
v3kg
|
||||
|
||||
:" Test 7
|
||||
:set nrformats&vim
|
||||
:/^S7=/+,/^E7=/-y a
|
||||
:/^E7=/+put a
|
||||
V4k4j:.+put a
|
||||
V4k
|
||||
|
||||
:" Test 8
|
||||
:/^S8=/+,/^E8=/-y a
|
||||
:/^E8=/+put a
|
||||
kj$j:.+put a
|
||||
k$+
|
||||
|
||||
:" Test 9
|
||||
:/^S9=/+,/^E9=/-y a
|
||||
:/^E9=/+put a
|
||||
5kVj23j.
|
||||
|
||||
:" Test 10
|
||||
:/^S10=/+,/^E10=/-y a
|
||||
:/^E10=/+put a
|
||||
V3kg
|
||||
|
||||
: Test 11
|
||||
:/^S11=/+,/^E11=/-y a
|
||||
:/^E11=/+put a
|
||||
3kf13jg
|
||||
|
||||
:" Test 12
|
||||
:/^S12=/+,/^E12=/-y a
|
||||
:/^E12=/+put a
|
||||
2k$v++
|
||||
|
||||
:" Test 13
|
||||
:/^S13=/+,/^E13=/-y a
|
||||
:/^E13=/+put a
|
||||
3kf1l2j3j:.+put a
|
||||
3kf1l2j
|
||||
|
||||
:" Test 14
|
||||
:/^S14=/+,/^E14=/-y a
|
||||
:/^E14=/+put a
|
||||
kw.
|
||||
|
||||
:" Test 15
|
||||
:/^S15=/+,/^E15=/-y a
|
||||
:/^E15=/+put a
|
||||
lv
|
||||
|
||||
:" Test 16
|
||||
:/^S16=/+,/^E16=/-y a
|
||||
:/^E16=/+put a
|
||||
V3k
|
||||
|
||||
:" Test 17
|
||||
:/^S17=/+,/^E17=/-y a
|
||||
:/^E17=/+put a
|
||||
4kj$2j.
|
||||
|
||||
:" Test 18
|
||||
:/^S18=/+,/^E18=/-y a
|
||||
:/^E18=/+put a
|
||||
V3kg..
|
||||
|
||||
:" Test 19
|
||||
:set nrformats+=alpha
|
||||
:/^S19=/+,/^E19=/-y a
|
||||
:/^E19=/+put a
|
||||
k$
|
||||
:set nrformats&vim
|
||||
|
||||
:" Test 20
|
||||
:set nrformats+=alpha
|
||||
:/^S20=/+,/^E20=/-y a
|
||||
:/^E20=/+put a
|
||||
:.put =col('.')
|
||||
:set nrformats&vim
|
||||
|
||||
:" Test 21
|
||||
:/^S21=/+,/^E21=/-y a
|
||||
:/^E21=/+put a
|
||||
:set nrformats&vim
|
||||
f3
|
||||
|
||||
:" Test 22
|
||||
:/^S22=/+,/^E22=/-y a
|
||||
:/^E22=/+put a
|
||||
kj$j:.+put a
|
||||
k$+
|
||||
|
||||
:" Test 23
|
||||
:/^S23=/+,/^E23=/-y a
|
||||
:/^E23=/+put a
|
||||
:set nrformats&vim
|
||||
4l
|
||||
|
||||
:" Test 24
|
||||
:/^S24=/+,/^E24=/-y a
|
||||
:/^E24=/+put a
|
||||
:set nrformats&vim
|
||||
$
|
||||
|
||||
:" Test 25
|
||||
:set nrformats+=alpha
|
||||
:/^S25=/+,/^E25=/-y a
|
||||
:/^E25=/+put a
|
||||
k$
|
||||
:set nrformats&vim
|
||||
|
||||
:" Test 26
|
||||
:set nrformats+=alpha
|
||||
:/^S26=/+,/^E26=/-y a
|
||||
:/^E26=/+put a
|
||||
k$
|
||||
:set nrformats&vim
|
||||
|
||||
:" Save the report
|
||||
:/^# Test 1/,$w! test.out
|
||||
:qa!
|
||||
|
||||
|
||||
# Test 1
|
||||
S1======
|
||||
foobar-10
|
||||
E1======
|
||||
|
||||
|
||||
|
||||
# Test 2
|
||||
S2=====
|
||||
10
|
||||
20
|
||||
30
|
||||
40
|
||||
E2=====
|
||||
|
||||
|
||||
|
||||
# Test 3
|
||||
S3=====
|
||||
10
|
||||
|
||||
20
|
||||
|
||||
30
|
||||
|
||||
40
|
||||
E3=====
|
||||
|
||||
|
||||
|
||||
# Test 4
|
||||
S4=====
|
||||
foobar-10
|
||||
E4=====
|
||||
|
||||
|
||||
|
||||
# Test 5
|
||||
S5====
|
||||
a
|
||||
a
|
||||
a
|
||||
a
|
||||
E5====
|
||||
|
||||
|
||||
# Test 6
|
||||
S6====
|
||||
z
|
||||
z
|
||||
z
|
||||
z
|
||||
E6====
|
||||
|
||||
|
||||
|
||||
# Test 7
|
||||
S7====
|
||||
2
|
||||
1
|
||||
0
|
||||
-1
|
||||
-2
|
||||
E7====
|
||||
|
||||
|
||||
|
||||
# Test 8
|
||||
S8====
|
||||
0x9
|
||||
0x9
|
||||
E8====
|
||||
|
||||
|
||||
|
||||
|
||||
# Test 9
|
||||
S9====
|
||||
2
|
||||
2
|
||||
|
||||
3
|
||||
3
|
||||
|
||||
E9====
|
||||
|
||||
|
||||
|
||||
|
||||
# Test 10
|
||||
S10====
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
E10====
|
||||
|
||||
|
||||
|
||||
|
||||
# Test 11
|
||||
S11====
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
E11====
|
||||
|
||||
|
||||
|
||||
# Test 12
|
||||
S12====
|
||||
0 0
|
||||
0 0
|
||||
0 0
|
||||
E12====
|
||||
|
||||
|
||||
|
||||
# Test 13
|
||||
S13====
|
||||
max: 100px
|
||||
max: 200px
|
||||
max: 300px
|
||||
max: 400px
|
||||
E13====
|
||||
|
||||
|
||||
|
||||
# Test 14
|
||||
S14====
|
||||
1 1
|
||||
1 1
|
||||
E14====
|
||||
|
||||
|
||||
|
||||
# Test 15
|
||||
S15====
|
||||
101
|
||||
E15====
|
||||
|
||||
|
||||
|
||||
# Test 16
|
||||
S16====
|
||||
1
|
||||
19
|
||||
119
|
||||
E16====
|
||||
|
||||
|
||||
|
||||
# Test 17
|
||||
S17====
|
||||
100
|
||||
1
|
||||
|
||||
100
|
||||
1
|
||||
E17====
|
||||
|
||||
|
||||
# Test 18
|
||||
S18====
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
E18====
|
||||
|
||||
|
||||
|
||||
# Test 19
|
||||
S19====
|
||||
1
|
||||
1a
|
||||
E19====
|
||||
|
||||
|
||||
|
||||
# Test 20
|
||||
S20====
|
||||
a
|
||||
E20====
|
||||
|
||||
|
||||
|
||||
# Test 21
|
||||
S21====
|
||||
0x123456
|
||||
E21====
|
||||
|
||||
|
||||
|
||||
# Test 22
|
||||
S22====
|
||||
0b1
|
||||
0b1
|
||||
E22====
|
||||
|
||||
|
||||
|
||||
|
||||
# Test 23
|
||||
S23====
|
||||
0b1001
|
||||
E23====
|
||||
|
||||
|
||||
|
||||
|
||||
# Test 24
|
||||
S24====
|
||||
0x0b1001
|
||||
E24====
|
||||
|
||||
|
||||
|
||||
|
||||
# Test 25
|
||||
S25====
|
||||
0b1001a
|
||||
E25====
|
||||
|
||||
|
||||
|
||||
|
||||
# Test 26
|
||||
S26====
|
||||
0b11111111111111111111111111111110
|
||||
E26====
|
||||
|
||||
|
||||
|
||||
ENDTEST
|
||||
|
||||
@@ -1,340 +0,0 @@
|
||||
# Test 1
|
||||
S1======
|
||||
foobar-10
|
||||
E1======
|
||||
|
||||
foobar-9
|
||||
foobar-9
|
||||
foobar-11
|
||||
foobar-11
|
||||
foobar-9
|
||||
|
||||
|
||||
# Test 2
|
||||
S2=====
|
||||
10
|
||||
20
|
||||
30
|
||||
40
|
||||
E2=====
|
||||
|
||||
11
|
||||
21
|
||||
31
|
||||
41
|
||||
|
||||
9
|
||||
19
|
||||
29
|
||||
39
|
||||
|
||||
# Test 3
|
||||
S3=====
|
||||
10
|
||||
|
||||
20
|
||||
|
||||
30
|
||||
|
||||
40
|
||||
E3=====
|
||||
|
||||
12
|
||||
|
||||
24
|
||||
|
||||
36
|
||||
|
||||
48
|
||||
|
||||
8
|
||||
|
||||
16
|
||||
|
||||
24
|
||||
|
||||
32
|
||||
|
||||
# Test 4
|
||||
S4=====
|
||||
foobar-10
|
||||
E4=====
|
||||
|
||||
foobar-10
|
||||
|
||||
|
||||
# Test 5
|
||||
S5====
|
||||
a
|
||||
a
|
||||
a
|
||||
a
|
||||
E5====
|
||||
|
||||
b
|
||||
c
|
||||
d
|
||||
e
|
||||
|
||||
# Test 6
|
||||
S6====
|
||||
z
|
||||
z
|
||||
z
|
||||
z
|
||||
E6====
|
||||
|
||||
y
|
||||
x
|
||||
w
|
||||
v
|
||||
|
||||
|
||||
# Test 7
|
||||
S7====
|
||||
2
|
||||
1
|
||||
0
|
||||
-1
|
||||
-2
|
||||
E7====
|
||||
|
||||
3
|
||||
2
|
||||
1
|
||||
0
|
||||
-1
|
||||
|
||||
1
|
||||
0
|
||||
-1
|
||||
-2
|
||||
-3
|
||||
|
||||
# Test 8
|
||||
S8====
|
||||
0x9
|
||||
0x9
|
||||
E8====
|
||||
|
||||
0xa
|
||||
0xa
|
||||
|
||||
0xa
|
||||
0xa
|
||||
|
||||
|
||||
# Test 9
|
||||
S9====
|
||||
2
|
||||
2
|
||||
|
||||
3
|
||||
3
|
||||
|
||||
E9====
|
||||
|
||||
4
|
||||
4
|
||||
|
||||
5
|
||||
5
|
||||
|
||||
|
||||
|
||||
|
||||
# Test 10
|
||||
S10====
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
E10====
|
||||
|
||||
0
|
||||
-1
|
||||
-2
|
||||
-3
|
||||
|
||||
|
||||
|
||||
# Test 11
|
||||
S11====
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
E11====
|
||||
|
||||
2
|
||||
1
|
||||
3
|
||||
4
|
||||
|
||||
|
||||
# Test 12
|
||||
S12====
|
||||
0 0
|
||||
0 0
|
||||
0 0
|
||||
E12====
|
||||
|
||||
0 1
|
||||
1 0
|
||||
1 0
|
||||
|
||||
|
||||
# Test 13
|
||||
S13====
|
||||
max: 100px
|
||||
max: 200px
|
||||
max: 300px
|
||||
max: 400px
|
||||
E13====
|
||||
|
||||
max: 110px
|
||||
max: 210px
|
||||
max: 310px
|
||||
max: 400px
|
||||
|
||||
max: 90px
|
||||
max: 190px
|
||||
max: 290px
|
||||
max: 400px
|
||||
|
||||
# Test 14
|
||||
S14====
|
||||
1 1
|
||||
1 1
|
||||
E14====
|
||||
|
||||
2 2
|
||||
2 2
|
||||
|
||||
|
||||
# Test 15
|
||||
S15====
|
||||
101
|
||||
E15====
|
||||
|
||||
111
|
||||
|
||||
|
||||
# Test 16
|
||||
S16====
|
||||
1
|
||||
19
|
||||
119
|
||||
E16====
|
||||
|
||||
2
|
||||
20
|
||||
120
|
||||
|
||||
|
||||
# Test 17
|
||||
S17====
|
||||
100
|
||||
1
|
||||
|
||||
100
|
||||
1
|
||||
E17====
|
||||
|
||||
101
|
||||
2
|
||||
|
||||
101
|
||||
1
|
||||
|
||||
# Test 18
|
||||
S18====
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
E18====
|
||||
|
||||
3
|
||||
6
|
||||
9
|
||||
12
|
||||
|
||||
|
||||
# Test 19
|
||||
S19====
|
||||
1
|
||||
1a
|
||||
E19====
|
||||
|
||||
2
|
||||
2a
|
||||
|
||||
|
||||
# Test 20
|
||||
S20====
|
||||
a
|
||||
E20====
|
||||
|
||||
b
|
||||
1
|
||||
|
||||
|
||||
# Test 21
|
||||
S21====
|
||||
0x123456
|
||||
E21====
|
||||
|
||||
0x124456
|
||||
|
||||
|
||||
# Test 22
|
||||
S22====
|
||||
0b1
|
||||
0b1
|
||||
E22====
|
||||
|
||||
0b10
|
||||
0b10
|
||||
|
||||
0b10
|
||||
0b10
|
||||
|
||||
|
||||
# Test 23
|
||||
S23====
|
||||
0b1001
|
||||
E23====
|
||||
|
||||
0b1011
|
||||
|
||||
|
||||
|
||||
# Test 24
|
||||
S24====
|
||||
0x0b1001
|
||||
E24====
|
||||
|
||||
0x0b1002
|
||||
|
||||
|
||||
|
||||
# Test 25
|
||||
S25====
|
||||
0b1001a
|
||||
E25====
|
||||
|
||||
0b1010a
|
||||
|
||||
|
||||
|
||||
# Test 26
|
||||
S26====
|
||||
0b11111111111111111111111111111110
|
||||
E26====
|
||||
|
||||
0b11111111111111111111111111111111
|
||||
|
||||
|
||||
ENDTEST
|
||||
|
||||
@@ -0,0 +1,711 @@
|
||||
" Tests for using Ctrl-A/Ctrl-X on visual selections
|
||||
|
||||
func SetUp()
|
||||
new dummy
|
||||
set nrformats&vim
|
||||
endfunc
|
||||
|
||||
func TearDown()
|
||||
bwipe!
|
||||
endfunc
|
||||
|
||||
" 1) Ctrl-A on visually selected number
|
||||
" Text:
|
||||
" foobar-10
|
||||
" Expected:
|
||||
" 1) Ctrl-A on start of line:
|
||||
" foobar-9
|
||||
" 2) Ctrl-A on visually selected "-10":
|
||||
" foobar-9
|
||||
" 3) Ctrl-A on visually selected "10":
|
||||
" foobar-11
|
||||
" 4) Ctrl-X on visually selected "-10"
|
||||
" foobar-11
|
||||
" 5) Ctrl-X on visually selected "10"
|
||||
" foobar-9
|
||||
func Test_visual_increment_01()
|
||||
call setline(1, repeat(["foobaar-10"], 5))
|
||||
|
||||
call cursor(1, 1)
|
||||
exec "norm! \<C-A>"
|
||||
call assert_equal("foobaar-9", getline('.'))
|
||||
call assert_equal([0, 1, 9, 0], getpos('.'))
|
||||
|
||||
call cursor(2, 1)
|
||||
exec "norm! f-v$\<C-A>"
|
||||
call assert_equal("foobaar-9", getline('.'))
|
||||
call assert_equal([0, 2, 8, 0], getpos('.'))
|
||||
|
||||
call cursor(3, 1)
|
||||
exec "norm! f1v$\<C-A>"
|
||||
call assert_equal("foobaar-11", getline('.'))
|
||||
call assert_equal([0, 3, 9, 0], getpos('.'))
|
||||
|
||||
call cursor(4, 1)
|
||||
exec "norm! f-v$\<C-X>"
|
||||
call assert_equal("foobaar-11", getline('.'))
|
||||
call assert_equal([0, 4, 8, 0], getpos('.'))
|
||||
|
||||
call cursor(5, 1)
|
||||
exec "norm! f1v$\<C-X>"
|
||||
call assert_equal("foobaar-9", getline('.'))
|
||||
call assert_equal([0, 5, 9, 0], getpos('.'))
|
||||
endfunc
|
||||
|
||||
" 2) Ctrl-A on visually selected lines
|
||||
" Text:
|
||||
" 10
|
||||
" 20
|
||||
" 30
|
||||
" 40
|
||||
"
|
||||
" Expected:
|
||||
" 1) Ctrl-A on visually selected lines:
|
||||
" 11
|
||||
" 21
|
||||
" 31
|
||||
" 41
|
||||
"
|
||||
" 2) Ctrl-X on visually selected lines:
|
||||
" 9
|
||||
" 19
|
||||
" 29
|
||||
" 39
|
||||
func Test_visual_increment_02()
|
||||
call setline(1, ["10", "20", "30", "40"])
|
||||
exec "norm! GV3k$\<C-A>"
|
||||
call assert_equal(["11", "21", "31", "41"], getline(1, '$'))
|
||||
call assert_equal([0, 1, 1, 0], getpos('.'))
|
||||
|
||||
call setline(1, ["10", "20", "30", "40"])
|
||||
exec "norm! GV3k$\<C-X>"
|
||||
call assert_equal(["9", "19", "29", "39"], getline(1, '$'))
|
||||
call assert_equal([0, 1, 1, 0], getpos('.'))
|
||||
endfunc
|
||||
|
||||
" 3) g Ctrl-A on visually selected lines, with non-numbers in between
|
||||
" Text:
|
||||
" 10
|
||||
"
|
||||
" 20
|
||||
"
|
||||
" 30
|
||||
"
|
||||
" 40
|
||||
"
|
||||
" Expected:
|
||||
" 1) 2 g Ctrl-A on visually selected lines:
|
||||
" 12
|
||||
"
|
||||
" 24
|
||||
"
|
||||
" 36
|
||||
"
|
||||
" 48
|
||||
" 2) 2 g Ctrl-X on visually selected lines
|
||||
" 8
|
||||
"
|
||||
" 16
|
||||
"
|
||||
" 24
|
||||
"
|
||||
" 32
|
||||
func Test_visual_increment_03()
|
||||
call setline(1, ["10", "", "20", "", "30", "", "40"])
|
||||
exec "norm! GV6k2g\<C-A>"
|
||||
call assert_equal(["12", "", "24", "", "36", "", "48"], getline(1, '$'))
|
||||
call assert_equal([0, 1, 1, 0], getpos('.'))
|
||||
|
||||
call setline(1, ["10", "", "20", "", "30", "", "40"])
|
||||
exec "norm! GV6k2g\<C-X>"
|
||||
call assert_equal(["8", "", "16", "", "24", "", "32"], getline(1, '$'))
|
||||
call assert_equal([0, 1, 1, 0], getpos('.'))
|
||||
endfunc
|
||||
|
||||
" 4) Ctrl-A on non-number
|
||||
" Text:
|
||||
" foobar-10
|
||||
" Expected:
|
||||
" 1) visually select foobar:
|
||||
" foobar-10
|
||||
func Test_visual_increment_04()
|
||||
call setline(1, ["foobar-10"])
|
||||
exec "norm! vf-\<C-A>"
|
||||
call assert_equal(["foobar-10"], getline(1, '$'))
|
||||
" NOTE: I think this is correct behavior...
|
||||
call assert_equal([0, 1, 1, 0], getpos('.'))
|
||||
endfunc
|
||||
|
||||
" 5) g<Ctrl-A> on letter
|
||||
" Test:
|
||||
" a
|
||||
" a
|
||||
" a
|
||||
" a
|
||||
" Expected:
|
||||
" 1) g Ctrl-A on visually selected lines
|
||||
" b
|
||||
" c
|
||||
" d
|
||||
" e
|
||||
func Test_visual_increment_05()
|
||||
set nrformats+=alpha
|
||||
call setline(1, repeat(["a"], 4))
|
||||
exec "norm! GV3kg\<C-A>"
|
||||
call assert_equal(["b", "c", "d", "e"], getline(1, '$'))
|
||||
call assert_equal([0, 1, 1, 0], getpos('.'))
|
||||
endfunc
|
||||
|
||||
" 6) g<Ctrl-A> on letter
|
||||
" Test:
|
||||
" z
|
||||
" z
|
||||
" z
|
||||
" z
|
||||
" Expected:
|
||||
" 1) g Ctrl-X on visually selected lines
|
||||
" y
|
||||
" x
|
||||
" w
|
||||
" v
|
||||
func Test_visual_increment_06()
|
||||
set nrformats+=alpha
|
||||
call setline(1, repeat(["z"], 4))
|
||||
exec "norm! GV3kg\<C-X>"
|
||||
call assert_equal(["y", "x", "w", "v"], getline(1, '$'))
|
||||
call assert_equal([0, 1, 1, 0], getpos('.'))
|
||||
endfunc
|
||||
|
||||
" 7) <Ctrl-A> on letter
|
||||
" Test:
|
||||
" 2
|
||||
" 1
|
||||
" 0
|
||||
" -1
|
||||
" -2
|
||||
"
|
||||
" Expected:
|
||||
" 1) Ctrl-A on visually selected lines
|
||||
" 3
|
||||
" 2
|
||||
" 1
|
||||
" 0
|
||||
" -1
|
||||
"
|
||||
" 2) Ctrl-X on visually selected lines
|
||||
" 1
|
||||
" 0
|
||||
" -1
|
||||
" -2
|
||||
" -3
|
||||
func Test_visual_increment_07()
|
||||
call setline(1, ["2", "1", "0", "-1", "-2"])
|
||||
exec "norm! GV4k\<C-A>"
|
||||
call assert_equal(["3", "2", "1", "0", "-1"], getline(1, '$'))
|
||||
call assert_equal([0, 1, 1, 0], getpos('.'))
|
||||
|
||||
call setline(1, ["2", "1", "0", "-1", "-2"])
|
||||
exec "norm! GV4k\<C-X>"
|
||||
call assert_equal(["1", "0", "-1", "-2", "-3"], getline(1, '$'))
|
||||
call assert_equal([0, 1, 1, 0], getpos('.'))
|
||||
endfunc
|
||||
|
||||
" 8) Block increment on 0x9
|
||||
" Text:
|
||||
" 0x9
|
||||
" 0x9
|
||||
" Expected:
|
||||
" 1) Ctrl-A on visually block selected region (cursor at beginning):
|
||||
" 0xa
|
||||
" 0xa
|
||||
" 2) Ctrl-A on visually block selected region (cursor at end)
|
||||
" 0xa
|
||||
" 0xa
|
||||
func Test_visual_increment_08()
|
||||
call setline(1, repeat(["0x9"], 2))
|
||||
exec "norm! \<C-V>j$\<C-A>"
|
||||
call assert_equal(["0xa", "0xa"], getline(1, '$'))
|
||||
call assert_equal([0, 1, 1, 0], getpos('.'))
|
||||
|
||||
call setline(1, repeat(["0x9"], 2))
|
||||
exec "norm! gg$\<C-V>+\<C-A>"
|
||||
call assert_equal(["0xa", "0xa"], getline(1, '$'))
|
||||
call assert_equal([0, 1, 1, 0], getpos('.'))
|
||||
endfunc
|
||||
|
||||
" 9) Increment and redo
|
||||
" Text:
|
||||
" 2
|
||||
" 2
|
||||
"
|
||||
" 3
|
||||
" 3
|
||||
"
|
||||
" Expected:
|
||||
" 1) 2 Ctrl-A on first 2 visually selected lines
|
||||
" 4
|
||||
" 4
|
||||
" 2) redo (.) on 3
|
||||
" 5
|
||||
" 5
|
||||
func Test_visual_increment_09()
|
||||
call setline(1, ["2", "2", "", "3", "3", ""])
|
||||
exec "norm! ggVj2\<C-A>"
|
||||
call assert_equal(["4", "4", "", "3", "3", ""], getline(1, '$'))
|
||||
call assert_equal([0, 1, 1, 0], getpos('.'))
|
||||
|
||||
exec "norm! 3j."
|
||||
call assert_equal(["4", "4", "", "5", "5", ""], getline(1, '$'))
|
||||
call assert_equal([0, 4, 1, 0], getpos('.'))
|
||||
endfunc
|
||||
|
||||
" 10) sequentially decrement 1
|
||||
" Text:
|
||||
" 1
|
||||
" 1
|
||||
" 1
|
||||
" 1
|
||||
" Expected:
|
||||
" 1) g Ctrl-X on visually selected lines
|
||||
" 0
|
||||
" -1
|
||||
" -2
|
||||
" -3
|
||||
func Test_visual_increment_10()
|
||||
call setline(1, repeat(["1"], 4))
|
||||
exec "norm! GV3kg\<C-X>"
|
||||
call assert_equal(["0", "-1", "-2", "-3"], getline(1, '$'))
|
||||
call assert_equal([0, 1, 1, 0], getpos('.'))
|
||||
endfunc
|
||||
|
||||
" 11) visually block selected indented lines
|
||||
" Text:
|
||||
" 1
|
||||
" 1
|
||||
" 1
|
||||
" 1
|
||||
" Expexted:
|
||||
" 1) g Ctrl-A on block selected indented lines
|
||||
" 2
|
||||
" 1
|
||||
" 3
|
||||
" 4
|
||||
func Test_visual_increment_11()
|
||||
call setline(1, [" 1", "1", " 1", " 1"])
|
||||
exec "norm! f1\<C-V>3jg\<C-A>"
|
||||
call assert_equal([" 2", "1", " 3", " 4"], getline(1, '$'))
|
||||
call assert_equal([0, 1, 5, 0], getpos('.'))
|
||||
endfunc
|
||||
|
||||
" 12) visually selected several columns
|
||||
" Text:
|
||||
" 0 0
|
||||
" 0 0
|
||||
" 0 0
|
||||
" Expected:
|
||||
" 1) 'v' select last zero and first zeroes
|
||||
" 0 1
|
||||
" 1 0
|
||||
" 1 0
|
||||
func Test_visual_increment_12()
|
||||
call setline(1, repeat(["0 0"], 3))
|
||||
exec "norm! $v++\<C-A>"
|
||||
call assert_equal(["0 1", "1 0", "1 0"], getline(1, '$'))
|
||||
call assert_equal([0, 1, 3, 0], getpos('.'))
|
||||
endfunc
|
||||
|
||||
" 13) visually selected part of columns
|
||||
" Text:
|
||||
" max: 100px
|
||||
" max: 200px
|
||||
" max: 300px
|
||||
" max: 400px
|
||||
" Expected:
|
||||
" 1) 'v' on first two numbers Ctrl-A
|
||||
" max: 110px
|
||||
" max: 220px
|
||||
" max: 330px
|
||||
" max: 400px
|
||||
" 2) 'v' on first two numbers Ctrl-X
|
||||
" max: 90px
|
||||
" max: 190px
|
||||
" max: 290px
|
||||
" max: 400px
|
||||
func Test_visual_increment_13()
|
||||
call setline(1, ["max: 100px", "max: 200px", "max: 300px", "max: 400px"])
|
||||
exec "norm! f1\<C-V>l2j\<C-A>"
|
||||
call assert_equal(["max: 110px", "max: 210px", "max: 310px", "max: 400px"], getline(1, '$'))
|
||||
call assert_equal([0, 1, 6, 0], getpos('.'))
|
||||
|
||||
call setline(1, ["max: 100px", "max: 200px", "max: 300px", "max: 400px"])
|
||||
exec "norm! ggf1\<C-V>l2j\<C-X>"
|
||||
call assert_equal(["max: 90px", "max: 190px", "max: 290px", "max: 400px"], getline(1, '$'))
|
||||
call assert_equal([0, 1, 6, 0], getpos('.'))
|
||||
endfunc
|
||||
|
||||
" 14) redo in block mode
|
||||
" Text:
|
||||
" 1 1
|
||||
" 1 1
|
||||
" Expected:
|
||||
" 1) Ctrl-a on first column, redo on second column
|
||||
" 2 2
|
||||
" 2 2
|
||||
func Test_visual_increment_14()
|
||||
call setline(1, repeat(["1 1"], 2))
|
||||
exec "norm! G\<C-V>k\<C-A>w."
|
||||
call assert_equal(["2 2", "2 2"], getline(1, '$'))
|
||||
call assert_equal([0, 1, 3, 0], getpos('.'))
|
||||
endfunc
|
||||
|
||||
" 15) block select single numbers
|
||||
" Text:
|
||||
" 101
|
||||
" Expected:
|
||||
" 1) Ctrl-a on visually selected zero
|
||||
" 111
|
||||
func Test_visual_increment_15()
|
||||
call setline(1, ["101"])
|
||||
exec "norm! lv\<C-A>"
|
||||
call assert_equal(["111"], getline(1, '$'))
|
||||
call assert_equal([0, 1, 2, 0], getpos('.'))
|
||||
endfunc
|
||||
|
||||
" 16) increment right aligned numbers
|
||||
" Text:
|
||||
" 1
|
||||
" 19
|
||||
" 119
|
||||
" Expected:
|
||||
" 1) Ctrl-a on line selected region
|
||||
" 2
|
||||
" 20
|
||||
" 120
|
||||
func Test_visual_increment_16()
|
||||
call setline(1, [" 1", " 19", " 119"])
|
||||
exec "norm! VG\<C-A>"
|
||||
call assert_equal([" 2", " 20", " 120"], getline(1, '$'))
|
||||
call assert_equal([0, 1, 1, 0], getpos('.'))
|
||||
endfunc
|
||||
|
||||
" 17) block-wise increment and redo
|
||||
" Text:
|
||||
" 100
|
||||
" 1
|
||||
"
|
||||
" 100
|
||||
" 1
|
||||
"
|
||||
" Expected:
|
||||
" 1) Ctrl-V j $ on first block, afterwards '.' on second
|
||||
" 101
|
||||
" 2
|
||||
"
|
||||
" 101
|
||||
" 2
|
||||
func Test_visual_increment_17()
|
||||
call setline(1, [" 100", " 1", "", " 100", " 1"])
|
||||
exec "norm! \<C-V>j$\<C-A>2j."
|
||||
call assert_equal([" 101", " 2", "", " 101", " 1"], getline(1, '$'))
|
||||
call assert_equal([0, 3, 1, 0], getpos('.'))
|
||||
endfunc
|
||||
|
||||
" 18) repeat of g<Ctrl-a>
|
||||
" Text:
|
||||
" 0
|
||||
" 0
|
||||
" 0
|
||||
" 0
|
||||
"
|
||||
" Expected:
|
||||
" 1) V 4j g<ctrl-a>, repeat twice afterwards with .
|
||||
" 3
|
||||
" 6
|
||||
" 9
|
||||
" 12
|
||||
func Test_visual_increment_18()
|
||||
call setline(1, repeat(["0"], 4))
|
||||
exec "norm! GV3kg\<C-A>"
|
||||
exec "norm! .."
|
||||
call assert_equal(["3", "6", "9", "12"], getline(1, '$'))
|
||||
call assert_equal([0, 1, 1, 0], getpos('.'))
|
||||
endfunc
|
||||
|
||||
" 19) increment on number with nrformat including alpha
|
||||
" Text:
|
||||
" 1
|
||||
" 1a
|
||||
"
|
||||
" Expected:
|
||||
" 1) <Ctrl-V>j$ <ctrl-a>
|
||||
" 2
|
||||
" 2a
|
||||
func Test_visual_increment_19()
|
||||
set nrformats+=alpha
|
||||
call setline(1, ["1", "1a"])
|
||||
exec "norm! \<C-V>G$\<C-A>"
|
||||
call assert_equal(["2", "2a"], getline(1, '$'))
|
||||
call assert_equal([0, 1, 1, 0], getpos('.'))
|
||||
endfunc
|
||||
|
||||
" 20) increment a single letter
|
||||
" Text:
|
||||
" a
|
||||
"
|
||||
" Expected:
|
||||
" 1) <Ctrl-a> and cursor is on a
|
||||
" b
|
||||
func Test_visual_increment_20()
|
||||
set nrformats+=alpha
|
||||
call setline(1, ["a"])
|
||||
exec "norm! \<C-A>"
|
||||
call assert_equal(["b"], getline(1, '$'))
|
||||
call assert_equal([0, 1, 1, 0], getpos('.'))
|
||||
endfunc
|
||||
|
||||
" 21) block-wise increment on part of hexadecimal
|
||||
" Text:
|
||||
" 0x123456
|
||||
"
|
||||
" Expected:
|
||||
" 1) Ctrl-V f3 <ctrl-a>
|
||||
" 0x124456
|
||||
func Test_visual_increment_21()
|
||||
call setline(1, ["0x123456"])
|
||||
exec "norm! \<C-V>f3\<C-A>"
|
||||
call assert_equal(["0x124456"], getline(1, '$'))
|
||||
call assert_equal([0, 1, 1, 0], getpos('.'))
|
||||
endfunc
|
||||
|
||||
" 22) Block increment on 0b0
|
||||
" Text:
|
||||
" 0b1
|
||||
" 0b1
|
||||
" Expected:
|
||||
" 1) Ctrl-A on visually block selected region (cursor at beginning):
|
||||
" 0b10
|
||||
" 0b10
|
||||
" 2) Ctrl-A on visually block selected region (cursor at end)
|
||||
" 0b10
|
||||
" 0b10
|
||||
func Test_visual_increment_22()
|
||||
call setline(1, repeat(["0b1"], 2))
|
||||
exec "norm! \<C-V>j$\<C-A>"
|
||||
call assert_equal(repeat(["0b10"], 2), getline(1, '$'))
|
||||
call assert_equal([0, 1, 1, 0], getpos('.'))
|
||||
|
||||
call setline(1, repeat(["0b1"], 2))
|
||||
exec "norm! $\<C-V>+\<C-A>"
|
||||
call assert_equal(repeat(["0b10"], 2), getline(1, '$'))
|
||||
call assert_equal([0, 1, 1, 0], getpos('.'))
|
||||
endfunc
|
||||
|
||||
" 23) block-wise increment on part of binary
|
||||
" Text:
|
||||
" 0b1001
|
||||
"
|
||||
" Expected:
|
||||
" 1) Ctrl-V 5l <ctrl-a>
|
||||
" 0b1011
|
||||
func Test_visual_increment_23()
|
||||
call setline(1, ["0b1001"])
|
||||
exec "norm! \<C-V>4l\<C-A>"
|
||||
call assert_equal(["0b1011"], getline(1, '$'))
|
||||
call assert_equal([0, 1, 1, 0], getpos('.'))
|
||||
endfunc
|
||||
|
||||
" 24) increment hexadecimal
|
||||
" Text:
|
||||
" 0x0b1001
|
||||
"
|
||||
" Expected:
|
||||
" 1) <ctrl-a>
|
||||
" 0x0b1002
|
||||
func Test_visual_increment_24()
|
||||
call setline(1, ["0x0b1001"])
|
||||
exec "norm! \<C-V>$\<C-A>"
|
||||
call assert_equal(["0x0b1002"], getline(1, '$'))
|
||||
call assert_equal([0, 1, 1, 0], getpos('.'))
|
||||
endfunc
|
||||
|
||||
" 25) increment binary with nrformats including alpha
|
||||
" Text:
|
||||
" 0b1001a
|
||||
"
|
||||
" Expected:
|
||||
" 1) <ctrl-a>
|
||||
" 0b1010a
|
||||
func Test_visual_increment_25()
|
||||
set nrformats+=alpha
|
||||
call setline(1, ["0b1001a"])
|
||||
exec "norm! \<C-V>$\<C-A>"
|
||||
call assert_equal(["0b1010a"], getline(1, '$'))
|
||||
call assert_equal([0, 1, 1, 0], getpos('.'))
|
||||
endfunc
|
||||
|
||||
" 26) increment binary with 32 bits
|
||||
" Text:
|
||||
" 0b11111111111111111111111111111110
|
||||
"
|
||||
" Expected:
|
||||
" 1) <ctrl-a>
|
||||
" 0b11111111111111111111111111111111
|
||||
func Test_visual_increment_26()
|
||||
set nrformats+=alpha
|
||||
call setline(1, ["0b11111111111111111111111111111110"])
|
||||
exec "norm! \<C-V>$\<C-A>"
|
||||
call assert_equal(["0b11111111111111111111111111111111"], getline(1, '$'))
|
||||
call assert_equal([0, 1, 1, 0], getpos('.'))
|
||||
set nrformats-=alpha
|
||||
endfunc
|
||||
|
||||
" 27) increment with 'rightreft', if supported
|
||||
func Test_visual_increment_27()
|
||||
if exists('+rightleft')
|
||||
set rightleft
|
||||
call setline(1, ["1234 56"])
|
||||
|
||||
exec "norm! $\<C-A>"
|
||||
call assert_equal(["1234 57"], getline(1, '$'))
|
||||
call assert_equal([0, 1, 7, 0], getpos('.'))
|
||||
|
||||
exec "norm! \<C-A>"
|
||||
call assert_equal(["1234 58"], getline(1, '$'))
|
||||
call assert_equal([0, 1, 7, 0], getpos('.'))
|
||||
set norightleft
|
||||
endif
|
||||
endfunc
|
||||
|
||||
" Tab code and linewise-visual inc/dec
|
||||
func Test_visual_increment_28()
|
||||
call setline(1, ["x\<TAB>10", "\<TAB>-1"])
|
||||
exec "norm! Vj\<C-A>"
|
||||
call assert_equal(["x\<TAB>11", "\<TAB>0"], getline(1, '$'))
|
||||
call assert_equal([0, 1, 1, 0], getpos('.'))
|
||||
|
||||
call setline(1, ["x\<TAB>10", "\<TAB>-1"])
|
||||
exec "norm! ggVj\<C-X>"
|
||||
call assert_equal(["x\<TAB>9", "\<TAB>-2"], getline(1, '$'))
|
||||
call assert_equal([0, 1, 1, 0], getpos('.'))
|
||||
endfunc
|
||||
|
||||
" Tab code and linewise-visual inc/dec with 'nrformats'+=alpha
|
||||
func Test_visual_increment_29()
|
||||
set nrformats+=alpha
|
||||
call setline(1, ["x\<TAB>10", "\<TAB>-1"])
|
||||
exec "norm! Vj\<C-A>"
|
||||
call assert_equal(["y\<TAB>10", "\<TAB>0"], getline(1, '$'))
|
||||
call assert_equal([0, 1, 1, 0], getpos('.'))
|
||||
|
||||
call setline(1, ["x\<TAB>10", "\<TAB>-1"])
|
||||
exec "norm! ggVj\<C-X>"
|
||||
call assert_equal(["w\<TAB>10", "\<TAB>-2"], getline(1, '$'))
|
||||
call assert_equal([0, 1, 1, 0], getpos('.'))
|
||||
endfunc
|
||||
|
||||
" Tab code and character-visual inc/dec
|
||||
func Test_visual_increment_30()
|
||||
call setline(1, ["x\<TAB>10", "\<TAB>-1"])
|
||||
exec "norm! f1vjf1\<C-A>"
|
||||
call assert_equal(["x\<TAB>11", "\<TAB>0"], getline(1, '$'))
|
||||
call assert_equal([0, 1, 3, 0], getpos('.'))
|
||||
|
||||
call setline(1, ["x\<TAB>10", "\<TAB>-1"])
|
||||
exec "norm! ggf1vjf1\<C-X>"
|
||||
call assert_equal(["x\<TAB>9", "\<TAB>-2"], getline(1, '$'))
|
||||
call assert_equal([0, 1, 3, 0], getpos('.'))
|
||||
endfunc
|
||||
|
||||
" Tab code and blockwise-visual inc/dec
|
||||
func Test_visual_increment_31()
|
||||
call setline(1, ["x\<TAB>10", "\<TAB>-1"])
|
||||
exec "norm! f1\<C-V>jl\<C-A>"
|
||||
call assert_equal(["x\<TAB>11", "\<TAB>0"], getline(1, '$'))
|
||||
call assert_equal([0, 1, 3, 0], getpos('.'))
|
||||
|
||||
call setline(1, ["x\<TAB>10", "\<TAB>-1"])
|
||||
exec "norm! ggf1\<C-V>jl\<C-X>"
|
||||
call assert_equal(["x\<TAB>9", "\<TAB>-2"], getline(1, '$'))
|
||||
call assert_equal([0, 1, 3, 0], getpos('.'))
|
||||
endfunc
|
||||
|
||||
" Tab code and blockwise-visual decrement with 'linebreak' and 'showbreak'
|
||||
func Test_visual_increment_32()
|
||||
28vnew dummy_31
|
||||
set linebreak showbreak=+
|
||||
call setline(1, ["x\<TAB>\<TAB>\<TAB>10", "\<TAB>\<TAB>\<TAB>\<TAB>-1"])
|
||||
exec "norm! ggf0\<C-V>jg_\<C-X>"
|
||||
call assert_equal(["x\<TAB>\<TAB>\<TAB>1-1", "\<TAB>\<TAB>\<TAB>\<TAB>-2"], getline(1, '$'))
|
||||
call assert_equal([0, 1, 6, 0], getpos('.'))
|
||||
bwipe!
|
||||
endfunc
|
||||
|
||||
" Tab code and blockwise-visual increment with $
|
||||
func Test_visual_increment_33()
|
||||
call setline(1, ["\<TAB>123", "456"])
|
||||
exec "norm! gg0\<C-V>j$\<C-A>"
|
||||
call assert_equal(["\<TAB>124", "457"], getline(1, '$'))
|
||||
call assert_equal([0, 1, 1, 0], getpos('.'))
|
||||
endfunc
|
||||
|
||||
" Tab code and blockwise-visual increment and redo
|
||||
func Test_visual_increment_34()
|
||||
call setline(1, ["\<TAB>123", " 456789"])
|
||||
exec "norm! gg0\<C-V>j\<C-A>"
|
||||
call assert_equal(["\<TAB>123", " 457789"], getline(1, '$'))
|
||||
call assert_equal([0, 1, 1, 0], getpos('.'))
|
||||
|
||||
exec "norm! .."
|
||||
call assert_equal(["\<TAB>123", " 459789"], getline(1, '$'))
|
||||
call assert_equal([0, 1, 1, 0], getpos('.'))
|
||||
endfunc
|
||||
|
||||
" Tab code, spaces and character-visual increment and redo
|
||||
func Test_visual_increment_35()
|
||||
call setline(1, ["\<TAB>123", " 123", "\<TAB>123", "\<TAB>123"])
|
||||
exec "norm! ggvjf3\<C-A>..."
|
||||
call assert_equal(["\<TAB>127", " 127", "\<TAB>123", "\<TAB>123"], getline(1, '$'))
|
||||
call assert_equal([0, 1, 2, 0], getpos('.'))
|
||||
endfunc
|
||||
|
||||
" Tab code, spaces and blockwise-visual increment and redo
|
||||
func Test_visual_increment_36()
|
||||
call setline(1, [" 123", "\<TAB>456789"])
|
||||
exec "norm! G0\<C-V>kl\<C-A>"
|
||||
call assert_equal([" 123", "\<TAB>556789"], getline(1, '$'))
|
||||
call assert_equal([0, 1, 1, 0], getpos('.'))
|
||||
|
||||
exec "norm! ..."
|
||||
call assert_equal([" 123", "\<TAB>856789"], getline(1, '$'))
|
||||
call assert_equal([0, 1, 1, 0], getpos('.'))
|
||||
endfunc
|
||||
|
||||
" block-wise increment and dot-repeat
|
||||
" Text:
|
||||
" 1 23
|
||||
" 4 56
|
||||
"
|
||||
" Expected:
|
||||
" 1) f2 Ctrl-V jl <ctrl-a>, repeat twice afterwards with .
|
||||
" 1 26
|
||||
" 4 59
|
||||
"
|
||||
" Try with and without indent.
|
||||
func Test_visual_increment_37()
|
||||
call setline(1, [" 1 23", " 4 56"])
|
||||
exec "norm! ggf2\<C-V>jl\<C-A>.."
|
||||
call assert_equal([" 1 26", " 4 59"], getline(1, 2))
|
||||
|
||||
call setline(1, ["1 23", "4 56"])
|
||||
exec "norm! ggf2\<C-V>jl\<C-A>.."
|
||||
call assert_equal(["1 26", "4 59"], getline(1, 2))
|
||||
endfunc
|
||||
|
||||
" Check redo after the normal mode increment
|
||||
func Test_visual_increment_38()
|
||||
exec "norm! i10\<ESC>5\<C-A>."
|
||||
call assert_equal(["20"], getline(1, '$'))
|
||||
call assert_equal([0, 1, 2, 0], getpos('.'))
|
||||
endfunc
|
||||
|
||||
" vim: tabstop=2 shiftwidth=2 expandtab
|
||||
@@ -8,11 +8,27 @@ STARTTEST
|
||||
madduu
|
||||
:let a = string(getpos("'a"))
|
||||
:$put ='Mark after delete-undo-redo-undo: '.a
|
||||
:/^\t/,$wq! test.out
|
||||
:''
|
||||
ENDTEST
|
||||
|
||||
textline A
|
||||
textline B
|
||||
textline C
|
||||
|
||||
STARTTEST
|
||||
:" test that CTRL-A and CTRL-X updates last changed mark '[, '].
|
||||
:/^123/
|
||||
:execute "normal! \<C-A>`[v`]rAjwvjw\<C-X>`[v`]rX"
|
||||
ENDTEST
|
||||
|
||||
CTRL-A CTRL-X:
|
||||
123 123 123
|
||||
123 123 123
|
||||
123 123 123
|
||||
|
||||
STARTTEST
|
||||
:g/^STARTTEST/.,/^ENDTEST/d
|
||||
:wq! test.out
|
||||
ENDTEST
|
||||
|
||||
Results:
|
||||
|
||||
@@ -1,6 +1,16 @@
|
||||
Tests for marks.
|
||||
|
||||
|
||||
textline A
|
||||
textline B
|
||||
textline C
|
||||
|
||||
|
||||
CTRL-A CTRL-X:
|
||||
AAA 123 123
|
||||
123 XXXXXXX
|
||||
XXX 123 123
|
||||
|
||||
|
||||
Results:
|
||||
Mark after delete-undo-redo-undo: [0, 15, 2, 0]
|
||||
|
||||
@@ -72,7 +72,7 @@ endfunction
|
||||
|
||||
" Tests for the :colder, :cnewer, :lolder and :lnewer commands
|
||||
" Note that this test assumes that a quickfix/location list is
|
||||
" already set by previous tests
|
||||
" already set by the caller.
|
||||
function XageTests(cchar)
|
||||
let Xolder = a:cchar . 'older'
|
||||
let Xnewer = a:cchar . 'newer'
|
||||
@@ -116,7 +116,11 @@ function XageTests(cchar)
|
||||
endfunction
|
||||
|
||||
function Test_cage()
|
||||
let list = [{'bufnr': 1, 'lnum': 1}]
|
||||
call setqflist(list)
|
||||
call XageTests('c')
|
||||
|
||||
call setloclist(0, list)
|
||||
call XageTests('l')
|
||||
endfunction
|
||||
|
||||
@@ -273,3 +277,42 @@ function Test_cbuffer()
|
||||
call XbufferTests('l')
|
||||
endfunction
|
||||
|
||||
function Test_nomem()
|
||||
call alloc_fail(GetAllocId('qf_dirname_start'), 0, 0)
|
||||
try
|
||||
vimgrep vim runtest.vim
|
||||
catch
|
||||
call assert_true(v:exception =~ 'E342')
|
||||
endtry
|
||||
|
||||
call alloc_fail(GetAllocId('qf_dirname_now'), 0, 0)
|
||||
try
|
||||
vimgrep vim runtest.vim
|
||||
catch
|
||||
call assert_true(v:exception =~ 'E342')
|
||||
endtry
|
||||
|
||||
call alloc_fail(GetAllocId('qf_namebuf'), 0, 0)
|
||||
try
|
||||
cfile runtest.vim
|
||||
catch
|
||||
call assert_true(v:exception =~ 'E342')
|
||||
endtry
|
||||
|
||||
call alloc_fail(GetAllocId('qf_errmsg'), 0, 0)
|
||||
try
|
||||
cfile runtest.vim
|
||||
catch
|
||||
call assert_true(v:exception =~ 'E342')
|
||||
endtry
|
||||
|
||||
call alloc_fail(GetAllocId('qf_pattern'), 0, 0)
|
||||
try
|
||||
cfile runtest.vim
|
||||
catch
|
||||
call assert_true(v:exception =~ 'E342')
|
||||
endtry
|
||||
|
||||
endfunc
|
||||
|
||||
|
||||
|
||||
@@ -7,6 +7,12 @@ func Test_read_only()
|
||||
catch
|
||||
call assert_true(v:exception =~ ':E795:')
|
||||
endtry
|
||||
try
|
||||
" this caused a crash
|
||||
unlet errmsg
|
||||
catch
|
||||
call assert_true(v:exception =~ ':E795:')
|
||||
endtry
|
||||
endfunc
|
||||
|
||||
func Test_existing()
|
||||
|
||||
@@ -756,6 +756,78 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1090,
|
||||
/**/
|
||||
1089,
|
||||
/**/
|
||||
1088,
|
||||
/**/
|
||||
1087,
|
||||
/**/
|
||||
1086,
|
||||
/**/
|
||||
1085,
|
||||
/**/
|
||||
1084,
|
||||
/**/
|
||||
1083,
|
||||
/**/
|
||||
1082,
|
||||
/**/
|
||||
1081,
|
||||
/**/
|
||||
1080,
|
||||
/**/
|
||||
1079,
|
||||
/**/
|
||||
1078,
|
||||
/**/
|
||||
1077,
|
||||
/**/
|
||||
1076,
|
||||
/**/
|
||||
1075,
|
||||
/**/
|
||||
1074,
|
||||
/**/
|
||||
1073,
|
||||
/**/
|
||||
1072,
|
||||
/**/
|
||||
1071,
|
||||
/**/
|
||||
1070,
|
||||
/**/
|
||||
1069,
|
||||
/**/
|
||||
1068,
|
||||
/**/
|
||||
1067,
|
||||
/**/
|
||||
1066,
|
||||
/**/
|
||||
1065,
|
||||
/**/
|
||||
1064,
|
||||
/**/
|
||||
1063,
|
||||
/**/
|
||||
1062,
|
||||
/**/
|
||||
1061,
|
||||
/**/
|
||||
1060,
|
||||
/**/
|
||||
1059,
|
||||
/**/
|
||||
1058,
|
||||
/**/
|
||||
1057,
|
||||
/**/
|
||||
1056,
|
||||
/**/
|
||||
1055,
|
||||
/**/
|
||||
1054,
|
||||
/**/
|
||||
|
||||
@@ -1460,6 +1460,10 @@ typedef UINT32_TYPEDEF UINT32_T;
|
||||
#define OP_FOLDDELREC 25 /* "zD" delete folds recursively */
|
||||
#define OP_FORMAT2 26 /* "gw" format operator, keeps cursor pos */
|
||||
#define OP_FUNCTION 27 /* "g@" call 'operatorfunc' */
|
||||
#define OP_NR_ADD 28 /* "<C-A>" Add to the number or alphabetic
|
||||
character (OP_ADD conflicts with Perl) */
|
||||
#define OP_NR_SUB 29 /* "<C-X>" Subtract from the number or
|
||||
alphabetic character */
|
||||
|
||||
/*
|
||||
* Motion types, used for operators and for yank/delete registers.
|
||||
@@ -1768,6 +1772,8 @@ typedef int proftime_T; /* dummy for function prototypes */
|
||||
|
||||
#include "structs.h" /* file that defines many structures */
|
||||
|
||||
#include "alloc.h"
|
||||
|
||||
/* Values for "do_profiling". */
|
||||
#define PROF_NONE 0 /* profiling not started */
|
||||
#define PROF_YES 1 /* profiling busy */
|
||||
|
||||
Reference in New Issue
Block a user