Compare commits

..

81 Commits

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

- Vim patch 7.4.972
- Import QLStephen to quick-look MacVim file types
- Fix redraw and redrawstatus issue

Script interfaces have compatibility with these versions

- Lua 5.2
- Perl 5.16
- Python2 2.7
- Python3 3.5
- Ruby 2.0
2015-12-16 18:50:18 -08:00
Kazuki Sakamoto 2d3163f649 Merge pull request #175 from macvim-dev/fix/redraw_redrawstatus
Do flush in ex_redraw and ex_redrawstatus
2015-12-16 18:35:41 -08:00
Kazuki Sakamoto e7ca3fe789 Do flush in ex_redraw and ex_redrawstatus
Fix #174
2015-12-15 08:58:29 -08:00
Kazuki Sakamoto ddc5c148e8 Merge remote-tracking branch 'vim/master' 2015-12-13 08:44:46 -08:00
Bram Moolenaar a988496706 patch 7.4.972
Problem:    Memory leak when there is an error in setting an option.
Solution:   Free the saved value (Christian Brabandt)
2015-12-13 15:08:56 +01:00
Bram Moolenaar 099fdde0f0 patch 7.4.971
Problem:    The asin() function can't be used.
Solution:   Sort the function table properly. (Watiko)
2015-12-13 14:45:21 +01:00
Kazuki Sakamoto 01672932c6 Merge remote-tracking branch 'vim/master' 2015-12-12 20:57:10 -08:00
Bram Moolenaar 9ec021a2b0 patch 7.4.970
Problem:    Rare crash in getvcol(). (Timo Mihaljov)
Solution:   Check for the buffer being NULL in init_preedit_start_col.
            (Hirohito Higashi, Christian Brabandt)
2015-12-12 16:23:29 +01:00
Kazuki Sakamoto abca1283d2 Merge pull request #172 from macvim-dev/feature/quicklook
Import QLStephen to quick-look MacVim file types
2015-12-12 01:09:56 -08:00
Kazuki Sakamoto 518ae7168a Import QLStephen to quick-look MacVim file types 2015-12-12 01:05:23 -08:00
Kazuki Sakamoto 92dabee8ac MacVim Snapshot 86
Binary targets OS X 10.8(Mountain Lion), 10.9(Mavericks), 10.10(Yosemite), and 10.11(El Capitan)

- Vim patch 7.4.969
- Add MMNoTitleBarWindow and MMUseMouseTime

Script interfaces have compatibility with these versions

- Lua 5.2
- Perl 5.16
- Python2 2.7
- Python3 3.5
- Ruby 2.0
2015-12-11 14:34:30 -08:00
Kazuki Sakamoto 45fa1f955f s/Key// 2015-12-11 14:33:57 -08:00
Kazuki Sakamoto 421df8e160 Merge pull request #171 from macvim-dev/feature/doc_defaults
Add MMNoTitleBarWindowKey and MMUseMouseTime short description
2015-12-11 14:28:46 -08:00
Kazuki Sakamoto 584eb4b164 Add MMNoTitleBarWindowKey and MMUseMouseTime short description 2015-12-11 14:27:50 -08:00
Kazuki Sakamoto f1d0ecd1c8 Merge remote-tracking branch 'vim/master' 2015-12-11 14:15:07 -08:00
Bram Moolenaar 35be4534c0 patch 7.4.969
Problem:    Compiler warnings on Windowx x64 build.
Solution:   Add type casts. (Mike Williams)
2015-12-11 22:38:36 +01:00
Bram Moolenaar b65c749ac5 patch 7.4.968
Problem:    test86 and test87 are flaky in Appveyor.
Solution:   Reduce the count from 8 to 7. (suggested by ZyX)
2015-12-11 20:53:58 +01:00
Bram Moolenaar 6b90351786 patch 7.4.967
Problem:    Cross compilation on MS-windows doesn't work well.
Solution:   Tidy up cross compilation across architectures with Visual Studio.
            (Mike Williams)
2015-12-11 19:38:44 +01:00
Bram Moolenaar 49222bee65 patch 7.4.966
Problem:    Configure doesn't work with a space in a path.
Solution:   Put paths in quotes. (James McCoy, close #525)
2015-12-11 18:11:30 +01:00
Bram Moolenaar 941aea2b97 patch 7.4.965
Problem:    On FreeBSD /dev/fd/ files are special.
Solution:   Use is_dev_fd_file() also for FreeBSD. (Derek Schrock, closes #521)
2015-12-11 17:14:27 +01:00
Bram Moolenaar 91376b6387 patch 7.4.964
Problem:    Test 87 doesn't work in a shadow directory.
Solution:   Handle the extra subdirectory. (James McCoy, closes #515)
2015-12-11 16:17:02 +01:00
Kazuki Sakamoto e387a4c606 Merge pull request #168 from macvim-dev/feature/mousetime
Add MMUseMouseTime, Revise #77
2015-12-09 19:09:53 -08:00
Kazuki Sakamoto cbd8ff0cb4 Add MMUseMouseTime, Revise #77
`MMUseMouseTime` allows to override the time threshold for detecting multiple
mouse down events using Vim `mousetime` option.

    $ defaults write org.vim.MacVim MMUseMouseTime -bool TRUE
2015-12-09 15:02:36 -08:00
Kazuki Sakamoto 11bd9b9b1d Merge pull request #111 from macvim-dev/feature/no_title_bar_window
MMNoTitleBarWindowKey for hiding titlebar
2015-12-08 20:50:53 -08:00
Kazuki Sakamoto fb26de78b0 MMNoTitleBarWindowKey for hiding titlebar 2015-12-07 21:13:47 -08:00
Kazuki Sakamoto f583b11995 MacVim Snapshot 85
Binary targets OS X 10.8(Mountain Lion), 10.9(Mavericks), 10.10(Yosemite), and 10.11(El Capitan)

- Vim patch 7.4.963

Script interfaces have compatibility with these versions

- Lua 5.2
- Perl 5.16
- Python2 2.7
- Python3 3.5
- Ruby 2.0
2015-12-06 20:23:42 -08:00
Kazuki Sakamoto af97d4b7c0 Merge remote-tracking branch 'vim/master' 2015-12-06 20:21:52 -08:00
Bram Moolenaar 1c57fe8b94 patch 7.4.963
Problem:    test_listlbr_utf8 sometimes fails.
Solution:   Don't use a literal multibyte character but <C-V>uXXXX. Do not
            dump the screen highlighting. (Christian Brabandt, closes #518)
2015-12-06 14:53:18 +01:00
Kazuki Sakamoto 5cac77ae5b Merge pull request #166 from macvim-dev/fix/make_distclean
Fix `make distclean` #165
2015-12-05 20:52:27 -08:00
Kazuki Sakamoto 7d8d1fa42e Fix make distclean #165 2015-12-05 20:51:24 -08:00
Kazuki Sakamoto d4ca26fa29 Merge remote-tracking branch 'vim/master' 2015-12-05 20:03:19 -08:00
Bram Moolenaar 2c5e8e80ea Updated runtime files. 2015-12-05 20:59:21 +01:00
Bram Moolenaar 3f12a2421b patch 7.4.962
Problem:    Cannot run the tests with gvim.  Cannot run individual new stests.
Solution:   Add the -f flag. Add new test targets in Makefile.
2015-12-05 20:56:57 +01:00
Bram Moolenaar 9dc2ce398b patch 7.4.961
Problem:    Test107 fails in some circunstances.
Solution:   When using "zt", "zb" and "z=" recompute the fraction.
2015-12-05 19:47:04 +01:00
Kazuki Sakamoto 9bc9c41631 Revert "MacVim Snapshot 85"
This reverts commit be053d2079.
Waiting for Vim Travis-CI fix.
2015-12-04 00:00:22 -08:00
Kazuki Sakamoto be053d2079 MacVim Snapshot 85
Binary targets OS X 10.8(Mountain Lion), 10.9(Mavericks), 10.10(Yosemite), and 10.11(El Capitan)

- Vim patch 7.4.960

Script interfaces have compatibility with these versions

- Lua 5.2
- Perl 5.16
- Python2 2.7
- Python3 3.5
- Ruby 2.0
2015-12-03 23:42:21 -08:00
Kazuki Sakamoto dcafb48694 Merge pull request #164 from macvim-dev/fix/pythonhome_workaround
WORKAROUND: Allow to honor PYTHONHOME environment variable for +python/dyn and +python3/dyn
2015-12-03 23:39:56 -08:00
Kazuki Sakamoto e73d89fed8 WORKAROUND: Allow to honor PYTHONHOME environment variable for +python/dyn and +python3/dyn
It is temporary fix and it may be changed in the future
https://github.com/vim/vim/pull/500

Example:

	let $PYTHONHOME="/usr/local/Frameworks/Python.framework/Versions/2.7"
	set pythondll=/usr/local/Frameworks/Python.framework/Versions/2.7/Python
2015-12-03 23:36:01 -08:00
Kazuki Sakamoto d8ddc5d860 Merge remote-tracking branch 'vim/master' 2015-12-03 20:07:42 -08:00
Bram Moolenaar 90f5d0a5c3 patch 7.4.960
Problem:    Detecting every version of nmake is clumsy.
Solution:   Use a tiny C program to get the version of _MSC_VER. (Ken Takata)
2015-12-03 22:37:21 +01:00
Bram Moolenaar 0379d01c52 patch 7.4.959
Problem:    When setting 'term' the clipboard ownership is lost.
Solution:   Do not call clip_init(). (James McCoy)
2015-12-03 21:17:24 +01:00
Bram Moolenaar e1a61991d9 patch 7.4.958
Problem:    Vim checks if the directory "$TMPDIR" exists.
Solution:   Do not check if the name starts with "$".
2015-12-03 21:02:27 +01:00
Bram Moolenaar bc96c29ffc patch 7.4.957
Problem:    Test_tagcase fails when using another language than English.
Solution:   Set the messages language to C. (Kenichi Ito)
2015-12-03 20:46:20 +01:00
Bram Moolenaar f882d9f89d patch 7.4.956
Problem:    A few more file name extensions not recognized.
Solution:   Add .asciidoc, .bzl, .gradle, etc.
2015-12-03 20:18:24 +01:00
Bram Moolenaar 3b8fcd945c patch 7.4.955
Problem:    Vim doesn't recognize .pl6 and .pod6 files.
Solution:   Recognize them as perl6 and pod6. (Mike Eve, closes #511)
2015-12-03 20:14:12 +01:00
chdiza 9b6331eccf Merge pull request #163 from chdiza/master
Merge remote-tracking branch 'vim/master'
2015-12-03 12:13:49 -05:00
Bram Moolenaar f609dcf8c1 patch 7.4.954
Problem:    When using Lua there may be a crash. (issue #468)
Solution:   Avoid using an unitialized tv. (Yukihiro Nakadaira)
2015-12-03 17:43:17 +01:00
chdiza c2a7d0f495 Merge remote-tracking branch 'vim/master' 2015-12-03 11:41:02 -05:00
Bram Moolenaar de0ad40cb3 patch 7.4.953
Problem:    When a test script navigates to another buffer the .res file is
            created with the wrong name.
Solution:   Use the "testname" for the .res file. (Damien)
2015-12-03 17:21:28 +01:00
Bram Moolenaar 6cd1345307 patch 7.4.952
Problem:    'lispwords' is tested in the old way.
Solution:   Make a new style test for 'lispwords'.
2015-12-03 16:54:53 +01:00
Bram Moolenaar b00da1d6d1 patch 7.4.951
Problem:    Sorting number strings does not work as expected. (Luc Hermitte)
Solution:   Add the 'N" argument to sort()
2015-12-03 16:33:12 +01:00
Bram Moolenaar 4649ded287 patch 7.4.950
Problem:    v:errors is not initialized.
Solution:   Initialze it to an empty list. (Thinca)
2015-12-03 14:55:55 +01:00
Bram Moolenaar 32a214e78d patch 7.4.949
Problem:    When using 'colorcolumn' and there is a sign with a fullwidth
            character the highlighting is wrong. (Andrew Stewart)
Solution:   Only increment vcol when in the right state. (Christian Brabandt)
2015-12-03 14:29:02 +01:00
Bram Moolenaar 20ad69ccfb patch 7.4.948
Problem:    Can't build when the insert_expand feature is disabled.
Solution:   Add #ifdefs. (Dan Pasanen, closes #499)
2015-12-03 13:52:52 +01:00
Kazuki Sakamoto f3b74dd116 Merge remote-tracking branch 'vim/master' 2015-12-02 17:26:10 -08:00
Bram Moolenaar 5311c02f25 patch 7.4.947
Problem:    Test_listchars fails with MingW. (Michael Soyka)
Solution:   Add the test to the ones that need the fileformat fixed.
            (Christian Brabandt)
2015-12-01 20:19:26 +01:00
Bram Moolenaar bbfbaf9741 patch 7.4.946
Problem:    Missing changes in source file.
Solution:   Include changes to the eval.c file.
2015-12-01 15:32:56 +01:00
Bram Moolenaar 683fa185a4 patch 7.4.945
Problem:    New style testing is incomplete.
Solution:   Add the runtest script to the list of distributed files.
            Add the new functions to the function overview.
            Rename the functions to match Vim function style.
            Move undolevels testing into a new style test script.
2015-11-30 21:38:24 +01:00
Bram Moolenaar 43345546ae patch 7.4.944
Problem:    Writing tests for Vim script is hard.
Solution:   Add assertEqual(), assertFalse() and assertTrue() functions.  Add
            the v:errors variable.  Add the runtest script. Add a first new
            style test script.
2015-11-29 17:35:35 +01:00
Bram Moolenaar 48a969b488 patch 7.4.943
Problem:    Tests are not run.
Solution:   Add test_writefile to makefiles. (Ken Takata)
2015-11-28 14:29:26 +01:00
Bram Moolenaar 60422e68a3 patch 7.4.942
Problem:    test_tagcase breaks for small builds.
Solution:   Bail out of the test early. (Hirohito Higashi)
2015-11-25 23:53:01 +01:00
Bram Moolenaar d042dc825c Update runtime files. 2015-11-24 19:18:36 +01:00
Bram Moolenaar 0f6562e903 patch 7.4.941
Problem:    There is no way to ignore case only for tag searches.
Solution:   Add the 'tagcase' option. (Gary Johnson)
2015-11-24 18:48:14 +01:00
Bram Moolenaar 2a1b474fd8 patch 7.4.940
Problem:    vt52 terminal codes are not correct.
Solution:   Move entries outside of #if. (Random)  Adjustments based on
            documented codes.
2015-11-24 18:15:51 +01:00
Bram Moolenaar 9a7d58e42e patch 7.4.939
Problem:    Memory leak when encountering a syntax error.
Solution:   Free the memory. (Dominique Pelle)
2015-11-24 17:23:56 +01:00
Bram Moolenaar 88e484bf1b patch 7.4.938
Problem:    X11 and GTK have moure mouse buttons than Vim supports.
Solution:   Recognize more mouse buttons. (Benoit Pierre, closes #498)
2015-11-24 15:38:44 +01:00
Bram Moolenaar 5ad075c073 patch 7.4.937
Problem:    Segfault reading unitialized memory.
Solution:   Do not read match \z0, it does not exist. (Marius Gedminas, closes
            #497)
2015-11-24 15:18:32 +01:00
Kazuki Sakamoto 58bee8934a MacVim Snapshot 84
Binary targets OS X 10.8(Mountain Lion), 10.9(Mavericks), 10.10(Yosemite), and 10.11(El Capitan)

- Vim patch 7.4.936
- Fix to enable graphical sign
- Update the default Python 2.7 dylib path

Script interfaces have compatibility with these versions

- Lua 5.2
- Perl 5.16
- Python2 2.7
- Python3 3.5
- Ruby 2.0
2015-11-23 15:50:04 -08:00
Kazuki Sakamoto 9c9ec4df08 Update .travis.yml for MacVim
Update Perl dylib loading path
2015-11-23 15:49:01 -08:00
Kazuki Sakamoto 38ab2dea50 Merge pull request #157 from macvim-dev/fix/graphical_sign
Fix graphical sign with Core Text Renderer
2015-11-22 20:34:25 -08:00
Kazuki Sakamoto 3377163679 Fix graphical sign with Core Text Renderer
The defaults doesn't have MMRenderer key in default.
2015-11-22 19:44:39 -08:00
Kazuki Sakamoto 93e95cbbbe Merge remote-tracking branch 'vim/master' 2015-11-22 16:11:45 -08:00
Bram Moolenaar 294a7e55b0 patch 7.4.936
Problem:    Crash when dragging with the mouse.
Solution:   Add safety check for NULL pointer. Check mouse position for valid
            value. (Hirohito Higashi)
2015-11-22 19:39:38 +01:00
Bram Moolenaar 6040256d8b patch 7.4.935
Problem:    test_utf8 fails on MS-Windows when executed with gvim.
Solution:   Use the insert flag on feedkeys() to put the string before the
            ":" that was already read when checking for available chars.
2015-11-22 15:08:59 +01:00
Kazuki Sakamoto e6715e43c1 Merge remote-tracking branch 'vim/master' 2015-11-21 19:41:39 -08:00
Kazuki Sakamoto b04e8e1d96 Merge pull request #154 from macvim-dev/fix/beginSheetModalForWindow_warning
Fix beginSheetModalForWindow warning in a proper way
2015-11-21 18:20:12 -08:00
Bram Moolenaar 7487792ab1 patch 7.4.934
Problem:    Appveyor also builds on a tag push.
Solution:   Add a skip_tags line. (Kenichi Ito, closes #489)
2015-11-21 17:15:33 +01:00
Bram Moolenaar e4eda3bc71 patch 7.4.933
Problem:    Crash when using longest completion match.
Solution:   Fix array index.
2015-11-21 16:28:50 +01:00
Bram Moolenaar 8f08dab18d patch 7.4.932
Problem:    test_utf8 has confusing dummy command.
Solution:   Use a real command instead of a colon.
2015-11-21 14:31:33 +01:00
Bram Moolenaar cfcd1ddd10 patch 7.4.931
Problem:    Test 94 fails on some systems.
Solution:   Set 'encoding' to utf-8.
2015-11-21 14:24:50 +01:00
Kazuki Sakamoto 9fdf3dc2fb Fix beginSheetModalForWindow warning in a proper way 2015-11-20 23:51:27 -08:00
102 changed files with 5602 additions and 686 deletions
+6 -1
View File
@@ -97,8 +97,13 @@ src/MacVim/PSMTabBarControl/PSMTabBarControl.xcodeproj/*.mode1v3
src/MacVim/PSMTabBarControl/PSMTabBarControl.xcodeproj/*.pbxuser
src/MacVim/PSMTabBarControl/PSMTabBarControl.xcodeproj/xcuserdata
src/MacVim/PSMTabBarControl/build
src/MacVim/PSMTabBarControl/build
src/MacVim/qlstephen/QuickLookStephen.xcodeproj/*.mode1
src/MacVim/qlstephen/QuickLookStephen.xcodeproj/*.mode1v3
src/MacVim/qlstephen/QuickLookStephen.xcodeproj/*.pbxuser
src/MacVim/qlstephen/QuickLookStephen.xcodeproj/xcuserdata
src/MacVim/qlstephen/build
src/MacVim/build
src/MacVim/DerivedData
src/TAGS
src/Vim
src/auto/config.cache
+2
View File
@@ -15,6 +15,7 @@ env:
vi_cv_path_python3=/usr/local/bin/python3
vi_cv_path_plain_lua=/usr/local/bin/lua
vi_cv_dll_name_perl=/System/Library/Perl/5.16/darwin-thread-multi-2level/CORE/libperl.dylib
vi_cv_dll_name_python=/System/Library/Frameworks/Python.framework/Versions/2.7/Python
vi_cv_dll_name_python3=/usr/local/Frameworks/Python.framework/Versions/3.5/Python
"CONFOPT='--with-features=huge --enable-multibyte --enable-netbeans --with-tlib=ncurses --enable-cscope --enable-perlinterp=dynamic --enable-pythoninterp=dynamic --enable-python3interp=dynamic --enable-rubyinterp=dynamic --enable-luainterp=dynamic --with-lua-prefix=/usr/local --enable-gui=macvim'"
@@ -29,6 +30,7 @@ script:
- NPROC=$(getconf _NPROCESSORS_ONLN)
- ./configure $CONFOPT --enable-fail-if-missing
- grep -q -- "-DDYNAMIC_PERL_DLL=\\\\\"$vi_cv_dll_name_perl\\\\\"" src/auto/config.mk
- 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
- cat src/auto/config.mk
+1
View File
@@ -87,6 +87,7 @@ SRC_ALL = \
src/testdir/README.txt \
src/testdir/*.in \
src/testdir/sautest/autoload/*.vim \
src/testdir/runtest.vim \
src/testdir/test[0-9]*.ok \
src/testdir/test[0-9]*a.ok \
src/testdir/test_[a-z]*.ok \
+2
View File
@@ -1,5 +1,7 @@
version: "{build}"
skip_tags: true
before_build:
- '"C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 /release'
+49 -2
View File
@@ -1,4 +1,4 @@
*eval.txt* For Vim version 7.4. Last change: 2015 Sep 19
*eval.txt* For Vim version 7.4. Last change: 2015 Dec 03
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1379,6 +1379,15 @@ v:errmsg Last given error message. It's allowed to set this variable.
: ... handle error
< "errmsg" also works, for backwards compatibility.
*v:errors* *errors-variable*
v:errors Errors found by assert functions, such as |assert_true()|.
This is a list of strings.
The assert functions append an item when an assert fails.
To remove old results make it empty: >
:let v:errors = []
< If v:errors is set to anything but a list it is made an empty
list by the assert function.
*v:exception* *exception-variable*
v:exception The value of the exception most recently caught and not
finished. See also |v:throwpoint| and |throw-variables|.
@@ -1733,10 +1742,13 @@ append( {lnum}, {string}) Number append {string} below line {lnum}
append( {lnum}, {list}) Number append lines {list} below line {lnum}
argc() Number number of files in the argument list
argidx() Number current index in the argument list
arglistid( [{winnr}, [ {tabnr}]])
arglistid( [{winnr} [, {tabnr}]])
Number argument list id
argv( {nr}) String {nr} entry of the argument list
argv( ) List the argument list
assert_equal( {exp}, {act} [, {msg}]) none assert that {exp} equals {act}
assert_false( {actual} [, {msg}]) none assert that {actual} is false
assert_true( {actual} [, {msg}]) none assert that {actual} is true
asin( {expr}) Float arc sine of {expr}
atan( {expr}) Float arc tangent of {expr}
atan2( {expr}, {expr}) Float arc tangent of {expr1} / {expr2}
@@ -2154,6 +2166,37 @@ argv([{nr}]) The result is the {nr}th file in the argument list of the
< Without the {nr} argument a |List| with the whole |arglist| is
returned.
*assert_equal()*
assert_equal({expected}, {actual}, [, {msg}])
When {expected} and {actual} are not equal an error message is
added to |v:errors|.
There is no automatic conversion, the String "4" is different
from the Number 4. And the number 4 is different from the
Float 4.0. The value of 'ignorecase' is not used here, case
always matters.
When {msg} is omitted an error in the form "Expected
{expected} but got {actual}" is produced.
Example: >
assert_equal('foo', 'bar')
< Will result in a string to be added to |v:errors|:
test.vim line 12: Expected 'foo' but got 'bar' ~
assert_false({actual}, [, {msg}]) *assert_false()*
When {actual} is not false an error message is added to
|v:errors|, like with |assert_equal()|..
A value is false when it is zero. When "{actual}" is not a
number the assert fails.
When {msg} is omitted an error in the form "Expected False but
got {actual}" is produced.
assert_true({actual}, [, {msg}]) *assert_true()*
When {actual} is not true an error message is added to
|v:errors|, like with |assert_equal()|..
A value is true when it is a non-zeron number. When {actual}
is not a number the assert fails.
When {msg} is omitted an error in the form "Expected True but
got {actual}" is produced.
asin({expr}) *asin()*
Return the arc sine of {expr} measured in radians, as a |Float|
in the range of [-pi/2, pi/2].
@@ -5760,6 +5803,10 @@ sort({list} [, {func} [, {dict}]]) *sort()* *E702*
strtod() function to parse numbers, Strings, Lists, Dicts and
Funcrefs will be considered as being 0).
When {func} is given and it is 'N' then all items will be
sorted numerical. This is like 'n' but a string containing
digits will be used as the number they represent.
When {func} is a |Funcref| or a function name, this function
is called to compare items. The function is invoked with two
items as argument and must return zero if they are equal, 1 or
+6 -2
View File
@@ -1,4 +1,4 @@
*filetype.txt* For Vim version 7.4. Last change: 2013 Dec 15
*filetype.txt* For Vim version 7.4. Last change: 2015 Nov 28
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -552,7 +552,7 @@ Local mappings:
to the end of the file in Normal mode. This means "> " is inserted in
each line.
MAN *ft-man-plugin* *:Man*
MAN *ft-man-plugin* *:Man* *man.vim*
Displays a manual page in a nice way. Also see the user manual
|find-manpage|.
@@ -577,6 +577,10 @@ Global mapping:
Local mappings:
CTRL-] Jump to the manual page for the word under the cursor.
CTRL-T Jump back to the previous manual page.
q Same as ":quit"
To enable folding use this: >
let g:ft_man_folding_enable = 1
PDF *ft-pdf-plugin*
+15 -3
View File
@@ -1,4 +1,4 @@
*fold.txt* For Vim version 7.4. Last change: 2013 Dec 04
*fold.txt* For Vim version 7.4. Last change: 2015 Nov 24
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -97,9 +97,9 @@ These are the conditions with which the expression is evaluated:
lowest.
"=" use fold level from the previous line
"a1", "a2", .. add one, two, .. to the fold level of the previous
line
line, use the result for the current line
"s1", "s2", .. subtract one, two, .. from the fold level of the
previous line
previous line, use the result for the next line
"<1", "<2", .. a fold with this level ends at this line
">1", ">2", .. a fold with this level starts at this line
@@ -122,6 +122,18 @@ method can be very slow!
Try to avoid the "=", "a" and "s" return values, since Vim often has to search
backwards for a line for which the fold level is defined. This can be slow.
An example of using "a1" and "s1": For a multi-line C comment, a line
containing "/*" would return "a1" to start a fold, and a line containing "*/"
would return "s1" to end the fold after that line: >
if match(thisline, '/\*') >= 0
return 'a1'
elseif match(thisline, '\*/') >= 0
return 's1'
else
return '='
endif
However, this won't work for single line comments, strings, etc.
|foldlevel()| can be useful to compute a fold level relative to a previous
fold level. But note that foldlevel() may return -1 if the level is not known
yet. And it returns the level at the start of the line, while a fold might
+2
View File
@@ -259,6 +259,7 @@ MMDialogsTrackPwd open/save dialogs track the Vim pwd [bool]
MMLoginShellArgument login shell parameter [string]
MMLoginShellCommand which shell to use to launch Vim [string]
MMNoFontSubstitution disable automatic font substitution [bool]
MMNoTitleBarWindow hide title bar [bool]
MMShowAddTabButton enable "add tab" button on tabline [bool]
MMTabMaxWidth maximum width of a tab [int]
MMTabMinWidth minimum width of a tab [int]
@@ -269,6 +270,7 @@ MMTextInsetRight text area offset in pixels [int]
MMTextInsetTop text area offset in pixels [int]
MMTexturedWindow use brushed metal window (Tiger only) [bool]
MMTranslateCtrlClick interpret ctrl-click as right-click [bool]
MMUseMouseTime use mousetime to detect multiple clicks [bool]
MMVerticalSplit files open in vertical splits [bool]
MMZoomBoth zoom button maximizes both directions [bool]
+3 -3
View File
@@ -1,4 +1,4 @@
*hangulin.txt* For Vim version 7.4. Last change: 2015 Nov 10
*hangulin.txt* For Vim version 7.4. Last change: 2015 Nov 24
VIM REFERENCE MANUAL by Chi-Deok Hwang and Sung-Hyun Nam
@@ -34,7 +34,7 @@ If you set LC_ALL variable, it should be set to Korean locale also.
VIM resource
------------
You may want to set 'encoding' and 'fileencodings'.
Next are examples:
Next are examples: >
:set encoding=euc-kr
:set encoding=utf-8
@@ -54,7 +54,7 @@ If both are set, VIM_KEYBOARD has higher priority.
Hangul Fonts
------------
If you use GTK version of GVIM, you should set 'guifont' and 'guifontwide'.
For example:
For example: >
set guifont=Courier\ 12
set guifontwide=NanumGothicCoding\ 12
+26 -26
View File
@@ -1,4 +1,4 @@
*if_ruby.txt* For Vim version 7.4. Last change: 2015 Oct 16
*if_ruby.txt* For Vim version 7.4. Last change: 2015 Dec 03
VIM REFERENCE MANUAL by Shugo Maeda
@@ -7,9 +7,9 @@ The Ruby Interface to Vim *ruby* *Ruby*
1. Commands |ruby-commands|
2. The VIM module |ruby-vim|
3. VIM::Buffer objects |ruby-buffer|
4. VIM::Window objects |ruby-window|
2. The Vim module |ruby-vim|
3. Vim::Buffer objects |ruby-buffer|
4. Vim::Window objects |ruby-window|
5. Global variables |ruby-globals|
6. Dynamic loading |ruby-dynamic|
@@ -47,7 +47,7 @@ Example Vim script: >
ruby << EOF
class Garnet
def initialize(s)
@buffer = VIM::Buffer.current
@buffer = Vim::Buffer.current
vimputs(s)
end
def vimputs(s)
@@ -74,19 +74,19 @@ Example Vim script: >
Executing Ruby commands is not possible in the |sandbox|.
==============================================================================
2. The VIM module *ruby-vim*
2. The Vim module *ruby-vim*
Ruby code gets all of its access to vim via the "VIM" module.
Ruby code gets all of its access to vim via the "Vim" module.
Overview >
Overview: >
print "Hello" # displays a message
VIM.command(cmd) # execute an Ex command
num = VIM::Window.count # gets the number of windows
w = VIM::Window[n] # gets window "n"
cw = VIM::Window.current # gets the current window
num = VIM::Buffer.count # gets the number of buffers
b = VIM::Buffer[n] # gets buffer "n"
cb = VIM::Buffer.current # gets the current buffer
Vim.command(cmd) # execute an Ex command
num = Vim::Window.count # gets the number of windows
w = Vim::Window[n] # gets window "n"
cw = Vim::Window.current # gets the current window
num = Vim::Buffer.count # gets the number of buffers
b = Vim::Buffer[n] # gets buffer "n"
cb = Vim::Buffer.current # gets the current buffer
w.height = lines # sets the window height
w.cursor = [row, col] # sets the window cursor position
pos = w.cursor # gets an array [row, col]
@@ -96,29 +96,29 @@ Overview >
b[n] = str # sets a line in the buffer
b.delete(n) # deletes a line
b.append(n, str) # appends a line after n
line = VIM::Buffer.current.line # gets the current line
num = VIM::Buffer.current.line_number # gets the current line number
VIM::Buffer.current.line = "test" # sets the current line number
line = Vim::Buffer.current.line # gets the current line
num = Vim::Buffer.current.line_number # gets the current line number
Vim::Buffer.current.line = "test" # sets the current line number
<
Module Functions:
*ruby-message*
VIM::message({msg})
Vim::message({msg})
Displays the message {msg}.
*ruby-set_option*
VIM::set_option({arg})
Vim::set_option({arg})
Sets a vim option. {arg} can be any argument that the ":set" command
accepts. Note that this means that no spaces are allowed in the
argument! See |:set|.
*ruby-command*
VIM::command({cmd})
Vim::command({cmd})
Executes Ex command {cmd}.
*ruby-evaluate*
VIM::evaluate({expr})
Vim::evaluate({expr})
Evaluates {expr} using the vim internal expression evaluator (see
|expression|). Returns the expression result as:
- a Integer if the Vim expression evaluates to a number
@@ -129,9 +129,9 @@ VIM::evaluate({expr})
Dictionaries and lists are recursively expanded.
==============================================================================
3. VIM::Buffer objects *ruby-buffer*
3. Vim::Buffer objects *ruby-buffer*
VIM::Buffer objects represent vim buffers.
Vim::Buffer objects represent vim buffers.
Class Methods:
@@ -159,9 +159,9 @@ line_number Returns the number of the current line if the buffer is
active.
==============================================================================
4. VIM::Window objects *ruby-window*
4. Vim::Window objects *ruby-window*
VIM::Window objects represent vim windows.
Vim::Window objects represent vim windows.
Class Methods:
+26 -13
View File
@@ -1,4 +1,4 @@
*options.txt* For Vim version 7.4. Last change: 2015 Nov 11
*options.txt* For Vim version 7.4. Last change: 2015 Nov 23
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -4218,7 +4218,7 @@ A jump table for the options with a short description can be found at |Q_op|.
global
Ignore case in search patterns. Also used when searching in the tags
file.
Also see 'smartcase'.
Also see 'smartcase' and 'tagcase'.
Can be overruled by using "\c" or "\C" in the pattern, see
|/ignorecase|.
@@ -7475,19 +7475,22 @@ A jump table for the options with a short description can be found at |Q_op|.
< [The whitespace before and after the '0' must be a single <Tab>]
When a binary search was done and no match was found in any of the
files listed in 'tags', and 'ignorecase' is set or a pattern is used
files listed in 'tags', and case is ignored or a pattern is used
instead of a normal tag name, a retry is done with a linear search.
Tags in unsorted tags files, and matches with different case will only
be found in the retry.
If a tag file indicates that it is case-fold sorted, the second,
linear search can be avoided for the 'ignorecase' case. Use a value
of '2' in the "!_TAG_FILE_SORTED" line for this. A tag file can be
case-fold sorted with the -f switch to "sort" in most unices, as in
the command: "sort -f -o tags tags". For "Exuberant ctags" version
5.x or higher (at least 5.5) the --sort=foldcase switch can be used
for this as well. Note that case must be folded to uppercase for this
to work.
linear search can be avoided when case is ignored. Use a value of '2'
in the "!_TAG_FILE_SORTED" line for this. A tag file can be case-fold
sorted with the -f switch to "sort" in most unices, as in the command:
"sort -f -o tags tags". For "Exuberant ctags" version 5.x or higher
(at least 5.5) the --sort=foldcase switch can be used for this as
well. Note that case must be folded to uppercase for this to work.
By default, tag searches are case-sensitive. Case is ignored when
'ignorecase' is set and 'tagcase' is "followic", or when 'tagcase' is
"ignore".
When 'tagbsearch' is off, tags searching is slower when a full match
exists, but faster when no full match exists. Tags in unsorted tags
@@ -7499,6 +7502,16 @@ A jump table for the options with a short description can be found at |Q_op|.
command-line completion and ":help").
{Vi: always uses binary search in some versions}
*'tagcase'* *'tc'*
'tagcase' 'tc' string (default "followic")
global or local to buffer |global-local|
{not in Vi}
This option specifies how case is handled when searching the tags
file:
followic Follow the 'ignorecase' option
ignore Ignore case
match Match case
*'taglength'* *'tl'*
'taglength' 'tl' number (default 0)
global
@@ -8212,9 +8225,9 @@ A jump table for the options with a short description can be found at |Q_op|.
% When included, save and restore the buffer list. If Vim is
started with a file name argument, the buffer list is not
restored. If Vim is started without a file name argument, the
buffer list is restored from the viminfo file. Buffers
without a file name and buffers for help files are not written
to the viminfo file.
buffer list is restored from the viminfo file. Quickfix
('buftype'), unlisted ('buflisted'), unnamed and buffers on
removable media (|viminfo-r|) are not saved.
When followed by a number, the number specifies the maximum
number of buffers that are stored. Without a number all
buffers are stored.
+1
View File
@@ -909,6 +909,7 @@ Short explanation of each option: *option-list*
'tabpagemax' 'tpm' maximum number of tab pages for |-p| and "tab all"
'tabstop' 'ts' number of spaces that <Tab> in file uses
'tagbsearch' 'tbs' use binary searching in tags files
'tagcase' 'tc' how to handle case when searching in tags files
'taglength' 'tl' number of significant characters for a tag
'tagrelative' 'tr' file names in tag file are relative
'tags' 'tag' list of file names used by the tag command
+9
View File
@@ -1036,6 +1036,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
'tabstop' options.txt /*'tabstop'*
'tag' options.txt /*'tag'*
'tagbsearch' options.txt /*'tagbsearch'*
'tagcase' options.txt /*'tagcase'*
'taglength' options.txt /*'taglength'*
'tagrelative' options.txt /*'tagrelative'*
'tags' options.txt /*'tags'*
@@ -1046,6 +1047,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
'tbidi' options.txt /*'tbidi'*
'tbis' options.txt /*'tbis'*
'tbs' options.txt /*'tbs'*
'tc' options.txt /*'tc'*
'tenc' options.txt /*'tenc'*
'term' options.txt /*'term'*
'termbidi' options.txt /*'termbidi'*
@@ -4949,6 +4951,9 @@ asin() eval.txt /*asin()*
asm.vim syntax.txt /*asm.vim*
asm68k syntax.txt /*asm68k*
asmh8300.vim syntax.txt /*asmh8300.vim*
assert_equal() eval.txt /*assert_equal()*
assert_false() eval.txt /*assert_false()*
assert_true() eval.txt /*assert_true()*
at motion.txt /*at*
atan() eval.txt /*atan()*
atan2() eval.txt /*atan2()*
@@ -5643,6 +5648,7 @@ errorformat-multi-line quickfix.txt /*errorformat-multi-line*
errorformat-separate-filename quickfix.txt /*errorformat-separate-filename*
errorformats quickfix.txt /*errorformats*
errors message.txt /*errors*
errors-variable eval.txt /*errors-variable*
escape intro.txt /*escape*
escape() eval.txt /*escape()*
escape-bar version4.txt /*escape-bar*
@@ -7000,6 +7006,7 @@ mail.vim syntax.txt /*mail.vim*
maillist intro.txt /*maillist*
maillist-archive intro.txt /*maillist-archive*
make.vim syntax.txt /*make.vim*
man.vim filetype.txt /*man.vim*
manual-copyright usr_01.txt /*manual-copyright*
map() eval.txt /*map()*
map-<SID> map.txt /*map-<SID>*
@@ -8526,6 +8533,7 @@ terminal-info term.txt /*terminal-info*
terminal-options term.txt /*terminal-options*
terminfo term.txt /*terminfo*
termresponse-variable eval.txt /*termresponse-variable*
test-functions usr_41.txt /*test-functions*
tex-cchar syntax.txt /*tex-cchar*
tex-cole syntax.txt /*tex-cole*
tex-conceal syntax.txt /*tex-conceal*
@@ -8675,6 +8683,7 @@ v:count1 eval.txt /*v:count1*
v:ctype eval.txt /*v:ctype*
v:dying eval.txt /*v:dying*
v:errmsg eval.txt /*v:errmsg*
v:errors eval.txt /*v:errors*
v:exception eval.txt /*v:exception*
v:fcs_choice eval.txt /*v:fcs_choice*
v:fcs_reason eval.txt /*v:fcs_reason*
+18 -13
View File
@@ -85,11 +85,13 @@ changed, to avoid confusion when using ":tnext". It is changed when using
":tag {ident}".
The ignore-case matches are not found for a ":tag" command when the
'ignorecase' option is off. They are found when a pattern is used (starting
with a "/") and for ":tselect", also when 'ignorecase' is off. Note that
using ignore-case tag searching disables binary searching in the tags file,
which causes a slowdown. This can be avoided by fold-case sorting the tag
file. See the 'tagbsearch' option for an explanation.
'ignorecase' option is off and 'tagcase' is "followic" or when 'tagcase' is
"match". They are found when a pattern is used (starting with a "/") and for
":tselect", also when 'ignorecase' is off and 'tagcase' is "followic" or when
'tagcase' is "match". Note that using ignore-case tag searching disables
binary searching in the tags file, which causes a slowdown. This can be
avoided by fold-case sorting the tag file. See the 'tagbsearch' option for an
explanation.
==============================================================================
2. Tag stack *tag-stack* *tagstack* *E425*
@@ -440,12 +442,13 @@ file "tags". It can also be used to access a common tags file.
The next file in the list is not used when:
- A matching static tag for the current buffer has been found.
- A matching global tag has been found.
This also depends on the 'ignorecase' option. If it is off, and the tags file
only has a match without matching case, the next tags file is searched for a
match with matching case. If no tag with matching case is found, the first
match without matching case is used. If 'ignorecase' is on, and a matching
global tag with or without matching case is found, this one is used, no
further tags files are searched.
This also depends on whether case is ignored. Case is ignored when
'ignorecase' is set and 'tagcase' is "followic", or when 'tagcase' is
"ignore". If case is not ignored, and the tags file only has a match without
matching case, the next tags file is searched for a match with matching case.
If no tag with matching case is found, the first match without matching case
is used. If case is ignored, and a matching global tag with or without
matching case is found, this one is used, no further tags files are searched.
When a tag file name starts with "./", the '.' is replaced with the path of
the current file. This makes it possible to use a tags file in the directory
@@ -579,8 +582,10 @@ that indicates if the file was sorted. When this line is found, Vim uses
binary searching for the tags file:
!_TAG_FILE_SORTED<Tab>1<Tab>{anything} ~
A tag file may be case-fold sorted to avoid a linear search when 'ignorecase'
is on. See 'tagbsearch' for details. The value '2' should be used then:
A tag file may be case-fold sorted to avoid a linear search when case is
ignored. (Case is ignored when 'ignorecase' is set and 'tagcase' is
"followic", or when 'tagcase' is "ignore".) See 'tagbsearch' for details.
The value '2' should be used then:
!_TAG_FILE_SORTED<Tab>2<Tab>{anything} ~
The other tag that Vim recognizes, but only when compiled with the
+2 -2
View File
@@ -1,4 +1,4 @@
*term.txt* For Vim version 7.4. Last change: 2015 Jun 25
*term.txt* For Vim version 7.4. Last change: 2015 Nov 24
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -852,7 +852,7 @@ Mouse clicks can be mapped. The codes for mouse clicks are:
The X1 and X2 buttons refer to the extra buttons found on some mice. The
'Microsoft Explorer' mouse has these buttons available to the right thumb.
Currently X1 and X2 only work on Win32 environments.
Currently X1 and X2 only work on Win32 and X11 environments.
Examples: >
:noremap <MiddleMouse> <LeftMouse><MiddleMouse>
+52 -29
View File
@@ -1,4 +1,4 @@
*todo.txt* For Vim version 7.4. Last change: 2015 Nov 19
*todo.txt* For Vim version 7.4. Last change: 2015 Dec 05
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -35,9 +35,6 @@ not be repeated below, unless there is extra information.
-------------------- Known bugs and current work -----------------------
Regexp problems:
- Instructions for reproducing issue #465 (crash in nfa_regtry):
https://github.com/mgedmin/vim-bug-465
More info on the issue
- The regexp engines are not reentrant, causing havoc when interrupted by a
remote expression or something else. Move global variables onto the stack
or into an allocated struct.
@@ -76,7 +73,13 @@ Regexp problems:
- this doesn't work: "syntax match ErrorMsg /.\%9l\%>20c\&\%<28c/". Leaving
out the \& works. Seems any column check after \& fails.
- The pattern "\1" with the old engine gives E65, with the new engine it
matches the empty string. (Dominique Pelle, 2015 Oct 2)
matches the empty string. (Dominique Pelle, 2015 Oct 2, Nov 24)
English spell file has an encoding error in the affix file.
Perhaps use the files from here:
https://github.com/marcoagpinto/aoo-mozilla-en-dict
Patch to enable clipboard with MSYS2. (Ken Takata, 2015 Nov 26)
Still using freed memory after using setloclist(). (lcd, 2014 Jul 23)
More info Jul 24. Not clear why.
@@ -93,23 +96,32 @@ Should use /usr/local/share/applications or /usr/share/applications.
Or use $XDG_DATA_DIRS.
Also need to run update-desktop-database (Kuriyama Kazunobu, 2015 Nov 4)
test107 fails when run in the GUI on Linux.
Access to uninitialized memory in match_backref() regexp_nda.c:4882
(Dominique Pelle, 2015 Nov 6)
Netrw update. (Charles 2015 Oct 23)
Patch to fix test_listchars for MingW. (Christian Brabandt, 2015 Nov 29)
Patch to not set the python home if $PYTHONHOME is set. (Kazuki Sakamoto,
2015 Nov 24)
Patch to use local value of 'errorformat' in :cexpr. (Christian Brabandt,
2015 Oct 16) Only do this for :lexpr ?
Update Oracle syntax file from:
https://github.com/chrisbra/vim-sqloracle-syntax/blob/master/syntax/sqloracle.vim
":cd C:\Windows\System32\drivers\etc*" does not work, even though the
directory exists. (Sergio Gallelli, 2013 Dec 29)
Better changelog syntax file. (Martin Florian, 2015 Oct 25)
Patch to make fnamemodify() work better with Cygwin. (Wily Wampa, 2015 Nov 28,
issue 505)
Better readline syntax file. (Raphael Bazaud, 2015 Oct 25)
Patch to fix mc_FullName() on root directory. (Milly, 2015 Nov 24, Issue 501)
Patch to make matchparen restore curswant properly. (Christian Brabandt, 2015
Nov 26)
Test 17 does not clean up the directory it creates. (Michael Soyka, 2015 Nov
28)
English spell checking has an error. Updating doesn't work.
(Dominique Pelle, 2015 Oct 15)
@@ -128,6 +140,12 @@ Gvim: when both Tab and CTRL-I are mapped, use CTRL-I not for Tab.
Unexpected delay when using CTRL-O u. It's not timeoutlen.
(Gary Johnson, 2015 Aug 28)
Patch for tee on Windows. (Yasuhiro Matsumoto, 2015 Nov 30)
Update Dec 1.
Patch to use 256 color setup for all terminals that have 256 colors or more.
#504. (rdebath, 2015 Dec 1)
Instead of separately uploading patches to the ftp site, can we get them from
github? This URL works:
https://github.com/vim/vim/compare/v7.4.920%5E...v7.4.920.diff
@@ -135,24 +153,24 @@ github? This URL works:
Can src/GvimExt/Make_cyg.mak be removed?
Same for src/xxd/Make_cyg.mak
Patch to replace deprecated gdk_pixbuf_new_from_inline(). (Kazunobu Kuriyama,
2015 Nov 30, PR #507)
Updated Fortran files. (Ajit Thakkar, 2015 Nov 30, second one)
Python: ":py raw_input('prompt')" doesn't work. (Manu Hack)
Patch to fix memory leak. (Dominique Pelle, 2015 Nov 4)
Patch to add wordcount(). (Christian Brabandt, 2015 Nov 27)
Plugin to use Vim in MANPAGER. Konfekt, PR #491
Using uninitialized memory. (Dominique Pelle, 2015 Nov 4)
Patch to recognize string slice for variable followed by colon.
(Hirohito Higashi, 2015 Nov 3)
Patch to support hangul input with utf-8.
Patch to support UTF-8 for Hangul. (Shawn Y.H. Kim, 2011 May 1)
Needs more work. Pinged 2012 Jan 4.
(Hirohito Higashi, 2015 Nov 24)
Patch to add debug backtrace. (Alberto Fanjul, 2015 Sep 27)
Asked for :frame command.
vt52 terminal codes are not correct. Patch from Random, 2015 Nov 5.
Update Dec 2.
MS-Windows: When editing a file with a leading space, writing it uses the
wrong name. (Aram, 2014 Nov 7) Vim 7.4.
@@ -160,9 +178,6 @@ wrong name. (Aram, 2014 Nov 7) Vim 7.4.
Can't recognize the $ProgramFiles(x86) environment variable. Recognize it
specifically? First try with the parens, then without.
Patch to add 'tagcase' option, whether to ignore case for tags.
(Gary Johnson, 2015 Nov 6)
Patch to fix "." after CTRL-A in Visual block mode. (Ozaki Kiichi, 2015 Oct
24)
@@ -171,6 +186,9 @@ inconsistent with the documentation.
Patch to add window and tab arguments to getcwd(). (Thinca, 2015 Nov 15)
Patch to build with Python using MSYS2. (Yasuhiro Matsumoto, 2015 Nov 26)
Updated Nov 29.
To support Thai (and other languages) word boundaries, include the ICU
library: http://userguide.icu-project.org/boundaryanalysis
@@ -188,6 +206,9 @@ MS-Windows: Crash opening very long file name starting with "\\".
Patch to add ":syn iskeyword". (Christian Brabandt, 2015 Nov 10)
Patch to use PLATFORM to determine target architecture. (Taro Muraoka, 2015
Nov 29)
If libiconv.dll is not found search for libiconv2.dll. (Yasuhiro Matsumoto,
2015 Oct 7)
@@ -208,6 +229,9 @@ Update Aug 14.
Crash in :cnext on MS-Windows. (Ben Fritz, 2015 Oct 27)
Patch to add GUI colors to the terminal, when it supports it. (ZyX, 2013 Jan
26, update 2013 Dec 14, another 2014 Nov 22)
Patch for problem with restoring screen on Windows. (Nobuhiro Takasaki, 2015
Sep 10)
@@ -229,6 +253,9 @@ ml_updatechunk() is slow when retrying for another encoding. (John Little,
Patch to fix checking global option value when not using it.
(Arnaud Decara, 2015 Jul 23)
Patch to support Python 'None' value in pyeval(). (Damien, 2015 Nov 21)
Need a Vim equivalent of None and a way to test for it.
When 'showbreak' is set repeating a Visual operation counts the size of the
'showbreak' text as part of the operation. (Axel Bender, 2015 Jul 20)
@@ -283,6 +310,7 @@ Mixup of highlighting when there is a match and SpellBad. (ZyX, 2015 Jan 1)
Patch for drag&drop reordering of GUI tab pages reordering.
(Ken Takata, 2013 Nov 22, second one, also by Masamichi Abe)
Now on Git: https://gist.github.com/nocd5/165286495c782b815b94
Patch on Issue 72: 'autochdir' causes problems for :vimgrep.
@@ -294,9 +322,6 @@ When two SIGWINCH arrive very quickly, the second one may be lost.
Make comments in the test Makefile silent. (Kartik Agaram, 2014 Sep 24)
Patch to add GUI colors to the terminal, when it supports it. (ZyX, 2013 Jan
26, update 2013 Dec 14, another 2014 Nov 22)
Patch to improve behavior of dead keys on MS-Windows. (John Wellesz, 2015 Aug
25) https://github.com/vim/vim/pull/399.diff
@@ -514,8 +539,6 @@ Remark on the docs. Should not be a compile time feature. But then what?
Completion of ":e" is ":earlier", should be ":edit". Complete to the matching
command instead of doing this alphabetically. (Mikel Jorgensen)
Patch to get MSVC version in a nicer way. (Ken Takata, 2014 Jul 24)
Patch to define macros for hardcoded values. (Elias Diem, 2013 Dec 14)
Several syntax file match "^\s*" which may get underlined if that's in the
+2 -1
View File
@@ -255,7 +255,8 @@ function.
RELATED ITEMS
You can set 'ignorecase' to make case in tag names be ignored.
To make case in tag names be ignored, you can set 'ignorecase' while leaving
'tagcase' as "followic", or set 'tagcase' to "ignore".
The 'tagbsearch' option tells if the tags file is sorted or not. The default
is to assume a sorted tags file, which makes a tags search a lot faster, but
+6 -1
View File
@@ -1,4 +1,4 @@
*usr_41.txt* For Vim version 7.4. Last change: 2014 Aug 16
*usr_41.txt* For Vim version 7.4. Last change: 2015 Nov 30
VIM USER MANUAL - by Bram Moolenaar
@@ -888,6 +888,11 @@ Mappings: *mapping-functions*
maparg() get rhs of a mapping
wildmenumode() check if the wildmode is active
Testing: *test-functions*
assert_equal() assert that two expressions values are equal
assert_false() assert that an expression is false
assert_true() assert that an expression is true
Various: *various-functions*
mode() get current editing mode
visualmode() last visual mode used
+3 -2
View File
@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2015 Oct 13
" Last Change: 2015 Dec 03
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@@ -1400,7 +1400,7 @@ else
au BufNewFile,BufRead *.pl call s:FTpl()
endif
au BufNewFile,BufRead *.plx,*.al setf perl
au BufNewFile,BufRead *.p6,*.pm6 setf perl6
au BufNewFile,BufRead *.p6,*.pm6,*.pl6 setf perl6
func! s:FTpl()
if exists("g:filetype_pl")
@@ -1429,6 +1429,7 @@ au BufNewFile,BufRead *.pm
" Perl POD
au BufNewFile,BufRead *.pod setf pod
au BufNewFile,BufRead *.pod6 setf pod6
" Php, php3, php4, etc.
" Also Phtml (was used for PHP 2 in the past)
+7 -5
View File
@@ -1,7 +1,8 @@
" Vim filetype plugin file
" Language: generic Changelog file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2014-01-10
" Language: generic Changelog file
" Maintainer: Martin Florian <marfl@posteo.de>
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2015-10-25
" Variables:
" g:changelog_timeformat (deprecated: use g:changelog_dateformat instead) -
" description: the timeformat used in ChangeLog entries.
@@ -167,7 +168,7 @@ if &filetype == 'changelog'
let cursor = stridx(line, '{cursor}')
call setline(lnum, substitute(line, '{cursor}', '', ''))
endif
startinsert!
startinsert
endfunction
" Internal function to create a new entry in the ChangeLog.
@@ -223,7 +224,8 @@ if &filetype == 'changelog'
endfunction
if exists(":NewChangelogEntry") != 2
noremap <buffer> <silent> <Leader>o <Esc>:call <SID>new_changelog_entry('')<CR>
nnoremap <buffer> <silent> <Leader>o :<C-u>call <SID>new_changelog_entry('')<CR>
xnoremap <buffer> <silent> <Leader>o :<C-u>call <SID>new_changelog_entry('')<CR>
command! -nargs=0 NewChangelogEntry call s:new_changelog_entry('')
endif
+6 -1
View File
@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: man
" Maintainer: SungHyun Nam <goweol@gmail.com>
" Last Change: 2014 Dec 29
" Last Change: 2015 Nov 24
" To make the ":Man" command available before editing a manual page, source
" this script from your startup vimrc file.
@@ -33,6 +33,11 @@ if &filetype == "man"
nnoremap <buffer> <c-]> :call <SID>PreGetPage(v:count)<CR>
nnoremap <buffer> <c-t> :call <SID>PopPage()<CR>
nnoremap <buffer> <silent> q :q<CR>
endif
if exists('g:ft_man_folding_enable') && (g:ft_man_folding_enable == 1)
setlocal foldmethod=indent foldnestmax=1 foldenable
endif
let b:undo_ftplugin = "setlocal iskeyword<"
+4
View File
@@ -289,6 +289,10 @@ call append("$", " \tset tl=" . &tl)
call append("$", "tags\tlist of file names to search for tags")
call append("$", "\t(global or local to buffer)")
call <SID>OptionG("tag", &tag)
call append("$", "tagcase\thow to handle case when searching in tags files:")
call append("$", "\t\"followic\" to follow 'ignorecase', \"ignore\" or \"match\"")
call append("$", "\t(global or local to buffer)")
call <SID>OptionG("tc", &tc)
call append("$", "tagrelative\tfile names in a tags file are relative to the tags file")
call <SID>BinOptionG("tr", &tr)
call append("$", "tagstack\ta :tag command will use the tagstack")
+3 -3
View File
@@ -3,7 +3,7 @@
" Maintainer: SungHyun Nam <goweol@gmail.com>
" Previous Maintainer: Gautam H. Mudunuri <gmudunur@informatica.com>
" Version Info:
" Last Change: 2008 Sep 17
" Last Change: 2015 Nov 24
" Additional highlighting by Johannes Tanzler <johannes.tanzler@aon.at>:
" * manSubHeading
@@ -27,8 +27,8 @@ endif
syn case ignore
syn match manReference "\f\+([1-9][a-z]\=)"
syn match manTitle "^\f\+([0-9]\+[a-z]\=).*"
syn match manSectionHeading "^[a-z][a-z ]*[a-z]$"
syn match manSubHeading "^\s\{3\}[a-z][a-z ]*[a-z]$"
syn match manSectionHeading "^[a-z][a-z -]*[a-z]$"
syn match manSubHeading "^\s\{3\}[a-z][a-z -]*[a-z]$"
syn match manOptionDesc "^\s*[+-][a-z0-9]\S*"
syn match manLongOptionDesc "^\s*--[a-z0-9-]\S*"
" syn match manHistory "^[a-z].*last change.*$"
+8 -8
View File
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: php PHP 3/4/5
" Maintainer: Jason Woofenden <jason@jasonwoof.com>
" Last Change: Mar 24, 2015
" Last Change: Nov 23, 2015
" URL: https://jasonwoof.com/gitweb/?p=vim-syntax.git;a=blob;f=php.vim;hb=HEAD
" Former Maintainers: Peter Hodge <toomuchphp-vim@yahoo.com>
" Debian VIM Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
@@ -280,7 +280,7 @@ syn keyword phpStatement return break continue exit goto contained
syn keyword phpKeyword var const contained
" Type
syn keyword phpType bool[ean] int[eger] real double float string array object NULL contained
syn keyword phpType bool boolean int integer real double float string array object NULL contained
" Structure
syn keyword phpStructure namespace extends implements instanceof parent self contained
@@ -393,13 +393,13 @@ endif
" String
if exists("php_parent_error_open")
syn region phpStringDouble matchgroup=None start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@phpAddStrings,phpBackslashSequences,phpBackslashDoubleQuote,@phpInterpDouble contained keepend
syn region phpBacktick matchgroup=None start=+`+ skip=+\\\\\|\\"+ end=+`+ contains=@phpAddStrings,phpIdentifier,phpBackslashSequences,phpIdentifierSimply,phpIdentifierComplex contained keepend
syn region phpStringSingle matchgroup=None start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@phpAddStrings,phpBackslashSingleQuote contained keepend
syn region phpStringDouble matchgroup=phpStringDouble start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@phpAddStrings,phpBackslashSequences,phpBackslashDoubleQuote,@phpInterpDouble contained keepend
syn region phpBacktick matchgroup=phpBacktick start=+`+ skip=+\\\\\|\\"+ end=+`+ contains=@phpAddStrings,phpIdentifier,phpBackslashSequences,phpIdentifierSimply,phpIdentifierComplex contained keepend
syn region phpStringSingle matchgroup=phpStringSingle start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@phpAddStrings,phpBackslashSingleQuote contained keepend
else
syn region phpStringDouble matchgroup=None start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@phpAddStrings,phpBackslashSequences,phpBackslashDoubleQuote,@phpInterpDouble contained extend keepend
syn region phpBacktick matchgroup=None start=+`+ skip=+\\\\\|\\"+ end=+`+ contains=@phpAddStrings,phpIdentifier,phpBackslashSequences,phpIdentifierSimply,phpIdentifierComplex contained extend keepend
syn region phpStringSingle matchgroup=None start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@phpAddStrings,phpBackslashSingleQuote contained keepend extend
syn region phpStringDouble matchgroup=phpStringDouble start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@phpAddStrings,phpBackslashSequences,phpBackslashDoubleQuote,@phpInterpDouble contained extend keepend
syn region phpBacktick matchgroup=phpBacktick start=+`+ skip=+\\\\\|\\"+ end=+`+ contains=@phpAddStrings,phpIdentifier,phpBackslashSequences,phpIdentifierSimply,phpIdentifierComplex contained extend keepend
syn region phpStringSingle matchgroup=phpStringSingle start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@phpAddStrings,phpBackslashSingleQuote contained keepend extend
endif
" HereDoc and NowDoc
+17 -6
View File
@@ -3,7 +3,9 @@
" Maintainer: Jakson Aquino <jalvesaq@gmail.com>
" Former Maintainers: Vaidotas Zemlys <zemlys@gmail.com>
" Tom Payne <tom@tompayne.org>
" Last Change: Wed Dec 31, 2014 12:36AM
" Contributor: Johannes Ranke <jranke@uni-bremen.de>
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
" Last Change: Wed Oct 21, 2015 06:33AM
" Filenames: *.R *.r *.Rhistory *.Rt
"
" NOTE: The highlighting of R functions is defined in
@@ -30,16 +32,21 @@ syn case match
" Comment
syn match rCommentTodo contained "\(BUG\|FIXME\|NOTE\|TODO\):"
syn match rComment contains=@Spell,rCommentTodo "#.*"
syn match rComment contains=@Spell,rCommentTodo,rOBlock "#.*"
" Roxygen
syn match rOKeyword contained "@\(param\|return\|name\|rdname\|examples\|include\|docType\)"
syn region rOBlock start="^\s*\n#\{1,2}' " start="\%^#\{1,2}' " end="^\(#\{1,2}'\)\@!" contains=rOTitle,rOKeyword,rOExamples,@Spell keepend
syn region rOTitle start="^\s*\n#\{1,2}' " start="\%^#\{1,2}' " end="^\(#\{1,2}'\s*$\)\@=" contained contains=rOCommentKey
syn match rOCommentKey "#\{1,2}'" containedin=rOTitle contained
syn region rOExamples start="^#\{1,2}' @examples.*"rs=e+1,hs=e+1 end="^\(#\{1,2}' @.*\)\@=" end="^\(#\{1,2}'\)\@!" contained contains=rOKeyword
syn match rOKeyword contained "@\(param\|return\|name\|rdname\|examples\|example\|include\|docType\)"
syn match rOKeyword contained "@\(S3method\|TODO\|aliases\|alias\|assignee\|author\|callGraphDepth\|callGraph\)"
syn match rOKeyword contained "@\(callGraphPrimitives\|concept\|exportClass\|exportMethod\|exportPattern\|export\|formals\)"
syn match rOKeyword contained "@\(format\|importClassesFrom\|importFrom\|importMethodsFrom\|import\|keywords\|useDynLib\)"
syn match rOKeyword contained "@\(method\|noRd\|note\|references\|seealso\|setClass\|slot\|source\|title\|usage\)"
syn match rOKeyword contained "@\(family\|template\|templateVar\|description\|details\|inheritParams\)"
syn match rOComment contains=@Spell,rOKeyword "#'.*"
syn match rOKeyword contained "@\(family\|template\|templateVar\|description\|details\|inheritParams\|field\)"
if &filetype == "rhelp"
@@ -202,7 +209,6 @@ hi def link rBoolean Boolean
hi def link rBraceError Error
hi def link rComment Comment
hi def link rCommentTodo Todo
hi def link rOComment Comment
hi def link rComplex Number
hi def link rConditional Conditional
hi def link rConstant Constant
@@ -230,6 +236,11 @@ hi def link rString String
hi def link rStrError Error
hi def link rType Type
hi def link rOKeyword Title
hi def link rOBlock Comment
hi def link rOTitle Title
hi def link rOCommentKey Comment
hi def link rOExamples SpecialComment
let b:current_syntax="r"
+97 -52
View File
@@ -1,13 +1,12 @@
" Vim syntax file
" Language: SQL, PL/SQL (Oracle 8i)
" Maintainer: Paul Moore <pf_moore AT yahoo.co.uk>
" Last Change: 2005 Dec 23
" Language: SQL, PL/SQL (Oracle 11g)
" Maintainer: Christian Brabandt
" Repository: https://github.com/chrisbra/vim-sqloracle-syntax
" License: Vim
" Previous Maintainer: Paul Moore
" Last Change: 2015 Nov 24
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
if exists("b:current_syntax")
finish
endif
@@ -15,75 +14,121 @@ syn case ignore
" The SQL reserved words, defined as keywords.
syn keyword sqlSpecial false null true
syn keyword sqlSpecial false null true
syn keyword sqlKeyword access add as asc begin by check cluster column
syn keyword sqlKeyword compress connect current cursor decimal default desc
syn keyword sqlKeyword access add as asc begin by case check cluster column
syn keyword sqlKeyword cache compress connect current cursor decimal default desc
syn keyword sqlKeyword else elsif end exception exclusive file for from
syn keyword sqlKeyword function group having identified if immediate increment
syn keyword sqlKeyword index initial into is level loop maxextents mode modify
syn keyword sqlKeyword nocompress nowait of offline on online start
syn keyword sqlKeyword successful synonym table then to trigger uid
syn keyword sqlKeyword index initial initrans into is level link logging loop
syn keyword sqlKeyword maxextents maxtrans mode modify monitoring
syn keyword sqlKeyword nocache nocompress nologging noparallel nowait of offline on online start
syn keyword sqlKeyword parallel successful synonym table tablespace then to trigger uid
syn keyword sqlKeyword unique user validate values view whenever
syn keyword sqlKeyword where with option order pctfree privileges procedure
syn keyword sqlKeyword where with option order pctfree pctused privileges procedure
syn keyword sqlKeyword public resource return row rowlabel rownum rows
syn keyword sqlKeyword session share size smallint type using
syn keyword sqlOperator not and or
syn keyword sqlOperator in any some all between exists
syn keyword sqlOperator like escape
syn keyword sqlOperator union intersect minus
syn keyword sqlOperator prior distinct
syn keyword sqlOperator union intersect minus
syn keyword sqlOperator prior distinct
syn keyword sqlOperator sysdate out
syn keyword sqlStatement alter analyze audit comment commit create
syn keyword sqlStatement delete drop execute explain grant insert lock noaudit
syn keyword sqlStatement rename revoke rollback savepoint select set
syn keyword sqlStatement truncate update
syn keyword sqlStatement analyze audit comment commit
syn keyword sqlStatement delete drop execute explain grant lock noaudit
syn keyword sqlStatement rename revoke rollback savepoint set
syn keyword sqlStatement truncate
" next ones are contained, so folding works.
syn keyword sqlStatement create update alter select insert contained
syn keyword sqlType boolean char character date float integer long
syn keyword sqlType mlslabel number raw rowid varchar varchar2 varray
" Strings and characters:
syn region sqlString start=+"+ skip=+\\\\\|\\"+ end=+"+
syn region sqlString start=+'+ skip=+\\\\\|\\'+ end=+'+
" Strings:
syn region sqlString start=+"+ skip=+\\\\\|\\"+ end=+"+
syn region sqlString start=+'+ skip=+\\\\\|\\'+ end=+'+
" Numbers:
syn match sqlNumber "-\=\<\d*\.\=[0-9_]\>"
syn match sqlNumber "-\=\<\d*\.\=[0-9_]\>"
" Comments:
syn region sqlComment start="/\*" end="\*/" contains=sqlTodo
syn match sqlComment "--.*$" contains=sqlTodo
syn region sqlComment start="/\*" end="\*/" contains=sqlTodo,@Spell fold
syn match sqlComment "--.*$" contains=sqlTodo,@Spell
" Setup Folding:
" this is a hack, to get certain statements folded.
" the keywords create/update/alter/select/insert need to
" have contained option.
syn region sqlFold start='^\s*\zs\c\(Create\|Update\|Alter\|Select\|Insert\)' end=';$\|^$' transparent fold contains=ALL
syn sync ccomment sqlComment
" Todo.
syn keyword sqlTodo contained TODO FIXME XXX DEBUG NOTE
" Functions:
" (Oracle 11g)
" Aggregate Functions
syn keyword sqlFunction avg collect corr corr_s corr_k count covar_pop covar_samp cume_dist dense_rank first
syn keyword sqlFunction group_id grouping grouping_id last max median min percentile_cont percentile_disc percent_rank rank
syn keyword sqlFunction regr_slope regr_intercept regr_count regr_r2 regr_avgx regr_avgy regr_sxx regr_syy regr_sxy
syn keyword sqlFunction stats_binomial_test stats_crosstab stats_f_test stats_ks_test stats_mode stats_mw_test
syn keyword sqlFunction stats_one_way_anova stats_t_test_one stats_t_test_paired stats_t_test_indep stats_t_test_indepu
syn keyword sqlFunction stats_wsr_test stddev stddev_pop stddev_samp sum
syn keyword sqlFunction sys_xmlagg var_pop var_samp variance xmlagg
" Char Functions
syn keyword sqlFunction ascii chr concat initcap instr length lower lpad ltrim
syn keyword sqlFunction nls_initcap nls_lower nlssort nls_upper regexp_instr regexp_replace
syn keyword sqlFunction regexp_substr replace rpad rtrim soundex substr translate treat trim upper
" Comparison Functions
syn keyword sqlFunction greatest least
" Conversion Functions
syn keyword sqlFunction asciistr bin_to_num cast chartorowid compose convert
syn keyword sqlFunction decompose hextoraw numtodsinterval numtoyminterval rawtohex rawtonhex rowidtochar
syn keyword sqlFunction rowidtonchar scn_to_timestamp timestamp_to_scn to_binary_double to_binary_float
syn keyword sqlFunction to_char to_char to_char to_clob to_date to_dsinterval to_lob to_multi_byte
syn keyword sqlFunction to_nchar to_nchar to_nchar to_nclob to_number to_dsinterval to_single_byte
syn keyword sqlFunction to_timestamp to_timestamp_tz to_yminterval to_yminterval translate unistr
" DataMining Functions
syn keyword sqlFunction cluster_id cluster_probability cluster_set feature_id feature_set
syn keyword sqlFunction feature_value prediction prediction_bounds prediction_cost
syn keyword sqlFunction prediction_details prediction_probability prediction_set
" Datetime Functions
syn keyword sqlFunction add_months current_date current_timestamp dbtimezone extract
syn keyword sqlFunction from_tz last_day localtimestamp months_between new_time
syn keyword sqlFunction next_day numtodsinterval numtoyminterval round sessiontimezone
syn keyword sqlFunction sys_extract_utc sysdate systimestamp to_char to_timestamp
syn keyword sqlFunction to_timestamp_tz to_dsinterval to_yminterval trunc tz_offset
" Numeric Functions
syn keyword sqlFunction abs acos asin atan atan2 bitand ceil cos cosh exp
syn keyword sqlFunction floor ln log mod nanvl power remainder round sign
syn keyword sqlFunction sin sinh sqrt tan tanh trunc width_bucket
" NLS Functions
syn keyword sqlFunction ls_charset_decl_len nls_charset_id nls_charset_name
" Various Functions
syn keyword sqlFunction bfilename cardin coalesce collect decode dump empty_blob empty_clob
syn keyword sqlFunction lnnvl nullif nvl nvl2 ora_hash powermultiset powermultiset_by_cardinality
syn keyword sqlFunction sys_connect_by_path sys_context sys_guid sys_typeid uid user userenv vsizeality
" XML Functions
syn keyword sqlFunction appendchildxml deletexml depth extract existsnode extractvalue insertchildxml
syn keyword sqlFunction insertxmlbefore path sys_dburigen sys_xmlagg sys_xmlgen updatexml xmlagg xmlcast
syn keyword sqlFunction xmlcdata xmlcolattval xmlcomment xmlconcat xmldiff xmlelement xmlexists xmlforest
syn keyword sqlFunction xmlparse xmlpatch xmlpi xmlquery xmlroot xmlsequence xmlserialize xmltable xmltransform
" Todo:
syn keyword sqlTodo TODO FIXME XXX DEBUG NOTE contained
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_sql_syn_inits")
if version < 508
let did_sql_syn_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink sqlComment Comment
HiLink sqlKeyword sqlSpecial
HiLink sqlNumber Number
HiLink sqlOperator sqlStatement
HiLink sqlSpecial Special
HiLink sqlStatement Statement
HiLink sqlString String
HiLink sqlType Type
HiLink sqlTodo Todo
delcommand HiLink
endif
command -nargs=+ HiLink hi def link <args>
HiLink sqlComment Comment
HiLink sqlFunction Function
HiLink sqlKeyword sqlSpecial
HiLink sqlNumber Number
HiLink sqlOperator sqlStatement
HiLink sqlSpecial Special
HiLink sqlStatement Statement
HiLink sqlString String
HiLink sqlType Type
HiLink sqlTodo Todo
delcommand HiLink
let b:current_syntax = "sql"
" vim: ts=8
+148 -162
View File
@@ -3,7 +3,7 @@
" Maintainer: Daniel Kho <daniel.kho@tauhop.com>
" Previous Maintainer: Czo <Olivier.Sirol@lip6.fr>
" Credits: Stephan Hegel <stephan.hegel@snc.siemens.com.cn>
" Last Changed: 2015 Oct 13 by Daniel Kho
" Last Changed: 2015 Dec 4 by Daniel Kho
" VHSIC (Very High Speed Integrated Circuit) Hardware Description Language
@@ -18,145 +18,124 @@ endif
let s:cpo_save = &cpo
set cpo&vim
" This is not VHDL. I use the C-Preprocessor cpp to generate different binaries
" from one VHDL source file. Unfortunately there is no preprocessor for VHDL
" available. If you don't like this, please remove the following lines.
"syn match cDefine "^#ifdef[ ]\+[A-Za-z_]\+"
"syn match cDefine "^#endif"
" case is not significant
syn case ignore
syn case ignore
" VHDL keywords
syn keyword vhdlStatement access after alias all assert
syn keyword vhdlStatement architecture array attribute
syn keyword vhdlStatement assume assume_guarantee
syn keyword vhdlStatement begin block body buffer bus
syn keyword vhdlStatement case component configuration constant
syn keyword vhdlStatement context cover
syn keyword vhdlStatement default disconnect downto
syn keyword vhdlStatement elsif end entity exit
syn keyword vhdlStatement file for function
syn keyword vhdlStatement fairness force
syn keyword vhdlStatement generate generic group guarded
syn keyword vhdlStatement impure in inertial inout is
syn keyword vhdlStatement label library linkage literal loop
syn keyword vhdlStatement map
syn keyword vhdlStatement new next null
syn keyword vhdlStatement of on open others out
syn keyword vhdlStatement package port postponed procedure process pure
syn keyword vhdlStatement parameter property protected
syn keyword vhdlStatement range record register reject report return
syn keyword vhdlStatement release restrict restrict_guarantee
syn keyword vhdlStatement select severity signal shared
syn keyword vhdlStatement subtype
syn keyword vhdlStatement sequence strong
syn keyword vhdlStatement then to transport type
syn keyword vhdlStatement unaffected units until use
syn keyword vhdlStatement variable
syn keyword vhdlStatement vmode vprop vunit
syn keyword vhdlStatement wait when while with
syn keyword vhdlStatement note warning error failure
syn keyword vhdlStatement access after alias all assert
syn keyword vhdlStatement architecture array attribute
syn keyword vhdlStatement assume assume_guarantee
syn keyword vhdlStatement begin block body buffer bus
syn keyword vhdlStatement case component configuration constant
syn keyword vhdlStatement context cover
syn keyword vhdlStatement default disconnect downto
syn keyword vhdlStatement elsif end entity exit
syn keyword vhdlStatement file for function
syn keyword vhdlStatement fairness force
syn keyword vhdlStatement generate generic group guarded
syn keyword vhdlStatement impure in inertial inout is
syn keyword vhdlStatement label library linkage literal loop
syn keyword vhdlStatement map
syn keyword vhdlStatement new next null
syn keyword vhdlStatement of on open others out
syn keyword vhdlStatement package port postponed procedure process pure
syn keyword vhdlStatement parameter property protected
syn keyword vhdlStatement range record register reject report return
syn keyword vhdlStatement release restrict restrict_guarantee
syn keyword vhdlStatement select severity signal shared
syn keyword vhdlStatement subtype
syn keyword vhdlStatement sequence strong
syn keyword vhdlStatement then to transport type
syn keyword vhdlStatement unaffected units until use
syn keyword vhdlStatement variable
syn keyword vhdlStatement vmode vprop vunit
syn keyword vhdlStatement wait when while with
syn keyword vhdlStatement note warning error failure
" Special match for "if" and "else" since "else if" shouldn't be highlighted.
" The right keyword is "elsif"
syn match vhdlStatement "\<\(if\|else\)\>"
syn match vhdlNone "\<else\s\+if\>$"
syn match vhdlNone "\<else\s\+if\>\s"
" Linting of conditionals.
syn match vhdlStatement "\<\(if\|else\)\>"
syn match vhdlError "\<else\s\+if\>"
" Predefined VHDL types
syn keyword vhdlType bit bit_vector
syn keyword vhdlType character boolean integer real time
syn keyword vhdlType boolean_vector integer_vector real_vector time_vector
syn keyword vhdlType string severity_level
syn keyword vhdlType bit bit_vector
syn keyword vhdlType character boolean integer real time
syn keyword vhdlType boolean_vector integer_vector real_vector time_vector
syn keyword vhdlType string severity_level
" Predefined standard ieee VHDL types
syn keyword vhdlType positive natural signed unsigned
syn keyword vhdlType unresolved_signed unresolved_unsigned u_signed u_unsigned
syn keyword vhdlType line text
syn keyword vhdlType std_logic std_logic_vector
syn keyword vhdlType std_ulogic std_ulogic_vector
" Predefined non standard VHDL types for Mentor Graphics Sys1076/QuickHDL
"syn keyword vhdlType qsim_state qsim_state_vector
"syn keyword vhdlType qsim_12state qsim_12state_vector
"syn keyword vhdlType qsim_strength
" Predefined non standard VHDL types for Alliance VLSI CAD
"syn keyword vhdlType mux_bit mux_vector reg_bit reg_vector wor_bit wor_vector
syn keyword vhdlType positive natural signed unsigned
syn keyword vhdlType unresolved_signed unresolved_unsigned u_signed u_unsigned
syn keyword vhdlType line text
syn keyword vhdlType std_logic std_logic_vector
syn keyword vhdlType std_ulogic std_ulogic_vector
" array attributes
syn match vhdlAttribute "\'high"
syn match vhdlAttribute "\'left"
syn match vhdlAttribute "\'length"
syn match vhdlAttribute "\'low"
syn match vhdlAttribute "\'range"
syn match vhdlAttribute "\'reverse_range"
syn match vhdlAttribute "\'right"
syn match vhdlAttribute "\'ascending"
syn match vhdlAttribute "\'high"
syn match vhdlAttribute "\'left"
syn match vhdlAttribute "\'length"
syn match vhdlAttribute "\'low"
syn match vhdlAttribute "\'range"
syn match vhdlAttribute "\'reverse_range"
syn match vhdlAttribute "\'right"
syn match vhdlAttribute "\'ascending"
" block attributes
"syn match vhdlAttribute "\'behaviour" " Non-standard VHDL
"syn match vhdlAttribute "\'structure" " Non-standard VHDL
syn match vhdlAttribute "\'simple_name"
syn match vhdlAttribute "\'instance_name"
syn match vhdlAttribute "\'path_name"
syn match vhdlAttribute "\'foreign" " VHPI
syn match vhdlAttribute "\'simple_name"
syn match vhdlAttribute "\'instance_name"
syn match vhdlAttribute "\'path_name"
syn match vhdlAttribute "\'foreign" " VHPI
" signal attribute
syn match vhdlAttribute "\'active"
syn match vhdlAttribute "\'delayed"
syn match vhdlAttribute "\'event"
syn match vhdlAttribute "\'last_active"
syn match vhdlAttribute "\'last_event"
syn match vhdlAttribute "\'last_value"
syn match vhdlAttribute "\'quiet"
syn match vhdlAttribute "\'stable"
syn match vhdlAttribute "\'transaction"
syn match vhdlAttribute "\'driving"
syn match vhdlAttribute "\'driving_value"
syn match vhdlAttribute "\'active"
syn match vhdlAttribute "\'delayed"
syn match vhdlAttribute "\'event"
syn match vhdlAttribute "\'last_active"
syn match vhdlAttribute "\'last_event"
syn match vhdlAttribute "\'last_value"
syn match vhdlAttribute "\'quiet"
syn match vhdlAttribute "\'stable"
syn match vhdlAttribute "\'transaction"
syn match vhdlAttribute "\'driving"
syn match vhdlAttribute "\'driving_value"
" type attributes
syn match vhdlAttribute "\'base"
syn match vhdlAttribute "\'subtype"
syn match vhdlAttribute "\'element"
syn match vhdlAttribute "\'leftof"
syn match vhdlAttribute "\'pos"
syn match vhdlAttribute "\'pred"
syn match vhdlAttribute "\'rightof"
syn match vhdlAttribute "\'succ"
syn match vhdlAttribute "\'val"
syn match vhdlAttribute "\'image"
syn match vhdlAttribute "\'value"
syn match vhdlAttribute "\'base"
syn match vhdlAttribute "\'subtype"
syn match vhdlAttribute "\'element"
syn match vhdlAttribute "\'leftof"
syn match vhdlAttribute "\'pos"
syn match vhdlAttribute "\'pred"
syn match vhdlAttribute "\'rightof"
syn match vhdlAttribute "\'succ"
syn match vhdlAttribute "\'val"
syn match vhdlAttribute "\'image"
syn match vhdlAttribute "\'value"
syn keyword vhdlBoolean true false
syn keyword vhdlBoolean true false
" for this vector values case is significant
syn case match
syn case match
" Values for standard VHDL types
syn match vhdlVector "\'[0L1HXWZU\-\?]\'"
" Values for non standard VHDL types qsim_12state for Mentor Graphics Sys1076/QuickHDL
"syn keyword vhdlVector S0S S1S SXS S0R S1R SXR S0Z S1Z SXZ S0I S1I SXI
syn case ignore
syn match vhdlVector "\'[0L1HXWZU\-\?]\'"
syn case ignore
syn match vhdlVector "B\"[01_]\+\""
syn match vhdlVector "O\"[0-7_]\+\""
syn match vhdlVector "X\"[0-9a-f_]\+\""
syn match vhdlCharacter "'.'"
syn region vhdlString start=+"+ end=+"+
syn match vhdlVector "B\"[01_]\+\""
syn match vhdlVector "O\"[0-7_]\+\""
syn match vhdlVector "X\"[0-9a-f_]\+\""
syn match vhdlCharacter "'.'"
syn region vhdlString start=+"+ end=+"+
" floating numbers
syn match vhdlNumber "-\=\<\d\+\.\d\+\(E[+\-]\=\d\+\)\>"
syn match vhdlNumber "-\=\<\d\+\.\d\+\>"
syn match vhdlNumber "0*2#[01_]\+\.[01_]\+#\(E[+\-]\=\d\+\)\="
syn match vhdlNumber "0*16#[0-9a-f_]\+\.[0-9a-f_]\+#\(E[+\-]\=\d\+\)\="
syn match vhdlNumber "-\=\<\d\+\.\d\+\(E[+\-]\=\d\+\)\>"
syn match vhdlNumber "-\=\<\d\+\.\d\+\>"
syn match vhdlNumber "0*2#[01_]\+\.[01_]\+#\(E[+\-]\=\d\+\)\="
syn match vhdlNumber "0*16#[0-9a-f_]\+\.[0-9a-f_]\+#\(E[+\-]\=\d\+\)\="
" integer numbers
syn match vhdlNumber "-\=\<\d\+\(E[+\-]\=\d\+\)\>"
syn match vhdlNumber "-\=\<\d\+\>"
syn match vhdlNumber "0*2#[01_]\+#\(E[+\-]\=\d\+\)\="
syn match vhdlNumber "0*16#[0-9a-f_]\+#\(E[+\-]\=\d\+\)\="
syn match vhdlNumber "-\=\<\d\+\(E[+\-]\=\d\+\)\>"
syn match vhdlNumber "-\=\<\d\+\>"
syn match vhdlNumber "0*2#[01_]\+#\(E[+\-]\=\d\+\)\="
syn match vhdlNumber "0*16#[0-9a-f_]\+#\(E[+\-]\=\d\+\)\="
" operators
syn keyword vhdlOperator and nand or nor xor xnor
syn keyword vhdlOperator rol ror sla sll sra srl
syn keyword vhdlOperator mod rem abs not
" TODO remove the following line. You can't have a sequence of */=+ as an operator for example.
"syn match vhdlOperator "[&><=:+\-*\/|]"
" The following lines match valid and invalid operators.
" Concatenation and math operators
syn match vhdlOperator "&\|+\|-\|\*\|\/"
@@ -171,19 +150,25 @@ syn match vhdlOperator "=>"
" VHDL-2008 conversion, matching equality/non-equality operators
syn match vhdlOperator "??\|?=\|?\/=\|?<\|?<=\|?>\|?>="
" VHDL-2008 external names
syn match vhdlOperator "<<\|>>"
" Linting for illegal operators
" '='
syn match vhdlError "\(=\)[<=&+\-\*\/\\]\+"
syn match vhdlError "[=&+\-\*\\]\+\(=\)"
" '>', '<'
syn match vhdlError "\(>\)[<>&+\-\/\\]\+"
syn match vhdlError "[>&+\-\/\\]\+\(>\)"
syn match vhdlError "\(<\)[<&+\-\/\\]\+"
syn match vhdlError "[<>=&+\-\/\\]\+\(<\)"
" Allow external names: '<< ... >>'
syn match vhdlError "\(>\)[<&+\-\/\\]\+"
syn match vhdlError "[&+\-\/\\]\+\(>\)"
syn match vhdlError "\(<\)[&+\-\/\\]\+"
syn match vhdlError "[>=&+\-\/\\]\+\(<\)"
" Covers most operators
syn match vhdlError "\(&\|+\|\-\|\*\*\|\/=\|??\|?=\|?\/=\|?<=\|?>=\|>=\|<=\|:=\|=>\)[<>=&+\-\*\\?:]\+"
syn match vhdlError "[<>=&+\-\*\\:]\+\(&\|+\|\-\|\*\*\|\/=\|??\|?=\|?\/=\|?<\|?<=\|?>\|?>=\|>=\|<=\|:=\|=>\)"
syn match vhdlError "\(?<\|?>\)[<>&+\-\*\/\\?:]\+"
" support negative sign after operators. E.g. q<=-b;
syn match vhdlError "\(&\|+\|\-\|\*\*\|\/=\|??\|?=\|?\/=\|?<=\|?>=\|>=\|<=\|:=\|=>\)[<>=&+\*\\?:]\+"
syn match vhdlError "[<>=&+\-\*\\:]\+\(&\|+\|\*\*\|\/=\|??\|?=\|?\/=\|?<\|?<=\|?>\|?>=\|>=\|<=\|:=\|=>\)"
syn match vhdlError "\(?<\|?>\)[<>&+\*\/\\?:]\+"
syn match vhdlError "\(<<\|>>\)[<>&+\*\/\\?:]\+"
"syn match vhdlError "[?]\+\(&\|+\|\-\|\*\*\|??\|?=\|?\/=\|?<\|?<=\|?>\|?>=\|:=\|=>\)"
" '/'
@@ -195,60 +180,61 @@ syn match vhdlSpecial "[().,;]"
" time
syn match vhdlTime "\<\d\+\s\+\(\([fpnum]s\)\|\(sec\)\|\(min\)\|\(hr\)\)\>"
syn match vhdlTime "\<\d\+\.\d\+\s\+\(\([fpnum]s\)\|\(sec\)\|\(min\)\|\(hr\)\)\>"
syn match vhdlTime "\<\d\+\s\+\(\([fpnum]s\)\|\(sec\)\|\(min\)\|\(hr\)\)\>"
syn match vhdlTime "\<\d\+\.\d\+\s\+\(\([fpnum]s\)\|\(sec\)\|\(min\)\|\(hr\)\)\>"
syn case match
syn keyword vhdlTodo contained TODO NOTE
syn keyword vhdlFixme contained FIXME
syn case ignore
syn case match
syn keyword vhdlTodo contained TODO NOTE
syn keyword vhdlFixme contained FIXME
syn case ignore
syn region vhdlComment start="/\*" end="\*/" contains=vhdlTodo,vhdlFixme,@Spell
syn match vhdlComment "\(^\|\s\)--.*" contains=vhdlTodo,vhdlFixme,@Spell
syn region vhdlComment start="/\*" end="\*/" contains=vhdlTodo,vhdlFixme,@Spell
syn match vhdlComment "\(^\|\s\)--.*" contains=vhdlTodo,vhdlFixme,@Spell
" Industry-standard directives. These are not standard VHDL, but are commonly
" used in the industry.
syn match vhdlPreProc "/\* synthesis .* \*/"
"syn match vhdlPreProc "/\* simulation .* \*/"
syn match vhdlPreProc "/\* pragma .* \*/"
syn match vhdlPreProc "/\* synopsys .* \*/"
syn match vhdlPreProc "--\s*synthesis .*"
"syn match vhdlPreProc "--\s*simulation .*"
syn match vhdlPreProc "--\s*pragma .*"
syn match vhdlPreProc "--\s*synopsys .*"
syn match vhdlPreProc "/\*\s*synthesis\s\+translate_\(on\|off\)\s*\*/"
"syn match vhdlPreProc "/\*\s*simulation\s\+translate_\(on\|off\)\s*\*/"
syn match vhdlPreProc "/\*\s*pragma\s\+synthesis_\(on\|off\)\s*\*/"
syn match vhdlPreProc "/\*\s*synopsys\s\+translate_\(on\|off\)\s*\*/"
syn match vhdlPreProc "\(^\|\s\)--\s*synthesis\s\+translate_\(on\|off\)\s*"
"syn match vhdlPreProc "\(^\|\s\)--\s*simulation\s\+translate_\(on\|off\)\s*"
syn match vhdlPreProc "\(^\|\s\)--\s*pragma\s\+synthesis_\(on\|off\)\s*"
syn match vhdlPreProc "\(^\|\s\)--\s*synopsys\s\+translate_\(on\|off\)\s*"
"Modify the following as needed. The trade-off is performance versus functionality.
syn sync minlines=600
syn sync minlines=600
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_vhdl_syntax_inits")
if version < 508
let did_vhdl_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
if version < 508
let did_vhdl_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink vhdlSpecial Special
HiLink vhdlStatement Statement
HiLink vhdlCharacter Character
HiLink vhdlString String
HiLink vhdlVector Number
HiLink vhdlBoolean Number
HiLink vhdlTodo Todo
HiLink vhdlFixme Fixme
HiLink vhdlComment Comment
HiLink vhdlNumber Number
HiLink vhdlTime Number
HiLink vhdlType Type
HiLink vhdlOperator Operator
HiLink vhdlError Error
HiLink vhdlAttribute Special
HiLink vhdlPreProc PreProc
HiLink vhdlSpecial Special
HiLink vhdlStatement Statement
HiLink vhdlCharacter Character
HiLink vhdlString String
HiLink vhdlVector Number
HiLink vhdlBoolean Number
HiLink vhdlTodo Todo
HiLink vhdlFixme Fixme
HiLink vhdlComment Comment
HiLink vhdlNumber Number
HiLink vhdlTime Number
HiLink vhdlType Type
HiLink vhdlOperator Operator
HiLink vhdlError Error
HiLink vhdlAttribute Special
HiLink vhdlPreProc PreProc
delcommand HiLink
delcommand HiLink
endif
let b:current_syntax = "vhdl"
+18 -18
View File
@@ -1,8 +1,8 @@
" Vim syntax file
" Language: Vim 7.4 script
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
" Last Change: November 11, 2015
" Version: 7.4-37
" Last Change: November 30, 2015
" Version: 7.4-38
" Automatically generated keyword lists: {{{1
" Quit when a syntax file was already loaded {{{2
@@ -18,24 +18,24 @@ syn keyword vimTodo contained COMBAK FIXME TODO XXX
syn cluster vimCommentGroup contains=vimTodo,@Spell
" regular vim commands {{{2
syn keyword vimCommand contained a arga[dd] argl[ocal] ba[ll] bn[ext] breakd[el] bufdo cabc[lear] cat[ch] ce[nter] cgetb[uffer] che[ckpath] cmapc[lear] cnf com cope[n] cs de delep delf di difft[his] dj[ump] dr[op] ec elsei[f] endf[unction] exi[t] filetype fix[del] for gr[ep] h[elp] hid[e] ij[ump] isp[lit] keepalt lad la[st] lcl[ose] lex[pr] lgete[xpr] ll lne lnf[ile] loc[kmarks] lr[ewind] lv[imgrep] marks mk mkv[imrc] mz[scheme] new noswap[file] o[pen] ped[it] pp[op] profd[el] ptf[irst] ptN[ext] py python3 re redr[aw] rew[ind] rubyf[ile] sa[rgument] sbn[ext] scripte[ncoding] setf[iletype] sh[ell] sim[alt] sm[ap] sni[ff] sor[t] spelli[nfo] spr[evious] start st[op] sunmenu syn ta tabf[ind] tabnew tabr[ewind] tcld[o] tj[ump] tN tr tu[nmenu] undoj[oin] uns[ilent] ve[rsion] vimgrepa[dd] vs[plit] winc[md] wN[ext] ws[verb] x[it] xnoremenu
syn keyword vimCommand contained ab argd ar[gs] bd[elete] bN[ext] breakl[ist] b[uffer] cad cb[uffer] cex[pr] cgete[xpr] checkt[ime] cn cNf comc[lear] co[py] cscope debug d[elete] delf[unction] diffg[et] diffu[pdate] dl ds[earch] echoe[rr] em[enu] en[dif] exu[sage] fin fo[ld] fu grepa[dd] helpc[lose] his[tory] il[ist] iuna[bbrev] keepj[umps] laddb[uffer] lat lcs lf lg[etfile] lla[st] lnew[er] lNf[ile] lockv[ar] ls lvimgrepa[dd] mat[ch] mk[exrc] mo n n[ext] nu[mber] opt[ions] pe[rl] pr prof[ile] ptj[ump] ptp[revious] py3 q r[ead] redraws[tatus] ri[ght] rundo sav[eas] sbN[ext] scrip[tnames] setg[lobal] si sl sme sno[magic] so[urce] spellr[epall] sre[wind] startg[replace] stopi[nsert] sus[pend] sync tab tabfir[st] tabn[ext] tabs tclf[ile] tl[ast] tn[ext] tr[ewind] u undol[ist] up[date] vert[ical] vi[sual] w windo wp[revious] wundo xmapc[lear] xunme
syn keyword vimCommand contained abc[lear] argd[elete] argu[ment] bel[owright] bo[tright] br[ewind] buffers caddb[uffer] cc cf cg[etfile] cl cN cnf[ile] comp[iler] cpf[ile] cstag debugg[reedy] deletel dell diffo[ff] dig dli[st] dsp[lit] echom[sg] en endt[ry] f fina[lly] foldc[lose] fun gui helpf[ind] i imapc[lear] j[oin] kee[pmarks] lad[dexpr] later lcscope lfdo lgr[ep] lli[st] lne[xt] lo lol[der] lt[ag] lw[indow] menut mks[ession] mod[e] nbc[lose] nmapc[lear] o ownsyntax perld[o] pre[serve] promptf[ind] ptl[ast] ptr[ewind] py3do qa[ll] rec[over] reg[isters] rightb[elow] ru[ntime] sba[ll] sbp[revious] scs setl[ocal] sig sla[st] smenu snoreme spe spellu[ndo] st star[tinsert] sts[elect] sv[iew] syncbind tabc[lose] tabl[ast] tabN[ext] ta[g] te[aroff] tm tN[ext] try un unh[ide] v vi viu[sage] wa[ll] winp[os] wq wv[iminfo] xme xunmenu
syn keyword vimCommand contained abo[veleft] argdo as[cii] bf[irst] bp[revious] bro[wse] bun[load] cad[dexpr] ccl[ose] cfdo c[hange] cla[st] cnew[er] cNf[ile] con cp[revious] cuna[bbrev] del deletep delm[arks] diffp[atch] dig[raphs] do e echon endf endw[hile] f[ile] fin[d] folddoc[losed] fu[nction] gvim helpg[rep] ia in ju[mps] keepp[atterns] laddf[ile] lb[uffer] ld[o] lf[ile] lgrepa[dd] lmak[e] lN[ext] loadk lop[en] lua ma menut[ranslate] mksp[ell] m[ove] nb[key] noa ol[dfiles] p po[p] prev[ious] promptr[epl] ptn pts[elect] pydo q[uit] red res[ize] ru rv[iminfo] sbf[irst] sbr[ewind] scscope sf[ind] sign sl[eep] sn[ext] snoremenu spelld[ump] spellw[rong] sta[g] startr[eplace] sun[hide] sw[apname] syntime tabd[o] tabm[ove] tabo[nly] tags tf[irst] tm[enu] to[pleft] ts[elect] una[bbreviate] unl ve vie[w] vmapc[lear] wh[ile] win[size] wqa[ll] x xmenu xwininfo
syn keyword vimCommand contained al[l] arge[dit] au bl[ast] brea[k] bu bw[ipeout] caddf[ile] cd cf[ile] changes cl[ist] cn[ext] col[der] conf[irm] cq[uit] cw[indow] delc[ommand] deletl delp diffpu[t] dir doau ea e[dit] endfo[r] ene[w] files fini[sh] foldd[oopen] g h helpt[ags] iabc[lear] intro k l lan lc[d] le[ft] lfir[st] lh[elpgrep] lmapc[lear] lnf loadkeymap lpf[ile] luado mak[e] mes mkv mz nbs[tart] noautocmd omapc[lear] pc[lose] popu p[rint] ps[earch] ptN pu[t] pyf[ile] quita[ll] redi[r] ret[ab] rub[y] sal[l] sbl[ast] sb[uffer] se[t] sfir[st] sil[ent] sm[agic] sN[ext] so spe[llgood] sp[lit] star stj[ump] sunme sy t tabe[dit] tabN tabp[revious] tc[l] th[row] tn tp[revious] tu u[ndo] unlo[ckvar] verb[ose] vim[grep] vne[w] win wn[ext] w[rite] xa[ll] xnoreme y[ank]
syn keyword vimCommand contained ar argg[lobal] bad[d] bm[odified] breaka[dd] buf c cal[l] cdo cfir[st] chd[ir] clo[se] cN[ext] colo[rscheme] con[tinue] cr[ewind] d delel deletp dep diffs[plit] di[splay] dp earlier el[se] endfun ex filet fir[st] foldo[pen] go[to] ha[rdcopy] hi if is[earch] keepa la lan[guage] lch[dir] lefta[bove] lgetb[uffer] l[ist] lN lNf lo[adview] lp[revious] luafile ma[rk] messages mkvie[w] mzf[ile] ne noh[lsearch] on[ly] pe popu[p] pro pta[g] ptn[ext] pw[d] py[thon] r red[o] retu[rn] rubyd[o] san[dbox] sbm[odified] scrip
syn keyword vimCommand contained a arga[dd] argl[ocal] ba[ll] bn[ext] breakd[el] bufdo cabc[lear] cb[uffer] cf[ile] changes cl[ist] cn[ext] col[der] conf[irm] cq[uit] cw[indow] delc[ommand] deletl delp diffpu[t] dir doau ea e[dit] endfo[r] ene[w] files fini[sh] foldd[oopen] g h helpt[ags] iabc[lear] intro k l lan lc[d] lefta[bove] lg[etfile] lla[st] lnew[er] lNf[ile] lockv[ar] ls lvimgrepa[dd] mat[ch] mk[exrc] mo n n[ext] nore on[ly] pe popu[p] pro pta[g] ptn[ext] pw[d] py[thon] r red[o] retu[rn] rub[y] rv[iminfo] sba[ll] sbN[ext] scripte[ncoding] setf[iletype] sh[ell] sl sme sno[magic] so[urce] spellr[epall] sre[wind] startg[replace] stopi[nsert] sus[pend] sync tab tabfir[st] tabn[ext] tabs tclf[ile] tl[ast] tn[ext] tr[ewind] u undol[ist] up[date] vert[ical] vi[sual] w windo wp[revious] wundo xmapc[lear] xprop
syn keyword vimCommand contained ab argd ar[gs] bd[elete] bN[ext] breakl[ist] b[uffer] cad[dbuffer] cc cfir[st] chd[ir] clo[se] cN[ext] colo[rscheme] con[tinue] cr[ewind] d delel deletp dep diffs[plit] di[splay] dp earlier el[se] endfun ex filet fir[st] foldo[pen] go[to] ha[rdcopy] hi if is[earch] keepa la lan[guage] lch[dir] lex[pr] lgr[ep] lli[st] lne[xt] lo lol[der] lt[ag] lw[indow] menut mks[ession] mod[e] nbc[lose] nmapc[lear] nos[wapfile] o[pen] ped[it] pp[op] profd[el] ptf[irst] ptN[ext] py python3 re redr[aw] rew[ind] rubyd[o] sal[l] sbf[irst] sbp[revious] scr[iptnames] setg[lobal] sig sla[st] smenu snoreme spe spellu[ndo] st star[tinsert] sts[elect] sv[iew] syncbind tabc[lose] tabl[ast] tabN[ext] ta[g] te[aroff] tm tN[ext] try un unh[ide] v vi viu[sage] wa[ll] winp[os] wq wv[iminfo] xme xunme
syn keyword vimCommand contained abc[lear] argd[elete] argu[ment] bel[owright] bo[tright] br[ewind] buffers cadde[xpr] ccl[ose] cgetb[uffer] che[ckpath] cmapc[lear] cnf com cope[n] cs de delep delf di difft[his] dj[ump] dr[op] ec elsei[f] endf[unction] exi[t] filetype fix[del] for gr[ep] h[elp] hid[e] ij[ump] isp[lit] keepalt lad la[st] lcl[ose] lf[ile] lgrepa[dd] lmak[e] lN[ext] loadk lop[en] lua ma menut[ranslate] mksp[ell] m[ove] nb[key] noa nu[mber] opt[ions] pe[rl] pr prof[ile] ptj[ump] ptp[revious] py3 q r[ead] redraws[tatus] ri[ght] rubyf[ile] san[dbox] sbl[ast] sbr[ewind] scs setl[ocal] sign sl[eep] sn[ext] snoremenu spelld[ump] spellw[rong] sta[g] startr[eplace] sun[hide] sw[apname] syntime tabd[o] tabm[ove] tabo[nly] tags tf[irst] tm[enu] to[pleft] ts[elect] una[bbreviate] unl ve vie[w] vmapc[lear] wh[ile] win[size] wqa[ll] x xmenu xunmenu
syn keyword vimCommand contained abo[veleft] argdo as[cii] bf[irst] bp[revious] bro[wse] bun[load] caddf[ile] cd cgete[xpr] checkt[ime] cn cNf comc[lear] co[py] cscope debug d[elete] delf[unction] diffg[et] diffu[pdate] dl ds[earch] echoe[rr] em[enu] en[dif] exu[sage] fin fo[ld] fu grepa[dd] helpc[lose] his[tory] il[ist] iuna[bbrev] keepj[umps] laddb[uffer] lat lcs lfir[st] lh[elpgrep] lmapc[lear] lnf loadkeymap lpf[ile] luado mak[e] mes mkv mz nbs[tart] noautocmd o ownsyntax perld[o] pre[serve] promptf[ind] ptl[ast] ptr[ewind] py3do qa[ll] rec[over] reg[isters] rightb[elow] rundo sa[rgument] sbm[odified] sb[uffer] scscope sf[ind] sil[ent] sm[agic] sN[ext] so spe[llgood] sp[lit] star stj[ump] sunme sy t tabe[dit] tabN tabp[revious] tc[l] th[row] tn tp[revious] tu u[ndo] unlo[ckvar] verb[ose] vim[grep] vne[w] win wn[ext] w[rite] xa[ll] xnoreme xwininfo
syn keyword vimCommand contained al[l] arge[dit] au bl[ast] brea[k] bu bw[ipeout] cal[l] ce[nter] cg[etfile] cl cN cnf[ile] comp[iler] cpf[ile] cstag debugg[reedy] deletel dell diffo[ff] dig dli[st] dsp[lit] echom[sg] en endt[ry] f fina[lly] foldc[lose] fun gui helpf[ind] i imapc[lear] j[oin] kee[pmarks] lad[dexpr] later lcscope lgetb[uffer] l[ist] lN lNf lo[adview] lp[revious] luafile ma[rk] messages mkvie[w] mzf[ile] ne noh[lsearch] ol[dfiles] p po[p] prev[ious] promptr[epl] ptn pts[elect] pydo q[uit] red res[ize] ru ru[ntime] sav[eas] sbn[ext] scr se[t] sfir[st] sim[alt] sm[ap] sni[ff] sor[t] spelli[nfo] spr[evious] start st[op] sunmenu syn ta tabf[ind] tabnew tabr[ewind] tcld[o] tj[ump] tN tr tu[nmenu] undoj[oin] uns[ilent] ve[rsion] vimgrepa[dd] vs[plit] winc[md] wN[ext] ws[verb] x[it] xnoremenu y[ank]
syn keyword vimCommand contained ar argg[lobal] bad[d] bm[odified] breaka[dd] buf c cat[ch] cex[pr] c[hange] cla[st] cnew[er] cNf[ile] con cp[revious] cuna[bbrev] del deletep delm[arks] diffp[atch] dig[raphs] do e echon endf endw[hile] f[ile] fin[d] folddoc[losed] fu[nction] gvim helpg[rep] ia in ju[mps] keepp[atterns] laddf[ile] lb[uffer] le[ft] lgete[xpr] ll lne lnf[ile] loc[kmarks] lr[ewind] lv[imgrep] marks mk mkv[imrc] mz[scheme] new nor omapc[lear] pc[lose] popu p[rint] ps[earch] ptN pu[t] pyf[ile] quita[ll] redi[r] ret[ab]
syn match vimCommand contained "\<z[-+^.=]\=\>"
syn keyword vimStdPlugin contained DiffOrig Man N[ext] P[rint] S TOhtml XMLent XMLns
" vimOptions are caught only when contained in a vimSet {{{2
syn keyword vimOption contained acd ambw arshape background ballooneval bexpr bk breakindentopt bsk cc ch cino cmp com concealcursor cp cscopeprg csprg cul def diff display edcompatible endofline errorformat fcl fdm fex fileformats fkmap foldenable foldminlines formatprg gdefault gp guifontset helpfile hidden hl ignorecase imcmdline imsf indentexpr is isp keywordprg laststatus lisp loadplugins macatsui maxcombine mef mls modelines mousehide mp nu omnifunc paragraphs penc pm printdevice printoptions quoteescape remap rightleftcmd rtp sbo scrolljump sel shell shelltype shortname shq sm so spellfile spr st sts swapsync syn tag tb termbidi tgst titleold top ttimeoutlen ttyscroll ul ur verbosefile visualbell wcm wi wildmenu winfixwidth wm wrapscan
syn keyword vimOption contained ai anti autochdir backspace balloonexpr bg bkc bri bt ccv charconvert cinoptions cms comments conceallevel cpo cscopequickfix csqf cursorbind define diffexpr dy ef eol esckeys fcs fdn ff fileignorecase flp foldexpr foldnestmax fp gfm grepformat guifontwide helpheight highlight hlg im imd imstatusfunc indentkeys isf isprint km lazyredraw lispwords lpl magic maxfuncdepth menuitems mm modifiable mousem mps number opendevice paste pex pmbcs printencoding prompt rdt renderoptions rl ru sbr scrolloff selection shellcmdflag shellxescape showbreak si smartcase softtabstop spelllang sps sta su swb synmaxcol tagbsearch tbi termencoding thesaurus titlestring tpm ttm ttytype undodir ut vfile vop wd wic wildmode winheight wmh write
syn keyword vimOption contained akm antialias autoindent backup bdir bh bl briopt bufhidden cd ci cinw co commentstring confirm cpoptions cscoperelative csre cursorcolumn delcombine diffopt ea efm ep et fdc fdo ffs filetype fml foldignore foldopen fs gfn grepprg guiheadroom helplang history hls imactivatefunc imdisable inc indk isfname joinspaces kmp lbr list ls makeef maxmapdepth mfd mmd modified mousemodel msm numberwidth operatorfunc pastetoggle pexpr pmbfn printexpr pt re report rlc ruf sc scrollopt selectmode shellpipe shellxquote showcmd sidescroll smartindent sol spellsuggest sr stal sua swf syntax taglength tbidi terse tildeop tl tr tty tw undofile vb vi wa weirdinvert wig wildoptions winminheight wmnu writeany
syn keyword vimOption contained al ar autoread backupcopy bdlay bin bo brk buflisted cdpath cin cinwords cocu compatible consk cpt cscopetag cst cursorline dex digraph ead ei equalalways eventignore fde fdt fic fillchars fmr foldlevel foldtext fsync gfs gtl guioptions hf hk hlsearch imactivatekey imi include inex isi js kp lcs listchars lsp makeprg maxmem mh mmp more mouses mzq nuw opfunc patchexpr pfn popt printfont pumheight readonly restorescreen rnu ruler scb scs sessionoptions shellquote shiftround showfulltag sidescrolloff smarttab sp spf srr startofline suffixes switchbuf ta tagrelative tbis textauto timeout tm ts ttybuiltin tx undolevels vbs viewdir wak wfh wildchar wim winminwidth wmw writebackup
syn keyword vimOption contained aleph arab autowrite backupdir belloff binary bomb browsedir buftype cedit cindent clipboard cole complete conskey crb cscopetagorder csto cwh dg dip eadirection ek equalprg ex fdi fen fileencoding fixendofline fo foldlevelstart formatexpr ft gfw gtt guipty hh hkmap ic imaf iminsert includeexpr inf isident key langmap linebreak lm lw mat maxmempattern mis mmt mouse mouseshape mzquantum odev osfiletype patchmode ph preserveindent printheader pvh redrawtime revins ro rulerformat scr sect sft shellredir shiftwidth showmatch siso smc spc spl ss statusline suffixesadd sws tabline tags tbs textmode timeoutlen to tsl ttyfast uc undoreload vdir viewoptions warn wfw wildcharm winaltkeys winwidth wop writedelay
syn keyword vimOption contained allowrevins arabic autowriteall backupext beval biosk breakat bs casemap cf cink cmdheight colorcolumn completefunc copyindent cryptmethod cscopeverbose csverb debug dict dir eb enc errorbells expandtab fdl fenc fileencodings fixeol foldclose foldmarker formatlistpat gcr ghr guicursor guitablabel hi hkmapp icon imak ims incsearch infercase isk keymap langmenu lines lmap lz matchpairs maxmemtot mkspellmem mod mousef mouset nf oft pa path pheader previewheight printmbcharset pvw regexpengine ri rop runtimepath scroll sections sh shellslash shm showmode sj smd spell splitbelow ssl stl sw sxe tabpagemax tagstack tenc textwidth title toolbar tsr ttym udf updatecount ve viminfo wb wh wildignore window wiv wrap ws
syn keyword vimOption contained altkeymap arabicshape aw backupskip bex bioskey breakindent bsdir cb cfu cinkeys cmdwinheight columns completeopt cot cscopepathcomp cspc cuc deco dictionary directory ed encoding errorfile exrc fdls fencs fileformat fk foldcolumn foldmethod formatoptions gd go guifont guitabtooltip hid hkp iconstring imc imsearch inde insertmode iskeyword keymodel langnoremap linespace lnr ma matchtime mco ml modeline mousefocus mousetime nrformats ofu para pdev pi previewwindow printmbfont qe relativenumber rightleft rs sb scrollbind secure shcf shelltemp shortmess showtabline slm sn spellcapcheck splitright ssop stmp swapfile sxq tabstop tal term tf titlelen toolbariconsize ttimeout ttymouse udir updatetime verbose virtualedit wc whichwrap wildignorecase winfixheight wiw wrapmargin ww
syn keyword vimOption contained ambiwidth ari awa balloondelay
syn keyword vimOption contained acd ambw arshape background ballooneval bg bl brk buftype cf cinkeys cmdwinheight com concealcursor cp cscopeprg csprg cul def diff display edcompatible endofline errorformat fcl fdm fex fileformats fkmap foldenable foldminlines formatprg gdefault gp guifontset helpfile hidden hl ignorecase imcmdline imsf indentexpr is isp keywordprg laststatus lisp loadplugins ma matchtime mco ml modeline mousefocus mousetime nrformats ofu para pdev pheader previewheight printmbcharset pvw readonly restorescreen rnu ruf sc scrollopt selectmode shellpipe shellxquote showcmd sidescroll smartindent sol spellsuggest sr stal sua swf syntax tagcase tbi termbidi tgst titleold top ttimeoutlen ttyscroll ul ur verbosefile visualbell wcm wi wildmenu winfixwidth wm wrapscan
syn keyword vimOption contained ai anti autochdir backspace balloonexpr bh bo browsedir casemap cfu cino cmp comments conceallevel cpo cscopequickfix csqf cursorbind define diffexpr dy ef eol esckeys fcs fdn ff fileignorecase flp foldexpr foldnestmax fp gfm grepformat guifontwide helpheight highlight hlg im imd imstatusfunc indentkeys isf isprint km lazyredraw lispwords lpl macatsui maxcombine mef mls modelines mousehide mp nu omnifunc paragraphs penc pi previewwindow printmbfont pythondll redrawtime revins ro ruler scb scs sessionoptions shellquote shiftround showfulltag sidescrolloff smarttab sp spf srr startofline suffixes switchbuf ta taglength tbidi termencoding thesaurus titlestring tpm ttm ttytype undodir ut vfile vop wd wic wildmode winheight wmh write
syn keyword vimOption contained akm antialias autoindent backup bdir bin bomb bs cb ch cinoptions cms commentstring confirm cpoptions cscoperelative csre cursorcolumn delcombine diffopt ea efm ep et fdc fdo ffs filetype fml foldignore foldopen fs gfn grepprg guiheadroom helplang history hls imactivatefunc imdisable inc indk isfname joinspaces kmp lbr list ls magic maxfuncdepth menuitems mm modifiable mousem mps number opendevice paste perldll pm printdevice printoptions pythonthreedll regexpengine ri rop rulerformat scr sect sft shellredir shiftwidth showmatch siso smc spc spl ss statusline suffixesadd sws tabline tagrelative tbis terse tildeop tl tr tty tw undofile vb vi wa weirdinvert wig wildoptions winminheight wmnu writeany
syn keyword vimOption contained al ar autoread backupcopy bdlay binary breakat bsdir cc charconvert cinw co compatible consk cpt cscopetag cst cursorline dex digraph ead ei equalalways eventignore fde fdt fic fillchars fmr foldlevel foldtext fsync gfs gtl guioptions hf hk hlsearch imactivatekey imi include inex isi js kp lcs listchars lsp makeef maxmapdepth mfd mmd modified mousemodel msm numberwidth operatorfunc pastetoggle pex pmbcs printencoding prompt qe relativenumber rightleft rs runtimepath scroll sections sh shellslash shm showmode sj smd spell splitbelow ssl stl sw sxe tabpagemax tags tbs textauto timeout tm ts ttybuiltin tx undolevels vbs viewdir wak wfh wildchar wim winminwidth wmw writebackup
syn keyword vimOption contained aleph arab autowrite backupdir belloff biosk breakindent bsk ccv ci cinwords cocu complete conskey crb cscopetagorder csto cwh dg dip eadirection ek equalprg ex fdi fen fileencoding fixendofline fo foldlevelstart formatexpr ft gfw gtt guipty hh hkmap ic imaf iminsert includeexpr inf isident key langmap linebreak lm luadll makeprg maxmem mh mmp more mouses mzq nuw opfunc patchexpr pexpr pmbfn printexpr pt quoteescape remap rightleftcmd rtp sb scrollbind secure shcf shelltemp shortmess showtabline slm sn spellcapcheck splitright ssop stmp swapfile sxq tabstop tagstack tc textmode timeoutlen to tsl ttyfast uc undoreload vdir viewoptions warn wfw wildcharm winaltkeys winwidth wop writedelay
syn keyword vimOption contained allowrevins arabic autowriteall backupext beval bioskey breakindentopt bt cd cin clipboard cole completefunc copyindent cryptmethod cscopeverbose csverb debug dict dir eb enc errorbells expandtab fdl fenc fileencodings fixeol foldclose foldmarker formatlistpat gcr ghr guicursor guitablabel hi hkmapp icon imak ims incsearch infercase isk keymap langmenu lines lmap lw mat maxmempattern mis mmt mouse mouseshape mzquantum odev osfiletype patchmode pfn popt printfont pumheight rdt renderoptions rl ru sbo scrolljump sel shell shelltype shortname shq sm so spellfile spr st sts swapsync syn tag tal tenc textwidth title toolbar tsr ttym udf updatecount ve viminfo wb wh wildignore window wiv wrap ws
syn keyword vimOption contained altkeymap arabicshape aw backupskip bex bk bri bufhidden cdpath cindent cm colorcolumn completeopt cot cscopepathcomp cspc cuc deco dictionary directory ed encoding errorfile exrc fdls fencs fileformat fk foldcolumn foldmethod formatoptions gd go guifont guitabtooltip hid hkp iconstring imc imsearch inde insertmode iskeyword keymodel langnoremap linespace lnr lz matchpairs maxmemtot mkspellmem mod mousef mouset nf oft pa path ph preserveindent printheader pvh re report rlc rubydll sbr scrolloff selection shellcmdflag shellxescape showbreak si smartcase softtabstop spelllang sps sta su swb synmaxcol tagbsearch tb term tf titlelen toolbariconsize ttimeout ttymouse udir updatetime verbose virtualedit wc whichwrap wildignorecase winfixheight wiw wrapmargin ww
syn keyword vimOption contained ambiwidth ari awa balloondelay bexpr bkc briopt buflisted cedit cink cmdheight columns
" vimOptions: These are the turn-off setting variants {{{2
syn keyword vimOption contained noacd noallowrevins noantialias noarabic noarshape noautoread noaw noballooneval nobinary nobk nobuflisted nocin noconfirm nocopyindent nocscoperelative nocsre nocuc nocursorcolumn nodelcombine nodigraph noed noendofline noerrorbells noex nofen nofixendofline nofkmap nogdefault nohidden nohkmapp nohlsearch noicon noim noimcmdline noimdisable noinf noinsertmode nojoinspaces nolazyredraw nolinebreak nolist nolpl noma nomagic noml nomodeline nomodified nomousef nomousehide nonumber noopendevice nopi nopreviewwindow nopvw norelativenumber norestorescreen nori norl noro noru nosb noscb noscs nosft noshelltemp noshortname noshowfulltag noshowmode nosm nosmartindent nosmd nosol nosplitbelow nospr nossl nostartofline noswapfile nota notagrelative notbi notbs noterse notextmode notgst notimeout noto notr nottybuiltin notx noundofile novisualbell nowarn noweirdinvert nowfw nowildignorecase nowinfixheight nowiv nowrap nowrite nowritebackup
@@ -48,8 +48,8 @@ syn keyword vimOption contained invai invaltkeymap invar invarabicshape invautoc
syn keyword vimOption contained invakm invanti invarab invari invautoindent invautowriteall invbackup invbin invbioskey invbomb invci invcompatible invconskey invcrb invcscopeverbose invcsverb invcursorbind invdeco invdiff inveb invek invequalalways invet invexrc invfileignorecase invfk invgd invhid invhkmap invhls
" termcap codes (which can also be set) {{{2
syn keyword vimOption contained t_AB t_al t_bc t_ce t_cl t_Co t_Cs t_CV t_db t_dl t_DL t_EI t_F1 t_F2 t_F3 t_F4 t_F5 t_F6 t_F7 t_F8 t_F9 t_fs t_IE t_IS t_k1 t_K1 t_k2 t_k3 t_K3 t_k4 t_K4 t_k5 t_K5 t_k6 t_K6 t_k7 t_K7 t_k8 t_K8 t_k9 t_K9 t_KA t_kb t_kB t_KB t_KC t_kd t_kD t_KD t_ke t_KE t_KF t_KG t_kh t_KH t_kI t_KI t_KJ t_KK t_kl t_KL t_kN t_kP t_kr t_ks t_ku t_le t_mb t_md t_me t_mr t_ms t_nd t_op t_RI t_RV t_Sb t_se t_Sf t_SI t_so t_sr t_SR t_te t_ti t_ts t_u7 t_ue t_us t_ut t_vb t_ve t_vi t_vs t_WP t_WS t_xn t_xs t_ZH t_ZR
syn keyword vimOption contained t_AF t_AL t_cd t_Ce t_cm t_cs t_CS t_da
syn keyword vimOption contained t_AB t_al t_bc t_ce t_cl t_Co t_Cs t_CV t_db t_DL t_EI t_F1 t_F2 t_F3 t_F4 t_F5 t_F6 t_F7 t_F8 t_F9 t_fs t_IE t_IS t_k1 t_K1 t_k2 t_k3 t_K3 t_k4 t_K4 t_k5 t_K5 t_k6 t_K6 t_k7 t_K7 t_k8 t_K8 t_k9 t_K9 t_KA t_kb t_kB t_KB t_KC t_kd t_kD t_KD t_ke t_KE t_KF t_KG t_kh t_KH t_kI t_KI t_KJ t_KK t_kl t_KL t_kN t_kP t_kr t_ks t_ku t_le t_mb t_md t_me t_mr t_ms t_nd t_op t_RB t_RI t_RV t_Sb t_se t_Sf t_SI t_so t_sr t_SR t_te t_ti t_ts t_u7 t_ue t_us t_ut t_vb t_ve t_vi t_vs t_WP t_WS t_xn t_xs t_ZH t_ZR
syn keyword vimOption contained t_AF t_AL t_cd t_Ce t_cm t_cs t_CS t_da t_dl
syn match vimOption contained "t_%1"
syn match vimOption contained "t_#2"
syn match vimOption contained "t_#4"
+2
View File
@@ -46,6 +46,8 @@ Dmitry Vazhov\
\
Thank you to {\field{\*\fldinst{HYPERLINK "http://www.positivespinmedia.com"}}{\fldrslt Positive Spin Media}} for the PSMTabBarControl Framework.\
\
Thank you to {\field{\*\fldinst{HYPERLINK "https://whomwah.github.io/qlstephen/"}}{\fldrslt Duncan Robertson}} for the QLStephen QuickLook plugin.\
\
Toolbar icons by {\field{\*\fldinst{HYPERLINK "http://www.mattballdesign.com/"}}{\fldrslt Matt Ball}} (free Developer Icons), {\field{\*\fldinst{HYPERLINK "http://www.jonasraskdesign.com/"}}{\fldrslt Jonas Rask}} (Danish Royalty Free icon set), and {\field{\*\fldinst{HYPERLINK "http://www.everaldo.com"}}{\fldrslt Everaldo Coelho}} (Crystal Project Icons, released under LGPL license).\
\
Revamped MacVim icon by RIC.\
+1 -1
View File
@@ -1256,7 +1256,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>83</string>
<string>87</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
+3 -2
View File
@@ -1844,6 +1844,7 @@ static void netbeansReadCallback(CFSocketRef s,
[NSNumber numberWithBool:mmta], @"p_mmta",
[NSNumber numberWithInt:numTabs], @"numTabs",
[NSNumber numberWithInt:fuoptions_flags], @"fullScreenOptions",
[NSNumber numberWithLong:p_mouset], @"p_mouset",
nil];
// Put the state before all other messages.
@@ -1932,12 +1933,12 @@ static void netbeansReadCallback(CFSocketRef s,
int col = *((int*)bytes); bytes += sizeof(int);
int button = *((int*)bytes); bytes += sizeof(int);
int flags = *((int*)bytes); bytes += sizeof(int);
int count = *((int*)bytes); bytes += sizeof(int);
int repeat = *((int*)bytes); bytes += sizeof(int);
button = eventButtonNumberToVimMouseButton(button);
if (button >= 0) {
flags = eventModifierFlagsToVimMouseModMask(flags);
gui_send_mouse_event(button, col, row, count>1, flags);
gui_send_mouse_event(button, col, row, repeat, flags);
}
} else if (MouseUpMsgID == msgid) {
if (!data) return;
+2
View File
@@ -35,6 +35,8 @@
BOOL interpretKeyEventsSwallowedKey;
NSEvent *currentEvent;
NSMutableDictionary *signImages;
BOOL useMouseTime;
NSDate *mouseDownTime;
// Input Manager
NSRange imRange;
+22 -2
View File
@@ -80,6 +80,11 @@ KeyboardInputSourcesEqual(TISInputSourceRef a, TISInputSourceRef b)
signImages = [[NSMutableDictionary alloc] init];
useMouseTime =
[[NSUserDefaults standardUserDefaults] boolForKey:MMUseMouseTimeKey];
if (useMouseTime)
mouseDownTime = [[NSDate date] retain];
return self;
}
@@ -91,6 +96,7 @@ KeyboardInputSourcesEqual(TISInputSourceRef a, TISInputSourceRef b)
[markedText release]; markedText = nil;
[markedTextAttributes release]; markedTextAttributes = nil;
[signImages release]; signImages = nil;
[mouseDownTime release]; mouseDownTime = nil;
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
if (asciiImSource) {
@@ -380,7 +386,21 @@ KeyboardInputSourcesEqual(TISInputSourceRef a, TISInputSourceRef b)
int button = [event buttonNumber];
int flags = [event modifierFlags];
int count = [event clickCount];
int repeat = 0;
if (useMouseTime) {
// Use Vim mouseTime option to handle multiple mouse down events
NSDate *now = [[NSDate date] retain];
id mouset = [[[self vimController] vimState] objectForKey:@"p_mouset"];
NSTimeInterval interval =
[now timeIntervalSinceDate:mouseDownTime] * 1000.0;
if (interval < (NSTimeInterval)[mouset longValue])
repeat = 1;
mouseDownTime = now;
} else {
repeat = [event clickCount] > 1;
}
NSMutableData *data = [NSMutableData data];
// If desired, intepret Ctrl-Click as a right mouse click.
@@ -398,7 +418,7 @@ KeyboardInputSourcesEqual(TISInputSourceRef a, TISInputSourceRef b)
[data appendBytes:&col length:sizeof(int)];
[data appendBytes:&button length:sizeof(int)];
[data appendBytes:&flags length:sizeof(int)];
[data appendBytes:&count length:sizeof(int)];
[data appendBytes:&repeat length:sizeof(int)];
[[self vimController] sendMessage:MouseDownMsgID data:data];
}
+13 -7
View File
@@ -71,6 +71,8 @@ static BOOL isUnsafeMessage(int msgid);
}
- (void)setTextFieldString:(NSString *)textFieldString;
- (NSTextField *)textField;
- (void)beginSheetModalForWindow:(NSWindow *)window
modalDelegate:(id)delegate;
@end
@@ -1533,9 +1535,7 @@ static BOOL isUnsafeMessage(int msgid);
}
[alert beginSheetModalForWindow:[windowController window]
modalDelegate:self
didEndSelector:@selector(alertDidEnd:code:context:)
contextInfo:NULL];
modalDelegate:self];
[alert release];
}
@@ -1602,13 +1602,19 @@ static BOOL isUnsafeMessage(int msgid);
- (void)beginSheetModalForWindow:(NSWindow *)window
modalDelegate:(id)delegate
didEndSelector:(SEL)didEndSelector
contextInfo:(void *)contextInfo
{
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10
[super beginSheetModalForWindow:window
completionHandler:^(NSModalResponse code) {
[delegate alertDidEnd:self code:code context:NULL];
}];
#else
[super beginSheetModalForWindow:window
modalDelegate:delegate
didEndSelector:didEndSelector
contextInfo:contextInfo];
didEndSelector:@selector(alertDidEnd:code:context:)
contextInfo:NULL];
#endif
// HACK! Place the input text field at the bottom of the informative text
// (which has been made a bit larger by adding newline characters).
+19
View File
@@ -108,6 +108,14 @@ static CGSSetWindowBackgroundBlurRadiusFunction* GetCGSSetWindowBackgroundBlurRa
[super dealloc];
}
- (BOOL) canBecomeMainWindow {
return YES;
}
- (BOOL) canBecomeKeyWindow {
return YES;
}
- (BOOL)hideTablineSeparator:(BOOL)hide
{
BOOL isHidden = [tablineSeparator isHidden];
@@ -227,4 +235,15 @@ static CGSSetWindowBackgroundBlurRadiusFunction* GetCGSSetWindowBackgroundBlurRa
#endif
}
- (void)setToolbar:(NSToolbar *)toolbar
{
if ([[NSUserDefaults standardUserDefaults]
boolForKey:MMNoTitleBarWindowKey]) {
// MacVim can't have toolbar with No title bar setting.
return;
}
[super setToolbar:toolbar];
}
@end // MMWindow
+6
View File
@@ -130,6 +130,12 @@
| NSMiniaturizableWindowMask | NSResizableWindowMask
| NSUnifiedTitleAndToolbarWindowMask;
if ([[NSUserDefaults standardUserDefaults]
boolForKey:MMNoTitleBarWindowKey]) {
// No title bar setting
styleMask &= ~NSTitledWindowMask;
}
// Use textured background on Leopard or later (skip the 'if' on Tiger for
// polished metal window).
if ([[NSUserDefaults standardUserDefaults] boolForKey:MMTexturedWindowKey]
@@ -65,6 +65,7 @@
1DE9B9500D341AB8008FEDD4 /* MMWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 1DE9B94E0D341AB8008FEDD4 /* MMWindow.m */; };
1DED78600C6DE43D0079945F /* vimrc in Copy Vim Runtime Files */ = {isa = PBXBuildFile; fileRef = 1DED785F0C6DE43D0079945F /* vimrc */; };
1DFE25A50C527BC4003000F7 /* PSMTabBarControl.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D493DB90C52533B00AB718C /* PSMTabBarControl.framework */; };
52818B031C1C08CE00F59085 /* QLStephen.qlgenerator in Copy QuickLookPlugin */ = {isa = PBXBuildFile; fileRef = 52818AFF1C1C075300F59085 /* QLStephen.qlgenerator */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
8D11072A0486CEB800E47090 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 29B97318FDCFA39411CA2CEA /* MainMenu.nib */; };
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
@@ -86,6 +87,20 @@
remoteGlobalIDString = 53DF68FC067E5B5A0090B5B0;
remoteInfo = PSMTabBarControlFramework;
};
52818AFE1C1C075300F59085 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 52818AFA1C1C075300F59085 /* QuickLookStephen.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 8D576316048677EA00EA77CD;
remoteInfo = QuickLookStephen;
};
52818B001C1C084100F59085 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 52818AFA1C1C075300F59085 /* QuickLookStephen.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = 8D57630D048677EA00EA77CD;
remoteInfo = QuickLookStephen;
};
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
@@ -124,6 +139,17 @@
name = "Copy Vim Runtime Files";
runOnlyForDeploymentPostprocessing = 0;
};
52818B021C1C088000F59085 /* Copy QuickLookPlugin */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = ../Library/QuickLook;
dstSubfolderSpec = 6;
files = (
52818B031C1C08CE00F59085 /* QLStephen.qlgenerator in Copy QuickLookPlugin */,
);
name = "Copy QuickLookPlugin";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
@@ -209,6 +235,7 @@
29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
32CA4F630368D1EE00C91783 /* MacVim_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MacVim_Prefix.pch; sourceTree = "<group>"; };
52818AFA1C1C075300F59085 /* QuickLookStephen.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = QuickLookStephen.xcodeproj; path = qlstephen/QuickLookStephen.xcodeproj; sourceTree = "<group>"; };
8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
8D1107320486CEB800E47090 /* MacVim.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MacVim.app; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
@@ -367,6 +394,7 @@
29B97317FDCFA39411CA2CEA /* Resources */,
1DE602460C587F760055263D /* Vim Resources */,
29B97323FDCFA39411CA2CEA /* Frameworks */,
52818AF81C1C073400F59085 /* QuickLook Plugin */,
19C28FACFE9D520D11CA2CBB /* Products */,
);
name = MacVim;
@@ -406,6 +434,22 @@
name = Frameworks;
sourceTree = "<group>";
};
52818AF81C1C073400F59085 /* QuickLook Plugin */ = {
isa = PBXGroup;
children = (
52818AFA1C1C075300F59085 /* QuickLookStephen.xcodeproj */,
);
name = "QuickLook Plugin";
sourceTree = "<group>";
};
52818AFB1C1C075300F59085 /* Products */ = {
isa = PBXGroup;
children = (
52818AFF1C1C075300F59085 /* QLStephen.qlgenerator */,
);
name = Products;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
@@ -418,6 +462,7 @@
8D11072E0486CEB800E47090 /* Frameworks */,
1D0DCAD80BA3604D00B6CCFA /* Copy Executables */,
1D9EB2840C366D7B0074B739 /* Copy Frameworks */,
52818B021C1C088000F59085 /* Copy QuickLookPlugin */,
1DE608B80C58807F0055263D /* Copy Vim Runtime Files */,
1D1C31F00EFFBFD6003FE9A5 /* Make Document Icons */,
);
@@ -425,6 +470,7 @@
);
dependencies = (
1D493DCD0C5254A400AB718C /* PBXTargetDependency */,
52818B011C1C084100F59085 /* PBXTargetDependency */,
);
name = MacVim;
productInstallPath = "$(HOME)/Applications";
@@ -458,6 +504,10 @@
ProductGroup = 1D493DB40C52533B00AB718C /* Products */;
ProjectRef = 1D493DB30C52533B00AB718C /* PSMTabBarControl.xcodeproj */;
},
{
ProductGroup = 52818AFB1C1C075300F59085 /* Products */;
ProjectRef = 52818AFA1C1C075300F59085 /* QuickLookStephen.xcodeproj */;
},
);
projectRoot = "";
targets = (
@@ -474,6 +524,13 @@
remoteRef = 1D493DB80C52533B00AB718C /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
52818AFF1C1C075300F59085 /* QLStephen.qlgenerator */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = QLStephen.qlgenerator;
remoteRef = 52818AFE1C1C075300F59085 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */
/* Begin PBXResourcesBuildPhase section */
@@ -574,6 +631,11 @@
name = PSMTabBarControlFramework;
targetProxy = 1D493DCC0C5254A400AB718C /* PBXContainerItemProxy */;
};
52818B011C1C084100F59085 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = QuickLookStephen;
targetProxy = 52818B001C1C084100F59085 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
+2
View File
@@ -37,6 +37,7 @@ extern NSString *MMTranslateCtrlClickKey;
extern NSString *MMTopLeftPointKey;
extern NSString *MMOpenInCurrentWindowKey;
extern NSString *MMNoFontSubstitutionKey;
extern NSString *MMNoTitleBarWindowKey;
extern NSString *MMLoginShellKey;
extern NSString *MMUntitledWindowKey;
extern NSString *MMTexturedWindowKey;
@@ -54,6 +55,7 @@ extern NSString *MMUseInlineImKey;
#endif // INCLUDE_OLD_IM_CODE
extern NSString *MMSuppressTerminationAlertKey;
extern NSString *MMNativeFullScreenKey;
extern NSString *MMUseMouseTimeKey;
// Enum for MMUntitledWindowKey
+2
View File
@@ -29,6 +29,7 @@ NSString *MMTranslateCtrlClickKey = @"MMTranslateCtrlClick";
NSString *MMTopLeftPointKey = @"MMTopLeftPoint";
NSString *MMOpenInCurrentWindowKey = @"MMOpenInCurrentWindow";
NSString *MMNoFontSubstitutionKey = @"MMNoFontSubstitution";
NSString *MMNoTitleBarWindowKey = @"MMNoTitleBarWindow";
NSString *MMLoginShellKey = @"MMLoginShell";
NSString *MMUntitledWindowKey = @"MMUntitledWindow";
NSString *MMTexturedWindowKey = @"MMTexturedWindow";
@@ -46,6 +47,7 @@ NSString *MMUseInlineImKey = @"MMUseInlineIm";
#endif // INCLUDE_OLD_IM_CODE
NSString *MMSuppressTerminationAlertKey = @"MMSuppressTerminationAlert";
NSString *MMNativeFullScreenKey = @"MMNativeFullScreen";
NSString *MMUseMouseTimeKey = @"MMUseMouseTime";
+6
View File
@@ -176,6 +176,12 @@ gui_macvim_after_fork_init()
val = CFPreferencesGetAppIntegerValue((CFStringRef)MMRendererKey,
kCFPreferencesCurrentApplication,
&keyValid);
if (!keyValid) {
// If MMRendererKey is not valid in the defaults, it means MacVim uses
// the Core Text Renderer.
keyValid = YES;
val = MMRendererCoreText;
}
if (keyValid) {
ASLogInfo(@"Use renderer=%ld", val);
use_gui_macvim_draw_string = (val != MMRendererCoreText);
Binary file not shown.
@@ -0,0 +1,55 @@
#include <CoreFoundation/CoreFoundation.h>
#include <CoreServices/CoreServices.h>
#include <QuickLook/QuickLook.h>
#import <Foundation/Foundation.h>
#import "QLSFileAttributes.h"
// Generate a preview for the document with the given url
OSStatus GeneratePreviewForURL(void *thisInterface,
QLPreviewRequestRef request,
CFURLRef url,
CFStringRef contentTypeUTI,
CFDictionaryRef options) {
@autoreleasepool {
if (QLPreviewRequestIsCancelled(request))
return noErr;
QLSFileAttributes *magicAttributes =
[QLSFileAttributes attributesForItemAtURL:(__bridge NSURL *)url];
if (!magicAttributes) {
NSLog(@"QLStephen: Could not determine attribtues of file %@", url);
return noErr;
}
if (!magicAttributes.isTextFile) {
return noErr;
}
if (magicAttributes.fileEncoding == kCFStringEncodingInvalidId) {
NSLog(@"QLStephen: Could not determine encoding of file %@", url);
return noErr;
}
NSDictionary *previewProperties = @{
(NSString *)kQLPreviewPropertyStringEncodingKey : @( magicAttributes.fileEncoding ),
(NSString *)kQLPreviewPropertyWidthKey : @700,
(NSString *)kQLPreviewPropertyHeightKey : @800
};
QLPreviewRequestSetURLRepresentation(
request,
url,
kUTTypePlainText,
(__bridge CFDictionaryRef)previewProperties);
return noErr;
}
}
void CancelPreviewGeneration(void* thisInterface, QLPreviewRequestRef preview) {
// implement only if supported
}
@@ -0,0 +1,164 @@
#include <CoreFoundation/CoreFoundation.h>
#include <CoreServices/CoreServices.h>
#include <QuickLook/QuickLook.h>
#import <Foundation/Foundation.h>
#import "RegexKitLite.h"
#import "QLSFileAttributes.h"
/**
* This dictionary is used for a file with no extension. It maps the MIME type
* (as returned by file(1)) onto an appropriate thumbnail badge.
*/
static NSDictionary *mimeTypeToBadgeMap() {
return @{
@"application/xml": @"xml",
@"text/x-c" : @"C",
@"text/x-c++" : @"C++",
@"text/x-shellscript" : @"shell",
@"text/x-php" : @"php",
@"text/x-python" : @"python",
@"text/x-perl" : @"perl",
@"text/x-ruby" : @"ruby"
};
}
/**
* Some formats, e.g. Makefiles, have well-known names and no extension.
*/
static NSDictionary *filenameRegexToBadgeMap() {
return @{
@"Makefile" : @"make"
};
}
/**
* @return the string that should be used to badge the thumbnail.
*/
static NSString *ThumbnailBadgeForItemWithAttributes(
QLSFileAttributes *attributes) {
NSString *fileExtension = attributes.url.pathExtension;
NSString *fileName = attributes.url.lastPathComponent;
__block NSString *badge;
// Do we have a file extension? If so, use it as a badge if it's not too
// long.
if (![fileExtension isEqualToString:@""]) {
badge = fileExtension;
// Is the file extension too long to be reasonably displayed in a
// thumbnail? If so, fall back on the additional tests.
// FIXME: use some better test to determine an appropriate length.
// FIXME: perhaps we should truncate the extension (at the end? in the
// middle?) to fit as much in the thumbnail as possible.
if (badge.length >= 10)
badge = nil;
}
// Do we have a well-known MIME type? Note that we only do this test if we
// have no file extension. file(1) might wrongly guess the MIME type, and it
// would be annoying if the file extension were to say one thing and the
// badge another.
if (!badge && [fileExtension isEqualToString:@""]) {
NSDictionary *map = mimeTypeToBadgeMap();
badge = map[attributes.mimeType];
}
// Does the filename match a known pattern? If so, use the appropriate badge.
if (!badge && [fileExtension isEqualToString:@""]) {
NSDictionary *map = filenameRegexToBadgeMap();
[map enumerateKeysAndObjectsUsingBlock:
^(NSString *regex, NSString *candidateBadge, BOOL *stop) {
if ([fileName rkl_isMatchedByRegex:regex]) {
badge = candidateBadge;
*stop = true;
}
}];
}
// Do we have an executable text file? If so, assume it's a script of some
// sort.
if (!badge) {
NSFileManager *fm = [NSFileManager new];
BOOL isExecutable = [fm isExecutableFileAtPath:attributes.url.path];
if (isExecutable)
badge = @"script";
}
// No other tests passed? Just badge it with "txt". I would use "text",
// except that the OS X text QuickLook generator uses "txt", and we ought
// to be consistent with it.
if (!badge) {
badge = @"txt";
}
return [badge uppercaseString];
}
/* -----------------------------------------------------------------------------
Generate a thumbnail for file
This function's job is to create thumbnail for designated file as fast as
possible
-------------------------------------------------------------------------- */
OSStatus GenerateThumbnailForURL(void *thisInterface,
QLThumbnailRequestRef request,
CFURLRef url,
CFStringRef contentTypeUTI,
CFDictionaryRef options,
CGSize maxSize) {
@autoreleasepool {
if (QLThumbnailRequestIsCancelled(request))
return noErr;
QLSFileAttributes *magicAttributes
= [QLSFileAttributes attributesForItemAtURL:(__bridge NSURL *)url];
if (!magicAttributes) {
NSLog(@"QLStephen: Could not determine attribtues of file %@", url);
return noErr;
}
if (!magicAttributes.isTextFile) {
// NSLog(@"QLStephen: I don't think %@ is a text file", url);
return noErr;
}
if (magicAttributes.fileEncoding == kCFStringEncodingInvalidId) {
NSLog(@"QLStephen: Could not determine encoding of file %@", url);
return noErr;
}
NSDictionary *previewProperties = @{
(NSString *)kQLPreviewPropertyStringEncodingKey : @( magicAttributes.fileEncoding )
};
NSString *badge = ThumbnailBadgeForItemWithAttributes(magicAttributes);
NSDictionary *properties = @{
(NSString *)kQLThumbnailPropertyExtensionKey : badge
};
QLThumbnailRequestSetThumbnailWithURLRepresentation(
request,
url,
kUTTypePlainText,
(__bridge CFDictionaryRef)previewProperties,
(__bridge CFDictionaryRef)properties);
return noErr;
}
}
void CancelThumbnailGeneration(void* thisInterface,
QLThumbnailRequestRef thumbnail) {
// implement only if supported
}
+69
View File
@@ -0,0 +1,69 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeName</key>
<string>PlainText</string>
<key>CFBundleTypeRole</key>
<string>QLGenerator</string>
<key>LSItemContentTypes</key>
<array>
<string>public.data</string>
</array>
<key>LSTypeIsPackage</key>
<false/>
<key>NSPersistentStoreTypeKey</key>
<string>XML</string>
</dict>
</array>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>QLStephen</string>
<key>CFBundleShortVersionString</key>
<string>1.4</string>
<key>CFBundleVersion</key>
<string>1.4.2</string>
<key>CFPlugInDynamicRegisterFunction</key>
<string></string>
<key>CFPlugInDynamicRegistration</key>
<string>NO</string>
<key>CFPlugInFactories</key>
<dict>
<key>0CCF41BD-5E94-487C-B19D-FAADBD387609</key>
<string>QuickLookGeneratorPluginFactory</string>
</dict>
<key>CFPlugInTypes</key>
<dict>
<key>5E2D9680-5022-40FA-B806-43349622E5B9</key>
<array>
<string>0CCF41BD-5E94-487C-B19D-FAADBD387609</string>
</array>
</dict>
<key>CFPlugInUnloadFunction</key>
<string></string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2013 Duncan Robertson. All rights reserved.</string>
<key>QLNeedsToBeRunInMainThread</key>
<true/>
<key>QLPreviewHeight</key>
<real>600</real>
<key>QLPreviewWidth</key>
<real>800</real>
<key>QLSupportsConcurrentRequests</key>
<true/>
<key>QLThumbnailMinimumSize</key>
<real>17</real>
</dict>
</plist>
+21
View File
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2014 Duncan Robertson
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+21
View File
@@ -0,0 +1,21 @@
//
// QLSMagicFileAttributes.h
// QuickLookStephen
//
// Created by Nick Hutchinson on 31/07/12.
#import <Foundation/Foundation.h>
@interface QLSFileAttributes : NSObject
+ (instancetype)attributesForItemAtURL:(NSURL *)aURL;
@property (readonly) NSURL *url;
@property (readonly) BOOL isTextFile;
@property (readonly) NSString *mimeType;
@property (readonly) CFStringEncoding fileEncoding;
@end
+119
View File
@@ -0,0 +1,119 @@
//
// QLSMagicFileAttributes.m
// QuickLookStephen
//
// Created by Nick Hutchinson on 31/07/12.
//
#import "QLSFileAttributes.h"
#import "RegexKitLite.h"
@interface QLSFileAttributes ()
@property (readwrite) BOOL isTextFile;
@property (readwrite) NSString *mimeType;
@property (readwrite) CFStringEncoding fileEncoding;
@property (readwrite) NSURL *url;
@end
@implementation QLSFileAttributes
+ (instancetype)attributesForItemAtURL:(NSURL *)aURL
{
NSString *magicString = [self magicStringForItemAtURL:aURL];
if (!magicString) return nil;
NSArray *matches = [magicString rkl_captureComponentsMatchedByRegex:
@"(\\S+/\\S+); charset=(\\S+)"];
if (![matches count]) return nil;
NSString *mimeType = matches[1];
NSString *charset = matches[2];
BOOL mimeTypeIsTextual = [self mimeTypeIsTextual:mimeType];
CFStringEncoding encoding =
CFStringConvertIANACharSetNameToEncoding((CFStringRef)charset);
QLSFileAttributes *attributes = [QLSFileAttributes new];
attributes.fileEncoding = encoding;
attributes.isTextFile = mimeTypeIsTextual;
attributes.mimeType = mimeType;
attributes.url = aURL;
return attributes;
}
////////////////////////////////////////////////////////////////////////////////
// Private Methods
////////////////////////////////////////////////////////////////////////////////
+ (NSString *)magicStringForItemAtURL:(NSURL *)aURL
{
NSString *path = [aURL path];
NSParameterAssert(path);
NSMutableDictionary *environment =
[NSProcessInfo.processInfo.environment mutableCopy];
environment[@"LC_ALL"] = @"en_US.UTF-8";
NSTask *task = [NSTask new];
task.launchPath = @"/usr/bin/file";
task.arguments = @[@"--mime", @"--brief", path];
task.environment = environment;
task.standardOutput = [NSPipe new];
[task launch];
NSData *output =
[[task.standardOutput fileHandleForReading] readDataToEndOfFile];
[task waitUntilExit];
if (task.terminationReason != NSTaskTerminationReasonExit
|| task.terminationStatus != 0) {
return nil;
}
NSCharacterSet *whitespaceCharset =
[NSCharacterSet whitespaceAndNewlineCharacterSet];
NSString *stringOutput =
[[NSString alloc] initWithData:output encoding:NSUTF8StringEncoding];
stringOutput =
[stringOutput stringByTrimmingCharactersInSet:whitespaceCharset];
return stringOutput;
}
/**
* @return YES if mimeType contains "text", or if the mime type conforms to the
* public.text UTI.
*/
+ (BOOL)mimeTypeIsTextual:(NSString *)mimeType
{
NSArray *components = [mimeType componentsSeparatedByString:@"/"];
if (components.count != 2)
return NO;
if ([components[0] rangeOfString:@"text"].location != NSNotFound)
return YES;
NSString *UTType =
CFBridgingRelease(UTTypeCreatePreferredIdentifierForTag(
kUTTagClassMIMEType,
(__bridge CFStringRef)mimeType,
kUTTypeData));
if (UTTypeConformsTo((__bridge CFStringRef)UTType, kUTTypeText)) {
return YES;
}
return NO;
}
@end
@@ -0,0 +1,297 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
0107ABFF15C76F2900C65F1A /* QLSFileAttributes.m in Sources */ = {isa = PBXBuildFile; fileRef = 0107ABFD15C76F2900C65F1A /* QLSFileAttributes.m */; };
0149EB3B15F2E8E4003AB298 /* RegexKitLite.m in Sources */ = {isa = PBXBuildFile; fileRef = 0149EB3915F2E8E4003AB298 /* RegexKitLite.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
0149EB3E15F2E9A3003AB298 /* libicucore.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 0149EB3D15F2E9A3003AB298 /* libicucore.dylib */; };
2C05A19C06CAA52B00D84F6F /* GeneratePreviewForURL.m in Sources */ = {isa = PBXBuildFile; fileRef = 2C05A19B06CAA52B00D84F6F /* GeneratePreviewForURL.m */; };
61E3BCFB0870B4F2002186A0 /* GenerateThumbnailForURL.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E3BCFA0870B4F2002186A0 /* GenerateThumbnailForURL.m */; };
8D576312048677EA00EA77CD /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = 08FB77B6FE84183AC02AAC07 /* main.c */; settings = {ATTRIBUTES = (); }; };
8D576314048677EA00EA77CD /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0AA1909FFE8422F4C02AAC07 /* CoreFoundation.framework */; };
8D5B49A804867FD3000E48DA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 8D5B49A704867FD3000E48DA /* InfoPlist.strings */; };
AE02F6EB0EDDFA6400CBA17D /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AE02F6EA0EDDFA6400CBA17D /* Cocoa.framework */; };
C86B05270671AA6E00DD9006 /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C86B05260671AA6E00DD9006 /* CoreServices.framework */; };
F28CFBFD0A3EC0AF000ABFF5 /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F28CFBFC0A3EC0AF000ABFF5 /* ApplicationServices.framework */; };
F28CFC030A3EC0C6000ABFF5 /* QuickLook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F28CFC020A3EC0C6000ABFF5 /* QuickLook.framework */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
0107ABFC15C76F2900C65F1A /* QLSFileAttributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QLSFileAttributes.h; sourceTree = "<group>"; };
0107ABFD15C76F2900C65F1A /* QLSFileAttributes.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QLSFileAttributes.m; sourceTree = "<group>"; };
0149EB3815F2E8E4003AB298 /* RegexKitLite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegexKitLite.h; sourceTree = "<group>"; };
0149EB3915F2E8E4003AB298 /* RegexKitLite.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RegexKitLite.m; sourceTree = "<group>"; };
0149EB3D15F2E9A3003AB298 /* libicucore.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libicucore.dylib; path = usr/lib/libicucore.dylib; sourceTree = SDKROOT; };
089C167EFE841241C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
08FB77B6FE84183AC02AAC07 /* main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = "<group>"; };
0AA1909FFE8422F4C02AAC07 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<absolute>"; };
2C05A19B06CAA52B00D84F6F /* GeneratePreviewForURL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratePreviewForURL.m; sourceTree = "<group>"; usesTabs = 0; };
61E3BCFA0870B4F2002186A0 /* GenerateThumbnailForURL.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = GenerateThumbnailForURL.m; sourceTree = "<group>"; };
8D576316048677EA00EA77CD /* QLStephen.qlgenerator */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = QLStephen.qlgenerator; sourceTree = BUILT_PRODUCTS_DIR; };
8D576317048677EA00EA77CD /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
AE02F6EA0EDDFA6400CBA17D /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
C86B05260671AA6E00DD9006 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = "<absolute>"; };
F28CFBFC0A3EC0AF000ABFF5 /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = "<absolute>"; };
F28CFC020A3EC0C6000ABFF5 /* QuickLook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickLook.framework; path = /System/Library/Frameworks/QuickLook.framework; sourceTree = "<absolute>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
8D576313048677EA00EA77CD /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
0149EB3E15F2E9A3003AB298 /* libicucore.dylib in Frameworks */,
8D576314048677EA00EA77CD /* CoreFoundation.framework in Frameworks */,
C86B05270671AA6E00DD9006 /* CoreServices.framework in Frameworks */,
F28CFBFD0A3EC0AF000ABFF5 /* ApplicationServices.framework in Frameworks */,
F28CFC030A3EC0C6000ABFF5 /* QuickLook.framework in Frameworks */,
AE02F6EB0EDDFA6400CBA17D /* Cocoa.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
0149EB3F15F2EC37003AB298 /* Third-Party */ = {
isa = PBXGroup;
children = (
0149EB3815F2E8E4003AB298 /* RegexKitLite.h */,
0149EB3915F2E8E4003AB298 /* RegexKitLite.m */,
);
name = "Third-Party";
sourceTree = "<group>";
};
089C166AFE841209C02AAC07 /* QuickLookStephen */ = {
isa = PBXGroup;
children = (
0149EB3F15F2EC37003AB298 /* Third-Party */,
08FB77AFFE84173DC02AAC07 /* Source */,
089C167CFE841241C02AAC07 /* Resources */,
089C1671FE841209C02AAC07 /* External Frameworks and Libraries */,
19C28FB6FE9D52B211CA2CBB /* Products */,
);
name = QuickLookStephen;
sourceTree = "<group>";
};
089C1671FE841209C02AAC07 /* External Frameworks and Libraries */ = {
isa = PBXGroup;
children = (
0149EB3D15F2E9A3003AB298 /* libicucore.dylib */,
AE02F6EA0EDDFA6400CBA17D /* Cocoa.framework */,
F28CFC020A3EC0C6000ABFF5 /* QuickLook.framework */,
F28CFBFC0A3EC0AF000ABFF5 /* ApplicationServices.framework */,
C86B05260671AA6E00DD9006 /* CoreServices.framework */,
0AA1909FFE8422F4C02AAC07 /* CoreFoundation.framework */,
);
name = "External Frameworks and Libraries";
sourceTree = "<group>";
};
089C167CFE841241C02AAC07 /* Resources */ = {
isa = PBXGroup;
children = (
8D576317048677EA00EA77CD /* Info.plist */,
8D5B49A704867FD3000E48DA /* InfoPlist.strings */,
);
name = Resources;
sourceTree = "<group>";
};
08FB77AFFE84173DC02AAC07 /* Source */ = {
isa = PBXGroup;
children = (
61E3BCFA0870B4F2002186A0 /* GenerateThumbnailForURL.m */,
2C05A19B06CAA52B00D84F6F /* GeneratePreviewForURL.m */,
08FB77B6FE84183AC02AAC07 /* main.c */,
0107ABFC15C76F2900C65F1A /* QLSFileAttributes.h */,
0107ABFD15C76F2900C65F1A /* QLSFileAttributes.m */,
);
name = Source;
sourceTree = "<group>";
};
19C28FB6FE9D52B211CA2CBB /* Products */ = {
isa = PBXGroup;
children = (
8D576316048677EA00EA77CD /* QLStephen.qlgenerator */,
);
name = Products;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
8D57630D048677EA00EA77CD /* QuickLookStephen */ = {
isa = PBXNativeTarget;
buildConfigurationList = 2CA3261E0896AD4900168862 /* Build configuration list for PBXNativeTarget "QuickLookStephen" */;
buildPhases = (
8D57630F048677EA00EA77CD /* Resources */,
8D576311048677EA00EA77CD /* Sources */,
8D576313048677EA00EA77CD /* Frameworks */,
);
buildRules = (
);
dependencies = (
);
name = QuickLookStephen;
productName = QuickLookStephen;
productReference = 8D576316048677EA00EA77CD /* QLStephen.qlgenerator */;
productType = "com.apple.product-type.bundle";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
089C1669FE841209C02AAC07 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0720;
};
buildConfigurationList = 2CA326220896AD4900168862 /* Build configuration list for PBXProject "QuickLookStephen" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
en,
);
mainGroup = 089C166AFE841209C02AAC07 /* QuickLookStephen */;
projectDirPath = "";
projectRoot = "";
targets = (
8D57630D048677EA00EA77CD /* QuickLookStephen */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
8D57630F048677EA00EA77CD /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8D5B49A804867FD3000E48DA /* InfoPlist.strings in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
8D576311048677EA00EA77CD /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8D576312048677EA00EA77CD /* main.c in Sources */,
2C05A19C06CAA52B00D84F6F /* GeneratePreviewForURL.m in Sources */,
61E3BCFB0870B4F2002186A0 /* GenerateThumbnailForURL.m in Sources */,
0107ABFF15C76F2900C65F1A /* QLSFileAttributes.m in Sources */,
0149EB3B15F2E8E4003AB298 /* RegexKitLite.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
8D5B49A704867FD3000E48DA /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
089C167EFE841241C02AAC07 /* English */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
2CA3261F0896AD4900168862 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_ARC = YES;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = NO;
INFOPLIST_FILE = Info.plist;
PRODUCT_BUNDLE_IDENTIFIER = com.whomwah.quicklookstephen;
PRODUCT_NAME = QLStephen;
WRAPPER_EXTENSION = qlgenerator;
};
name = Debug;
};
2CA326200896AD4900168862 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_ARC = YES;
COMBINE_HIDPI_IMAGES = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_MODEL_TUNING = G5;
GCC_PRECOMPILE_PREFIX_HEADER = NO;
INFOPLIST_FILE = Info.plist;
PRODUCT_BUNDLE_IDENTIFIER = com.whomwah.quicklookstephen;
PRODUCT_NAME = QLStephen;
WRAPPER_EXTENSION = qlgenerator;
};
name = Release;
};
2CA326230896AD4900168862 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = c99;
GCC_PREPROCESSOR_DEFINITIONS = "RKL_PREPEND_TO_METHODS=rkl_";
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.8;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
WARNING_CFLAGS = (
"-Wextra",
"-Wall",
"-Wno-unused-parameter",
);
};
name = Debug;
};
2CA326240896AD4900168862 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
GCC_C_LANGUAGE_STANDARD = c99;
GCC_PREPROCESSOR_DEFINITIONS = "RKL_PREPEND_TO_METHODS=rkl_";
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.8;
SDKROOT = macosx;
WARNING_CFLAGS = (
"-Wextra",
"-Wall",
"-Wno-unused-parameter",
);
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
2CA3261E0896AD4900168862 /* Build configuration list for PBXNativeTarget "QuickLookStephen" */ = {
isa = XCConfigurationList;
buildConfigurations = (
2CA3261F0896AD4900168862 /* Debug */,
2CA326200896AD4900168862 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
2CA326220896AD4900168862 /* Build configuration list for PBXProject "QuickLookStephen" */ = {
isa = XCConfigurationList;
buildConfigurations = (
2CA326230896AD4900168862 /* Debug */,
2CA326240896AD4900168862 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 089C1669FE841209C02AAC07 /* Project object */;
}
+72
View File
@@ -0,0 +1,72 @@
## !! UPDATE !!
Hi all. I'm afriad I don't have time to maintain this project any more. I see the issues mounting but I don't have time to answer them. This was a pet project some time ago and I still use the plugin daily and it works just fine for me in it's current form. If anyone would like to step forward and be added a contributor to move it forward, please send me a message.
Duncan
## Reinforcement have arrived :-)
I have volunteered to bring Duncan's excellent QL plugin a bit more up to date. Don't expect to much though. I will focus on backlogged pull requests to begin with.
Tomas
# QuicklookStephen
QLStephen is a QuickLook plugin that lets you view plain text files without a file extension. Files like:
README
INSTALL
Capfile
CHANGELOG
etc...
## Installation
### Pre-compiled
* [Download the latest version of QuickLookStephen](https://github.com/whomwah/qlstephen/releases)
* Unzip
* Copy the file into `/Library/QuickLook` or `~/Library/QuickLook`
(You can create the `QuickLook` folder if it doesnt exist)
### Manually Compiled
Compliling the project yourself? Just copy the generated `QLStephen.qlgenerator`
file into the relevant `QuickLook` folder (as above).
## Trouble?
If youve installed the plugin, but dont see any changes:
- Make sure you are editing (a) the correct plist of (b) the correct bundle.
(For example, you might have two `QLStephen` plugins. Its possible the plugin in
another directory—perhaps `/Library/QuickLook/`—is what is being read.)
- Run `qlmanage -r` in the Terminal. (This will restart QuickLook, which reloads all plugins.)
## Why “QLStephen”?
Because I was listening to [Adam and Joe](http://www.bbc.co.uk/blogs/adamandjoe/2009/06/test-1.shtml) when I first wrote it.
## Authors
**Original author:** Duncan Robertson
Special thanks to the following people for submitting patches over the years:
* [Guillermo Ignacio Enriquez Gutierrez](https://github.com/nacho4d)
* [Rob Lourens](https://github.com/roblourens)
* [Avi Flax](https://github.com/aviflax)
* [Tony](https://github.com/Zearin)
* [Nicholas Hutchinson](https://github.com/nickhutchinson)
## Contributing
* Fork the project
* Send a pull request
* Dont change the build number (Ill do that when I release a new version)
+295
View File
@@ -0,0 +1,295 @@
//
// RegexKitLite.h
// http://regexkit.sourceforge.net/
// Licensed under the terms of the BSD License, as specified below.
//
/*
Copyright (c) 2008-2010, John Engelhart
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the Zang Industries nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef __OBJC__
#import <Foundation/NSArray.h>
#import <Foundation/NSError.h>
#import <Foundation/NSObjCRuntime.h>
#import <Foundation/NSRange.h>
#import <Foundation/NSString.h>
#endif // __OBJC__
#include <limits.h>
#include <stdint.h>
#include <sys/types.h>
#include <TargetConditionals.h>
#include <AvailabilityMacros.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifndef REGEXKITLITE_VERSION_DEFINED
#define REGEXKITLITE_VERSION_DEFINED
#define _RKL__STRINGIFY(b) #b
#define _RKL_STRINGIFY(a) _RKL__STRINGIFY(a)
#define _RKL_JOIN_VERSION(a,b) _RKL_STRINGIFY(a##.##b)
#define _RKL_VERSION_STRING(a,b) _RKL_JOIN_VERSION(a,b)
#define REGEXKITLITE_VERSION_MAJOR 4
#define REGEXKITLITE_VERSION_MINOR 0
#define REGEXKITLITE_VERSION_CSTRING _RKL_VERSION_STRING(REGEXKITLITE_VERSION_MAJOR, REGEXKITLITE_VERSION_MINOR)
#define REGEXKITLITE_VERSION_NSSTRING @REGEXKITLITE_VERSION_CSTRING
#endif // REGEXKITLITE_VERSION_DEFINED
#if !defined(RKL_BLOCKS) && defined(NS_BLOCKS_AVAILABLE) && (NS_BLOCKS_AVAILABLE == 1)
#define RKL_BLOCKS 1
#endif
#if defined(RKL_BLOCKS) && (RKL_BLOCKS == 1)
#define _RKL_BLOCKS_ENABLED 1
#endif // defined(RKL_BLOCKS) && (RKL_BLOCKS == 1)
#if defined(_RKL_BLOCKS_ENABLED) && !defined(__BLOCKS__)
#warning RegexKitLite support for Blocks is enabled, but __BLOCKS__ is not defined. This compiler may not support Blocks, in which case the behavior is undefined. This will probably cause numerous compiler errors.
#endif // defined(_RKL_BLOCKS_ENABLED) && !defined(__BLOCKS__)
// For Mac OS X < 10.5.
#ifndef NSINTEGER_DEFINED
#define NSINTEGER_DEFINED
#if defined(__LP64__) || defined(NS_BUILD_32_LIKE_64)
typedef long NSInteger;
typedef unsigned long NSUInteger;
#define NSIntegerMin LONG_MIN
#define NSIntegerMax LONG_MAX
#define NSUIntegerMax ULONG_MAX
#else // defined(__LP64__) || defined(NS_BUILD_32_LIKE_64)
typedef int NSInteger;
typedef unsigned int NSUInteger;
#define NSIntegerMin INT_MIN
#define NSIntegerMax INT_MAX
#define NSUIntegerMax UINT_MAX
#endif // defined(__LP64__) || defined(NS_BUILD_32_LIKE_64)
#endif // NSINTEGER_DEFINED
#ifndef RKLREGEXOPTIONS_DEFINED
#define RKLREGEXOPTIONS_DEFINED
// These must be identical to their ICU regex counterparts. See http://www.icu-project.org/userguide/regexp.html
enum {
RKLNoOptions = 0,
RKLCaseless = 2,
RKLComments = 4,
RKLDotAll = 32,
RKLMultiline = 8,
RKLUnicodeWordBoundaries = 256
};
typedef uint32_t RKLRegexOptions; // This must be identical to the ICU 'flags' argument type.
#endif // RKLREGEXOPTIONS_DEFINED
#ifndef RKLREGEXENUMERATIONOPTIONS_DEFINED
#define RKLREGEXENUMERATIONOPTIONS_DEFINED
enum {
RKLRegexEnumerationNoOptions = 0UL,
RKLRegexEnumerationCapturedStringsNotRequired = 1UL << 9,
RKLRegexEnumerationReleaseStringReturnedByReplacementBlock = 1UL << 10,
RKLRegexEnumerationFastCapturedStringsXXX = 1UL << 11,
};
typedef NSUInteger RKLRegexEnumerationOptions;
#endif // RKLREGEXENUMERATIONOPTIONS_DEFINED
#ifndef _REGEXKITLITE_H_
#define _REGEXKITLITE_H_
#if defined(__GNUC__) && (__GNUC__ >= 4) && defined(__APPLE_CC__) && (__APPLE_CC__ >= 5465)
#define RKL_DEPRECATED_ATTRIBUTE __attribute__((deprecated))
#else
#define RKL_DEPRECATED_ATTRIBUTE
#endif
#if defined(NS_REQUIRES_NIL_TERMINATION)
#define RKL_REQUIRES_NIL_TERMINATION NS_REQUIRES_NIL_TERMINATION
#else // defined(NS_REQUIRES_NIL_TERMINATION)
#define RKL_REQUIRES_NIL_TERMINATION
#endif // defined(NS_REQUIRES_NIL_TERMINATION)
// This requires a few levels of rewriting to get the desired results.
#define _RKL_CONCAT_2(c,d) c ## d
#define _RKL_CONCAT(a,b) _RKL_CONCAT_2(a,b)
#ifdef RKL_PREPEND_TO_METHODS
#define RKL_METHOD_PREPEND(x) _RKL_CONCAT(RKL_PREPEND_TO_METHODS, x)
#else // RKL_PREPEND_TO_METHODS
#define RKL_METHOD_PREPEND(x) x
#endif // RKL_PREPEND_TO_METHODS
// If it looks like low memory notifications might be available, add code to register and respond to them.
// This is (should be) harmless if it turns out that this isn't the case, since the notification that we register for,
// UIApplicationDidReceiveMemoryWarningNotification, is dynamically looked up via dlsym().
#if ((defined(TARGET_OS_EMBEDDED) && (TARGET_OS_EMBEDDED != 0)) || (defined(TARGET_OS_IPHONE) && (TARGET_OS_IPHONE != 0))) && (!defined(RKL_REGISTER_FOR_IPHONE_LOWMEM_NOTIFICATIONS) || (RKL_REGISTER_FOR_IPHONE_LOWMEM_NOTIFICATIONS != 0))
#define RKL_REGISTER_FOR_IPHONE_LOWMEM_NOTIFICATIONS 1
#endif
#ifdef __OBJC__
// NSException exception name.
extern NSString * const RKLICURegexException;
// NSError error domains and user info keys.
extern NSString * const RKLICURegexErrorDomain;
extern NSString * const RKLICURegexEnumerationOptionsErrorKey;
extern NSString * const RKLICURegexErrorCodeErrorKey;
extern NSString * const RKLICURegexErrorNameErrorKey;
extern NSString * const RKLICURegexLineErrorKey;
extern NSString * const RKLICURegexOffsetErrorKey;
extern NSString * const RKLICURegexPreContextErrorKey;
extern NSString * const RKLICURegexPostContextErrorKey;
extern NSString * const RKLICURegexRegexErrorKey;
extern NSString * const RKLICURegexRegexOptionsErrorKey;
extern NSString * const RKLICURegexReplacedCountErrorKey;
extern NSString * const RKLICURegexReplacedStringErrorKey;
extern NSString * const RKLICURegexReplacementStringErrorKey;
extern NSString * const RKLICURegexSubjectRangeErrorKey;
extern NSString * const RKLICURegexSubjectStringErrorKey;
@interface NSString (RegexKitLiteAdditions)
+ (void)RKL_METHOD_PREPEND(clearStringCache);
// Although these are marked as deprecated, a bug in GCC prevents a warning from being issues for + class methods. Filed bug with Apple, #6736857.
+ (NSInteger)RKL_METHOD_PREPEND(captureCountForRegex):(NSString *)regex RKL_DEPRECATED_ATTRIBUTE;
+ (NSInteger)RKL_METHOD_PREPEND(captureCountForRegex):(NSString *)regex options:(RKLRegexOptions)options error:(NSError **)error RKL_DEPRECATED_ATTRIBUTE;
- (NSArray *)RKL_METHOD_PREPEND(componentsSeparatedByRegex):(NSString *)regex;
- (NSArray *)RKL_METHOD_PREPEND(componentsSeparatedByRegex):(NSString *)regex range:(NSRange)range;
- (NSArray *)RKL_METHOD_PREPEND(componentsSeparatedByRegex):(NSString *)regex options:(RKLRegexOptions)options range:(NSRange)range error:(NSError **)error;
- (BOOL)RKL_METHOD_PREPEND(isMatchedByRegex):(NSString *)regex;
- (BOOL)RKL_METHOD_PREPEND(isMatchedByRegex):(NSString *)regex inRange:(NSRange)range;
- (BOOL)RKL_METHOD_PREPEND(isMatchedByRegex):(NSString *)regex options:(RKLRegexOptions)options inRange:(NSRange)range error:(NSError **)error;
- (NSRange)RKL_METHOD_PREPEND(rangeOfRegex):(NSString *)regex;
- (NSRange)RKL_METHOD_PREPEND(rangeOfRegex):(NSString *)regex capture:(NSInteger)capture;
- (NSRange)RKL_METHOD_PREPEND(rangeOfRegex):(NSString *)regex inRange:(NSRange)range;
- (NSRange)RKL_METHOD_PREPEND(rangeOfRegex):(NSString *)regex options:(RKLRegexOptions)options inRange:(NSRange)range capture:(NSInteger)capture error:(NSError **)error;
- (NSString *)RKL_METHOD_PREPEND(stringByMatching):(NSString *)regex;
- (NSString *)RKL_METHOD_PREPEND(stringByMatching):(NSString *)regex capture:(NSInteger)capture;
- (NSString *)RKL_METHOD_PREPEND(stringByMatching):(NSString *)regex inRange:(NSRange)range;
- (NSString *)RKL_METHOD_PREPEND(stringByMatching):(NSString *)regex options:(RKLRegexOptions)options inRange:(NSRange)range capture:(NSInteger)capture error:(NSError **)error;
- (NSString *)RKL_METHOD_PREPEND(stringByReplacingOccurrencesOfRegex):(NSString *)regex withString:(NSString *)replacement;
- (NSString *)RKL_METHOD_PREPEND(stringByReplacingOccurrencesOfRegex):(NSString *)regex withString:(NSString *)replacement range:(NSRange)searchRange;
- (NSString *)RKL_METHOD_PREPEND(stringByReplacingOccurrencesOfRegex):(NSString *)regex withString:(NSString *)replacement options:(RKLRegexOptions)options range:(NSRange)searchRange error:(NSError **)error;
//// >= 3.0
- (NSInteger)RKL_METHOD_PREPEND(captureCount);
- (NSInteger)RKL_METHOD_PREPEND(captureCountWithOptions):(RKLRegexOptions)options error:(NSError **)error;
- (BOOL)RKL_METHOD_PREPEND(isRegexValid);
- (BOOL)RKL_METHOD_PREPEND(isRegexValidWithOptions):(RKLRegexOptions)options error:(NSError **)error;
- (void)RKL_METHOD_PREPEND(flushCachedRegexData);
- (NSArray *)RKL_METHOD_PREPEND(componentsMatchedByRegex):(NSString *)regex;
- (NSArray *)RKL_METHOD_PREPEND(componentsMatchedByRegex):(NSString *)regex capture:(NSInteger)capture;
- (NSArray *)RKL_METHOD_PREPEND(componentsMatchedByRegex):(NSString *)regex range:(NSRange)range;
- (NSArray *)RKL_METHOD_PREPEND(componentsMatchedByRegex):(NSString *)regex options:(RKLRegexOptions)options range:(NSRange)range capture:(NSInteger)capture error:(NSError **)error;
- (NSArray *)RKL_METHOD_PREPEND(captureComponentsMatchedByRegex):(NSString *)regex;
- (NSArray *)RKL_METHOD_PREPEND(captureComponentsMatchedByRegex):(NSString *)regex range:(NSRange)range;
- (NSArray *)RKL_METHOD_PREPEND(captureComponentsMatchedByRegex):(NSString *)regex options:(RKLRegexOptions)options range:(NSRange)range error:(NSError **)error;
- (NSArray *)RKL_METHOD_PREPEND(arrayOfCaptureComponentsMatchedByRegex):(NSString *)regex;
- (NSArray *)RKL_METHOD_PREPEND(arrayOfCaptureComponentsMatchedByRegex):(NSString *)regex range:(NSRange)range;
- (NSArray *)RKL_METHOD_PREPEND(arrayOfCaptureComponentsMatchedByRegex):(NSString *)regex options:(RKLRegexOptions)options range:(NSRange)range error:(NSError **)error;
//// >= 4.0
- (NSArray *)RKL_METHOD_PREPEND(arrayOfDictionariesByMatchingRegex):(NSString *)regex withKeysAndCaptures:(id)firstKey, ... RKL_REQUIRES_NIL_TERMINATION;
- (NSArray *)RKL_METHOD_PREPEND(arrayOfDictionariesByMatchingRegex):(NSString *)regex range:(NSRange)range withKeysAndCaptures:(id)firstKey, ... RKL_REQUIRES_NIL_TERMINATION;
- (NSArray *)RKL_METHOD_PREPEND(arrayOfDictionariesByMatchingRegex):(NSString *)regex options:(RKLRegexOptions)options range:(NSRange)range error:(NSError **)error withKeysAndCaptures:(id)firstKey, ... RKL_REQUIRES_NIL_TERMINATION;
- (NSArray *)RKL_METHOD_PREPEND(arrayOfDictionariesByMatchingRegex):(NSString *)regex options:(RKLRegexOptions)options range:(NSRange)range error:(NSError **)error withFirstKey:(id)firstKey arguments:(va_list)varArgsList;
- (NSArray *)RKL_METHOD_PREPEND(arrayOfDictionariesByMatchingRegex):(NSString *)regex options:(RKLRegexOptions)options range:(NSRange)range error:(NSError **)error withKeys:(id *)keys forCaptures:(int *)captures count:(NSUInteger)count;
- (NSDictionary *)RKL_METHOD_PREPEND(dictionaryByMatchingRegex):(NSString *)regex withKeysAndCaptures:(id)firstKey, ... RKL_REQUIRES_NIL_TERMINATION;
- (NSDictionary *)RKL_METHOD_PREPEND(dictionaryByMatchingRegex):(NSString *)regex range:(NSRange)range withKeysAndCaptures:(id)firstKey, ... RKL_REQUIRES_NIL_TERMINATION;
- (NSDictionary *)RKL_METHOD_PREPEND(dictionaryByMatchingRegex):(NSString *)regex options:(RKLRegexOptions)options range:(NSRange)range error:(NSError **)error withKeysAndCaptures:(id)firstKey, ... RKL_REQUIRES_NIL_TERMINATION;
- (NSDictionary *)RKL_METHOD_PREPEND(dictionaryByMatchingRegex):(NSString *)regex options:(RKLRegexOptions)options range:(NSRange)range error:(NSError **)error withFirstKey:(id)firstKey arguments:(va_list)varArgsList;
- (NSDictionary *)RKL_METHOD_PREPEND(dictionaryByMatchingRegex):(NSString *)regex options:(RKLRegexOptions)options range:(NSRange)range error:(NSError **)error withKeys:(id *)keys forCaptures:(int *)captures count:(NSUInteger)count;
#ifdef _RKL_BLOCKS_ENABLED
- (BOOL)RKL_METHOD_PREPEND(enumerateStringsMatchedByRegex):(NSString *)regex usingBlock:(void (^)(NSInteger captureCount, NSString * const capturedStrings[captureCount], const NSRange capturedRanges[captureCount], volatile BOOL * const stop))block;
- (BOOL)RKL_METHOD_PREPEND(enumerateStringsMatchedByRegex):(NSString *)regex options:(RKLRegexOptions)options inRange:(NSRange)range error:(NSError **)error enumerationOptions:(RKLRegexEnumerationOptions)enumerationOptions usingBlock:(void (^)(NSInteger captureCount, NSString * const capturedStrings[captureCount], const NSRange capturedRanges[captureCount], volatile BOOL * const stop))block;
- (BOOL)RKL_METHOD_PREPEND(enumerateStringsSeparatedByRegex):(NSString *)regex usingBlock:(void (^)(NSInteger captureCount, NSString * const capturedStrings[captureCount], const NSRange capturedRanges[captureCount], volatile BOOL * const stop))block;
- (BOOL)RKL_METHOD_PREPEND(enumerateStringsSeparatedByRegex):(NSString *)regex options:(RKLRegexOptions)options inRange:(NSRange)range error:(NSError **)error enumerationOptions:(RKLRegexEnumerationOptions)enumerationOptions usingBlock:(void (^)(NSInteger captureCount, NSString * const capturedStrings[captureCount], const NSRange capturedRanges[captureCount], volatile BOOL * const stop))block;
- (NSString *)RKL_METHOD_PREPEND(stringByReplacingOccurrencesOfRegex):(NSString *)regex usingBlock:(NSString *(^)(NSInteger captureCount, NSString * const capturedStrings[captureCount], const NSRange capturedRanges[captureCount], volatile BOOL * const stop))block;
- (NSString *)RKL_METHOD_PREPEND(stringByReplacingOccurrencesOfRegex):(NSString *)regex options:(RKLRegexOptions)options inRange:(NSRange)range error:(NSError **)error enumerationOptions:(RKLRegexEnumerationOptions)enumerationOptions usingBlock:(NSString *(^)(NSInteger captureCount, NSString * const capturedStrings[captureCount], const NSRange capturedRanges[captureCount], volatile BOOL * const stop))block;
#endif // _RKL_BLOCKS_ENABLED
@end
@interface NSMutableString (RegexKitLiteAdditions)
- (NSInteger)RKL_METHOD_PREPEND(replaceOccurrencesOfRegex):(NSString *)regex withString:(NSString *)replacement;
- (NSInteger)RKL_METHOD_PREPEND(replaceOccurrencesOfRegex):(NSString *)regex withString:(NSString *)replacement range:(NSRange)searchRange;
- (NSInteger)RKL_METHOD_PREPEND(replaceOccurrencesOfRegex):(NSString *)regex withString:(NSString *)replacement options:(RKLRegexOptions)options range:(NSRange)searchRange error:(NSError **)error;
//// >= 4.0
#ifdef _RKL_BLOCKS_ENABLED
- (NSInteger)RKL_METHOD_PREPEND(replaceOccurrencesOfRegex):(NSString *)regex usingBlock:(NSString *(^)(NSInteger captureCount, NSString * const capturedStrings[captureCount], const NSRange capturedRanges[captureCount], volatile BOOL * const stop))block;
- (NSInteger)RKL_METHOD_PREPEND(replaceOccurrencesOfRegex):(NSString *)regex options:(RKLRegexOptions)options inRange:(NSRange)range error:(NSError **)error enumerationOptions:(RKLRegexEnumerationOptions)enumerationOptions usingBlock:(NSString *(^)(NSInteger captureCount, NSString * const capturedStrings[captureCount], const NSRange capturedRanges[captureCount], volatile BOOL * const stop))block;
#endif // _RKL_BLOCKS_ENABLED
@end
#endif // __OBJC__
#endif // _REGEXKITLITE_H_
#ifdef __cplusplus
} // extern "C"
#endif
File diff suppressed because it is too large Load Diff
+218
View File
@@ -0,0 +1,218 @@
//==============================================================================
//
// DO NO MODIFY THE CONTENT OF THIS FILE
//
// This file contains the generic CFPlug-in code necessary for your generator
// To complete your generator implement the function in GenerateThumbnailForURL/GeneratePreviewForURL.c
//
//==============================================================================
#include <CoreFoundation/CoreFoundation.h>
#include <CoreFoundation/CFPlugInCOM.h>
#include <CoreServices/CoreServices.h>
#include <QuickLook/QuickLook.h>
// -----------------------------------------------------------------------------
// constants
// -----------------------------------------------------------------------------
// Don't modify this line
#define PLUGIN_ID "0CCF41BD-5E94-487C-B19D-FAADBD387609"
//
// Below is the generic glue code for all plug-ins.
//
// You should not have to modify this code aside from changing
// names if you decide to change the names defined in the Info.plist
//
// -----------------------------------------------------------------------------
// typedefs
// -----------------------------------------------------------------------------
// The thumbnail generation function to be implemented in GenerateThumbnailForURL.c
OSStatus GenerateThumbnailForURL(void *thisInterface, QLThumbnailRequestRef thumbnail, CFURLRef url, CFStringRef contentTypeUTI, CFDictionaryRef options, CGSize maxSize);
void CancelThumbnailGeneration(void* thisInterface, QLThumbnailRequestRef thumbnail);
// The preview generation function to be implemented in GeneratePreviewForURL.c
OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview, CFURLRef url, CFStringRef contentTypeUTI, CFDictionaryRef options);
void CancelPreviewGeneration(void *thisInterface, QLPreviewRequestRef preview);
// The layout for an instance of QuickLookGeneratorPlugIn
typedef struct __QuickLookGeneratorPluginType
{
void *conduitInterface;
CFUUIDRef factoryID;
UInt32 refCount;
} QuickLookGeneratorPluginType;
// -----------------------------------------------------------------------------
// prototypes
// -----------------------------------------------------------------------------
// Forward declaration for the IUnknown implementation.
//
QuickLookGeneratorPluginType *AllocQuickLookGeneratorPluginType(CFUUIDRef inFactoryID);
void DeallocQuickLookGeneratorPluginType(QuickLookGeneratorPluginType *thisInstance);
HRESULT QuickLookGeneratorQueryInterface(void *thisInstance,REFIID iid,LPVOID *ppv);
void *QuickLookGeneratorPluginFactory(CFAllocatorRef allocator,CFUUIDRef typeID);
ULONG QuickLookGeneratorPluginAddRef(void *thisInstance);
ULONG QuickLookGeneratorPluginRelease(void *thisInstance);
// -----------------------------------------------------------------------------
// myInterfaceFtbl definition
// -----------------------------------------------------------------------------
// The QLGeneratorInterfaceStruct function table.
//
static QLGeneratorInterfaceStruct myInterfaceFtbl = {
NULL,
QuickLookGeneratorQueryInterface,
QuickLookGeneratorPluginAddRef,
QuickLookGeneratorPluginRelease,
NULL,
NULL,
NULL,
NULL
};
// -----------------------------------------------------------------------------
// AllocQuickLookGeneratorPluginType
// -----------------------------------------------------------------------------
// Utility function that allocates a new instance.
// You can do some initial setup for the generator here if you wish
// like allocating globals etc...
//
QuickLookGeneratorPluginType *AllocQuickLookGeneratorPluginType(CFUUIDRef inFactoryID)
{
QuickLookGeneratorPluginType *theNewInstance;
theNewInstance = (QuickLookGeneratorPluginType *)malloc(sizeof(QuickLookGeneratorPluginType));
memset(theNewInstance,0,sizeof(QuickLookGeneratorPluginType));
/* Point to the function table Malloc enough to store the stuff and copy the filler from myInterfaceFtbl over */
theNewInstance->conduitInterface = malloc(sizeof(QLGeneratorInterfaceStruct));
memcpy(theNewInstance->conduitInterface,&myInterfaceFtbl,sizeof(QLGeneratorInterfaceStruct));
/* Retain and keep an open instance refcount for each factory. */
theNewInstance->factoryID = CFRetain(inFactoryID);
CFPlugInAddInstanceForFactory(inFactoryID);
/* This function returns the IUnknown interface so set the refCount to one. */
theNewInstance->refCount = 1;
return theNewInstance;
}
// -----------------------------------------------------------------------------
// DeallocQuickLookGeneratorPluginType
// -----------------------------------------------------------------------------
// Utility function that deallocates the instance when
// the refCount goes to zero.
// In the current implementation generator interfaces are never deallocated
// but implement this as this might change in the future
//
void DeallocQuickLookGeneratorPluginType(QuickLookGeneratorPluginType *thisInstance)
{
CFUUIDRef theFactoryID;
theFactoryID = thisInstance->factoryID;
/* Free the conduitInterface table up */
free(thisInstance->conduitInterface);
/* Free the instance structure */
free(thisInstance);
if (theFactoryID){
CFPlugInRemoveInstanceForFactory(theFactoryID);
CFRelease(theFactoryID);
}
}
// -----------------------------------------------------------------------------
// QuickLookGeneratorQueryInterface
// -----------------------------------------------------------------------------
// Implementation of the IUnknown QueryInterface function.
//
HRESULT QuickLookGeneratorQueryInterface(void *thisInstance,REFIID iid,LPVOID *ppv)
{
CFUUIDRef interfaceID;
interfaceID = CFUUIDCreateFromUUIDBytes(kCFAllocatorDefault,iid);
if (CFEqual(interfaceID,kQLGeneratorCallbacksInterfaceID)){
/* If the Right interface was requested, bump the ref count,
* set the ppv parameter equal to the instance, and
* return good status.
*/
((QLGeneratorInterfaceStruct *)((QuickLookGeneratorPluginType *)thisInstance)->conduitInterface)->GenerateThumbnailForURL = GenerateThumbnailForURL;
((QLGeneratorInterfaceStruct *)((QuickLookGeneratorPluginType *)thisInstance)->conduitInterface)->CancelThumbnailGeneration = CancelThumbnailGeneration;
((QLGeneratorInterfaceStruct *)((QuickLookGeneratorPluginType *)thisInstance)->conduitInterface)->GeneratePreviewForURL = GeneratePreviewForURL;
((QLGeneratorInterfaceStruct *)((QuickLookGeneratorPluginType *)thisInstance)->conduitInterface)->CancelPreviewGeneration = CancelPreviewGeneration;
((QLGeneratorInterfaceStruct *)((QuickLookGeneratorPluginType*)thisInstance)->conduitInterface)->AddRef(thisInstance);
*ppv = thisInstance;
CFRelease(interfaceID);
return S_OK;
}else{
/* Requested interface unknown, bail with error. */
*ppv = NULL;
CFRelease(interfaceID);
return E_NOINTERFACE;
}
}
// -----------------------------------------------------------------------------
// QuickLookGeneratorPluginAddRef
// -----------------------------------------------------------------------------
// Implementation of reference counting for this type. Whenever an interface
// is requested, bump the refCount for the instance. NOTE: returning the
// refcount is a convention but is not required so don't rely on it.
//
ULONG QuickLookGeneratorPluginAddRef(void *thisInstance)
{
((QuickLookGeneratorPluginType *)thisInstance )->refCount += 1;
return ((QuickLookGeneratorPluginType*) thisInstance)->refCount;
}
// -----------------------------------------------------------------------------
// QuickLookGeneratorPluginRelease
// -----------------------------------------------------------------------------
// When an interface is released, decrement the refCount.
// If the refCount goes to zero, deallocate the instance.
//
ULONG QuickLookGeneratorPluginRelease(void *thisInstance)
{
((QuickLookGeneratorPluginType*)thisInstance)->refCount -= 1;
if (((QuickLookGeneratorPluginType*)thisInstance)->refCount == 0){
DeallocQuickLookGeneratorPluginType((QuickLookGeneratorPluginType*)thisInstance );
return 0;
}else{
return ((QuickLookGeneratorPluginType*) thisInstance )->refCount;
}
}
// -----------------------------------------------------------------------------
// QuickLookGeneratorPluginFactory
// -----------------------------------------------------------------------------
void *QuickLookGeneratorPluginFactory(CFAllocatorRef allocator,CFUUIDRef typeID)
{
QuickLookGeneratorPluginType *result;
CFUUIDRef uuid;
/* If correct type is being requested, allocate an
* instance of kQLGeneratorTypeID and return the IUnknown interface.
*/
if (CFEqual(typeID,kQLGeneratorTypeID)){
uuid = CFUUIDCreateFromString(kCFAllocatorDefault,CFSTR(PLUGIN_ID));
result = AllocQuickLookGeneratorPluginType(uuid);
CFRelease(uuid);
return result;
}
/* If the requested type is incorrect, return NULL. */
return NULL;
}
+39 -98
View File
@@ -117,8 +117,6 @@
# Netbeans Debugging Support: NBDEBUG=[yes or no] (should be no, yes
# doesn't work)
#
# Visual C Version: MSVCVER=m.n (default derived from nmake if undefined)
#
# Static Code Analysis: ANALYZE=yes (works with VS2012 only)
#
# You can combine any of these interfaces
@@ -213,20 +211,24 @@ OBJDIR = $(OBJDIR)d
! ifdef CPU
ASSEMBLY_ARCHITECTURE=$(CPU)
# Using I386 for $ASSEMBLY_ARCHITECTURE doesn't work for VC7.
! if ("$(ASSEMBLY_ARCHITECTURE)" == "i386") || ("$(ASSEMBLY_ARCHITECTURE)" == "I386")
ASSEMBLY_ARCHITECTURE = x86
! endif
! else
CPU = $(PROCESSOR_ARCHITECTURE)
ASSEMBLY_ARCHITECTURE = $(PROCESSOR_ARCHITECTURE)
! if ("$(CPU)" == "x86") || ("$(CPU)" == "X86")
! if "$(CPU)" == "I386"
CPU = i386
! endif
! else # !CPU
CPU = i386
! ifdef PLATFORM
! if ("$(PLATFORM)" == "x64") || ("$(PLATFORM)" == "X64")
CPU = AMD64
! elseif ("$(PLATFORM)" != "x86") && ("$(PLATFORM)" != "X86")
! error *** ERROR Unknown target platform "$(PLATFORM)". Make aborted.
! endif
! endif # !PLATFORM
! endif
!else # !PROCESSOR_ARCHITECTURE
# We're on Windows 95
CPU = i386
!endif # !PROCESSOR_ARCHITECTURE
ASSEMBLY_ARCHITECTURE=$(CPU)
OBJDIR = $(OBJDIR)$(CPU)
# Build a retail version by default
@@ -379,91 +381,29 @@ DEL_TREE = deltree /y
INTDIR=$(OBJDIR)
OUTDIR=$(OBJDIR)
# Derive version of VC being used from nmake if not specified
!if "$(MSVCVER)" == ""
!if "$(_NMAKE_VER)" == ""
MSVCVER = 4.0
!endif
!if "$(_NMAKE_VER)" == "162"
MSVCVER = 5.0
!endif
!if "$(_NMAKE_VER)" == "6.00.8168.0"
MSVCVER = 6.0
CPU = ix86
!endif
!if "$(_NMAKE_VER)" == "6.00.9782.0"
MSVCVER = 6.0
CPU = ix86
!endif
!if "$(_NMAKE_VER)" == "7.00.9466"
MSVCVER = 7.0
!endif
!if "$(_NMAKE_VER)" == "7.10.3077"
MSVCVER = 7.1
!endif
!if "$(_NMAKE_VER)" == "8.00.50727.42"
MSVCVER = 8.0
!endif
!if "$(_NMAKE_VER)" == "8.00.50727.762"
MSVCVER = 8.0
!endif
!if "$(_NMAKE_VER)" == "9.00.20706.01"
MSVCVER = 9.0
!endif
!if "$(_NMAKE_VER)" == "9.00.21022.08"
MSVCVER = 9.0
!endif
!if "$(_NMAKE_VER)" == "9.00.30729.01"
MSVCVER = 9.0
!endif
!if "$(_NMAKE_VER)" == "10.00.20506.01"
MSVCVER = 10.0
!endif
!if "$(_NMAKE_VER)" == "10.00.30128.01"
MSVCVER = 10.0
!endif
!if "$(_NMAKE_VER)" == "10.00.30319.01"
MSVCVER = 10.0
!endif
!if "$(_NMAKE_VER)" == "10.00.40219.01"
MSVCVER = 10.0
!endif
!if "$(_NMAKE_VER)" == "11.00.50727.1"
MSVCVER = 11.0
!endif
!if "$(_NMAKE_VER)" == "11.00.51106.1"
MSVCVER = 11.0
!endif
!if "$(_NMAKE_VER)" == "11.00.60315.1"
MSVCVER = 11.0
!endif
!if "$(_NMAKE_VER)" == "11.00.60610.1"
MSVCVER = 11.0
!endif
!if "$(_NMAKE_VER)" == "11.00.61030.0"
MSVCVER = 11.0
!endif
!if "$(_NMAKE_VER)" == "12.00.21005.1"
MSVCVER = 12.0
!endif
!if ("$(_NMAKE_VER)" == "14.00.22609.0") || ("$(_NMAKE_VER)" == "14.00.22816.0") || ("$(_NMAKE_VER)" == "14.00.23026.0")
MSVCVER = 14.0
!if [echo MSVCVER=_MSC_VER> msvcver.c && $(CC) /EP msvcver.c > msvcver.~ 2> nul]
!message *** ERROR
!message Cannot run Visual C to determine its version. Make sure cl.exe is in your PATH.
!message This can usually be done by running "vcvarsall.bat", located in the bin directory where Visual Studio was installed.
!error Make aborted.
!else
!include msvcver.~
!if [del msvcver.c msvcver.~]
!endif
!endif
# Abort building VIM if version of VC is unrecognised.
!ifndef MSVCVER
!message *** ERROR
!message Cannot determine Visual C version being used. If you are using the
!message Windows SDK then you must have the environment variable MSVCVER set to
!message your version of the VC compiler. If you are not using the Express
!message version of Visual C, you can either set MSVCVER or update this makefile
!message to handle the new value for _NMAKE_VER, "$(_NMAKE_VER)".
!error Make aborted.
!if $(MSVCVER) < 1900
MSVC_MAJOR = ($(MSVCVER) / 100 - 6)
!else
MSVC_MAJOR = ($(MSVCVER) / 100 - 5)
!endif
!if $(MSVC_MAJOR) == 6
CPU = ix86
!endif
# Convert processor ID to MVC-compatible number
!if ("$(MSVCVER)" != "8.0") && ("$(MSVCVER)" != "9.0") && ("$(MSVCVER)" != "10.0") && ("$(MSVCVER)" != "11.0") && ("$(MSVCVER)" != "12.0") && ("$(MSVCVER)" != "14.0")
!if $(MSVC_MAJOR) < 8
!if "$(CPUNR)" == "i386"
CPUARG = /G3
!elseif "$(CPUNR)" == "i486"
@@ -479,7 +419,7 @@ CPUARG =
!endif
!else
# VC8/9/10 only allows specifying SSE architecture but only for 32bit
!if "$(ASSEMBLY_ARCHITECTURE)" == "x86" && "$(CPUNR)" == "pentium4"
!if "$(ASSEMBLY_ARCHITECTURE)" == "i386" && "$(CPUNR)" == "pentium4"
CPUARG = /arch:SSE2
!endif
!endif
@@ -488,7 +428,7 @@ LIBC =
DEBUGINFO = /Zi
# Don't use /nodefaultlib on MSVC 14
!if "$(MSVCVER)" == "14.0"
!if $(MSVC_MAJOR) >= 14
NODEFAULTLIB =
!else
NODEFAULTLIB = /nodefaultlib
@@ -504,7 +444,7 @@ OPTFLAG = /O2
OPTFLAG = /Ox
!endif
!if ("$(MSVCVER)" == "8.0") || ("$(MSVCVER)" == "9.0") || ("$(MSVCVER)" == "10.0") || ("$(MSVCVER)" == "11.0") || ("$(MSVCVER)" == "12.0")
!if $(MSVC_MAJOR) >= 8
# Use link time code generation if not worried about size
!if "$(OPTIMIZE)" != "SPACE"
OPTFLAG = $(OPTFLAG) /GL
@@ -512,12 +452,13 @@ OPTFLAG = $(OPTFLAG) /GL
!endif
# (/Wp64 is deprecated in VC9 and generates an obnoxious warning.)
!if ("$(MSVCVER)" == "7.0") || ("$(MSVCVER)" == "7.1") || ("$(MSVCVER)" == "8.0")
!if ($(MSVC_MAJOR) == 7) || ($(MSVC_MAJOR) == 8)
CFLAGS=$(CFLAGS) $(WP64CHECK)
!endif
# Static code analysis generally available starting with VS2012
!if ("$(ANALYZE)" == "yes") && (("$(MSVCVER)" == "10.0") || ("$(MSVCVER)" == "11.0") || ("$(MSVCVER)" == "12.0"))
# Static code analysis generally available starting with VS2012 (VC11) or
# Windows SDK 7.1 (VC10)
!if ("$(ANALYZE)" == "yes") && ($(MSVC_MAJOR) >= 10)
CFLAGS=$(CFLAGS) /analyze
!endif
@@ -538,7 +479,7 @@ DEBUGINFO = /ZI
CFLAGS = $(CFLAGS) -D_DEBUG -DDEBUG /Od
RCFLAGS = $(rcflags) $(rcvars) -D_DEBUG -DDEBUG
# The /fixed:no is needed for Quantify. Assume not 4.? as unsupported in VC4.0.
! if "$(MSVCVER)" == "4.0"
! if $(MSVC_MAJOR) == 4
LIBC =
! else
LIBC = /fixed:no
@@ -993,7 +934,7 @@ LINKARGS2 = $(CON_LIB) $(GUI_LIB) $(NODEFAULTLIB) $(LIBC) $(OLE_LIB) user32.lib
# Report link time code generation progress if used.
!ifdef NODEBUG
!if ("$(MSVCVER)" == "8.0") || ("$(MSVCVER)" == "9.0") || ("$(MSVCVER)" == "10.0") || ("$(MSVCVER)" == "11.0") || ("$(MSVCVER)" == "12.0")
!if $(MSVC_MAJOR) >= 8
!if "$(OPTIMIZE)" != "SPACE"
LINKARGS1 = $(LINKARGS1) /LTCG:STATUS
!endif
@@ -1090,7 +1031,7 @@ testclean:
# Create a default rule for transforming .c files to .obj files in $(OUTDIR)
# Batch compilation is supported by nmake 1.62 (part of VS 5.0) and later)
!IF "$(MSVCVER)" == "4.0"
!IF "$(_NMAKE_VER)" == ""
.c{$(OUTDIR)/}.obj:
!ELSE
.c{$(OUTDIR)/}.obj::
@@ -1099,7 +1040,7 @@ testclean:
# Create a default rule for transforming .cpp files to .obj files in $(OUTDIR)
# Batch compilation is supported by nmake 1.62 (part of VS 5.0) and later)
!IF "$(MSVCVER)" == "4.0"
!IF "$(_NMAKE_VER)" == ""
.cpp{$(OUTDIR)/}.obj:
!ELSE
.cpp{$(OUTDIR)/}.obj::
+12 -2
View File
@@ -1947,6 +1947,7 @@ test1 \
test_search_mbyte \
test_set \
test_signs \
test_tagcase \
test_textobjects \
test_utf8 \
test_writefile \
@@ -1961,7 +1962,16 @@ test1 \
test80 test81 test82 test83 test84 test85 test86 test87 test88 test89 \
test90 test91 test92 test93 test94 test95 test96 test97 test98 test99 \
test100 test101 test102 test103 test104 test105 test106 test107:
cd testdir; rm $@.out; $(MAKE) -f Makefile $@.out VIMPROG=../$(VIMTARGET) $(GUI_TESTARG) SCRIPTSOURCE=../$(SCRIPTSOURCE)
cd testdir; rm -f $@.out; $(MAKE) -f Makefile $@.out VIMPROG=../$(VIMTARGET) $(GUI_TESTARG) SCRIPTSOURCE=../$(SCRIPTSOURCE)
test_assert \
test_sort \
test_undolevels \
test_alot:
cd testdir; rm -f $@.res; $(MAKE) -f Makefile $@.res VIMPROG=../$(VIMTARGET) $(GUI_TESTARG) SCRIPTSOURCE=../$(SCRIPTSOURCE)
newtests:
cd testdir; rm -f $@.res; $(MAKE) -f Makefile newtests VIMPROG=../$(VIMTARGET) $(GUI_TESTARG) SCRIPTSOURCE=../$(SCRIPTSOURCE)
testclean:
cd testdir; $(MAKE) -f Makefile clean
@@ -2954,7 +2964,7 @@ macvim-dmg: macvim
macvimclean:
if test -d MacVim; then \
xcodebuild -project MacVim/$(XCODEPROJ) clean; \
rm -rf MacVim/build xxd/xxd.dSYM; \
fi
+15 -15
View File
@@ -5064,7 +5064,7 @@ $as_echo "$vi_cv_version_plain_lua" >&6; }
if test "x$vi_cv_with_luajit" != "xno" && test "X$vi_cv_version_luajit" != "X"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if lua.h can be found in $vi_cv_path_lua_pfx/include/luajit-$vi_cv_version_luajit" >&5
$as_echo_n "checking if lua.h can be found in $vi_cv_path_lua_pfx/include/luajit-$vi_cv_version_luajit... " >&6; }
if test -f $vi_cv_path_lua_pfx/include/luajit-$vi_cv_version_luajit/lua.h; then
if test -f "$vi_cv_path_lua_pfx/include/luajit-$vi_cv_version_luajit/lua.h"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
LUA_INC=/luajit-$vi_cv_version_luajit
@@ -5073,7 +5073,7 @@ $as_echo "yes" >&6; }
if test "X$LUA_INC" = "X"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if lua.h can be found in $vi_cv_path_lua_pfx/include" >&5
$as_echo_n "checking if lua.h can be found in $vi_cv_path_lua_pfx/include... " >&6; }
if test -f $vi_cv_path_lua_pfx/include/lua.h; then
if test -f "$vi_cv_path_lua_pfx/include/lua.h"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
@@ -5081,7 +5081,7 @@ $as_echo "yes" >&6; }
$as_echo "no" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if lua.h can be found in $vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua" >&5
$as_echo_n "checking if lua.h can be found in $vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua... " >&6; }
if test -f $vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua/lua.h; then
if test -f "$vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua/lua.h"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
LUA_INC=/lua$vi_cv_version_lua
@@ -5332,7 +5332,7 @@ $as_echo "$vi_cv_path_mzscheme_pfx" >&6; }
if test "X$vi_cv_path_mzscheme_pfx" != "X"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include" >&5
$as_echo_n "checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include... " >&6; }
if test -f $vi_cv_path_mzscheme_pfx/include/scheme.h; then
if test -f "$vi_cv_path_mzscheme_pfx/include/scheme.h"; then
SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
@@ -5341,7 +5341,7 @@ $as_echo "yes" >&6; }
$as_echo "no" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/plt" >&5
$as_echo_n "checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/plt... " >&6; }
if test -f $vi_cv_path_mzscheme_pfx/include/plt/scheme.h; then
if test -f "$vi_cv_path_mzscheme_pfx/include/plt/scheme.h"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include/plt
@@ -5350,7 +5350,7 @@ $as_echo "yes" >&6; }
$as_echo "no" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/racket" >&5
$as_echo_n "checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/racket... " >&6; }
if test -f $vi_cv_path_mzscheme_pfx/include/racket/scheme.h; then
if test -f "$vi_cv_path_mzscheme_pfx/include/racket/scheme.h"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include/racket
@@ -5419,16 +5419,16 @@ $as_echo "no" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for racket collects directory" >&5
$as_echo_n "checking for racket collects directory... " >&6; }
if test -d $vi_cv_path_mzscheme_pfx/lib/plt/collects; then
if test -d "$vi_cv_path_mzscheme_pfx/lib/plt/collects"; then
SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/lib/plt/
else
if test -d $vi_cv_path_mzscheme_pfx/lib/racket/collects; then
if test -d "$vi_cv_path_mzscheme_pfx/lib/racket/collects"; then
SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/lib/racket/
else
if test -d $vi_cv_path_mzscheme_pfx/share/racket/collects; then
if test -d "$vi_cv_path_mzscheme_pfx/share/racket/collects"; then
SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/share/racket/
else
if test -d $vi_cv_path_mzscheme_pfx/collects; then
if test -d "$vi_cv_path_mzscheme_pfx/collects"; then
SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/
fi
fi
@@ -6912,7 +6912,7 @@ fi
if test "X$vi_cv_path_tcl" != "X"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Tcl version" >&5
$as_echo_n "checking Tcl version... " >&6; }
if echo 'exit [expr [info tclversion] < 8.0]' | $vi_cv_path_tcl - ; then
if echo 'exit [expr [info tclversion] < 8.0]' | "$vi_cv_path_tcl" - ; then
tclver=`echo 'puts [info tclversion]' | $vi_cv_path_tcl -`
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tclver - OK" >&5
$as_echo "$tclver - OK" >&6; };
@@ -6949,10 +6949,10 @@ $as_echo_n "checking for location of tclConfig.sh script... " >&6; }
tclcnf="/System/Library/Frameworks/Tcl.framework"
fi
for try in $tclcnf; do
if test -f $try/tclConfig.sh; then
if test -f "$try/tclConfig.sh"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $try/tclConfig.sh" >&5
$as_echo "$try/tclConfig.sh" >&6; }
. $try/tclConfig.sh
. "$try/tclConfig.sh"
TCL_LIBS=`eval echo "$TCL_LIB_SPEC $TCL_LIBS"`
TCL_DEFS=`echo $TCL_DEFS | sed -e 's/\\\\ /\\\\X/g' | tr ' ' '\012' | sed -e '/^[^-]/d' -e '/^-[^D]/d' -e '/-D[^_]/d' -e 's/-D_/ -D_/' | tr '\012' ' ' | sed -e 's/\\\\X/\\\\ /g'`
break
@@ -6969,10 +6969,10 @@ $as_echo_n "checking for Tcl library by myself... " >&6; }
for ver in "" $tclver ; do
for try in $tcllib ; do
trylib=tcl$ver$ext
if test -f $try/lib$trylib ; then
if test -f "$try/lib$trylib" ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $try/lib$trylib" >&5
$as_echo "$try/lib$trylib" >&6; }
TCL_LIBS="-L$try -ltcl$ver -ldl -lm"
TCL_LIBS="-L\"$try\" -ltcl$ver -ldl -lm"
if test "`(uname) 2>/dev/null`" = SunOS &&
uname -r | grep '^5' >/dev/null; then
TCL_LIBS="$TCL_LIBS -R $try"
+1
View File
@@ -1995,6 +1995,7 @@ free_buf_options(buf, free_p_ff)
clear_string_option(&buf->b_p_ep);
clear_string_option(&buf->b_p_path);
clear_string_option(&buf->b_p_tags);
clear_string_option(&buf->b_p_tc);
#ifdef FEAT_INS_EXPAND
clear_string_option(&buf->b_p_dict);
clear_string_option(&buf->b_p_tsr);
+15 -15
View File
@@ -565,19 +565,19 @@ if test "$enable_luainterp" = "yes" -o "$enable_luainterp" = "dynamic"; then
fi
if test "x$vi_cv_with_luajit" != "xno" && test "X$vi_cv_version_luajit" != "X"; then
AC_MSG_CHECKING(if lua.h can be found in $vi_cv_path_lua_pfx/include/luajit-$vi_cv_version_luajit)
if test -f $vi_cv_path_lua_pfx/include/luajit-$vi_cv_version_luajit/lua.h; then
if test -f "$vi_cv_path_lua_pfx/include/luajit-$vi_cv_version_luajit/lua.h"; then
AC_MSG_RESULT(yes)
LUA_INC=/luajit-$vi_cv_version_luajit
fi
fi
if test "X$LUA_INC" = "X"; then
AC_MSG_CHECKING(if lua.h can be found in $vi_cv_path_lua_pfx/include)
if test -f $vi_cv_path_lua_pfx/include/lua.h; then
if test -f "$vi_cv_path_lua_pfx/include/lua.h"; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
AC_MSG_CHECKING(if lua.h can be found in $vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua)
if test -f $vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua/lua.h; then
if test -f "$vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua/lua.h"; then
AC_MSG_RESULT(yes)
LUA_INC=/lua$vi_cv_version_lua
else
@@ -753,19 +753,19 @@ if test "$enable_mzschemeinterp" = "yes"; then
SCHEME_INC=
if test "X$vi_cv_path_mzscheme_pfx" != "X"; then
AC_MSG_CHECKING(if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include)
if test -f $vi_cv_path_mzscheme_pfx/include/scheme.h; then
if test -f "$vi_cv_path_mzscheme_pfx/include/scheme.h"; then
SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
AC_MSG_CHECKING(if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/plt)
if test -f $vi_cv_path_mzscheme_pfx/include/plt/scheme.h; then
if test -f "$vi_cv_path_mzscheme_pfx/include/plt/scheme.h"; then
AC_MSG_RESULT(yes)
SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include/plt
else
AC_MSG_RESULT(no)
AC_MSG_CHECKING(if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/racket)
if test -f $vi_cv_path_mzscheme_pfx/include/racket/scheme.h; then
if test -f "$vi_cv_path_mzscheme_pfx/include/racket/scheme.h"; then
AC_MSG_RESULT(yes)
SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include/racket
else
@@ -828,16 +828,16 @@ if test "$enable_mzschemeinterp" = "yes"; then
fi
AC_MSG_CHECKING(for racket collects directory)
if test -d $vi_cv_path_mzscheme_pfx/lib/plt/collects; then
if test -d "$vi_cv_path_mzscheme_pfx/lib/plt/collects"; then
SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/lib/plt/
else
if test -d $vi_cv_path_mzscheme_pfx/lib/racket/collects; then
if test -d "$vi_cv_path_mzscheme_pfx/lib/racket/collects"; then
SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/lib/racket/
else
if test -d $vi_cv_path_mzscheme_pfx/share/racket/collects; then
if test -d "$vi_cv_path_mzscheme_pfx/share/racket/collects"; then
SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/share/racket/
else
if test -d $vi_cv_path_mzscheme_pfx/collects; then
if test -d "$vi_cv_path_mzscheme_pfx/collects"; then
SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/
fi
fi
@@ -1698,7 +1698,7 @@ if test "$enable_tclinterp" = "yes"; then
fi
if test "X$vi_cv_path_tcl" != "X"; then
AC_MSG_CHECKING(Tcl version)
if echo 'exit [[expr [info tclversion] < 8.0]]' | $vi_cv_path_tcl - ; then
if echo 'exit [[expr [info tclversion] < 8.0]]' | "$vi_cv_path_tcl" - ; then
tclver=`echo 'puts [[info tclversion]]' | $vi_cv_path_tcl -`
AC_MSG_RESULT($tclver - OK);
tclloc=`echo 'set l [[info library]];set i [[string last lib $l]];incr i -2;puts [[string range $l 0 $i]]' | $vi_cv_path_tcl -`
@@ -1732,9 +1732,9 @@ if test "$enable_tclinterp" = "yes"; then
tclcnf="/System/Library/Frameworks/Tcl.framework"
fi
for try in $tclcnf; do
if test -f $try/tclConfig.sh; then
if test -f "$try/tclConfig.sh"; then
AC_MSG_RESULT($try/tclConfig.sh)
. $try/tclConfig.sh
. "$try/tclConfig.sh"
dnl use eval, because tcl 8.2 includes ${TCL_DBGX}
TCL_LIBS=`eval echo "$TCL_LIB_SPEC $TCL_LIBS"`
dnl Use $TCL_DEFS for -D_THREAD_SAFE et al. But only use the
@@ -1752,9 +1752,9 @@ if test "$enable_tclinterp" = "yes"; then
for ver in "" $tclver ; do
for try in $tcllib ; do
trylib=tcl$ver$ext
if test -f $try/lib$trylib ; then
if test -f "$try/lib$trylib" ; then
AC_MSG_RESULT($try/lib$trylib)
TCL_LIBS="-L$try -ltcl$ver -ldl -lm"
TCL_LIBS="-L\"$try\" -ltcl$ver -ldl -lm"
if test "`(uname) 2>/dev/null`" = SunOS &&
uname -r | grep '^5' >/dev/null; then
TCL_LIBS="$TCL_LIBS -R $try"
+164
View File
@@ -368,6 +368,7 @@ static struct vimvar
{VV_NAME("option_new", VAR_STRING), VV_RO},
{VV_NAME("option_old", VAR_STRING), VV_RO},
{VV_NAME("option_type", VAR_STRING), VV_RO},
{VV_NAME("errors", VAR_LIST), 0},
};
/* shorthand */
@@ -472,6 +473,9 @@ static void f_argc __ARGS((typval_T *argvars, typval_T *rettv));
static void f_argidx __ARGS((typval_T *argvars, typval_T *rettv));
static void f_arglistid __ARGS((typval_T *argvars, typval_T *rettv));
static void f_argv __ARGS((typval_T *argvars, typval_T *rettv));
static void f_assert_equal __ARGS((typval_T *argvars, typval_T *rettv));
static void f_assert_false __ARGS((typval_T *argvars, typval_T *rettv));
static void f_assert_true __ARGS((typval_T *argvars, typval_T *rettv));
#ifdef FEAT_FLOAT
static void f_asin __ARGS((typval_T *argvars, typval_T *rettv));
static void f_atan __ARGS((typval_T *argvars, typval_T *rettv));
@@ -896,6 +900,7 @@ eval_init()
set_vim_var_nr(VV_SEARCHFORWARD, 1L);
set_vim_var_nr(VV_HLSEARCH, 1L);
set_vim_var_dict(VV_COMPLETED_ITEM, dict_alloc());
set_vim_var_list(VV_ERRORS, list_alloc());
set_reg_var(0); /* default for v:register is not 0 but '"' */
#ifdef EBCDIC
@@ -8071,6 +8076,11 @@ static struct fst
{"argv", 0, 1, f_argv},
#ifdef FEAT_FLOAT
{"asin", 1, 1, f_asin}, /* WJMc */
#endif
{"assert_equal", 2, 3, f_assert_equal},
{"assert_false", 1, 2, f_assert_false},
{"assert_true", 1, 2, f_assert_true},
#ifdef FEAT_FLOAT
{"atan", 1, 1, f_atan},
{"atan2", 2, 2, f_atan2},
#endif
@@ -8742,7 +8752,9 @@ call_func(funcname, len, rettv, argcount, argvars, firstline, lastline,
* redo buffer.
*/
save_search_patterns();
#ifdef FEAT_INS_EXPAND
if (!ins_compl_active())
#endif
{
saveRedobuff();
did_save_redo = TRUE;
@@ -9125,6 +9137,142 @@ f_argv(argvars, rettv)
alist_name(&ARGLIST[idx]), -1);
}
static void prepare_assert_error __ARGS((garray_T*gap));
static void fill_assert_error __ARGS((garray_T *gap, typval_T *opt_msg_tv, char_u *exp_str, typval_T *exp_tv, typval_T *got_tv));
static void assert_error __ARGS((garray_T *gap));
static void assert_bool __ARGS((typval_T *argvars, int isTrue));
/*
* Prepare "gap" for an assert error and add the sourcing position.
*/
static void
prepare_assert_error(gap)
garray_T *gap;
{
char buf[NUMBUFLEN];
ga_init2(gap, 1, 100);
ga_concat(gap, sourcing_name);
sprintf(buf, " line %ld", (long)sourcing_lnum);
ga_concat(gap, (char_u *)buf);
ga_concat(gap, (char_u *)": ");
}
/*
* Fill "gap" with information about an assert error.
*/
static void
fill_assert_error(gap, opt_msg_tv, exp_str, exp_tv, got_tv)
garray_T *gap;
typval_T *opt_msg_tv;
char_u *exp_str;
typval_T *exp_tv;
typval_T *got_tv;
{
char_u numbuf[NUMBUFLEN];
char_u *tofree;
if (opt_msg_tv->v_type != VAR_UNKNOWN)
{
ga_concat(gap, tv2string(opt_msg_tv, &tofree, numbuf, 0));
vim_free(tofree);
}
else
{
ga_concat(gap, (char_u *)"Expected ");
if (exp_str == NULL)
{
ga_concat(gap, tv2string(exp_tv, &tofree, numbuf, 0));
vim_free(tofree);
}
else
ga_concat(gap, exp_str);
ga_concat(gap, (char_u *)" but got ");
ga_concat(gap, tv2string(got_tv, &tofree, numbuf, 0));
vim_free(tofree);
}
}
/*
* Add an assert error to v:errors.
*/
static void
assert_error(gap)
garray_T *gap;
{
struct vimvar *vp = &vimvars[VV_ERRORS];
if (vp->vv_type != VAR_LIST || vimvars[VV_ERRORS].vv_list == NULL)
/* Make sure v:errors is a list. */
set_vim_var_list(VV_ERRORS, list_alloc());
list_append_string(vimvars[VV_ERRORS].vv_list, gap->ga_data, gap->ga_len);
}
/*
* "assert_equal(expected, actual[, msg])" function
*/
static void
f_assert_equal(argvars, rettv)
typval_T *argvars;
typval_T *rettv UNUSED;
{
garray_T ga;
if (!tv_equal(&argvars[0], &argvars[1], FALSE, FALSE))
{
prepare_assert_error(&ga);
fill_assert_error(&ga, &argvars[2], NULL, &argvars[0], &argvars[1]);
assert_error(&ga);
ga_clear(&ga);
}
}
/*
* Common for assert_true() and assert_false().
*/
static void
assert_bool(argvars, isTrue)
typval_T *argvars;
int isTrue;
{
int error = FALSE;
garray_T ga;
if (argvars[0].v_type != VAR_NUMBER
|| (get_tv_number_chk(&argvars[0], &error) == 0) == isTrue
|| error)
{
prepare_assert_error(&ga);
fill_assert_error(&ga, &argvars[1],
(char_u *)(isTrue ? "True " : "False "),
NULL, &argvars[0]);
assert_error(&ga);
ga_clear(&ga);
}
}
/*
* "assert_false(actual[, msg])" function
*/
static void
f_assert_false(argvars, rettv)
typval_T *argvars;
typval_T *rettv UNUSED;
{
assert_bool(argvars, FALSE);
}
/*
* "assert_true(actual[, msg])" function
*/
static void
f_assert_true(argvars, rettv)
typval_T *argvars;
typval_T *rettv UNUSED;
{
assert_bool(argvars, TRUE);
}
#ifdef FEAT_FLOAT
/*
* "asin()" function
@@ -17810,6 +17958,7 @@ typedef struct
static int item_compare_ic;
static int item_compare_numeric;
static int item_compare_numbers;
static char_u *item_compare_func;
static dict_T *item_compare_selfdict;
static int item_compare_func_err;
@@ -17840,6 +17989,15 @@ item_compare(s1, s2)
si2 = (sortItem_T *)s2;
tv1 = &si1->item->li_tv;
tv2 = &si2->item->li_tv;
if (item_compare_numbers)
{
long v1 = get_tv_number(tv1);
long v2 = get_tv_number(tv2);
return v1 == v2 ? 0 : v1 > v2 ? 1 : -1;
}
/* tv2string() puts quotes around a string and allocates memory. Don't do
* that for string variables. Use a single quote when comparing with a
* non-string to do what the docs promise. */
@@ -17973,6 +18131,7 @@ do_sort_uniq(argvars, rettv, sort)
item_compare_ic = FALSE;
item_compare_numeric = FALSE;
item_compare_numbers = FALSE;
item_compare_func = NULL;
item_compare_selfdict = NULL;
if (argvars[1].v_type != VAR_UNKNOWN)
@@ -17998,6 +18157,11 @@ do_sort_uniq(argvars, rettv, sort)
item_compare_func = NULL;
item_compare_numeric = TRUE;
}
else if (STRCMP(item_compare_func, "N") == 0)
{
item_compare_func = NULL;
item_compare_numbers = TRUE;
}
else if (STRCMP(item_compare_func, "i") == 0)
{
item_compare_func = NULL;
+11
View File
@@ -9662,6 +9662,10 @@ ex_redraw(eap)
need_wait_return = FALSE;
out_flush();
#ifdef FEAT_GUI_MACVIM
if (gui.in_use)
gui_macvim_flush();
#endif
}
/*
@@ -9685,6 +9689,10 @@ ex_redrawstatus(eap)
RedrawingDisabled = r;
p_lz = p;
out_flush();
# ifdef FEAT_GUI_MACVIM
if (gui.in_use)
gui_macvim_flush();
# endif
#endif
}
@@ -12144,6 +12152,7 @@ ex_match(eap)
if (*p == NUL)
{
/* There must be two arguments. */
vim_free(g);
EMSG2(_(e_invarg2), eap->arg);
return;
}
@@ -12152,11 +12161,13 @@ ex_match(eap)
{
if (*end != NUL && !ends_excmd(*skipwhite(end + 1)))
{
vim_free(g);
eap->errmsg = e_trailing;
return;
}
if (*end != *p)
{
vim_free(g);
EMSG2(_(e_invarg2), p);
return;
}
+1 -1
View File
@@ -3715,7 +3715,7 @@ ExpandOne(xp, str, orig, options, mode)
}
else
#endif
c0 = xp->xp_files[i][len];
c0 = xp->xp_files[0][len];
for (i = 1; i < xp->xp_numfiles; ++i)
{
#ifdef FEAT_MBYTE
+7 -3
View File
@@ -27,7 +27,7 @@
/* Is there any system that doesn't have access()? */
#define USE_MCH_ACCESS
#if defined(sun) && defined(S_ISCHR)
#if (defined(sun) || defined(__FreeBSD__)) && defined(S_ISCHR)
# define OPEN_CHR_FILES
static int is_dev_fd_file(char_u *fname);
#endif
@@ -7426,10 +7426,12 @@ vim_tempname(extra_char, keep)
long off;
# endif
/* expand $TMP, leave room for "/v1100000/999999999" */
/* Expand $TMP, leave room for "/v1100000/999999999".
* Skip the directory check if the expansion fails. */
expand_env((char_u *)tempdirs[i], itmp, TEMPNAMELEN - 20);
if (mch_isdir(itmp)) /* directory exists */
if (itmp[0] != '$' && mch_isdir(itmp))
{
/* directory exists */
# ifdef __EMX__
/* If $TMP contains a forward slash (perhaps using bash or
* tcsh), don't add a backslash, use a forward slash!
@@ -9488,7 +9490,9 @@ apply_autocmds_group(event, fname, fname_io, force, group, buf, eap)
if (!autocmd_busy)
{
save_search_patterns();
#ifdef FEAT_INS_EXPAND
if (!ins_compl_active())
#endif
{
saveRedobuff();
did_save_redobuff = TRUE;
+9 -11
View File
@@ -1680,17 +1680,15 @@ button_press_event(GtkWidget *widget,
switch (event->button)
{
case 1:
button = MOUSE_LEFT;
break;
case 2:
button = MOUSE_MIDDLE;
break;
case 3:
button = MOUSE_RIGHT;
break;
default:
return FALSE; /* Unknown button */
/* Keep in sync with gui_x11.c.
* Buttons 4-7 are handled in scroll_event() */
case 1: button = MOUSE_LEFT; break;
case 2: button = MOUSE_MIDDLE; break;
case 3: button = MOUSE_RIGHT; break;
case 8: button = MOUSE_X1; break;
case 9: button = MOUSE_X2; break;
default:
return FALSE; /* Unknown button */
}
#ifdef FEAT_XIM
+5
View File
@@ -1127,11 +1127,16 @@ gui_x11_mouse_cb(w, dud, event, dum)
gui_x11_timer_cb, &timed_out);
switch (event->xbutton.button)
{
/* keep in sync with gui_gtk_x11.c */
case Button1: button = MOUSE_LEFT; break;
case Button2: button = MOUSE_MIDDLE; break;
case Button3: button = MOUSE_RIGHT; break;
case Button4: button = MOUSE_4; break;
case Button5: button = MOUSE_5; break;
case 6: button = MOUSE_7; break;
case 7: button = MOUSE_6; break;
case 8: button = MOUSE_X1; break;
case 9: button = MOUSE_X2; break;
default:
return; /* Unknown button */
}
+2 -1
View File
@@ -1561,14 +1561,15 @@ luaV_setref (lua_State *L)
{
tv.v_type = VAR_LIST;
tv.vval.v_list = (list_T *) lua_touserdata(L, 4); /* key */
abort = set_ref_in_item(&tv, copyID, NULL, NULL);
}
else if (lua_rawequal(L, -1, 3)) /* dict? */
{
tv.v_type = VAR_DICT;
tv.vval.v_dict = (dict_T *) lua_touserdata(L, 4); /* key */
abort = set_ref_in_item(&tv, copyID, NULL, NULL);
}
lua_pop(L, 2); /* metatable and value */
abort = set_ref_in_item(&tv, copyID, NULL, NULL);
}
lua_pushinteger(L, abort);
return 1;
+4 -1
View File
@@ -932,7 +932,10 @@ Python_Init(void)
#endif
#ifdef PYTHON_HOME
Py_SetPythonHome(PYTHON_HOME);
# ifdef DYNAMIC_PYTHON
if (mch_getenv((char_u *)"PYTHONHOME") == NULL)
# endif
Py_SetPythonHome(PYTHON_HOME);
#endif
init_structs();
+4 -1
View File
@@ -858,7 +858,10 @@ Python3_Init(void)
#ifdef PYTHON3_HOME
Py_SetPythonHome(PYTHON3_HOME);
# ifdef DYNAMIC_PYTHON3
if (mch_getenv((char_u *)"PYTHONHOME") == NULL)
# endif
Py_SetPythonHome(PYTHON3_HOME);
#endif
PyImport_AppendInittab("vim", Py3Init_vim);
+1 -1
View File
@@ -4552,7 +4552,7 @@ init_preedit_start_col(void)
{
if (State & CMDLINE)
preedit_start_col = cmdline_getvcol_cursor();
else if (curwin != NULL)
else if (curwin != NULL && curwin->w_buffer != NULL)
getvcol(curwin, &curwin->w_cursor, &preedit_start_col, NULL, NULL);
/* Prevent that preediting marks the buffer as changed. */
xim_changed_while_preediting = curbuf->b_changed;
+5 -1
View File
@@ -2092,6 +2092,7 @@ ga_concat_strings(gap, sep)
/*
* Concatenate a string to a growarray which contains characters.
* When "s" is NULL does not do anything.
* Note: Does NOT copy the NUL at the end!
*/
void
@@ -2099,8 +2100,11 @@ ga_concat(gap, s)
garray_T *gap;
char_u *s;
{
int len = (int)STRLEN(s);
int len;
if (s == NULL)
return;
len = (int)STRLEN(s);
if (ga_grow(gap, len) == OK)
{
mch_memmove((char *)gap->ga_data + gap->ga_len, s, (size_t)len);
+3
View File
@@ -4905,6 +4905,7 @@ dozet:
case 't': scroll_cursor_top(0, TRUE);
redraw_later(VALID);
set_fraction(curwin);
break;
/* "z." and "zz": put cursor in middle of screen */
@@ -4913,6 +4914,7 @@ dozet:
case 'z': scroll_cursor_halfway(TRUE);
redraw_later(VALID);
set_fraction(curwin);
break;
/* "z^", "z-" and "zb": put cursor at bottom of screen */
@@ -4935,6 +4937,7 @@ dozet:
case 'b': scroll_cursor_bot(0, TRUE);
redraw_later(VALID);
set_fraction(curwin);
break;
/* "zH" - scroll screen right half-page */
+46 -2
View File
@@ -177,6 +177,7 @@
#define PV_SW OPT_BUF(BV_SW)
#define PV_SWF OPT_BUF(BV_SWF)
#define PV_TAGS OPT_BOTH(OPT_BUF(BV_TAGS))
#define PV_TC OPT_BOTH(OPT_BUF(BV_TC))
#define PV_TS OPT_BUF(BV_TS)
#define PV_TW OPT_BUF(BV_TW)
#define PV_TX OPT_BUF(BV_TX)
@@ -2654,6 +2655,9 @@ static struct vimoption
{(char_u *)TRUE, (char_u *)0L}
#endif
SCRIPTID_INIT},
{"tagcase", "tc", P_STRING|P_VIM,
(char_u *)&p_tc, PV_TC,
{(char_u *)"followic", (char_u *)"followic"} SCRIPTID_INIT},
{"taglength", "tl", P_NUM|P_VI_DEF,
(char_u *)&p_tl, PV_NONE,
{(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
@@ -3348,8 +3352,8 @@ set_init_1()
if (opt_idx >= 0)
{
#if !defined(HAVE_AVAIL_MEM) && !defined(HAVE_TOTAL_MEM)
if ((long)options[opt_idx].def_val[VI_DEFAULT] > (long)n
|| (long)options[opt_idx].def_val[VI_DEFAULT] == 0L)
if ((long)(long_i)options[opt_idx].def_val[VI_DEFAULT] > (long)n
|| (long)(long_i)options[opt_idx].def_val[VI_DEFAULT] == 0L)
#endif
options[opt_idx].def_val[VI_DEFAULT] = (char_u *)n;
}
@@ -5046,7 +5050,12 @@ do_set(arg, opt_flags)
/* If error detected, print the error message. */
if (errmsg != NULL)
{
#if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL)
vim_free(saved_origval);
#endif
goto skip;
}
#if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL)
if (saved_origval != NULL)
{
@@ -5447,6 +5456,7 @@ didset_options()
&fuoptions_bgcolor);
#endif
(void)opt_strings_flags(p_dy, p_dy_values, &dy_flags, TRUE);
(void)opt_strings_flags(p_tc, p_tc_values, &tc_flags, FALSE);
#ifdef FEAT_VIRTUALEDIT
(void)opt_strings_flags(p_ve, p_ve_values, &ve_flags, TRUE);
#endif
@@ -5609,6 +5619,7 @@ check_buf_options(buf)
check_string_option(&buf->b_p_ep);
check_string_option(&buf->b_p_path);
check_string_option(&buf->b_p_tags);
check_string_option(&buf->b_p_tc);
#ifdef FEAT_INS_EXPAND
check_string_option(&buf->b_p_dict);
check_string_option(&buf->b_p_tsr);
@@ -7133,6 +7144,30 @@ did_set_string_option(opt_idx, varp, new_value_alloced, oldval, errbuf,
errmsg = e_invarg;
}
/* 'tagcase' */
else if (gvarp == &p_tc)
{
unsigned int *flags;
if (opt_flags & OPT_LOCAL)
{
p = curbuf->b_p_tc;
flags = &curbuf->b_tc_flags;
}
else
{
p = p_tc;
flags = &tc_flags;
}
if ((opt_flags & OPT_LOCAL) && *p == NUL)
/* make the local value empty: use the global value */
*flags = 0;
else if (*p == NUL
|| opt_strings_flags(p, p_tc_values, flags, FALSE) != OK)
errmsg = e_invarg;
}
#ifdef FEAT_MBYTE
/* 'casemap' */
else if (varp == &p_cmp)
@@ -10255,6 +10290,10 @@ unset_global_local_option(name, from)
case PV_TAGS:
clear_string_option(&buf->b_p_tags);
break;
case PV_TC:
clear_string_option(&buf->b_p_tc);
buf->b_tc_flags = 0;
break;
#ifdef FEAT_FIND_ID
case PV_DEF:
clear_string_option(&buf->b_p_def);
@@ -10336,6 +10375,7 @@ get_varp_scope(p, opt_flags)
case PV_PATH: return (char_u *)&(curbuf->b_p_path);
case PV_AR: return (char_u *)&(curbuf->b_p_ar);
case PV_TAGS: return (char_u *)&(curbuf->b_p_tags);
case PV_TC: return (char_u *)&(curbuf->b_p_tc);
#ifdef FEAT_FIND_ID
case PV_DEF: return (char_u *)&(curbuf->b_p_def);
case PV_INC: return (char_u *)&(curbuf->b_p_inc);
@@ -10390,6 +10430,8 @@ get_varp(p)
? (char_u *)&(curbuf->b_p_ar) : p->var;
case PV_TAGS: return *curbuf->b_p_tags != NUL
? (char_u *)&(curbuf->b_p_tags) : p->var;
case PV_TC: return *curbuf->b_p_tc != NUL
? (char_u *)&(curbuf->b_p_tc) : p->var;
case PV_BKC: return *curbuf->b_p_bkc != NUL
? (char_u *)&(curbuf->b_p_bkc) : p->var;
#ifdef FEAT_FIND_ID
@@ -11004,6 +11046,8 @@ buf_copy_options(buf, flags)
buf->b_p_kp = empty_option;
buf->b_p_path = empty_option;
buf->b_p_tags = empty_option;
buf->b_p_tc = empty_option;
buf->b_tc_flags = 0;
#ifdef FEAT_FIND_ID
buf->b_p_def = empty_option;
buf->b_p_inc = empty_option;
+9
View File
@@ -835,6 +835,14 @@ static char *(p_swb_values[]) = {"useopen", "usetab", "split", "newtab", "vsplit
#define SWB_NEWTAB 0x008
#define SWB_VSPLIT 0x010
EXTERN int p_tbs; /* 'tagbsearch' */
EXTERN char_u *p_tc; /* 'tagcase' */
EXTERN unsigned tc_flags; /* flags from 'tagcase' */
#ifdef IN_OPTION_C
static char *(p_tc_values[]) = {"followic", "ignore", "match", NULL};
#endif
#define TC_FOLLOWIC 0x01
#define TC_IGNORE 0x02
#define TC_MATCH 0x04
EXTERN long p_tl; /* 'taglength' */
EXTERN int p_tr; /* 'tagrelative' */
EXTERN char_u *p_tags; /* 'tags' */
@@ -1105,6 +1113,7 @@ enum
, BV_SW
, BV_SWF
, BV_TAGS
, BV_TC
, BV_TS
, BV_TW
, BV_TX
+1
View File
@@ -53,6 +53,7 @@ void win_setwidth_win __ARGS((int width, win_T *wp));
void win_setminheight __ARGS((void));
void win_drag_status_line __ARGS((win_T *dragwin, int offset));
void win_drag_vsep_line __ARGS((win_T *dragwin, int offset));
void set_fraction __ARGS((win_T *wp));
void win_new_height __ARGS((win_T *wp, int height));
void win_new_width __ARGS((win_T *wp, int width));
void win_comp_scroll __ARGS((win_T *wp));
+2 -1
View File
@@ -6947,7 +6947,8 @@ nfa_regtry(prog, col, tm)
{
cleanup_zsubexpr();
re_extmatch_out = make_extmatch();
for (i = 0; i < subs.synt.in_use; i++)
/* Loop over \z1, \z2, etc. There is no \z0. */
for (i = 1; i < subs.synt.in_use; i++)
{
if (REG_MULTI)
{
+6 -1
View File
@@ -5427,7 +5427,12 @@ win_line(wp, lnum, startrow, endrow, nochange)
else
/* DBCS: Put second byte in the second screen char. */
ScreenLines[off] = mb_c & 0xff;
++vcol;
if (draw_state > WL_NR
#ifdef FEAT_DIFF
&& filler_todo <= 0
#endif
)
++vcol;
/* When "tocol" is halfway a character, set it to the end of
* the character, otherwise highlighting won't stop. */
if (tocol == vcol)
+3 -1
View File
@@ -1674,6 +1674,8 @@ struct file_buffer
char_u *b_p_path; /* 'path' local value */
int b_p_ar; /* 'autoread' local value */
char_u *b_p_tags; /* 'tags' local value */
char_u *b_p_tc; /* 'tagcase' local value */
unsigned b_tc_flags; /* flags for 'tagcase' */
#ifdef FEAT_INS_EXPAND
char_u *b_p_dict; /* 'dictionary' local value */
char_u *b_p_tsr; /* 'thesaurus' local value */
@@ -2072,7 +2074,7 @@ struct window_S
current virtual column */
/*
* the next six are used to update the visual part
* the next seven are used to update the visual part
*/
char w_old_visual_mode; /* last known VIsual_mode */
linenr_T w_old_cursor_lnum; /* last known end of visual part */
+14
View File
@@ -1385,6 +1385,18 @@ find_tags(pat, num_matches, matchesp, flags, mincount, buf_ffname)
int use_cscope = (flags & TAG_CSCOPE);
#endif
int verbose = (flags & TAG_VERBOSE);
int save_p_ic = p_ic;
/*
* Change the value of 'ignorecase' according to 'tagcase' for the
* duration of this function.
*/
switch (curbuf->b_tc_flags ? curbuf->b_tc_flags : tc_flags)
{
case TC_FOLLOWIC: break;
case TC_IGNORE: p_ic = TRUE; break;
case TC_MATCH: p_ic = FALSE; break;
}
help_save = curbuf->b_help;
orgpat.pat = pat;
@@ -2552,6 +2564,8 @@ findtag_end:
vim_free(saved_pat);
#endif
p_ic = save_p_ic;
return retval;
}
+22 -22
View File
@@ -837,28 +837,33 @@ static struct builtin_term builtin_termcaps[] =
{(int)KS_NAME, "vt52"},
{(int)KS_CE, IF_EB("\033K", ESC_STR "K")},
{(int)KS_CD, IF_EB("\033J", ESC_STR "J")},
# ifdef TERMINFO
{(int)KS_CM, IF_EB("\033Y%p1%' '%+%c%p2%' '%+%c",
ESC_STR "Y%p1%' '%+%c%p2%' '%+%c")},
# else
{(int)KS_CM, IF_EB("\033Y%+ %+ ", ESC_STR "Y%+ %+ ")},
# endif
{(int)KS_LE, "\b"},
# ifdef __MINT__
{(int)KS_SR, IF_EB("\033I", ESC_STR "I")},
{(int)KS_AL, IF_EB("\033L", ESC_STR "L")},
{(int)KS_DL, IF_EB("\033M", ESC_STR "M")},
{(int)KS_CL, IF_EB("\033E", ESC_STR "E")},
{(int)KS_SR, IF_EB("\033I", ESC_STR "I")},
{(int)KS_VE, IF_EB("\033e", ESC_STR "e")},
{(int)KS_VI, IF_EB("\033f", ESC_STR "f")},
{(int)KS_SO, IF_EB("\033p", ESC_STR "p")},
{(int)KS_SE, IF_EB("\033q", ESC_STR "q")},
{K_UP, IF_EB("\033A", ESC_STR "A")},
{K_DOWN, IF_EB("\033B", ESC_STR "B")},
{K_LEFT, IF_EB("\033D", ESC_STR "D")},
{K_RIGHT, IF_EB("\033C", ESC_STR "C")},
{K_F1, IF_EB("\033P", ESC_STR "P")},
{K_F2, IF_EB("\033Q", ESC_STR "Q")},
{K_F3, IF_EB("\033R", ESC_STR "R")},
# ifdef __MINT__
{(int)KS_CL, IF_EB("\033E", ESC_STR "E")},
{(int)KS_VE, IF_EB("\033e", ESC_STR "e")},
{(int)KS_VI, IF_EB("\033f", ESC_STR "f")},
{(int)KS_SO, IF_EB("\033p", ESC_STR "p")},
{(int)KS_SE, IF_EB("\033q", ESC_STR "q")},
{K_S_UP, IF_EB("\033a", ESC_STR "a")},
{K_S_DOWN, IF_EB("\033b", ESC_STR "b")},
{K_S_LEFT, IF_EB("\033d", ESC_STR "d")},
{K_S_RIGHT, IF_EB("\033c", ESC_STR "c")},
{K_F1, IF_EB("\033P", ESC_STR "P")},
{K_F2, IF_EB("\033Q", ESC_STR "Q")},
{K_F3, IF_EB("\033R", ESC_STR "R")},
{K_F4, IF_EB("\033S", ESC_STR "S")},
{K_F5, IF_EB("\033T", ESC_STR "T")},
{K_F6, IF_EB("\033U", ESC_STR "U")},
@@ -881,11 +886,7 @@ static struct builtin_term builtin_termcaps[] =
{K_PAGEDOWN, IF_EB("\033b", ESC_STR "b")},
{K_PAGEUP, IF_EB("\033a", ESC_STR "a")},
# else
{(int)KS_AL, IF_EB("\033T", ESC_STR "T")},
{(int)KS_DL, IF_EB("\033U", ESC_STR "U")},
{(int)KS_CL, IF_EB("\033H\033J", ESC_STR "H" ESC_STR_nc "J")},
{(int)KS_ME, IF_EB("\033SO", ESC_STR "SO")},
{(int)KS_MR, IF_EB("\033S2", ESC_STR "S2")},
{(int)KS_MS, "y"},
# endif
# endif
@@ -1879,14 +1880,6 @@ set_termname(term)
p = (char_u *)"";
# ifdef FEAT_MOUSE_XTERM
# ifdef FEAT_CLIPBOARD
# ifdef FEAT_GUI
if (!gui.in_use)
# endif
# ifndef FEAT_CYGWIN_WIN32_CLIPBOARD
clip_init(FALSE);
# endif
# endif
if (use_xterm_like_mouse(term))
{
if (use_xterm_mouse())
@@ -5231,6 +5224,13 @@ check_termcode(max_offset, buf, bufsize, buflen)
else
key_name[1] = get_pseudo_mouse_code(current_button,
is_click, is_drag);
/* Make sure the mouse position is valid. Some terminals may
* return weird values. */
if (mouse_col >= Columns)
mouse_col = Columns - 1;
if (mouse_row >= Rows)
mouse_row = Rows - 1;
}
#endif /* FEAT_MOUSE */
+6 -3
View File
@@ -34,7 +34,7 @@ SCRIPTS = test1.out test3.out test4.out test5.out test6.out \
test81.out test82.out test83.out test84.out test88.out \
test89.out test90.out test91.out test92.out test93.out \
test94.out test95.out test96.out test97.out test98.out \
test99.out test100.out test101.out test102.out test103.out \
test99.out test101.out test102.out test103.out \
test104.out test105.out test106.out test107.out \
test_argument_0count.out \
test_argument_count.out \
@@ -66,8 +66,10 @@ SCRIPTS = test1.out test3.out test4.out test5.out test6.out \
test_search_mbyte.out \
test_set.out \
test_signs.out \
test_tagcase.out \
test_textobjects.out \
test_utf8.out
test_utf8.out \
test_writefile.out
.SUFFIXES: .in .out
@@ -183,7 +185,6 @@ test96.out: test96.in
test97.out: test97.in
test98.out: test98.in
test99.out: test99.in
test100.out: test100.in
test101.out: test101.in
test102.out: test102.in
test103.out: test103.in
@@ -221,5 +222,7 @@ test_ruby.out: test_ruby.in
test_search_mbyte.out: test_search_mbyte.in
test_set.out: test_set.in
test_signs.out: test_signs.in
test_tagcase.out: test_tagcase.in
test_textobjects.out: test_textobjects.in
test_utf8.out: test_utf8.in
test_writefile.out: test_writefile.in
+4 -2
View File
@@ -33,7 +33,7 @@ SCRIPTS = test3.out test4.out test5.out test6.out test7.out \
test84.out test85.out test86.out test87.out test88.out \
test89.out test90.out test91.out test92.out test93.out \
test94.out test95.out test96.out test98.out test99.out \
test100.out test101.out test102.out test103.out test104.out \
test101.out test102.out test103.out test104.out \
test105.out test106.out test107.out\
test_argument_0count.out \
test_argument_count.out \
@@ -65,8 +65,10 @@ SCRIPTS = test3.out test4.out test5.out test6.out test7.out \
test_search_mbyte.out \
test_set.out \
test_signs.out \
test_tagcase.out \
test_textobjects.out \
test_utf8.out
test_utf8.out \
test_writefile.out
SCRIPTS32 = test50.out test70.out
+5 -3
View File
@@ -55,7 +55,7 @@ SCRIPTS = test3.out test4.out test5.out test6.out test7.out \
test84.out test85.out test86.out test87.out test88.out \
test89.out test90.out test91.out test92.out test93.out \
test94.out test95.out test96.out test98.out test99.out \
test100.out test101.out test102.out test103.out test104.out \
test101.out test102.out test103.out test104.out \
test105.out test106.out test107.out \
test_argument_0count.out \
test_argument_count.out \
@@ -87,8 +87,10 @@ SCRIPTS = test3.out test4.out test5.out test6.out test7.out \
test_search_mbyte.out \
test_set.out \
test_signs.out \
test_tagcase.out \
test_textobjects.out \
test_utf8.out
test_utf8.out \
test_writefile.out
SCRIPTS32 = test50.out test70.out
@@ -118,7 +120,7 @@ win32: fixff $(SCRIPTS16) $(SCRIPTS) $(SCRIPTS32)
fixff:
-$(VIMPROG) -u dos.vim --noplugin "+argdo set ff=dos|upd" +q *.in *.ok
-$(VIMPROG) -u dos.vim --noplugin "+argdo set ff=unix|upd" +q \
dotest.in test60.ok test71.ok test74.ok
dotest.in test60.ok test71.ok test74.ok test_listchars.ok
clean:
-$(DEL) *.out
+4 -2
View File
@@ -35,7 +35,7 @@ SCRIPTS = test1.out test3.out test4.out test5.out test6.out \
test81.out test82.out test83.out test84.out test88.out \
test89.out test90.out test91.out test92.out test93.out \
test94.out test95.out test96.out test98.out test99.out \
test100.out test101.out test102.out test103.out test104.out \
test101.out test102.out test103.out test104.out \
test105.out test106.out test107.out \
test_argument_0count.out \
test_argument_count.out \
@@ -67,8 +67,10 @@ SCRIPTS = test1.out test3.out test4.out test5.out test6.out \
test_search_mbyte.out \
test_set.out \
test_signs.out \
test_tagcase.out \
test_textobjects.out \
test_utf8.out
test_utf8.out \
test_writefile.out
SCRIPTS_BENCH = bench_re_freeze.out
+5 -3
View File
@@ -4,7 +4,7 @@
# Authors: Zoltan Arpadffy, <arpadffy@polarhome.com>
# Sandor Kopanyi, <sandor.kopanyi@mailbox.hu>
#
# Last change: 2015 Sep 08
# Last change: 2015 Dec 03
#
# This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
# Edit the lines in the Configuration section below to select.
@@ -94,7 +94,7 @@ SCRIPT = test1.out test2.out test3.out test4.out test5.out \
test82.out test84.out test88.out test89.out \
test90.out test91.out test92.out test93.out test94.out \
test95.out test96.out test98.out test99.out \
test100.out test101.out test103.out test104.out \
test101.out test103.out test104.out \
test105.out test106.out test107.out \
test_argument_0count.out \
test_argument_count.out \
@@ -126,8 +126,10 @@ SCRIPT = test1.out test2.out test3.out test4.out test5.out \
test_search_mbyte.out \
test_set.out \
test_signs.out \
test_tagcase.out \
test_textobjects.out \
test_utf8.out
test_utf8.out \
test_writefile.out
# Known problems:
# test17: ?
+27 -8
View File
@@ -2,7 +2,10 @@
# Makefile to run all tests for Vim
#
# Use console or GUI.
VIMPROG = ../vim
# VIMPROG = ../gvim
SCRIPTSOURCE = ../../runtime
# Uncomment this line to use valgrind for memory leaks and extra warnings.
@@ -31,7 +34,7 @@ SCRIPTS = test1.out test2.out test3.out test4.out test5.out test6.out \
test84.out test85.out test86.out test87.out test88.out \
test89.out test90.out test91.out test92.out test93.out \
test94.out test95.out test96.out test97.out test98.out \
test99.out test100.out test101.out test102.out test103.out \
test99.out test101.out test102.out test103.out \
test104.out test105.out test106.out test107.out \
test_argument_0count.out \
test_argument_count.out \
@@ -63,18 +66,23 @@ SCRIPTS = test1.out test2.out test3.out test4.out test5.out test6.out \
test_search_mbyte.out \
test_set.out \
test_signs.out \
test_tagcase.out \
test_textobjects.out \
test_utf8.out
test_utf8.out \
test_writefile.out
NEW_TESTS = test_assert.res \
test_alot.res
SCRIPTS_GUI = test16.out
SCRIPTS_BENCH = bench_re_freeze.out
.SUFFIXES: .in .out
.SUFFIXES: .in .out .res .vim
nongui: nolog $(SCRIPTS) report
nongui: nolog $(SCRIPTS) newtests report
gui: nolog $(SCRIPTS) $(SCRIPTS_GUI) report
gui: nolog $(SCRIPTS) $(SCRIPTS_GUI) newtests report
benchmark: $(SCRIPTS_BENCH)
@@ -86,14 +94,14 @@ report:
else echo ALL DONE; \
fi"
$(SCRIPTS) $(SCRIPTS_GUI): $(VIMPROG)
$(SCRIPTS) $(SCRIPTS_GUI) $(NEW_TESTS): $(VIMPROG)
RM_ON_RUN = test.out X* viminfo
RM_ON_START = tiny.vim small.vim mbyte.vim mzscheme.vim lua.vim test.ok benchmark.out
RUN_VIM = VIMRUNTIME=$(SCRIPTSOURCE); export VIMRUNTIME; $(VALGRIND) $(VIMPROG) -u unix.vim -U NONE --noplugin -s dotest.in
RUN_VIM = VIMRUNTIME=$(SCRIPTSOURCE); export VIMRUNTIME; $(VALGRIND) $(VIMPROG) -f -u unix.vim -U NONE --noplugin -s dotest.in
clean:
-rm -rf *.out *.failed *.rej *.orig test.log $(RM_ON_RUN) $(RM_ON_START) valgrind.*
-rm -rf *.out *.failed *.res *.rej *.orig test.log $(RM_ON_RUN) $(RM_ON_START) valgrind.*
test1.out: test1.in
-rm -rf $*.failed $(RM_ON_RUN) $(RM_ON_START) wrongtermsize
@@ -155,3 +163,14 @@ bench_re_freeze.out: bench_re_freeze.vim
nolog:
-rm -f test.log
# New style of tests uses Vim script with assert calls. These are easier
# to write and a lot easier to read and debug.
# Limitation: Only works with the +eval feature.
RUN_VIMTEST = VIMRUNTIME=$(SCRIPTSOURCE); export VIMRUNTIME; $(VALGRIND) $(VIMPROG) -f -u unix.vim -U NONE --noplugin
newtests: $(NEW_TESTS)
.vim.res:
$(RUN_VIMTEST) -u runtest.vim $*.vim
+97
View File
@@ -0,0 +1,97 @@
" This script is sourced while editing the .vim file with the tests.
" When the script is successful the .res file will be created.
" Errors are appended to the test.log file.
"
" The test script may contain anything, only functions that start with
" "Test_" are special. These will be invoked and should contain assert
" functions. See test_assert.vim for an example.
"
" It is possible to source other files that contain "Test_" functions. This
" can speed up testing, since Vim does not need to restart. But be careful
" that the tests do not interfere with each other.
"
" If an error cannot be detected properly with an assert function add the
" error to the v:errors list:
" call add(v:errors, 'test foo failed: Cannot find xyz')
"
" If preparation for each Test_ function is needed, define a SetUp function.
" It will be called before each Test_ function.
"
" If cleanup after each Test_ function is needed, define a TearDown function.
" It will be called after each Test_ function.
" Without the +eval feature we can't run these tests, bail out.
if 0
quit!
endif
" Check that the screen size is at least 24 x 80 characters.
if &lines < 24 || &columns < 80
let error = 'Screen size too small! Tests require at least 24 lines with 80 characters'
echoerr error
split test.log
$put =error
w
cquit
endif
" Source the test script. First grab the file name, in case the script
" navigates away.
let testname = expand('%')
source %
" Locate Test_ functions and execute them.
redir @q
function /^Test_
redir END
let tests = split(substitute(@q, 'function \(\k*()\)', '\1', 'g'))
let done = 0
let fail = 0
let errors = []
for test in tests
if exists("*SetUp")
call SetUp()
endif
let done += 1
try
exe 'call ' . test
catch
let fail += 1
call add(v:errors, 'Caught exception in ' . test . ': ' . v:exception . ' @ ' . v:throwpoint)
endtry
if len(v:errors) > 0
let fail += 1
call add(errors, 'Found errors in ' . test . ':')
call extend(errors, v:errors)
let v:errors = []
endif
if exists("*TearDown")
call TearDown()
endif
endfor
if fail == 0
" Success, create the .res file so that make knows it's done.
exe 'split ' . fnamemodify(testname, ':r') . '.res'
write
endif
if len(errors) > 0
" Append errors to test.log
split test.log
call append(line('$'), '')
call append(line('$'), 'From ' . testname . ':')
call append(line('$'), errors)
write
endif
echo 'Executed ' . done . (done > 1 ? ' tests': ' test')
if fail > 0
echo fail . ' FAILED'
endif
qall!
-53
View File
@@ -1,53 +0,0 @@
Tests for 'undolevel' and 'lispwords' settings being global-local
STARTTEST
:so small.vim
:set nocompatible viminfo+=nviminfo ul=5
:fu! FillBuffer()
:for i in range(1,13)
:put=i
:exe "setg ul=" . &g:ul
:endfor
:endfu
:fu! UndoLevel()
:redir @a | setglobal undolevels? | echon ' global' | setlocal undolevels? | echon ' local' |redir end
:$put a
:endfu
:new one
:0put ='ONE: expecting global undolevels: 5, local undolevels: -123456 (default)'
:call FillBuffer()
:earlier 10
:call UndoLevel()
:set ff=unix
:%w! test.out
:new two
:0put ='TWO: expecting global undolevels: 5, local undolevels: 2 (first) then 10 (afterwards)'
:setlocal ul=2
:call FillBuffer()
:earlier 10
:call UndoLevel()
:setlocal ul=10
:call UndoLevel()
:set ff=unix
:%w >> test.out
:wincmd p
:redir >>test.out | echo "global value shouldn't be changed and still be 5!" | echo 'ONE: expecting global undolevels: 5, local undolevels: -123456 (default)'|:setglobal undolevels? | echon ' global' | setlocal undolevels? | echon ' local' |echo "" |redir end
:new three
:setglobal ul=50
:1put ='global value should be changed to 50'
:2put ='THREE: expecting global undolevels: 50, local undolevels: -123456 (default)'
:call UndoLevel()
:set ff=unix
:%w >> test.out
:"sleep 10
:"
:" Testing 'lispwords'
:"
:setglobal lispwords=foo,bar,baz
:setlocal lispwords-=foo | setlocal lispwords+=quux
:redir >> test.out | echon "\nTesting 'lispwords' local value" | setglobal lispwords? | setlocal lispwords? | echo &lispwords . "\n" | redir end
:setlocal lispwords<
:redir >> test.out | echon "\nTesting 'lispwords' value reset" | setglobal lispwords? | setlocal lispwords? | echo &lispwords . "\n" | redir end
:qa!
ENDTEST
-51
View File
@@ -1,51 +0,0 @@
ONE: expecting global undolevels: 5, local undolevels: -123456 (default)
1
2
3
4
5
6
7
undolevels=5 global
undolevels=-123456 local
TWO: expecting global undolevels: 5, local undolevels: 2 (first) then 10 (afterwards)
1
2
3
4
5
6
7
8
9
10
undolevels=5 global
undolevels=2 local
undolevels=5 global
undolevels=10 local
global value shouldn't be changed and still be 5!
ONE: expecting global undolevels: 5, local undolevels: -123456 (default)
undolevels=5 global
undolevels=-123456 local
global value should be changed to 50
THREE: expecting global undolevels: 50, local undolevels: -123456 (default)
undolevels=50 global
undolevels=-123456 local
Testing 'lispwords' local value
lispwords=foo,bar,baz
lispwords=bar,baz,quux
bar,baz,quux
Testing 'lispwords' value reset
lispwords=foo,bar,baz
lispwords=foo,bar,baz
foo,bar,baz
+1 -1
View File
@@ -370,7 +370,7 @@ EOF
:sleep 1
:py t.running = False
:py t.join()
:py l[0] = t.t > 8 # check if the background thread is working
:py l[0] = t.t > 7 # check if the background thread is working
:py del time
:py del threading
:py del t
+14 -3
View File
@@ -367,7 +367,7 @@ EOF
:sleep 1
:py3 t.running = False
:py3 t.join()
:py3 l[0] = t.t > 8 # check if the background thread is working
:py3 l[0] = t.t > 7 # check if the background thread is working
:py3 del time
:py3 del threading
:py3 del t
@@ -910,8 +910,19 @@ fnamemodify = vim.Function('fnamemodify')
cb.append(str(fnamemodify('.', ':p:h:t')))
cb.append(vim.eval('@%'))
os.chdir('..')
cb.append(str(fnamemodify('.', ':p:h:t')))
cb.append(vim.eval('@%').replace(os.path.sep, '/'))
path = fnamemodify('.', ':p:h:t')
if path != b'src':
# Running tests from a shadow directory, so move up another level
# This will result in @% looking like shadow/testdir/test87.in, hence the
# slicing to remove the leading path and path separator
os.chdir('..')
cb.append(str(fnamemodify('.', ':p:h:t')))
cb.append(vim.eval('@%')[len(path)+1:].replace(os.path.sep, '/'))
os.chdir(path)
else:
cb.append(str(fnamemodify('.', ':p:h:t')))
cb.append(vim.eval('@%').replace(os.path.sep, '/'))
del path
os.chdir('testdir')
cb.append(str(fnamemodify('.', ':p:h:t')))
cb.append(vim.eval('@%'))
+1 -1
View File
@@ -17,7 +17,7 @@ Test cases:
STARTTEST
:so small.vim
:set nocp viminfo+=nviminfo
:set enc=utf-8 nocp viminfo+=nviminfo
:
:" User functions
:function MoveToCap()
+6
View File
@@ -0,0 +1,6 @@
" A series of tests that can run in one Vim invocation.
" This makes testing go faster, since Vim doesn't need to restart.
source test_lispwords.vim
source test_sort.vim
source test_undolevels.vim
+19
View File
@@ -0,0 +1,19 @@
" Test that the methods used for testing work.
func Test_assert_false()
call assert_false(0)
endfunc
func Test_assert_true()
call assert_true(1)
call assert_true(123)
endfunc
func Test_assert_equal()
let s = 'foo'
call assert_equal('foo', s)
let n = 4
call assert_equal(4, n)
let l = [1, 2, 3]
call assert_equal([1, 2, 3], l)
endfunc
+16
View File
@@ -0,0 +1,16 @@
" Tests for 'lispwords' settings being global-local
set nocompatible viminfo+=nviminfo
func Test_global_local_lispwords()
setglobal lispwords=foo,bar,baz
setlocal lispwords-=foo | setlocal lispwords+=quux
call assert_equal('foo,bar,baz', &g:lispwords)
call assert_equal('bar,baz,quux', &l:lispwords)
call assert_equal('bar,baz,quux', &lispwords)
setlocal lispwords<
call assert_equal('foo,bar,baz', &g:lispwords)
call assert_equal('foo,bar,baz', &l:lispwords)
call assert_equal('foo,bar,baz', &lispwords)
endfunc
+33 -1
View File
@@ -2,8 +2,9 @@ Test for linebreak and list option in utf-8 mode
STARTTEST
:so small.vim
:if !exists("+linebreak") || !has("conceal") | e! test.ok | w! test.out | qa! | endif
:if !exists("+linebreak") || !has("conceal") || !has("signs") | e! test.ok | w! test.out | qa! | endif
:so mbyte.vim
:set encoding=utf8
:if &enc !=? 'utf-8'|:e! test.ok|:w! test.out|qa!|endif
:10new|:vsp|:vert resize 20
:put =\"\tabcdef hijklmn\tpqrstuvwxyz\u00a01060ABCDEFGHIJKLMNOP \"
@@ -25,6 +26,7 @@ STARTTEST
: $put =g:line
: wincmd p
:endfu
:"
:let g:test ="Test 1: set linebreak + set list + fancy listchars"
:exe "set linebreak list listchars=nbsp:\u2423,tab:\u2595\u2014,trail:\u02d1,eol:\ub6"
:redraw!
@@ -45,6 +47,7 @@ STARTTEST
:redraw!
:let line=ScreenChar(winwidth(0),4)
:call DoRecordScreen()
:"
:let g:test ="Test 4: set linebreak list listchars and concealing"
:let c_defines=['#define ABCDE 1','#define ABCDEF 1','#define ABCDEFG 1','#define ABCDEFGH 1', '#define MSG_MODE_FILE 1','#define MSG_MODE_CONSOLE 2','#define MSG_MODE_FILE_AND_CONSOLE 3','#define MSG_MODE_FILE_THEN_CONSOLE 4']
:call append('$', c_defines)
@@ -56,6 +59,7 @@ STARTTEST
:redraw!
:let line=ScreenChar(winwidth(0),7)
:call DoRecordScreen()
:"
:let g:test ="Test 5: set linebreak list listchars and concealing part2"
:let c_defines=['bbeeeeee ; some text']
:call append('$', c_defines)
@@ -74,6 +78,7 @@ STARTTEST
:redraw!
:let line=ScreenChar(winwidth(0),1)
:call DoRecordScreen()
:"
:let g:test ="Test 6: Screenattributes for comment"
:$put =g:test
:call append('$', ' /* and some more */')
@@ -92,10 +97,37 @@ GGlGGlGGlGGlGGlGGlGGlGGlGGlGGl
: call append('$', "Not all attributes are different")
:endif
:set cpo&vim linebreak selection=exclusive
:"
:let g:test ="Test 8: set linebreak with visual block mode and v_b_A and selection=exclusive and multibyte char"
:$put =g:test
Golong line: 40afoobar aTARGETÃ' at end
:exe "norm! $3B\<C-v>eAx\<Esc>"
:"
:let g:test ="Test 9: a multibyte sign and colorcolumn"
:let attr=[]
:let attr2=[]
:$put =''
:$put ='a b c'
:$put ='a b c'
:set list nolinebreak cc=3
:sign define foo text=uff0b
:sign place 1 name=foo line=50 buffer=2
:norm! 2kztj
:let line1=line('.')
0GGlGGlGGlGGl
:let line2=line('.')
:let attr2=attr
:let attr=[]
0GGlGGlGGlGGl
:redraw!
:let line=ScreenChar(winwidth(0),3)
:call DoRecordScreen()
:" expected: attr[2] is different because of colorcolumn
:if attr[0] != attr2[0] || attr[1] != attr2[1] || attr[2] != attr2[2]
: call append('$', "Screen attributes are different!")
:else
: call append('$', "Screen attributes are the same!")
:endif
:%w! test.out
:qa!
ENDTEST
+9
View File
@@ -46,3 +46,12 @@ ScreenAttributes for test6:
Attribut 0 and 1 and 3 and 5 are different!
Test 8: set linebreak with visual block mode and v_b_A and selection=exclusive and multibyte char
long line: foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar TARGETÃx' at end
a b c
a b c
Test 9: a multibyte sign and colorcolumn
a b c¶
a b c¶
Screen attributes are the same!
+19
View File
@@ -0,0 +1,19 @@
" Test sort()
func Test_sort_strings()
" numbers compared as strings
call assert_equal([1, 2, 3], sort([3, 2, 1]))
call assert_equal([13, 28, 3], sort([3, 28, 13]))
endfunc
func Test_sort_numeric()
call assert_equal([1, 2, 3], sort([3, 2, 1], 'n'))
call assert_equal([3, 13, 28], sort([13, 28, 3], 'n'))
" strings are not sorted
call assert_equal(['13', '28', '3'], sort(['13', '28', '3'], 'n'))
endfunc
func Test_sort_numbers()
call assert_equal([3, 13, 28], sort([13, 28, 3], 'N'))
call assert_equal(['3', '13', '28'], sort(['13', '28', '3'], 'N'))
endfunc
+57
View File
@@ -0,0 +1,57 @@
Tests for 'tagcase' option
STARTTEST
:so small.vim
:lang mess C
:/^start text$/+1,/^end text$/w! Xtext
:/^start tags$/+1,/^end tags$/-1w! Xtags
:set tags=Xtags
:e Xtext
:"
:" Verify default values.
:set ic& | setg tc& | setl tc&
:call append('$', "ic=".&ic." g:tc=".&g:tc." l:tc=".&l:tc." tc=".&tc)
:"
:" Verify that the local setting accepts <empty> but that the global setting
:" does not. The first of these (setting the local value to <empty>) should
:" succeed; the other two should fail.
:let v:errmsg = ""
:setl tc=
:call append('$', v:errmsg)
:let v:errmsg = ""
:setg tc=
:call append('$', v:errmsg)
:let v:errmsg = ""
:set tc=
:call append('$', v:errmsg)
:"
:" Verify that the correct number of matching tags is found for all values of
:" 'ignorecase' and global and local values 'tagcase', in all combinations.
:for &ic in [0, 1]
: for &g:tc in ["followic", "ignore", "match"]
: for &l:tc in ["", "followic", "ignore", "match"]
: call append('$', "ic=".&ic." g:tc=".&g:tc." l:tc=".&l:tc." tc=".&tc)
: call append('$', len(taglist("^foo$")))
: call append('$', len(taglist("^Foo$")))
: endfor
: endfor
:endfor
:"
:1,/^end text$/d
:w! test.out
:qa!
ENDTEST
start text
Foo
Bar
foo
end text
start tags
Bar Xtext 3
Foo Xtext 2
foo Xtext 4
end tags
+76
View File
@@ -0,0 +1,76 @@
ic=0 g:tc=followic l:tc=followic tc=followic
E474: Invalid argument: tc=
E474: Invalid argument: tc=
ic=0 g:tc=followic l:tc= tc=followic
1
1
ic=0 g:tc=followic l:tc=followic tc=followic
1
1
ic=0 g:tc=followic l:tc=ignore tc=ignore
2
2
ic=0 g:tc=followic l:tc=match tc=match
1
1
ic=0 g:tc=ignore l:tc= tc=ignore
2
2
ic=0 g:tc=ignore l:tc=followic tc=followic
1
1
ic=0 g:tc=ignore l:tc=ignore tc=ignore
2
2
ic=0 g:tc=ignore l:tc=match tc=match
1
1
ic=0 g:tc=match l:tc= tc=match
1
1
ic=0 g:tc=match l:tc=followic tc=followic
1
1
ic=0 g:tc=match l:tc=ignore tc=ignore
2
2
ic=0 g:tc=match l:tc=match tc=match
1
1
ic=1 g:tc=followic l:tc= tc=followic
2
2
ic=1 g:tc=followic l:tc=followic tc=followic
2
2
ic=1 g:tc=followic l:tc=ignore tc=ignore
2
2
ic=1 g:tc=followic l:tc=match tc=match
1
1
ic=1 g:tc=ignore l:tc= tc=ignore
2
2
ic=1 g:tc=ignore l:tc=followic tc=followic
2
2
ic=1 g:tc=ignore l:tc=ignore tc=ignore
2
2
ic=1 g:tc=ignore l:tc=match tc=match
1
1
ic=1 g:tc=match l:tc= tc=match
1
1
ic=1 g:tc=match l:tc=followic tc=followic
2
2
ic=1 g:tc=match l:tc=ignore tc=ignore
2
2
ic=1 g:tc=match l:tc=match tc=match
1
1
+46
View File
@@ -0,0 +1,46 @@
" Tests for 'undolevels'
set nocompatible viminfo+=nviminfo
func FillBuffer()
for i in range(1,13)
put=i
" Set 'undolevels' to split undo.
exe "setg ul=" . &g:ul
endfor
endfunc
func Test_global_local_undolevels()
new one
set undolevels=5
call FillBuffer()
" will only undo the last 5 changes, end up with 13 - (5 + 1) = 7 lines
earlier 10
call assert_equal(5, &g:undolevels)
call assert_equal(-123456, &l:undolevels)
call assert_equal('7', getline('$'))
new two
setlocal undolevels=2
call FillBuffer()
" will only undo the last 2 changes, end up with 13 - (2 + 1) = 10 lines
earlier 10
call assert_equal(5, &g:undolevels)
call assert_equal(2, &l:undolevels)
call assert_equal('10', getline('$'))
setlocal ul=10
call assert_equal(5, &g:undolevels)
call assert_equal(10, &l:undolevels)
" Setting local value in "two" must not change local value in "one"
wincmd p
call assert_equal(5, &g:undolevels)
call assert_equal(-123456, &l:undolevels)
new three
setglobal ul=50
call assert_equal(50, &g:undolevels)
call assert_equal(-123456, &l:undolevels)
endfunc
+13 -10
View File
@@ -3,39 +3,42 @@ Tests for Unicode manipulations vim: set ft=vim :
STARTTEST
:so small.vim
:set encoding=utf-8
:"
:" Visual block Insert adjusts for multi-byte char
:new
:call setline(1, ["aaa", "あああ", "bbb"])
:exe ":norm! gg0l\<C-V>jjIx\<Esc>"
:let r = getline(1, '$')
:
:"
:bwipeout!
:$put=r
:"
:" Test for built-in function strchars()
:for str in ["a", "あいa", "A\u20dd", "A\u20dd\u20dd", "\u20dd"]
: $put=strchars(str)
: $put=strchars(str, 0)
: $put=strchars(str, 1)
:endfor
:"
:" Test for customlist completion
:function! CustomComplete1(lead, line, pos)
: return ['あ', 'い']
:endfunction
:command -nargs=1 -complete=customlist,CustomComplete1 Test1 :
:call feedkeys(":Test1 \<C-L>'\<C-B>$put='\<CR>", 't')
:
:command -nargs=1 -complete=customlist,CustomComplete1 Test1 echo
:call feedkeys(":Test1 \<C-L>'\<C-B>$put='\<CR>", 'it')
:"
:function! CustomComplete2(lead, line, pos)
: return ['あたし', 'あたま', 'あたりめ']
:endfunction
:command -nargs=1 -complete=customlist,CustomComplete2 Test2 :
:call feedkeys(":Test2 \<C-L>'\<C-B>$put='\<CR>", 't')
:
:command -nargs=1 -complete=customlist,CustomComplete2 Test2 echo
:call feedkeys(":Test2 \<C-L>'\<C-B>$put='\<CR>", 'it')
:"
:function! CustomComplete3(lead, line, pos)
: return ['Nこ', 'Nん', 'Nぶ']
:endfunction
:command -nargs=1 -complete=customlist,CustomComplete3 Test3 :
:call feedkeys(":Test3 \<C-L>'\<C-B>$put='\<CR>", 't')
:
:command -nargs=1 -complete=customlist,CustomComplete3 Test3 echo
:call feedkeys(":Test3 \<C-L>'\<C-B>$put='\<CR>", 'it')
:"
:call garbagecollect(1)
:/^start:/,$wq! test.out
ENDTEST
+84
View File
@@ -756,6 +756,90 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
972,
/**/
971,
/**/
970,
/**/
969,
/**/
968,
/**/
967,
/**/
966,
/**/
965,
/**/
964,
/**/
963,
/**/
962,
/**/
961,
/**/
960,
/**/
959,
/**/
958,
/**/
957,
/**/
956,
/**/
955,
/**/
954,
/**/
953,
/**/
952,
/**/
951,
/**/
950,
/**/
949,
/**/
948,
/**/
947,
/**/
946,
/**/
945,
/**/
944,
/**/
943,
/**/
942,
/**/
941,
/**/
940,
/**/
939,
/**/
938,
/**/
937,
/**/
936,
/**/
935,
/**/
934,
/**/
933,
/**/
932,
/**/
931,
/**/
930,
/**/

Some files were not shown because too many files have changed in this diff Show More