mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-02 11:19:22 +02:00
Compare commits
45 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 98496b9aa2 | |||
| 547ad47ddc | |||
| ba14141413 | |||
| a33ddbbd04 | |||
| 8da1e6cedf | |||
| bf3d58073f | |||
| 3fcfa35f82 | |||
| 99a6e8dd82 | |||
| ace95989ed | |||
| 0c078fc7db | |||
| c6cd8409c2 | |||
| b6fa30ccc3 | |||
| e0720cbf63 | |||
| b1e04fca37 | |||
| 1366a517ab | |||
| d5d37537d1 | |||
| 1a53ab66f8 | |||
| 980128c369 | |||
| c96272e30e | |||
| 46753d91c5 | |||
| d6d17c8f9f | |||
| 1572e30607 | |||
| a683ec44c3 | |||
| fce3a430c3 | |||
| 8a0141d4e7 | |||
| dd00851e07 | |||
| d722fd74d8 | |||
| a2845b8f5a | |||
| 6c0c1e8052 | |||
| ba6ad17378 | |||
| e5e0fbcd42 | |||
| 64fbbbb849 | |||
| 9d20ce6970 | |||
| d057c8b909 | |||
| 6959bce946 | |||
| 08b0bdeb91 | |||
| 95620d6b49 | |||
| 36d5d3059b | |||
| a7b867189e | |||
| 6b7c0ef216 | |||
| 3d96d091a0 | |||
| 2cbb1c7769 | |||
| 1caef11d9e | |||
| 096e1e7157 | |||
| a37ffaa5e0 |
+6
-5
@@ -36,18 +36,19 @@ script:
|
||||
- grep -q -- "-DDYNAMIC_PYTHON_DLL=\\\\\"$vi_cv_dll_name_python\\\\\"" src/auto/config.mk
|
||||
- grep -q -- "-DDYNAMIC_PYTHON3_DLL=\\\\\"$vi_cv_dll_name_python3\\\\\"" src/auto/config.mk
|
||||
- make -j$NPROC
|
||||
- BINPATH=src/MacVim/build/Release/MacVim.app/Contents/MacOS
|
||||
- sed -e 's/^# VIM_APP_DIR=.*/VIM_APP_DIR=`dirname "$0"`\/..\/..\/../' src/MacVim/mvim > $BINPATH/mvim
|
||||
- BINPATH=src/MacVim/build/Release/MacVim.app/Contents/bin
|
||||
- mkdir -p $BINPATH
|
||||
- sed -e 's/^# VIM_APP_DIR=.*/if [ -L $0 ]; then VIM_APP_DIR=`dirname "$(readlink $0)"`\/..\/..\/..; else VIM_APP_DIR=`dirname "$0"`\/..\/..\/..; fi/' src/MacVim/mvim > $BINPATH/mvim
|
||||
- chmod 755 $BINPATH/mvim
|
||||
- (cd $BINPATH; for f in vimdiff view gvim gvimdiff gview mvimdiff mview; do ln -s mvim $f; done)
|
||||
- (cd $BINPATH; for f in vim vimdiff view gvim gvimdiff gview mvimdiff mview; do ln -s mvim $f; done)
|
||||
- rm -f result; $VIMCMD -g -f -c "redir>result" -c "lua print(\"Test\")" -c "redir END" -c q; cat result; echo; grep -q -w Test result
|
||||
- rm -f result; $VIMCMD -g -f -c "redir>result" -c "perl VIM::Msg(\"Test\")" -c "redir END" -c q; cat result; echo; grep -q -w Test result
|
||||
- rm -f result; $VIMCMD -g -f -c "redir>result" -c "py import sys; print(\"Test\")" -c "redir END" -c q; cat result; echo; grep -q -w Test result
|
||||
- rm -f result; $VIMCMD -g -f -c "redir>result" -c "py3 import sys; print(\"Test\")" -c "redir END" -c q; cat result; echo; grep -q -w Test result
|
||||
- rm -f result; $VIMCMD -g -f -c "redir>result" -c "ruby puts(\"Test\")" -c "redir END" -c q; cat result; echo; grep -q -w Test result
|
||||
- make test
|
||||
#- make -C src/testdir clean
|
||||
#- make -C src testgui
|
||||
- make -C src/testdir clean
|
||||
- make -C src testgui
|
||||
|
||||
before_deploy:
|
||||
- make -C src macvim-dmg
|
||||
|
||||
@@ -215,6 +215,7 @@ SRC_UNIX = \
|
||||
src/config.mk.in \
|
||||
src/configure \
|
||||
src/configure.ac \
|
||||
src/create_cmdidxs.pl \
|
||||
src/gui_at_fs.c \
|
||||
src/gui_at_sb.c \
|
||||
src/gui_at_sb.h \
|
||||
|
||||
@@ -33,6 +33,7 @@ DOCS = \
|
||||
ft_rust.txt \
|
||||
ft_sql.txt \
|
||||
gui.txt \
|
||||
gui_mac.txt \
|
||||
gui_w32.txt \
|
||||
gui_x11.txt \
|
||||
hangulin.txt \
|
||||
|
||||
+13
-9
@@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 8.0. Last change: 2017 Mar 21
|
||||
*eval.txt* For Vim version 8.0. Last change: 2017 Mar 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -6936,16 +6936,19 @@ setqflist({list} [, {action}[, {what}]]) *setqflist()*
|
||||
Note that the list is not exactly the same as what
|
||||
|getqflist()| returns.
|
||||
|
||||
*E927*
|
||||
If {action} is set to 'a', then the items from {list} are
|
||||
added to the existing quickfix list. If there is no existing
|
||||
list, then a new list is created.
|
||||
{action} values: *E927*
|
||||
'a' The items from {list} are added to the existing
|
||||
quickfix list. If there is no existing list, then a
|
||||
new list is created.
|
||||
|
||||
If {action} is set to 'r', then the items from the current
|
||||
quickfix list are replaced with the items from {list}. This
|
||||
can also be used to clear the list: >
|
||||
:call setqflist([], 'r')
|
||||
'r' The items from the current quickfix list are replaced
|
||||
with the items from {list}. This can also be used to
|
||||
clear the list: >
|
||||
:call setqflist([], 'r')
|
||||
<
|
||||
'f' All the quickfix lists in the quickfix stack are
|
||||
freed.
|
||||
|
||||
If {action} is not present or is set to ' ', then a new list
|
||||
is created.
|
||||
|
||||
@@ -7874,6 +7877,7 @@ test_override({name}, {val}) *test_override()*
|
||||
|
||||
name effect when {val} is non-zero ~
|
||||
redraw disable the redrawing() function
|
||||
silent_mode enable silent mode (like using |-s| after |-e|)
|
||||
char_avail disable the char_avail() function
|
||||
ALL clear all overrides ({val} is not used)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*filetype.txt* For Vim version 8.0. Last change: 2017 Mar 21
|
||||
*filetype.txt* For Vim version 8.0. Last change: 2017 Mar 28
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -353,12 +353,12 @@ define yourself. There are a few ways to avoid this:
|
||||
You need to define your own mapping before the plugin is loaded (before
|
||||
editing a file of that type). The plugin will then skip installing the
|
||||
default mapping.
|
||||
|
||||
*no_mail_maps*
|
||||
3. Disable defining mappings for a specific filetype by setting a variable,
|
||||
which contains the name of the filetype. For the "mail" filetype this
|
||||
would be: >
|
||||
:let no_mail_maps = 1
|
||||
|
||||
< *no_plugin_maps*
|
||||
4. Disable defining mappings for all filetypes by setting a variable: >
|
||||
:let no_plugin_maps = 1
|
||||
<
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
*ft_rust.txt* Filetype plugin for Rust
|
||||
|
||||
==============================================================================
|
||||
CONTENTS *rust* *ft-rust*
|
||||
CONTENTS *rust*
|
||||
|
||||
1. Introduction |rust-intro|
|
||||
2. Settings |rust-settings|
|
||||
|
||||
@@ -704,7 +704,7 @@ prominent bugs/missing features.
|
||||
- The toolbar looks ugly and is not very useful.
|
||||
|
||||
If you find new bugs then please post your findings to the vim_mac mailing
|
||||
list: *vim_mac* >
|
||||
list: *vim_mac_group* >
|
||||
http://groups.google.com/group/vim_mac
|
||||
|
||||
This is also the best place for making feature requests as well as for asking
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*message.txt* For Vim version 8.0. Last change: 2017 Jan 02
|
||||
*message.txt* For Vim version 8.0. Last change: 2017 Mar 25
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -768,6 +768,13 @@ Example: >
|
||||
You tried to execute a command that is neither an Ex command nor
|
||||
a user-defined command.
|
||||
|
||||
*E943* >
|
||||
Command table needs to be updated, run 'make cmdidxs'
|
||||
|
||||
This can only happen when changing the source code, when adding a command in
|
||||
src/ex_cmds.h. The lookup table then needs to be updated, by running: >
|
||||
make cmdidxs
|
||||
|
||||
==============================================================================
|
||||
3. Messages *messages*
|
||||
|
||||
|
||||
+12
-3
@@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 8.0. Last change: 2017 Mar 09
|
||||
*options.txt* For Vim version 8.0. Last change: 2017 Mar 22
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1700,6 +1700,16 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
:set columns=9999
|
||||
< Minimum value is 12, maximum value is 10000.
|
||||
|
||||
*'columnspace'* *'csp'*
|
||||
'columnspace' 'csp' number (default 0)
|
||||
global
|
||||
{not in Vi}
|
||||
{only in the MacVim GUI}
|
||||
Number of pixel columns inserted between characters. With some fonts
|
||||
there can be too much room between characters. Then it makes sense
|
||||
to set 'columnspace' to a negative value. This may cause display
|
||||
problems though!
|
||||
|
||||
*'comments'* *'com'* *E524* *E525*
|
||||
'comments' 'com' string (default
|
||||
"s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-")
|
||||
@@ -6672,8 +6682,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Flag passed to the shell to execute "!" and ":!" commands; e.g.,
|
||||
"bash.exe -c ls" or "command.com /c dir". For the MS-DOS-like
|
||||
systems, the default is set according to the value of 'shell', to
|
||||
reduce the need to set this option by the user. It's not used for
|
||||
OS/2 (EMX figures this out itself).
|
||||
reduce the need to set this option by the user.
|
||||
On Unix it can have more than one flag. Each white space separated
|
||||
part is passed as an argument to the shell command.
|
||||
See |option-backslash| about including spaces and backslashes.
|
||||
|
||||
+21
-9
@@ -16,11 +16,12 @@ Carbon version of Vim here:
|
||||
http://macvim.org/
|
||||
|
||||
1. Filename Convention |mac-filename|
|
||||
2. .vimrc an .vim files |mac-vimfile|
|
||||
3. FAQ |mac-faq|
|
||||
4. Known Lack |mac-lack|
|
||||
5. Mac Bug Report |mac-bug|
|
||||
6. Compiling Vim |mac-compile|
|
||||
2. .vimrc and .vim files |mac-vimfile|
|
||||
3. Standard mappings |mac-standard-mappings|
|
||||
4. FAQ |mac-faq|
|
||||
5. Known Lack |mac-lack|
|
||||
6. Mac Bug Report |mac-bug|
|
||||
7. Compiling Vim |mac-compile|
|
||||
|
||||
There was a Mac port for version 3.0 of Vim. Here are the first few lines
|
||||
from the old file:
|
||||
@@ -76,7 +77,18 @@ the |'nocompatible'| option is set, otherwise it will only handle mac format
|
||||
files.
|
||||
|
||||
==============================================================================
|
||||
3. Mac FAQ *mac-faq*
|
||||
3. Standard mappings *mac-standard-mappings*
|
||||
|
||||
The following mappings are available for cut/copy/paste from/to clipboard.
|
||||
|
||||
key Normal Visual Insert Description ~
|
||||
Command-v "*P "-d"*P <C-R>* paste text *<D-v>*
|
||||
Command-c "*y copy Visual text *<D-c>*
|
||||
Command-x "*d cut Visual text *<D-x>*
|
||||
Backspace "*d cut Visual text
|
||||
|
||||
==============================================================================
|
||||
4. Mac FAQ *mac-faq*
|
||||
|
||||
On the internet: http://macvim.org/OSX/index.php#FAQ
|
||||
|
||||
@@ -99,13 +111,13 @@ A: The following trick works with most shells. Put it in your vimrc file.
|
||||
let $PATH = matchstr(s:path, 'VIMPATH\zs.\{-}\ze\n')
|
||||
|
||||
==============================================================================
|
||||
4. Mac Lack *mac-lack*
|
||||
5. Mac Lack *mac-lack*
|
||||
|
||||
In a terminal CTRL-^ needs to be entered as Shift-Control-6. CTRL-@ as
|
||||
Shift-Control-2.
|
||||
|
||||
==============================================================================
|
||||
5. Mac Bug Report *mac-bug*
|
||||
6. Mac Bug Report *mac-bug*
|
||||
|
||||
When reporting any Mac specific bug or feature change, please use the vim-mac
|
||||
maillist |vim-mac|. However, you need to be subscribed. An alternative is to
|
||||
@@ -114,7 +126,7 @@ send a message to the current MacVim maintainers:
|
||||
mac@vim.org
|
||||
|
||||
==============================================================================
|
||||
6. Compiling Vim *mac-compile*
|
||||
7. Compiling Vim *mac-compile*
|
||||
|
||||
See the file "src/INSTALLmac.txt" that comes with the source files.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*os_win32.txt* For Vim version 8.0. Last change: 2016 Oct 12
|
||||
*os_win32.txt* For Vim version 8.0. Last change: 2017 Mar 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by George Reilly
|
||||
|
||||
+26
-17
@@ -1085,25 +1085,27 @@ x A single character, with no special meaning, matches itself
|
||||
- A character class expression is evaluated to the set of characters
|
||||
belonging to that character class. The following character classes
|
||||
are supported:
|
||||
Name Contents ~
|
||||
*[:alnum:]* [:alnum:] ASCII letters and digits
|
||||
*[:alpha:]* [:alpha:] ASCII letters
|
||||
*[:blank:]* [:blank:] space and tab characters
|
||||
*[:cntrl:]* [:cntrl:] control characters
|
||||
*[:digit:]* [:digit:] decimal digits
|
||||
*[:graph:]* [:graph:] printable characters excluding space
|
||||
*[:lower:]* [:lower:] lowercase letters (all letters when
|
||||
Name Func Contents ~
|
||||
*[:alnum:]* [:alnum:] isalnum ASCII letters and digits
|
||||
*[:alpha:]* [:alpha:] isalpha ASCII letters
|
||||
*[:blank:]* [:blank:] space and tab
|
||||
*[:cntrl:]* [:cntrl:] iscntrl ASCII control characters
|
||||
*[:digit:]* [:digit:] decimal digits '0' to '9'
|
||||
*[:graph:]* [:graph:] isgraph ASCII printable characters excluding
|
||||
space
|
||||
*[:lower:]* [:lower:] (1) lowercase letters (all letters when
|
||||
'ignorecase' is used)
|
||||
*[:print:]* [:print:] printable characters including space
|
||||
*[:punct:]* [:punct:] ASCII punctuation characters
|
||||
*[:space:]* [:space:] whitespace characters
|
||||
*[:upper:]* [:upper:] uppercase letters (all letters when
|
||||
*[:print:]* [:print:] (2) printable characters including space
|
||||
*[:punct:]* [:punct:] ispunct ASCII punctuation characters
|
||||
*[:space:]* [:space:] whitespace characters: space, tab, CR,
|
||||
NL, vertical tab, form feed
|
||||
*[:upper:]* [:upper:] (3) uppercase letters (all letters when
|
||||
'ignorecase' is used)
|
||||
*[:xdigit:]* [:xdigit:] hexadecimal digits
|
||||
*[:return:]* [:return:] the <CR> character
|
||||
*[:tab:]* [:tab:] the <Tab> character
|
||||
*[:escape:]* [:escape:] the <Esc> character
|
||||
*[:backspace:]* [:backspace:] the <BS> character
|
||||
*[:xdigit:]* [:xdigit:] hexadecimal digits: 0-9, a-f, A-F
|
||||
*[:return:]* [:return:] the <CR> character
|
||||
*[:tab:]* [:tab:] the <Tab> character
|
||||
*[:escape:]* [:escape:] the <Esc> character
|
||||
*[:backspace:]* [:backspace:] the <BS> character
|
||||
The brackets in character class expressions are additional to the
|
||||
brackets delimiting a collection. For example, the following is a
|
||||
plausible pattern for a UNIX filename: "[-./[:alnum:]_~]\+" That is,
|
||||
@@ -1114,6 +1116,13 @@ x A single character, with no special meaning, matches itself
|
||||
regexp engine. See |two-engines|. In the future these items may
|
||||
work for multi-byte characters. For now, to get all "alpha"
|
||||
characters you can use: [[:lower:][:upper:]].
|
||||
|
||||
The "Func" column shows what library function is used. The
|
||||
implementation depends on the system. Otherwise:
|
||||
(1) Uses islower() for ASCII and Vim builtin rules for other
|
||||
characters when built with the |+multi_byte| feature.
|
||||
(2) Uses Vim builtin rules
|
||||
(3) As with (1) but using isupper()
|
||||
*/[[=* *[==]*
|
||||
- An equivalence class. This means that characters are matched that
|
||||
have almost the same meaning, e.g., when ignoring accents. This
|
||||
|
||||
@@ -645,6 +645,7 @@ Short explanation of each option: *option-list*
|
||||
'cmdwinheight' 'cwh' height of the command-line window
|
||||
'colorcolumn' 'cc' columns to highlight
|
||||
'columns' 'co' number of columns in the display
|
||||
'columnspace' 'csp' number of pixel columns to use between characters
|
||||
'comments' 'com' patterns that can start a comment line
|
||||
'commentstring' 'cms' template for comments; used for fold marker
|
||||
'compatible' 'cp' behave Vi-compatible as much as possible
|
||||
|
||||
+14
-3
@@ -141,6 +141,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
'cole' options.txt /*'cole'*
|
||||
'colorcolumn' options.txt /*'colorcolumn'*
|
||||
'columns' options.txt /*'columns'*
|
||||
'columnspace' options.txt /*'columnspace'*
|
||||
'com' options.txt /*'com'*
|
||||
'comments' options.txt /*'comments'*
|
||||
'commentstring' options.txt /*'commentstring'*
|
||||
@@ -168,6 +169,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
'cscopetag' options.txt /*'cscopetag'*
|
||||
'cscopetagorder' options.txt /*'cscopetagorder'*
|
||||
'cscopeverbose' options.txt /*'cscopeverbose'*
|
||||
'csp' options.txt /*'csp'*
|
||||
'cspc' options.txt /*'cspc'*
|
||||
'csprg' options.txt /*'csprg'*
|
||||
'csqf' options.txt /*'csqf'*
|
||||
@@ -791,7 +793,9 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
'pvh' options.txt /*'pvh'*
|
||||
'pvw' options.txt /*'pvw'*
|
||||
'pythondll' options.txt /*'pythondll'*
|
||||
'pythonhome' options.txt /*'pythonhome'*
|
||||
'pythonthreedll' options.txt /*'pythonthreedll'*
|
||||
'pythonthreehome' options.txt /*'pythonthreehome'*
|
||||
'pyx' options.txt /*'pyx'*
|
||||
'pyxversion' options.txt /*'pyxversion'*
|
||||
'qe' options.txt /*'qe'*
|
||||
@@ -3308,6 +3312,9 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
<D-Right> gui_mac.txt /*<D-Right>*
|
||||
<D-Up> gui_mac.txt /*<D-Up>*
|
||||
<D-`> gui_mac.txt /*<D-`>*
|
||||
<D-c> os_mac.txt /*<D-c>*
|
||||
<D-v> os_mac.txt /*<D-v>*
|
||||
<D-x> os_mac.txt /*<D-x>*
|
||||
<Del> change.txt /*<Del>*
|
||||
<Down> motion.txt /*<Down>*
|
||||
<Drop> change.txt /*<Drop>*
|
||||
@@ -4565,6 +4572,7 @@ E94 windows.txt /*E94*
|
||||
E940 eval.txt /*E940*
|
||||
E941 eval.txt /*E941*
|
||||
E942 eval.txt /*E942*
|
||||
E943 message.txt /*E943*
|
||||
E95 message.txt /*E95*
|
||||
E96 diff.txt /*E96*
|
||||
E97 diff.txt /*E97*
|
||||
@@ -6197,7 +6205,6 @@ ft-rst-syntax syntax.txt /*ft-rst-syntax*
|
||||
ft-ruby-omni insert.txt /*ft-ruby-omni*
|
||||
ft-ruby-syntax syntax.txt /*ft-ruby-syntax*
|
||||
ft-rust filetype.txt /*ft-rust*
|
||||
ft-rust ft_rust.txt /*ft-rust*
|
||||
ft-scheme-syntax syntax.txt /*ft-scheme-syntax*
|
||||
ft-sdl-syntax syntax.txt /*ft-sdl-syntax*
|
||||
ft-sed-syntax syntax.txt /*ft-sed-syntax*
|
||||
@@ -6684,7 +6691,7 @@ gui.txt gui.txt /*gui.txt*
|
||||
gui_mac.txt gui_mac.txt /*gui_mac.txt*
|
||||
gui_w32.txt gui_w32.txt /*gui_w32.txt*
|
||||
gui_x11.txt gui_x11.txt /*gui_x11.txt*
|
||||
guifontwide_gtk options.txt /*guifontwide_gtk*
|
||||
guifontwide_gtk2 options.txt /*guifontwide_gtk2*
|
||||
guifontwide_macvim options.txt /*guifontwide_macvim*
|
||||
guifontwide_win_mbyte options.txt /*guifontwide_win_mbyte*
|
||||
guioptions_a options.txt /*guioptions_a*
|
||||
@@ -7240,6 +7247,7 @@ mac-compile os_mac.txt /*mac-compile*
|
||||
mac-faq os_mac.txt /*mac-faq*
|
||||
mac-filename os_mac.txt /*mac-filename*
|
||||
mac-lack os_mac.txt /*mac-lack*
|
||||
mac-standard-mappings os_mac.txt /*mac-standard-mappings*
|
||||
mac-vimfile os_mac.txt /*mac-vimfile*
|
||||
macintosh os_mac.txt /*macintosh*
|
||||
macro map.txt /*macro*
|
||||
@@ -7784,6 +7792,8 @@ nice todo.txt /*nice*
|
||||
no-eval-feature eval.txt /*no-eval-feature*
|
||||
no-type-checking eval.txt /*no-type-checking*
|
||||
no_buffers_menu gui.txt /*no_buffers_menu*
|
||||
no_mail_maps filetype.txt /*no_mail_maps*
|
||||
no_plugin_maps filetype.txt /*no_plugin_maps*
|
||||
non-greedy pattern.txt /*non-greedy*
|
||||
non-zero-arg eval.txt /*non-zero-arg*
|
||||
none-variable eval.txt /*none-variable*
|
||||
@@ -9299,7 +9309,8 @@ vim: options.txt /*vim:*
|
||||
vim_announce intro.txt /*vim_announce*
|
||||
vim_dev intro.txt /*vim_dev*
|
||||
vim_did_enter-variable eval.txt /*vim_did_enter-variable*
|
||||
vim_mac gui_mac.txt /*vim_mac*
|
||||
vim_mac intro.txt /*vim_mac*
|
||||
vim_mac_group gui_mac.txt /*vim_mac_group*
|
||||
vim_starting eval.txt /*vim_starting*
|
||||
vim_use intro.txt /*vim_use*
|
||||
vimball pi_vimball.txt /*vimball*
|
||||
|
||||
+12
-12
@@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 8.0. Last change: 2017 Mar 21
|
||||
*todo.txt* For Vim version 8.0. Last change: 2017 Mar 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -110,8 +110,8 @@ manager. Problem with Motif?
|
||||
|
||||
Memory leak in test97? The string is actually freed. Weird.
|
||||
|
||||
Patch to make "start" work better: Use ShellExecute in !start (Katsuya Hino,
|
||||
#1570)
|
||||
Patch for deleting the quickfix lists and a test for it. (Yegappan, 2017 Mar
|
||||
21)
|
||||
|
||||
Add a toolbar in the terminal. Can be global, above all windows, or specific
|
||||
for one window.
|
||||
@@ -122,6 +122,8 @@ Use tb_set(winid, [{'text': 'stop', 'cb': callback, 'hi': 'Green'}])
|
||||
json_encode(): should convert to utf-8. (Nikolai Pavlov, 2016 Jan 23)
|
||||
What if there is an invalid character?
|
||||
|
||||
Patch for broken foldtext. (Christian 2017 Mar 22, #1567, 2nd one)
|
||||
|
||||
Json string with trailing \u should be an error. (Lcd)
|
||||
|
||||
On MS-Windows with 'clipboard' set to "unnamed" this doesn't work to double
|
||||
@@ -148,6 +150,9 @@ Another example in #1309
|
||||
Patch to change all use of &sw to shiftwidth(). (Tyru, 2017 Feb 19)
|
||||
Wait until maintainers integrate it.
|
||||
|
||||
Patch to change mb_char2len() to utf_char2len(c) when known to use UTF.
|
||||
(Dominique, 2017 Mar 21, #1582)
|
||||
|
||||
Completion for user-defined commands does not work if a few characters were
|
||||
already typed. (Dominique, 2017 Jan 26)
|
||||
|
||||
@@ -157,6 +162,9 @@ when writing viminfo (and the delete was the most recent action). #1339
|
||||
Suggestion to improve pt-br spell checking. (Marcelo D Montu, 2016 Dec 15,
|
||||
#1330)
|
||||
|
||||
Patch to Modernize GtkForm Implmentation. (Kazuki Kuriyama, 2017 Mar 26)
|
||||
Any objections?
|
||||
|
||||
Error in test_startup_utf8 on Solaris. (Danek Duvall, 2016 Aug 17)
|
||||
|
||||
Completion for :!cmd shows each match twice. #1435
|
||||
@@ -341,14 +349,6 @@ Jul 25, #948)
|
||||
Patch to fix wrong encoding of error message on Cygwin/MSYS terminal.
|
||||
(Ken Takata, 2016 Oct 4)
|
||||
|
||||
Patch to introduce 'cmdencoding'. (Ken Takata, Aug 18?)
|
||||
Better help Aug 19.
|
||||
Problem: applies to too many commands, such as :cbuffer.
|
||||
Updated patch with three options, 2016 Sep 8.
|
||||
Win32: When running ":make" and 'encoding' differs from the system locale,
|
||||
the output should be converted. Esp. when 'encoding' is "utf-8". (Yongwei
|
||||
Wu) Should we use 'termencoding' for this?
|
||||
|
||||
Patch to add 'systemencoding', convert between 'encoding' and this for file
|
||||
names, shell commands and the like. (Kikuchan, 2010 Oct 14)
|
||||
Assume the system converts between the actual encoding of the filesystem to
|
||||
@@ -421,7 +421,7 @@ When doing "vi buf.md" a BufNew autocommand for *.md is not triggered.
|
||||
Because of using the initial buffer? (Dun Peal, 2016 May 12)
|
||||
|
||||
Patch to add the :bvimgrep command. (Christian Brabandt, 2014 Nov 12)
|
||||
Updated 2016 Jun 10, #858
|
||||
Updated 2016 Jun 10, #858 Update 2017 Mar 28: use <buffer>
|
||||
|
||||
Add redrawtabline command. (Naruhiko Nishino, 2016 Jun 11)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_41.txt* For Vim version 8.0. Last change: 2017 Mar 18
|
||||
*usr_41.txt* For Vim version 8.0. Last change: 2017 Mar 28
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -2277,8 +2277,8 @@ plugin for the mail filetype: >
|
||||
endif
|
||||
|
||||
Two global variables are used:
|
||||
no_plugin_maps disables mappings for all filetype plugins
|
||||
no_mail_maps disables mappings for a specific filetype
|
||||
|no_plugin_maps| disables mappings for all filetype plugins
|
||||
|no_mail_maps| disables mappings for the "mail" filetype
|
||||
|
||||
|
||||
USER COMMANDS
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2017 Mar 13
|
||||
" Last Change: 2017 Mar 27
|
||||
|
||||
" Listen very carefully, I will say this only once
|
||||
if exists("did_load_filetypes")
|
||||
@@ -288,7 +288,8 @@ au BufNewFile,BufRead *.bib setf bib
|
||||
au BufNewFile,BufRead *.bst setf bst
|
||||
|
||||
" BIND configuration
|
||||
au BufNewFile,BufRead named.conf,rndc.conf setf named
|
||||
" sudoedit uses namedXXXX.conf
|
||||
au BufNewFile,BufRead named*.conf,rndc*.conf setf named
|
||||
|
||||
" BIND zone
|
||||
au BufNewFile,BufRead named.root setf bindzone
|
||||
|
||||
+54
-19
@@ -3,8 +3,8 @@
|
||||
" Author: John Wellesz <John.wellesz (AT) teaser (DOT) fr>
|
||||
" URL: http://www.2072productions.com/vim/indent/php.vim
|
||||
" Home: https://github.com/2072/PHP-Indenting-for-VIm
|
||||
" Last Change: 2015 September 8th
|
||||
" Version: 1.60
|
||||
" Last Change: 2017 March 12th
|
||||
" Version: 1.62
|
||||
"
|
||||
"
|
||||
" Type :help php-indent for available options
|
||||
@@ -141,11 +141,13 @@ let s:PHP_validVariable = '[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*'
|
||||
let s:notPhpHereDoc = '\%(break\|return\|continue\|exit\|die\|else\)'
|
||||
let s:blockstart = '\%(\%(\%(}\s*\)\=else\%(\s\+\)\=\)\=if\>\|\%(}\s*\)\?else\>\|do\>\|while\>\|switch\>\|case\>\|default\>\|for\%(each\)\=\>\|declare\>\|class\>\|trait\>\|use\>\|interface\>\|abstract\>\|final\>\|try\>\|\%(}\s*\)\=catch\>\|\%(}\s*\)\=finally\>\)'
|
||||
let s:functionDecl = '\<function\>\%(\s\+'.s:PHP_validVariable.'\)\=\s*(.*'
|
||||
let s:endline= '\s*\%(//.*\|#.*\|/\*.*\*/\s*\)\=$'
|
||||
let s:endline = '\s*\%(//.*\|#.*\|/\*.*\*/\s*\)\=$'
|
||||
let s:unstated = '\%(^\s*'.s:blockstart.'.*)\|\%(//.*\)\@<!\<e'.'lse\>\)'.s:endline
|
||||
|
||||
|
||||
let s:terminated = '\%(\%(;\%(\s*\%(?>\|}\)\)\=\|<<<\s*[''"]\=\a\w*[''"]\=$\|^\s*}\|^\s*'.s:PHP_validVariable.':\)'.s:endline.'\)\|^[^''"`]*[''"`]$'
|
||||
let s:terminated = '\%(\%(;\%(\s*\%(?>\|}\)\)\=\|<<<\s*[''"]\=\a\w*[''"]\=$\|^\s*}\|^\s*'.s:PHP_validVariable.':\)'.s:endline.'\)'
|
||||
let s:PHP_startindenttag = '<?\%(.*?>\)\@!\|<script[^>]*>\%(.*<\/script>\)\@!'
|
||||
let s:structureHead = '^\s*\%(' . s:blockstart . '\)\|'. s:functionDecl . s:endline . '\|\<new\s\+class\>'
|
||||
|
||||
|
||||
|
||||
@@ -214,10 +216,28 @@ function! GetLastRealCodeLNum(startline) " {{{
|
||||
let lnum = lnum - 1
|
||||
endwhile
|
||||
elseif lastline =~ '^[^''"`]*[''"`][;,]'.s:endline
|
||||
let tofind=substitute( lastline, '^.*\([''"`]\)[;,].*$', '^[^\1]\\+[\1]$', '')
|
||||
while getline(lnum) !~? tofind && lnum > 1
|
||||
let lnum = lnum - 1
|
||||
|
||||
let tofind=substitute( lastline, '^.*\([''"`]\)[;,].*$', '^[^\1]\\+[\1]$\\|^[^\1]\\+[=([]\\s*[\1]', '')
|
||||
let trylnum = lnum
|
||||
while getline(trylnum) !~? tofind && trylnum > 1
|
||||
let trylnum = trylnum - 1
|
||||
endwhile
|
||||
|
||||
if trylnum == 1
|
||||
break
|
||||
else
|
||||
if lastline =~ ';'.s:endline
|
||||
while getline(trylnum) !~? s:terminated && getline(trylnum) !~? '{'.s:endline && trylnum > 1
|
||||
let trylnum = prevnonblank(trylnum - 1)
|
||||
endwhile
|
||||
|
||||
|
||||
if trylnum == 1
|
||||
break
|
||||
end
|
||||
end
|
||||
let lnum = trylnum
|
||||
end
|
||||
else
|
||||
break
|
||||
endif
|
||||
@@ -262,7 +282,7 @@ function! FindOpenBracket(lnum, blockStarter) " {{{
|
||||
while line > 1
|
||||
let linec = getline(line)
|
||||
|
||||
if linec =~ s:terminated || linec =~ '^\s*\%(' . s:blockstart . '\)\|'. s:functionDecl . s:endline
|
||||
if linec =~ s:terminated || linec =~ s:structureHead
|
||||
break
|
||||
endif
|
||||
|
||||
@@ -273,6 +293,20 @@ function! FindOpenBracket(lnum, blockStarter) " {{{
|
||||
return line
|
||||
endfun " }}}
|
||||
|
||||
let s:blockChars = {'{':1, '[': 1, '(': 1, ')':-1, ']':-1, '}':-1}
|
||||
function! BalanceDirection (str)
|
||||
|
||||
let balance = 0
|
||||
|
||||
for c in split(a:str, '\zs')
|
||||
if has_key(s:blockChars, c)
|
||||
let balance += s:blockChars[c]
|
||||
endif
|
||||
endfor
|
||||
|
||||
return balance
|
||||
endfun
|
||||
|
||||
function! FindTheIfOfAnElse (lnum, StopAfterFirstPrevElse) " {{{
|
||||
|
||||
if getline(a:lnum) =~# '^\s*}\s*else\%(if\)\=\>'
|
||||
@@ -457,7 +491,7 @@ function! GetPhpIndent()
|
||||
|
||||
if synname!=""
|
||||
if synname == "SpecStringEntrails"
|
||||
let b:InPHPcode = -1
|
||||
let b:InPHPcode = -1 " thumb down
|
||||
let b:InPHPcode_tofind = ""
|
||||
elseif synname != "phpHereDoc" && synname != "phpHereDocDelimiter"
|
||||
let b:InPHPcode = 1
|
||||
@@ -540,7 +574,7 @@ function! GetPhpIndent()
|
||||
let b:InPHPcode_and_script = 1
|
||||
endif
|
||||
|
||||
elseif last_line =~ '^[^''"`]\+[''"`]$'
|
||||
elseif last_line =~ '^[^''"`]\+[''"`]$' " a string identifier with nothing after it and no other string identifier before
|
||||
let b:InPHPcode = -1
|
||||
let b:InPHPcode_tofind = substitute( last_line, '^.*\([''"`]\).*$', '^[^\1]*\1[;,]$', '')
|
||||
elseif last_line =~? '<<<\s*[''"]\=\a\w*[''"]\=$'
|
||||
@@ -660,7 +694,8 @@ function! GetPhpIndent()
|
||||
|
||||
let terminated = s:terminated
|
||||
|
||||
let unstated = '\%(^\s*'.s:blockstart.'.*)\|\%(//.*\)\@<!\<e'.'lse\>\)'.endline
|
||||
let unstated = s:unstated
|
||||
|
||||
|
||||
if ind != b:PHP_default_indenting && cline =~# '^\s*else\%(if\)\=\>'
|
||||
let b:PHP_CurrentIndentLevel = b:PHP_default_indenting
|
||||
@@ -673,7 +708,7 @@ function! GetPhpIndent()
|
||||
|
||||
while last_line_num > 1
|
||||
|
||||
if previous_line =~ terminated || previous_line =~ '^\s*\%(' . s:blockstart . '\)\|'. s:functionDecl . endline
|
||||
if previous_line =~ terminated || previous_line =~ s:structureHead
|
||||
|
||||
let ind = indent(last_line_num)
|
||||
|
||||
@@ -689,7 +724,7 @@ function! GetPhpIndent()
|
||||
endwhile
|
||||
|
||||
elseif last_line =~# unstated && cline !~ '^\s*);\='.endline
|
||||
let ind = ind + s:sw()
|
||||
let ind = ind + s:sw() " we indent one level further when the preceding line is not stated
|
||||
return ind + addSpecial
|
||||
|
||||
elseif (ind != b:PHP_default_indenting || last_line =~ '^[)\]]' ) && last_line =~ terminated
|
||||
@@ -699,7 +734,7 @@ function! GetPhpIndent()
|
||||
|
||||
let isSingleLineBlock = 0
|
||||
while 1
|
||||
if ! isSingleLineBlock && previous_line =~ '^\s*}\|;\s*}'.endline
|
||||
if ! isSingleLineBlock && previous_line =~ '^\s*}\|;\s*}'.endline " XXX
|
||||
|
||||
call cursor(last_line_num, 1)
|
||||
if previous_line !~ '^}'
|
||||
@@ -780,10 +815,10 @@ function! GetPhpIndent()
|
||||
if !LastLineClosed
|
||||
|
||||
|
||||
if last_line =~# '[{(\[]'.endline || last_line =~? '\h\w*\s*(.*,$' && AntepenultimateLine !~ '[,(\[]'.endline
|
||||
if last_line =~# '[{(\[]'.endline || last_line =~? '\h\w*\s*(.*,$' && AntepenultimateLine !~ '[,(\[]'.endline && BalanceDirection(last_line) > 0
|
||||
|
||||
let dontIndent = 0
|
||||
if last_line =~ '\S\+\s*{'.endline && last_line !~ '^\s*)\s*{'.endline && last_line !~ '^\s*\%(' . s:blockstart . '\)\|'. s:functionDecl . s:endline
|
||||
if last_line =~ '\S\+\s*{'.endline && last_line !~ '^\s*[)\]]\+\s*{'.endline && last_line !~ s:structureHead
|
||||
let dontIndent = 1
|
||||
endif
|
||||
|
||||
@@ -797,9 +832,9 @@ function! GetPhpIndent()
|
||||
return ind + addSpecial
|
||||
endif
|
||||
|
||||
elseif last_line =~ '\S\+\s*),'.endline
|
||||
elseif last_line =~ '\S\+\s*),'.endline && BalanceDirection(last_line) < 0
|
||||
call cursor(lnum, 1)
|
||||
call search('),'.endline, 'W')
|
||||
call search('),'.endline, 'W') " line never begins with ) so no need for 'c' flag
|
||||
let openedparent = searchpair('(', '', ')', 'bW', 'Skippmatch()')
|
||||
if openedparent != lnum
|
||||
let ind = indent(openedparent)
|
||||
@@ -809,7 +844,7 @@ function! GetPhpIndent()
|
||||
let ind = ind + s:sw()
|
||||
|
||||
|
||||
elseif AntepenultimateLine =~ '{'.endline || AntepenultimateLine =~ terminated || AntepenultimateLine =~# s:defaultORcase
|
||||
elseif AntepenultimateLine =~ '{'.endline && AntepenultimateLine !~? '^\s*use\>' || AntepenultimateLine =~ terminated || AntepenultimateLine =~# s:defaultORcase
|
||||
let ind = ind + s:sw()
|
||||
endif
|
||||
|
||||
|
||||
@@ -638,6 +638,8 @@ if has("gui")
|
||||
endif
|
||||
call append("$", "linespace\tnumber of pixel lines to use between characters")
|
||||
call append("$", " \tset lsp=" . &lsp)
|
||||
call append("$", "columnspace\tnumber of pixel columns to use between characters")
|
||||
call append("$", " \tset csp=" . &csp)
|
||||
if has("balloon_eval")
|
||||
call append("$", "balloondelay\tdelay in milliseconds before a balloon may pop up")
|
||||
call append("$", " \tset bdlay=" . &bdlay)
|
||||
|
||||
+15
-9
@@ -1,7 +1,7 @@
|
||||
" matchit.vim: (global plugin) Extended "%" matching
|
||||
" Last Change: 2016 Aug 21
|
||||
" Last Change: 2017 March 26
|
||||
" Maintainer: Benji Fisher PhD <benji@member.AMS.org>
|
||||
" Version: 1.13.2, for Vim 6.3+
|
||||
" Version: 1.13.3, for Vim 6.3+
|
||||
" Fix from Fernando Torres included.
|
||||
" Improvement from Ken Takata included.
|
||||
" URL: http://www.vim.org/script.php?script_id=39
|
||||
@@ -89,12 +89,15 @@ let s:notslash = '\\\@<!\%(\\\\\)*'
|
||||
|
||||
function! s:Match_wrapper(word, forward, mode) range
|
||||
" In s:CleanUp(), :execute "set" restore_options .
|
||||
let restore_options = (&ic ? " " : " no") . "ignorecase"
|
||||
if exists("b:match_ignorecase")
|
||||
let restore_options = ""
|
||||
if exists("b:match_ignorecase") && b:match_ignorecase != &ic
|
||||
let restore_options .= (&ic ? " " : " no") . "ignorecase"
|
||||
let &ignorecase = b:match_ignorecase
|
||||
endif
|
||||
let restore_options = " ve=" . &ve . restore_options
|
||||
set ve=
|
||||
if &ve != ''
|
||||
let restore_options = " ve=" . &ve . restore_options
|
||||
set ve=
|
||||
endif
|
||||
" If this function was called from Visual mode, make sure that the cursor
|
||||
" is at the correct end of the Visual range:
|
||||
if a:mode == "v"
|
||||
@@ -287,7 +290,9 @@ endfun
|
||||
" Restore options and do some special handling for Operator-pending mode.
|
||||
" The optional argument is the tail of the matching group.
|
||||
fun! s:CleanUp(options, mode, startline, startcol, ...)
|
||||
execute "set" a:options
|
||||
if strlen(a:options)
|
||||
execute "set" a:options
|
||||
endif
|
||||
" Open folds, if appropriate.
|
||||
if a:mode != "o"
|
||||
if &foldopen =~ "percent"
|
||||
@@ -639,8 +644,9 @@ fun! s:MultiMatch(spflag, mode)
|
||||
if !exists("b:match_words") || b:match_words == ""
|
||||
return ""
|
||||
end
|
||||
let restore_options = (&ic ? "" : "no") . "ignorecase"
|
||||
if exists("b:match_ignorecase")
|
||||
let restore_options = ""
|
||||
if exists("b:match_ignorecase") && b:match_ignorecase != &ic
|
||||
let restore_options .= (&ic ? " " : " no") . "ignorecase"
|
||||
let &ignorecase = b:match_ignorecase
|
||||
endif
|
||||
let startline = line(".")
|
||||
|
||||
+240
-242
@@ -1,262 +1,259 @@
|
||||
" Vim syntax file
|
||||
" Language: SAS
|
||||
" Maintainer: James Kidd <james.kidd@covance.com>
|
||||
" Last Change: 2012 Apr 20
|
||||
" Corrected bug causing some keywords to appear as strings instead
|
||||
" 18 Jul 2008 by Paulo Tanimoto <ptanimoto@gmail.com>
|
||||
" Fixed comments with * taking multiple lines.
|
||||
" Fixed highlighting of macro keywords.
|
||||
" Added words to cases that didn't fit anywhere.
|
||||
" 02 Jun 2003
|
||||
" Added highlighting for additional keywords and such;
|
||||
" Attempted to match SAS default syntax colors;
|
||||
" Changed syncing so it doesn't lose colors on large blocks;
|
||||
" Much thanks to Bob Heckel for knowledgeable tweaking.
|
||||
" quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
" Language: SAS
|
||||
" Maintainer: Zhen-Huan Hu <wildkeny@gmail.com>
|
||||
" Original Maintainer: James Kidd <james.kidd@covance.com>
|
||||
" Version: 3.0.0
|
||||
" Last Change: Mar 10, 2017
|
||||
"
|
||||
" 2017 Mar 7
|
||||
"
|
||||
" Upgrade version number to 3.0. Improvements include:
|
||||
" - Improve sync speed
|
||||
" - Largely enhance precision
|
||||
" - Update keywords in the latest SAS (as of Mar 2017)
|
||||
" - Add syntaxes for date/time constants
|
||||
" - Add syntax for data lines
|
||||
" - Add (back) syntax for TODO in comments
|
||||
"
|
||||
" 2017 Feb 9
|
||||
"
|
||||
" Add syntax folding
|
||||
"
|
||||
" 2016 Oct 10
|
||||
"
|
||||
" Add highlighting for functions
|
||||
"
|
||||
" 2016 Sep 14
|
||||
"
|
||||
" Change the implementation of syntaxing
|
||||
" macro function names so that macro parameters same
|
||||
" as SAS keywords won't be highlighted
|
||||
" (Thank Joug Raw for the suggestion)
|
||||
" Add section highlighting:
|
||||
" - Use /** and **/ to define a section
|
||||
" - It functions the same as a comment but
|
||||
" with different highlighting
|
||||
"
|
||||
" 2016 Jun 14
|
||||
"
|
||||
" Major changes so upgrade version number to 2.0
|
||||
" Overhaul the entire script (again). Improvements include:
|
||||
" - Higher precision
|
||||
" - Faster synchronization
|
||||
" - Separate color for control statements
|
||||
" - Highlight hash and java objects
|
||||
" - Highlight macro variables in double quoted strings
|
||||
" - Update all syntaxes based on SAS 9.4
|
||||
" - Add complete SAS/GRAPH and SAS/STAT procedure syntaxes
|
||||
" - Add Proc TEMPLATE and GTL syntaxes
|
||||
" - Add complete DS2 syntaxes
|
||||
" - Add basic IML syntaxes
|
||||
" - Many other improvements and bug fixes
|
||||
" Drop support for VIM version < 600
|
||||
|
||||
if version < 600
|
||||
syntax clear
|
||||
elseif exists('b:current_syntax')
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
syn case ignore
|
||||
|
||||
syn region sasString start=+"+ skip=+\\\\\|\\"+ end=+"+
|
||||
syn region sasString start=+'+ skip=+\\\\\|\\"+ end=+'+
|
||||
" Basic SAS syntaxes
|
||||
syn keyword sasOperator and eq ge gt in le lt ne not of or
|
||||
syn keyword sasReserved _all_ _automatic_ _char_ _character_ _data_ _infile_ _last_ _n_ _name_ _null_ _num_ _numeric_ _temporary_ _user_ _webout_
|
||||
" Strings
|
||||
syn region sasString start=+'+ skip=+''+ end=+'+ contains=@Spell
|
||||
syn region sasString start=+"+ skip=+""+ end=+"+ contains=sasMacroVariable,@Spell
|
||||
" Constants
|
||||
syn match sasNumber /\v<\d+%(\.\d+)=%(>|e[\-+]=\d+>)/ display
|
||||
syn match sasDateTime /\v(['"])\d{2}%(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\d{2}%(\d{2})=:\d{2}:\d{2}%(:\d{2})=%(am|pm)\1dt>/ display
|
||||
syn match sasDateTime /\v(['"])\d{2}%(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\d{2}%(\d{2})=\1d>/ display
|
||||
syn match sasDateTime /\v(['"])\d{2}:\d{2}%(:\d{2})=%(am|pm)\1t>/ display
|
||||
" Comments
|
||||
syn keyword sasTodo todo tbd fixme contained
|
||||
syn region sasComment start='/\*' end='\*/' contains=sasTodo
|
||||
syn region sasComment start='\v%(^|;)\s*\zs\%=\*' end=';'me=s-1 contains=sasTodo
|
||||
syn region sasSectLbl matchgroup=sasSectLblEnds start='/\*\*\s*' end='\s*\*\*/' concealends
|
||||
" Macros
|
||||
syn match sasMacroVariable '\v\&+\w+%(\.\w+)=' display
|
||||
syn match sasMacroReserved '\v\%%(abort|by|copy|display|do|else|end|global|goto|if|include|input|let|list|local|macro|mend|put|return|run|symdel|syscall|sysexec|syslput|sysrput|then|to|until|window|while)>' display
|
||||
syn region sasMacroFunction matchgroup=sasMacroFunctionName start='\v\%\w+\ze\(' end=')'he=s-1 contains=@sasBasicSyntax,sasMacroFunction
|
||||
syn region sasMacroFunction matchgroup=sasMacroFunctionName start='\v\%q=sysfunc\ze\(' end=')'he=s-1 contains=@sasBasicSyntax,sasMacroFunction,sasDataStepFunction
|
||||
" Syntax cluster for basic SAS syntaxes
|
||||
syn cluster sasBasicSyntax contains=sasOperator,sasReserved,sasNumber,sasDateTime,sasString,sasComment,sasMacroReserved,sasMacroFunction,sasMacroVariable,sasSectLbl
|
||||
|
||||
" Want region from 'cards;' to ';' to be captured (Bob Heckel)
|
||||
syn region sasCards start="^\s*CARDS.*" end="^\s*;\s*$"
|
||||
syn region sasCards start="^\s*DATALINES.*" end="^\s*;\s*$"
|
||||
" Formats
|
||||
syn match sasFormat '\v\$\w+\.' display contained
|
||||
syn match sasFormat '\v<\w+\.%(\d+>)=' display contained
|
||||
syn region sasFormatContext start='.' end=';'me=s-1 contained contains=@sasBasicSyntax,sasFormat
|
||||
|
||||
syn match sasNumber "-\=\<\d*\.\=[0-9_]\>"
|
||||
" Define global statements that can be accessed out of data step or procedures
|
||||
syn keyword sasGlobalStatementKeyword catname dm endsas filename footnote footnote1 footnote2 footnote3 footnote4 footnote5 footnote6 footnote7 footnote8 footnote9 footnote10 missing libname lock ods options page quit resetline run sasfile skip sysecho title title1 title2 title3 title4 title5 title6 title7 title8 title9 title10 contained
|
||||
syn keyword sasGlobalStatementODSKeyword chtml csvall docbook document escapechar epub epub2 epub3 exclude excel graphics html html3 html5 htmlcss imode listing markup output package path pcl pdf preferences phtml powerpoint printer proclabel proctitle ps results rtf select show tagsets trace usegopt verify wml contained
|
||||
syn match sasGlobalStatement '\v%(^|;)\s*\zs\h\w*>' display transparent contains=sasGlobalStatementKeyword
|
||||
syn match sasGlobalStatement '\v%(^|;)\s*\zsods>' display transparent contains=sasGlobalStatementKeyword nextgroup=sasGlobalStatementODSKeyword skipwhite skipnl skipempty
|
||||
|
||||
" Block comment
|
||||
syn region sasComment start="/\*" end="\*/" contains=sasTodo
|
||||
" Data step statements, 9.4
|
||||
syn keyword sasDataStepFunctionName abs addr addrlong airy allcomb allperm anyalnum anyalpha anycntrl anydigit anyfirst anygraph anylower anyname anyprint anypunct anyspace anyupper anyxdigit arcos arcosh arsin arsinh artanh atan atan2 attrc attrn band beta betainv blackclprc blackptprc blkshclprc blkshptprc blshift bnot bor brshift bxor byte cat catq cats catt catx cdf ceil ceilz cexist char choosec choosen cinv close cmiss cnonct coalesce coalescec collate comb compare compbl compfuzz compged complev compound compress constant convx convxp cos cosh cot count countc countw csc css cumipmt cumprinc curobs cv daccdb daccdbsl daccsl daccsyd dacctab dairy datdif date datejul datepart datetime day dclose dcreate depdb depdbsl depsl depsyd deptab dequote deviance dhms dif digamma dim dinfo divide dnum dopen doptname doptnum dosubl dread dropnote dsname dsncatlgd dur durp effrate envlen erf erfc euclid exist exp fact fappend fclose fcol fcopy fdelete fetch fetchobs fexist fget fileexist filename fileref finance find findc findw finfo finv fipname fipnamel fipstate first floor floorz fmtinfo fnonct fnote fopen foptname foptnum fpoint fpos fput fread frewind frlen fsep fuzz fwrite gaminv gamma garkhclprc garkhptprc gcd geodist geomean geomeanz getoption getvarc getvarn graycode harmean harmeanz hbound hms holiday holidayck holidaycount holidayname holidaynx holidayny holidaytest hour htmldecode htmlencode ibessel ifc ifn index indexc indexw input inputc inputn int intcindex intck intcycle intfit intfmt intget intindex intnx intrr intseas intshift inttest intz iorcmsg ipmt iqr irr jbessel juldate juldate7 kurtosis lag largest lbound lcm lcomb left length lengthc lengthm lengthn lexcomb lexcombi lexperk lexperm lfact lgamma libname libref log log1px log10 log2 logbeta logcdf logistic logpdf logsdf lowcase lperm lpnorm mad margrclprc margrptprc max md5 mdy mean median min minute missing mod modexist module modulec modulen modz month mopen mort msplint mvalid contained
|
||||
syn keyword sasDataStepFunctionName n netpv nliteral nmiss nomrate normal notalnum notalpha notcntrl notdigit note notfirst notgraph notlower notname notprint notpunct notspace notupper notxdigit npv nvalid nwkdom open ordinal pathname pctl pdf peek peekc peekclong peeklong perm pmt point poisson ppmt probbeta probbnml probbnrm probchi probf probgam probhypr probit probmc probnegb probnorm probt propcase prxchange prxmatch prxparen prxparse prxposn ptrlongadd put putc putn pvp qtr quantile quote ranbin rancau rand ranexp rangam range rank rannor ranpoi rantbl rantri ranuni rename repeat resolve reverse rewind right rms round rounde roundz saving savings scan sdf sec second sha256 sha256hex sha256hmachex sign sin sinh skewness sleep smallest soapweb soapwebmeta soapwipservice soapwipsrs soapws soapwsmeta soundex spedis sqrt squantile std stderr stfips stname stnamel strip subpad substr substrn sum sumabs symexist symget symglobl symlocal sysexist sysget sysmsg sysparm sysprocessid sysprocessname sysprod sysrc system tan tanh time timepart timevalue tinv tnonct today translate transtrn tranwrd trigamma trim trimn trunc tso typeof tzoneid tzonename tzoneoff tzones2u tzoneu2s uniform upcase urldecode urlencode uss uuidgen var varfmt varinfmt varlabel varlen varname varnum varray varrayx vartype verify vformat vformatd vformatdx vformatn vformatnx vformatw vformatwx vformatx vinarray vinarrayx vinformat vinformatd vinformatdx vinformatn vinformatnx vinformatw vinformatwx vinformatx vlabel vlabelx vlength vlengthx vname vnamex vtype vtypex vvalue vvaluex week weekday whichc whichn wto year yieldp yrdif yyq zipcity zipcitydistance zipfips zipname zipnamel zipstate contained
|
||||
syn keyword sasDataStepCallRoutineName allcomb allcombi allperm cats catt catx compcost execute graycode is8601_convert label lexcomb lexcombi lexperk lexperm logistic missing module poke pokelong prxchange prxdebug prxfree prxnext prxposn prxsubstr ranbin rancau rancomb ranexp rangam rannor ranperk ranperm ranpoi rantbl rantri ranuni scan set sleep softmax sortc sortn stdize streaminit symput symputx system tanh tso vname vnext wto contained
|
||||
syn region sasDataStepFunctionContext start='(' end=')' contained contains=@sasBasicSyntax,sasDataStepFunction
|
||||
syn region sasDataStepFunctionFormatContext start='(' end=')' contained contains=@sasBasicSyntax,sasDataStepFunction,sasFormat
|
||||
syn match sasDataStepFunction '\v<\w+\ze\(' contained contains=sasDataStepFunctionName,sasDataStepCallRoutineName nextgroup=sasDataStepFunctionContext
|
||||
syn match sasDataStepFunction '\v%(input|put)\ze\(' contained contains=sasDataStepFunctionName nextgroup=sasDataStepFunctionFormatContext
|
||||
syn keyword sasDataStepHashMethodName add check clear definedata definedone definekey delete do_over equals find find_next find_prev first has_next has_prev last next output prev ref remove removedup replace replacedup reset_dup setcur sum sumdup contained
|
||||
syn region sasDataStepHashMethodContext start='(' end=')' contained contains=@sasBasicSyntax,sasDataStepFunction
|
||||
syn match sasDataStepHashMethod '\v\.\w+\ze\(' contained contains=sasDataStepHashMethodName nextgroup=sasDataStepHashMethodContext
|
||||
syn keyword sasDataStepHashAttributeName item_size num_items contained
|
||||
syn match sasDataStepHashAttribute '\v\.\w+>\ze\_[^(]' display contained contains=sasDataStepHashAttributeName
|
||||
syn keyword sasDataStepControl continue do end go goto if leave link otherwise over return select to until when while contained
|
||||
syn keyword sasDataStepControl else then contained nextgroup=sasDataStepStatementKeyword skipwhite skipnl skipempty
|
||||
syn keyword sasDataStepHashOperator _new_ contained
|
||||
syn keyword sasDataStepStatementKeyword abort array attrib by call cards cards4 datalines datalines4 dcl declare delete describe display drop error execute file format infile informat input keep label length lines lines4 list lostcard merge modify output put putlog redirect remove rename replace retain set stop update where window contained
|
||||
syn keyword sasDataStepStatementHashKeyword hash hiter javaobj contained
|
||||
syn match sasDataStepStatement '\v%(^|;)\s*\zs\h\w*>' display contained contains=sasDataStepStatementKeyword,sasGlobalStatementKeyword
|
||||
syn match sasDataStepStatement '\v%(^|;)\s*\zs%(dcl|declare)>' display contained contains=sasDataStepStatementKeyword nextgroup=sasDataStepStatementHashKeyword skipwhite skipnl skipempty
|
||||
syn match sasDataStepStatement '\v%(^|;)\s*\zsods>' display contained contains=sasGlobalStatementKeyword nextgroup=sasGlobalStatementODSKeyword skipwhite skipnl skipempty
|
||||
syn match sasDataStepStatement '\v%(^|;)\s*\zs%(format|informat|input|put)>' display contained contains=sasDataStepStatementKeyword nextgroup=sasFormatContext skipwhite skipnl skipempty
|
||||
syn match sasDataStepStatement '\v%(^|;)\s*\zs%(cards|datalines|lines)4=\s*;' display contained contains=sasDataStepStatementKeyword nextgroup=sasDataLine skipwhite skipnl skipempty
|
||||
syn region sasDataLine start='^' end='^;'me=s-1 contained
|
||||
syn region sasDataStep matchgroup=sasSectionKeyword start='\v%(^|;)\s*\zsdata>' end='\v%(^|;)\s*%(run|data|proc|endsas)>'me=s-1 fold contains=@sasBasicSyntax,@sasDataStepSyntax
|
||||
syn cluster sasDataStepSyntax contains=sasDataStepFunction,sasDataStepHashOperator,sasDataStepHashAttribute,sasDataStepHashMethod,sasDataStepControl,sasDataStepStatement
|
||||
|
||||
" Ignore misleading //JCL SYNTAX... (Bob Heckel)
|
||||
syn region sasComment start="[^/][^/]/\*" end="\*/" contains=sasTodo
|
||||
" Procedures, base SAS, 9.4
|
||||
syn keyword sasProcStatementKeyword abort age append array attrib audit block break by calid cdfplot change checkbox class classlev column compute contents copy create datarow dbencoding define delete deletefunc deletesubr delimiter device dialog dur endcomp exact exchange exclude explore fin fmtlib fontfile fontpath format formats freq function getnames guessingrows hbar hdfs histogram holidur holifin holistart holivar id idlabel informat inset invalue item key keylabel keyword label line link listfunc listsubr mapmiss mapreduce mean menu messages meta modify opentype outargs outdur outfin output outstart pageby partial picture pie pig plot ppplot printer probplot profile prompter qqplot radiobox ranks rbreak rbutton rebuild record remove rename repair report roptions save select selection separator source star start statistics struct submenu subroutine sum sumby table tables test text trantab truetype type1 types value var vbar ways weight where with write contained
|
||||
syn match sasProcStatement '\v%(^|;)\s*\zs\h\w*>' display contained contains=sasProcStatementKeyword,sasGlobalStatementKeyword
|
||||
syn match sasProcStatement '\v%(^|;)\s*\zsods>' display contained contains=sasGlobalStatementKeyword nextgroup=sasGlobalStatementODSKeyword skipwhite skipnl skipempty
|
||||
syn match sasProcStatement '\v%(^|;)\s*\zs%(format|informat)>' display contained contains=sasProcStatementKeyword nextgroup=sasFormatContext skipwhite skipnl skipempty
|
||||
syn region sasProc matchgroup=sasSectionKeyword start='\v%(^|;)\s*\zsproc%(\s+\h\w*)=>' end='\v%(^|;)\s*%(run|data|proc|endsas)>'me=s-1 fold contains=@sasBasicSyntax,sasDataStepFunction,sasProcStatement
|
||||
syn region sasProc matchgroup=sasSectionKeyword start='\v%(^|;)\s*\zsproc\s+%(catalog|chart|datasets|document|plot)>' end='\v%(^|;)\s*%(quit|data|proc|endsas)>'me=s-1 fold contains=@sasBasicSyntax,sasDataStepFunction,sasProcStatement
|
||||
|
||||
" Previous code for comments was written by Bob Heckel
|
||||
" Comments with * may take multiple lines (Paulo Tanimoto)
|
||||
syn region sasComment start=";\s*\*"hs=s+1 end=";" contains=sasTodo
|
||||
" Procedures, SAS/GRAPH, 9.4
|
||||
syn keyword sasGraphProcStatementKeyword add area axis bar block bubble2 byline cc ccopy cdef cdelete chart cmap choro copy delete device dial donut exclude flow format fs goptions gout grid group hbar hbar3d hbullet hslider htrafficlight id igout label legend list modify move nobyline note pattern pie pie3d plot plot2 preview prism quit rename replay select scatter speedometer star surface symbol tc tcopy tdef tdelete template tile toggle treplay vbar vbar3d vtrafficlight vbullet vslider where contained
|
||||
syn match sasGraphProcStatement '\v%(^|;)\s*\zs\h\w*>' display contained contains=sasGraphProcStatementKeyword,sasGlobalStatementKeyword
|
||||
syn match sasGraphProcStatement '\v%(^|;)\s*\zsformat>' display contained contains=sasGraphProcStatementKeyword nextgroup=sasFormatContext skipwhite skipnl skipempty
|
||||
syn region sasGraphProc matchgroup=sasSectionKeyword start='\v%(^|;)\s*\zsproc\s+%(g3d|g3grid|ganno|gcontour|gdevice|geocode|gfont|ginside|goptions|gproject|greduce|gremove|mapimport)>' end='\v%(^|;)\s*%(run|data|proc|endsas)>'me=s-1 fold contains=@sasBasicSyntax,sasDataStepFunction,sasGraphProcStatement
|
||||
syn region sasGraphProc matchgroup=sasSectionKeyword start='\v%(^|;)\s*\zsproc\s+%(gareabar|gbarline|gchart|gkpi|gmap|gplot|gradar|greplay|gslide|gtile)>' end='\v%(^|;)\s*%(quit|data|proc|endsas)>'me=s-1 fold contains=@sasBasicSyntax,sasDataStepFunction,sasGraphProcStatement
|
||||
|
||||
" Comments with * starting after a semicolon (Paulo Tanimoto)
|
||||
syn region sasComment start="^\s*\*" end=";" contains=sasTodo
|
||||
" Procedures, SAS/STAT, 14.1
|
||||
syn keyword sasAnalyticalProcStatementKeyword absorb add array assess baseline bayes beginnodata bivar bootstrap bounds by cdfplot cells class cluster code compute condition contrast control coordinates copy cosan cov covtest coxreg der design determ deviance direct directions domain effect effectplot effpart em endnodata equality estimate exact exactoptions factor factors fcs filter fitindex format freq fwdlink gender grid group grow hazardratio height hyperprior id impjoint inset insetgroup invar invlink ippplot lincon lineqs lismod lmtests location logistic loglin lpredplot lsmeans lsmestimate manova matings matrix mcmc mean means missmodel mnar model modelaverage modeleffects monotone mstruct mtest multreg name nlincon nloptions oddsratio onecorr onesamplefreq onesamplemeans onewayanova outfiles output paired pairedfreq pairedmeans parameters parent parms partial partition path pathdiagram pcov performance plot population poststrata power preddist predict predpplot priors process probmodel profile prune pvar ram random ratio reference refit refmodel renameparm repeated replicate repweights response restore restrict retain reweight ridge rmsstd roc roccontrast rules samplesize samplingunit seed size scale score selection show simtests simulate slice std stderr store strata structeq supplementary table tables test testclass testfreq testfunc testid time transform treatments trend twosamplefreq twosamplemeans towsamplesurvival twosamplewilcoxon uds units univar var variance varnames weight where with zeromodel contained
|
||||
syn match sasAnalyticalProcStatement '\v%(^|;)\s*\zs\h\w*>' display contained contains=sasAnalyticalProcStatementKeyword,sasGlobalStatementKeyword
|
||||
syn match sasAnalyticalProcStatement '\v%(^|;)\s*\zsods>' display contained contains=sasGlobalStatementKeyword nextgroup=sasGlobalStatementODSKeyword skipwhite skipnl skipempty
|
||||
syn match sasAnalyticalProcStatement '\v%(^|;)\s*\zsformat>' display contained contains=sasAnalyticalProcStatementKeyword nextgroup=sasFormatContext skipwhite skipnl skipempty
|
||||
syn region sasAnalyticalProc matchgroup=sasSectionKeyword start='\v%(^|;)\s*\zsproc\s+%(aceclus|adaptivereg|bchoice|boxplot|calis|cancorr|candisc|cluster|corresp|discrim|distance|factor|fastclus|fmm|freq|gam|gampl|gee|genmod|glimmix|glmmod|glmpower|glmselect|hpcandisc|hpfmm|hpgenselect|hplmixed|hplogistic|hpmixed|hpnlmod|hppls|hpprincomp|hpquantselect|hpreg|hpsplit|iclifetest|icphreg|inbreed|irt|kde|krige2d|lattice|lifereg|lifetest|loess|logistic|mcmc|mds|mi|mianalyze|mixed|modeclus|multtest|nested|nlin|nlmixed|npar1way|orthoreg|phreg|plm|pls|power|princomp|prinqual|probit|quantlife|quantreg|quantselect|robustreg|rsreg|score|seqdesign|seqtest|sim2d|simnormal|spp|stdize|stdrate|stepdisc|surveyfreq|surveyimpute|surveylogistic|surveymeans|surveyphreg|surveyreg|surveyselect|tpspline|transreg|tree|ttest|varclus|varcomp|variogram)>' end='\v%(^|;)\s*%(run|data|proc|endsas)>'me=s-1 fold contains=@sasBasicSyntax,sasDataStepControl,sasDataStepFunction,sasAnalyticalProcStatement
|
||||
syn region sasAnalyticalProc matchgroup=sasSectionKeyword start='\v%(^|;)\s*\zsproc\s+%(anova|arima|catmod|factex|glm|model|optex|plan|reg)>' end='\v%(^|;)\s*%(quit|data|proc|endsas)>'me=s-1 fold contains=@sasBasicSyntax,sasDataStepControl,sasDataStepFunction,sasAnalyticalProcStatement
|
||||
|
||||
" This line defines macro variables in code. "hi def link" at end of file
|
||||
" defines the color scheme. Begin region with ampersand and end with
|
||||
" any non-word character offset by -1; put ampersand in the skip list
|
||||
" just in case it is used to concatenate macro variable values.
|
||||
" Procedures, ODS graphics, 9.4
|
||||
syn keyword sasODSGraphicsProcStatementKeyword band block bubble by colaxis compare dattrvar density dot dropline dynamic ellipse ellipseparm format fringe gradlegend hbar hbarbasic hbarparm hbox heatmap heatmapparm highlow histogram hline inset keylegend label lineparm loess matrix needle parent panelby pbspline plot polygon refline reg rowaxis scatter series spline step style styleattrs symbolchar symbolimage text vbar vbarbasic vbarparm vbox vector vline waterfall where xaxis x2axis yaxis y2axis yaxistable contained
|
||||
syn match sasODSGraphicsProcStatement '\v%(^|;)\s*\zs\h\w*>' display contained contains=sasODSGraphicsProcStatementKeyword,sasGlobalStatementKeyword
|
||||
syn match sasODSGraphicsProcStatement '\v%(^|;)\s*\zsods>' display contained contains=sasGlobalStatementKeyword nextgroup=sasGlobalStatementODSKeyword skipwhite skipnl skipempty
|
||||
syn match sasODSGraphicsProcStatement '\v%(^|;)\s*\zsformat>' display contained contains=sasODSGraphicsProcStatementKeyword nextgroup=sasFormatContext skipwhite skipnl skipempty
|
||||
syn region sasODSGraphicsProc matchgroup=sasSectionKeyword start='\v%(^|;)\s*\zsproc\s+%(sgdesign|sgpanel|sgplot|sgrender|sgscatter)>' end='\v%(^|;)\s*%(run|data|proc|endsas)>'me=s-1 fold contains=@sasBasicSyntax,sasDataStepFunction,sasODSGraphicsProcStatement
|
||||
|
||||
" Thanks to ronald höllwarth for this fix to an intra-versioning
|
||||
" problem with this little feature
|
||||
" Proc TEMPLATE, 9.4
|
||||
syn keyword sasProcTemplateClause as into
|
||||
syn keyword sasProcTemplateStatementKeyword block break cellstyle class close column compute continue define delete delstream do done dynamic edit else end eval flush footer header import iterate link list mvar ndent next nmvar notes open path put putl putlog putq putstream putvars replace set source stop style test text text2 text3 translate trigger unblock unset xdent contained
|
||||
syn keyword sasProcTemplateStatementComplexKeyword cellvalue column crosstabs event footer header statgraph style table tagset contained
|
||||
syn keyword sasProcTemplateGTLStatementKeyword axislegend axistable bandplot barchart barchartparm begingraph beginpolygon beginpolyline bihistogram3dparm blockplot boxplot boxplotparm bubbleplot continuouslegend contourplotparm dendrogram discretelegend drawarrow drawimage drawline drawoval drawrectangle drawtext dropline ellipse ellipseparm endgraph endinnermargin endlayout endpolygon endpolyline endsidebar entry entryfootnote entrytitle fringeplot heatmap heatmapparm highlowplot histogram histogramparm innermargin layout legenditem legendtextitems linechart lineparm loessplot mergedlegend modelband needleplot pbsplineplot polygonplot referenceline regressionplot scatterplot seriesplot sidebar stepplot surfaceplotparm symbolchar symbolimage textplot vectorplot waterfallchart contained
|
||||
syn keyword sasProcTemplateGTLComplexKeyword datalattice datapanel globallegend gridded lattice overlay overlayequated overlay3d region contained
|
||||
syn match sasProcTemplateStatement '\v%(^|;)\s*\zs\h\w*>' display contained contains=sasProcTemplateStatementKeyword,sasProcTemplateGTLStatementKeyword,sasGlobalStatementKeyword
|
||||
syn match sasProcTemplateStatement '\v%(^|;)\s*\zsdefine>' display contained contains=sasProcTemplateStatementKeyword nextgroup=sasProcTemplateStatementComplexKeyword skipwhite skipnl skipempty
|
||||
syn match sasProcTemplateStatement '\v%(^|;)\s*\zslayout>' display contained contains=sasProcTemplateGTLStatementKeyword nextgroup=sasProcTemplateGTLComplexKeyword skipwhite skipnl skipempty
|
||||
syn match sasProcTemplateStatement '\v%(^|;)\s*\zsods>' display contained contains=sasGlobalStatementKeyword nextgroup=sasGlobalStatementODSKeyword skipwhite skipnl skipempty
|
||||
syn region sasProcTemplate matchgroup=sasSectionKeyword start='\v%(^|;)\s*\zsproc\s+template>' end='\v%(^|;)\s*%(run|data|proc|endsas)>'me=s-1 fold contains=@sasBasicSyntax,sasProcTemplateClause,sasProcTemplateStatement
|
||||
|
||||
syn region sasMacroVar start="&" skip="[_&]" end="\W"he=e-1
|
||||
" Proc SQL, 9.4
|
||||
syn keyword sasProcSQLFunctionName avg count css cv freq max mean median min n nmiss prt range std stderr sum sumwgt t uss var contained
|
||||
syn region sasProcSQLFunctionContext start='(' end=')' contained contains=@sasBasicSyntax,sasProcSQLFunction
|
||||
syn match sasProcSQLFunction '\v<\w+\ze\(' contained contains=sasProcSQLFunctionName,sasDataStepFunctionName nextgroup=sasProcSQLFunctionContext
|
||||
syn keyword sasProcSQLClause add asc between by calculated cascade case check connection constraint cross desc distinct drop else end escape except exists foreign from full group having in inner intersect into is join key left libname like modify natural newline notrim null on order outer primary references restrict right separated set then to trimmed union unique user using values when where contained
|
||||
syn keyword sasProcSQLClause as contained nextgroup=sasProcSQLStatementKeyword skipwhite skipnl skipempty
|
||||
syn keyword sasProcSQLStatementKeyword connect delete disconnect execute insert reset select update validate contained
|
||||
syn keyword sasProcSQLStatementComplexKeyword alter create describe drop contained nextgroup=sasProcSQLStatementNextKeyword skipwhite skipnl skipempty
|
||||
syn keyword sasProcSQLStatementNextKeyword index table view contained
|
||||
syn match sasProcSQLStatement '\v%(^|;)\s*\zs\h\w*>' display contained contains=sasProcSQLStatementKeyword,sasGlobalStatementKeyword
|
||||
syn match sasProcSQLStatement '\v%(^|;)\s*\zs%(alter|create|describe|drop)>' display contained contains=sasProcSQLStatementComplexKeyword nextgroup=sasProcSQLStatementNextKeyword skipwhite skipnl skipempty
|
||||
syn match sasProcSQLStatement '\v%(^|;)\s*\zsvalidate>' display contained contains=sasProcSQLStatementKeyword nextgroup=sasProcSQLStatementKeyword,sasProcSQLStatementComplexKeyword skipwhite skipnl skipempty
|
||||
syn match sasProcSQLStatement '\v%(^|;)\s*\zsods>' display contained contains=sasGlobalStatementKeyword nextgroup=sasGlobalStatementODSKeyword skipwhite skipnl skipempty
|
||||
syn region sasProcSQL matchgroup=sasSectionKeyword start='\v%(^|;)\s*\zsproc\s+sql>' end='\v%(^|;)\s*%(quit|data|proc|endsas)>'me=s-1 fold contains=@sasBasicSyntax,sasProcSQLFunction,sasProcSQLClause,sasProcSQLStatement
|
||||
|
||||
" SAS/DS2, 9.4
|
||||
syn keyword sasDS2FunctionName abs anyalnum anyalpha anycntrl anydigit anyfirst anygraph anylower anyname anyprint anypunct anyspace anyupper anyxdigit arcos arcosh arsin arsinh artanh atan atan2 band beta betainv blackclprc blackptprc blkshclprc blkshptprc blshift bnot bor brshift bxor byte cat cats catt catx ceil ceilz choosec choosen cmp cmpt coalesce coalescec comb compare compbl compfuzz compound compress constant convx convxp cos cosh count countc countw css cumipmt cumprinc cv datdif date datejul datepart datetime day dequote deviance dhms dif digamma dim divide dur durp effrate erf erfc exp fact find findc findw floor floorz fmtinfo fuzz gaminv gamma garkhclprc garkhptprc gcd geodist geomean geomeanz harmean harmeanz hbound hms holiday hour index indexc indexw inputc inputn int intcindex intck intcycle intdt intfit intget intindex intnest intnx intrr intseas intshift inttest intts intz ipmt iqr irr juldate juldate7 kcount kstrcat kstrip kupdate kupdates kurtosis lag largest lbound lcm left length lengthc lengthm lengthn lgamma log logbeta log10 log1px log2 lowcase mad margrclprc margrptprc max md5 mdy mean median min minute missing mod modz month mort n ndims netpv nmiss nomrate notalnum notalpha notcntrl notdigit notfirst notgraph notlower notname notprint notpunct notspace notupper notxdigit npv null nwkdom ordinal pctl perm pmt poisson power ppmt probbeta probbnml probbnrm probchi probdf probf probgam probhypr probit probmc probmed probnegb probnorm probt prxchange prxmatch prxparse prxposn put pvp qtr quote ranbin rancau rand ranexp rangam range rank rannor ranpoi rantbl rantri ranuni repeat reverse right rms round rounde roundz savings scan sec second sha256hex sha256hmachex sign sin sinh skewness sleep smallest sqlexec sqrt std stderr streaminit strip substr substrn sum sumabs tan tanh time timepart timevalue tinv to_date to_double to_time to_timestamp today translate transtrn tranwrd trigamma trim trimn trunc uniform upcase uss uuidgen var verify vformat vinarray vinformat vlabel vlength vname vtype week weekday whichc whichn year yieldp yrdif yyq contained
|
||||
syn region sasDS2FunctionContext start='(' end=')' contained contains=@sasBasicSyntax,sasDS2Function
|
||||
syn match sasDS2Function '\v<\w+\ze\(' contained contains=sasDS2FunctionName nextgroup=sasDS2FunctionContext
|
||||
syn keyword sasDS2Control continue data dcl declare do drop else end enddata endpackage endthread from go goto if leave method otherwise package point return select then thread to until when while contained
|
||||
syn keyword sasDS2StatementKeyword array by forward keep merge output put rename retain set stop vararray varlist contained
|
||||
syn keyword sasDS2StatementComplexKeyword package thread contained
|
||||
syn match sasDS2Statement '\v%(^|;)\s*\zs\h\w*>' display contained contains=sasDS2StatementKeyword,sasGlobalStatementKeyword
|
||||
syn match sasDS2Statement '\v%(^|;)\s*\zs%(dcl|declare|drop)>' display contained contains=sasDS2StatementKeyword nextgroup=sasDS2StatementComplexKeyword skipwhite skipnl skipempty
|
||||
syn match sasDS2Statement '\v%(^|;)\s*\zsods>' display contained contains=sasGlobalStatementKeyword nextgroup=sasGlobalStatementODSKeyword skipwhite skipnl skipempty
|
||||
syn region sasDS2 matchgroup=sasSectionKeyword start='\v%(^|;)\s*\zsproc\s+ds2>' end='\v%(^|;)\s*%(quit|data|proc|endsas)>'me=s-1 fold contains=@sasBasicSyntax,sasDS2Function,sasDS2Control,sasDS2Statement
|
||||
|
||||
" I dont think specific PROCs need to be listed if use this line (Bob Heckel).
|
||||
syn match sasProc "^\s*PROC \w\+"
|
||||
syn keyword sasStep RUN QUIT DATA
|
||||
" SAS/IML, 14.1
|
||||
syn keyword sasIMLFunctionName abs all allcomb allperm any apply armasim bin blankstr block branks bspline btran byte char choose col colvec concat contents convexit corr corr2cov countmiss countn countunique cov cov2corr covlag cshape cusum cuprod cv cvexhull datasets design designf det diag dif dimension distance do duration echelon eigval eigvec element exp expmatrix expandgrid fft forward froot full gasetup geomean ginv hadamard half hankel harmean hdir hermite homogen i ifft insert int inv invupdt isempty isskipped j jroot kurtosis lag length loc log logabsdet mad magic mahalanobis max mean median min mod moduleic modulein name ncol ndx2sub nleng norm normal nrow num opscal orpol parentname palette polyroot prod product pv quartile rancomb randdirichlet randfun randmultinomial randmvt randnormal randwishart ranperk ranperm range rank ranktie rates ratio remove repeat root row rowcat rowcatc rowvec rsubstr sample setdif shape shapecol skewness solve sparse splinev spot sqrsym sqrt sqrvech ssq standard std storage sub2ndx substr sum sweep symsqr t toeplitz trace trisolv type uniform union unique uniqueby value var vecdiag vech xmult xsect yield contained
|
||||
syn keyword sasIMLCallRoutineName appcort armacov armalik bar box change comport delete eigen execute exportdatasettor exportmatrixtor farmacov farmafit farmalik farmasim fdif gaend gagetmem gagetval gainit gareeval garegen gasetcro gasetmut gasetobj gasetsel gblkvp gblkvpd gclose gdelete gdraw gdrawl geneig ggrid ginclude gopen gpie gpiexy gpoint gpoly gport gportpop gportstk gscale gscript gset gshow gsorth gstart gstop gstrlen gtext gvtext gwindow gxaxis gyaxis heatmapcont heatmapdisc histogram importdatasetfromr importmatrixfromr ipf itsolver kalcvf kalcvs kaldff kaldfs lav lcp lms lp lpsolve lts lupdt marg maxqform mcd milpsolve modulei mve nlpcg nlpdd nlpfdd nlpfea nlphqn nlplm nlpnms nlpnra nlpnrr nlpqn nlpqua nlptr ode odsgraph ortvec pgraf push qntl qr quad queue randgen randseed rdodt rupdt rename rupdt rzlind scatter seq seqscale seqshift seqscale seqshift series solvelin sort sortndx sound spline splinec svd tabulate tpspline tpsplnev tsbaysea tsdecomp tsmlocar tsmlomar tsmulmar tspears tspred tsroot tstvcar tsunimar valset varmacov varmalik varmasim vnormal vtsroot wavft wavget wavift wavprint wavthrsh contained
|
||||
syn region sasIMLFunctionContext start='(' end=')' contained contains=@sasBasicSyntax,sasIMLFunction
|
||||
syn match sasIMLFunction '\v<\w+\ze\(' contained contains=sasIMLFunctionName,sasDataStepFunction nextgroup=sasIMLFunctionContext
|
||||
syn keyword sasIMLControl abort by do else end finish goto if link pause quit resume return run start stop then to until while contained
|
||||
syn keyword sasIMLStatementKeyword append call close closefile create delete display edit file find force free index infile input list load mattrib print purge read remove replace reset save setin setout show sort store summary use window contained
|
||||
syn match sasIMLStatement '\v%(^|;)\s*\zs\h\w*>' display contained contains=sasIMLStatementKeyword,sasGlobalStatementKeyword
|
||||
syn match sasIMLStatement '\v%(^|;)\s*\zsods>' display contained contains=sasGlobalStatementKeyword nextgroup=sasGlobalStatementODSKeyword skipwhite skipnl skipempty
|
||||
syn region sasIML matchgroup=sasSectionKeyword start='\v%(^|;)\s*\zsproc\s+iml>' end='\v%(^|;)\s*%(quit|data|proc|endsas)>'me=s-1 fold contains=@sasBasicSyntax,sasIMLFunction,sasIMLControl,sasIMLStatement
|
||||
|
||||
" Macro definition
|
||||
syn region sasMacro start='\v\%macro>' end='\v\%mend>' fold keepend contains=@sasBasicSyntax,@sasDataStepSyntax,sasDataStep,sasProc,sasODSGraphicsProc,sasGraphProc,sasAnalyticalProc,sasProcTemplate,sasProcSQL,sasDS2,sasIML
|
||||
|
||||
" Base SAS Procs - version 8.1
|
||||
|
||||
syn keyword sasConditional DO ELSE END IF THEN UNTIL WHILE
|
||||
|
||||
syn keyword sasStatement ABORT ARRAY ATTRIB BY CALL CARDS CARDS4 CATNAME
|
||||
syn keyword sasStatement CONTINUE DATALINES DATALINES4 DELETE DISPLAY
|
||||
syn keyword sasStatement DM DROP ENDSAS ERROR FILE FILENAME FOOTNOTE
|
||||
syn keyword sasStatement FORMAT GOTO INFILE INFORMAT INPUT KEEP
|
||||
syn keyword sasStatement LABEL LEAVE LENGTH LIBNAME LINK LIST LOSTCARD
|
||||
syn keyword sasStatement MERGE MISSING MODIFY OPTIONS OUTPUT PAGE
|
||||
syn keyword sasStatement PUT REDIRECT REMOVE RENAME REPLACE RETAIN
|
||||
syn keyword sasStatement RETURN SELECT SET SKIP STARTSAS STOP TITLE
|
||||
syn keyword sasStatement UPDATE WAITSAS WHERE WINDOW X SYSTASK
|
||||
|
||||
" Keywords that are used in Proc SQL
|
||||
" I left them as statements because SAS's enhanced editor highlights
|
||||
" them the same as normal statements used in data steps (Jim Kidd)
|
||||
|
||||
syn keyword sasStatement ADD AND ALTER AS CASCADE CHECK CREATE
|
||||
syn keyword sasStatement DELETE DESCRIBE DISTINCT DROP FOREIGN
|
||||
syn keyword sasStatement FROM GROUP HAVING INDEX INSERT INTO IN
|
||||
syn keyword sasStatement KEY LIKE MESSAGE MODIFY MSGTYPE NOT
|
||||
syn keyword sasStatement NULL ON OR ORDER PRIMARY REFERENCES
|
||||
syn keyword sasStatement RESET RESTRICT SELECT SET TABLE
|
||||
syn keyword sasStatement UNIQUE UPDATE VALIDATE VIEW WHERE
|
||||
|
||||
" Match declarations have to appear one per line (Paulo Tanimoto)
|
||||
syn match sasStatement "FOOTNOTE\d"
|
||||
syn match sasStatement "TITLE\d"
|
||||
|
||||
" Match declarations have to appear one per line (Paulo Tanimoto)
|
||||
syn match sasMacro "%BQUOTE"
|
||||
syn match sasMacro "%NRBQUOTE"
|
||||
syn match sasMacro "%CMPRES"
|
||||
syn match sasMacro "%QCMPRES"
|
||||
syn match sasMacro "%COMPSTOR"
|
||||
syn match sasMacro "%DATATYP"
|
||||
syn match sasMacro "%DISPLAY"
|
||||
syn match sasMacro "%DO"
|
||||
syn match sasMacro "%ELSE"
|
||||
syn match sasMacro "%END"
|
||||
syn match sasMacro "%EVAL"
|
||||
syn match sasMacro "%GLOBAL"
|
||||
syn match sasMacro "%GOTO"
|
||||
syn match sasMacro "%IF"
|
||||
syn match sasMacro "%INDEX"
|
||||
syn match sasMacro "%INPUT"
|
||||
syn match sasMacro "%KEYDEF"
|
||||
syn match sasMacro "%LABEL"
|
||||
syn match sasMacro "%LEFT"
|
||||
syn match sasMacro "%LENGTH"
|
||||
syn match sasMacro "%LET"
|
||||
syn match sasMacro "%LOCAL"
|
||||
syn match sasMacro "%LOWCASE"
|
||||
syn match sasMacro "%MACRO"
|
||||
syn match sasMacro "%MEND"
|
||||
syn match sasMacro "%NRBQUOTE"
|
||||
syn match sasMacro "%NRQUOTE"
|
||||
syn match sasMacro "%NRSTR"
|
||||
syn match sasMacro "%PUT"
|
||||
syn match sasMacro "%QCMPRES"
|
||||
syn match sasMacro "%QLEFT"
|
||||
syn match sasMacro "%QLOWCASE"
|
||||
syn match sasMacro "%QSCAN"
|
||||
syn match sasMacro "%QSUBSTR"
|
||||
syn match sasMacro "%QSYSFUNC"
|
||||
syn match sasMacro "%QTRIM"
|
||||
syn match sasMacro "%QUOTE"
|
||||
syn match sasMacro "%QUPCASE"
|
||||
syn match sasMacro "%SCAN"
|
||||
syn match sasMacro "%STR"
|
||||
syn match sasMacro "%SUBSTR"
|
||||
syn match sasMacro "%SUPERQ"
|
||||
syn match sasMacro "%SYSCALL"
|
||||
syn match sasMacro "%SYSEVALF"
|
||||
syn match sasMacro "%SYSEXEC"
|
||||
syn match sasMacro "%SYSFUNC"
|
||||
syn match sasMacro "%SYSGET"
|
||||
syn match sasMacro "%SYSLPUT"
|
||||
syn match sasMacro "%SYSPROD"
|
||||
syn match sasMacro "%SYSRC"
|
||||
syn match sasMacro "%SYSRPUT"
|
||||
syn match sasMacro "%THEN"
|
||||
syn match sasMacro "%TO"
|
||||
syn match sasMacro "%TRIM"
|
||||
syn match sasMacro "%UNQUOTE"
|
||||
syn match sasMacro "%UNTIL"
|
||||
syn match sasMacro "%UPCASE"
|
||||
syn match sasMacro "%VERIFY"
|
||||
syn match sasMacro "%WHILE"
|
||||
syn match sasMacro "%WINDOW"
|
||||
|
||||
" SAS Functions
|
||||
|
||||
syn keyword sasFunction ABS ADDR AIRY ARCOS ARSIN ATAN ATTRC ATTRN
|
||||
syn keyword sasFunction BAND BETAINV BLSHIFT BNOT BOR BRSHIFT BXOR
|
||||
syn keyword sasFunction BYTE CDF CEIL CEXIST CINV CLOSE CNONCT COLLATE
|
||||
syn keyword sasFunction COMPBL COMPOUND COMPRESS COS COSH CSS CUROBS
|
||||
syn keyword sasFunction CV DACCDB DACCDBSL DACCSL DACCSYD DACCTAB
|
||||
syn keyword sasFunction DAIRY DATE DATEJUL DATEPART DATETIME DAY
|
||||
syn keyword sasFunction DCLOSE DEPDB DEPDBSL DEPDBSL DEPSL DEPSL
|
||||
syn keyword sasFunction DEPSYD DEPSYD DEPTAB DEPTAB DEQUOTE DHMS
|
||||
syn keyword sasFunction DIF DIGAMMA DIM DINFO DNUM DOPEN DOPTNAME
|
||||
syn keyword sasFunction DOPTNUM DREAD DROPNOTE DSNAME ERF ERFC EXIST
|
||||
syn keyword sasFunction EXP FAPPEND FCLOSE FCOL FDELETE FETCH FETCHOBS
|
||||
syn keyword sasFunction FEXIST FGET FILEEXIST FILENAME FILEREF FINFO
|
||||
syn keyword sasFunction FINV FIPNAME FIPNAMEL FIPSTATE FLOOR FNONCT
|
||||
syn keyword sasFunction FNOTE FOPEN FOPTNAME FOPTNUM FPOINT FPOS
|
||||
syn keyword sasFunction FPUT FREAD FREWIND FRLEN FSEP FUZZ FWRITE
|
||||
syn keyword sasFunction GAMINV GAMMA GETOPTION GETVARC GETVARN HBOUND
|
||||
syn keyword sasFunction HMS HOSTHELP HOUR IBESSEL INDEX INDEXC
|
||||
syn keyword sasFunction INDEXW INPUT INPUTC INPUTN INT INTCK INTNX
|
||||
syn keyword sasFunction INTRR IRR JBESSEL JULDATE KURTOSIS LAG LBOUND
|
||||
syn keyword sasFunction LEFT LENGTH LGAMMA LIBNAME LIBREF LOG LOG10
|
||||
syn keyword sasFunction LOG2 LOGPDF LOGPMF LOGSDF LOWCASE MAX MDY
|
||||
syn keyword sasFunction MEAN MIN MINUTE MOD MONTH MOPEN MORT N
|
||||
syn keyword sasFunction NETPV NMISS NORMAL NOTE NPV OPEN ORDINAL
|
||||
syn keyword sasFunction PATHNAME PDF PEEK PEEKC PMF POINT POISSON POKE
|
||||
syn keyword sasFunction PROBBETA PROBBNML PROBCHI PROBF PROBGAM
|
||||
syn keyword sasFunction PROBHYPR PROBIT PROBNEGB PROBNORM PROBT PUT
|
||||
syn keyword sasFunction PUTC PUTN QTR QUOTE RANBIN RANCAU RANEXP
|
||||
syn keyword sasFunction RANGAM RANGE RANK RANNOR RANPOI RANTBL RANTRI
|
||||
syn keyword sasFunction RANUNI REPEAT RESOLVE REVERSE REWIND RIGHT
|
||||
syn keyword sasFunction ROUND SAVING SCAN SDF SECOND SIGN SIN SINH
|
||||
syn keyword sasFunction SKEWNESS SOUNDEX SPEDIS SQRT STD STDERR STFIPS
|
||||
syn keyword sasFunction STNAME STNAMEL SUBSTR SUM SYMGET SYSGET SYSMSG
|
||||
syn keyword sasFunction SYSPROD SYSRC SYSTEM TAN TANH TIME TIMEPART
|
||||
syn keyword sasFunction TINV TNONCT TODAY TRANSLATE TRANWRD TRIGAMMA
|
||||
syn keyword sasFunction TRIM TRIMN TRUNC UNIFORM UPCASE USS VAR
|
||||
syn keyword sasFunction VARFMT VARINFMT VARLABEL VARLEN VARNAME
|
||||
syn keyword sasFunction VARNUM VARRAY VARRAYX VARTYPE VERIFY VFORMAT
|
||||
syn keyword sasFunction VFORMATD VFORMATDX VFORMATN VFORMATNX VFORMATW
|
||||
syn keyword sasFunction VFORMATWX VFORMATX VINARRAY VINARRAYX VINFORMAT
|
||||
syn keyword sasFunction VINFORMATD VINFORMATDX VINFORMATN VINFORMATNX
|
||||
syn keyword sasFunction VINFORMATW VINFORMATWX VINFORMATX VLABEL
|
||||
syn keyword sasFunction VLABELX VLENGTH VLENGTHX VNAME VNAMEX VTYPE
|
||||
syn keyword sasFunction VTYPEX WEEKDAY YEAR YYQ ZIPFIPS ZIPNAME ZIPNAMEL
|
||||
syn keyword sasFunction ZIPSTATE
|
||||
|
||||
" Handy settings for using vim with log files
|
||||
syn keyword sasLogMsg NOTE
|
||||
syn keyword sasWarnMsg WARNING
|
||||
syn keyword sasErrMsg ERROR
|
||||
|
||||
" Always contained in a comment (Bob Heckel)
|
||||
syn keyword sasTodo TODO TBD FIXME contained
|
||||
|
||||
" These don't fit anywhere else (Bob Heckel).
|
||||
" Added others that were missing.
|
||||
syn keyword sasUnderscore _ALL_ _AUTOMATIC_ _CHARACTER_ _INFILE_ _N_ _NAME_ _NULL_ _NUMERIC_ _USER_ _WEBOUT_
|
||||
|
||||
" End of SAS Functions
|
||||
|
||||
" Define the default highlighting.
|
||||
" Only when an item doesn't have highlighting yet
|
||||
|
||||
|
||||
" Default sas enhanced editor color syntax
|
||||
hi sComment term=bold cterm=NONE ctermfg=Green ctermbg=Black gui=NONE guifg=DarkGreen guibg=White
|
||||
hi sCard term=bold cterm=NONE ctermfg=Black ctermbg=Yellow gui=NONE guifg=Black guibg=LightYellow
|
||||
hi sDate_Time term=NONE cterm=bold ctermfg=Green ctermbg=Black gui=bold guifg=SeaGreen guibg=White
|
||||
hi sKeyword term=NONE cterm=NONE ctermfg=Blue ctermbg=Black gui=NONE guifg=Blue guibg=White
|
||||
hi sFmtInfmt term=NONE cterm=NONE ctermfg=LightGreen ctermbg=Black gui=NONE guifg=SeaGreen guibg=White
|
||||
hi sString term=NONE cterm=NONE ctermfg=Magenta ctermbg=Black gui=NONE guifg=Purple guibg=White
|
||||
hi sText term=NONE cterm=NONE ctermfg=White ctermbg=Black gui=bold guifg=Black guibg=White
|
||||
hi sNumber term=NONE cterm=bold ctermfg=Green ctermbg=Black gui=bold guifg=SeaGreen guibg=White
|
||||
hi sProc term=NONE cterm=bold ctermfg=Blue ctermbg=Black gui=bold guifg=Navy guibg=White
|
||||
hi sSection term=NONE cterm=bold ctermfg=Blue ctermbg=Black gui=bold guifg=Navy guibg=White
|
||||
hi mDefine term=NONE cterm=bold ctermfg=White ctermbg=Black gui=bold guifg=Black guibg=White
|
||||
hi mKeyword term=NONE cterm=NONE ctermfg=Blue ctermbg=Black gui=NONE guifg=Blue guibg=White
|
||||
hi mReference term=NONE cterm=bold ctermfg=White ctermbg=Black gui=bold guifg=Blue guibg=White
|
||||
hi mSection term=NONE cterm=NONE ctermfg=Blue ctermbg=Black gui=bold guifg=Navy guibg=White
|
||||
hi mText term=NONE cterm=NONE ctermfg=White ctermbg=Black gui=bold guifg=Black guibg=White
|
||||
|
||||
" Colors that closely match SAS log colors for default color scheme
|
||||
hi lError term=NONE cterm=NONE ctermfg=Red ctermbg=Black gui=none guifg=Red guibg=White
|
||||
hi lWarning term=NONE cterm=NONE ctermfg=Green ctermbg=Black gui=none guifg=Green guibg=White
|
||||
hi lNote term=NONE cterm=NONE ctermfg=Cyan ctermbg=Black gui=none guifg=Blue guibg=White
|
||||
|
||||
|
||||
" Special hilighting for the SAS proc section
|
||||
|
||||
hi def link sasComment sComment
|
||||
hi def link sasConditional sKeyword
|
||||
hi def link sasStep sSection
|
||||
hi def link sasFunction sKeyword
|
||||
hi def link sasMacro mKeyword
|
||||
hi def link sasMacroVar NonText
|
||||
hi def link sasNumber sNumber
|
||||
hi def link sasStatement sKeyword
|
||||
hi def link sasString sString
|
||||
hi def link sasProc sProc
|
||||
" (Bob Heckel)
|
||||
hi def link sasTodo Todo
|
||||
hi def link sasErrMsg lError
|
||||
hi def link sasWarnMsg lWarning
|
||||
hi def link sasLogMsg lNote
|
||||
hi def link sasCards sCard
|
||||
" (Bob Heckel)
|
||||
hi def link sasUnderscore PreProc
|
||||
" Define default highlighting
|
||||
hi def link sasComment Comment
|
||||
hi def link sasTodo Delimiter
|
||||
hi def link sasSectLbl Title
|
||||
hi def link sasSectLblEnds Comment
|
||||
hi def link sasNumber Number
|
||||
hi def link sasDateTime Constant
|
||||
hi def link sasString String
|
||||
hi def link sasDataStepControl Keyword
|
||||
hi def link sasProcTemplateClause Keyword
|
||||
hi def link sasProcSQLClause Keyword
|
||||
hi def link sasDS2Control Keyword
|
||||
hi def link sasIMLControl Keyword
|
||||
hi def link sasOperator Operator
|
||||
hi def link sasGlobalStatementKeyword Statement
|
||||
hi def link sasGlobalStatementODSKeyword Statement
|
||||
hi def link sasSectionKeyword Statement
|
||||
hi def link sasDataStepFunctionName Function
|
||||
hi def link sasDataStepCallRoutineName Function
|
||||
hi def link sasDataStepStatementKeyword Statement
|
||||
hi def link sasDataStepStatementHashKeyword Statement
|
||||
hi def link sasDataStepHashOperator Operator
|
||||
hi def link sasDataStepHashMethodName Function
|
||||
hi def link sasDataStepHashAttributeName Identifier
|
||||
hi def link sasProcStatementKeyword Statement
|
||||
hi def link sasODSGraphicsProcStatementKeyword Statement
|
||||
hi def link sasGraphProcStatementKeyword Statement
|
||||
hi def link sasAnalyticalProcStatementKeyword Statement
|
||||
hi def link sasProcTemplateStatementKeyword Statement
|
||||
hi def link sasProcTemplateStatementComplexKeyword Statement
|
||||
hi def link sasProcTemplateGTLStatementKeyword Statement
|
||||
hi def link sasProcTemplateGTLComplexKeyword Statement
|
||||
hi def link sasProcSQLFunctionName Function
|
||||
hi def link sasProcSQLStatementKeyword Statement
|
||||
hi def link sasProcSQLStatementComplexKeyword Statement
|
||||
hi def link sasProcSQLStatementNextKeyword Statement
|
||||
hi def link sasDS2FunctionName Function
|
||||
hi def link sasDS2StatementKeyword Statement
|
||||
hi def link sasIMLFunctionName Function
|
||||
hi def link sasIMLCallRoutineName Function
|
||||
hi def link sasIMLStatementKeyword Statement
|
||||
hi def link sasMacroReserved PreProc
|
||||
hi def link sasMacroVariable Define
|
||||
hi def link sasMacroFunctionName Define
|
||||
hi def link sasDataLine SpecialChar
|
||||
hi def link sasFormat SpecialChar
|
||||
hi def link sasReserved Special
|
||||
|
||||
" Syncronize from beginning to keep large blocks from losing
|
||||
" syntax coloring while moving through code.
|
||||
@@ -264,4 +261,5 @@ syn sync fromstart
|
||||
|
||||
let b:current_syntax = "sas"
|
||||
|
||||
" vim: ts=8
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
@@ -1255,7 +1255,7 @@
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>128</string>
|
||||
<string>130</string>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
|
||||
@@ -123,6 +123,7 @@ extern NSTimeInterval MMBalloonEvalInternalDelay;
|
||||
- (void)startBlink;
|
||||
- (void)stopBlink;
|
||||
- (void)adjustLinespace:(int)linespace;
|
||||
- (void)adjustColumnspace:(int)columnspace;
|
||||
- (void)activate;
|
||||
- (void)setPreEditRow:(int)row column:(int)col;
|
||||
|
||||
|
||||
@@ -1095,6 +1095,13 @@ extern GuiFont gui_mch_retain_font(GuiFont font);
|
||||
[self queueMessage:AdjustLinespaceMsgID data:data];
|
||||
}
|
||||
|
||||
- (void)adjustColumnspace:(int)columnspace
|
||||
{
|
||||
NSMutableData *data = [NSMutableData data];
|
||||
[data appendBytes:&columnspace length:sizeof(int)];
|
||||
[self queueMessage:AdjustColumnspaceMsgID data:data];
|
||||
}
|
||||
|
||||
- (void)activate
|
||||
{
|
||||
[self queueMessage:ActivateMsgID data:nil];
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
NSFont *font;
|
||||
NSFont *fontWide;
|
||||
float linespace;
|
||||
float columnspace;
|
||||
|
||||
// From NSTextView
|
||||
NSSize insetSize;
|
||||
|
||||
@@ -311,7 +311,7 @@ defaultAdvanceForFont(NSFont *font)
|
||||
// only render at integer sizes. Hence, we restrict the cell width to
|
||||
// an integer here, otherwise the window width and the actual text
|
||||
// width will not match.
|
||||
cellSize.width = ceil(em * cellWidthMultiplier);
|
||||
cellSize.width = columnspace + ceil(em * cellWidthMultiplier);
|
||||
cellSize.height = linespace + defaultLineHeightForFont(font);
|
||||
|
||||
fontDescent = ceil(CTFontGetDescent(fontRef));
|
||||
@@ -372,6 +372,17 @@ defaultAdvanceForFont(NSFont *font)
|
||||
cellSize.height = linespace + defaultLineHeightForFont(font);
|
||||
}
|
||||
|
||||
- (void)setColumnspace:(float)newColumnspace
|
||||
{
|
||||
columnspace = newColumnspace;
|
||||
|
||||
double em = round(defaultAdvanceForFont(font));
|
||||
float cellWidthMultiplier = [[NSUserDefaults standardUserDefaults]
|
||||
floatForKey:MMCellWidthMultiplierKey];
|
||||
|
||||
cellSize.width = columnspace + ceil(em * cellWidthMultiplier);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ typedef struct {
|
||||
NSColor *defaultForegroundColor;
|
||||
NSSize cellSize;
|
||||
float linespace;
|
||||
float columnspace;
|
||||
#if MM_USE_ROW_CACHE
|
||||
MMRowCacheEntry *rowCache;
|
||||
#endif
|
||||
@@ -59,7 +60,9 @@ typedef struct {
|
||||
- (int)actualRows;
|
||||
- (int)actualColumns;
|
||||
- (float)linespace;
|
||||
- (float)columnspace;
|
||||
- (void)setLinespace:(float)newLinespace;
|
||||
- (void)setColumnspace:(float)newColumnspace;
|
||||
- (void)getMaxRows:(int*)rows columns:(int*)cols;
|
||||
- (void)setMaxRows:(int)rows columns:(int)cols;
|
||||
- (void)drawString:(NSString *)string atRow:(int)row column:(int)col
|
||||
|
||||
@@ -202,6 +202,11 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
return linespace;
|
||||
}
|
||||
|
||||
- (float)columnspace
|
||||
{
|
||||
return columnspace;
|
||||
}
|
||||
|
||||
- (void)setLinespace:(float)newLinespace
|
||||
{
|
||||
NSLayoutManager *lm = [[self layoutManagers] objectAtIndex:0];
|
||||
@@ -221,6 +226,25 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
cellSize.height = linespace + [lm defaultLineHeightForFont:font];
|
||||
}
|
||||
|
||||
- (void)setColumnspace:(float)newColumnspace
|
||||
{
|
||||
NSLayoutManager *lm = [[self layoutManagers] objectAtIndex:0];
|
||||
if (!lm) {
|
||||
ASLogWarn(@"No layout manager available");
|
||||
return;
|
||||
}
|
||||
|
||||
columnspace = newColumnspace;
|
||||
|
||||
float em = [@"m" sizeWithAttributes:
|
||||
[NSDictionary dictionaryWithObject:font
|
||||
forKey:NSFontAttributeName]].width;
|
||||
float cellWidthMultiplier = [[NSUserDefaults standardUserDefaults]
|
||||
floatForKey:MMCellWidthMultiplierKey];
|
||||
|
||||
cellSize.width = columnspace + ceilf(em * cellWidthMultiplier);
|
||||
}
|
||||
|
||||
- (void)getMaxRows:(int*)rows columns:(int*)cols
|
||||
{
|
||||
if (rows) *rows = maxRows;
|
||||
@@ -662,6 +686,7 @@ static NSString *MMWideCharacterAttributeName = @"MMWideChar";
|
||||
NSLayoutManager *lm = [[self layoutManagers] objectAtIndex:0];
|
||||
if (lm) {
|
||||
cellSize.height = linespace + [lm defaultLineHeightForFont:font];
|
||||
cellSize.width = columnspace + ceilf(em * cellWidthMultiplier);
|
||||
} else {
|
||||
// Should never happen, set some bogus value for cell height.
|
||||
ASLogWarn(@"No layout manager available");
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
- (void)setWideFont:(NSFont *)newFont;
|
||||
- (NSSize)cellSize;
|
||||
- (void)setLinespace:(float)newLinespace;
|
||||
- (void)setColumnspace:(float)newColumnspace;
|
||||
- (int)maxRows;
|
||||
- (int)maxColumns;
|
||||
- (void)getMaxRows:(int*)rows columns:(int*)cols;
|
||||
|
||||
@@ -362,6 +362,11 @@
|
||||
return [(MMTextStorage*)[self textStorage] setLinespace:newLinespace];
|
||||
}
|
||||
|
||||
- (void)setColumnspace:(float)newColumnspace
|
||||
{
|
||||
return [(MMTextStorage*)[self textStorage] setColumnspace:newColumnspace];
|
||||
}
|
||||
|
||||
- (int)maxRows
|
||||
{
|
||||
MMTextStorage *ts = (MMTextStorage *)[self textStorage];
|
||||
|
||||
@@ -762,6 +762,11 @@ static BOOL isUnsafeMessage(int msgid);
|
||||
int linespace = *((int*)bytes);
|
||||
|
||||
[windowController adjustLinespace:linespace];
|
||||
} else if (AdjustColumnspaceMsgID == msgid) {
|
||||
const void *bytes = [data bytes];
|
||||
int columnspace = *((int*)bytes);
|
||||
|
||||
[windowController adjustColumnspace:columnspace];
|
||||
} else if (ActivateMsgID == msgid) {
|
||||
[NSApp activateIgnoringOtherApps:YES];
|
||||
[[windowController window] makeKeyAndOrderFront:self];
|
||||
|
||||
@@ -77,6 +77,7 @@
|
||||
- (void)showToolbar:(BOOL)on size:(int)size mode:(int)mode;
|
||||
- (void)setMouseShape:(int)shape;
|
||||
- (void)adjustLinespace:(int)linespace;
|
||||
- (void)adjustColumnspace:(int)columnspace;
|
||||
- (void)liveResizeWillStart;
|
||||
- (void)liveResizeDidEnd;
|
||||
|
||||
|
||||
@@ -660,6 +660,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (void)adjustColumnspace:(int)columnspace
|
||||
{
|
||||
if (vimView && [vimView textView]) {
|
||||
[[vimView textView] setColumnspace:(float)columnspace];
|
||||
shouldMaximizeWindow = shouldResizeVimView = YES;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)liveResizeWillStart
|
||||
{
|
||||
if (!setupDone) return;
|
||||
|
||||
@@ -210,6 +210,7 @@ enum {
|
||||
MouseMovedMsgID,
|
||||
SetMouseShapeMsgID,
|
||||
AdjustLinespaceMsgID,
|
||||
AdjustColumnspaceMsgID,
|
||||
ActivateMsgID,
|
||||
SetServerNameMsgID,
|
||||
EnterFullScreenMsgID,
|
||||
|
||||
@@ -64,6 +64,7 @@ char *MessageStrings[] =
|
||||
"MouseMovedMsgID",
|
||||
"SetMouseShapeMsgID",
|
||||
"AdjustLinespaceMsgID",
|
||||
"AdjustColumnspaceMsgID",
|
||||
"ActivateMsgID",
|
||||
"SetServerNameMsgID",
|
||||
"EnterFullScreenMsgID",
|
||||
|
||||
@@ -252,6 +252,7 @@ gui_mch_init(void)
|
||||
// Ensure 'linespace' option is passed along to MacVim in case it was set
|
||||
// in [g]vimrc.
|
||||
gui_mch_adjust_charheight();
|
||||
gui_mch_adjust_charwidth();
|
||||
|
||||
if (!MMNoMRU && GARGCOUNT > 0) {
|
||||
// Add files passed on command line to MRU.
|
||||
@@ -1405,6 +1406,17 @@ gui_mch_adjust_charheight(void)
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Adjust gui.char_width (after 'columnspace' was changed).
|
||||
*/
|
||||
int
|
||||
gui_mch_adjust_charwidth(void)
|
||||
{
|
||||
[[MMBackend sharedInstance] adjustColumnspace:p_columnspace];
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
gui_mch_beep(void)
|
||||
{
|
||||
|
||||
@@ -1901,6 +1901,16 @@ autoconf:
|
||||
-rm -rf autom4te.cache
|
||||
-rm -f auto/config.status auto/config.cache
|
||||
|
||||
# Run Perl to generate the Ex command lookup table. This only needs to be run
|
||||
# when a command name has been added or changed.
|
||||
# NOTE: Only works when perl and vim executables are available
|
||||
cmdidxs: ex_cmds.h
|
||||
if test X`perl -e "print 123"` = "X123"; then \
|
||||
vim ex_docmd.c -c '/Beginning.*create_cmdidxs/,/End.*create_cmdidxs/! perl create_cmdidxs.pl' -c wq; \
|
||||
else \
|
||||
echo Cannot run Perl; \
|
||||
fi
|
||||
|
||||
# Re-execute this Makefile to include the new auto/config.mk produced by
|
||||
# configure Only used when typing "make" with a fresh auto/config.mk.
|
||||
myself:
|
||||
@@ -2152,6 +2162,7 @@ test_arglist \
|
||||
test_ga \
|
||||
test_gf \
|
||||
test_glob2regpat \
|
||||
test_global \
|
||||
test_gn \
|
||||
test_goto \
|
||||
test_gui \
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
#!/usr/bin/perl -w
|
||||
#
|
||||
# This script generates the tables cmdidxs1[] and cmdidxs2[][] which,
|
||||
# given a Ex command, determine the first value to probe to find
|
||||
# a matching command in cmdnames[] based on the first character
|
||||
# and the first 2 characters of the command.
|
||||
# This is used to speed up lookup in cmdnames[].
|
||||
#
|
||||
# Script should be run every time new Ex commands are added in Vim,
|
||||
# from the src/vim directory, since it reads commands from "ex_cmds.h".
|
||||
|
||||
use strict;
|
||||
|
||||
# Find the list of Vim commands from cmdnames[] table in ex_cmds.h
|
||||
my @cmds;
|
||||
my $skipped_cmds;
|
||||
open(IN, "< ex_cmds.h") or die "can't open ex_cmds.h: $!\n";
|
||||
while (<IN>) {
|
||||
if (/^EX\(CMD_\S*,\s*"([a-z][^"]*)"/) {
|
||||
push @cmds, $1;
|
||||
} elsif (/^EX\(CMD_/) {
|
||||
++$skipped_cmds;
|
||||
}
|
||||
}
|
||||
|
||||
my %cmdidxs1;
|
||||
my %cmdidxs2;
|
||||
|
||||
for (my $i = $#cmds; $i >= 0; --$i) {
|
||||
my $cmd = $cmds[$i];
|
||||
my $c1 = substr($cmd, 0, 1); # First character of command.
|
||||
|
||||
$cmdidxs1{$c1} = $i;
|
||||
|
||||
if (length($cmd) > 1) {
|
||||
my $c2 = substr($cmd, 1, 1); # Second character of command.
|
||||
$cmdidxs2{$c1}{$c2} = $i if (('a' lt $c2) and ($c2 lt 'z'));
|
||||
}
|
||||
}
|
||||
|
||||
print "/* Beginning of automatically generated code by create_cmdidxs.pl\n",
|
||||
" *\n",
|
||||
" * Table giving the index of the first command in cmdnames[] to lookup\n",
|
||||
" * based on the first letter of a command.\n",
|
||||
" */\n",
|
||||
"static const unsigned short cmdidxs1[26] =\n{\n",
|
||||
join(",\n", map(" /* $_ */ $cmdidxs1{$_}", ('a' .. 'z'))),
|
||||
"\n};\n",
|
||||
"\n",
|
||||
"/*\n",
|
||||
" * Table giving the index of the first command in cmdnames[] to lookup\n",
|
||||
" * based on the first 2 letters of a command.\n",
|
||||
" * Values in cmdidxs2[c1][c2] are relative to cmdidxs1[c1] so that they\n",
|
||||
" * fit in a byte.\n",
|
||||
" */\n",
|
||||
"static const unsigned char cmdidxs2[26][26] =\n",
|
||||
"{ /* a b c d e f g h i j k l m n o p q r s t u v w x y z */\n";
|
||||
for my $c1 ('a' .. 'z') {
|
||||
print " /* $c1 */ {";
|
||||
for my $c2 ('a' .. 'z') {
|
||||
if (exists $cmdidxs2{$c1}{$c2}) {
|
||||
printf "%3d,", $cmdidxs2{$c1}{$c2} - $cmdidxs1{$c1};
|
||||
} else {
|
||||
printf " 0,";
|
||||
}
|
||||
}
|
||||
print " }";
|
||||
print "," unless ($c1 eq 'z');
|
||||
print "\n";
|
||||
}
|
||||
print "};\n",
|
||||
"\n",
|
||||
"static const int command_count = ", scalar(@cmds) + $skipped_cmds, ";\n",
|
||||
"\n",
|
||||
"/* End of automatically generated code by create_cmdidxs.pl */\n";
|
||||
+3
-2
@@ -10065,7 +10065,8 @@ set_qf_ll_list(
|
||||
act = get_tv_string_chk(action_arg);
|
||||
if (act == NULL)
|
||||
return; /* type error; errmsg already given */
|
||||
if ((*act == 'a' || *act == 'r' || *act == ' ') && act[1] == NUL)
|
||||
if ((*act == 'a' || *act == 'r' || *act == ' ' || *act == 'f') &&
|
||||
act[1] == NUL)
|
||||
action = *act;
|
||||
else
|
||||
EMSG2(_(e_invact), act);
|
||||
@@ -11773,7 +11774,7 @@ f_synIDattr(typval_T *argvars UNUSED, typval_T *rettv)
|
||||
break;
|
||||
|
||||
case 'n': /* name */
|
||||
p = get_highlight_name(NULL, id - 1);
|
||||
p = get_highlight_name_ext(NULL, id - 1, FALSE);
|
||||
break;
|
||||
|
||||
case 'r': /* reverse */
|
||||
|
||||
+2
-2
@@ -7962,7 +7962,7 @@ sign_list_defined(sign_T *sp)
|
||||
if (sp->sn_line_hl > 0)
|
||||
{
|
||||
MSG_PUTS(" linehl=");
|
||||
p = get_highlight_name(NULL, sp->sn_line_hl - 1);
|
||||
p = get_highlight_name_ext(NULL, sp->sn_line_hl - 1, FALSE);
|
||||
if (p == NULL)
|
||||
MSG_PUTS("NONE");
|
||||
else
|
||||
@@ -7971,7 +7971,7 @@ sign_list_defined(sign_T *sp)
|
||||
if (sp->sn_text_hl > 0)
|
||||
{
|
||||
MSG_PUTS(" texthl=");
|
||||
p = get_highlight_name(NULL, sp->sn_text_hl - 1);
|
||||
p = get_highlight_name_ext(NULL, sp->sn_text_hl - 1, FALSE);
|
||||
if (p == NULL)
|
||||
MSG_PUTS("NONE");
|
||||
else
|
||||
|
||||
+90
-34
@@ -502,40 +502,81 @@ static void ex_folddo(exarg_T *eap);
|
||||
#define DO_DECLARE_EXCMD
|
||||
#include "ex_cmds.h"
|
||||
|
||||
/*
|
||||
* Table used to quickly search for a command, based on its first character.
|
||||
/* Beginning of automatically generated code by create_cmdidxs.pl
|
||||
*
|
||||
* Table giving the index of the first command in cmdnames[] to lookup
|
||||
* based on the first letter of a command.
|
||||
*/
|
||||
static cmdidx_T cmdidxs[27] =
|
||||
static const unsigned short cmdidxs1[26] =
|
||||
{
|
||||
CMD_append,
|
||||
CMD_buffer,
|
||||
CMD_change,
|
||||
CMD_delete,
|
||||
CMD_edit,
|
||||
CMD_file,
|
||||
CMD_global,
|
||||
CMD_help,
|
||||
CMD_insert,
|
||||
CMD_join,
|
||||
CMD_k,
|
||||
CMD_list,
|
||||
CMD_move,
|
||||
CMD_next,
|
||||
CMD_open,
|
||||
CMD_print,
|
||||
CMD_quit,
|
||||
CMD_read,
|
||||
CMD_substitute,
|
||||
CMD_t,
|
||||
CMD_undo,
|
||||
CMD_vglobal,
|
||||
CMD_write,
|
||||
CMD_xit,
|
||||
CMD_yank,
|
||||
CMD_z,
|
||||
CMD_bang
|
||||
/* a */ 0,
|
||||
/* b */ 19,
|
||||
/* c */ 42,
|
||||
/* d */ 103,
|
||||
/* e */ 125,
|
||||
/* f */ 145,
|
||||
/* g */ 161,
|
||||
/* h */ 167,
|
||||
/* i */ 176,
|
||||
/* j */ 194,
|
||||
/* k */ 196,
|
||||
/* l */ 201,
|
||||
/* m */ 259,
|
||||
/* n */ 279,
|
||||
/* o */ 299,
|
||||
/* p */ 311,
|
||||
/* q */ 350,
|
||||
/* r */ 353,
|
||||
/* s */ 372,
|
||||
/* t */ 439,
|
||||
/* u */ 474,
|
||||
/* v */ 485,
|
||||
/* w */ 503,
|
||||
/* x */ 518,
|
||||
/* y */ 527,
|
||||
/* z */ 528
|
||||
};
|
||||
|
||||
/*
|
||||
* Table giving the index of the first command in cmdnames[] to lookup
|
||||
* based on the first 2 letters of a command.
|
||||
* Values in cmdidxs2[c1][c2] are relative to cmdidxs1[c1] so that they
|
||||
* fit in a byte.
|
||||
*/
|
||||
static const unsigned char cmdidxs2[26][26] =
|
||||
{ /* a b c d e f g h i j k l m n o p q r s t u v w x y z */
|
||||
/* a */ { 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 5, 6, 0, 0, 0, 7, 15, 0, 16, 0, 0, 0, 0, 0, },
|
||||
/* b */ { 0, 0, 0, 4, 5, 7, 0, 0, 0, 0, 0, 8, 9, 10, 11, 12, 0, 13, 0, 0, 0, 0, 22, 0, 0, 0, },
|
||||
/* c */ { 0, 10, 12, 14, 16, 18, 21, 0, 0, 0, 0, 29, 33, 36, 42, 51, 53, 54, 55, 0, 57, 0, 60, 0, 0, 0, },
|
||||
/* d */ { 0, 0, 0, 0, 0, 0, 0, 0, 6, 15, 0, 16, 0, 0, 17, 0, 0, 19, 20, 0, 0, 0, 0, 0, 0, 0, },
|
||||
/* e */ { 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 7, 9, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, },
|
||||
/* f */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, },
|
||||
/* g */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 4, 5, 0, 0, 0, 0, },
|
||||
/* h */ { 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, },
|
||||
/* i */ { 0, 0, 0, 0, 0, 3, 0, 0, 0, 4, 0, 5, 6, 0, 0, 0, 0, 0, 13, 0, 15, 0, 0, 0, 0, 0, },
|
||||
/* j */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, },
|
||||
/* k */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, },
|
||||
/* l */ { 0, 9, 11, 15, 16, 20, 23, 28, 0, 0, 0, 30, 33, 36, 40, 46, 0, 48, 57, 49, 50, 54, 56, 0, 0, 0, },
|
||||
/* m */ { 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, },
|
||||
/* n */ { 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 8, 10, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, },
|
||||
/* o */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 5, 0, 0, 0, 0, 0, 0, 9, 0, 11, 0, 0, 0, },
|
||||
/* p */ { 0, 0, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 9, 0, 0, 16, 17, 26, 0, 27, 0, 28, 0, },
|
||||
/* q */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, },
|
||||
/* r */ { 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 18, 0, 0, 0, 0, },
|
||||
/* s */ { 0, 6, 15, 0, 18, 22, 0, 24, 25, 0, 0, 28, 30, 34, 38, 40, 0, 48, 0, 49, 0, 61, 62, 0, 63, 0, },
|
||||
/* t */ { 0, 0, 19, 0, 22, 23, 0, 24, 0, 25, 0, 26, 27, 28, 29, 30, 0, 31, 33, 0, 34, 0, 0, 0, 0, 0, },
|
||||
/* u */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, },
|
||||
/* v */ { 0, 0, 0, 0, 1, 0, 0, 0, 4, 0, 0, 0, 9, 12, 0, 0, 0, 0, 15, 0, 16, 0, 0, 0, 0, 0, },
|
||||
/* w */ { 0, 0, 0, 0, 0, 0, 0, 3, 4, 0, 0, 0, 0, 8, 0, 9, 10, 0, 12, 0, 13, 14, 0, 0, 0, 0, },
|
||||
/* x */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 5, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, },
|
||||
/* y */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, },
|
||||
/* z */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }
|
||||
};
|
||||
|
||||
static const int command_count = 541;
|
||||
|
||||
/* End of automatically generated code by create_cmdidxs.pl */
|
||||
|
||||
static char_u dollar_command[2] = {'$', 0};
|
||||
|
||||
|
||||
@@ -621,7 +662,6 @@ restore_dbg_stuff(struct dbg_stuff *dsp)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* do_exmode(): Repeatedly get commands for the "Ex" mode, until the ":vi"
|
||||
* command is given.
|
||||
@@ -3215,10 +3255,25 @@ find_command(exarg_T *eap, int *full UNUSED)
|
||||
}
|
||||
}
|
||||
|
||||
if (ASCII_ISLOWER(*eap->cmd))
|
||||
eap->cmdidx = cmdidxs[CharOrdLow(*eap->cmd)];
|
||||
if (ASCII_ISLOWER(eap->cmd[0]))
|
||||
{
|
||||
int c1 = eap->cmd[0];
|
||||
int c2 = eap->cmd[1];
|
||||
|
||||
if (command_count != (int)CMD_SIZE)
|
||||
{
|
||||
iemsg((char_u *)_("E943: Command table needs to be updated, run 'make cmdidxs'"));
|
||||
getout(1);
|
||||
}
|
||||
|
||||
/* Use a precomputed index for fast look-up in cmdnames[]
|
||||
* taking into account the first 2 letters of eap->cmd. */
|
||||
eap->cmdidx = cmdidxs1[CharOrdLow(c1)];
|
||||
if (ASCII_ISLOWER(c2))
|
||||
eap->cmdidx += cmdidxs2[CharOrdLow(c1)][CharOrdLow(c2)];
|
||||
}
|
||||
else
|
||||
eap->cmdidx = cmdidxs[26];
|
||||
eap->cmdidx = CMD_bang;
|
||||
|
||||
for ( ; (int)eap->cmdidx < (int)CMD_SIZE;
|
||||
eap->cmdidx = (cmdidx_T)((int)eap->cmdidx + 1))
|
||||
@@ -10333,6 +10388,7 @@ ex_normal(exarg_T *eap)
|
||||
{
|
||||
curwin->w_cursor.lnum = eap->line1++;
|
||||
curwin->w_cursor.col = 0;
|
||||
check_cursor_moved(curwin);
|
||||
}
|
||||
|
||||
exec_normal_cmd(
|
||||
|
||||
+1
-1
@@ -2755,7 +2755,7 @@ foldUpdateIEMSRecurse(
|
||||
/* End of fold found, update the length when it got shorter. */
|
||||
if (fp->fd_len != flp->lnum - fp->fd_top)
|
||||
{
|
||||
if (fp->fd_top + fp->fd_len > bot + 1)
|
||||
if (fp->fd_top + fp->fd_len - 1 > bot)
|
||||
{
|
||||
/* fold continued below bot */
|
||||
if (getlevel == foldlevelMarker
|
||||
|
||||
+2
-3
@@ -532,7 +532,6 @@ EXTERN int clip_autoselect_plus INIT(= FALSE);
|
||||
EXTERN int clip_autoselectml INIT(= FALSE);
|
||||
EXTERN int clip_html INIT(= FALSE);
|
||||
EXTERN regprog_T *clip_exclude_prog INIT(= NULL);
|
||||
EXTERN int clip_did_set_selection INIT(= TRUE);
|
||||
EXTERN int clip_unnamed_saved INIT(= 0);
|
||||
#endif
|
||||
|
||||
@@ -934,10 +933,10 @@ EXTERN int State INIT(= NORMAL); /* This is the current state of the
|
||||
* command interpreter. */
|
||||
|
||||
EXTERN int finish_op INIT(= FALSE);/* TRUE while an operator is pending */
|
||||
EXTERN int opcount INIT(= 0); /* count for pending operator */
|
||||
EXTERN long opcount INIT(= 0); /* count for pending operator */
|
||||
|
||||
/*
|
||||
* ex mode (Q) state
|
||||
* Ex mode (Q) state
|
||||
*/
|
||||
EXTERN int exmode_active INIT(= 0); /* zero, EXMODE_NORMAL or EXMODE_VIM */
|
||||
EXTERN int ex_no_reprint INIT(= FALSE); /* no need to print after z or p */
|
||||
|
||||
+4
-153
@@ -92,14 +92,6 @@ static void gtk_form_position_child(GtkForm *form,
|
||||
gboolean force_allocate);
|
||||
static void gtk_form_position_children(GtkForm *form);
|
||||
|
||||
#if !GTK_CHECK_VERSION(3,0,0)
|
||||
static GdkFilterReturn gtk_form_filter(GdkXEvent *gdk_xevent,
|
||||
GdkEvent *event,
|
||||
gpointer data);
|
||||
static GdkFilterReturn gtk_form_main_filter(GdkXEvent *gdk_xevent,
|
||||
GdkEvent *event,
|
||||
gpointer data);
|
||||
#endif
|
||||
#if !GTK_CHECK_VERSION(3,16,0)
|
||||
static void gtk_form_set_static_gravity(GdkWindow *window,
|
||||
gboolean use_static);
|
||||
@@ -171,9 +163,6 @@ gtk_form_put(GtkForm *form,
|
||||
gtk_form_attach_child_window(form, child);
|
||||
|
||||
gtk_widget_set_parent(child_widget, GTK_WIDGET(form));
|
||||
#if !GTK_CHECK_VERSION(3,0,0)
|
||||
gtk_widget_size_request(child->widget, NULL);
|
||||
#endif
|
||||
|
||||
#if GTK_CHECK_VERSION(3,0,0)
|
||||
if (gtk_widget_get_realized(GTK_WIDGET(form))
|
||||
@@ -301,19 +290,7 @@ gtk_form_init(GtkForm *form)
|
||||
gtk_widget_set_has_window(GTK_WIDGET(form), TRUE);
|
||||
#endif
|
||||
form->children = NULL;
|
||||
|
||||
#if !GTK_CHECK_VERSION(3,0,0)
|
||||
form->width = 1;
|
||||
form->height = 1;
|
||||
#endif
|
||||
|
||||
form->bin_window = NULL;
|
||||
|
||||
#if !GTK_CHECK_VERSION(3,0,0)
|
||||
form->configure_serial = 0;
|
||||
form->visibility = GDK_VISIBILITY_PARTIAL;
|
||||
#endif
|
||||
|
||||
form->freeze_count = 0;
|
||||
}
|
||||
|
||||
@@ -414,11 +391,6 @@ gtk_form_realize(GtkWidget *widget)
|
||||
gtk_style_set_background(widget->style, form->bin_window, GTK_STATE_NORMAL);
|
||||
#endif
|
||||
|
||||
#if !GTK_CHECK_VERSION(3,0,0)
|
||||
gdk_window_add_filter(widget->window, gtk_form_main_filter, form);
|
||||
gdk_window_add_filter(form->bin_window, gtk_form_filter, form);
|
||||
#endif
|
||||
|
||||
for (tmp_list = form->children; tmp_list; tmp_list = tmp_list->next)
|
||||
{
|
||||
GtkFormChild *child = tmp_list->data;
|
||||
@@ -540,33 +512,11 @@ gtk_form_unrealize(GtkWidget *widget)
|
||||
static void
|
||||
gtk_form_size_request(GtkWidget *widget, GtkRequisition *requisition)
|
||||
{
|
||||
#if !GTK_CHECK_VERSION(3,0,0)
|
||||
GList *tmp_list;
|
||||
GtkForm *form;
|
||||
#endif
|
||||
|
||||
g_return_if_fail(GTK_IS_FORM(widget));
|
||||
g_return_if_fail(requisition != NULL);
|
||||
|
||||
#if !GTK_CHECK_VERSION(3,0,0)
|
||||
form = GTK_FORM(widget);
|
||||
#endif
|
||||
|
||||
#if GTK_CHECK_VERSION(3,0,0)
|
||||
requisition->width = 1;
|
||||
requisition->height = 1;
|
||||
#else
|
||||
requisition->width = form->width;
|
||||
requisition->height = form->height;
|
||||
|
||||
tmp_list = form->children;
|
||||
|
||||
while (tmp_list)
|
||||
{
|
||||
GtkFormChild *child = tmp_list->data;
|
||||
gtk_widget_size_request(child->widget, NULL);
|
||||
tmp_list = tmp_list->next;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if GTK_CHECK_VERSION(3,0,0)
|
||||
@@ -735,28 +685,9 @@ gtk_form_expose(GtkWidget *widget, GdkEventExpose *event)
|
||||
return FALSE;
|
||||
|
||||
for (tmp_list = form->children; tmp_list; tmp_list = tmp_list->next)
|
||||
{
|
||||
GtkFormChild *formchild = tmp_list->data;
|
||||
GtkWidget *child = formchild->widget;
|
||||
/*
|
||||
* The following chunk of code is taken from gtkcontainer.c. The
|
||||
* gtk1.x code synthesized expose events directly on the child widgets,
|
||||
* which can't be done in gtk2
|
||||
*/
|
||||
if (GTK_WIDGET_DRAWABLE(child) && GTK_WIDGET_NO_WINDOW(child)
|
||||
&& child->window == event->window)
|
||||
{
|
||||
GdkEventExpose child_event;
|
||||
child_event = *event;
|
||||
|
||||
child_event.region = gtk_widget_region_intersect(child, event->region);
|
||||
if (!gdk_region_empty(child_event.region))
|
||||
{
|
||||
gdk_region_get_clipbox(child_event.region, &child_event.area);
|
||||
gtk_widget_send_expose(child, (GdkEvent *)&child_event);
|
||||
}
|
||||
}
|
||||
}
|
||||
gtk_container_propagate_expose(GTK_CONTAINER(widget),
|
||||
GTK_WIDGET(((GtkFormChild *)tmp_list->data)->widget),
|
||||
event);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@@ -1068,86 +999,6 @@ gtk_form_position_children(GtkForm *form)
|
||||
gtk_form_position_child(form, tmp_list->data, FALSE);
|
||||
}
|
||||
|
||||
/* Callbacks */
|
||||
|
||||
/* The main event filter. Actually, we probably don't really need
|
||||
* to install this as a filter at all, since we are calling it
|
||||
* directly above in the expose-handling hack.
|
||||
*
|
||||
* This routine identifies expose events that are generated when
|
||||
* we've temporarily moved the bin_window_origin, and translates
|
||||
* them or discards them, depending on whether we are obscured
|
||||
* or not.
|
||||
*/
|
||||
#if !GTK_CHECK_VERSION(3,0,0)
|
||||
static GdkFilterReturn
|
||||
gtk_form_filter(GdkXEvent *gdk_xevent, GdkEvent *event UNUSED, gpointer data)
|
||||
{
|
||||
XEvent *xevent;
|
||||
GtkForm *form;
|
||||
|
||||
xevent = (XEvent *) gdk_xevent;
|
||||
form = GTK_FORM(data);
|
||||
|
||||
switch (xevent->type)
|
||||
{
|
||||
case Expose:
|
||||
if (xevent->xexpose.serial == form->configure_serial)
|
||||
{
|
||||
if (form->visibility == GDK_VISIBILITY_UNOBSCURED)
|
||||
return GDK_FILTER_REMOVE;
|
||||
else
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case ConfigureNotify:
|
||||
if ((xevent->xconfigure.x != 0) || (xevent->xconfigure.y != 0))
|
||||
form->configure_serial = xevent->xconfigure.serial;
|
||||
break;
|
||||
}
|
||||
|
||||
return GDK_FILTER_CONTINUE;
|
||||
}
|
||||
|
||||
/* Although GDK does have a GDK_VISIBILITY_NOTIFY event,
|
||||
* there is no corresponding event in GTK, so we have
|
||||
* to get the events from a filter
|
||||
*/
|
||||
static GdkFilterReturn
|
||||
gtk_form_main_filter(GdkXEvent *gdk_xevent,
|
||||
GdkEvent *event UNUSED,
|
||||
gpointer data)
|
||||
{
|
||||
XEvent *xevent;
|
||||
GtkForm *form;
|
||||
|
||||
xevent = (XEvent *) gdk_xevent;
|
||||
form = GTK_FORM(data);
|
||||
|
||||
if (xevent->type == VisibilityNotify)
|
||||
{
|
||||
switch (xevent->xvisibility.state)
|
||||
{
|
||||
case VisibilityFullyObscured:
|
||||
form->visibility = GDK_VISIBILITY_FULLY_OBSCURED;
|
||||
break;
|
||||
|
||||
case VisibilityPartiallyObscured:
|
||||
form->visibility = GDK_VISIBILITY_PARTIAL;
|
||||
break;
|
||||
|
||||
case VisibilityUnobscured:
|
||||
form->visibility = GDK_VISIBILITY_UNOBSCURED;
|
||||
break;
|
||||
}
|
||||
|
||||
return GDK_FILTER_REMOVE;
|
||||
}
|
||||
return GDK_FILTER_CONTINUE;
|
||||
}
|
||||
#endif /* !GTK_CHECK_VERSION(3,0,0) */
|
||||
|
||||
#if !GTK_CHECK_VERSION(3,16,0)
|
||||
static void
|
||||
gtk_form_set_static_gravity(GdkWindow *window, gboolean use_static)
|
||||
|
||||
@@ -43,19 +43,7 @@ struct _GtkForm
|
||||
GtkContainer container;
|
||||
|
||||
GList *children;
|
||||
|
||||
#ifndef USE_GTK3
|
||||
guint width;
|
||||
guint height;
|
||||
#endif
|
||||
|
||||
GdkWindow *bin_window;
|
||||
|
||||
#ifndef USE_GTK3
|
||||
GdkVisibilityState visibility;
|
||||
gulong configure_serial;
|
||||
#endif
|
||||
|
||||
gint freeze_count;
|
||||
};
|
||||
|
||||
|
||||
+11
-1
@@ -3509,7 +3509,7 @@ gui_mch_init_font(char_u *font_name, int fontset)
|
||||
GetFontInfo(&font_info);
|
||||
|
||||
gui.char_ascent = font_info.ascent;
|
||||
gui.char_width = CharWidth('_');
|
||||
gui.char_width = p_columnspace + CharWidth('_');
|
||||
gui.char_height = font_info.ascent + font_info.descent + p_linespace;
|
||||
|
||||
#ifdef USE_ATSUI_DRAWING
|
||||
@@ -3534,6 +3534,16 @@ gui_mch_adjust_charheight(void)
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Adjust gui.char_width (after 'columnspace' was changed).
|
||||
*/
|
||||
int
|
||||
gui_mch_adjust_charwidth(void)
|
||||
{
|
||||
gui.char_width = p_columnspace + CharWidth('_');
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Get a font structure for highlighting.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -315,7 +315,7 @@ trunc_string(
|
||||
for (;;)
|
||||
{
|
||||
do
|
||||
half = half - (*mb_head_off)(s, s + half - 1) - 1;
|
||||
half = half - utf_head_off(s, s + half - 1) - 1;
|
||||
while (half > 0 && utf_iscomposing(utf_ptr2char(s + half)));
|
||||
n = ptr2cells(s + half);
|
||||
if (len + n > room || half == 0)
|
||||
|
||||
+1
-1
@@ -1874,7 +1874,7 @@ vim_strchr(char_u *string, int c)
|
||||
{
|
||||
while (*p != NUL)
|
||||
{
|
||||
int l = (*mb_ptr2len)(p);
|
||||
int l = utfc_ptr2len(p);
|
||||
|
||||
/* Avoid matching an illegal byte here. */
|
||||
if (utf_ptr2char(p) == c && l > 1)
|
||||
|
||||
+4
-5
@@ -203,11 +203,9 @@ update_topline(void)
|
||||
int save_so = p_so;
|
||||
#endif
|
||||
|
||||
if (!screen_valid(TRUE))
|
||||
return;
|
||||
|
||||
/* If the window height is zero just use the cursor line. */
|
||||
if (curwin->w_height == 0)
|
||||
/* If there is no valid screen and when the window height is zero just use
|
||||
* the cursor line. */
|
||||
if (!screen_valid(TRUE) || curwin->w_height == 0)
|
||||
{
|
||||
curwin->w_topline = curwin->w_cursor.lnum;
|
||||
curwin->w_botline = curwin->w_topline;
|
||||
@@ -2621,6 +2619,7 @@ halfpage(int flag, linenr_T Prenum)
|
||||
n = (curwin->w_p_scr <= curwin->w_height) ?
|
||||
curwin->w_p_scr : curwin->w_height;
|
||||
|
||||
update_topline();
|
||||
validate_botline();
|
||||
room = curwin->w_empty_rows;
|
||||
#ifdef FEAT_DIFF
|
||||
|
||||
@@ -6466,7 +6466,7 @@ clip_get_selection(VimClipboard *cbd)
|
||||
VIsual = old_visual;
|
||||
VIsual_mode = old_visual_mode;
|
||||
}
|
||||
else
|
||||
else if (!is_clipboard_needs_update())
|
||||
{
|
||||
clip_free_selection(cbd);
|
||||
|
||||
|
||||
@@ -855,6 +855,13 @@ static struct vimoption options[] =
|
||||
{"columns", "co", P_NUM|P_NODEFAULT|P_NO_MKRC|P_VI_DEF|P_RCLR,
|
||||
(char_u *)&Columns, PV_NONE,
|
||||
{(char_u *)80L, (char_u *)0L} SCRIPTID_INIT},
|
||||
{"columnspace", "csp", P_NUM|P_VI_DEF|P_RCLR,
|
||||
#ifdef FEAT_GUI_MACVIM
|
||||
(char_u *)&p_columnspace, PV_NONE,
|
||||
#else
|
||||
(char_u *)NULL, PV_NONE,
|
||||
#endif
|
||||
{(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
|
||||
{"comments", "com", P_STRING|P_ALLOCED|P_VI_DEF|P_ONECOMMA
|
||||
|P_NODUP|P_CURSWANT,
|
||||
#ifdef FEAT_COMMENTS
|
||||
@@ -8985,6 +8992,16 @@ set_num_option(
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_GUI_MACVIM
|
||||
else if (pp == &p_columnspace)
|
||||
{
|
||||
/* Recompute gui.char_width and resize the Vim window to keep the
|
||||
* same number of columns. */
|
||||
if (gui.in_use && gui_mch_adjust_charwidth() == OK)
|
||||
gui_set_shellsize(FALSE, FALSE, RESIZE_HOR);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_FOLDING
|
||||
/* 'foldlevel' */
|
||||
else if (pp == &curwin->w_p_fdl)
|
||||
|
||||
@@ -644,6 +644,7 @@ EXTERN int p_macatsui; /* 'macatsui' */
|
||||
#ifdef FEAT_GUI_MACVIM
|
||||
EXTERN int p_macligatures; /* 'macligatures' */
|
||||
EXTERN int p_macthinstrokes; /* 'macthinstrokes' */
|
||||
EXTERN long p_columnspace; /* 'columnspace' */
|
||||
#endif
|
||||
EXTERN int p_magic; /* 'magic' */
|
||||
#ifdef FEAT_MBYTE
|
||||
|
||||
+1
-1
@@ -511,7 +511,7 @@ mch_inchar(
|
||||
|| interrupted
|
||||
#endif
|
||||
|| wait_time > 0
|
||||
|| !did_start_blocking)
|
||||
|| (wtime < 0 && !did_start_blocking))
|
||||
continue;
|
||||
|
||||
/* no character available or interrupted */
|
||||
|
||||
@@ -82,6 +82,8 @@ gui_mch_init_font(char_u *font_name, int fontset);
|
||||
gui_mch_set_font(GuiFont font);
|
||||
int
|
||||
gui_mch_adjust_charheight(void);
|
||||
int
|
||||
gui_mch_adjust_charwidth(void);
|
||||
void
|
||||
gui_mch_beep(void);
|
||||
char_u *
|
||||
|
||||
@@ -52,5 +52,6 @@ void highlight_gui_started(void);
|
||||
int highlight_changed(void);
|
||||
void set_context_in_highlight_cmd(expand_T *xp, char_u *arg);
|
||||
char_u *get_highlight_name(expand_T *xp, int idx);
|
||||
char_u *get_highlight_name_ext(expand_T *xp, int idx, int skip_cleared);
|
||||
void free_highlight_fonts(void);
|
||||
/* vim: set ft=c : */
|
||||
|
||||
@@ -16,6 +16,7 @@ void clip_update_selection(VimClipboard *clip);
|
||||
void clip_own_selection(VimClipboard *cbd);
|
||||
void clip_lose_selection(VimClipboard *cbd);
|
||||
void start_global_changes(void);
|
||||
int is_clipboard_needs_update(void);
|
||||
void end_global_changes(void);
|
||||
void clip_auto_select(void);
|
||||
int clip_isautosel_star(void);
|
||||
|
||||
+30
-7
@@ -717,7 +717,8 @@ qf_get_next_file_line(qfstate_T *state)
|
||||
|
||||
#ifdef FEAT_MBYTE
|
||||
/* Convert a line if it contains a non-ASCII character. */
|
||||
if (state->vc.vc_type != CONV_NONE && has_non_ascii(state->linebuf)) {
|
||||
if (state->vc.vc_type != CONV_NONE && has_non_ascii(state->linebuf))
|
||||
{
|
||||
char_u *line;
|
||||
|
||||
line = string_convert(&state->vc, state->linebuf, &state->linelen);
|
||||
@@ -917,7 +918,8 @@ restofline:
|
||||
}
|
||||
if (fmt_ptr->flags == '+' && !qi->qf_multiscan) /* %+ */
|
||||
{
|
||||
if (linelen > fields->errmsglen) {
|
||||
if (linelen > fields->errmsglen)
|
||||
{
|
||||
/* linelen + null terminator */
|
||||
if ((fields->errmsg = vim_realloc(fields->errmsg,
|
||||
linelen + 1)) == NULL)
|
||||
@@ -931,7 +933,8 @@ restofline:
|
||||
if (regmatch.startp[i] == NULL || regmatch.endp[i] == NULL)
|
||||
continue;
|
||||
len = (int)(regmatch.endp[i] - regmatch.startp[i]);
|
||||
if (len > fields->errmsglen) {
|
||||
if (len > fields->errmsglen)
|
||||
{
|
||||
/* len + null terminator */
|
||||
if ((fields->errmsg = vim_realloc(fields->errmsg, len + 1))
|
||||
== NULL)
|
||||
@@ -1013,7 +1016,8 @@ restofline:
|
||||
fields->namebuf[0] = NUL; /* no match found, remove file name */
|
||||
fields->lnum = 0; /* don't jump to this line */
|
||||
fields->valid = FALSE;
|
||||
if (linelen > fields->errmsglen) {
|
||||
if (linelen > fields->errmsglen)
|
||||
{
|
||||
/* linelen + null terminator */
|
||||
if ((fields->errmsg = vim_realloc(fields->errmsg,
|
||||
linelen + 1)) == NULL)
|
||||
@@ -4798,7 +4802,8 @@ qf_add_entries(
|
||||
qi->qf_lists[qi->qf_curlist].qf_nonevalid = TRUE;
|
||||
else
|
||||
qi->qf_lists[qi->qf_curlist].qf_nonevalid = FALSE;
|
||||
if (action != 'a') {
|
||||
if (action != 'a')
|
||||
{
|
||||
qi->qf_lists[qi->qf_curlist].qf_ptr =
|
||||
qi->qf_lists[qi->qf_curlist].qf_start;
|
||||
if (qi->qf_lists[qi->qf_curlist].qf_count > 0)
|
||||
@@ -4861,6 +4866,18 @@ qf_set_properties(qf_info_T *qi, dict_T *what, int action)
|
||||
return retval;
|
||||
}
|
||||
|
||||
static void
|
||||
qf_free_stack(win_T *wp, qf_info_T *qi)
|
||||
{
|
||||
qf_free_all(wp);
|
||||
if (wp == NULL)
|
||||
{
|
||||
/* quickfix list */
|
||||
qi->qf_curlist = 0;
|
||||
qi->qf_listcount = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Populate the quickfix list with the items supplied in the list
|
||||
* of dictionaries. "title" will be copied to w:quickfix_title.
|
||||
@@ -4884,7 +4901,12 @@ set_errorlist(
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
if (what != NULL)
|
||||
if (action == 'f')
|
||||
{
|
||||
/* Free the entire quickfix or location list stack */
|
||||
qf_free_stack(wp, qi);
|
||||
}
|
||||
else if (what != NULL)
|
||||
retval = qf_set_properties(qi, what, action);
|
||||
else
|
||||
retval = qf_add_entries(qi, list, title, action);
|
||||
@@ -5187,7 +5209,8 @@ ex_helpgrep(exarg_T *eap)
|
||||
/* Convert a line if 'encoding' is not utf-8 and
|
||||
* the line contains a non-ASCII character. */
|
||||
if (vc.vc_type != CONV_NONE
|
||||
&& has_non_ascii(IObuff)) {
|
||||
&& has_non_ascii(IObuff))
|
||||
{
|
||||
line = string_convert(&vc, IObuff, NULL);
|
||||
if (line == NULL)
|
||||
line = IObuff;
|
||||
|
||||
+6
-6
@@ -2555,17 +2555,17 @@ collection:
|
||||
regc('\t');
|
||||
break;
|
||||
case CLASS_CNTRL:
|
||||
for (cu = 1; cu <= 255; cu++)
|
||||
for (cu = 1; cu <= 127; cu++)
|
||||
if (iscntrl(cu))
|
||||
regmbc(cu);
|
||||
break;
|
||||
case CLASS_DIGIT:
|
||||
for (cu = 1; cu <= 255; cu++)
|
||||
for (cu = 1; cu <= 127; cu++)
|
||||
if (VIM_ISDIGIT(cu))
|
||||
regmbc(cu);
|
||||
break;
|
||||
case CLASS_GRAPH:
|
||||
for (cu = 1; cu <= 255; cu++)
|
||||
for (cu = 1; cu <= 127; cu++)
|
||||
if (isgraph(cu))
|
||||
regmbc(cu);
|
||||
break;
|
||||
@@ -4732,7 +4732,7 @@ regmatch(
|
||||
break;
|
||||
}
|
||||
if (enc_utf8)
|
||||
opndc = mb_ptr2char(opnd);
|
||||
opndc = utf_ptr2char(opnd);
|
||||
if (enc_utf8 && utf_iscomposing(opndc))
|
||||
{
|
||||
/* When only a composing char is given match at any
|
||||
@@ -4741,7 +4741,7 @@ regmatch(
|
||||
for (i = 0; reginput[i] != NUL;
|
||||
i += utf_ptr2len(reginput + i))
|
||||
{
|
||||
inpc = mb_ptr2char(reginput + i);
|
||||
inpc = utf_ptr2char(reginput + i);
|
||||
if (!utf_iscomposing(inpc))
|
||||
{
|
||||
if (i > 0)
|
||||
@@ -4750,7 +4750,7 @@ regmatch(
|
||||
else if (opndc == inpc)
|
||||
{
|
||||
/* Include all following composing chars. */
|
||||
len = i + mb_ptr2len(reginput + i);
|
||||
len = i + utfc_ptr2len(reginput + i);
|
||||
status = RA_MATCH;
|
||||
break;
|
||||
}
|
||||
|
||||
+3
-3
@@ -1974,7 +1974,7 @@ collection:
|
||||
nfa_do_multibyte:
|
||||
/* plen is length of current char with composing chars */
|
||||
if (enc_utf8 && ((*mb_char2len)(c)
|
||||
!= (plen = (*mb_ptr2len)(old_regparse))
|
||||
!= (plen = utfc_ptr2len(old_regparse))
|
||||
|| utf_iscomposing(c)))
|
||||
{
|
||||
int i = 0;
|
||||
@@ -4871,7 +4871,7 @@ check_char_class(int class, int c)
|
||||
return OK;
|
||||
break;
|
||||
case NFA_CLASS_CNTRL:
|
||||
if (c >= 1 && c <= 255 && iscntrl(c))
|
||||
if (c >= 1 && c <= 127 && iscntrl(c))
|
||||
return OK;
|
||||
break;
|
||||
case NFA_CLASS_DIGIT:
|
||||
@@ -4879,7 +4879,7 @@ check_char_class(int class, int c)
|
||||
return OK;
|
||||
break;
|
||||
case NFA_CLASS_GRAPH:
|
||||
if (c >= 1 && c <= 255 && isgraph(c))
|
||||
if (c >= 1 && c <= 127 && isgraph(c))
|
||||
return OK;
|
||||
break;
|
||||
case NFA_CLASS_LOWER:
|
||||
|
||||
+17
-11
@@ -2697,12 +2697,18 @@ fold_line(
|
||||
{
|
||||
ScreenLinesUC[off + col] = fill_fold;
|
||||
ScreenLinesC[0][off + col] = 0;
|
||||
ScreenLines[off + col] = 0x80; /* avoid storing zero */
|
||||
}
|
||||
else
|
||||
{
|
||||
ScreenLinesUC[off + col] = 0;
|
||||
ScreenLines[off + col] = fill_fold;
|
||||
}
|
||||
col++;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
ScreenLines[off + col++] = fill_fold;
|
||||
ScreenLines[off + col++] = fill_fold;
|
||||
}
|
||||
|
||||
if (text != buf)
|
||||
@@ -4116,7 +4122,7 @@ win_line(
|
||||
c = c_extra;
|
||||
#ifdef FEAT_MBYTE
|
||||
mb_c = c; /* doesn't handle non-utf-8 multi-byte! */
|
||||
if (enc_utf8 && (*mb_char2len)(c) > 1)
|
||||
if (enc_utf8 && utf_char2len(c) > 1)
|
||||
{
|
||||
mb_utf8 = TRUE;
|
||||
u8cc[0] = 0;
|
||||
@@ -4137,7 +4143,7 @@ win_line(
|
||||
{
|
||||
/* If the UTF-8 character is more than one byte:
|
||||
* Decode it into "mb_c". */
|
||||
mb_l = (*mb_ptr2len)(p_extra);
|
||||
mb_l = utfc_ptr2len(p_extra);
|
||||
mb_utf8 = FALSE;
|
||||
if (mb_l > n_extra)
|
||||
mb_l = 1;
|
||||
@@ -4216,7 +4222,7 @@ win_line(
|
||||
{
|
||||
/* If the UTF-8 character is more than one byte: Decode it
|
||||
* into "mb_c". */
|
||||
mb_l = (*mb_ptr2len)(ptr);
|
||||
mb_l = utfc_ptr2len(ptr);
|
||||
mb_utf8 = FALSE;
|
||||
if (mb_l > 1)
|
||||
{
|
||||
@@ -4609,7 +4615,7 @@ win_line(
|
||||
}
|
||||
#ifdef FEAT_MBYTE
|
||||
mb_c = c;
|
||||
if (enc_utf8 && (*mb_char2len)(c) > 1)
|
||||
if (enc_utf8 && utf_char2len(c) > 1)
|
||||
{
|
||||
mb_utf8 = TRUE;
|
||||
u8cc[0] = 0;
|
||||
@@ -4631,7 +4637,7 @@ win_line(
|
||||
}
|
||||
#ifdef FEAT_MBYTE
|
||||
mb_c = c;
|
||||
if (enc_utf8 && (*mb_char2len)(c) > 1)
|
||||
if (enc_utf8 && utf_char2len(c) > 1)
|
||||
{
|
||||
mb_utf8 = TRUE;
|
||||
u8cc[0] = 0;
|
||||
@@ -4762,7 +4768,7 @@ win_line(
|
||||
saved_attr2 = char_attr; /* save current attr */
|
||||
#ifdef FEAT_MBYTE
|
||||
mb_c = c;
|
||||
if (enc_utf8 && (*mb_char2len)(c) > 1)
|
||||
if (enc_utf8 && utf_char2len(c) > 1)
|
||||
{
|
||||
mb_utf8 = TRUE;
|
||||
u8cc[0] = 0;
|
||||
@@ -4836,7 +4842,7 @@ win_line(
|
||||
}
|
||||
#ifdef FEAT_MBYTE
|
||||
mb_c = c;
|
||||
if (enc_utf8 && (*mb_char2len)(c) > 1)
|
||||
if (enc_utf8 && utf_char2len(c) > 1)
|
||||
{
|
||||
mb_utf8 = TRUE;
|
||||
u8cc[0] = 0;
|
||||
@@ -5000,7 +5006,7 @@ win_line(
|
||||
}
|
||||
# ifdef FEAT_MBYTE
|
||||
mb_c = c;
|
||||
if (enc_utf8 && (*mb_char2len)(c) > 1)
|
||||
if (enc_utf8 && utf_char2len(c) > 1)
|
||||
{
|
||||
mb_utf8 = TRUE;
|
||||
u8cc[0] = 0;
|
||||
@@ -5112,7 +5118,7 @@ win_line(
|
||||
extra_attr = HL_ATTR(HLF_AT);
|
||||
}
|
||||
mb_c = c;
|
||||
if (enc_utf8 && (*mb_char2len)(c) > 1)
|
||||
if (enc_utf8 && utf_char2len(c) > 1)
|
||||
{
|
||||
mb_utf8 = TRUE;
|
||||
u8cc[0] = 0;
|
||||
@@ -5385,7 +5391,7 @@ win_line(
|
||||
char_attr = HL_ATTR(HLF_AT);
|
||||
#ifdef FEAT_MBYTE
|
||||
mb_c = c;
|
||||
if (enc_utf8 && (*mb_char2len)(c) > 1)
|
||||
if (enc_utf8 && utf_char2len(c) > 1)
|
||||
{
|
||||
mb_utf8 = TRUE;
|
||||
u8cc[0] = 0;
|
||||
|
||||
+9
-1
@@ -2860,9 +2860,17 @@ findpar(
|
||||
curwin->w_cursor.lnum = curr;
|
||||
if (curr == curbuf->b_ml.ml_line_count && what != '}')
|
||||
{
|
||||
if ((curwin->w_cursor.col = (colnr_T)STRLEN(ml_get(curr))) != 0)
|
||||
char_u *line = ml_get(curr);
|
||||
|
||||
/* Put the cursor on the last character in the last line and make the
|
||||
* motion inclusive. */
|
||||
if ((curwin->w_cursor.col = (colnr_T)STRLEN(line)) != 0)
|
||||
{
|
||||
--curwin->w_cursor.col;
|
||||
#ifdef FEAT_MBYTE
|
||||
curwin->w_cursor.col -=
|
||||
(*mb_head_off)(line, line + curwin->w_cursor.col);
|
||||
#endif
|
||||
*pincl = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -1208,7 +1208,7 @@ can_compound(slang_T *slang, char_u *word, char_u *flags)
|
||||
/* Need to convert the single byte flags to utf8 characters. */
|
||||
p = uflags;
|
||||
for (i = 0; flags[i] != NUL; ++i)
|
||||
p += mb_char2bytes(flags[i], p);
|
||||
p += utf_char2bytes(flags[i], p);
|
||||
*p = NUL;
|
||||
p = uflags;
|
||||
}
|
||||
@@ -5117,11 +5117,11 @@ suggest_trie_walk(
|
||||
* SCORE_SUBCOMP. */
|
||||
if (enc_utf8
|
||||
&& utf_iscomposing(
|
||||
mb_ptr2char(tword
|
||||
utf_ptr2char(tword
|
||||
+ sp->ts_twordlen
|
||||
- sp->ts_tcharlen))
|
||||
&& utf_iscomposing(
|
||||
mb_ptr2char(fword
|
||||
utf_ptr2char(fword
|
||||
+ sp->ts_fcharstart)))
|
||||
sp->ts_score -=
|
||||
SCORE_SUBST - SCORE_SUBCOMP;
|
||||
|
||||
+15
-5
@@ -9950,17 +9950,27 @@ highlight_list_two(int cnt, int attr)
|
||||
|| defined(FEAT_SIGNS) || defined(PROTO)
|
||||
/*
|
||||
* Function given to ExpandGeneric() to obtain the list of group names.
|
||||
* Also used for synIDattr() function.
|
||||
*/
|
||||
char_u *
|
||||
get_highlight_name(expand_T *xp UNUSED, int idx)
|
||||
{
|
||||
return get_highlight_name_ext(xp, idx, TRUE);
|
||||
}
|
||||
|
||||
/*
|
||||
* Obtain a highlight group name.
|
||||
* When "skip_cleared" is TRUE don't return a cleared entry.
|
||||
*/
|
||||
char_u *
|
||||
get_highlight_name_ext(expand_T *xp UNUSED, int idx, int skip_cleared)
|
||||
{
|
||||
if (idx < 0)
|
||||
return NULL;
|
||||
/* Items are never removed from the table, skip the ones that were cleared.
|
||||
*/
|
||||
while (idx < highlight_ga.ga_len && HL_TABLE()[idx].sg_cleared)
|
||||
++idx;
|
||||
|
||||
/* Items are never removed from the table, skip the ones that were
|
||||
* cleared. */
|
||||
if (skip_cleared && idx < highlight_ga.ga_len && HL_TABLE()[idx].sg_cleared)
|
||||
return (char_u *)"";
|
||||
|
||||
#ifdef FEAT_CMDL_COMPL
|
||||
if (idx == highlight_ga.ga_len && include_none != 0)
|
||||
|
||||
@@ -3203,8 +3203,12 @@ jumpto_tag(
|
||||
* open a new tab page. */
|
||||
if (postponed_split || cmdmod.tab != 0)
|
||||
{
|
||||
win_split(postponed_split > 0 ? postponed_split : 0,
|
||||
postponed_split_flags);
|
||||
if (win_split(postponed_split > 0 ? postponed_split : 0,
|
||||
postponed_split_flags) == FAIL)
|
||||
{
|
||||
--RedrawingDisabled;
|
||||
goto erret;
|
||||
}
|
||||
RESET_BINDING(curwin);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -21,8 +21,9 @@ source test_findfile.vim
|
||||
source test_float_func.vim
|
||||
source test_fnamemodify.vim
|
||||
source test_functions.vim
|
||||
source test_glob2regpat.vim
|
||||
source test_ga.vim
|
||||
source test_glob2regpat.vim
|
||||
source test_global.vim
|
||||
source test_goto.vim
|
||||
source test_help_tagjump.vim
|
||||
source test_join.vim
|
||||
|
||||
@@ -11,6 +11,19 @@ func Test_client_server()
|
||||
if cmd == ''
|
||||
return
|
||||
endif
|
||||
if has('x11')
|
||||
if empty($DISPLAY)
|
||||
throw 'Skipped: $DISPLAY is not set'
|
||||
endif
|
||||
try
|
||||
call remote_send('xxx', '')
|
||||
catch
|
||||
if v:exception =~ 'E240:'
|
||||
throw 'Skipped: no connection to the X server'
|
||||
endif
|
||||
" ignore other errors
|
||||
endtry
|
||||
endif
|
||||
|
||||
let name = 'XVIMTEST'
|
||||
let cmd .= ' --servername ' . name
|
||||
|
||||
@@ -71,6 +71,14 @@ func Test_highlight_completion()
|
||||
call assert_equal('"hi default', getreg(':'))
|
||||
call feedkeys(":hi c\<S-Tab>\<Home>\"\<CR>", 'xt')
|
||||
call assert_equal('"hi clear', getreg(':'))
|
||||
|
||||
" A cleared group does not show up in completions.
|
||||
hi Anders ctermfg=green
|
||||
call assert_equal(['Aardig', 'Anders'], getcompletion('A', 'highlight'))
|
||||
hi clear Aardig
|
||||
call assert_equal(['Anders'], getcompletion('A', 'highlight'))
|
||||
hi clear Anders
|
||||
call assert_equal([], getcompletion('A', 'highlight'))
|
||||
endfunc
|
||||
|
||||
func Test_expr_completion()
|
||||
@@ -340,6 +348,15 @@ func Test_cmdline_complete_wildoptions()
|
||||
bw!
|
||||
endfunc
|
||||
|
||||
func Test_cmdline_complete_user_cmd()
|
||||
command! -complete=color -nargs=1 Foo :
|
||||
call feedkeys(":Foo \<Tab>\<Home>\"\<cr>", 'tx')
|
||||
call assert_equal('"Foo blue', @:)
|
||||
call feedkeys(":Foo b\<Tab>\<Home>\"\<cr>", 'tx')
|
||||
call assert_equal('"Foo blue', @:)
|
||||
delcommand Foo
|
||||
endfunc
|
||||
|
||||
" using a leading backslash here
|
||||
set cpo+=C
|
||||
|
||||
|
||||
@@ -3,18 +3,12 @@ if !has('gui_running') && has('unix')
|
||||
set term=ansi
|
||||
endif
|
||||
|
||||
function! s:screenline(lnum, nr) abort
|
||||
let line = []
|
||||
for j in range(a:nr)
|
||||
for c in range(1, winwidth(0))
|
||||
call add(line, nr2char(screenchar(a:lnum+j, c)))
|
||||
endfor
|
||||
call add(line, "\n")
|
||||
endfor
|
||||
return join(line, '')
|
||||
endfunction
|
||||
source view_util.vim
|
||||
|
||||
function! Test_display_foldcolumn()
|
||||
func! Test_display_foldcolumn()
|
||||
if !has("folding")
|
||||
return
|
||||
endif
|
||||
new
|
||||
vnew
|
||||
vert resize 25
|
||||
@@ -23,17 +17,53 @@ function! Test_display_foldcolumn()
|
||||
|
||||
1put='e more noise blah blah more stuff here'
|
||||
|
||||
let expect = "e more noise blah blah<82\n> more stuff here \n"
|
||||
let expect = [
|
||||
\ "e more noise blah blah<82",
|
||||
\ "> more stuff here "
|
||||
\ ]
|
||||
|
||||
call cursor(2, 1)
|
||||
norm! zt
|
||||
redraw!
|
||||
call assert_equal(expect, s:screenline(1,2))
|
||||
let lines=ScreenLines([1,2], winwidth(0))
|
||||
call assert_equal(expect, lines)
|
||||
set fdc=2
|
||||
redraw!
|
||||
let expect = " e more noise blah blah<\n 82> more stuff here \n"
|
||||
call assert_equal(expect, s:screenline(1,2))
|
||||
let lines=ScreenLines([1,2], winwidth(0))
|
||||
let expect = [
|
||||
\ " e more noise blah blah<",
|
||||
\ " 82> more stuff here "
|
||||
\ ]
|
||||
call assert_equal(expect, lines)
|
||||
|
||||
quit!
|
||||
quit!
|
||||
endfunction
|
||||
endfunc
|
||||
|
||||
func! Test_display_foldtext_mbyte()
|
||||
if !has("folding") || !has("multi_byte")
|
||||
return
|
||||
endif
|
||||
call NewWindow(10, 40)
|
||||
call append(0, range(1,20))
|
||||
exe "set foldmethod=manual foldtext=foldtext() fillchars=fold:\u2500,vert:\u2502 fdc=2"
|
||||
call cursor(2, 1)
|
||||
norm! zf13G
|
||||
let lines=ScreenLines([1,3], winwidth(0)+1)
|
||||
let expect=[
|
||||
\ " 1 \u2502",
|
||||
\ "+ +-- 12 lines: 2". repeat("\u2500", 23). "\u2502",
|
||||
\ " 14 \u2502",
|
||||
\ ]
|
||||
call assert_equal(expect, lines)
|
||||
|
||||
set fillchars=fold:-,vert:\|
|
||||
let lines=ScreenLines([1,3], winwidth(0)+1)
|
||||
let expect=[
|
||||
\ " 1 |",
|
||||
\ "+ +-- 12 lines: 2". repeat("-", 23). "|",
|
||||
\ " 14 |",
|
||||
\ ]
|
||||
call assert_equal(expect, lines)
|
||||
|
||||
set foldtext& fillchars& foldmethod& fdc&
|
||||
bw!
|
||||
endfunc
|
||||
|
||||
@@ -1054,7 +1054,7 @@ endfunc
|
||||
|
||||
func! Test_edit_MOUSE()
|
||||
" This is a simple test, since we not really using the mouse here
|
||||
if !has("mouse")
|
||||
if !has("mouse") || (has("gui_macvim") && has("gui_running"))
|
||||
return
|
||||
endif
|
||||
10new
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
func Test_yank_put_clipboard()
|
||||
new
|
||||
call setline(1, ['a', 'b', 'c'])
|
||||
set clipboard=unnamed
|
||||
g/^/normal yyp
|
||||
call assert_equal(['a', 'a', 'b', 'b', 'c', 'c'], getline(1, 6))
|
||||
|
||||
set clipboard&
|
||||
bwipe!
|
||||
endfunc
|
||||
+38
-18
@@ -2259,26 +2259,46 @@ func! Test_normal53_digraph()
|
||||
bw!
|
||||
endfunc
|
||||
|
||||
func! Test_normal54_Ctrl_bsl()
|
||||
new
|
||||
call setline(1, 'abcdefghijklmn')
|
||||
exe "norm! df\<c-\>\<c-n>"
|
||||
call assert_equal(['abcdefghijklmn'], getline(1,'$'))
|
||||
exe "norm! df\<c-\>\<c-g>"
|
||||
call assert_equal(['abcdefghijklmn'], getline(1,'$'))
|
||||
exe "norm! df\<c-\>m"
|
||||
call assert_equal(['abcdefghijklmn'], getline(1,'$'))
|
||||
func Test_normal54_Ctrl_bsl()
|
||||
new
|
||||
call setline(1, 'abcdefghijklmn')
|
||||
exe "norm! df\<c-\>\<c-n>"
|
||||
call assert_equal(['abcdefghijklmn'], getline(1,'$'))
|
||||
exe "norm! df\<c-\>\<c-g>"
|
||||
call assert_equal(['abcdefghijklmn'], getline(1,'$'))
|
||||
exe "norm! df\<c-\>m"
|
||||
call assert_equal(['abcdefghijklmn'], getline(1,'$'))
|
||||
if !has("multi_byte")
|
||||
return
|
||||
endif
|
||||
call setline(2, 'abcdefghijklmnāf')
|
||||
norm! 2gg0
|
||||
exe "norm! df\<Char-0x101>"
|
||||
call assert_equal(['abcdefghijklmn', 'f'], getline(1,'$'))
|
||||
norm! 1gg0
|
||||
exe "norm! df\<esc>"
|
||||
call assert_equal(['abcdefghijklmn', 'f'], getline(1,'$'))
|
||||
call setline(2, 'abcdefghijklmnāf')
|
||||
norm! 2gg0
|
||||
exe "norm! df\<Char-0x101>"
|
||||
call assert_equal(['abcdefghijklmn', 'f'], getline(1,'$'))
|
||||
norm! 1gg0
|
||||
exe "norm! df\<esc>"
|
||||
call assert_equal(['abcdefghijklmn', 'f'], getline(1,'$'))
|
||||
|
||||
" clean up
|
||||
bw!
|
||||
" clean up
|
||||
bw!
|
||||
endfunc
|
||||
|
||||
func Test_normal_large_count()
|
||||
" This may fail with 32bit long, how do we detect that?
|
||||
new
|
||||
normal o
|
||||
normal 6666666666dL
|
||||
bwipe!
|
||||
endfunc
|
||||
|
||||
func Test_delete_until_paragraph()
|
||||
if !has('multi_byte')
|
||||
return
|
||||
endif
|
||||
new
|
||||
normal grádv}
|
||||
call assert_equal('á', getline(1))
|
||||
normal grád}
|
||||
call assert_equal('', getline(1))
|
||||
bwipe!
|
||||
endfunc
|
||||
|
||||
@@ -38,6 +38,7 @@ func s:setup_commands(cchar)
|
||||
command! -nargs=* Xhelpgrep helpgrep <args>
|
||||
let g:Xgetlist = function('getqflist')
|
||||
let g:Xsetlist = function('setqflist')
|
||||
call setqflist([], 'f')
|
||||
else
|
||||
command! -nargs=* -bang Xlist <mods>llist<bang> <args>
|
||||
command! -nargs=* Xgetexpr <mods>lgetexpr <args>
|
||||
@@ -69,6 +70,7 @@ func s:setup_commands(cchar)
|
||||
command! -nargs=* Xhelpgrep lhelpgrep <args>
|
||||
let g:Xgetlist = function('getloclist', [0])
|
||||
let g:Xsetlist = function('setloclist', [0])
|
||||
call setloclist(0, [], 'f')
|
||||
endif
|
||||
endfunc
|
||||
|
||||
@@ -76,6 +78,9 @@ endfunc
|
||||
func XlistTests(cchar)
|
||||
call s:setup_commands(a:cchar)
|
||||
|
||||
if a:cchar == 'l'
|
||||
call assert_fails('llist', 'E776:')
|
||||
endif
|
||||
" With an empty list, command should return error
|
||||
Xgetexpr []
|
||||
silent! Xlist
|
||||
@@ -146,6 +151,9 @@ endfunc
|
||||
func XageTests(cchar)
|
||||
call s:setup_commands(a:cchar)
|
||||
|
||||
let list = [{'bufnr': 1, 'lnum': 1}]
|
||||
call g:Xsetlist(list)
|
||||
|
||||
" Jumping to a non existent list should return error
|
||||
silent! Xolder 99
|
||||
call assert_true(v:errmsg ==# 'E380: At bottom of quickfix stack')
|
||||
@@ -179,11 +187,7 @@ func XageTests(cchar)
|
||||
endfunc
|
||||
|
||||
func Test_cage()
|
||||
let list = [{'bufnr': 1, 'lnum': 1}]
|
||||
call setqflist(list)
|
||||
call XageTests('c')
|
||||
|
||||
call setloclist(0, list)
|
||||
call XageTests('l')
|
||||
endfunc
|
||||
|
||||
@@ -192,6 +196,11 @@ endfunc
|
||||
func XwindowTests(cchar)
|
||||
call s:setup_commands(a:cchar)
|
||||
|
||||
" Opening the location list window without any errors should fail
|
||||
if a:cchar == 'l'
|
||||
call assert_fails('lopen', 'E776:')
|
||||
endif
|
||||
|
||||
" Create a list with no valid entries
|
||||
Xgetexpr ['non-error 1', 'non-error 2', 'non-error 3']
|
||||
|
||||
@@ -232,6 +241,19 @@ func XwindowTests(cchar)
|
||||
" Calling cwindow should close the quickfix window with no valid errors
|
||||
Xwindow
|
||||
call assert_true(winnr('$') == 1)
|
||||
|
||||
if a:cchar == 'c'
|
||||
" Opening the quickfix window in multiple tab pages should reuse the
|
||||
" quickfix buffer
|
||||
Xgetexpr ['Xtestfile1:1:3:Line1', 'Xtestfile2:2:2:Line2',
|
||||
\ 'Xtestfile3:3:1:Line3']
|
||||
Xopen
|
||||
let qfbufnum = bufnr('%')
|
||||
tabnew
|
||||
Xopen
|
||||
call assert_equal(qfbufnum, bufnr('%'))
|
||||
new | only | tabonly
|
||||
endif
|
||||
endfunc
|
||||
|
||||
func Test_cwindow()
|
||||
@@ -360,6 +382,13 @@ endfunc
|
||||
func Xtest_browse(cchar)
|
||||
call s:setup_commands(a:cchar)
|
||||
|
||||
" Jumping to first or next location list entry without any error should
|
||||
" result in failure
|
||||
if a:cchar == 'l'
|
||||
call assert_fails('lfirst', 'E776:')
|
||||
call assert_fails('lnext', 'E776:')
|
||||
endif
|
||||
|
||||
call s:create_test_file('Xqftestfile1')
|
||||
call s:create_test_file('Xqftestfile2')
|
||||
|
||||
@@ -1550,6 +1579,11 @@ endfunc
|
||||
func XbottomTests(cchar)
|
||||
call s:setup_commands(a:cchar)
|
||||
|
||||
" Calling lbottom without any errors should fail
|
||||
if a:cchar == 'l'
|
||||
call assert_fails('lbottom', 'E776:')
|
||||
endif
|
||||
|
||||
call g:Xsetlist([{'filename': 'foo', 'lnum': 42}])
|
||||
Xopen
|
||||
let wid = win_getid()
|
||||
@@ -1571,10 +1605,9 @@ endfunc
|
||||
func HistoryTest(cchar)
|
||||
call s:setup_commands(a:cchar)
|
||||
|
||||
call assert_fails(a:cchar . 'older 99', 'E380:')
|
||||
" clear all lists after the first one, then replace the first one.
|
||||
call g:Xsetlist([])
|
||||
Xolder
|
||||
call assert_fails('Xolder 99', 'E380:')
|
||||
let entry = {'filename': 'foo', 'lnum': 42}
|
||||
call g:Xsetlist([entry], 'r')
|
||||
call g:Xsetlist([entry, entry])
|
||||
@@ -1617,6 +1650,7 @@ func Xproperty_tests(cchar)
|
||||
call assert_fails('call g:Xsetlist([], "a", [])', 'E715:')
|
||||
|
||||
" Set and get the title
|
||||
call g:Xsetlist([])
|
||||
Xopen
|
||||
wincmd p
|
||||
call g:Xsetlist([{'filename':'foo', 'lnum':27}])
|
||||
|
||||
@@ -39,6 +39,15 @@ func Do_test_quotestar_for_x11()
|
||||
if cmd == ''
|
||||
return 'GetVimCommand() failed'
|
||||
endif
|
||||
try
|
||||
call remote_send('xxx', '')
|
||||
catch
|
||||
if v:exception =~ 'E240:'
|
||||
" No connection to the X server, give up.
|
||||
return
|
||||
endif
|
||||
" ignore other errors
|
||||
endtry
|
||||
|
||||
let name = 'XVIMCLIPBOARD'
|
||||
let cmd .= ' --servername ' . name
|
||||
@@ -109,8 +118,12 @@ func Test_quotestar()
|
||||
|
||||
if has('macunix')
|
||||
let skipped = Do_test_quotestar_for_macunix()
|
||||
elseif !empty("$DISPLAY")
|
||||
let skipped = Do_test_quotestar_for_x11()
|
||||
elseif has('x11')
|
||||
if empty($DISPLAY)
|
||||
let skipped = "Test can only run when $DISPLAY is set."
|
||||
else
|
||||
let skipped = Do_test_quotestar_for_x11()
|
||||
endif
|
||||
else
|
||||
let skipped = "Test is not implemented yet for this platform."
|
||||
endif
|
||||
|
||||
@@ -38,12 +38,21 @@ func s:classes_test()
|
||||
set isprint=@,161-255
|
||||
call assert_equal('Motörhead', matchstr('Motörhead', '[[:print:]]\+'))
|
||||
|
||||
let alphachars = ''
|
||||
let lowerchars = ''
|
||||
let upperchars = ''
|
||||
let alnumchars = ''
|
||||
let alphachars = ''
|
||||
let backspacechar = ''
|
||||
let blankchars = ''
|
||||
let cntrlchars = ''
|
||||
let digitchars = ''
|
||||
let escapechar = ''
|
||||
let graphchars = ''
|
||||
let lowerchars = ''
|
||||
let printchars = ''
|
||||
let punctchars = ''
|
||||
let returnchar = ''
|
||||
let spacechars = ''
|
||||
let tabchar = ''
|
||||
let upperchars = ''
|
||||
let xdigitchars = ''
|
||||
let i = 1
|
||||
while i <= 255
|
||||
@@ -51,21 +60,48 @@ func s:classes_test()
|
||||
if c =~ '[[:alpha:]]'
|
||||
let alphachars .= c
|
||||
endif
|
||||
if c =~ '[[:lower:]]'
|
||||
let lowerchars .= c
|
||||
endif
|
||||
if c =~ '[[:upper:]]'
|
||||
let upperchars .= c
|
||||
endif
|
||||
if c =~ '[[:alnum:]]'
|
||||
let alnumchars .= c
|
||||
endif
|
||||
if c =~ '[[:backspace:]]'
|
||||
let backspacechar .= c
|
||||
endif
|
||||
if c =~ '[[:blank:]]'
|
||||
let blankchars .= c
|
||||
endif
|
||||
if c =~ '[[:cntrl:]]'
|
||||
let cntrlchars .= c
|
||||
endif
|
||||
if c =~ '[[:digit:]]'
|
||||
let digitchars .= c
|
||||
endif
|
||||
if c =~ '[[:escape:]]'
|
||||
let escapechar .= c
|
||||
endif
|
||||
if c =~ '[[:graph:]]'
|
||||
let graphchars .= c
|
||||
endif
|
||||
if c =~ '[[:lower:]]'
|
||||
let lowerchars .= c
|
||||
endif
|
||||
if c =~ '[[:print:]]'
|
||||
let printchars .= c
|
||||
endif
|
||||
if c =~ '[[:punct:]]'
|
||||
let punctchars .= c
|
||||
endif
|
||||
if c =~ '[[:return:]]'
|
||||
let returnchar .= c
|
||||
endif
|
||||
if c =~ '[[:space:]]'
|
||||
let spacechars .= c
|
||||
endif
|
||||
if c =~ '[[:tab:]]'
|
||||
let tabchar .= c
|
||||
endif
|
||||
if c =~ '[[:upper:]]'
|
||||
let upperchars .= c
|
||||
endif
|
||||
if c =~ '[[:xdigit:]]'
|
||||
let xdigitchars .= c
|
||||
endif
|
||||
@@ -73,11 +109,22 @@ func s:classes_test()
|
||||
endwhile
|
||||
|
||||
call assert_equal('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz', alphachars)
|
||||
call assert_equal('abcdefghijklmnopqrstuvwxyzµßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ', lowerchars)
|
||||
call assert_equal('ABCDEFGHIJKLMNOPQRSTUVWXYZÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ', upperchars)
|
||||
call assert_equal('0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz', alnumchars)
|
||||
call assert_equal("\b", backspacechar)
|
||||
call assert_equal("\t ", blankchars)
|
||||
" Commented out: it succeeds on Linux and Windows, but fails on macOs in Travis.
|
||||
" call assert_equal("\x01\x02\x03\x04\x05\x06\x07\b\t\n\x0b\f\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\e\x1c\x1d\x1e\x1f\x7f", cntrlchars)
|
||||
call assert_equal("0123456789", digitchars)
|
||||
call assert_equal("\<Esc>", escapechar)
|
||||
" Commented out: it succeeds on Linux and Windows, but fails on macOs in Travis.
|
||||
" call assert_equal('!"#$%&''()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~', graphchars)
|
||||
call assert_equal('abcdefghijklmnopqrstuvwxyzµßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ', lowerchars)
|
||||
call assert_equal(' !"#$%&''()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ', printchars)
|
||||
call assert_equal('!"#$%&''()*+,-./:;<=>?@[\]^_`{|}~', punctchars)
|
||||
call assert_equal('ABCDEFGHIJKLMNOPQRSTUVWXYZÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ', upperchars)
|
||||
call assert_equal("\r", returnchar)
|
||||
call assert_equal("\t\n\x0b\f\r ", spacechars)
|
||||
call assert_equal("\t", tabchar)
|
||||
call assert_equal('0123456789ABCDEFabcdef', xdigitchars)
|
||||
endfunc
|
||||
|
||||
|
||||
@@ -197,3 +197,14 @@ func Test_progpath()
|
||||
" Only expect "vim" to appear in v:progname.
|
||||
call assert_match('vim\c', v:progname)
|
||||
endfunc
|
||||
|
||||
func Test_silent_ex_mode()
|
||||
if !has('unix') || has('gui_running')
|
||||
" can't get output of Vim.
|
||||
return
|
||||
endif
|
||||
|
||||
" This caused an ml_get error.
|
||||
let out = system(GetVimCommand() . '-u NONE -es -c''set verbose=1|h|exe "%norm\<c-y>\<c-d>"'' -c cq')
|
||||
call assert_notmatch('E315:', out)
|
||||
endfunc
|
||||
|
||||
@@ -326,13 +326,16 @@ func Test_syn_clear()
|
||||
syntax keyword Bar tar
|
||||
call assert_match('Foo', execute('syntax'))
|
||||
call assert_match('Bar', execute('syntax'))
|
||||
call assert_equal('Foo', synIDattr(hlID("Foo"), "name"))
|
||||
syn clear Foo
|
||||
call assert_notmatch('Foo', execute('syntax'))
|
||||
call assert_match('Bar', execute('syntax'))
|
||||
call assert_equal('Foo', synIDattr(hlID("Foo"), "name"))
|
||||
syn clear Foo Bar
|
||||
call assert_notmatch('Foo', execute('syntax'))
|
||||
call assert_notmatch('Bar', execute('syntax'))
|
||||
hi clear Foo
|
||||
call assert_equal('Foo', synIDattr(hlID("Foo"), "name"))
|
||||
hi clear Bar
|
||||
endfunc
|
||||
|
||||
|
||||
@@ -408,8 +408,6 @@ ui_breakcheck_force(int force)
|
||||
|
||||
#if defined(FEAT_CLIPBOARD) || defined(PROTO)
|
||||
|
||||
static void clip_copy_selection(VimClipboard *clip);
|
||||
|
||||
/*
|
||||
* Selection stuff using Visual mode, for cutting and pasting text to other
|
||||
* windows.
|
||||
@@ -585,7 +583,8 @@ clip_copy_selection(VimClipboard *clip)
|
||||
* considerably.
|
||||
*/
|
||||
static int global_change_count = 0; /* if set, inside a start_global_changes */
|
||||
static int clipboard_needs_update; /* clipboard needs to be updated */
|
||||
static int clipboard_needs_update = FALSE; /* clipboard needs to be updated */
|
||||
static int clip_did_set_selection = TRUE;
|
||||
|
||||
/*
|
||||
* Save clip_unnamed and reset it.
|
||||
@@ -605,6 +604,16 @@ start_global_changes(void)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Return TRUE if setting the clipboard was postponed, it already contains the
|
||||
* right text.
|
||||
*/
|
||||
int
|
||||
is_clipboard_needs_update()
|
||||
{
|
||||
return clipboard_needs_update;
|
||||
}
|
||||
|
||||
/*
|
||||
* Restore clip_unnamed and set the selection when needed.
|
||||
*/
|
||||
@@ -635,6 +644,7 @@ end_global_changes(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
clipboard_needs_update = FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -779,6 +779,54 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
525,
|
||||
/**/
|
||||
524,
|
||||
/**/
|
||||
523,
|
||||
/**/
|
||||
522,
|
||||
/**/
|
||||
521,
|
||||
/**/
|
||||
520,
|
||||
/**/
|
||||
519,
|
||||
/**/
|
||||
518,
|
||||
/**/
|
||||
517,
|
||||
/**/
|
||||
516,
|
||||
/**/
|
||||
515,
|
||||
/**/
|
||||
514,
|
||||
/**/
|
||||
513,
|
||||
/**/
|
||||
512,
|
||||
/**/
|
||||
511,
|
||||
/**/
|
||||
510,
|
||||
/**/
|
||||
509,
|
||||
/**/
|
||||
508,
|
||||
/**/
|
||||
507,
|
||||
/**/
|
||||
506,
|
||||
/**/
|
||||
505,
|
||||
/**/
|
||||
504,
|
||||
/**/
|
||||
503,
|
||||
/**/
|
||||
502,
|
||||
/**/
|
||||
501,
|
||||
/**/
|
||||
|
||||
@@ -3811,6 +3811,7 @@ close_tabpage(tabpage_T *tab)
|
||||
for (ptp = first_tabpage; ptp != NULL && ptp->tp_next != tab;
|
||||
ptp = ptp->tp_next)
|
||||
;
|
||||
assert(ptp != NULL);
|
||||
ptp->tp_next = tab->tp_next;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user