Compare commits

...

45 Commits

Author SHA1 Message Date
Kazuki Sakamoto 8bd158609c MacVim Snapshot 82
Binary targets OS X 10.8(Mountain Lion), 10.9(Mavericks), 10.10(Yosemite), and 10.11(El Capitan)

- Vim patch 7.4.922
- Fix spacing issues on Ligatures
- Improve redraw behavior on Ligatures
- Introduce 'macligatures' option for enabling Ligatures

Script interfaces have compatibility with these versions

- Lua 5.2
- Perl 5.16
- Python2 2.7
- Python3 3.5
- Ruby 2.0
2015-11-15 16:34:57 -08:00
Kazuki Sakamoto 3be9d63f36 Merge pull request #139 from macvim-dev/fix/ligatures_crash
Fix EXC_BAD_ACCESS during inline IM rendering with macligatures and code format
2015-11-15 13:10:04 -08:00
Kazuki Sakamoto 22761e24ac Fix code format and change ligatureGlyphsForChars return type 2015-11-15 11:03:41 -08:00
Kazuki Sakamoto 1172ff20a3 Fix EXC_BAD_ACCESS during inline IM rendering with macligatures 2015-11-15 11:03:41 -08:00
Kazuki Sakamoto bc26247936 Merge pull request #138 from macvim-dev/fix/update_macligatures_option
Update macligatures option
2015-11-14 19:28:37 -08:00
Kazuki Sakamoto 428d116c2f Update macligatures option
Reorder alphabetically
2015-11-14 15:02:48 -08:00
chdiza 67fbd20c27 Merge pull request #136 from Shirk/bugfix/macligatures_cleanups
Fix typos and dead code for #135
2015-11-14 14:51:06 -05:00
René Köcher 633f4f321d Fix typos and dead code for #135
fixes #135
2015-11-14 20:34:51 +01:00
Kazuki Sakamoto 2f4d38b7cb Merge pull request #133 from Shirk/feature/macligatures_redraw_additions
Improve redraw behavior when macligatures is active.
2015-11-14 08:12:49 -08:00
Shirk 0a0c7a7795 Fix logic when checking for w_p_rnu && w_p_cul. 2015-11-14 13:56:10 +01:00
René Köcher f538ee38f3 Add additional redraw checks for macligatures. 2015-11-14 13:47:20 +01:00
René Köcher 0563b55334 Make p_macligatures available outside options.c 2015-11-14 13:46:57 +01:00
René Köcher c6cf65bf8e Update macligatures documentation. 2015-11-14 13:45:38 +01:00
Kazuki Sakamoto 86347d10e3 Merge pull request #131 from macvim-dev/fix/macligatures_option_redraw
Add P_RCLR flag to macligatures for proper redrawing
2015-11-13 22:13:33 -08:00
Kazuki Sakamoto 9d566fc817 Merge pull request #132 from macvim-dev/fix/guifontwide_size
Fix guifontwide size
2015-11-13 22:13:20 -08:00
Kazuki Sakamoto 72a9e3241a Fix guifontwide size 2015-11-13 21:57:17 -08:00
Kazuki Sakamoto 6183831763 Add P_RCLR flag to macligatures for proper redrawing 2015-11-13 21:31:12 -08:00
Kazuki Sakamoto 837dff42ce Merge pull request #129 from macvim-dev/feature/macligatures_option
Add macligatures option
2015-11-13 14:41:54 -08:00
René Köcher a2937e2731 Add documentation macligatures option (#129). 2015-11-13 23:02:11 +01:00
Kazuki Sakamoto a2c32aa3af Add macligatures option
Revert Preferences.nib
2015-11-13 12:56:28 -08:00
Kazuki Sakamoto 2696990550 Merge pull request #122 from Shirk/ligature_fixes
Fix spacing issues on ligatures as seen on #36.
2015-11-13 12:12:15 -08:00
René Köcher 2a3e654b19 Add more explanation for the required setup.
Make it clear that currently ligatures will only draw properly with
`cursorline` or `relativenumber` enabled.
2015-11-13 20:39:55 +01:00
Kazuki Sakamoto 76622a712a Fix #128 single-width chars 2015-11-13 08:50:29 -08:00
Kazuki Sakamoto ef3ec974bf Merge remote-tracking branch 'vim/master' 2015-11-11 05:05:14 -08:00
Bram Moolenaar b4ff518d95 Updated runtime files. 2015-11-10 21:15:48 +01:00
Bram Moolenaar 1c2836e268 patch 7.4.922
Problem:    Leaking memory with ":helpt {dir-not-exists}".
Solution:   Free dirname. (Dominique Pelle)
2015-11-10 21:05:48 +01:00
Bram Moolenaar cd1c55f706 patch 7.4.921
Problem:    Missing proto file update. (Randall W. Morris)
Solution:   Add the missing line for mch_ishidden.
2015-11-10 20:52:04 +01:00
Bram Moolenaar a93f975e8b patch 7.4.920
Problem:    The rubydll option is not in the options window.
Solution:   Add the rubydll option.
2015-11-10 20:45:09 +01:00
Bram Moolenaar d4ece23e2e patch 7.4.919
Problem:    The dll options are not in the options window.
Solution:   Add the dll options.  And other fixes.
2015-11-10 19:48:14 +01:00
Bram Moolenaar 0796c0625f patch 7.4.918
Problem:    A digit in an option name has problems.
Solution:   Rename 'python3dll' to 'pythonthreedll'.
2015-11-10 19:41:37 +01:00
Bram Moolenaar 1be2ed6c11 patch 7.4.917
Problem:    Compiler warning for comparing signed and unsigned.
Solution:   Add a type cast.
2015-11-10 19:11:58 +01:00
Bram Moolenaar 8648357841 patch 7.4.916
Problem:    When running out of memory while copying a dict memory may be
            freed twice. (ZyX)
Solution:   Do not call the garbage collector when running out of memory.
2015-11-10 19:04:23 +01:00
Bram Moolenaar 174674743d patch 7.4.915
Problem:    When removing from 'path' and then adding, a comma may go missing.
            (Malcolm Rowe)
Solution:   Fix the check for P_ONECOMMA. (closes #471)
2015-11-10 17:50:24 +01:00
Bram Moolenaar 98b30a473a patch 7.4.914
Problem:    New compiler warning: logical-not-parentheses
Solution:   Silence the warning.
2015-11-10 15:18:02 +01:00
Bram Moolenaar 72f4cc4a98 patch 7.4.913
Problem:    No utf-8 support for the hangul input feature.
Solution:   Add utf-8 support. (Namsh)
2015-11-10 14:35:18 +01:00
Bram Moolenaar e01f4f86ce patch 7.4.912
Problem:    Wrong indenting for C++ constructor.
Solution:   Recognize ::.  (Anhong)
2015-11-10 14:06:53 +01:00
Bram Moolenaar 450ca4335e patch 7.4.911
Problem:    t_Ce and t_Cs are documented but not supported. (Hirohito Higashi)
Solution:   Define the options.
2015-11-10 13:30:39 +01:00
Bram Moolenaar e7427f4b7e patch 7.4.910
Problem:    Compiler complains about type punned pointer.
Solution:   Use another way to increment the ref count.
2015-11-10 13:24:20 +01:00
Kazuki Sakamoto 34feb77c6b Merge pull request #125 from macvim-dev/fix/PSMTabBarControl-warnings
Fix deprecated setFlipped warnings in PSMTabBarControl
2015-11-09 08:59:10 -08:00
René Köcher 58558bdbd2 Improve handling of emoji characters along ligatures. 2015-11-08 15:34:43 +01:00
René Köcher 201c6b74e4 Fall back to basic ligatures(1) not full(2). 2015-11-08 11:53:46 +01:00
Kazuki Sakamoto d086e4bcf6 Fix deprecated setFlipped warnings in PSMTabBarControl
Delete unused PSMAquaTabStyle
2015-11-07 22:44:22 -08:00
René Köcher 91152d1fca Fix spacing issues on ligatures as seen on #36.
Do a proper analysis of the ligatures (if any) and try to avoid double
character draws / moving spaces etc.
2015-11-07 23:25:35 +01:00
Kazuki Sakamoto e0c895dadf Merge pull request #118 from macvim-dev/fix/showtabline_redraw_issue
Fix showtabline=2/0 redraw issue similar with #64
2015-11-06 08:22:11 -08:00
Kazuki Sakamoto b28d8e8106 Fix showtabline=2/0 redraw issue similar with #64 2015-11-05 20:35:12 -08:00
62 changed files with 2500 additions and 1285 deletions
+3 -3
View File
@@ -1,4 +1,4 @@
*diff.txt* For Vim version 7.4. Last change: 2015 Jul 03
*diff.txt* For Vim version 7.4. Last change: 2015 Nov 01
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -182,8 +182,8 @@ hidden buffers. You can use ":hide" to close a window without unloading the
buffer. If you don't want a buffer to remain used for the diff do ":set
nodiff" before hiding it.
*:diffu* *:diffupdate*
:diffu[pdate][!] Update the diff highlighting and folds.
*:dif* *:diffupdate*
:dif[fupdate][!] Update the diff highlighting and folds.
Vim attempts to keep the differences updated when you make changes to the
text. This mostly takes care of inserted and deleted lines. Changes within a
+1 -1
View File
@@ -111,7 +111,7 @@ to your .gvimrc file to revert back to the default Vim tab label.
*macvim-options*
These are the non-standard options that MacVim supports:
'antialias' 'blurradius' 'fullscreen'
'fuoptions' 'macmeta' 'toolbariconsize'
'fuoptions' 'macligatures' 'macmeta' 'toolbariconsize'
'transparency'
*macvim-commands*
+29 -22
View File
@@ -1,11 +1,8 @@
*hangulin.txt* For Vim version 7.4. Last change: 2009 Jun 24
*hangulin.txt* For Vim version 7.4. Last change: 2015 Nov 10
VIM REFERENCE MANUAL by Chi-Deok Hwang and Sung-Hyun Nam
NOTE: The |+hangul_input| feature is scheduled to be removed. If you want to
keep it, please send a message to the Vim user maillist.
Introduction *hangul*
------------
@@ -17,7 +14,8 @@ Compile
-------
Next is a basic option. You can add any other configure option. >
./configure --with-x --enable-multibyte --enable-fontset --enable-hangulinput
./configure --with-x --enable-multibyte --enable-hangulinput \
--disable-xim
And you should check feature.h. If |+hangul_input| feature is enabled
by configure, you can select more options such as keyboard type, 2 bulsik
@@ -26,18 +24,21 @@ or 3 bulsik. You can find keywords like next in there. >
#define HANGUL_DEFAULT_KEYBOARD 2
#define ESC_CHG_TO_ENG_MODE
/* #define X_LOCALE */
/* #define SLOW_XSERVER */
Environment variables
---------------------
You should set LANG variable to Korean locale such as ko or ko_KR.euc.
You should set LANG variable to Korean locale such as ko, ko_KR.eucKR
or ko_KR.UTF-8.
If you set LC_ALL variable, it should be set to Korean locale also.
VIM resource
------------
You should add nexts to your global vimrc ($HOME/.vimrc). >
You may want to set 'encoding' and 'fileencodings'.
Next are examples:
:set fileencoding=korea
:set encoding=euc-kr
:set encoding=utf-8
:set fileencodings=ucs-bom,utf-8,cp949,euc-kr,latin1
Keyboard
--------
@@ -52,8 +53,16 @@ If both are set, VIM_KEYBOARD has higher priority.
Hangul Fonts
------------
You can set text font using $HOME/.Xdefaults or in your gvimrc file.
But to use Hangul, you should set 'guifontset' in your vimrc.
If you use GTK version of GVIM, you should set 'guifont' and 'guifontwide'.
For example:
set guifont=Courier\ 12
set guifontwide=NanumGothicCoding\ 12
If you use Motif or Athena version of GVIM, you should set 'guifontset' in
your vimrc. You can set fontset in the .Xdefaults file.
$HOME/.gvimrc: >
set guifontset=english_font,hangul_font
$HOME/.Xdefaults: >
Vim.font: english_font
@@ -66,40 +75,38 @@ $HOME/.Xdefaults: >
*international: True
Vim*fontList: english_font;hangul_font:
$HOME/.gvimrc: >
set guifontset=english_font,hangul_font
attention! the , (comma) or ; (semicolon)
And there should be no ':set guifont'. If it exists, then Gvim ignores
':set guifontset'. It means VIM runs without fontset supporting.
So, you can see only English. Hangul does not be correctly displayed.
After 'fontset' feature is enabled, VIM does not allow using 'font'.
After 'fontset' feature is enabled, VIM does not allow using english
font only in 'font' setting for syntax.
For example, if you use >
:set guifontset=eng_font,your_font
in your .gvimrc, then you should do for syntax >
:hi Comment guifg=Cyan font=another_eng_font,another_your_font
If you just do >
:hi Comment font=another_eng_font
then you can see a GOOD error message. Be careful!
then you can see a error message. Be careful!
hangul_font width should be twice than english_font width.
Unsupported Feature
-------------------
Johab font not yet supported. And I don't have any plan.
If you really want to use johab font, you can use the
hanguldraw.c in gau package.
We don't support Johab font.
We don't support Hanja input.
And We don't have any plan to support them.
Hanja input not yet supported. And I don't have any plan.
If you really want to input hanja, just use VIM with hanterm.
If you really need such features, you can use console version of VIM with a
capable terminal emulator.
Bug or Comment
--------------
Send comments, patches and suggestions to:
Chi-Deok Hwang <hwang@mizi.co.kr>
SungHyun Nam <goweol@gmail.com>
Chi-Deok Hwang <...>
vim:tw=78:ts=8:ft=help:norl:
+2 -2
View File
@@ -1,4 +1,4 @@
*if_pyth.txt* For Vim version 7.4. Last change: 2015 Oct 16
*if_pyth.txt* For Vim version 7.4. Last change: 2015 Nov 10
VIM REFERENCE MANUAL by Paul Moore
@@ -693,7 +693,7 @@ The name of the DLL must match the Python version Vim was compiled with.
Currently the name is "python24.dll". That is for Python 2.4. To know for
sure edit "gvim.exe" and search for "python\d*.dll\c".
On Unix the 'pythondll' or 'python3dll' option can be used to specify the
On Unix the 'pythondll' or 'pythonthreedll' option can be used to specify the
Python shared library file instead of DYNAMIC_PYTHON_DLL or
DYNAMIC_PYTHON3_DLL file what were specified at compile time. The version of
the shared library must match the Python 2.x or Python 3 version Vim was
+25 -12
View File
@@ -1,4 +1,4 @@
*options.txt* For Vim version 7.4. Last change: 2015 Nov 01
*options.txt* For Vim version 7.4. Last change: 2015 Nov 10
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -4985,6 +4985,19 @@ A jump table for the options with a short description can be found at |Q_op|.
'termencoding'.
Note: MacVim does not use this option.
*'macligatures'* *'nomacligatures'*
'macligatures' boolean (default off)
global
{not in Vi}
{only available when compiled with GUI enabled on
Mac OS X}
This option only has an effect in the GUI version of Vim on Mac OS X
v10.5 or later. When on, Vim will display ligatures if the selected
'guifont' supports them. Examples for such fonts are Fira Code or
Haskelig.
Note: Currently this option only has an effect if
'Use Core Text renderer' is enabled in the GUI preferences pane.
*'macmeta'* *'mmta'* *'nomacmeta'* *'nommta'*
'macmeta' boolean (default off)
local to buffer
@@ -5821,17 +5834,6 @@ A jump table for the options with a short description can be found at |Q_op|.
Insert mode completion. When zero as much space as available is used.
|ins-completion-menu|.
*'python3dll'*
'python3dll' string (default empty)
global
{not in Vi} {only for Unix}
{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.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
*'pythondll'*
'pythondll' string (default empty)
global
@@ -5841,6 +5843,17 @@ A jump table for the options with a short description can be found at |Q_op|.
Specifies the path of the Python 2.x shared library instead of
DYNAMIC_PYTHON_DLL what 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)
global
{not in Vi} {only for Unix}
{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.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
*'quoteescape'* *'qe'*
+7 -1
View File
@@ -1,4 +1,4 @@
*quickref.txt* For Vim version 7.4. Last change: 2015 Jul 21
*quickref.txt* For Vim version 7.4. Last change: 2015 Nov 10
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -780,7 +780,9 @@ Short explanation of each option: *option-list*
'list' show <Tab> and <EOL>
'listchars' 'lcs' characters for displaying in list mode
'loadplugins' 'lpl' load plugin scripts when starting up
'luadll' name of the Lua dynamic library
'macatsui' Mac GUI: use ATSUI text drawing
'macligatures' display ligatures (MacVim GUI only)
'macmeta' 'mmta' use option as meta key (MacVim GUI only)
'magic' changes special characters in search patterns
'makeef' 'mef' name of the errorfile for ":make"
@@ -820,6 +822,7 @@ Short explanation of each option: *option-list*
'patchexpr' 'pex' expression used to patch a file
'patchmode' 'pm' keep the oldest version of a file
'path' 'pa' list of directories searched with "gf" et.al.
'perldll' name of the Perl dynamic library
'preserveindent' 'pi' preserve the indent structure when reindenting
'previewheight' 'pvh' height of the preview window
'previewwindow' 'pvw' identifies the preview window
@@ -832,6 +835,8 @@ Short explanation of each option: *option-list*
'printmbfont' 'pmbfn' font names to be used for CJK output of :hardcopy
'printoptions' 'popt' controls the format of :hardcopy output
'pumheight' 'ph' maximum height of the popup menu
'pythondll' name of the Python 2 dynamic library
'pythonthreedll' name of the Python 3 dynamic library
'quoteescape' 'qe' escape characters used in a string
'readonly' 'ro' disallow writing the buffer
'redrawtime' 'rdt' timeout for 'hlsearch' and |:match| highlighting
@@ -844,6 +849,7 @@ Short explanation of each option: *option-list*
'revins' 'ri' inserting characters will work backwards
'rightleft' 'rl' window is right-to-left oriented
'rightleftcmd' 'rlc' commands for which editing works right-to-left
'rubydll' name of the Ruby dynamic library
'ruler' 'ru' show cursor line and column in the status line
'rulerformat' 'ruf' custom format for the ruler
'runtimepath' 'rtp' list of directories used for runtime files
+3 -2
View File
@@ -1,4 +1,4 @@
*syntax.txt* For Vim version 7.4. Last change: 2015 Oct 17
*syntax.txt* For Vim version 7.4. Last change: 2015 Nov 05
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1082,6 +1082,7 @@ Most of things are same as |ft-c-syntax|.
Variable Highlight ~
cpp_no_cpp11 don't highlight C++11 standard items
cpp_no_cpp14 don't highlight C++14 standard items
CSH *csh.vim* *ft-csh-syntax*
@@ -4165,7 +4166,7 @@ example, for instance, can be done like this: >
As can be seen here, the \z actually does double duty. In the start pattern,
it marks the "\(\I\i*\)" sub-expression as external; in the end pattern, it
changes the \1 back-reference into an external reference referring to the
changes the \z1 back-reference into an external reference referring to the
first external sub-expression in the start pattern. External references can
also be used in skip patterns: >
:syn region foo start="start \(\I\i*\)" skip="not end \z1" end="end \z1"
+15 -1
View File
@@ -421,10 +421,12 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
'lpl' options.txt /*'lpl'*
'ls' options.txt /*'ls'*
'lsp' options.txt /*'lsp'*
'luadll' options.txt /*'luadll'*
'lw' options.txt /*'lw'*
'lz' options.txt /*'lz'*
'ma' options.txt /*'ma'*
'macatsui' options.txt /*'macatsui'*
'macligatures' options.txt /*'macligatures'*
'macmeta' options.txt /*'macmeta'*
'magic' options.txt /*'magic'*
'makeef' options.txt /*'makeef'*
@@ -507,6 +509,8 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
'nobk' options.txt /*'nobk'*
'nobl' options.txt /*'nobl'*
'nobomb' options.txt /*'nobomb'*
'nobreakindent' options.txt /*'nobreakindent'*
'nobri' options.txt /*'nobri'*
'nobuflisted' options.txt /*'nobuflisted'*
'nocf' options.txt /*'nocf'*
'noci' options.txt /*'noci'*
@@ -557,6 +561,8 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
'nofk' options.txt /*'nofk'*
'nofkmap' options.txt /*'nofkmap'*
'nofoldenable' options.txt /*'nofoldenable'*
'nofs' options.txt /*'nofs'*
'nofsync' options.txt /*'nofsync'*
'nofu' options.txt /*'nofu'*
'nofullscreen' options.txt /*'nofullscreen'*
'nogd' options.txt /*'nogd'*
@@ -585,16 +591,19 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
'nois' options.txt /*'nois'*
'nojoinspaces' options.txt /*'nojoinspaces'*
'nojs' options.txt /*'nojs'*
'nolangnoremap' options.txt /*'nolangnoremap'*
'nolazyredraw' options.txt /*'nolazyredraw'*
'nolbr' options.txt /*'nolbr'*
'nolinebreak' options.txt /*'nolinebreak'*
'nolisp' options.txt /*'nolisp'*
'nolist' options.txt /*'nolist'*
'nolnr' options.txt /*'nolnr'*
'noloadplugins' options.txt /*'noloadplugins'*
'nolpl' options.txt /*'nolpl'*
'nolz' options.txt /*'nolz'*
'noma' options.txt /*'noma'*
'nomacatsui' options.txt /*'nomacatsui'*
'nomacligatures' options.txt /*'nomacligatures'*
'nomacmeta' options.txt /*'nomacmeta'*
'nomagic' options.txt /*'nomagic'*
'nomh' options.txt /*'nomh'*
@@ -739,6 +748,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
'path' options.txt /*'path'*
'pdev' options.txt /*'pdev'*
'penc' options.txt /*'penc'*
'perldll' options.txt /*'perldll'*
'pex' options.txt /*'pex'*
'pexpr' options.txt /*'pexpr'*
'pfn' options.txt /*'pfn'*
@@ -765,6 +775,8 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
'pumheight' options.txt /*'pumheight'*
'pvh' options.txt /*'pvh'*
'pvw' options.txt /*'pvw'*
'pythondll' options.txt /*'pythondll'*
'pythonthreedll' options.txt /*'pythonthreedll'*
'qe' options.txt /*'qe'*
'quote motion.txt /*'quote*
'quoteescape' options.txt /*'quoteescape'*
@@ -791,6 +803,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
'rs' options.txt /*'rs'*
'rtp' options.txt /*'rtp'*
'ru' options.txt /*'ru'*
'rubydll' options.txt /*'rubydll'*
'ruf' options.txt /*'ruf'*
'ruler' options.txt /*'ruler'*
'rulerformat' options.txt /*'rulerformat'*
@@ -2149,6 +2162,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
:delm motion.txt /*:delm*
:delmarks motion.txt /*:delmarks*
:di change.txt /*:di*
:dif diff.txt /*:dif*
:diffg diff.txt /*:diffg*
:diffget diff.txt /*:diffget*
:diffo diff.txt /*:diffo*
@@ -2161,7 +2175,6 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
:diffsplit diff.txt /*:diffsplit*
:difft diff.txt /*:difft*
:diffthis diff.txt /*:diffthis*
:diffu diff.txt /*:diffu*
:diffupdate diff.txt /*:diffupdate*
:dig digraph.txt /*:dig*
:digraphs digraph.txt /*:digraphs*
@@ -6924,6 +6937,7 @@ lua if_lua.txt /*lua*
lua-buffer if_lua.txt /*lua-buffer*
lua-commands if_lua.txt /*lua-commands*
lua-dict if_lua.txt /*lua-dict*
lua-dynamic if_lua.txt /*lua-dynamic*
lua-eval if_lua.txt /*lua-eval*
lua-funcref if_lua.txt /*lua-funcref*
lua-list if_lua.txt /*lua-list*
+40 -21
View File
@@ -1,4 +1,4 @@
*todo.txt* For Vim version 7.4. Last change: 2015 Oct 31
*todo.txt* For Vim version 7.4. Last change: 2015 Nov 10
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -35,6 +35,8 @@ not be repeated below, unless there is extra information.
-------------------- Known bugs and current work -----------------------
Regexp problems:
- Instructions for reproducing issue #465 (crash in nfa_regtry):
https://github.com/mgedmin/vim-bug-465
- The regexp engines are not reentrant, causing havoc when interrupted by a
remote expression or something else. Move global variables onto the stack
or into an allocated struct.
@@ -75,6 +77,12 @@ Regexp problems:
- The pattern "\1" with the old engine gives E65, with the new engine it
matches the empty string. (Dominique Pelle, 2015 Oct 2)
runtime/optwin.vim missing options:
rubydll
pythondll
perldll
luadll
Still using freed memory after using setloclist(). (lcd, 2014 Jul 23)
More info Jul 24. Not clear why.
@@ -83,6 +91,20 @@ work. (ZyX, 2013 Sep 28)
Problem using ":try" inside ":execute". (ZyX, 2013 Sep 15)
When running out of memory, lalloc() invokes the garbage collector.
May cause freeing used memory. Just remove that call?
Or add flag to avoid it when undesired.
Installation of .desktop files does not work everywhere.
It's now fixed, but the target directory probably isn't right.
Add configure check?
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)
Access to uninitialized memory in match_backref() regexp_nda.c:4882
(Dominique Pelle, 2015 Nov 6)
Netrw update. (Charles 2015 Oct 23)
Patch to use local value of 'errorformat' in :cexpr. (Christian Brabandt,
@@ -96,8 +118,6 @@ directory exists. (Sergio Gallelli, 2013 Dec 29)
Updated syntax files. (Charles Campbell, 2015 Oct 19)
Patch to include .desktop files in the distribution. PR #455.
Better changelog syntax file. (Martin Florian, 2015 Oct 25)
Better readline syntax file. (Raphael Bazaud, 2015 Oct 25)
@@ -112,19 +132,10 @@ changes the window layout and the current window. Make a variant that saves
and restores. Use in the matchparen plugin.
Perhaps we can use ":silent window"?
Patch for documentation mistakes. (Hirohito Higashi, 2015 Oct 22)
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 for yaml indent, #458.
Patch for Python to add isatty, readable, etc. (PR #464)
Patch to add options for specifying dll names. (Kazuki Sakamoto, 2015 Oct 16)
PR #452 Check if it's secure (can't set from modeline).
Unexpected delay when using CTRL-O u. It's not timeoutlen.
(Gary Johnson, 2015 Aug 28)
@@ -133,9 +144,23 @@ Same for src/xxd/Make_cyg.mak
Python: ":py raw_input('prompt')" doesn't work. (Manu Hack)
Patch to fix memory leak. (Dominique Pelle, 2015 Nov 4)
Using uninitialized memory. (Dominique Pelle, 2015 Nov 4)
Patch to recognize string slice for variable followed by colon.
(Hirohito Higashi, 2015 Nov 3)
Patch to support hangul input with utf-8.
Patch to support UTF-8 for Hangul. (Shawn Y.H. Kim, 2011 May 1)
Needs more work. Pinged 2012 Jan 4.
Patch to add debug backtrace. (Alberto Fanjul, 2015 Sep 27)
Asked for :frame command.
vt52 terminal codes are not correct. Patch from Random, 2015 Nov 5.
MS-Windows: When editing a file with a leading space, writing it uses the
wrong name. (Aram, 2014 Nov 7) Vim 7.4.
@@ -143,7 +168,7 @@ Can't recognize the $ProgramFiles(x86) environment variable. Recognize it
specifically? First try with the parens, then without.
Patch to add 'tagcase' option, whether to ignore case for tags.
(Gary Johnson, 2015 Oct 17)
(Gary Johnson, 2015 Nov 6)
Patch to fix "." after CTRL-A in Visual block mode. (Ozaki Kiichi, 2015 Oct
24)
@@ -196,6 +221,8 @@ 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 10)
ml_updatechunk() is slow when retrying for another encoding. (John Little,
2014 Sep 11)
@@ -222,9 +249,6 @@ Is this right?
Patch to have CTRL-A and CTRL-X update the '[ and '] marks.
(Yukihiro Nakadaira, 2015 Aug 23)
On MS-Windows viminfo file is always given the hidden attribute? (raulnac,
2015 Oct 30)
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?
@@ -409,8 +433,6 @@ from?
Problem with upwards search on Windows (works OK on Linux). (Brett Stahlman,
2014 Jun 8)
Patch to load TCL dynamically. (Ken Takata, 2014 Sep 20)
Include a plugin manager with Vim? Neobundle seems to be the best currently.
Long message about this from ZyX, 2014 Mar 23. And following replies.
Also see http://vim-wiki.mawercer.de/wiki/topic/vim%20plugin%20managment.html
@@ -803,9 +825,6 @@ Only for MS-Windows. No documentation. Do we want this?
Patch to support cursor shape in Cygwin console. (Ben bgold, 2011 Dec 27)
Patch to support UTF-8 for Hangul. (Shawn Y.H. Kim, 2011 May 1)
Needs more work. Pinged 2012 Jan 4.
Issue 64: when 'incsearch' is on can't paste LF on command line.
On MS-Windows a temp dir with a & init causes system() to fail. (Ben Fritz,
+1 -1
View File
@@ -1,4 +1,4 @@
*vi_diff.txt* For Vim version 7.4. Last change: 2013 Aug 22
*vi_diff.txt* For Vim version 7.4. Last change: 2015 Nov 01
VIM REFERENCE MANUAL by Bram Moolenaar
+2 -2
View File
@@ -1,7 +1,7 @@
" Vim indent file
" Language: YAML
" Maintainer: Nikolai Pavlov <zyx.vim@gmail.com>
" Last Change: 2015 Sep 25
" Last Change: 2015 Nov 01
" Only load this indent file when no other was loaded.
if exists('b:did_indent')
@@ -14,7 +14,7 @@ set cpo&vim
let b:did_indent = 1
setlocal indentexpr=GetYAMLIndent(v:lnum)
setlocal indentkeys=!^F,o,O,0#,0},0],<:>,-
setlocal indentkeys=!^F,o,O,0#,0},0],<:>,0-
setlocal nosmartindent
let b:undo_indent = 'setlocal indentexpr< indentkeys< smartindent<'
+23 -1
View File
@@ -1,7 +1,7 @@
" These commands create the option window.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2015 Jul 22
" Last Change: 2015 Nov 10
" If there already is an option window, jump to that one.
if bufwinnr("option-window") > 0
@@ -651,6 +651,8 @@ if has("gui")
call <SID>BinOptionG("fullscreen", &fullscreen)
call append("$", "fuoptions\tcontrol how fullscreen mode should behave")
call <SID>OptionG("fuoptions", &fuoptions)
call append("$", "macligatures\tdisplay ligatures")
call <SID>BinOptionG("macligatures", &macligatures)
call append("$", "macmeta\tuse option as meta key")
call append("$", "\t(local to buffer)")
call <SID>BinOptionL("mmta")
@@ -1320,6 +1322,26 @@ if has("mzscheme")
call append("$", "mzquantum\tinterval in milliseconds between polls for MzScheme threads")
call append("$", " \tset mzq=" . &mzq)
endif
if exists("&luadll")
call append("$", "luadll\tname of the Lua dynamic library")
call <SID>OptionG("luadll", &luadll)
endif
if exists("&perldll")
call append("$", "perldll\tname of the Perl dynamic library")
call <SID>OptionG("perldll", &perldll)
endif
if exists("&pythondll")
call append("$", "pythondll\tname of the Python 2 dynamic library")
call <SID>OptionG("pythondll", &pythondll)
endif
if exists("&pythonthreedll")
call append("$", "pythonthreedll\tname of the Python 3 dynamic library")
call <SID>OptionG("pythonthreedll", &pythonthreedll)
endif
if exists("&rubydll")
call append("$", "rubydll\tname of the Ruby dynamic library")
call <SID>OptionG("rubydll", &rubydll)
endif
set cpo&vim
+11 -3
View File
@@ -2,7 +2,7 @@
" Language: C++
" Current Maintainer: vim-jp (https://github.com/vim-jp/vim-cpp)
" Previous Maintainer: Ken Shan <ccshan@post.harvard.edu>
" Last Change: 2015 May 04
" Last Change: 2015 Nov 10
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
@@ -23,7 +23,8 @@ endif
" C++ extensions
syn keyword cppStatement new delete this friend using
syn keyword cppAccess public protected private
syn keyword cppType inline virtual explicit export bool wchar_t
syn keyword cppModifier inline virtual explicit export
syn keyword cppType bool wchar_t
syn keyword cppExceptions throw try catch
syn keyword cppOperator operator typeid
syn keyword cppOperator and bitor or xor compl bitand and_eq or_eq xor_eq not not_eq
@@ -36,7 +37,8 @@ syn keyword cppConstant __cplusplus
" C++ 11 extensions
if !exists("cpp_no_cpp11")
syn keyword cppType override final
syn keyword cppModifier override final
syn keyword cppType nullptr_t
syn keyword cppExceptions noexcept
syn keyword cppStorageClass constexpr decltype thread_local
syn keyword cppConstant nullptr
@@ -49,6 +51,11 @@ if !exists("cpp_no_cpp11")
syn region cppRawString matchgroup=cppRawStringDelimiter start=+\%(u8\|[uLU]\)\=R"\z([[:alnum:]_{}[\]#<>%:;.?*\+\-/\^&|~!=,"']\{,16}\)(+ end=+)\z1"+ contains=@Spell
endif
" C++ 14 extensions
if !exists("cpp_no_cpp14")
syn match cppNumber display "\<0b[01]\+\(u\=l\{0,2}\|ll\=u\)\>"
endif
" The minimum and maximum operators in GNU C++
syn match cppMinMax "[<>]?"
@@ -65,6 +72,7 @@ if version >= 508 || !exists("did_cpp_syntax_inits")
HiLink cppExceptions Exception
HiLink cppOperator Operator
HiLink cppStatement Statement
HiLink cppModifier Type
HiLink cppType Type
HiLink cppStorageClass StorageClass
HiLink cppStructure Structure
+12 -8
View File
@@ -1,13 +1,17 @@
" Vim syntax file
" Language: Remind
" Maintainer: Davide Alberani <alberanid@libero.it>
" Last Change: 18 Sep 2009
" Version: 0.5
" URL: http://erlug.linux.it/~da/vim/syntax/remind.vim
" Maintainer: Davide Alberani <da@erlug.linux.it>
" Last Change: 02 Nov 2015
" Version: 0.7
" URL: http://ismito.it/vim/syntax/remind.vim
"
" remind is a sophisticated reminder service
" you can download remind from:
" http://www.roaringpenguin.com/penguin/open_source_remind.php
" Remind is a sophisticated calendar and alarm program.
" You can download remind from:
" https://www.roaringpenguin.com/products/remind
"
" Changelog
" version 0.7: updated email and link
" version 0.6: added THROUGH keyword (courtesy of Ben Orchard)
if version < 600
syntax clear
@@ -19,7 +23,7 @@ endif
syn case ignore
syn keyword remindCommands REM OMIT SET FSET UNSET
syn keyword remindExpiry UNTIL FROM SCANFROM SCAN WARN SCHED
syn keyword remindExpiry UNTIL FROM SCANFROM SCAN WARN SCHED THROUGH
syn keyword remindTag PRIORITY TAG
syn keyword remindTimed AT DURATION
syn keyword remindMove ONCE SKIP BEFORE AFTER
+88 -102
View File
@@ -2,11 +2,11 @@
" 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: Oct 09, 2015
" Version: 139
" Last Change: Oct 21, 2015
" Version: 141
" 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 ?ric Brunet (eric.brunet@ens.fr)
" This file includes many ideas from Eric Brunet (eric.brunet@ens.fr)
" For version 5.x: Clear all syntax items {{{1
" For version 6.x: Quit when a syntax file was already loaded
@@ -16,17 +16,6 @@ elseif exists("b:current_syntax")
finish
endif
" AFAICT "." should be considered part of the iskeyword for ksh. Using iskeywords
" in syntax is dicey, so the following code permits the user to prevent/override
" g:sh_isk set to a string : specify iskeyword.
" g:sh_noisk exists : don't change iskeyword
" g:sh_noisk does not exist : (default) append "." to iskeyword for kornshell
if exists("g:sh_isk") && type(g:sh_isk) == 1 " user specifying iskeyword
exe "setl isk=".g:sh_isk
elseif !exists("g:sh_noisk") && exists("b:is_kornshell") " append '.' to iskeyword
setl isk+=.
endif
" trying to answer the question: which shell is /bin/sh, really?
" If the user has not specified any of g:is_kornshell, g:is_bash, g:is_posix, g:is_sh, then guess.
if !exists("g:is_kornshell") && !exists("g:is_bash") && !exists("g:is_posix") && !exists("g:is_sh")
@@ -73,6 +62,7 @@ if !exists("b:is_kornshell") && !exists("b:is_bash")
endif
" set up default g:sh_fold_enabled {{{1
" ================================
if !exists("g:sh_fold_enabled")
let g:sh_fold_enabled= 0
elseif g:sh_fold_enabled != 0 && !has("folding")
@@ -95,6 +85,24 @@ if g:sh_fold_enabled && &fdm == "manual"
setl fdm=syntax
endif
" Set up folding commands for shell {{{1
" =================================
if s:sh_fold_functions
com! -nargs=* ShFoldFunctions <args> fold
else
com! -nargs=* ShFoldFunctions <args>
endif
if s:sh_fold_heredoc
com! -nargs=* ShFoldHereDoc <args> fold
else
com! -nargs=* ShFoldHereDoc <args>
endif
if s:sh_fold_ifdofor
com! -nargs=* ShFoldIfDoFor <args> fold
else
com! -nargs=* ShFoldIfDoFor <args>
endif
" sh syntax is case sensitive {{{1
syn case match
@@ -126,9 +134,10 @@ syn cluster shHereList contains=shBeginHere,shHerePayload
syn cluster shHereListDQ contains=shBeginHere,@shDblQuoteList,shHerePayload
syn cluster shIdList contains=shCommandSub,shWrapLineOperator,shSetOption,shDeref,shDerefSimple,shRedir,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shCtrlSeq,shStringSpecial,shAtExpr
syn cluster shIfList contains=@shLoopList,shDblBrace,shDblParen,shFunctionKey,shFunctionOne,shFunctionTwo
syn cluster shLoopList contains=@shCaseList,@shErrorList,shCaseEsac,shConditional,shDblBrace,shExpr,shFor,shForPP,shIf,shOption,shSet,shTest,shTestOpr
syn cluster shLoopList contains=@shCaseList,@shErrorList,shCaseEsac,shConditional,shDblBrace,shExpr,shFor,shForPP,shIf,shOption,shSet,shTest,shTestOpr,shTouch
syn cluster shSubShList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shIf,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq,shOperator
syn cluster shTestList contains=shCharClass,shCommandSub,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shExDoubleQuote,shExpr,shExSingleQuote,shNumber,shOperator,shSingleQuote,shTest,shTestOpr
" Echo: {{{1
" ====
" This one is needed INSIDE a CommandSub, so that `echo bla` be correct
@@ -145,6 +154,11 @@ if exists("b:is_kornshell") || exists("b:is_bash")
syn match shStatement "\<alias\>"
syn region shAlias matchgroup=shStatement start="\<alias\>\s\+\(\h[-._[:alnum:]]\+\)\@=" skip="\\$" end="\>\|`"
syn region shAlias matchgroup=shStatement start="\<alias\>\s\+\(\h[-._[:alnum:]]\+=\)\@=" skip="\\$" end="="
" Touch: {{{1
" =====
syn match shTouch '\<touch\>[^;#]*' skipwhite nextgroup=shTouchList contains=shTouchCmd
syn match shTouchCmd '\<touch\>' contained
endif
" Error Codes: {{{1
@@ -193,15 +207,16 @@ syn region shSubSh transparent matchgroup=shSubShRegion start="[^(]\zs(" end=")"
"=======
syn region shExpr matchgroup=shRange start="\[" skip=+\\\\\|\\$\|\[+ end="\]" contains=@shTestList,shSpecial
syn region shTest transparent matchgroup=shStatement start="\<test\s" skip=+\\\\\|\\$+ matchgroup=NONE end="[;&|]"me=e-1 end="$" contains=@shExprList1
syn region shNoQuote start='\S' skip='\%(\\\\\)*\\.' end='\ze\s' contained
syn match shTestOpr contained '[^-+/%]\zs=' skipwhite nextgroup=shTestDoubleQuote,shTestSingleQuote,shTestPattern
syn match shTestOpr contained "<=\|>=\|!=\|==\|-.\>\|-\(nt\|ot\|ef\|eq\|ne\|lt\|le\|gt\|ge\)\>\|[!<>]"
syn match shTestOpr contained "<=\|>=\|!=\|==\|=\~\|-.\>\|-\(nt\|ot\|ef\|eq\|ne\|lt\|le\|gt\|ge\)\>\|[!<>]"
syn match shTestPattern contained '\w\+'
syn region shTestDoubleQuote contained start='\%(\%(\\\\\)*\\\)\@<!"' skip=+\\\\\|\\"+ end='"'
syn match shTestSingleQuote contained '\\.'
syn match shTestSingleQuote contained "'[^']*'"
if exists("b:is_kornshell") || exists("b:is_bash")
syn region shDblBrace matchgroup=Delimiter start="\[\[" skip=+\\\\\|\\$+ end="\]\]" contains=@shTestList,shComment
syn region shDblParen matchgroup=Delimiter start="((" skip=+\\\\\|\\$+ end="))" contains=@shTestList,shComment
syn region shDblBrace matchgroup=Delimiter start="\[\[" skip=+\%(\\\\\)*\\$+ end="\]\]" contains=@shTestList,shNoQuote,shComment
syn region shDblParen matchgroup=Delimiter start="((" skip=+\%(\\\\\)*\\$+ end="))" contains=@shTestList,shComment
endif
" Character Class In Range: {{{1
@@ -210,17 +225,11 @@ syn match shCharClass contained "\[:\(backspace\|escape\|return\|xdigit\|alnum
" Loops: do, if, while, until {{{1
" ======
if s:sh_fold_ifdofor
syn region shDo fold transparent matchgroup=shConditional start="\<do\>" matchgroup=shConditional end="\<done\>" contains=@shLoopList
syn region shIf fold transparent matchgroup=shConditional start="\<if\_s" matchgroup=shConditional skip=+-fi\>+ end="\<;\_s*then\>" end="\<fi\>" contains=@shIfList
syn region shFor fold matchgroup=shLoop start="\<for\ze\_s\s*\%(((\)\@!" end="\<in\_s" end="\<do\>"me=e-2 contains=@shLoopList,shDblParen skipwhite nextgroup=shCurlyIn
syn region shForPP fold matchgroup=shLoop start='\<for\>\_s*((' end='))' contains=shTestOpr
else
syn region shDo transparent matchgroup=shConditional start="\<do\>" matchgroup=shConditional end="\<done\>" contains=@shLoopList
syn region shIf transparent matchgroup=shConditional start="\<if\_s" matchgroup=shConditional skip=+-fi\>+ end="\<;\_s*then\>" end="\<fi\>" contains=@shIfList
syn region shFor matchgroup=shLoop start="\<for\ze\_s\s*\%(((\)\@!" end="\<in\>" end="\<do\>"me=e-2 contains=@shLoopList,shDblParen skipwhite nextgroup=shCurlyIn
syn region shForPP matchgroup=shLoop start='\<for\>\_s*((' end='))' contains=shTestOpr
endif
ShFoldIfDoFor syn region shDo transparent matchgroup=shConditional start="\<do\>" matchgroup=shConditional end="\<done\>" contains=@shLoopList
ShFoldIfDoFor syn region shIf transparent matchgroup=shConditional start="\<if\_s" matchgroup=shConditional skip=+-fi\>+ end="\<;\_s*then\>" end="\<fi\>" contains=@shIfList
ShFoldIfDoFor syn region shFor matchgroup=shLoop start="\<for\ze\_s\s*\%(((\)\@!" end="\<in\>" end="\<do\>"me=e-2 contains=@shLoopList,shDblParen skipwhite nextgroup=shCurlyIn
ShFoldIfDoFor syn region shForPP matchgroup=shLoop start='\<for\>\_s*((' end='))' contains=shTestOpr
if exists("b:is_kornshell") || exists("b:is_bash")
syn cluster shCaseList add=shRepeat
syn cluster shFunctionList add=shRepeat
@@ -238,13 +247,9 @@ syn match shComma contained ","
" ====
syn match shCaseBar contained skipwhite "\(^\|[^\\]\)\(\\\\\)*\zs|" nextgroup=shCase,shCaseStart,shCaseBar,shComment,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote
syn match shCaseStart contained skipwhite skipnl "(" nextgroup=shCase,shCaseBar
if s:sh_fold_ifdofor
syn region shCase fold contained skipwhite skipnl matchgroup=shSnglCase start="\%(\\.\|[^#$()'" \t]\)\{-}\zs)" end=";;" end="esac"me=s-1 contains=@shCaseList nextgroup=shCaseStart,shCase,shComment
syn region shCaseEsac fold matchgroup=shConditional start="\<case\>" end="\<esac\>" contains=@shCaseEsacList
else
syn region shCase contained skipwhite skipnl matchgroup=shSnglCase start="\%(\\.\|[^#$()'" \t]\)\{-}\zs)" end=";;" end="esac"me=s-1 contains=@shCaseList nextgroup=shCaseStart,shCase,shComment
syn region shCaseEsac matchgroup=shConditional start="\<case\>" end="\<esac\>" contains=@shCaseEsacList
endif
ShFoldIfDoFor syn region shCase contained skipwhite skipnl matchgroup=shSnglCase start="\%(\\.\|[^#$()'" \t]\)\{-}\zs)" end=";;" end="esac"me=s-1 contains=@shCaseList nextgroup=shCaseStart,shCase,shComment
ShFoldIfDoFor syn region shCaseEsac matchgroup=shConditional start="\<case\>" end="\<esac\>" contains=@shCaseEsacList
syn keyword shCaseIn contained skipwhite skipnl in nextgroup=shCase,shCaseStart,shCaseBar,shComment,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote
if exists("b:is_bash")
syn region shCaseExSingleQuote matchgroup=shQuote start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial,shSpecial skipwhite skipnl nextgroup=shCaseBar contained
@@ -286,7 +291,7 @@ if exists("b:is_bash")
syn cluster shCommandSubList add=bashSpecialVariables,bashStatement
syn cluster shCaseList add=bashAdminStatement,bashStatement
syn keyword bashSpecialVariables contained auto_resume BASH BASH_ALIASES BASH_ALIASES BASH_ARGC BASH_ARGC BASH_ARGV BASH_ARGV BASH_CMDS BASH_CMDS BASH_COMMAND BASH_COMMAND BASH_ENV BASH_EXECUTION_STRING BASH_EXECUTION_STRING BASH_LINENO BASH_LINENO BASHOPTS BASHOPTS BASHPID BASHPID BASH_REMATCH BASH_REMATCH BASH_SOURCE BASH_SOURCE BASH_SUBSHELL BASH_SUBSHELL BASH_VERSINFO BASH_VERSION BASH_XTRACEFD BASH_XTRACEFD CDPATH COLUMNS COLUMNS COMP_CWORD COMP_CWORD COMP_KEY COMP_KEY COMP_LINE COMP_LINE COMP_POINT COMP_POINT COMPREPLY COMPREPLY COMP_TYPE COMP_TYPE COMP_WORDBREAKS COMP_WORDBREAKS COMP_WORDS COMP_WORDS COPROC COPROC DIRSTACK EMACS EMACS ENV ENV EUID FCEDIT FIGNORE FUNCNAME FUNCNAME FUNCNEST FUNCNEST GLOBIGNORE GROUPS histchars HISTCMD HISTCONTROL HISTFILE HISTFILESIZE HISTIGNORE HISTSIZE HISTTIMEFORMAT HISTTIMEFORMAT HOME HOSTFILE HOSTNAME HOSTTYPE IFS IGNOREEOF INPUTRC LANG LC_ALL LC_COLLATE LC_CTYPE LC_CTYPE LC_MESSAGES LC_NUMERIC LC_NUMERIC LINENO LINES LINES MACHTYPE MAIL MAILCHECK MAILPATH MAPFILE MAPFILE OLDPWD OPTARG OPTERR OPTIND OSTYPE PATH PIPESTATUS POSIXLY_CORRECT POSIXLY_CORRECT PPID PROMPT_COMMAND PS1 PS2 PS3 PS4 PWD RANDOM READLINE_LINE READLINE_LINE READLINE_POINT READLINE_POINT REPLY SECONDS SHELL SHELL SHELLOPTS SHLVL TIMEFORMAT TIMEOUT TMPDIR TMPDIR UID
syn keyword bashStatement chmod clear complete du egrep expr fgrep find gnufind gnugrep grep less ls mkdir mv rm rmdir rpm sed sleep sort strip tail touch
syn keyword bashStatement chmod clear complete du egrep expr fgrep find gnufind gnugrep grep less ls mkdir mv rm rmdir rpm sed sleep sort strip tail
syn keyword bashAdminStatement daemon killall killproc nice reload restart start status stop
syn keyword bashStatement command compgen
endif
@@ -295,7 +300,7 @@ if exists("b:is_kornshell")
syn cluster shCommandSubList add=kshSpecialVariables,kshStatement
syn cluster shCaseList add=kshStatement
syn keyword kshSpecialVariables contained CDPATH COLUMNS EDITOR ENV ERRNO FCEDIT FPATH HISTFILE HISTSIZE HOME IFS LINENO LINES MAIL MAILCHECK MAILPATH OLDPWD OPTARG OPTIND PATH PPID PS1 PS2 PS3 PS4 PWD RANDOM REPLY SECONDS SHELL TMOUT VISUAL
syn keyword kshStatement cat chmod clear cp du egrep expr fgrep find grep killall less ls mkdir mv nice printenv rm rmdir sed sort strip stty tail touch tput
syn keyword kshStatement cat chmod clear cp du egrep expr fgrep find grep killall less ls mkdir mv nice printenv rm rmdir sed sort strip stty tail tput
syn keyword kshStatement command setgroups setsenv
endif
@@ -323,7 +328,6 @@ syn region shSingleQuote matchgroup=shQuote start=+'+ end=+'+ contains=@Spell
syn region shDoubleQuote matchgroup=shQuote start=+\%(\%(\\\\\)*\\\)\@<!"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell
syn match shStringSpecial "[^[:print:] \t]" contained
syn match shStringSpecial "\%(\\\\\)*\\[\\"'`$()#]"
" COMBAK: why is ,shComment on next line???
syn match shSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]"
syn match shSpecial "^\%(\\\\\)*\\[\\"'`$()#]"
syn match shMoreSpecial "\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shMoreSpecial contained
@@ -347,35 +351,22 @@ if version < 600
syn region shHereDoc matchgroup=shHereDoc05 start="<<\s*\**\.\**" matchgroup=shHereDoc05 end="^\.$" contains=@shDblQuoteList
syn region shHereDoc matchgroup=shHereDoc06 start="<<-\s*\**\.\**" matchgroup=shHereDoc06 end="^\s*\.$" contains=@shDblQuoteList
elseif s:sh_fold_heredoc
syn region shHereDoc matchgroup=shHereDoc07 fold start="<<\s*\z([^ \t|]*\)" matchgroup=shHereDoc07 end="^\z1\s*$" contains=@shDblQuoteList
syn region shHereDoc matchgroup=shHereDoc08 fold start="<<\s*\"\z([^ \t|]*\)\"" matchgroup=shHereDoc08 end="^\z1\s*$"
syn region shHereDoc matchgroup=shHereDoc09 fold start="<<\s*'\z([^ \t|]*\)'" matchgroup=shHereDoc09 end="^\z1\s*$"
syn region shHereDoc matchgroup=shHereDoc10 fold start="<<-\s*\z([^ \t|]*\)" matchgroup=shHereDoc10 end="^\s*\z1\s*$" contains=@shDblQuoteList
syn region shHereDoc matchgroup=shHereDoc11 fold start="<<-\s*\"\z([^ \t|]*\)\"" matchgroup=shHereDoc11 end="^\s*\z1\s*$"
syn region shHereDoc matchgroup=shHereDoc12 fold start="<<-\s*'\z([^ \t|]*\)'" matchgroup=shHereDoc12 end="^\s*\z1\s*$"
syn region shHereDoc matchgroup=shHereDoc13 fold start="<<\s*\\\_$\_s*\z([^ \t|]*\)" matchgroup=shHereDoc13 end="^\z1\s*$"
syn region shHereDoc matchgroup=shHereDoc14 fold start="<<\s*\\\_$\_s*\"\z([^ \t|]*\)\"" matchgroup=shHereDoc14 end="^\z1\s*$"
syn region shHereDoc matchgroup=shHereDoc15 fold start="<<-\s*\\\_$\_s*'\z([^ \t|]*\)'" matchgroup=shHereDoc15 end="^\s*\z1\s*$"
syn region shHereDoc matchgroup=shHereDoc16 fold start="<<-\s*\\\_$\_s*\z([^ \t|]*\)" matchgroup=shHereDoc16 end="^\s*\z1\s*$"
syn region shHereDoc matchgroup=shHereDoc17 fold start="<<-\s*\\\_$\_s*\"\z([^ \t|]*\)\"" matchgroup=shHereDoc17 end="^\s*\z1\s*$"
syn region shHereDoc matchgroup=shHereDoc18 fold start="<<\s*\\\_$\_s*'\z([^ \t|]*\)'" matchgroup=shHereDoc18 end="^\z1\s*$"
syn region shHereDoc matchgroup=shHereDoc19 fold start="<<\\\z([^ \t|]*\)" matchgroup=shHereDoc19 end="^\z1\s*$"
else
syn region shHereDoc matchgroup=shHereDoc20 start="<<\s*\\\=\z([^ \t|]*\)" matchgroup=shHereDoc20 end="^\z1\s*$" contains=@shDblQuoteList
syn region shHereDoc matchgroup=shHereDoc21 start="<<\s*\"\z([^ \t|]*\)\"" matchgroup=shHereDoc21 end="^\z1\s*$"
syn region shHereDoc matchgroup=shHereDoc22 start="<<-\s*\z([^ \t|]*\)" matchgroup=shHereDoc22 end="^\s*\z1\s*$" contains=@shDblQuoteList
syn region shHereDoc matchgroup=shHereDoc23 start="<<-\s*'\z([^ \t|]*\)'" matchgroup=shHereDoc23 end="^\s*\z1\s*$"
syn region shHereDoc matchgroup=shHereDoc24 start="<<\s*'\z([^ \t|]*\)'" matchgroup=shHereDoc24 end="^\z1\s*$"
syn region shHereDoc matchgroup=shHereDoc25 start="<<-\s*\"\z([^ \t|]*\)\"" matchgroup=shHereDoc25 end="^\s*\z1\s*$"
syn region shHereDoc matchgroup=shHereDoc26 start="<<\s*\\\_$\_s*\z([^ \t|]*\)" matchgroup=shHereDoc26 end="^\z1\s*$"
syn region shHereDoc matchgroup=shHereDoc27 start="<<-\s*\\\_$\_s*\z([^ \t|]*\)" matchgroup=shHereDoc27 end="^\s*\z1\s*$"
syn region shHereDoc matchgroup=shHereDoc28 start="<<-\s*\\\_$\_s*'\z([^ \t|]*\)'" matchgroup=shHereDoc28 end="^\s*\z1\s*$"
syn region shHereDoc matchgroup=shHereDoc29 start="<<\s*\\\_$\_s*'\z([^ \t|]*\)'" matchgroup=shHereDoc29 end="^\z1\s*$"
syn region shHereDoc matchgroup=shHereDoc30 start="<<\s*\\\_$\_s*\"\z([^ \t|]*\)\"" matchgroup=shHereDoc30 end="^\z1\s*$"
syn region shHereDoc matchgroup=shHereDoc31 start="<<-\s*\\\_$\_s*\"\z([^ \t|]*\)\"" matchgroup=shHereDoc31 end="^\s*\z1\s*$"
syn region shHereDoc matchgroup=shHereDoc32 start="<<\\\z([^ \t|]*\)" matchgroup=shHereDoc32 end="^\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc07 start="<<\s*\\\=\z([^ \t|]\+\)" matchgroup=shHereDoc07 end="^\z1\s*$" contains=@shDblQuoteList
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc08 start="<<\s*\"\z([^ \t|]\+\)\"" matchgroup=shHereDoc08 end="^\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc09 start="<<-\s*\z([^ \t|]\+\)" matchgroup=shHereDoc09 end="^\s*\z1\s*$" contains=@shDblQuoteList
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc10 start="<<-\s*'\z([^ \t|]\+\)'" matchgroup=shHereDoc10 end="^\s*\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc11 start="<<\s*'\z([^ \t|]\+\)'" matchgroup=shHereDoc11 end="^\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc12 start="<<-\s*\"\z([^ \t|]\+\)\"" matchgroup=shHereDoc12 end="^\s*\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc13 start="<<\s*\\\_$\_s*\z([^ \t|]\+\)" matchgroup=shHereDoc13 end="^\z1\s*$" contains=@shDblQuoteList
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc14 start="<<\s*\\\_$\_s*'\z([^ \t|]\+\)'" matchgroup=shHereDoc14 end="^\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc15 start="<<\s*\\\_$\_s*\"\z([^ \t|]\+\)\"" matchgroup=shHereDoc15 end="^\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc16 start="<<-\s*\\\_$\_s*\z([^ \t|]\+\)" matchgroup=shHereDoc16 end="^\s*\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc17 start="<<-\s*\\\_$\_s*\\\z([^ \t|]\+\)" matchgroup=shHereDoc17 end="^\s*\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc18 start="<<-\s*\\\_$\_s*'\z([^ \t|]\+\)'" matchgroup=shHereDoc18 end="^\s*\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc19 start="<<-\s*\\\_$\_s*\"\z([^ \t|]\+\)\"" matchgroup=shHereDoc19 end="^\s*\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc20 start="<<\\\z([^ \t|]\+\)" matchgroup=shHereDoc20 end="^\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc21 start="<<-\s*\\\z([^ \t|]\+\)" matchgroup=shHereDoc21 end="^\s*\z1\s*$"
endif
" Here Strings: {{{1
@@ -407,38 +398,24 @@ if !exists("g:is_posix")
endif
if exists("b:is_bash")
if s:sh_fold_functions
syn region shFunctionOne fold matchgroup=shFunction start="^\s*\h[-a-zA-Z_0-9]*\s*()\_s*{" end="}" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
syn region shFunctionTwo fold matchgroup=shFunction start="\<[^d][^o]\&\h[-a-zA-Z_0-9]*\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
syn region shFunctionThree fold matchgroup=shFunction start="^\s*\h[-a-zA-Z_0-9]*\s*()\_s*(" end=")" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
syn region shFunctionFour fold matchgroup=shFunction start="\<[^d][^o]\&\h[-a-zA-Z_0-9]*\s*\%(()\)\=\_s*)" end=")" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
else
syn region shFunctionOne matchgroup=shFunction start="^\s*\h[-a-zA-Z_0-9]*\s*()\_s*{" end="}" contains=@shFunctionList
syn region shFunctionTwo matchgroup=shFunction start="\<[^d][^o]\&\h[-a-zA-Z_0-9]*\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained
syn region shFunctionThree matchgroup=shFunction start="^\s*\h[-a-zA-Z_0-9]*\s*()\_s*(" end=")" contains=@shFunctionList
syn region shFunctionFour matchgroup=shFunction start="\<[^d][^o]\&\h[-a-zA-Z_0-9]*\s*\%(()\)\=\_s*(" end=")" contains=shFunctionKey,@shFunctionList contained
endif
ShFoldFunctions syn region shFunctionOne matchgroup=shFunction start="^\s*\h[-a-zA-Z_0-9]*\s*()\_s*{" end="}" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
ShFoldFunctions syn region shFunctionTwo matchgroup=shFunction start="\<[^d][^o]\&\h[-a-zA-Z_0-9]*\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
ShFoldFunctions syn region shFunctionThree matchgroup=shFunction start="^\s*\h[-a-zA-Z_0-9]*\s*()\_s*(" end=")" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
ShFoldFunctions syn region shFunctionFour matchgroup=shFunction start="\<[^d][^o]\&\h[-a-zA-Z_0-9]*\s*\%(()\)\=\_s*)" end=")" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
else
if s:sh_fold_functions
syn region shFunctionOne fold matchgroup=shFunction start="^\s*\h\w*\s*()\_s*{" end="}" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
syn region shFunctionTwo fold matchgroup=shFunction start="\<[^d][^o]\&\h\w*\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
syn region shFunctionThree fold matchgroup=shFunction start="^\s*\h\w*\s*()\_s*(" end=")" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
syn region shFunctionFour fold matchgroup=shFunction start="\<[^d][^o]\&\h\w*\s*\%(()\)\=\_s*(" end=")" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
else
syn region shFunctionOne matchgroup=shFunction start="^\s*\h\w*\s*()\_s*{" end="}" contains=@shFunctionList
syn region shFunctionTwo matchgroup=shFunction start="\<[^d][^o]\&\h\w*\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained
syn region shFunctionThree matchgroup=shFunction start="^\s*\h\w*\s*()\_s*(" end=")" contains=@shFunctionList
syn region shFunctionFour matchgroup=shFunction start="\<[^d][^o]\&\h\w*\s*\%(()\)\=\_s*(" end=")" contains=shFunctionKey,@shFunctionList contained
endif
ShFoldFunctions syn region shFunctionOne matchgroup=shFunction start="^\s*\h\w*\s*()\_s*{" end="}" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
ShFoldFunctions syn region shFunctionTwo matchgroup=shFunction start="\<[^d][^o]\&\h\w*\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
ShFoldFunctions syn region shFunctionThree matchgroup=shFunction start="^\s*\h\w*\s*()\_s*(" end=")" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
ShFoldFunctions syn region shFunctionFour matchgroup=shFunction start="\<[^d][^o]\&\h\w*\s*\%(()\)\=\_s*(" end=")" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
endif
" Parameter Dereferencing: {{{1
" ========================
syn match shDerefSimple "\$\%(\k\+\|\d\)"
syn region shDeref matchgroup=PreProc start="\${" end="}" contains=@shDerefList,shDerefVarArray
if !exists("g:sh_no_error")
syn match shDerefWordError "[^}$[]" contained
endif
syn match shDerefSimple "\$\k\+\|\d"
syn region shDeref matchgroup=PreProc start="\${" end="}" contains=@shDerefList,shDerefVarArray
syn match shDerefSimple "\$[-#*@!?]"
syn match shDerefSimple "\$\$"
if exists("b:is_bash") || exists("b:is_kornshell")
@@ -446,16 +423,28 @@ if exists("b:is_bash") || exists("b:is_kornshell")
syn region shDeref matchgroup=PreProc start="\${\$\$" end="}" contains=@shDerefList
endif
" ksh: ${!var[*]} array index list syntax: {{{1
" ========================================
if exists("b:is_kornshell")
syn region shDeref matchgroup=PreProc start="\${!" end="}" contains=@shDerefVarArray
endif
" bash: ${!prefix*} and ${#parameter}: {{{1
" ====================================
if exists("b:is_bash")
syn region shDeref matchgroup=PreProc start="\${!" end="\*\=}" contains=@shDerefList,shDerefOp
syn match shDerefVar contained "{\@<=!\k\+" nextgroup=@shDerefVarList
endif
if exists("b:is_kornshell")
syn match shDerefVar contained "{\@<=!\k[[:alnum:]_.]*" nextgroup=@shDerefVarList
endif
syn match shDerefSpecial contained "{\@<=[-*@?0]" nextgroup=shDerefOp,shDerefOpError
syn match shDerefSpecial contained "\({[#!]\)\@<=[[:alnum:]*@_]\+" nextgroup=@shDerefVarList,shDerefOp
syn match shDerefVar contained "{\@<=\k\+" nextgroup=@shDerefVarList
if exists("b:is_kornshell")
syn match shDerefVar contained "{\@<=\k[[:alnum:]_.]*" nextgroup=@shDerefVarList
endif
" sh ksh bash : ${var[... ]...} array reference: {{{1
syn region shDerefVarArray contained matchgroup=shDeref start="\[" end="]" contains=@shCommandSubList nextgroup=shDerefOp,shDerefOpError
@@ -594,6 +583,7 @@ hi def link shHereDoc shString
hi def link shHerePayload shHereDoc
hi def link shLoop shStatement
hi def link shMoreSpecial shSpecial
hi def link shNoQuote shDoubleQuote
hi def link shOption shCommandSub
hi def link shPattern shString
hi def link shParen shArithmetic
@@ -611,6 +601,7 @@ hi def link shTestOpr shConditional
hi def link shTestPattern shString
hi def link shTestDoubleQuote shString
hi def link shTestSingleQuote shString
hi def link shTouchCmd shStatement
hi def link shVariable shSetList
hi def link shWrapLineOperator shOperator
@@ -688,17 +679,12 @@ hi def link shHereDoc18 shRedir
hi def link shHereDoc19 shRedir
hi def link shHereDoc20 shRedir
hi def link shHereDoc21 shRedir
hi def link shHereDoc22 shRedir
hi def link shHereDoc23 shRedir
hi def link shHereDoc24 shRedir
hi def link shHereDoc25 shRedir
hi def link shHereDoc26 shRedir
hi def link shHereDoc27 shRedir
hi def link shHereDoc28 shRedir
hi def link shHereDoc29 shRedir
hi def link shHereDoc30 shRedir
hi def link shHereDoc31 shRedir
hi def link shHereDoc32 shRedir
" Delete shell folding commands {{{1
" =============================
delc ShFoldFunctions
delc ShFoldHereDoc
delc ShFoldIfDoFor
" Set Current Syntax: {{{1
" ===================
+85 -79
View File
@@ -1,8 +1,8 @@
" Vim syntax file
" Language: TeX
" Maintainer: Charles E. Campbell <NdrchipO@ScampbellPfamily.AbizM>
" Last Change: Oct 19, 2015
" Version: 89
" Last Change: Oct 20, 2015
" Version: 90
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX
"
" Notes: {{{1
@@ -62,11 +62,6 @@ if version >= 508 || !exists("did_tex_syntax_inits")
command -nargs=+ HiLink hi def link <args>
endif
endif
if exists("g:tex_no_error") && g:tex_no_error
let s:tex_no_error= 1
else
let s:tex_no_error= 0
endif
" by default, enable all region-based highlighting
let s:tex_fast= "bcmMprsSvV"
@@ -78,8 +73,6 @@ if exists("g:tex_fast")
else
let s:tex_fast= g:tex_fast
endif
else
let s:tex_fast= "bcmMprsSvV"
endif
" let user determine which classes of concealment will be supported
@@ -114,15 +107,17 @@ endif
" handle folding {{{1
if !exists("g:tex_fold_enabled")
let g:tex_fold_enabled= 0
let s:tex_fold_enabled= 0
elseif g:tex_fold_enabled && !has("folding")
let g:tex_fold_enabled= 0
let s:tex_fold_enabled= 0
echomsg "Ignoring g:tex_fold_enabled=".g:tex_fold_enabled."; need to re-compile vim for +fold support"
else
let s:tex_fold_enabled= 1
endif
if g:tex_fold_enabled && &fdm == "manual"
if s:tex_fold_enabled && &fdm == "manual"
setl fdm=syntax
endif
if g:tex_fold_enabled && has("folding")
if s:tex_fold_enabled && has("folding")
com! -nargs=* TexFold <args> fold
else
com! -nargs=* TexFold <args>
@@ -140,41 +135,53 @@ endif
if b:tex_stylish
setlocal isk+=@-@
endif
if exists("g:tex_nospell") && g:tex_nospell && !exists("g:tex_comment_nospell")
let g:tex_comment_nospell= 1
if exists("g:tex_no_error") && g:tex_no_error
let s:tex_no_error= 1
else
let s:tex_no_error= 0
endif
if exists("g:tex_comment_nospell") && g:tex_comment_nospell
let s:tex_comment_nospell= 1
else
let s:tex_comment_nospell= 0
endif
if exists("g:tex_nospell") && g:tex_nospell
let s:tex_nospell = 1
else
let s:tex_nospell = 0
endif
" Clusters: {{{1
" --------
syn cluster texCmdGroup contains=texCmdBody,texComment,texDefParm,texDelimiter,texDocType,texInput,texLength,texLigature,texMathDelim,texMathOper,texNewCmd,texNewEnv,texRefZone,texSection,texBeginEnd,texBeginEndName,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle
syn cluster texCmdGroup contains=texCmdBody,texComment,texDefParm,texDelimiter,texDocType,texInput,texLength,texLigature,texMathDelim,texMathOper,texNewCmd,texNewEnv,texRefZone,texSection,texBeginEnd,texBeginEndName,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle
if !s:tex_no_error
syn cluster texCmdGroup add=texMathError
syn cluster texCmdGroup add=texMathError
endif
syn cluster texEnvGroup contains=texMatcher,texMathDelim,texSpecialChar,texStatement
syn cluster texFoldGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texInputFile,texLength,texLigature,texMatcher,texMathZoneV,texMathZoneW,texMathZoneX,texMathZoneY,texMathZoneZ,texNewCmd,texNewEnv,texOnlyMath,texOption,texParen,texRefZone,texSection,texBeginEnd,texSectionZone,texSpaceCode,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,@texMathZones,texTitle,texAbstract,texBoldStyle,texItalStyle,texNoSpell
syn cluster texBoldGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texInputFile,texLength,texLigature,texMatcher,texMathZoneV,texMathZoneW,texMathZoneX,texMathZoneY,texMathZoneZ,texNewCmd,texNewEnv,texOnlyMath,texOption,texParen,texRefZone,texSection,texBeginEnd,texSectionZone,texSpaceCode,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,@texMathZones,texTitle,texAbstract,texBoldStyle,texBoldItalStyle,texNoSpell
syn cluster texItalGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texInputFile,texLength,texLigature,texMatcher,texMathZoneV,texMathZoneW,texMathZoneX,texMathZoneY,texMathZoneZ,texNewCmd,texNewEnv,texOnlyMath,texOption,texParen,texRefZone,texSection,texBeginEnd,texSectionZone,texSpaceCode,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,@texMathZones,texTitle,texAbstract,texItalStyle,texItalBoldStyle,texNoSpell
if !exists("g:tex_nospell") || !g:tex_nospell
syn cluster texMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,@Spell
syn cluster texStyleGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,texStyleStatement,@Spell,texStyleMatcher
syn cluster texEnvGroup contains=texMatcher,texMathDelim,texSpecialChar,texStatement
syn cluster texFoldGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texInputFile,texLength,texLigature,texMatcher,texMathZoneV,texMathZoneW,texMathZoneX,texMathZoneY,texMathZoneZ,texNewCmd,texNewEnv,texOnlyMath,texOption,texParen,texRefZone,texSection,texBeginEnd,texSectionZone,texSpaceCode,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,@texMathZones,texTitle,texAbstract,texBoldStyle,texItalStyle,texNoSpell
syn cluster texBoldGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texInputFile,texLength,texLigature,texMatcher,texMathZoneV,texMathZoneW,texMathZoneX,texMathZoneY,texMathZoneZ,texNewCmd,texNewEnv,texOnlyMath,texOption,texParen,texRefZone,texSection,texBeginEnd,texSectionZone,texSpaceCode,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,@texMathZones,texTitle,texAbstract,texBoldStyle,texBoldItalStyle,texNoSpell
syn cluster texItalGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texInputFile,texLength,texLigature,texMatcher,texMathZoneV,texMathZoneW,texMathZoneX,texMathZoneY,texMathZoneZ,texNewCmd,texNewEnv,texOnlyMath,texOption,texParen,texRefZone,texSection,texBeginEnd,texSectionZone,texSpaceCode,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,@texMathZones,texTitle,texAbstract,texItalStyle,texItalBoldStyle,texNoSpell
if !s:tex_nospell
syn cluster texMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,@Spell
syn cluster texStyleGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,texStyleStatement,@Spell,texStyleMatcher
else
syn cluster texMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption
syn cluster texStyleGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,texStyleStatement,texStyleMatcher
syn cluster texMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption
syn cluster texStyleGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,texStyleStatement,texStyleMatcher
endif
syn cluster texPreambleMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTitle,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,texMathZoneZ
syn cluster texRefGroup contains=texMatcher,texComment,texDelimiter
syn cluster texRefGroup contains=texMatcher,texComment,texDelimiter
if !exists("g:tex_no_math")
syn cluster texPreambleMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTitle,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,texMathZoneZ
syn cluster texMathZones contains=texMathZoneV,texMathZoneW,texMathZoneX,texMathZoneY,texMathZoneZ
syn cluster texMatchGroup add=@texMathZones
syn cluster texMathDelimGroup contains=texMathDelimBad,texMathDelimKey,texMathDelimSet1,texMathDelimSet2
syn cluster texMathMatchGroup contains=@texMathZones,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMathDelim,texMathMatcher,texMathOper,texNewCmd,texNewEnv,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone
syn cluster texMathZoneGroup contains=texComment,texDelimiter,texLength,texMathDelim,texMathMatcher,texMathOper,texMathSymbol,texMathText,texRefZone,texSpecialChar,texStatement,texTypeSize,texTypeStyle
syn cluster texPreambleMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTitle,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,texMathZoneZ
syn cluster texMathZones contains=texMathZoneV,texMathZoneW,texMathZoneX,texMathZoneY,texMathZoneZ
syn cluster texMatchGroup add=@texMathZones
syn cluster texMathDelimGroup contains=texMathDelimBad,texMathDelimKey,texMathDelimSet1,texMathDelimSet2
syn cluster texMathMatchGroup contains=@texMathZones,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMathDelim,texMathMatcher,texMathOper,texNewCmd,texNewEnv,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone
syn cluster texMathZoneGroup contains=texComment,texDelimiter,texLength,texMathDelim,texMathMatcher,texMathOper,texMathSymbol,texMathText,texRefZone,texSpecialChar,texStatement,texTypeSize,texTypeStyle
if !s:tex_no_error
syn cluster texMathMatchGroup add=texMathError
syn cluster texMathZoneGroup add=texMathError
syn cluster texMathMatchGroup add=texMathError
syn cluster texMathZoneGroup add=texMathError
endif
syn cluster texMathZoneGroup add=@NoSpell
syn cluster texMathZoneGroup add=@NoSpell
" following used in the \part \chapter \section \subsection \subsubsection
" \paragraph \subparagraph \author \title highlighting
syn cluster texDocGroup contains=texPartZone,@texPartGroup
@@ -185,24 +192,24 @@ syn cluster texPreambleMatchGroup contains=texAccent,texBadMath,texComment,texDe
syn cluster texSubSubSectionGroup contains=texParaZone
syn cluster texParaGroup contains=texSubParaZone
if has("conceal") && &enc == 'utf-8'
syn cluster texMathZoneGroup add=texGreek,texSuperscript,texSubscript,texMathSymbol
syn cluster texMathMatchGroup add=texGreek,texSuperscript,texSubscript,texMathSymbol
syn cluster texMathZoneGroup add=texGreek,texSuperscript,texSubscript,texMathSymbol
syn cluster texMathMatchGroup add=texGreek,texSuperscript,texSubscript,texMathSymbol
endif
endif
" Try to flag {} and () mismatches: {{{1
if s:tex_fast =~ 'm'
if !s:tex_no_error
syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" contains=@texMatchGroup,texError
syn region texMatcher matchgroup=Delimiter start="\[" end="]" contains=@texMatchGroup,texError,@NoSpell
syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchGroup,texError
syn region texMatcher matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchGroup,texError,@NoSpell
else
syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" contains=@texMatchGroup
syn region texMatcher matchgroup=Delimiter start="\[" end="]" contains=@texMatchGroup
syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchGroup
syn region texMatcher matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchGroup
endif
if !exists("g:tex_nospell") || !g:tex_nospell
syn region texParen start="(" end=")" contains=@texMatchGroup,@Spell
if !s:tex_nospell
syn region texParen start="(" end=")" transparent contains=@texMatchGroup,@Spell
else
syn region texParen start="(" end=")" contains=@texMatchGroup
syn region texParen start="(" end=")" transparent contains=@texMatchGroup
endif
endif
if !s:tex_no_error
@@ -213,7 +220,7 @@ if s:tex_fast =~ 'M'
if !s:tex_no_error
syn match texMathError "}" contained
endif
syn region texMathMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\}" end="}" end="%stopzone\>" contained contains=@texMathMatchGroup
syn region texMathMatcher matchgroup=Delimiter start="{" skip="\%(\\\\\)*\\}" end="}" end="%stopzone\>" contained contains=@texMathMatchGroup
endif
endif
@@ -232,7 +239,6 @@ endif
" TeX/LaTeX delimiters: {{{1
syn match texDelimiter "&"
syn match texDelimiter "\\\\"
" syn match texDelimiter "[{}]"
" Tex/Latex Options: {{{1
syn match texOption "[^\\]\zs#\d\+\|^#\d\+"
@@ -253,7 +259,7 @@ syn match texLigature "\\\([ijolL]\|ae\|oe\|ss\|AA\|AE\|OE\)$"
" \begin{}/\end{} section markers: {{{1
syn match texBeginEnd "\\begin\>\|\\end\>" nextgroup=texBeginEndName
if s:tex_fast =~ 'm'
syn region texBeginEndName matchgroup=Delimiter start="{" end="}" contained nextgroup=texBeginEndModifier contains=texComment
syn region texBeginEndName matchgroup=Delimiter start="{" end="}" contained nextgroup=texBeginEndModifier contains=texComment
syn region texBeginEndModifier matchgroup=Delimiter start="\[" end="]" contained contains=texComment,@NoSpell
endif
@@ -264,7 +270,7 @@ if s:tex_fast =~ 'm'
endif
" Preamble syntax-based folding support: {{{1
if g:tex_fold_enabled && has("folding")
if s:tex_fold_enabled && has("folding")
syn region texPreamble transparent fold start='\zs\\documentclass\>' end='\ze\\begin{document}' contains=texStyle,@texPreambleMatchGroup
endif
@@ -342,28 +348,28 @@ syn match texSpaceCodeChar "`\\\=.\(\^.\)\==\(\d\|\"\x\{1,6}\|`.\)" contained
" Sections, subsections, etc: {{{1
if s:tex_fast =~ 'p'
if !exists("g:tex_nospell") || !g:tex_nospell
TexFold syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' contains=@texFoldGroup,@texDocGroup,@Spell
TexFold syn region texPartZone matchgroup=texSection start='\\part\>' end='\ze\s*\\\%(part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texPartGroup,@Spell
TexFold syn region texChapterZone matchgroup=texSection start='\\chapter\>' end='\ze\s*\\\%(chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texChapterGroup,@Spell
TexFold syn region texSectionZone matchgroup=texSection start='\\section\>' end='\ze\s*\\\%(section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSectionGroup,@Spell
TexFold syn region texSubSectionZone matchgroup=texSection start='\\subsection\>' end='\ze\s*\\\%(\%(sub\)\=section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSectionGroup,@Spell
TexFold syn region texSubSubSectionZone matchgroup=texSection start='\\subsubsection\>' end='\ze\s*\\\%(\%(sub\)\{,2}section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSubSectionGroup,@Spell
TexFold syn region texParaZone matchgroup=texSection start='\\paragraph\>' end='\ze\s*\\\%(paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texParaGroup,@Spell
TexFold syn region texSubParaZone matchgroup=texSection start='\\subparagraph\>' end='\ze\s*\\\%(\%(sub\)\=paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@Spell
TexFold syn region texTitle matchgroup=texSection start='\\\%(author\|title\)\>\s*{' end='}' contains=@texFoldGroup,@Spell
TexFold syn region texAbstract matchgroup=texSection start='\\begin\s*{\s*abstract\s*}' end='\\end\s*{\s*abstract\s*}' contains=@texFoldGroup,@Spell
else
TexFold syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' contains=@texFoldGroup,@texDocGroup
TexFold syn region texPartZone matchgroup=texSection start='\\part\>' end='\ze\s*\\\%(part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texPartGroup
TexFold syn region texChapterZone matchgroup=texSection start='\\chapter\>' end='\ze\s*\\\%(chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texChapterGroup
TexFold syn region texSectionZone matchgroup=texSection start='\\section\>' end='\ze\s*\\\%(section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSectionGroup
TexFold syn region texSubSectionZone matchgroup=texSection start='\\subsection\>' end='\ze\s*\\\%(\%(sub\)\=section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSectionGroup
TexFold syn region texSubSubSectionZone matchgroup=texSection start='\\subsubsection\>' end='\ze\s*\\\%(\%(sub\)\{,2}section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSubSectionGroup
TexFold syn region texParaZone matchgroup=texSection start='\\paragraph\>' end='\ze\s*\\\%(paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texParaGroup
TexFold syn region texSubParaZone matchgroup=texSection start='\\subparagraph\>' end='\ze\s*\\\%(\%(sub\)\=paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup
TexFold syn region texTitle matchgroup=texSection start='\\\%(author\|title\)\>\s*{' end='}' contains=@texFoldGroup
TexFold syn region texAbstract matchgroup=texSection start='\\begin\s*{\s*abstract\s*}' end='\\end\s*{\s*abstract\s*}' contains=@texFoldGroup
if !s:tex_nospell
TexFold syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' contains=@texFoldGroup,@texDocGroup,@Spell
TexFold syn region texPartZone matchgroup=texSection start='\\part\>' end='\ze\s*\\\%(part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texPartGroup,@Spell
TexFold syn region texChapterZone matchgroup=texSection start='\\chapter\>' end='\ze\s*\\\%(chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texChapterGroup,@Spell
TexFold syn region texSectionZone matchgroup=texSection start='\\section\>' end='\ze\s*\\\%(section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSectionGroup,@Spell
TexFold syn region texSubSectionZone matchgroup=texSection start='\\subsection\>' end='\ze\s*\\\%(\%(sub\)\=section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSectionGroup,@Spell
TexFold syn region texSubSubSectionZone matchgroup=texSection start='\\subsubsection\>' end='\ze\s*\\\%(\%(sub\)\{,2}section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSubSectionGroup,@Spell
TexFold syn region texParaZone matchgroup=texSection start='\\paragraph\>' end='\ze\s*\\\%(paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texParaGroup,@Spell
TexFold syn region texSubParaZone matchgroup=texSection start='\\subparagraph\>' end='\ze\s*\\\%(\%(sub\)\=paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@Spell
TexFold syn region texTitle matchgroup=texSection start='\\\%(author\|title\)\>\s*{' end='}' contains=@texFoldGroup,@Spell
TexFold syn region texAbstract matchgroup=texSection start='\\begin\s*{\s*abstract\s*}' end='\\end\s*{\s*abstract\s*}' contains=@texFoldGroup,@Spell
else
TexFold syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' contains=@texFoldGroup,@texDocGroup
TexFold syn region texPartZone matchgroup=texSection start='\\part\>' end='\ze\s*\\\%(part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texPartGroup
TexFold syn region texChapterZone matchgroup=texSection start='\\chapter\>' end='\ze\s*\\\%(chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texChapterGroup
TexFold syn region texSectionZone matchgroup=texSection start='\\section\>' end='\ze\s*\\\%(section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSectionGroup
TexFold syn region texSubSectionZone matchgroup=texSection start='\\subsection\>' end='\ze\s*\\\%(\%(sub\)\=section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSectionGroup
TexFold syn region texSubSubSectionZone matchgroup=texSection start='\\subsubsection\>' end='\ze\s*\\\%(\%(sub\)\{,2}section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSubSectionGroup
TexFold syn region texParaZone matchgroup=texSection start='\\paragraph\>' end='\ze\s*\\\%(paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texParaGroup
TexFold syn region texSubParaZone matchgroup=texSection start='\\subparagraph\>' end='\ze\s*\\\%(\%(sub\)\=paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup
TexFold syn region texTitle matchgroup=texSection start='\\\%(author\|title\)\>\s*{' end='}' contains=@texFoldGroup
TexFold syn region texAbstract matchgroup=texSection start='\\begin\s*{\s*abstract\s*}' end='\\end\s*{\s*abstract\s*}' contains=@texFoldGroup
endif
endif
@@ -400,7 +406,7 @@ if !exists("g:tex_no_math")
fun! TexNewMathZone(sfx,mathzone,starform)
let grpname = "texMathZone".a:sfx
let syncname = "texSyncMathZone".a:sfx
if g:tex_fold_enabled
if s:tex_fold_enabled
let foldcmd= " fold"
else
let foldcmd= ""
@@ -449,7 +455,7 @@ if !exists("g:tex_no_math")
else
syn region texMathZoneV matchgroup=Delimiter start="\\(" matchgroup=Delimiter end="\\)\|%stopzone\>" keepend contains=@texMathZoneGroup
syn region texMathZoneW matchgroup=Delimiter start="\\\[" matchgroup=Delimiter end="\\]\|%stopzone\>" keepend contains=@texMathZoneGroup
syn region texMathZoneX matchgroup=Delimiter start="\$" skip="\\\\\|\\\$" matchgroup=Delimiter end="\$" end="%stopzone\>" contains=@texMathZoneGroup
syn region texMathZoneX matchgroup=Delimiter start="\$" skip="\%(\\\\\)*\\\$" matchgroup=Delimiter end="\$" end="%stopzone\>" contains=@texMathZoneGroup
syn region texMathZoneY matchgroup=Delimiter start="\$\$" matchgroup=Delimiter end="\$\$" end="%stopzone\>" keepend contains=@texMathZoneGroup
endif
syn region texMathZoneZ matchgroup=texStatement start="\\ensuremath\s*{" matchgroup=texStatement end="}" end="%stopzone\>" contains=@texMathZoneGroup
@@ -544,7 +550,7 @@ endif
" Comments: {{{1
" Normal TeX LaTeX : %....
" Documented TeX Format: ^^A... -and- leading %s (only)
if !exists("g:tex_comment_nospell") || !g:tex_comment_nospell
if !s:tex_comment_nospell
syn cluster texCommentGroup contains=texTodo,@Spell
else
syn cluster texCommentGroup contains=texTodo,@NoSpell
@@ -556,18 +562,18 @@ if s:extfname == "dtx"
syn match texComment "\^\^A.*$" contains=@texCommentGroup
syn match texComment "^%\+" contains=@texCommentGroup
else
if g:tex_fold_enabled
if s:tex_fold_enabled
" allows syntax-folding of 2 or more contiguous comment lines
" single-line comments are not folded
syn match texComment "%.*$" contains=@texCommentGroup
syn match texComment "%.*$" contains=@texCommentGroup
if s:tex_fast =~ 'c'
TexFold syn region texComment start="^\zs\s*%.*\_s*%" skip="^\s*%" end='^\ze\s*[^%]'
TexFold syn region texNoSpell contained matchgroup=texComment start="%\s*nospell\s*{" end="%\s*nospell\s*}" contains=@texFoldGroup,@NoSpell
TexFold syn region texComment start="^\zs\s*%.*\_s*%" skip="^\s*%" end='^\ze\s*[^%]' contains=@texCommentGroup
TexFold syn region texNoSpell contained matchgroup=texComment start="%\s*nospell\s*{" end="%\s*nospell\s*}" contains=@texFoldGroup,@NoSpell
endif
else
syn match texComment "%.*$" contains=@texCommentGroup
if s:tex_fast =~ 'c'
syn region texNoSpell contained matchgroup=texComment start="%\s*nospell\s*{" end="%\s*nospell\s*}" contains=@texFoldGroup,@NoSpell
syn region texNoSpell contained matchgroup=texComment start="%\s*nospell\s*{" end="%\s*nospell\s*}" contains=@texFoldGroup,@NoSpell
endif
endif
endif
+40 -29
View File
@@ -2,7 +2,7 @@
" Language: Vim 7.4 script
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
" Last Change: October 19, 2015
" Version: 7.4-35
" Version: 7.4-36
" Automatically generated keyword lists: {{{1
" Quit when a syntax file was already loaded {{{2
@@ -157,7 +157,7 @@ syn match vimNumber "\<0[xX]\x\+"
syn match vimNumber "\%(^\|[^a-zA-Z]\)\zs#\x\{6}"
" All vimCommands are contained by vimIsCommands. {{{2
syn match vimCmdSep "[:|]\+" skipwhite nextgroup=vimAddress,vimAutoCmd,vimCommand,vimExtCmd,vimFilter,vimLet,vimMap,vimMark,vimSet,vimSyntax,vimUserCmd
syn match vimCmdSep "[:|]\+" skipwhite nextgroup=vimAddress,vimAutoCmd,vimIsCommand,vimExtCmd,vimFilter,vimLet,vimMap,vimMark,vimSet,vimSyntax,vimUserCmd
syn match vimIsCommand "\<\h\w*\>" contains=vimCommand
syn match vimVar contained "\<\h[a-zA-Z0-9#_]*\>"
syn match vimVar "\<[bwglsav]:\h[a-zA-Z0-9#_]*\>"
@@ -190,8 +190,12 @@ syn keyword vimFTOption contained detect indent off on plugin
" Augroup : vimAugroupError removed because long augroups caused sync'ing problems. {{{2
" ======= : Trade-off: Increasing synclines with slower editing vs augroup END error checking.
syn cluster vimAugroupList contains=vimAugroup,vimIsCommand,vimCommand,vimUserCmd,vimExecute,vimNotFunc,vimFuncName,vimFunction,vimFunctionError,vimLineComment,vimMap,vimSpecFile,vimOper,vimNumber,vimOperParen,vimComment,vimString,vimSubst,vimMark,vimRegister,vimAddress,vimFilter,vimCmplxRepeat,vimComment,vimLet,vimSet,vimAutoCmd,vimRegion,vimSynLine,vimNotation,vimCtrlChar,vimFuncVar,vimContinue
VimFolda syn region vimAugroup matchgroup=vimStatement start="\<aug\%[roup]\ze\s\+\%([eE][nN][dD]\>\)\@3<!\h\w*" matchgroup=vimStatement end="\<aug\%[roup]\>\s\+[eE][nN][dD]\>" contains=vimAutoCmd,@vimAugroupList
syn match vimAugroup "aug\%[roup]!" contains=vimAugroupKey
if exists("g:vimsyn_folding") && g:vimsyn_folding =~ 'a'
syn region vimAugroup fold matchgroup=vimAugroupKey start="\<aug\%[roup]\>\ze\s\+\K\k*" end="\<aug\%[roup]\>\ze\s\+[eE][nN][dD]\>" contains=vimAutoCmd,@vimAugroupList
else
syn region vimAugroup matchgroup=vimAugroupKey start="\<aug\%[roup]\>\ze\s\+\K\k*" end="\<aug\%[roup]\>\ze\s\+[eE][nN][dD]\>" contains=vimAutoCmd,@vimAugroupList
endif
syn match vimAugroup "aug\%[roup]!" contains=vimAugroupKey
if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_noaugrouperror")
syn match vimAugroupError "\<aug\%[roup]\>\s\+[eE][nN][dD]\>"
endif
@@ -199,12 +203,11 @@ syn keyword vimAugroupKey contained aug[roup]
" Operators: {{{2
" =========
" COMBAK: vimOperParen used to have "oneline"
syn cluster vimOperGroup contains=vimEnvvar,vimFunc,vimFuncVar,vimOper,vimOperParen,vimNumber,vimString,vimRegister,vimContinue
syn match vimOper "\(==\|!=\|>=\|<=\|=\~\|!\~\|>\|<\|=\)[?#]\{0,2}" skipwhite nextgroup=vimString,vimSpecFile
syn match vimOper "||\|&&\|[-+.]" skipwhite nextgroup=vimString,vimSpecFile
syn region vimOperParen matchgroup=vimParenSep start="(" end=")" contains=@vimOperGroup
syn region vimOperParen matchgroup=vimSep start="{" end="}" contains=@vimOperGroup nextgroup=vimVar,vimFuncVar
syn region vimOperParen matchgroup=vimSep start="{" end="}" contains=@vimOperGroup nextgroup=vimVar,vimFuncVar
if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_noopererror")
syn match vimOperError ")"
endif
@@ -212,11 +215,15 @@ endif
" Functions : Tag is provided for those who wish to highlight tagged functions {{{2
" =========
syn cluster vimFuncList contains=vimCommand,vimFunctionError,vimFuncKey,Tag,vimFuncSID
syn cluster vimFuncBodyList contains=vimAbb,vimAddress,vimAugroupKey,vimAutoCmd,vimCmplxRepeat,vimComment,vimComment,vimContinue,vimCtrlChar,vimEcho,vimEchoHL,vimExecute,vimIf,vimIsCommand,vimFBVar,vimFunc,vimFunction,vimFuncVar,vimHighlight,vimIsCommand,vimLet,vimLineComment,vimMap,vimMark,vimNorm,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegion,vimRegister,vimSearch,vimSet,vimSpecFile,vimString,vimSubst,vimSynLine,vimUnmap,vimUserCommand
syn cluster vimFuncBodyList contains=vimAbb,vimAddress,vimAugroupKey,vimAutoCmd,vimCmplxRepeat,vimComment,vimComment,vimContinue,vimCtrlChar,vimEcho,vimEchoHL,vimExecute,vimIf,vimIsCommand,vimFBVar,vimFunc,vimFunction,vimFuncVar,vimGlobal,vimHighlight,vimIsCommand,vimLet,vimLineComment,vimMap,vimMark,vimNorm,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegion,vimRegister,vimSet,vimSpecFile,vimString,vimSubst,vimSynLine,vimUnmap,vimUserCommand
syn match vimFunction "\<fu\%[nction]!\=\s\+\%(<[sS][iI][dD]>\|[sSgGbBwWtTlL]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)*\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody
VimFoldf syn region vimFuncBody contained start="\ze(" matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\)" contains=@vimFuncBodyList
syn match vimFuncVar contained "a:\(\h\w*\|\d\+\)"
if exists("g:vimsyn_folding") && g:vimsyn_folding =~ 'f'
syn region vimFuncBody contained fold start="\ze\s*(" matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\)" contains=@vimFuncBodyList
else
syn region vimFuncBody contained start="\ze\s*(" matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\)" contains=@vimFuncBodyList
endif
syn match vimFuncVar contained "a:\(\K\k*\|\d\+\)"
syn match vimFuncSID contained "\c<sid>\|\<s:"
syn keyword vimFuncKey contained fu[nction]
syn match vimFuncBlank contained "\s\+"
@@ -237,14 +244,16 @@ syn match vimSpecFileMod "\(:[phtre]\)\+" contained
" =======================
syn cluster vimUserCmdList contains=vimAddress,vimSyntax,vimHighlight,vimAutoCmd,vimCmplxRepeat,vimComment,vimCtrlChar,vimEscapeBrace,vimFilter,vimFunc,vimFuncName,vimFunction,vimFunctionError,vimIsCommand,vimMark,vimNotation,vimNumber,vimOper,vimRegion,vimRegister,vimLet,vimSet,vimSetEqual,vimSetString,vimSpecFile,vimString,vimSubst,vimSubstRep,vimSubstRange,vimSynLine
syn keyword vimUserCommand contained com[mand]
syn match vimUserCmd "\<com\%[mand]!\=\>.*$" contains=vimUserAttrb,vimUserCommand,@vimUserCmdList
syn match vimUserAttrb contained "-n\%[args]=[01*?+]" contains=vimUserAttrbKey,vimOper
syn match vimUserAttrb contained "-com\%[plete]=" contains=vimUserAttrbKey,vimOper nextgroup=vimUserAttrbCmplt,vimUserCmdError
syn match vimUserAttrb contained "-ra\%[nge]\(=%\|=\d\+\)\=" contains=vimNumber,vimOper,vimUserAttrbKey
syn match vimUserAttrb contained "-cou\%[nt]=\d\+" contains=vimNumber,vimOper,vimUserAttrbKey
syn match vimUserAttrb contained "-bang\=\>" contains=vimOper,vimUserAttrbKey
syn match vimUserAttrb contained "-bar\>" contains=vimOper,vimUserAttrbKey
syn match vimUserAttrb contained "-re\%[gister]\>" contains=vimOper,vimUserAttrbKey
syn match vimUserCmd "\<com\%[mand]!\=\>.*$" contains=vimUserAttrb,vimUserAttrbError,vimUserCommand,@vimUserCmdList
syn match vimUserAttrbError contained "-\a\+\ze\s"
syn match vimUserAttrb contained "-nargs=[01*?+]" contains=vimUserAttrbKey,vimOper
syn match vimUserAttrb contained "-complete=" contains=vimUserAttrbKey,vimOper nextgroup=vimUserAttrbCmplt,vimUserCmdError
syn match vimUserAttrb contained "-range\(=%\|=\d\+\)\=" contains=vimNumber,vimOper,vimUserAttrbKey
syn match vimUserAttrb contained "-count\(=\d\+\)\=" contains=vimNumber,vimOper,vimUserAttrbKey
syn match vimUserAttrb contained "-bang\>" contains=vimOper,vimUserAttrbKey
syn match vimUserAttrb contained "-bar\>" contains=vimOper,vimUserAttrbKey
syn match vimUserAttrb contained "-buffer\>" contains=vimOper,vimUserAttrbKey
syn match vimUserAttrb contained "-register\>" contains=vimOper,vimUserAttrbKey
if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_nousercmderror")
syn match vimUserCmdError contained "\S\+\>"
endif
@@ -318,7 +327,7 @@ syn match vimMark "\<norm\%[al]\s\zs'[a-zA-Z0-9]" nextgroup=vimOper,vimMarkNumbe
syn match vimMarkNumber "[-+]\d\+" nextgroup=vimSubst contained contains=vimOper
syn match vimPlainMark contained "'[a-zA-Z0-9]"
syn match vimRegister '[^,;[{]\zs"[a-zA-Z0-9.%#:_\-/]\ze[^a-zA-Z_":0-9]'
syn match vimRegister '[^,;[{: \t]\zs"[a-zA-Z0-9.%#:_\-/]\ze[^a-zA-Z_":0-9]'
syn match vimRegister '\<norm\s\+\zs"[a-zA-Z0-9]'
syn match vimRegister '\<normal\s\+\zs"[a-zA-Z0-9]'
syn match vimRegister '@"'
@@ -338,7 +347,7 @@ syn match vimCmplxRepeat '@[0-9a-z".=@:]\ze\($\|[^a-zA-Z]\>\)'
syn region vimSet matchgroup=vimCommand start="\<\%(setl\%[ocal]\|setg\%[lobal]\|se\%[t]\)\>" skip="\%(\\\\\)*\\." end="$" matchgroup=vimNotation end="<[cC][rR]>" keepend oneline contains=vimSetEqual,vimOption,vimErrSetting,vimComment,vimSetString,vimSetMod
syn region vimSetEqual contained start="[=:]\|[-+^]=" skip="\\\\\|\\\s" end="[| \t]\|$"me=e-1 contains=vimCtrlChar,vimSetSep,vimNotation,vimEnvvar oneline
syn region vimSetString contained start=+="+hs=s+1 skip=+\\\\\|\\"+ end=+"+ contains=vimCtrlChar
syn match vimSetSep contained "[,:]"
syn match vimSetSep contained "[,:]" skipwhite nextgroup=vimCommand
syn match vimSetMod contained "&vim\=\|[!&?<]\|all&"
" Let {{{2
@@ -373,11 +382,11 @@ syn keyword vimMap mapc[lear] smapc[lear]
syn keyword vimUnmap cu[nmap] iu[nmap] lu[nmap] nun[map] ou[nmap] sunm[ap] unm[ap] unm[ap] vu[nmap] xu[nmap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs
syn match vimMapLhs contained "\S\+" contains=vimNotation,vimCtrlChar skipwhite nextgroup=vimMapRhs
syn match vimMapBang contained "!" skipwhite nextgroup=vimMapMod,vimMapLhs
syn match vimMapMod contained "\c<\(buffer\|expr\|\(local\)\=leader\|plug\|script\|sid\|unique\|silent\)\+>" contains=vimMapModKey,vimMapModErr skipwhite nextgroup=vimMapMod,vimMapLhs
syn match vimMapMod contained "\c<\(buffer\|expr\|\(local\)\=leader\|nowait\|plug\|script\|sid\|unique\|silent\)\+>" contains=vimMapModKey,vimMapModErr skipwhite nextgroup=vimMapMod,vimMapLhs
syn match vimMapRhs contained ".*" contains=vimNotation,vimCtrlChar skipnl nextgroup=vimMapRhsExtend
syn match vimMapRhsExtend contained "^\s*\\.*$" contains=vimNotation,vimCtrlChar,vimContinue skipnl nextgroup=vimMapRhsExtend
syn match vimMapRhsExtend contained "^\s*\\.*$" contains=vimContinue
syn case ignore
syn keyword vimMapModKey contained buffer expr leader localleader plug script sid silent unique
syn keyword vimMapModKey contained buffer expr leader localleader nowait plug script sid silent unique
syn case match
" Menus {{{2
@@ -597,12 +606,12 @@ syn region vimGlobal matchgroup=Statement start='\<v\%[global]!\=/' skip='\\.' e
" Allows users to specify the type of embedded script highlighting
" they want: (perl/python/ruby/tcl support)
" g:vimsyn_embed == 0 : don't embed any scripts
" g:vimsyn_embed ~= 'l' : embed lua (but only if vim supports it)
" g:vimsyn_embed ~= 'm' : embed mzscheme (but only if vim supports it)
" g:vimsyn_embed ~= 'p' : embed perl (but only if vim supports it)
" g:vimsyn_embed ~= 'P' : embed python (but only if vim supports it)
" g:vimsyn_embed ~= 'r' : embed ruby (but only if vim supports it)
" g:vimsyn_embed ~= 't' : embed tcl (but only if vim supports it)
" g:vimsyn_embed =~ 'l' : embed lua (but only if vim supports it)
" g:vimsyn_embed =~ 'm' : embed mzscheme (but only if vim supports it)
" g:vimsyn_embed =~ 'p' : embed perl (but only if vim supports it)
" g:vimsyn_embed =~ 'P' : embed python (but only if vim supports it)
" g:vimsyn_embed =~ 'r' : embed ruby (but only if vim supports it)
" g:vimsyn_embed =~ 't' : embed tcl (but only if vim supports it)
if !exists("g:vimsyn_embed")
let g:vimsyn_embed= "lmpPr"
endif
@@ -688,6 +697,8 @@ if g:vimsyn_embed =~ 'P' && (has("python") || has("python3")) && filereadable(s:
exe "syn include @vimPythonScript ".s:pythonpath
VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+py\%[thon]3\=\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimPythonScript
VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+py\%[thon]3\=\s*<<\s*$+ end=+\.$+ contains=@vimPythonScript
VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+Py\%[thon]2or3\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimPythonScript
VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+Py\%[thon]2or3\=\s*<<\s*$+ end=+\.$+ contains=@vimPythonScript
syn cluster vimFuncBodyList add=vimPythonRegion
else
syn region vimEmbedError start=+py\%[thon]3\=\s*<<\s*\z(.*\)$+ end=+^\z1$+
@@ -770,7 +781,6 @@ syn sync match vimAugroupSyncA groupthere NONE "\<aug\%[roup]\>\s\+[eE][nN][dD]"
" Highlighting Settings {{{2
" ====================
if !exists("g:vimsyn_noerror")
hi def link vimBehaveError vimError
hi def link vimCollClassErr vimError
@@ -925,6 +935,7 @@ hi def link vimUserAttrbCmpltFunc Special
hi def link vimUserAttrbCmplt vimSpecial
hi def link vimUserAttrbKey vimOption
hi def link vimUserAttrb vimSpecial
hi def link vimUserAttrbError Error
hi def link vimUserCmdError Error
hi def link vimUserCommand vimCommand
hi def link vimUserFunc Normal
File diff suppressed because it is too large Load Diff
Binary file not shown.
+1 -1
View File
@@ -1256,7 +1256,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>81</string>
<string>82</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
-22
View File
@@ -208,7 +208,6 @@ fsEventCallback(ConstFSEventStreamRef streamRef,
[NSNumber numberWithBool:NO], MMNoFontSubstitutionKey,
[NSNumber numberWithBool:YES], MMLoginShellKey,
[NSNumber numberWithInt:2], MMRendererKey,
[NSNumber numberWithBool:NO], MMRendererLigaturesSupportKey,
[NSNumber numberWithInt:MMUntitledWindowAlways],
MMUntitledWindowKey,
[NSNumber numberWithBool:NO], MMTexturedWindowKey,
@@ -1227,27 +1226,6 @@ fsEventCallback(ConstFSEventStreamRef streamRef,
[self rebuildPreloadCache];
}
- (IBAction)ligaturesButtonClicked:(id)sender
{
ASLogDebug(@"Toggle CoreText ligatures");
BOOL enable = ([sender state] == NSOnState);
// Update the user default MMRendererLigaturesSupport and synchronize the
// change so that any new Vim process will pick up on the changed setting.
CFPreferencesSetAppValue(
(CFStringRef)MMRendererLigaturesSupportKey,
(CFPropertyListRef)[NSNumber numberWithBool:enable],
kCFPreferencesCurrentApplication);
CFPreferencesAppSynchronize(kCFPreferencesCurrentApplication);
ASLogInfo(@"Use ligatures=%hhd", enable);
// This action is called when the user clicks the "enable support for ligatures"
// button in the advanced preferences pane.
[self rebuildPreloadCache];
}
- (IBAction)loginShellButtonClicked:(id)sender
{
ASLogDebug(@"Toggle login shell option");
+1
View File
@@ -73,6 +73,7 @@ enum { MMMaxCellsPerChar = 2 };
- (void)setPreEditRow:(int)row column:(int)col;
- (void)setMouseShape:(int)shape;
- (void)setAntialias:(BOOL)state;
- (void)setLigatures:(BOOL)state;
- (void)setImControl:(BOOL)enable;
- (void)activateIm:(BOOL)enable;
- (void)checkImState;
+5
View File
@@ -361,6 +361,11 @@ defaultLineHeightForFont(NSFont *font)
antialias = state;
}
- (void)setLigatures:(BOOL)state
{
// ONLY in Core Text!
}
- (void)setImControl:(BOOL)enable
{
[helper setImControl:enable];
+1
View File
@@ -136,6 +136,7 @@ extern NSTimeInterval MMBalloonEvalInternalDelay;
- (void)setFullScreenBackgroundColor:(int)color;
- (void)setAntialias:(BOOL)antialias;
- (void)setLigatures:(BOOL)ligatures;
#ifdef BLUR_TRANSPARENCY
- (void)setBlurRadius:(int)radius;
+7
View File
@@ -1180,6 +1180,13 @@ extern GuiFont gui_mch_retain_font(GuiFont font);
[self queueMessage:msgid data:nil];
}
- (void)setLigatures:(BOOL)ligatures
{
int msgid = ligatures ? EnableLigaturesMsgID : DisableLigaturesMsgID;
[self queueMessage:msgid data:nil];
}
#ifdef BLUR_TRANSPARENCY
- (void)setBlurRadius:(int)radius
+2 -1
View File
@@ -31,7 +31,7 @@
float fontDescent;
BOOL antialias;
BOOL useLigatures;
BOOL ligatures;
NSMutableArray *drawData;
MMTextViewHelper *helper;
@@ -79,6 +79,7 @@
- (void)setPreEditRow:(int)row column:(int)col;
- (void)setMouseShape:(int)shape;
- (void)setAntialias:(BOOL)state;
- (void)setLigatures:(BOOL)state;
- (void)setImControl:(BOOL)enable;
- (void)activateIm:(BOOL)enable;
- (void)checkImState;
+126 -63
View File
@@ -132,17 +132,7 @@ defaultAdvanceForFont(NSFont *font)
[self registerForDraggedTypes:[NSArray arrayWithObjects:
NSFilenamesPboardType, NSStringPboardType, nil]];
// Check if ligatures should be used or not
{
Boolean val;
Boolean keyValid;
val = CFPreferencesGetAppBooleanValue((CFStringRef)MMRendererLigaturesSupportKey,
kCFPreferencesCurrentApplication,
&keyValid);
useLigatures = NO;
if(keyValid) { useLigatures = val; }
}
ligatures = NO;
return self;
}
@@ -319,7 +309,7 @@ defaultAdvanceForFont(NSFont *font)
[fontWide release];
// Use 'Apple Color Emoji' font for rendering emoji
CGFloat size = [newFont pointSize];
CGFloat size = [font pointSize];
NSFontDescriptor *emojiDesc = [NSFontDescriptor
fontDescriptorWithName:@"Apple Color Emoji" size:size];
NSFontDescriptor *newFontDesc = [newFont fontDescriptor];
@@ -387,6 +377,11 @@ defaultAdvanceForFont(NSFont *font)
antialias = state;
}
- (void)setLigatures:(BOOL)state
{
ligatures = state;
}
- (void)setImControl:(BOOL)enable
{
[helper setImControl:enable];
@@ -1039,6 +1034,54 @@ lookupFont(NSMutableArray *fontCache, const unichar *chars, UniCharCount count,
return newFontRef;
}
static CFAttributedStringRef
attributedStringForString(NSString *string, const CTFontRef font,
BOOL useLigatures)
{
NSDictionary *attrs = [NSDictionary dictionaryWithObjectsAndKeys:
(id)font, kCTFontAttributeName,
// 2 - full ligatures including rare
// 1 - basic ligatures
// 0 - no ligatures
[NSNumber numberWithInteger:(useLigatures ? 1 : 0)],
kCTLigatureAttributeName,
nil
];
return CFAttributedStringCreate(NULL, (CFStringRef)string,
(CFDictionaryRef)attrs);
}
static UniCharCount
fetchGlyphsAndAdvances(const CTLineRef line, CGGlyph *glyphs, CGSize *advances,
UniCharCount length)
{
NSArray *glyphRuns = (NSArray*)CTLineGetGlyphRuns(line);
// get a hold on the actual character widths and glyphs in line
UniCharCount offset = 0;
for (id item in glyphRuns) {
CTRunRef run = (CTRunRef)item;
CFIndex count = CTRunGetGlyphCount(run);
if (count > 0 && count - offset > length)
count = length - offset;
CFRange range = CFRangeMake(0, count);
if (glyphs != NULL)
CTRunGetGlyphs(run, range, &glyphs[offset]);
if (advances != NULL)
CTRunGetAdvances(run, range, &advances[offset]);
offset += count;
if (offset >= length)
break;
}
return offset;
}
static UniCharCount
gatherGlyphs(CGGlyph glyphs[], UniCharCount count)
{
@@ -1055,62 +1098,80 @@ gatherGlyphs(CGGlyph glyphs[], UniCharCount count)
return glyphCount;
}
static void
ligatureGlyphsForChars(const unichar *chars, CGGlyph *glyphs, CGPoint *positions, UniCharCount *length, CTFontRef font )
static UniCharCount
ligatureGlyphsForChars(const unichar *chars, CGGlyph *glyphs,
CGPoint *positions, UniCharCount length, CTFontRef font)
{
/* CoreText has no simple wait of retrieving a ligature for a set of UniChars.
* The way proposed on the CoreText ML is to convert the text to an attributed
* string, create a CTLine from it and retrieve the Glyphs from the CTRuns in it.
*/
NSString *text = [NSString stringWithCharacters:chars
length:*length];
// CoreText has no simple wait of retrieving a ligature for a set of
// UniChars. The way proposed on the CoreText ML is to convert the text to
// an attributed string, create a CTLine from it and retrieve the Glyphs
// from the CTRuns in it.
CGGlyph refGlyphs[length];
CGPoint refPositions[length];
NSDictionary *attrs = [NSDictionary dictionaryWithObjectsAndKeys:
(id)font, kCTFontAttributeName,
// 2 - full ligatures including rare
[NSNumber numberWithInteger: 2], kCTLigatureAttributeName,
nil
];
memcpy(refGlyphs, glyphs, sizeof(CGGlyph) * length);
memcpy(refPositions, positions, sizeof(CGSize) * length);
NSAttributedString *attrText = [[NSAttributedString alloc] initWithString:text
attributes:attrs];
memset(glyphs, 0, sizeof(CGGlyph) * length);
CGPoint refPos = positions[0];
NSString *plainText = [NSString stringWithCharacters:chars length:length];
CFAttributedStringRef ligatureText = attributedStringForString(plainText,
font, YES);
CTLineRef line = CTLineCreateWithAttributedString((CFAttributedStringRef)attrText);
CTLineRef ligature = CTLineCreateWithAttributedString(ligatureText);
UniCharCount offset = 0;
NSArray *glyphRuns = (NSArray*)CTLineGetGlyphRuns(line);
CGSize ligatureRanges[length], regularRanges[length];
for (id item in glyphRuns) {
CTRunRef run = (CTRunRef)item;
CFIndex count = CTRunGetGlyphCount(run);
// get the (ligature)glyphs and advances for the new text
UniCharCount offset = fetchGlyphsAndAdvances(ligature, glyphs,
ligatureRanges, length);
// fetch the advances for the base text
CTFontGetAdvancesForGlyphs(font, kCTFontOrientationDefault, refGlyphs,
regularRanges, length);
if(count > 0) {
if(count - offset > *length) {
count = (*length) - offset;
}
CFRelease(ligatureText);
CFRelease(ligature);
// tricky part: compare both advance ranges and chomp positions which are
// covered by a single ligature while keeping glyphs not in the ligature
// font.
#define fequal(a, b) (fabs((a) - (b)) < FLT_EPSILON)
#define fless(a, b)((a) - (b) < FLT_EPSILON) && (fabs((a) - (b)) > FLT_EPSILON)
CFIndex skip = 0;
for (CFIndex i = 0; i < offset && skip + i < length; ++i) {
memcpy(&positions[i], &refPositions[skip + i], sizeof(CGSize));
if (fequal(ligatureRanges[i].width, regularRanges[skip + i].width)) {
// [mostly] same width
continue;
} else if (fless(ligatureRanges[i].width,
regularRanges[skip + i].width)) {
// original is wider than our result - use the original glyph
// FIXME: this is currently the only way to detect emoji (except
// for 'glyph[i] == 5')
glyphs[i] = refGlyphs[skip + i];
continue;
}
CFRange range = CFRangeMake(0, count);
CTRunGetGlyphs(run, range, &glyphs[offset]);
CTRunGetPositions(run, range, &positions[offset]);
// no, that's a ligature
// count how many positions this glyph would take up in the base text
CFIndex j = 0;
float width = ceil(regularRanges[skip + i].width);
offset += count;
if(offset >= *length) {
// don't copy more glyphs then there is space for
break;
while ((int)width < (int)ligatureRanges[i].width
&& skip + i + j < length) {
width += ceil(regularRanges[++j + skip + i].width);
}
skip += j;
}
// fixup relative positioning
CFIndex i;
for( i = 0; i < offset; ++i ) {
positions[i].x += refPos.x;
positions[i].y += refPos.y;
}
#undef fless
#undef fequal
// as ligatures combine characters it is required to adjust the
// original length value
*length = offset;
return offset;
}
static void
@@ -1120,10 +1181,12 @@ recurseDraw(const unichar *chars, CGGlyph *glyphs, CGPoint *positions,
{
if (CTFontGetGlyphsForCharacters(fontRef, chars, glyphs, length)) {
// All chars were mapped to glyphs, so draw all at once and return.
length = gatherGlyphs(glyphs, length);
if (useLigatures) {
memset(glyphs, 0, sizeof(CGGlyph) * length);
ligatureGlyphsForChars(chars, glyphs, positions, &length, fontRef);
length = ligatureGlyphsForChars(chars, glyphs, positions, length,
fontRef);
} else {
// only fixup surrogate pairs if we're not using ligatures
length = gatherGlyphs(glyphs, length);
}
CTFontDrawGlyphs(fontRef, glyphs, positions, length, context);
@@ -1176,14 +1239,14 @@ recurseDraw(const unichar *chars, CGGlyph *glyphs, CGPoint *positions,
UniCharCount attemptedCount = count;
CTFontRef fallback = nil;
while (fallback == nil && attemptedCount > 0) {
fallback = lookupFont(fontCache, chars, attemptedCount, fontRef);
if (!fallback)
attemptedCount /= 2;
fallback = lookupFont(fontCache, chars, attemptedCount,
fontRef);
if (!fallback)
attemptedCount /= 2;
}
if (!fallback) {
return;
}
if (!fallback)
return;
recurseDraw(chars, glyphs, positions, attemptedCount, context,
fallback, fontCache, useLigatures);
@@ -1310,7 +1373,7 @@ recurseDraw(const unichar *chars, CGGlyph *glyphs, CGPoint *positions,
}
CGContextSetTextPosition(context, x, y+fontDescent);
recurseDraw(chars, glyphs, positions, length, context, fontRef, fontCache, useLigatures);
recurseDraw(chars, glyphs, positions, length, context, fontRef, fontCache, ligatures);
CFRelease(fontRef);
CGContextRestoreGState(context);
+2
View File
@@ -20,6 +20,7 @@
int insertionPointShape;
int insertionPointFraction;
BOOL antialias;
BOOL ligatures;
NSRect *invertRects;
int numInvertRects;
@@ -32,6 +33,7 @@
- (void)performBatchDrawWithData:(NSData *)data;
- (void)setMouseShape:(int)shape;
- (void)setAntialias:(BOOL)antialias;
- (void)setLigatures:(BOOL)ligatures;
- (void)setImControl:(BOOL)enable;
- (void)activateIm:(BOOL)enable;
- (void)checkImState;
+5
View File
@@ -307,6 +307,11 @@
antialias = state;
}
- (void)setLigatures:(BOOL)state
{
ligatures = state;
}
- (void)setImControl:(BOOL)enable
{
[helper setImControl:enable];
+6
View File
@@ -574,8 +574,10 @@ static BOOL isUnsafeMessage(int msgid);
[windowController updateTabsWithData:data];
} else if (ShowTabBarMsgID == msgid) {
[windowController showTabBar:YES];
[self sendMessage:BackingPropertiesChangedMsgID data:nil];
} else if (HideTabBarMsgID == msgid) {
[windowController showTabBar:NO];
[self sendMessage:BackingPropertiesChangedMsgID data:nil];
} else if (SetTextDimensionsMsgID == msgid || LiveResizeMsgID == msgid ||
SetTextDimensionsReplyMsgID == msgid) {
const void *bytes = [data bytes];
@@ -799,6 +801,10 @@ static BOOL isUnsafeMessage(int msgid);
[[[windowController vimView] textView] setAntialias:YES];
} else if (DisableAntialiasMsgID == msgid) {
[[[windowController vimView] textView] setAntialias:NO];
} else if (EnableLigaturesMsgID == msgid) {
[[[windowController vimView] textView] setLigatures:YES];
} else if (DisableLigaturesMsgID == msgid) {
[[[windowController vimView] textView] setLigatures:NO];
} else if (SetVimStateMsgID == msgid) {
NSDictionary *dict = [NSDictionary dictionaryWithData:data];
if (dict) {
+2 -1
View File
@@ -211,6 +211,8 @@ enum {
AddToMRUMsgID,
BackingPropertiesChangedMsgID,
SetBlurRadiusMsgID,
EnableLigaturesMsgID,
DisableLigaturesMsgID,
LastMsgID // NOTE: MUST BE LAST MESSAGE IN ENUM!
};
@@ -277,7 +279,6 @@ extern NSString *MMNoWindowKey;
extern NSString *MMAutosaveRowsKey;
extern NSString *MMAutosaveColumnsKey;
extern NSString *MMRendererKey;
extern NSString *MMRendererLigaturesSupportKey;
enum {
MMRendererDefault = 0,
+2 -1
View File
@@ -101,6 +101,8 @@ char *MessageStrings[] =
"AddToMRUMsgID",
"BackingPropertiesChangedMsgID",
"SetBlurRadiusMsgID",
"EnableLigaturesMsgID",
"DisableLigaturesMsgID",
"END OF MESSAGE IDs" // NOTE: Must be last!
};
@@ -117,7 +119,6 @@ NSString *MMNoWindowKey = @"MMNoWindow";
NSString *MMAutosaveRowsKey = @"MMAutosaveRows";
NSString *MMAutosaveColumnsKey = @"MMAutosaveColumns";
NSString *MMRendererKey = @"MMRenderer";
NSString *MMRendererLigaturesSupportKey = @"MMRendererLigaturesSupport";
// Vim find pasteboard type (string contains Vim regex patterns)
NSString *VimFindPboardType = @"VimFindPboardType";
@@ -57,8 +57,6 @@
A27E47880A28EE7C007BA395 /* TabControlRep.tif in Resources */ = {isa = PBXBuildFile; fileRef = A20822EF0959F6AA00C5F5A4 /* TabControlRep.tif */; };
A2C0D99509AF870000ED379C /* pi.png in Resources */ = {isa = PBXBuildFile; fileRef = A2C0D99309AF870000ED379C /* pi.png */; };
A2D32EDC09A634C900EC8662 /* PSMTabStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = A2D32EDA09A634C900EC8662 /* PSMTabStyle.h */; };
A2D32EE809A6399300EC8662 /* PSMAquaTabStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = A2D32EE609A6399300EC8662 /* PSMAquaTabStyle.h */; };
A2D32EE909A6399300EC8662 /* PSMAquaTabStyle.m in Sources */ = {isa = PBXBuildFile; fileRef = A2D32EE709A6399300EC8662 /* PSMAquaTabStyle.m */; };
A2D32EF709A63BF700EC8662 /* AquaTabClose_Front_Pressed.tif in Resources */ = {isa = PBXBuildFile; fileRef = A2D32EF009A63BF700EC8662 /* AquaTabClose_Front_Pressed.tif */; };
A2D32EF809A63BF700EC8662 /* AquaTabClose_Front_Rollover.tif in Resources */ = {isa = PBXBuildFile; fileRef = A2D32EF109A63BF700EC8662 /* AquaTabClose_Front_Rollover.tif */; };
A2D32EF909A63BF700EC8662 /* AquaTabClose_Front.tif in Resources */ = {isa = PBXBuildFile; fileRef = A2D32EF209A63BF700EC8662 /* AquaTabClose_Front.tif */; };
@@ -155,8 +153,6 @@
A2A711BE09E5BF0500D0089B /* WindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = WindowController.m; path = source/WindowController.m; sourceTree = "<group>"; };
A2C0D99309AF870000ED379C /* pi.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = pi.png; path = images/pi.png; sourceTree = "<group>"; };
A2D32EDA09A634C900EC8662 /* PSMTabStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PSMTabStyle.h; path = source/PSMTabStyle.h; sourceTree = "<group>"; };
A2D32EE609A6399300EC8662 /* PSMAquaTabStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PSMAquaTabStyle.h; path = source/PSMAquaTabStyle.h; sourceTree = "<group>"; };
A2D32EE709A6399300EC8662 /* PSMAquaTabStyle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PSMAquaTabStyle.m; path = source/PSMAquaTabStyle.m; sourceTree = "<group>"; };
A2D32EF009A63BF700EC8662 /* AquaTabClose_Front_Pressed.tif */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = AquaTabClose_Front_Pressed.tif; path = images/AquaTabClose_Front_Pressed.tif; sourceTree = "<group>"; };
A2D32EF109A63BF700EC8662 /* AquaTabClose_Front_Rollover.tif */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = AquaTabClose_Front_Rollover.tif; path = images/AquaTabClose_Front_Rollover.tif; sourceTree = "<group>"; };
A2D32EF209A63BF700EC8662 /* AquaTabClose_Front.tif */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = AquaTabClose_Front.tif; path = images/AquaTabClose_Front.tif; sourceTree = "<group>"; };
@@ -309,8 +305,6 @@
A251BE830959A1B90058BC7F /* PSMTabBarCell.h */,
A251BE840959A1B90058BC7F /* PSMTabBarCell.m */,
A2D32EDA09A634C900EC8662 /* PSMTabStyle.h */,
A2D32EE609A6399300EC8662 /* PSMAquaTabStyle.h */,
A2D32EE709A6399300EC8662 /* PSMAquaTabStyle.m */,
A2D32EFE09A63D7A00EC8662 /* PSMMetalTabStyle.h */,
A2D32EFF09A63D7A00EC8662 /* PSMMetalTabStyle.m */,
A2D98B070A2B432C0064C6F8 /* PSMUnifiedTabStyle.h */,
@@ -403,7 +397,6 @@
A251BE850959A1B90058BC7F /* PSMOverflowPopUpButton.h in Headers */,
A251BE870959A1B90058BC7F /* PSMTabBarCell.h in Headers */,
A2D32EDC09A634C900EC8662 /* PSMTabStyle.h in Headers */,
A2D32EE809A6399300EC8662 /* PSMAquaTabStyle.h in Headers */,
A2D32F0009A63D7A00EC8662 /* PSMMetalTabStyle.h in Headers */,
A268EA6209A9831800E082AA /* PSMRolloverButton.h in Headers */,
A2129BB209AEB58F00724E6C /* PSMProgressIndicator.h in Headers */,
@@ -505,7 +498,6 @@
546DEAF1067F63070098DCC4 /* PSMTabBarControl.m in Sources */,
A251BE860959A1B90058BC7F /* PSMOverflowPopUpButton.m in Sources */,
A251BE880959A1B90058BC7F /* PSMTabBarCell.m in Sources */,
A2D32EE909A6399300EC8662 /* PSMAquaTabStyle.m in Sources */,
A2D32F0109A63D7A00EC8662 /* PSMMetalTabStyle.m in Sources */,
A268EA6309A9831800E082AA /* PSMRolloverButton.m in Sources */,
A2129BB309AEB58F00724E6C /* PSMProgressIndicator.m in Sources */,
@@ -1,34 +0,0 @@
//
// PSMAquaTabStyle.h
// PSMTabBarControl
//
// Created by John Pannell on 2/17/06.
// Copyright 2006 Positive Spin Media. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import "PSMTabStyle.h"
@interface PSMAquaTabStyle : NSObject <PSMTabStyle> {
NSImage *aquaTabBg;
NSImage *aquaTabBgDown;
NSImage *aquaTabBgDownGraphite;
NSImage *aquaTabBgDownNonKey;
NSImage *aquaDividerDown;
NSImage *aquaDivider;
NSImage *aquaCloseButton;
NSImage *aquaCloseButtonDown;
NSImage *aquaCloseButtonOver;
NSImage *_addTabButtonImage;
NSImage *_addTabButtonPressedImage;
NSImage *_addTabButtonRolloverImage;
NSMutableParagraphStyle *truncatingTailParagraphStyle;
NSMutableParagraphStyle *centeredParagraphStyle;
}
- (void)loadImages;
- (void)drawInteriorWithTabCell:(PSMTabBarCell *)cell inView:(NSView*)controlView;
- (void)encodeWithCoder:(NSCoder *)aCoder;
- (id)initWithCoder:(NSCoder *)aDecoder;
@end
@@ -1,513 +0,0 @@
//
// PSMAquaTabStyle.m
// PSMTabBarControl
//
// Created by John Pannell on 2/17/06.
// Copyright 2006 Positive Spin Media. All rights reserved.
//
#import "PSMAquaTabStyle.h"
#import "PSMTabBarCell.h"
#import "PSMTabBarControl.h"
#define kPSMAquaObjectCounterRadius 7.0
#define kPSMAquaCounterMinWidth 20
@implementation PSMAquaTabStyle
- (NSString *)name
{
return @"Aqua";
}
#pragma mark -
#pragma mark Creation/Destruction
- (id) init
{
if((self = [super init]))
{
[self loadImages];
}
return self;
}
- (void) loadImages
{
// Aqua Tabs Images
aquaTabBg = [[NSImage alloc] initByReferencingFile:[[PSMTabBarControl bundle] pathForImageResource:@"AquaTabsBackground"]];
[aquaTabBg setFlipped:YES];
aquaTabBgDown = [[NSImage alloc] initByReferencingFile:[[PSMTabBarControl bundle] pathForImageResource:@"AquaTabsDown"]];
[aquaTabBgDown setFlipped:YES];
aquaTabBgDownGraphite = [[NSImage alloc] initByReferencingFile:[[PSMTabBarControl bundle] pathForImageResource:@"AquaTabsDownGraphite"]];
[aquaTabBgDown setFlipped:YES];
aquaTabBgDownNonKey = [[NSImage alloc] initByReferencingFile:[[PSMTabBarControl bundle] pathForImageResource:@"AquaTabsDownNonKey"]];
[aquaTabBgDown setFlipped:YES];
aquaDividerDown = [[NSImage alloc] initByReferencingFile:[[PSMTabBarControl bundle] pathForImageResource:@"AquaTabsSeparatorDown"]];
[aquaDivider setFlipped:NO];
aquaDivider = [[NSImage alloc] initByReferencingFile:[[PSMTabBarControl bundle] pathForImageResource:@"AquaTabsSeparator"]];
[aquaDivider setFlipped:NO];
aquaCloseButton = [[NSImage alloc] initByReferencingFile:[[PSMTabBarControl bundle] pathForImageResource:@"AquaTabClose_Front"]];
aquaCloseButtonDown = [[NSImage alloc] initByReferencingFile:[[PSMTabBarControl bundle] pathForImageResource:@"AquaTabClose_Front_Pressed"]];
aquaCloseButtonOver = [[NSImage alloc] initByReferencingFile:[[PSMTabBarControl bundle] pathForImageResource:@"AquaTabClose_Front_Rollover"]];
_addTabButtonImage = [[NSImage alloc] initByReferencingFile:[[PSMTabBarControl bundle] pathForImageResource:@"AquaTabNew"]];
_addTabButtonPressedImage = [[NSImage alloc] initByReferencingFile:[[PSMTabBarControl bundle] pathForImageResource:@"AquaTabNewPressed"]];
_addTabButtonRolloverImage = [[NSImage alloc] initByReferencingFile:[[PSMTabBarControl bundle] pathForImageResource:@"AquaTabNewRollover"]];
}
- (void)dealloc
{
[aquaTabBg release];
[aquaTabBgDown release];
[aquaDividerDown release];
[aquaDivider release];
[aquaCloseButton release];
[aquaCloseButtonDown release];
[aquaCloseButtonOver release];
[_addTabButtonImage release];
[_addTabButtonPressedImage release];
[_addTabButtonRolloverImage release];
[truncatingTailParagraphStyle release];
[centeredParagraphStyle release];
[super dealloc];
}
#pragma mark -
#pragma mark Control Specifics
- (float)leftMarginForTabBarControl
{
return 0.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;
}
#pragma mark -
#pragma mark Cell Specifics
- (NSRect)closeButtonRectForTabCell:(PSMTabBarCell *)cell
{
NSRect cellFrame = [cell frame];
if ([cell hasCloseButton] == NO) {
return NSZeroRect;
}
NSRect result;
result.size = [aquaCloseButton 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 += [aquaCloseButton size].width + kPSMTabBarCellPadding;
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;
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 * kPSMAquaObjectCounterRadius - 6.0);
if(countWidth < kPSMAquaCounterMinWidth)
countWidth = kPSMAquaCounterMinWidth;
NSRect result;
result.size = NSMakeSize(countWidth, 2 * kPSMAquaObjectCounterRadius); // 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 += [aquaCloseButton 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 += [aquaCloseButton 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]);
[attrStr addAttribute:NSFontAttributeName value:[NSFont systemFontOfSize:11.0] range:range];
// Paragraph Style for Truncating Long Text
if (!truncatingTailParagraphStyle) {
truncatingTailParagraphStyle = [[[NSParagraphStyle defaultParagraphStyle] mutableCopy] retain];
[truncatingTailParagraphStyle setLineBreakMode:NSLineBreakByTruncatingTail];
[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];
// Selected Tab
if ([cell state] == NSOnState) {
NSRect aRect = NSMakeRect(cellFrame.origin.x, cellFrame.origin.y, cellFrame.size.width, cellFrame.size.height-2.5);
aRect.size.height -= 0.5;
// proper tint
NSControlTint currentTint;
if ([cell controlTint] == NSDefaultControlTint)
currentTint = [NSColor currentControlTint];
else
currentTint = [cell controlTint];
if (![[[cell controlView] window] isKeyWindow])
currentTint = NSClearControlTint;
NSImage *bgImage;
switch(currentTint){
case NSGraphiteControlTint:
bgImage = aquaTabBgDownGraphite;
break;
case NSClearControlTint:
bgImage = aquaTabBgDownNonKey;
break;
case NSBlueControlTint:
default:
bgImage = aquaTabBgDown;
break;
}
[bgImage drawInRect:cellFrame fromRect:NSMakeRect(0.0, 0.0, 1.0, 22.0) operation:NSCompositeSourceOver fraction:1.0];
[aquaDivider drawAtPoint:NSMakePoint(cellFrame.origin.x + cellFrame.size.width - 1.0, cellFrame.origin.y + cellFrame.size.height) fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0];
aRect.size.height+=0.5;
} else { // Unselected Tab
NSRect aRect = NSMakeRect(cellFrame.origin.x, cellFrame.origin.y, cellFrame.size.width, cellFrame.size.height);
aRect.origin.y += 0.5;
aRect.origin.x += 1.5;
aRect.size.width -= 1;
aRect.origin.x -= 1;
aRect.size.width += 1;
// Rollover
if ([cell isHighlighted]) {
[[NSColor colorWithCalibratedWhite:0.0 alpha:0.1] set];
NSRectFillUsingOperation(aRect, NSCompositeSourceAtop);
}
[aquaDivider drawAtPoint:NSMakePoint(cellFrame.origin.x + cellFrame.size.width - 1.0, cellFrame.origin.y + cellFrame.size.height) fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0];
}
[self drawInteriorWithTabCell:cell inView:[cell controlView]];
}
- (void)drawTabBar:(PSMTabBarControl *)bar inRect:(NSRect)rect
{
[aquaTabBg drawInRect:rect fromRect:NSMakeRect(0.0, 0.0, 1.0, 22.0) operation:NSCompositeSourceOver fraction:1.0];
// 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];
}
}
}
- (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 *closeButton = nil;
closeButton = aquaCloseButton;
if([cell closeButtonOver]) closeButton = aquaCloseButtonOver;
if([cell closeButtonPressed]) closeButton = aquaCloseButtonDown;
closeButtonSize = [closeButton size];
[closeButton setFlipped:YES];
[closeButton drawAtPoint:closeButtonRect.origin fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0];
// scoot label over
labelPosition += closeButtonSize.width + kPSMTabBarCellPadding;
}
#if 0 // MacVim: disable this code. It is unused and calling 'content' on the represented object's identifier seems dangerous at best.
// icon
if([cell hasIcon]){
NSRect iconRect = [self iconRectForTabCell:cell];
NSImage *icon = [[[[cell representedObject] identifier] content] icon];
if ([controlView isFlipped]) {
iconRect.origin.y = cellFrame.size.height - iconRect.origin.y;
}
[icon compositeToPoint:iconRect.origin operation:NSCompositeSourceOver fraction:1.0];
// scoot label over
labelPosition += iconRect.size.width + kPSMTabBarCellPadding;
}
#endif
// object counter
if([cell count] > 0){
[[NSColor colorWithCalibratedWhite:0.3 alpha:0.45] set];
NSBezierPath *path = [NSBezierPath bezierPath];
NSRect myRect = [self objectCounterRectForTabCell:cell];
[path moveToPoint:NSMakePoint(myRect.origin.x + kPSMAquaObjectCounterRadius, myRect.origin.y)];
[path lineToPoint:NSMakePoint(myRect.origin.x + myRect.size.width - kPSMAquaObjectCounterRadius, myRect.origin.y)];
[path appendBezierPathWithArcWithCenter:NSMakePoint(myRect.origin.x + myRect.size.width - kPSMAquaObjectCounterRadius, myRect.origin.y + kPSMAquaObjectCounterRadius) radius:kPSMAquaObjectCounterRadius startAngle:270.0 endAngle:90.0];
[path lineToPoint:NSMakePoint(myRect.origin.x + kPSMAquaObjectCounterRadius, myRect.origin.y + myRect.size.height)];
[path appendBezierPathWithArcWithCenter:NSMakePoint(myRect.origin.x + kPSMAquaObjectCounterRadius, myRect.origin.y + kPSMAquaObjectCounterRadius) radius:kPSMAquaObjectCounterRadius 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);
// Draw Label
[[cell attributedStringValue] drawInRect:labelRect];
}
#pragma mark -
#pragma mark Archiving
- (void)encodeWithCoder:(NSCoder *)aCoder {
//[super encodeWithCoder:aCoder];
if ([aCoder allowsKeyedCoding]) {
[aCoder encodeObject:aquaTabBg forKey:@"aquaTabBg"];
[aCoder encodeObject:aquaTabBgDown forKey:@"aquaTabBgDown"];
[aCoder encodeObject:aquaTabBgDownGraphite forKey:@"aquaTabBgDownGraphite"];
[aCoder encodeObject:aquaTabBgDownNonKey forKey:@"aquaTabBgDownNonKey"];
[aCoder encodeObject:aquaDividerDown forKey:@"aquaDividerDown"];
[aCoder encodeObject:aquaDivider forKey:@"aquaDivider"];
[aCoder encodeObject:aquaCloseButton forKey:@"aquaCloseButton"];
[aCoder encodeObject:aquaCloseButtonDown forKey:@"aquaCloseButtonDown"];
[aCoder encodeObject:aquaCloseButtonOver forKey:@"aquaCloseButtonOver"];
[aCoder encodeObject:_addTabButtonImage forKey:@"addTabButtonImage"];
[aCoder encodeObject:_addTabButtonPressedImage forKey:@"addTabButtonPressedImage"];
[aCoder encodeObject:_addTabButtonRolloverImage forKey:@"addTabButtonRolloverImage"];
}
}
- (id)initWithCoder:(NSCoder *)aDecoder {
//self = [super initWithCoder:aDecoder];
//if (self) {
if ([aDecoder allowsKeyedCoding]) {
aquaTabBg = [[aDecoder decodeObjectForKey:@"aquaTabBg"] retain];
aquaTabBgDown = [[aDecoder decodeObjectForKey:@"aquaTabBgDown"] retain];
aquaTabBgDownGraphite = [[aDecoder decodeObjectForKey:@"aquaTabBgDownGraphite"] retain];
aquaTabBgDownNonKey = [[aDecoder decodeObjectForKey:@"aquaTabBgDownNonKey"] retain];
aquaDividerDown = [[aDecoder decodeObjectForKey:@"aquaDividerDown"] retain];
aquaDivider = [[aDecoder decodeObjectForKey:@"aquaDivider"] retain];
aquaCloseButton = [[aDecoder decodeObjectForKey:@"aquaCloseButton"] retain];
aquaCloseButtonDown = [[aDecoder decodeObjectForKey:@"aquaCloseButtonDown"] retain];
aquaCloseButtonOver = [[aDecoder decodeObjectForKey:@"aquaCloseButtonOver"] retain];
_addTabButtonImage = [[aDecoder decodeObjectForKey:@"addTabButtonImage"] retain];
_addTabButtonPressedImage = [[aDecoder decodeObjectForKey:@"addTabButtonPressedImage"] retain];
_addTabButtonRolloverImage = [[aDecoder decodeObjectForKey:@"addTabButtonRolloverImage"] retain];
}
//}
return self;
}
@end
@@ -393,8 +393,12 @@ 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;
@@ -43,8 +43,12 @@
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
}
- (void)mouseDown:(NSEvent *)event
@@ -12,7 +12,6 @@
#import "PSMRolloverButton.h"
#import "PSMTabStyle.h"
#import "PSMMetalTabStyle.h"
#import "PSMAquaTabStyle.h"
#import "PSMUnifiedTabStyle.h"
#import "PSMTabDragAssistant.h"
@@ -255,10 +254,7 @@
- (void)setStyleNamed:(NSString *)name
{
[style release];
if([name isEqualToString:@"Aqua"]){
style = [[PSMAquaTabStyle alloc] init];
}
else if ([name isEqualToString:@"Unified"]){
if ([name isEqualToString:@"Unified"]){
style = [[PSMUnifiedTabStyle alloc] init];
}
else {
@@ -389,8 +389,12 @@
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;
+5
View File
@@ -1783,6 +1783,11 @@ gui_macvim_set_antialias(int antialias)
[[MMBackend sharedInstance] setAntialias:antialias];
}
void
gui_macvim_set_ligatures(int ligatures)
{
[[MMBackend sharedInstance] setLigatures:ligatures];
}
void
gui_macvim_wait_for_startup()
+1
View File
@@ -6574,6 +6574,7 @@ ex_helptags(eap)
if (dirname == NULL || !mch_isdir(dirname))
{
EMSG2(_("E150: Not a directory: %s"), eap->arg);
vim_free(dirname);
return;
}
-4
View File
@@ -681,9 +681,6 @@
# define ESC_CHG_TO_ENG_MODE /* if defined, when ESC pressed,
* turn to english mode
*/
# if !defined(FEAT_XFONTSET) && defined(HAVE_X11) && !defined(FEAT_GUI_GTK)
# define FEAT_XFONTSET /* Hangul input requires xfontset */
# endif
# if defined(FEAT_XIM) && !defined(LINT)
Error: You should select only ONE of XIM and HANGUL INPUT
# endif
@@ -691,7 +688,6 @@
#if defined(FEAT_HANGULIN) || defined(FEAT_XIM)
/* # define X_LOCALE */ /* for OS with incomplete locale
support, like old linux versions. */
/* # define SLOW_XSERVER */ /* for extremely slow X server */
#endif
/*
+26 -5
View File
@@ -1238,8 +1238,19 @@ gui_update_cursor(force, clear_selection)
gui.highlight_mask = (cattr | attr);
#ifdef FEAT_HANGULIN
if (composing_hangul)
(void)gui_outstr_nowrap(composing_hangul_buffer, 2,
GUI_MON_IS_CURSOR | GUI_MON_NOCLEAR, cfg, cbg, 0);
{
char_u *comp_buf;
int comp_len;
comp_buf = hangul_composing_buffer_get(&comp_len);
if (comp_buf)
{
(void)gui_outstr_nowrap(comp_buf, comp_len,
GUI_MON_IS_CURSOR | GUI_MON_NOCLEAR,
cfg, cbg, 0);
vim_free(comp_buf);
}
}
else
#endif
(void)gui_screenchar(LineOffset[gui.row] + gui.col,
@@ -2615,9 +2626,19 @@ gui_undraw_cursor()
#ifdef FEAT_HANGULIN
if (composing_hangul
&& gui.col == gui.cursor_col && gui.row == gui.cursor_row)
(void)gui_outstr_nowrap(composing_hangul_buffer, 2,
GUI_MON_IS_CURSOR | GUI_MON_NOCLEAR,
gui.norm_pixel, gui.back_pixel, 0);
{
char_u *comp_buf;
int comp_len;
comp_buf = hangul_composing_buffer_get(&comp_len);
if (comp_buf)
{
(void)gui_outstr_nowrap(comp_buf, comp_len,
GUI_MON_IS_CURSOR | GUI_MON_NOCLEAR,
gui.norm_pixel, gui.back_pixel, 0);
vim_free(comp_buf);
}
}
else
{
#endif
+47 -1
View File
@@ -1515,7 +1515,7 @@ convert_ks_to_3(src, fp, mp, lp)
int i;
if ((i = han_index(h, low)) >= 0
&& i < sizeof(ks_table1)/sizeof(ks_table1[0]))
&& i < (int)(sizeof(ks_table1)/sizeof(ks_table1[0])))
{
*fp = ks_table1[i][0];
*mp = ks_table1[i][1];
@@ -1619,3 +1619,49 @@ convert_3_to_ks(fv, mv, lv, des)
*des++ = johab_lcon_to_wan[lv];
return 8;
}
char_u *
hangul_string_convert(buf, p_len)
char_u *buf;
int *p_len;
{
char_u *tmpbuf = NULL;
vimconv_T vc;
if (enc_utf8)
{
vc.vc_type = CONV_NONE;
if (convert_setup(&vc, (char_u *)"euc-kr", p_enc) == OK)
{
tmpbuf = string_convert(&vc, buf, p_len);
convert_setup(&vc, NULL, NULL);
}
}
return tmpbuf;
}
char_u *
hangul_composing_buffer_get(p_len)
int *p_len;
{
char_u *tmpbuf = NULL;
if (composing_hangul)
{
int len = 2;
tmpbuf = hangul_string_convert(composing_hangul_buffer, &len);
if (tmpbuf != NULL)
{
*p_len = len;
}
else
{
tmpbuf = vim_strnsave(composing_hangul_buffer, 2);
*p_len = 2;
}
}
return tmpbuf;
}
+6 -4
View File
@@ -476,16 +476,18 @@ AlwaysNone(PyObject *self UNUSED)
AlwaysFalse(PyObject *self UNUSED)
{
/* do nothing */
Py_INCREF(Py_False);
return Py_False;
PyObject *ret = Py_False;
Py_INCREF(ret);
return ret;
}
static PyObject *
AlwaysTrue(PyObject *self UNUSED)
{
/* do nothing */
Py_INCREF(Py_True);
return Py_True;
PyObject *ret = Py_True;
Py_INCREF(ret);
return ret;
}
/***************/
+3 -1
View File
@@ -1245,7 +1245,9 @@ utf_char2cells(c)
{
{0x1100, 0x115f},
{0x2300, 0x23ff},
{0x2700, 0x27bf},
{0x2700, 0x2757},
{0x275d, 0x2767},
{0x2776, 0x27bf},
{0x2b00, 0x2bff},
{0x2e00, 0x2e99},
{0x2e9b, 0x2ef3},
+13
View File
@@ -6256,6 +6256,19 @@ cin_isfuncdecl(sp, first_lnum, min_lnum)
{
if (cin_iscomment(s)) /* ignore comments */
s = cin_skipcomment(s);
else if (*s == ':')
{
if (*(s + 1) == ':')
s += 2;
else
/* To avoid a mistake in the following situation:
* A::A(int a, int b)
* : a(0) // <--not a function decl
* , b(0)
* {...
*/
return FALSE;
}
else
++s;
}
-3
View File
@@ -952,9 +952,6 @@ lalloc(size, message)
clear_sb_text(); /* free any scrollback text */
try_again = mf_release_all(); /* release as many blocks as possible */
#ifdef FEAT_EVAL
try_again |= garbage_collect(); /* cleanup recursive lists/dicts */
#endif
releasing = FALSE;
if (!try_again)
+29
View File
@@ -21,6 +21,9 @@
static void comp_botline __ARGS((win_T *wp));
static void redraw_for_cursorline __ARGS((win_T *wp));
#ifdef FEAT_GUI_MACVIM
static void redraw_for_ligatures __ARGS((win_T *wp));
#endif
static int scrolljump_value __ARGS((void));
static int check_top_offset __ARGS((void));
static void curs_rows __ARGS((win_T *wp));
@@ -145,6 +148,29 @@ redraw_for_cursorline(wp)
redraw_win_later(wp, SOME_VALID);
}
#ifdef FEAT_GUI_MACVIM
/*
* Redraw when 'macligatures' is set.
* This is basically the same as when 'cursorline'
* or 'relativenumber' is set but unconditional.
*/
static void
redraw_for_ligatures(wp)
win_T *wp;
{
/* Only if ligatures are on but neither
* 'cursorline' nor 'relativenumber'.
*/
if (p_macligatures
&& (wp->w_p_rnu == 0
#ifdef FEAT_SYN_HL
&& wp->w_p_cul == 0
#endif
))
redraw_win_later(wp, CLEAR);
}
#endif
/*
* Update curwin->w_topline and redraw if necessary.
* Used to update the screen before printing a message.
@@ -793,6 +819,9 @@ curs_rows(wp)
}
redraw_for_cursorline(curwin);
#ifdef FEAT_GUI_MACVIM
redraw_for_ligatures(curwin);
#endif
wp->w_valid |= VALID_CROW|VALID_CHEIGHT;
}
+19 -4
View File
@@ -1828,6 +1828,11 @@ static struct vimoption
{"macatsui", NULL, P_BOOL|P_VI_DEF|P_RCLR,
(char_u *)&p_macatsui, PV_NONE,
{(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
#endif
#ifdef FEAT_GUI_MACVIM
{"macligatures", NULL, P_BOOL|P_VI_DEF|P_RCLR,
(char_u *)&p_macligatures, PV_NONE,
{(char_u *)FALSE, (char_u *)0L}},
#endif
{"macmeta", "mmta", P_BOOL|P_VI_DEF,
#ifdef FEAT_GUI_MACVIM
@@ -2177,7 +2182,7 @@ static struct vimoption
#endif
{(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
#if defined(DYNAMIC_PYTHON3) && !defined(WIN3264)
{"python3dll", NULL, P_STRING|P_VI_DEF|P_SECURE,
{"pythonthreedll", NULL, P_STRING|P_VI_DEF|P_SECURE,
(char_u *)&p_py3dll, PV_NONE,
{(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
#endif
@@ -3035,8 +3040,10 @@ static struct vimoption
p_term("t_ce", T_CE)
p_term("t_cl", T_CL)
p_term("t_cm", T_CM)
p_term("t_Ce", T_UCE)
p_term("t_Co", T_CCO)
p_term("t_CS", T_CCS)
p_term("t_Cs", T_UCS)
p_term("t_cs", T_CS)
#ifdef FEAT_VERTSPLIT
p_term("t_CV", T_CSV)
@@ -4956,9 +4963,10 @@ do_set(arg, opt_flags)
{
i = (int)STRLEN(origval);
/* strip a trailing comma, would get 2 */
if (comma && (flags & P_ONECOMMA) && i > 1
&& origval[i - 1] == ','
&& origval[i - 2] != '\\')
if (comma && i > 1
&& (flags & P_ONECOMMA) == P_ONECOMMA
&& origval[i - 1] == ','
&& origval[i - 2] != '\\')
i--;
mch_memmove(newval + i + comma, newval,
STRLEN(newval) + 1);
@@ -8186,6 +8194,13 @@ set_bool_option(opt_idx, varp, value, opt_flags)
}
#endif
#if defined(FEAT_GUI_MACVIM)
else if ((int *)varp == &p_macligatures)
{
gui_macvim_set_ligatures(p_macligatures);
}
#endif
/* when 'textauto' is set or reset also change 'fileformats' */
else if ((int *)varp == &p_ta)
set_string_option_direct((char_u *)"ffs", -1,
+4 -1
View File
@@ -644,6 +644,9 @@ EXTERN char_u *p_luadll; /* 'luadll' */
#ifdef FEAT_GUI_MAC
EXTERN int p_macatsui; /* 'macatsui' */
#endif
#ifdef FEAT_GUI_MACVIM
EXTERN int p_macligatures; /* 'macligatures' */
#endif
EXTERN int p_magic; /* 'magic' */
#ifdef FEAT_QUICKFIX
EXTERN char_u *p_mef; /* 'makeef' */
@@ -701,7 +704,7 @@ EXTERN char_u *p_cdpath; /* 'cdpath' */
EXTERN char_u *p_perldll; /* 'perldll' */
#endif
#if defined(DYNAMIC_PYTHON3) && !defined(WIN3264)
EXTERN char_u *p_py3dll; /* 'python3dll' */
EXTERN char_u *p_py3dll; /* 'pythonthreedll' */
#endif
#if defined(DYNAMIC_PYTHON) && !defined(WIN3264)
EXTERN char_u *p_pydll; /* 'pythondll' */
+1
View File
@@ -207,6 +207,7 @@ void gui_mch_fuopt_update(void);
void gui_macvim_update_modified_flag();
void gui_macvim_add_to_find_pboard(char_u *pat);
void gui_macvim_set_antialias(int antialias);
void gui_macvim_set_ligatures(int ligatures);
#ifdef BLUR_TRANSPARENCY
void gui_macvim_set_blur(int blur);
+2
View File
@@ -6,4 +6,6 @@ void hangul_input_state_toggle __ARGS((void));
void hangul_keyboard_set __ARGS((void));
int hangul_input_process __ARGS((char_u *s, int len));
void hangul_input_clear __ARGS((void));
char_u *hangul_string_convert __ARGS((char_u *buf, int *p_len));
char_u *hangul_composing_buffer_get __ARGS((int *p_len));
/* vim: set ft=c : */
+1
View File
@@ -19,6 +19,7 @@ int mch_dirname __ARGS((char_u *buf, int len));
long mch_getperm __ARGS((char_u *name));
int mch_setperm __ARGS((char_u *name, long perm));
void mch_hide __ARGS((char_u *name));
int mch_ishidden __ARGS((char_u *name));
int mch_isdir __ARGS((char_u *name));
int mch_mkdir __ARGS((char_u *name));
int mch_is_hard_link __ARGS((char_u *fname));
+7 -1
View File
@@ -10076,7 +10076,13 @@ showmode()
if (gui.in_use)
{
if (hangul_input_state_get())
MSG_PUTS_ATTR(" \307\321\261\333", attr); /* HANGUL */
{
/* HANGUL */
if (enc_utf8)
MSG_PUTS_ATTR(" \355\225\234\352\270\200", attr);
else
MSG_PUTS_ATTR(" \307\321\261\333", attr);
}
}
#endif
#ifdef FEAT_INS_EXPAND
+1 -1
View File
@@ -2276,7 +2276,7 @@ add_termcap_entry(name, force)
*/
for (i = 0; i < 2; ++i)
{
if (!builtin_first == i)
if ((!builtin_first) == i)
#endif
/*
* Search in builtin termcap
+7
View File
@@ -663,6 +663,13 @@ Constructor::Constructor(int a,
{
}
A::A(int a, int b)
: aa(a),
bb(b),
cc(c)
{
}
class CAbc :
public BaseClass1,
protected BaseClass2
+7
View File
@@ -651,6 +651,13 @@ Constructor::Constructor(int a,
{
}
A::A(int a, int b)
: aa(a),
bb(b),
cc(c)
{
}
class CAbc :
public BaseClass1,
protected BaseClass2
+6
View File
@@ -10,6 +10,12 @@ STARTTEST
:endtry
:buf 1
:$put =caught
:"
:" Test that changing 'path' keeps two commas.
:set path=foo,,bar
:set path-=bar
:set path+=bar
:$put =&path
:/^result/,$w! test.out
:qa!
ENDTEST
+1
View File
@@ -1,2 +1,3 @@
result
ok
foo,,bar
+9
View File
@@ -1743,8 +1743,17 @@ push_raw_key(s, len)
char_u *s;
int len;
{
char_u *tmpbuf;
tmpbuf = hangul_string_convert(s, &len);
if (tmpbuf != NULL)
s = tmpbuf;
while (len--)
inbuf[inbufcount++] = *s++;
if (tmpbuf != NULL)
vim_free(tmpbuf);
}
#endif
+26
View File
@@ -756,6 +756,32 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
922,
/**/
921,
/**/
920,
/**/
919,
/**/
918,
/**/
917,
/**/
916,
/**/
915,
/**/
914,
/**/
913,
/**/
912,
/**/
911,
/**/
910,
/**/
909,
/**/