Compare commits

...

129 Commits

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

- Vim patch 7.4.1468

Script interfaces have compatibility with these versions

- Lua 5.2
- Perl 5.16
- Python2 2.7
- Python3 3.5
- Ruby 2.0
2016-03-01 20:27:59 -08:00
Kazuki Sakamoto fd343bdfb1 Merge remote-tracking branch 'vim/master' 2016-03-01 20:26:43 -08:00
Bram Moolenaar 51d1d53680 patch 7.4.1468
Problem:    Sort test doesn't test with "1" argument.
Solution:   Also test ignore-case sorting. (Yasuhiro Matsumoto)
2016-03-01 22:51:46 +01:00
Kazuki Sakamoto bc8e9509e7 Merge remote-tracking branch 'vim/master' 2016-02-29 20:50:46 -08:00
Bram Moolenaar 10b369f670 patch 7.4.1467
Problem:    Can't build without the float feature.
Solution:   Add #ifdefs. (Nick Owens, closes #667)
2016-02-29 23:12:49 +01:00
Bram Moolenaar 6b584af3d7 patch 7.4.1466
Problem:    Coverity reports dead code.
Solution:   Remove the two lines.
2016-02-29 23:03:23 +01:00
Bram Moolenaar cc7f8be3e0 patch 7.4.1465
Problem:    Coverity reported possible use of NULL pointer when using buffer
            output with JSON mode.
Solution:   Make it actually possible to use JSON mode with a buffer.
            Re-encode the JSON to append it to the buffer.
2016-02-29 22:55:56 +01:00
Bram Moolenaar 5131c144fe patch 7.4.1464
Problem:    When the argument of sort() is zero or empty it fails.
Solution:   Make zero work as documented. (suggested by Yasuhiro Matsumoto)
2016-02-29 22:05:26 +01:00
Bram Moolenaar a6b8976bb7 patch 7.4.1463
Problem:    Configure doesn't find isinf() and isnan() on some systems.
Solution:   Use a configure check that includes math.h.
2016-02-29 21:38:26 +01:00
Bram Moolenaar 2f6271b1e7 patch 7.4.1462
Problem:    Two more rarily used functions with errors.
Solution:   Add proper argument types. (Dominique Pelle)
2016-02-29 21:20:48 +01:00
Bram Moolenaar a86f14a923 patch 7.4.1461
Problem:    When starting job on MS-Windows all parts of the command are put
            in quotes.
Solution:   Only use quotes when needed. (Yasuhiro Matsumoto)
2016-02-29 21:05:48 +01:00
Bram Moolenaar fdcc9afb71 patch 7.4.1460
Problem:    Syntax error in rarily used code.
Solution:   Fix the mch_rename() declaration. (Ken Takata)
2016-02-29 12:52:39 +01:00
Kazuki Sakamoto bf290ef472 Revert "Workaround fix for test87"
This reverts commit 1332cbb7da.
2016-02-28 16:19:53 -08:00
Kazuki Sakamoto 62769fc416 Merge remote-tracking branch 'vim/master' 2016-02-28 15:44:20 -08:00
Bram Moolenaar e081e21f76 patch 7.4.1459
Problem:    MS-Windows doesn't know socklen_t.
Solution:   Use previous method for WIN32.
2016-02-28 22:33:46 +01:00
Bram Moolenaar fdd6ce4a2f patch 7.4.1458
Problem:    When a JSON channel has a callback it may never be cleared.
Solution:   Do not write "DETACH" into a JS or JSON channel.
2016-02-28 22:21:38 +01:00
Bram Moolenaar d42119fff2 patch 7.4.1457
Problem:    Opening a channel with select() is not done properly.
Solution:   Also used read-fds. Use getsockopt() to check for errors. (Ozaki
            Kiichi)
2016-02-28 20:51:49 +01:00
Bram Moolenaar 29e1951e14 patch 7.4.1456
Problem:    Test 87 fails with Python 3.5.
Solution:   Work around difference. (Taro Muraoka)
2016-02-28 20:13:18 +01:00
Bram Moolenaar fc2457e21d patch 7.4.1455
Problem:    JSON decoding test for surrogate pairs is in the wrong place.
Solution:   Move the test lines. (Ken Takata)
2016-02-28 20:04:09 +01:00
Bram Moolenaar 9730f74a0b patch 7.4.1454
Problem:    The exit callback test is flaky.
Solution:   Loop to wait for a short time up to a second.
2016-02-28 19:50:51 +01:00
Kazuki Sakamoto 3cf3c48ff8 Merge remote-tracking branch 'vim/master' 2016-02-28 10:50:25 -08:00
Bram Moolenaar 9bfdba3de3 patch 7.4.1453
Problem:    Missing --not-a-term.
Solution:   Add the argument.
2016-02-28 19:39:20 +01:00
Bram Moolenaar 18b5d6df10 patch 7.4.1452
Problem:    When a callback adds a syntax item either the redraw doesn't
            happen right away or in the GUI the cursor is in the wrong
            position for a moment. (Jakson Alves de Aquino)
Solution:   Redraw after the callback was invoked.
2016-02-28 19:30:24 +01:00
Bram Moolenaar 707659490d patch 7.4.1451
Problem:    Vim hangs when a channel has a callback but isn't referenced.
Solution:   Have channel_unref() only return TRUE when the channel was
            actually freed.
2016-02-28 19:28:59 +01:00
Bram Moolenaar 1c39102666 patch 7.4.1450
Problem:    Json encoding still fails when encoding is not utf-8.
Solution:   Set 'encoding' before :scriptencoding.  Run the json test
            separately to avoid affecting other tests.
2016-02-28 18:04:00 +01:00
Bram Moolenaar 8cc6977a96 patch 7.4.1449
Problem:    Build fails with job feature but without channel feature.
Solution:   Add #ifdef.
2016-02-28 16:42:03 +01:00
Bram Moolenaar c5215e943b patch 7.4.1448
Problem:    JSON tests fail if 'encoding' is not utf-8.
Solution:   Force encoding to utf-8.
2016-02-28 16:29:50 +01:00
Bram Moolenaar d6051b5eb8 patch 7.4.1447
Problem:    Memory leak when using ch_read(). (Dominique Pelle)
            No log message when stopping a job and a few other situations.
            Too many "Nothing to read" messages.  Channels are not freed.
Solution:   Free the listtv.  Add more log messages. Remove "Nothing to read"
            message.  Remove the channel from the job when its refcount
            becomes zero.
2016-02-28 15:49:03 +01:00
Bram Moolenaar 80e7884739 patch 7.4.1446
Problem:    Crash when using json_decode().
Solution:   Terminate string with a NUL byte.
2016-02-28 15:21:13 +01:00
Bram Moolenaar b362872837 patch 7.4.1445
Problem:    Memory corruption when 'encoding' is not utf-8.
Solution:   Convert decoded string later.
2016-02-28 14:56:39 +01:00
Kazuki Sakamoto 978768076e Merge remote-tracking branch 'vim/master' 2016-02-27 18:57:39 -08:00
Bram Moolenaar 0f526f5652 patch 7.4.1444
Problem:    Can't build with JSON but without multi-byte.
Solution:   Fix pointer name.
2016-02-27 22:59:41 +01:00
Bram Moolenaar dae8d21dd2 Updated runtime files 2016-02-27 22:40:16 +01:00
Bram Moolenaar 3f2a5d8dfb patch 7.4.1443
Problem:    Can't build GTK3 with small features.
Solution:   Use gtk_widget_get_window().  Fix typos. (Dominique Pelle)
2016-02-27 22:08:16 +01:00
Bram Moolenaar e0fd2aa8f6 patch 7.4.1442
Problem:    MS-Windows: more compilation warnings for destructor.
Solution:   Add "virtual". (Ken Takata)
2016-02-27 21:59:51 +01:00
Bram Moolenaar e26643e6bc patch 7.4.1441
Problem:    Using empty name instead of no name for channel buffer.
Solution:   Remove the empty name.
2016-02-27 21:53:02 +01:00
Bram Moolenaar fefecb0fbe patch 7.4.1440
Problem:    Can't build on Windows.
Solution:   Change #ifdefs.  Only define isnan when used.
2016-02-27 21:27:20 +01:00
Bram Moolenaar f97ddbeb25 patch 7.4.1439
Problem:    Using uninitialzed variable.
Solution:   Initialize vc_type.
2016-02-27 21:13:38 +01:00
Bram Moolenaar c7f0ebc6d1 patch 7.4.1438
Problem:    Can't get buffer number of a channel.
Solution:   Add ch_getbufnr().
2016-02-27 21:10:09 +01:00
Bram Moolenaar 136f29a91d patch 7.4.1437
Problem:    Old system doesn't have isinf() and NAN. (Ben Fritz)
Solution:   Adjust #ifdefs.  Detect isnan() and isinf() functions with
            configure. Use a replacement when missing. (Kazunobu Kuriyama)
2016-02-27 20:14:15 +01:00
Bram Moolenaar e98991b8cf patch 7.4.1436
Problem:    Sniff files still referenced in distribution.
Solution:   Remove sniff files from distribution.
2016-02-27 19:26:01 +01:00
Bram Moolenaar 8b1862a316 patch 7.4.1435
Problem:    It is confusing that ch_sendexpr() and ch_sendraw() wait for a
            response.
Solution:   Add ch_evalexpr() and ch_evalraw().
2016-02-27 19:21:24 +01:00
Bram Moolenaar b6ff81188d patch 7.4.1434
Problem:    JSON encoding doesn't hanel surrogate pair.
Solution:   Improve multi-byte handling of JSON. (Yasuhiro Matsumoto)
2016-02-27 18:41:27 +01:00
Bram Moolenaar 85b11769ab patch 7.4.1433
Problem:    The Sniff interface is no longer useful, the tool has not been
            available for may years.
Solution:   Delete the Sniff interface and related code.
2016-02-27 18:13:23 +01:00
Bram Moolenaar 4d1961783f patch 7.4.1432
Problem:    Typo in button text.
Solution:   Fix the typo. (Dominique Pelle)
2016-02-27 18:07:44 +01:00
Bram Moolenaar 9e24f0c5c1 patch 7.4.1431
Problem:    Including header files twice.
Solution:   Remove the extra includes.
2016-02-27 17:22:27 +01:00
Bram Moolenaar 7ce686c990 patch 7.4.1430
Problem:    When encoding JSON, turning NaN and Infinity into null without
            giving an error is not useful.
Solution:   Pass NaN and Infinity on.  If the receiver can't handle them it
            will generate the error.
2016-02-27 16:33:22 +01:00
Bram Moolenaar d804fdf4c2 patch 7.4.1429
Problem:    On MS-Windows, when not use renderoptions=type:directx, drawing
            emoji will be broken.
Solution:   Fix usage of unicodepdy. (Yasuhiro Matsumoto)
2016-02-27 16:04:58 +01:00
Bram Moolenaar edb4f2b360 patch 7.4.1428
Problem:    Compiler warning for non-virtual destructor.
Solution:   Make it virtual. (Yasuhiro Matsumoto)
2016-02-27 15:27:23 +01:00
Bram Moolenaar 43acbce1bb patch 7.4.1427
Problem:    Trailing comma in enums is not ANSI C.
Solution:   Remove the trailing commas.
2016-02-27 15:21:32 +01:00
Bram Moolenaar 187db50d04 patch 7.4.1426
Problem:    The "out-io" option for jobs is not implemented yet.
Solution:   Implement the "buffer" value: append job output to a buffer.
2016-02-27 14:44:26 +01:00
Kazuki Sakamoto 349f03986e Merge remote-tracking branch 'vim/master' 2016-02-26 22:03:21 -08:00
Bram Moolenaar 6e722e2f94 patch 7.4.1425
Problem:    There are still references to MS-DOS support.
Solution:   Remove most of the help txt and install instructions. (Ken Takata)
2016-02-26 19:58:58 +01:00
Bram Moolenaar 0c0dac1fb1 patch 7.4.1424
Problem:    Not using --not-a-term when running tests on MS-Windows.
Solution:   Use NO_PLUGIN. (Christian Brabandt)
2016-02-26 15:56:42 +01:00
Bram Moolenaar 4cafa6dc7f patch 7.4.1423
Problem:    Channel test fails on MS-Windows.
Solution:   Do not give an error message when reading fails, assume the other
            end exited.
2016-02-26 11:52:39 +01:00
Bram Moolenaar 46c85439c9 patch 7.4.1422
Problem:    Error when reading fails uses wrong errno.  Keeping channel open
            after job stops results in test failing.
Solution:   Move the error up.  Add ch_job_killed.
2016-02-26 11:17:46 +01:00
Kazuki Sakamoto 4f35c07e5a Merge pull request #251 from macvim-dev/fix/__bridge
No need to use __bridge for non-ARC
2016-02-25 21:26:21 -08:00
Kazuki Sakamoto 27ef23eeee No need to use __bridge for non-ARC 2016-02-25 20:52:41 -08:00
Kazuki Sakamoto 1ad74130c9 Merge remote-tracking branch 'vim/master' 2016-02-25 20:42:46 -08:00
Bram Moolenaar c8dcbb12c5 patch 7.4.1421
Problem:    May free a channel when a callback may need to be invoked.
Solution:   Keep the channel when refcount is zero.
2016-02-25 23:10:17 +01:00
Bram Moolenaar d2227a02b0 patch 7.4.1420
Problem:    Missing makefile.
Solution:   Type the path correctly.
2016-02-25 22:37:42 +01:00
Bram Moolenaar 49c39ff678 patch 7.4.1419
Problem:    Tests slowed down because of the "not a terminal" warning.
Solution:   Add the --not-a-term command line argument.
2016-02-25 21:21:52 +01:00
Bram Moolenaar 923d926d57 patch 7.4.1418
Problem:    job_stop() on MS-Windows does not really stop the job.
Solution:   Make the default to stop the job forcefully. (Ken Takata)
            Make MS-Windows and Unix more similar.
2016-02-25 20:56:01 +01:00
Bram Moolenaar 265f64efcf patch 7.4.1417
Problem:    Missing appveyor.bat from the distribution.
Solution:   Add it to the list of files.
2016-02-25 20:37:40 +01:00
Bram Moolenaar 669cac0a80 patch 7.4.1416
Problem:    Using "u_char" intead of "char_u", which doesn't work everywhere.
            (Jörg Plate)
Solution:   Use "char_u" always.
2016-02-25 15:25:03 +01:00
Kazuki Sakamoto 2dca5115d1 Merge remote-tracking branch 'vim/master' 2016-02-24 19:17:12 -08:00
Bram Moolenaar f391327adb Updated runtime files. 2016-02-25 00:00:01 +01:00
Bram Moolenaar 84f4996d2a patch 7.4.1415
Problem:    Dropped the skip-tags setting.
Solution:   Put it back.
2016-02-24 22:27:05 +01:00
Bram Moolenaar 81275ca9ce patch 7.4.1414
Problem:    Appveyor only builds one feature set.
Solution:   Build a combination of features and GUI/console. (Christian
            Brabandt)
2016-02-24 21:02:20 +01:00
Bram Moolenaar 8b374215cc patch 7.4.1413
Problem:    When calling ch_close() the close callback is invoked, even though
            the docs say it isn't. (Christian J. Robinson)
Solution:   Don't call the close callback.
2016-02-24 20:43:06 +01:00
Bram Moolenaar 68c85fcdf3 patch 7.4.1412
Problem:    Compiler warning for indent. (Dominique Pelle)
Solution:   Fix the indent.
2016-02-24 12:57:50 +01:00
Kazuki Sakamoto 470421ae8c Merge remote-tracking branch 'vim/master' 2016-02-23 21:35:57 -08:00
Bram Moolenaar 9e34110816 patch 7.4.1411
Problem:    Compiler warning for indent. (Ajit Thakkar)
Solution:   Indent normally.
2016-02-23 23:04:36 +01:00
Bram Moolenaar 42dd7aee41 patch 7.4.1410
Problem:    Leaking memory in cscope interface.
Solution:   Free memory when no tab is found. (Christian Brabandt)
2016-02-23 22:50:12 +01:00
Bram Moolenaar 1858a842af patch 7.4.1409
Problem:    Configure includes GUI despite --disable-gui flag.
Solution:   Add SKIP_GTK3. (Kazunobu Kuriyama)
2016-02-23 22:30:31 +01:00
Bram Moolenaar 3ea0f1ae31 patch 7.4.1408
Problem:    MS-Windows doesn't have isnan() and isinf().
Solution:   Use _isnan() and _isinf().
2016-02-23 22:07:32 +01:00
Bram Moolenaar f1b6ac7229 patch 7.4.1407
Problem:    json_encode() does not handle NaN and inf properly. (David
            Barnett)
Solution:   For JSON turn them into "null".  For JS use "NaN" and "Infinity".
            Add isnan().
2016-02-23 21:26:43 +01:00
Bram Moolenaar e16e5a9d8d patch 7.4.1406
Problem:    Leaking memory in cs_print_tags_priv().
Solution:   Free tbuf. (idea by Forrest Fleming)
2016-02-23 20:44:08 +01:00
Bram Moolenaar 8aefbe0ad5 patch 7.4.1405
Problem:    Completion menu flickers.
Solution:   Delay showing the popup menu. (Shougo, Justin M. Keyes, closes
            #656)
2016-02-23 20:13:16 +01:00
Bram Moolenaar 9186a27622 patch 7.4.1404
Problem:    ch_read() doesn't time out on MS-Windows.
Solution:   Instead of WM_NETBEANS use select(). (Yukihiro Nakadaira)
2016-02-23 19:34:01 +01:00
Bram Moolenaar 0106e3d0bf patch 7.4.1403
Problem:    Can't build without the quickfix feature.
Solution:   Add #ifdefs. Call ex_ni() for unimplemented commands. (Yegappan
            Lakshmanan)
2016-02-23 18:55:43 +01:00
Bram Moolenaar 9892189d2e patch 7.4.1402
Problem:    GTK 3 is not supported.
Solution:   Add GTK 3 support. (Kazunobu Kuriyama)
2016-02-23 17:14:37 +01:00
Bram Moolenaar 6bd364e084 patch 7.4.1401
Problem:    Having 'autochdir' set during startup and using diff mode doesn't
            work. (Axel Bender)
Solution:   Don't use 'autochdir' while still starting up. (Christian
            Brabandt)
2016-02-23 16:19:07 +01:00
Kazuki Sakamoto 832dc54994 Merge remote-tracking branch 'vim/master' 2016-02-23 07:07:58 -08:00
Bram Moolenaar 254ebaf068 patch 7.4.1400
Problem:    Perl eval doesn't work properly on 64-bit big-endian machine.
Solution:   Use 32 bit type for the key. (Danek Duvall)
2016-02-23 16:06:28 +01:00
Bram Moolenaar 48e330aff9 patch 7.4.1399
Problem:    The MS-DOS code does not build.
Solution:   Remove the old MS-DOS code.
2016-02-23 14:53:34 +01:00
Bram Moolenaar 4e221c99e8 patch 7.4.1398
Problem:    The close-cb option is not implemented yet.
Solution:   Implemente close-cb. (Yasuhiro Matsumoto)
2016-02-23 13:20:22 +01:00
Kazuki Sakamoto ccd65be2b3 Merge remote-tracking branch 'vim/master' 2016-02-22 20:57:15 -08:00
Bram Moolenaar 0bb6108eb4 patch 7.4.1397
Problem:    Sort test fails on MS-Windows.
Solution:   Correct the compare function.
2016-02-22 23:50:28 +01:00
Bram Moolenaar 1daae446e5 patch 7.4.1396
Problem:    Compiler warnings for conversions.
Solution:   Add type cast.
2016-02-22 23:25:25 +01:00
Bram Moolenaar eed284a169 patch 7.4.1395
Problem:    Using DETACH in quotes is not compatible with the Netbeans
            interface. (Xavier de Gaye)
Solution:   Remove the quotes, only use them for JSON and JS mode.
2016-02-22 23:13:33 +01:00
Bram Moolenaar 0b962473dd patch 7.4.1394
Problem:    Can't sort inside a sort function.
Solution:   Use a struct to store the sort parameters. (Jacob Niehus)
2016-02-22 22:51:33 +01:00
Bram Moolenaar bd73ae1bc6 patch 7.4.1393
Problem:    Starting a job hangs in the GUI. (Takuya Fujiwara)
Solution:   Don't check if ch_job is NULL when checking for an error.
            (Yasuhiro Matsumoto)
2016-02-22 22:19:22 +01:00
Bram Moolenaar 2cd5bb2505 patch 7.4.1392
Problem:    Some tests fail for Win32 console version.
Solution:   Move the tests to SCRIPTS_MORE2.  Pass VIMRUNTIME. (Christian
            Brabandt)
2016-02-22 22:05:32 +01:00
Bram Moolenaar 4db20ab091 patch 7.4.1391
Problem:    Warning for uninitialzed variable.
Solution:   Set it to zero. (Christian Brabandt)
2016-02-22 21:48:30 +01:00
Bram Moolenaar 33c31d5abf patch 7.4.1390
Problem:    When building with GTK and glib-compile-resources cannot be found
            building Vim fails. (Michael Gehring)
Solution:   Make GLIB_COMPILE_RESOURCES empty instead of leaving it at "no".
            (nuko8, closes #655)
2016-02-22 21:07:06 +01:00
Bram Moolenaar b2bd6a087d patch 7.4.1389
Problem:    Incomplete function declaration.
Solution:   Add "void". (Yasuhiro Matsumoto)
2016-02-22 20:20:25 +01:00
Bram Moolenaar bdcd752750 patch 7.4.1388
Problem:    Compiler warning. (Cesar Romani)
Solution:   Initialize variable.
2016-02-22 20:19:03 +01:00
Bram Moolenaar 8f8ae40ce4 patch 7.4.1387
Problem:    Win16 docs still referenced.
Solution:   Remove Win16 files from the docs Makefile. (Kenichi Ito)
2016-02-22 20:07:49 +01:00
Bram Moolenaar 23c463a157 patch 7.4.1386
Problem:    When the Job exit callback is invoked, the job may be freed too
            soon. (Yasuhiro Matsumoto)
Solution:   Increase refcount.
2016-02-22 11:39:27 +01:00
Kazuki Sakamoto 057a21955a Merge remote-tracking branch 'vim/master' 2016-02-21 15:20:47 -08:00
Bram Moolenaar 5e83840756 patch 7.4.1385
Problem:    Compiler warning for using array.
Solution:   Use the right member name. (Yegappan Lakshmanan)
2016-02-21 23:12:41 +01:00
Bram Moolenaar f6fee0e2d4 patch 7.4.1384
Problem:    It is not easy to use a set of plugins and their dependencies.
Solution:   Add packages, ":loadopt", 'packpath'.
2016-02-21 23:02:49 +01:00
Bram Moolenaar 271273c39f patch 7.4.1383
Problem:    GvimExt only loads the old libintl.dll.
Solution:   Also try loading libint-8.dll. (Ken Takata, closes #608)
2016-02-21 20:30:22 +01:00
Bram Moolenaar 02e83b438e patch 7.4.1382
Problem:    Can't get the job of a channel.
Solution:   Add ch_getjob().
2016-02-21 20:10:26 +01:00
Bram Moolenaar eab089d22f patch 7.4.1381
Problem:    Exit value not available on MS-Windows.
Solution:   Set the exit value.
2016-02-21 19:32:02 +01:00
Bram Moolenaar ee1cffc07a patch 7.4.1380
Problem:    The job exit callback is not implemented.
Solution:   Add the "exit-cb" option.
2016-02-21 19:14:41 +01:00
Kazuki Sakamoto 19ee5dce6d Merge remote-tracking branch 'vim/master' 2016-02-21 09:08:52 -08:00
Bram Moolenaar b7522a2f0c patch 7.4.1379
Problem:    Channel test fails on Win32 console.
Solution:   Don't sleep when timeout is zero. Call channel_wait() before
            channel_read(). Channels are not polled during ":sleep". (Yukihiro
            Nakadaira)
2016-02-21 17:20:55 +01:00
Bram Moolenaar 65edff8f51 patch 7.4.1378
Problem:    Can't change job settings after it started.
Solution:   Add job_setoptions() with the "stoponexit" flag.
2016-02-21 16:40:11 +01:00
Bram Moolenaar 08298fa1d3 patch 7.4.1377
Problem:    Test_connect_waittime() is flaky.
Solution:   Ignore the "Connection reset by peer" error.
2016-02-21 13:01:53 +01:00
Kazuki Sakamoto 9a00729649 Sync MacVim channel code with Vim 2016-02-20 17:49:47 -08:00
Kazuki Sakamoto 937f6a1740 Merge remote-tracking branch 'vim/master' 2016-02-20 17:07:39 -08:00
Bram Moolenaar decb14d68c Update channel.txt 2016-02-20 23:32:02 +01:00
Bram Moolenaar b6b5252bcd patch 7.4.1376
Problem:    ch_setoptions() cannot set all options.
Solution:   Support more options.
2016-02-20 23:30:07 +01:00
Bram Moolenaar e89ff0472b patch 7.4.1375
Problem:    Still some Win16 code.
Solution:   Remove FEAT_GUI_W16.(Hirohito Higashi)
2016-02-20 22:17:05 +01:00
Bram Moolenaar af7559f666 patch 7.4.1374
Problem:    Channel test hangs on MS-Windows.
Solution:   Disable the ch_read() that is supposed to time out.
2016-02-20 21:48:25 +01:00
Bram Moolenaar ece61b06ef patch 7.4.1373
Problem:    Calling a Vim function over a channel requires turning the
            arguments into a string.
Solution:   Add the "call" command. (Damien)  Also merge "expr" and "eval"
            into one.
2016-02-20 21:39:05 +01:00
Bram Moolenaar 6f3a544228 patch 7.4.1372
Problem:    channel read implementation is incomplete.
Solution:   Add ch_read() and options for ch_readraw().
2016-02-20 19:56:13 +01:00
Bram Moolenaar fffd5560c6 patch 7.4.1371
Problem:    X11 GUI callbacks don't specify the part of the channel.
Solution:   Pass the fd instead of the channel ID.
2016-02-20 18:44:39 +01:00
Bram Moolenaar ddbe7d26b1 patch 7.4.1370
Problem:    The Python test script may keep on running.
Solution:   Join the threads. (Yasuhiro Matsumoto)
2016-02-20 18:26:48 +01:00
Bram Moolenaar 42d38a2db1 patch 7.4.1369
Problem:    Channels don't have a queue for stderr.
Solution:   Have a queue for each part of the channel.
2016-02-20 18:18:59 +01:00
Bram Moolenaar 914331648d patch 7.4.1368
Problem:    One more Win16 file remains.
Solution:   Delete it.
2016-02-20 15:50:18 +01:00
Bram Moolenaar e0fa3742ea Updated runtime files. 2016-02-20 15:47:01 +01:00
Bram Moolenaar c6b14f0a83 patch 7.4.1367
Problem:    Compiler warning for unreachable code.
Solution:   Remove a "break". (Danek Duvall)
2016-02-20 15:26:42 +01:00
Bram Moolenaar 663128270e patch 7.4.1366
Problem:    Typo in test and resulting error in test result.
Solution:   Fix the typo and correct the result. (James McCoy, close #650)
2016-02-20 15:10:50 +01:00
Bram Moolenaar befb366aff patch 7.4.1365
Problem:    Cannot execute a single test function.
Solution:   Add an argument to filter the functions with. (Yasuhiro Matsumoto)
2016-02-20 14:41:40 +01:00
Bram Moolenaar cf7164a088 patch 7.4.1364
Problem:    The Win 16 code is not maintained and unused.
Solution:   Remove the Win 16 support.
2016-02-20 13:55:06 +01:00
Bram Moolenaar 065bbac8ad patch 7.4.1363
Problem:    Compiler warnings with tiny build.
Solution:   Add #ifdefs.
2016-02-20 13:08:46 +01:00
171 changed files with 12192 additions and 15518 deletions
+1 -21
View File
@@ -6,6 +6,7 @@ SRC_ALL = \
.hgignore \
.travis.yml \
appveyor.yml \
src/appveyor.bat \
src/README.txt \
src/alloc.h \
src/arabic.c \
@@ -261,7 +262,6 @@ SRC_DOS_UNIX = \
src/if_python3.c \
src/if_py_both.h \
src/if_ruby.c \
src/if_sniff.h \
src/if_tcl.c \
src/proto/if_cscope.pro \
src/proto/if_lua.pro \
@@ -291,16 +291,13 @@ SRC_DOS = \
src/GvimExt/uninst.bat \
README_srcdos.txt \
src/INSTALLpc.txt \
src/Make_bc3.mak \
src/Make_bc5.mak \
src/Make_cyg.mak \
src/Make_cyg_ming.mak \
src/Make_djg.mak \
src/Make_ivc.mak \
src/Make_dvc.mak \
src/Make_ming.mak \
src/Make_mvc.mak \
src/Make_w16.mak \
src/bigvim.bat \
src/bigvim64.bat \
src/msvcsetup.bat \
@@ -314,10 +311,7 @@ SRC_DOS = \
src/glbl_ime.h \
src/gui_dwrite.cpp \
src/gui_dwrite.h \
src/gui_w16.c \
src/gui_w32.c \
src/gui_w48.c \
src/guiw16rc.h \
src/gui_w32_rc.h \
src/if_ole.cpp \
src/if_ole.h \
@@ -325,20 +319,13 @@ SRC_DOS = \
src/if_perl_msvc/stdbool.h \
src/iid_ole.c \
src/os_dos.h \
src/os_msdos.c \
src/os_msdos.h \
src/os_w32dll.c \
src/os_w32exe.c \
src/os_win16.c \
src/os_win32.c \
src/os_mswin.c \
src/os_win16.h \
src/os_win32.h \
src/proto/gui_w16.pro \
src/proto/gui_w32.pro \
src/proto/if_ole.pro \
src/proto/os_msdos.pro \
src/proto/os_win16.pro \
src/proto/os_win32.pro \
src/proto/os_mswin.pro \
src/testdir/Make_dos.mak \
@@ -349,15 +336,11 @@ SRC_DOS = \
src/vim.rc \
src/vimio.h \
src/gvim.exe.mnf \
src/vim16.def \
src/vim16.rc \
src/vimrun.c \
src/vimtbar.h \
src/xpm_w32.c \
src/xpm_w32.h \
src/xxd/Make_bc3.mak \
src/xxd/Make_bc5.mak \
src/xxd/Make_djg.mak \
src/xxd/Make_ming.mak \
src/xxd/Make_mvc.mak \
nsis/gvim.nsi \
@@ -390,7 +373,6 @@ SRC_DOS_BIN = \
src/VisVim/Res/*.bmp \
src/tearoff.bmp \
src/tools.bmp \
src/tools16.bmp \
src/vim*.ico \
src/vim.tlb \
src/vimtbar.lib \
@@ -472,7 +454,6 @@ SRC_EXTRA = \
$(SRC_VMS) \
README_os390.txt \
src/Make_mint.mak \
src/if_sniff.c \
src/infplist.xml \
src/link.390 \
src/os_beos.c \
@@ -711,7 +692,6 @@ EXTRA = \
src/tee/Makefile \
src/tee/Make_mvc.mak \
src/tee/tee.c \
csdpmi4b.zip \
# generic language files
LANG_GEN = \
+20 -6
View File
@@ -2,6 +2,18 @@ version: "{build}"
skip_tags: true
environment:
matrix:
- FEATURE: HUGE
- FEATURE: NORMAL
# disabled
# - FEATURE: TINY
# - FEATURE: SMALL
# - FEATURE: BIG
matrix:
fast_finish: true
before_build:
- '"C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 /release'
# Work around for Python 2.7.11's bug
@@ -9,12 +21,14 @@ before_build:
- reg copy HKLM\SOFTWARE\Python\PythonCore\2.7 HKLM\SOFTWARE\Python\PythonCore\2.7-32 /s /reg:64
build_script:
- cd src
- sed -e "s/\$(LINKARGS2)/\$(LINKARGS2) | sed -e 's#.*\\\\r.*##'/" Make_mvc.mak > Make_mvc2.mak
- nmake -f Make_mvc2.mak CPU=AMD64 GUI=yes IME=yes MBYTE=yes ICONV=yes DEBUG=no PYTHON_VER=27 DYNAMIC_PYTHON=yes PYTHON=C:\Python27-x64 PYTHON3_VER=34 DYNAMIC_PYTHON3=yes PYTHON3=C:\Python34-x64
- .\gvim -u NONE -c "redir @a | ver | 0put a | wq!" ver.txt
- type ver.txt
- src/appveyor.bat
test_script:
- cd testdir
- cd src/testdir
# Testing with MSVC gvim
- nmake -f Make_dos.mak VIMPROG=..\gvim
- nmake -f Make_dos.mak clean
# Testing with MingW console version
- nmake -f Make_dos.mak VIMPROG=..\vim
# vim: sw=2 sts=2 et ts=2 sr
BIN
View File
Binary file not shown.
+800 -570
View File
File diff suppressed because it is too large Load Diff
-5
View File
@@ -32,7 +32,6 @@ DOCS = \
ft_ada.txt \
ft_sql.txt \
gui.txt \
gui_w16.txt \
gui_w32.txt \
gui_x11.txt \
hangulin.txt \
@@ -167,7 +166,6 @@ HTMLS = \
ft_ada.html \
ft_sql.html \
gui.html \
gui_w16.html \
gui_w32.html \
gui_x11.html \
hangulin.html \
@@ -388,9 +386,6 @@ hebrew.txt:
russian.txt:
touch russian.txt
gui_w16.txt:
touch gui_w16.txt
gui_w32.txt:
touch gui_w32.txt
+5
View File
@@ -409,6 +409,11 @@ CTRL-X Subtract [count] from the number or alphabetic
{Visual}CTRL-X Subtract [count] from the number or alphabetic
character in the highlighted text. {not in Vi}
On MS-Windows, this is mapped to cut Visual text
|dos-standard-mappings|. If you want to disable the
mapping, use this: >
silent! vunmap <C-X>
<
*v_g_CTRL-X*
{Visual}g CTRL-X Subtract [count] from the number or alphabetic
character in the highlighted text. If several lines
+167 -88
View File
@@ -1,4 +1,4 @@
*channel.txt* For Vim version 7.4. Last change: 2016 Feb 16
*channel.txt* For Vim version 7.4. Last change: 2016 Feb 27
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -74,7 +74,7 @@ In T1 you should see:
=== socket opened === ~
You can now send a message to the server: >
echo ch_sendexpr(channel, 'hello!')
echo ch_evalexpr(channel, 'hello!')
The message is received in T1 and a response is sent back to Vim.
You can see the raw messages in T1. What Vim sends is:
@@ -93,7 +93,7 @@ To handle asynchronous communication a callback needs to be used: >
func MyHandler(channel, msg)
echo "from the handler: " . a:msg
endfunc
call ch_sendexpr(channel, 'hello!', "MyHandler")
call ch_sendexpr(channel, 'hello!', {'callback': "MyHandler"})
Vim will not wait for a response. Now the server can send the response later
and MyHandler will be invoked.
@@ -101,13 +101,15 @@ Instead of giving a callback with every send call, it can also be specified
when opening the channel: >
call ch_close(channel)
let channel = ch_open('localhost:8765', {'callback': "MyHandler"})
call ch_sendexpr(channel, 'hello!', 0)
call ch_sendexpr(channel, 'hello!')
==============================================================================
3. Opening a channel *channel-open*
To open a channel: >
let channel = ch_open({address} [, {options}])
if ch_status(channel) == "open"
" use the channel
Use |ch_status()| to see if the channel could be opened.
@@ -121,61 +123,84 @@ Use |ch_status()| to see if the channel could be opened.
"nl" - Use messages that end in a NL character
"raw" - Use raw messages
"in-mode" mode specifically for stdin, only when using pipes
"out-mode" mode specifically for stdout, only when using pipes
"err-mode" mode specifically for stderr, only when using pipes
Note: when setting "mode" the part specific mode is
overwritten. Therefore set "mode" first and the part specific
mode later.
Note: when writing to a file or buffer NL mode is always used.
*channel-callback*
"callback" A function that is called when a message is received that is
not handled otherwise. It gets two arguments: the channel
handle and the received message. Example: >
and the received message. Example: >
func Handle(channel, msg)
echo 'Received: ' . a:msg
endfunc
let channel = ch_open("localhost:8765", {"callback": "Handle"})
<
TODO:
When "mode" is "json" or "js" the "msg" argument is the body
of the received message, converted to Vim types.
When "mode" is "nl" the "msg" argument is one message,
excluding the NL.
When "mode" is "raw" the "msg" argument is the whole message
as a string.
*out-cb*
"out-cb" A function like "callback" but used for stdout. Only for when
the channel uses pipes. When "out-cb" wasn't set the channel
callback is used.
*err-cb*
"err-cb" A function like "callback" but used for stderr. Only for when
the channel uses pipes.
the channel uses pipes. When "err-cb" wasn't set the channel
callback is used.
TODO:
TODO: *close-cb*
"close-cb" A function that is called when the channel gets closed, other
than by calling ch_close(). It should be defined like this: >
func MyCloseHandler(channel)
< *waittime*
"waittime" The time to wait for the connection to be made in
milliseconds. The default is zero, don't wait, which is
useful if the server is supposed to be running already. A
negative number waits forever.
milliseconds. A negative number waits forever.
"timeout" The time to wait for a request when blocking, using
ch_sendexpr(). Again in milliseconds. The default is 2000 (2
The default is zero, don't wait, which is useful if a local
server is supposed to be running already. On Unix Vim
actually uses a 1 msec timeout, that is required on many
systems. Use a larger value for a remote server, e.g. 10
msec at least.
"timeout" The time to wait for a request when blocking, E.g. when using
ch_evalexpr(). In milliseconds. The default is 2000 (2
seconds).
When "mode" is "json" or "js" the "msg" argument is the body of the received
message, converted to Vim types.
When "mode" is "raw" the "msg" argument is the whole message as a string.
*out-timeout* *err-timeout*
"out-timeout" Timeout for stdout. Only when using pipes.
"err-timeout" Timeout for stderr. Only when using pipes.
Note: when setting "timeout" the part specific mode is
overwritten. Therefore set "timeout" first and the part
specific mode later.
When "mode" is "json" or "js" the "callback" is optional. When omitted it is
only possible to receive a message after sending one.
TODO:
To change the channel options after opening it use ch_setoptions(). The
arguments are similar to what is passed to ch_open(), but "waittime" cannot be
given, since that only applies to opening the channel.
To change the channel options after opening it use |ch_setoptions()|. The
arguments are similar to what is passed to |ch_open()|, but "waittime" cannot
be given, since that only applies to opening the channel.
The handler can be added or changed: >
For example, the handler can be added or changed: >
call ch_setoptions(channel, {'callback': callback})
When "callback" is empty (zero or an empty string) the handler is removed.
The timeout can be changed: >
call ch_setoptions(channel, {'timeout': msec})
<
*E906*
*channel-close* *E906*
Once done with the channel, disconnect it like this: >
call ch_close(channel)
When a socket is used this will close the socket for both directions. When
pipes are used (stdin/stdout/stderr) they are all closed. This might not be
what you want! Stopping the job with job_stop() might be better.
TODO:
Currently up to 10 channels can be in use at the same time. *E897*
All readahead is discarded, callbacks will no longer be invoked.
When the channel can't be opened you will get an error message. There is a
difference between MS-Windows and Unix: On Unix when the port doesn't exist
@@ -189,18 +214,19 @@ If there is an error reading or writing a channel it will be closed.
4. Using a JSON or JS channel *channel-use*
If mode is JSON then a message can be sent synchronously like this: >
let response = ch_sendexpr(channel, {expr})
let response = ch_evalexpr(channel, {expr})
This awaits a response from the other side.
When mode is JS this works the same, except that the messages use
JavaScript encoding. See |js_encode()| for the difference.
To send a message, without handling a response: >
call ch_sendexpr(channel, {expr}, 0)
To send a message, without handling a response or letting the channel callback
handle the response: >
call ch_sendexpr(channel, {expr})
To send a message and letting the response handled by a specific function,
asynchronously: >
call ch_sendexpr(channel, {expr}, {callback})
call ch_sendexpr(channel, {expr}, {'callback': Handler})
Vim will match the response with the request using the message ID. Once the
response is received the callback will be invoked. Further responses with the
@@ -233,11 +259,13 @@ message, it must use the number zero:
Then channel handler will then get {response} converted to Vim types. If the
channel does not have a handler the message is dropped.
On read error or ch_close() the string "DETACH" is sent, if still possible.
The channel will then be inactive.
On read error or ch_close(), when using a socket, the string "DETACH" is sent,
if still possible. The channel will then be inactive. For a JSON and JS mode
channel quotes are used around DETACH, otherwise there are no quotes.
It is also possible to use ch_sendraw() on a JSON or JS channel. The caller
is then completely responsible for correct encoding and decoding.
It is also possible to use ch_sendraw() and ch_evalraw() on a JSON or JS
channel. The caller is then completely responsible for correct encoding and
decoding.
==============================================================================
5. Channel commands *channel-commands*
@@ -249,8 +277,10 @@ Possible commands are: *E903* *E904* *E905*
["redraw" {forced}]
["ex", {Ex command}]
["normal", {Normal mode command}]
["eval", {expression}, {number}]
["expr", {expression}, {number}]
["expr", {expression}]
["call", {func name}, {argument list}, {number}]
["call", {func name}, {argument list}]
With all of these: Be careful what these commands do! You can easily
interfere with what the user is doing. To avoid trouble use |mode()| to check
@@ -291,33 +321,50 @@ mapped. Example to open the folds under the cursor:
["normal" "zO"]
Command "eval" ~
Command "expr" with response ~
The "eval" command an be used to get the result of an expression. For
The "expr" command can be used to get the result of an expression. For
example, to get the number of lines in the current buffer:
["eval","line('$')"] ~
["expr","line('$')", -2] ~
it will send back the result of the expression:
It will send back the result of the expression:
[-2, "last line"] ~
The format is:
[{number}, {result}]
Here {number} is the same as what was in the request. Use a negative number
to avoid confusion with message that Vim sends.
to avoid confusion with message that Vim sends. Use a different number on
every request to be able to match the request with the response.
{result} is the result of the evaluation and is JSON encoded. If the
evaluation fails or the result can't be encoded in JSON it is the string
"ERROR".
Command "expr" ~
Command "expr" without a response ~
The "expr" command is similar to "eval", but does not send back any response.
This command is similar to "expr" above, but does not send back any response.
Example:
["expr","setline('$', ['one', 'two', 'three'])"] ~
There is no third argument in the request.
Command "call" ~
This is similar to "expr", but instead of passing the whole expression as a
string this passes the name of a function and a list of arguments. This
avoids the conversion of the arguments to a string and escaping and
concatenating them. Example:
["call", "line", ["$"], -2] ~
Leave out the fourth argument if no response is to be sent:
["call", "setline", ["$", ["one", "two", "three"]]] ~
==============================================================================
6. Using a RAW or NL channel *channel-raw*
If mode is RAW or NL then a message can be send like this: >
let response = ch_sendraw(channel, {string})
let response = ch_evalraw(channel, {string})
The {string} is sent as-is. The response will be what can be read from the
channel right away. Since Vim doesn't know how to recognize the end of the
@@ -331,18 +378,18 @@ first NL. This can also be just the NL for an empty response.
If no NL was read before the channel timeout an empty string is returned.
To send a message, without expecting a response: >
call ch_sendraw(channel, {string}, 0)
call ch_sendraw(channel, {string})
The process can send back a response, the channel handler will be called with
it.
To send a message and letting the response handled by a specific function,
asynchronously: >
call ch_sendraw(channel, {string}, {callback})
call ch_sendraw(channel, {string}, {'callback': 'MyHandler'})
This {string} can also be JSON, use |json_encode()| to create it and
|json_decode()| to handle a received JSON message.
It is not possible to use |ch_sendexpr()| on a raw channel.
It is not possible to use |ch_evalexpr()| or |ch_sendexpr()| on a raw channel.
==============================================================================
7. More channel functions *channel-more*
@@ -354,22 +401,20 @@ are:
"closed" The channel was closed.
TODO:
To objain the job associated with a channel: ch_getjob(channel)
To obtain the job associated with a channel: ch_getjob(channel)
TODO:
To read one message from a channel: >
let output = ch_read(channel)
This uses the channel timeout. To read without a timeout, just get any
message that is available: >
let output = ch_read(channel, 0)
let output = ch_read(channel, {'timeout': 0})
When no message was available then the result is v:none for a JSON or JS mode
channels, an empty string for a RAW or NL channel.
To read all output from a RAW or NL channel that is available: >
let output = ch_readall(channel)
To read all output from a RAW channel that is available: >
let output = ch_readraw(channel)
To read the error output: >
let output = ch_readall(channel, "err")
TODO: use channel timeout, no timeout or specify timeout?
let output = ch_readraw(channel, {"part": "err"})
==============================================================================
8. Starting a job with a channel *job-start* *job*
@@ -391,21 +436,29 @@ The function will be called with the channel and a message. You would define
it like this: >
func MyHandler(channel, msg)
Without the handler you need to read the output with ch_read().
Without the handler you need to read the output with |ch_read()| or
|ch_readraw()|.
The handler defined for "out-cb" will also receive stderr. If you want to
The handler defined for "out-cb" will not receive stderr. If you want to
handle that separately, add an "err-cb" handler: >
let job = job_start(command, {"out-cb": "MyHandler",
\ "err-cb": "ErrHandler"})
You can send a message to the command with ch_sendraw(). If the channel is in
JSON or JS mode you can use ch_sendexpr().
If you want to handle both stderr and stdout with one handler use the
"callback" option: >
let job = job_start(command, {"callback": "MyHandler"})
You can send a message to the command with ch_evalraw(). If the channel is in
JSON or JS mode you can use ch_evalexpr().
There are several options you can use, see |job-options|.
For example, to start a job and write its output in buffer "dummy": >
let logjob = job_start("tail -f /tmp/log",
\ {'out-io': 'buffer', 'out-name': 'dummy'})
sbuf dummy
TODO:
To run a job and read its output once it is done: >
let job = job_start({command}, {'exit-cb': 'MyHandler'})
func MyHandler(job, status)
let channel = job_getchannel()
@@ -448,54 +501,80 @@ This gives the job some time to make the port available.
10. Job options *job-options*
The {options} argument in job_start() is a dictionary. All entries are
optional. The same options can be used with job_setoptions(job, {options}).
optional. Some options can be used after the job has started, using
job_setoptions(job, {options}). Many options can be used with the channel
related to the job, using ch_setoptions(channel, {options}).
See |job_setoptions()| and |ch_setoptions()|.
TODO: *job-out-cb*
"callback": handler
*job-callback*
"callback": handler Callback for something to read on any part of the
channel.
*job-out-cb*
"out-cb": handler Callback for when there is something to read on
stdout.
TODO: *job-err-cb*
*job-err-cb*
"err-cb": handler Callback for when there is something to read on
stderr. Defaults to the same callback as "out-cb".
TODO: *job-close-cb*
stderr.
*job-close-cb*
"close-cb": handler Callback for when the channel is closed. Same as
"close-cb" on ch_open().
TODO: *job-exit-cb*
*job-exit-cb*
"exit-cb": handler Callback for when the job ends. The arguments are the
job and the exit status.
TODO: *job-killonexit*
"killonexit": 1 Stop the job when Vim exits.
"killonexit": 0 Do not stop the job when Vim exits.
The default is 1.
Vim checks about every 10 seconds for jobs that ended.
The callback can also be triggered by calling
|job_status()|.
*job-stoponexit*
"stoponexit": {signal} Send {signal} to the job when Vim exits. See
|job_stop()| for possible values.
"stoponexit": "" Do not stop the job when Vim exits.
The default is "term".
TODO: *job-term*
"term": "open" Start a terminal and connect the job
stdin/stdout/stderr to it.
TODO: *job-in-io*
"in-io": "null" disconnect stdin
*job-in-io*
"in-io": "null" disconnect stdin TODO
"in-io": "pipe" stdin is connected to the channel (default)
"in-io": "file" stdin reads from a file
"in-file": "/path/file" the file to read from
"in-io": "file" stdin reads from a file TODO
"in-io": "buffer" stdin reads from a buffer TODO
"in-name": "/path/file" the name of he file or buffer to read from
"in-buf": number the number of the buffer to read from TODO
TODO: *job-out-io*
"out-io": "null" disconnect stdout
*job-out-io*
"out-io": "null" disconnect stdout TODO
"out-io": "pipe" stdout is connected to the channel (default)
"out-io": "file" stdout writes to a file
"out-file": "/path/file" the file to write to
"out-io": "file" stdout writes to a file TODO
"out-io": "buffer" stdout appends to a buffer
"out-buffer": "name" buffer to append to
"out-name": "/path/file" the name of the file or buffer to write to
"out-buf": number the number of the buffer to write to TODO
TODO: *job-err-io*
"err-io": "out" same type as stdout (default)
"err-io": "null" disconnect stderr
"err-io": "pipe" stderr is connected to the channel
"err-io": "file" stderr writes to a file
"err-file": "/path/file" the file to write to
"err-io": "buffer" stderr appends to a buffer
"err-buffer": "name" buffer to append to
*job-err-io*
"err-io": "out" same as stdout TODO
"err-io": "null" disconnect stderr TODO
"err-io": "pipe" stderr is connected to the channel (default)
"err-io": "file" stderr writes to a file TODO
"err-io": "buffer" stderr appends to a buffer TODO
"err-name": "/path/file" the name of the file or buffer to write to
"err-buf": number the number of the buffer to write to TODO
TODO: more options
When the IO mode is "buffer" and there is a callback, the text is appended to
the buffer before invoking the callback.
The name of the buffer is compared the full name of existing buffers. If
there is a match that buffer is used. Otherwise a new buffer is created.
Use an empty name to always create a new buffer. |ch_getbufnr()| can then be
used to get the buffer number.
For a new buffer 'buftype' is set to "nofile" and 'bufhidden' to "hide". If
you prefer other settings, create the buffer first and pass the buffer number.
When the buffer written to is displayed in a window and the cursor is in the
first column of the last line, the cursor will be moved to the newly added
line and the window is scrolled up to show the cursor if needed.
Undo is synced for every added line.
==============================================================================
11. Controlling a job *job-control*
+2 -2
View File
@@ -1,4 +1,4 @@
*editing.txt* For Vim version 7.4. Last change: 2016 Feb 11
*editing.txt* For Vim version 7.4. Last change: 2016 Feb 16
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1016,7 +1016,7 @@ the newly written file (it might be there but contain bogus data). In that
case try recovery, because the swap file is synced to disk and might still be
there. |:recover|
The directories given with the 'backupdir' option is used to put the backup
The directories given with the 'backupdir' option are used to put the backup
file in. (default: same directory as the written file).
Whether the backup is a new file, which is a copy of the original file, or the
+180 -79
View File
@@ -1,4 +1,4 @@
*eval.txt* For Vim version 7.4. Last change: 2016 Feb 16
*eval.txt* For Vim version 7.4. Last change: 2016 Feb 27
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -59,11 +59,11 @@ Dictionary An associative, unordered array: Each entry has a key and a
Funcref A reference to a function |Funcref|.
Example: function("strlen")
Special v:false, v:true, v:none and v:null
Special |v:false|, |v:true|, |v:none| and |v:null|. *Special*
Job Used for a job, see |job_start()|.
Job Used for a job, see |job_start()|. *Job*
Channel Used for a channel, see |ch_open()|.
Channel Used for a channel, see |ch_open()|. *Channel*
The Number and String types are converted automatically, depending on how they
are used.
@@ -1793,9 +1793,9 @@ argidx() Number current index in the argument list
arglistid( [{winnr} [, {tabnr}]])
Number argument list id
argv( {nr}) String {nr} entry of the argument list
argv( ) List the argument list
argv() List the argument list
assert_equal( {exp}, {act} [, {msg}]) none assert {exp} equals {act}
assert_exception({error} [, {msg}]) none assert {error} is in v:exception
assert_exception( {error} [, {msg}]) none assert {error} is in v:exception
assert_fails( {cmd} [, {error}]) none assert {cmd} fails
assert_false( {actual} [, {msg}]) none assert {actual} is false
assert_true( {actual} [, {msg}]) none assert {actual} is true
@@ -1817,15 +1817,24 @@ byteidxcomp( {expr}, {nr}) Number byte index of {nr}'th char in {expr}
call( {func}, {arglist} [, {dict}])
any call {func} with arguments {arglist}
ceil( {expr}) Float round {expr} up
ch_close( {handle}) none close a channel
ch_close( {channel}) none close {channel}
ch_evalexpr( {channel}, {expr} [, {options}])
any evaluate {expr} on JSON {channel}
ch_evalraw( {channel}, {string} [, {options}])
any evaluate {string} on raw {channel}
ch_getbufnr( {channel}, {what}) Number get buffer number for {channel}/{what}
ch_getjob( {channel}) Job get the Job of {channel}
ch_log( {msg} [, {channel}]) none write {msg} in the channel log file
ch_logfile( {fname} [, {mode}]) none start logging channel activity
ch_open( {address} [, {argdict})] Number open a channel to {address}
ch_readraw( {handle}) String read from channel {handle}
ch_sendexpr( {handle}, {expr} [, {options}])
any send {expr} over JSON channel {handle}
ch_sendraw( {handle}, {string} [, {options}])
any send {string} over raw channel {handle}
ch_status( {handle}) String status of channel {handle}
ch_open( {address} [, {options}]) Channel open a channel to {address}
ch_read( {channel} [, {options}]) String read from {channel}
ch_readraw( {channel} [, {options}]) String read raw from {channel}
ch_sendexpr( {channel}, {expr} [, {options}])
any send {expr} over JSON {channel}
ch_sendraw( {channel}, {string} [, {options}])
any send {string} over raw {channel}
ch_setoptions( {channel}, {options}) none set options for {channel}
ch_status( {channel}) String status of {channel}
changenr() Number current change number
char2nr( {expr}[, {utf8}]) Number ASCII/UTF8 value of first char in {expr}
cindent( {lnum}) Number C indent for line {lnum}
@@ -1851,11 +1860,11 @@ delete( {fname} [, {flags}]) Number delete the file or directory {fname}
did_filetype() Number TRUE if FileType autocommand event used
diff_filler( {lnum}) Number diff filler lines about {lnum}
diff_hlID( {lnum}, {col}) Number diff highlighting at {lnum}/{col}
disable_char_avail_for_testing({expr}) none test without typeahead
disable_char_avail_for_testing( {expr}) none test without typeahead
empty( {expr}) Number TRUE if {expr} is empty
escape( {string}, {chars}) String escape {chars} in {string} with '\'
eval( {string}) any evaluate {string} into its value
eventhandler( ) Number TRUE if inside an event handler
eventhandler() Number TRUE if inside an event handler
executable( {expr}) Number 1 if executable {expr} exists
exepath( {expr}) String full path of the command {expr}
exists( {expr}) Number TRUE if {expr} exists
@@ -1881,9 +1890,9 @@ fnamemodify( {fname}, {mods}) String modify file name
foldclosed( {lnum}) Number first line of fold at {lnum} if closed
foldclosedend( {lnum}) Number last line of fold at {lnum} if closed
foldlevel( {lnum}) Number fold level at {lnum}
foldtext( ) String line displayed for closed fold
foldtext() String line displayed for closed fold
foldtextresult( {lnum}) String text for closed fold at {lnum}
foreground( ) Number bring the Vim window to the foreground
foreground() Number bring the Vim window to the foreground
function( {name}) Funcref reference to function {name}
garbagecollect( [{atexit}]) none free memory, breaking cyclic references
get( {list}, {idx} [, {def}]) any get item {idx} from {list} or {def}
@@ -1893,7 +1902,7 @@ getbufline( {expr}, {lnum} [, {end}])
getbufvar( {expr}, {varname} [, {def}])
any variable {varname} in buffer {expr}
getchar( [expr]) Number get one character from the user
getcharmod( ) Number modifiers for the last typed character
getcharmod() Number modifiers for the last typed character
getcharsearch() Dict last character search
getcmdline() String return the current command-line
getcmdpos() Number return cursor position in command-line
@@ -1935,7 +1944,7 @@ haslocaldir( [{winnr} [, {tabnr}]])
Number TRUE if the window executed |:lcd|
hasmapto( {what} [, {mode} [, {abbr}]])
Number TRUE if mapping to {what} exists
histadd( {history},{item}) String add an item to a history
histadd( {history}, {item}) String add an item to a history
histdel( {history} [, {item}]) String remove an item from a history
histget( {history} [, {index}]) String get the item {index} from a history
histnr( {history}) Number highest index of a history
@@ -1957,11 +1966,13 @@ insert( {list}, {item} [, {idx}]) List insert {item} in {list} [before {idx}]
invert( {expr}) Number bitwise invert
isdirectory( {directory}) Number TRUE if {directory} is a directory
islocked( {expr}) Number TRUE if {expr} is locked
isnan( {expr}) Number TRUE if {expr} is NaN
items( {dict}) List key-value pairs in {dict}
job_getchannel( {job}) Number get the channel handle for {job}
job_start( {command} [, {options}]) Job start a job
job_status( {job}) String get the status of a job
job_stop( {job} [, {how}]) Number stop a job
job_getchannel( {job}) Channel get the channel handle for {job}
job_setoptions( {job}, {options}) none set options for {job}
job_start( {command} [, {options}]) Job start a job
job_status( {job}) String get the status of {job}
job_stop( {job} [, {how}]) Number stop {job}
join( {list} [, {sep}]) String join {list} items into one String
js_decode( {string}) any decode JS style JSON
js_encode( {expr}) String encode JS style JSON
@@ -2220,7 +2231,7 @@ argidx() The result is the current index in the argument list. 0 is
the first file. argc() - 1 is the last one. See |arglist|.
*arglistid()*
arglistid([{winnr}, [ {tabnr} ]])
arglistid([{winnr} [, {tabnr}]])
Return the argument list ID. This is a number which
identifies the argument list being used. Zero is used for the
global argument list. See |arglist|.
@@ -2682,11 +2693,57 @@ confirm({msg} [, {choices} [, {default} [, {type}]]])
don't fit, a vertical layout is used anyway. For some systems
the horizontal layout is always used.
ch_close({handle}) *ch_close()*
Close channel {handle}. See |channel|.
ch_close({channel}) *ch_close()*
Close {channel}. See |channel-close|.
{only available when compiled with the |+channel| feature}
ch_logfile( {fname} [, {mode}]) *ch_logfile()*
ch_evalexpr({channel}, {expr} [, {options}]) *ch_evalexpr()*
Send {expr} over {channel}. The {expr} is encoded
according to the type of channel. The function cannot be used
with a raw channel. See |channel-use|.
*E917*
{options} must be a Dictionary. It must not have a "callback"
entry.
ch_evalexpr() waits for a response and returns the decoded
expression. When there is an error or timeout it returns an
empty string.
{only available when compiled with the |+channel| feature}
ch_evalraw({channel}, {string} [, {options}]) *ch_evalraw()*
Send {string} over {channel}.
Works like |ch_evalexpr()|, but does not encode the request or
decode the response. The caller is responsible for the
correct contents. Also does not add a newline for a channel
in NL mode, the caller must do that. The NL in the response
is removed.
See |channel-use|.
{only available when compiled with the |+channel| feature}
ch_getbufnr({channel}, {what}) *ch_getbufnr()*
Get the buffer number that {channel} is using for {what}.
{what} can be "err" for stderr, "out" for stdout or empty for
socket output.
Returns -1 when there is no buffer.
{only available when compiled with the |+channel| feature}
ch_getjob({channel}) *ch_getjob()*
Get the Job associated with {channel}.
If there is no job calling |job_status()| on the returned Job
will result in "fail".
{only available when compiled with the |+channel| and
|+job| features}
ch_log({msg} [, {channel}]) *ch_log()*
Write {msg} in the channel log file, if it was opened with
|ch_logfile()|.
When {channel} is passed the channel number is used for the
message. {channel} must be an open channel.
ch_logfile({fname} [, {mode}]) *ch_logfile()*
Start logging channel activity to {fname}.
When {fname} is an empty string: stop logging.
@@ -2696,15 +2753,15 @@ ch_logfile( {fname} [, {mode}]) *ch_logfile()*
The file is flushed after every message, on Unix you can use
"tail -f" to see what is going on in real time.
ch_open({address} [, {argdict}]) *ch_open()*
ch_open({address} [, {options}]) *ch_open()*
Open a channel to {address}. See |channel|.
Returns the channel handle on success. Returns a negative
number for failure.
Returns a Channel. Use |ch_status()| to check for
failure.
{address} has the form "hostname:port", e.g.,
"localhost:8765".
If {argdict} is given it must be a |Dictionary|. The optional
If {options} is given it must be a |Dictionary|. The optional
items are:
mode "raw", "js" or "json".
Default "json".
@@ -2714,37 +2771,51 @@ ch_open({address} [, {argdict}]) *ch_open()*
waittime Specify connect timeout as milliseconds.
Negative means forever.
Default: 0 (don't wait)
timeout Specify response read timeout value as
timeout Specify response read timeout value in
milliseconds.
Default: 2000.
{only available when compiled with the |+channel| feature}
ch_readraw({handle}) *ch_readraw()*
Read from channel {handle} and return the received message.
ch_read({channel} [, {options}]) *ch_read()*
Read from {channel} and return the received message.
This uses the channel timeout. When there is nothing to read
within that time an empty string is returned.
TODO: depends on channel mode.
within that time an empty string is returned. To specify a
different timeout in msec use the "timeout" option:
{"timeout": 123} ~
To read from the error output use the "part" option:
{"part": "err"} ~
To read a message with a specific ID, on a JS or JSON channel:
{"id": 99} ~
When no ID is specified or the ID is -1, the first message is
returned. This overrules any callback waiting for this
message.
ch_sendexpr({handle}, {expr} [, {options}]) *ch_sendexpr()*
Send {expr} over channel {handle}. The {expr} is encoded
For a RAW channel this returns whatever is available, since
Vim does not know where a message ends.
For a NL channel this returns one message.
For a JS or JSON channel this returns one decoded message.
This includes any sequence number.
ch_readraw({channel} [, {options}]) *ch_readraw()*
Like ch_read() but for a JS and JSON channel does not decode
the message.
ch_sendexpr({channel}, {expr} [, {options}]) *ch_sendexpr()*
Send {expr} over {channel}. The {expr} is encoded
according to the type of channel. The function cannot be used
with a raw channel. See |channel-use|. *E912*
with a raw channel. See |channel-use|. *E912*
{options} must be a Dictionary.
When "callback" is a Funcref or the name of a function,
ch_sendexpr() returns immediately. The callback is invoked
when the response is received. See |channel-callback|.
Without "callback" ch_sendexpr() waits for a response and
returns the decoded expression. When there is an error or
timeout it returns an empty string.
When "callback" is zero no response is expected.
{options} must be a Dictionary. The "callback" item is a
Funcref or the name of a function it is invoked when the
response is received. See |channel-callback|.
Without "callback" the channel handler is invoked, otherwise
any received message is dropped.
{only available when compiled with the |+channel| feature}
ch_sendraw({handle}, {string} [, {options}]) *ch_sendraw()*
Send {string} over channel {handle}.
ch_sendraw({channel}, {string} [, {options}]) *ch_sendraw()*
Send {string} over {channel}.
Works like |ch_sendexpr()|, but does not encode the request or
decode the response. The caller is responsible for the
correct contents. Also does not add a newline for a channel
@@ -2754,8 +2825,21 @@ ch_sendraw({handle}, {string} [, {options}]) *ch_sendraw()*
{only available when compiled with the |+channel| feature}
ch_status({handle}) *ch_status()*
Return the status of channel {handle}:
ch_setoptions({channel}, {options}) *ch_setoptions()*
Set options on {channel}:
"callback" the channel callback
"timeout" default read timeout in msec
"mode" mode for the whole channel
See |ch_open()| for more explanation.
Note that changing the mode may cause queued messages to be
lost.
These options cannot be changed:
"waittime" only applies to "ch_open()|
ch_status({channel}) *ch_status()*
Return the status of {channel}:
"fail" failed to open the channel
"open" channel can be used
"closed" channel can not be used
@@ -4346,17 +4430,28 @@ islocked({expr}) *islocked()* *E786*
< When {expr} is a variable that does not exist you get an error
message. Use |exists()| to check for existence.
isnan({expr}) *isnan()*
Return non-zero if {expr} is a float with value NaN. >
echo isnan(0.0 / 0.0)
< 1 ~
{only available when compiled with the |+float| feature}
items({dict}) *items()*
Return a |List| with all the key-value pairs of {dict}. Each
|List| item is a list with two items: the key of a {dict}
entry and the value of this entry. The |List| is in arbitrary
order.
job_getchannel({job}) *job_getchannel()*
Get the channel handle that {job} is using.
{only available when compiled with the |+job| feature}
job_setoptions({job}, {options}) *job_setoptions()*
Change options for {job}. Supported are:
"stoponexit" |job-stoponexit|
"exit-cb" |job-exit-cb|
job_start({command} [, {options}]) *job_start()*
Start a job and return a Job object. Unlike |system()| and
|:!cmd| this does not wait for the job to finish.
@@ -4397,32 +4492,41 @@ job_start({command} [, {options}]) *job_start()*
{only available when compiled with the |+job| feature}
job_status({job}) *job_status()*
job_status({job}) *job_status()* *E916*
Returns a String with the status of {job}:
"run" job is running
"fail" job failed to start
"dead" job died or was stopped after running
If an exit callback was set with the "exit-cb" option and the
job is now detected to be "dead" the callback will be invoked.
{only available when compiled with the |+job| feature}
job_stop({job} [, {how}]) *job_stop()*
Stop the {job}. This can also be used to signal the job.
When {how} is omitted or is "term" the job will be terminated
normally. For Unix SIGTERM is sent. For MS-Windows
CTRL_BREAK will be sent. This goes to the process group, thus
children may also be affected.
When {how} is omitted or is "term" the job will be terminated.
For Unix SIGTERM is sent. On MS-Windows the job will be
terminated forcedly (there is no "gentle" way).
This goes to the process group, thus children may also be
affected.
Other values for Unix:
"hup" Unix: SIGHUP
"quit" Unix: SIGQUIT
"kill" Unix: SIGKILL (strongest way to stop)
number Unix: signal with that number
Effect for Unix:
"term" SIGTERM (default)
"hup" SIGHUP
"quit" SIGQUIT
"int" SIGINT
"kill" SIGKILL (strongest way to stop)
number signal with that number
Other values for MS-Windows:
"int" Windows: CTRL_C
"kill" Windows: terminate process forcedly
Others Windows: CTRL_BREAK
Effect for MS-Windows:
"term" terminate process forcedly (default)
"hup" CTRL_BREAK
"quit" CTRL_BREAK
"int" CTRL_C
"kill" terminate process forcedly
Others CTRL_BREAK
On Unix the signal is sent to the process group. This means
that when the job is "sh -c command" it affects both the shell
@@ -4489,6 +4593,8 @@ json_encode({expr}) *json_encode()*
Vim values are converted as follows:
Number decimal number
Float floating point number
Float nan "NaN"
Float inf "Infinity"
String in double quotes (possibly null)
Funcref not possible, error
List as an array (possibly null); when
@@ -4499,13 +4605,9 @@ json_encode({expr}) *json_encode()*
v:true "true"
v:none "null"
v:null "null"
Note that using v:none is permitted, although the JSON
standard does not allow empty items. This can be useful for
omitting items in an array:
[0,,,,,5] ~
This is much more efficient than:
[0,null,null,null,null,5] ~
But a strict JSON parser will not accept it.
Note that NaN and Infinity are passed on as values. This is
missing in the JSON standard, but several implementations do
allow it. If not then you will get an error.
keys({dict}) *keys()*
Return a |List| with all the keys of {dict}. The |List| is in
@@ -6005,7 +6107,7 @@ setqflist({list} [, {action}]) *setqflist()*
*setreg()*
setreg({regname}, {value} [,{options}])
setreg({regname}, {value} [, {options}])
Set the register {regname} to {value}.
{value} may be any value returned by |getreg()|, including
a |List|.
@@ -7258,6 +7360,7 @@ gui_athena Compiled with Athena GUI.
gui_gnome Compiled with Gnome support (gui_gtk is also defined).
gui_gtk Compiled with GTK+ GUI (any version).
gui_gtk2 Compiled with GTK+ 2 GUI (gui_gtk is also defined).
gui_gtk3 Compiled with GTK+ 3 GUI (gui_gtk is also defined).
gui_mac Compiled with Macintosh GUI.
gui_macvim Compiled with MacVim GUI.
gui_motif Compiled with Motif GUI.
@@ -7323,7 +7426,6 @@ scrollbind Compiled with 'scrollbind' support.
showcmd Compiled with 'showcmd' support.
signs Compiled with |:sign| support.
smartindent Compiled with 'smartindent' support.
sniff Compiled with SNiFF interface support.
spell Compiled with spell checking support |spell|.
startuptime Compiled with |--startuptime| support.
statusline Compiled with support for 'statusline', 'rulerformat'
@@ -7361,7 +7463,6 @@ vms VMS version of Vim.
vreplace Compiled with |gR| and |gr| commands.
wildignore Compiled with 'wildignore' option.
wildmenu Compiled with 'wildmenu' option.
win16 Win16 version of Vim (MS-Windows 3.1).
win32 Win32 version of Vim (MS-Windows 95 and later, 32 or
64 bits)
win32unix Win32 version of Vim, using Unix files (Cygwin)
+8 -5
View File
@@ -25,8 +25,8 @@ Other GUI documentation:
First you must make sure you actually have a version of Vim with the GUI code
included. You can check this with the ":version" command, it says "with xxx
GUI", where "xxx" is Macvim, X11-Motif, X11-Athena, Photon, GTK, GTK2, etc.,
or "MS-Windows 32 bit GUI version".
GUI", where "xxx" is MacVim, X11-Motif, X11-Athena, Photon, GTK2, GTK3, etc., or
"MS-Windows 32 bit GUI version".
How to start the GUI depends on the system used. Mostly you can run the
GUI version of Vim with:
@@ -514,11 +514,14 @@ a menu entry. Hit <Enter> to execute it. Hit <Esc> if you want to cancel.
This does require the |+menu| feature enabled at compile time.
*tear-off-menus*
GTK+ and Motif support Tear-off menus. These are sort of sticky menus or
GTK+ 2 and Motif support Tear-off menus. These are sort of sticky menus or
pop-up menus that are present all the time. If the resizing does not work
correctly, this may be caused by using something like "Vim*geometry" in the
defaults. Use "Vim.geometry" instead.
As to GTK+ 3, tear-off menus have been deprecated since GTK+ 3.4.
Accordingly, they are disabled if gvim is linked against GTK+ 3.4 or later.
The Win32 GUI version emulates Motif's tear-off menus. Actually, a Motif user
will spot the differences easily, but hopefully they're just as useful. You
can also use the |:tearoff| command together with |hidden-menus| to create
@@ -650,8 +653,8 @@ When no or zero priority is given, 500 is used.
The priority for the PopUp menu is not used.
The Help menu will be placed on the far right side of the menu bar on systems
which support this (Motif and GTK+). For GTK+ 2, this is not done anymore
because right-aligning the Help menu is now discouraged UI design.
which support this (Motif and GTK+). For GTK+ 2 and 3, this is not done
anymore because right-aligning the Help menu is now discouraged UI design.
You can use a priority higher than 9999, to make it go after the Help menu,
but that is non-standard and is discouraged. The highest possible priority is
-186
View File
@@ -1,186 +0,0 @@
*gui_w16.txt* For Vim version 7.4. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Bram Moolenaar
Vim's Graphical User Interface *gui-w16* *win16-gui*
1. Starting the GUI |win16-start|
2. Vim as default editor |win16-default-editor|
3. Using the clipboard |win16-clipboard|
4. Shell Commands |win16-shell|
5. Special colors |win16-colors|
6. Windows dialogs & browsers |win16-dialogs|
7. Various |win16-various|
Other relevant documentation:
|gui.txt| For generic items of the GUI.
|os_msdos.txt| For items common to DOS and Windows.
|gui_w32.txt| Some items here are also applicable to the Win16 version.
{Vi does not have a Windows GUI}
The Win16 version of Vim will run on Windows 3.1 or later. It has not been
tested on 3.0, it probably won't work without being recompiled and
modified. (But you really should upgrade to 3.11 anyway. :)
In most respects it behaves identically to the Win32 GUI version, including
having a flat-style toolbar(!). The chief differences:
1) Bold/Italic text is not available, to speed up repaint/reduce resource
usage. (You can re-instate this by undefining MSWIN16_FASTTEXT.)
2) No tearoff menu emulation.
3) No OLE interface.
4) No long filename support (of course).
5) No tooltips on toolbar buttons - instead they produce command-line tips
like menu items do.
6) Line length limited to 32767 characters (like 16-bit DOS version).
==============================================================================
1. Starting the GUI *win16-start*
The Win16 GUI version of Vim will always start the GUI, no matter how you
start it or what it's called. There is no 'console' version as such, but you
can use one of the DOS versions in a DOS box.
The Win16 GUI has an extra menu item: "Window/Select Font". It brings up the
standard Windows font selector. Note that bold and italic fonts are not
supported in an attempt to maximize GDI drawing speed.
Setting the menu height doesn't work for the Win16 GUI.
*win16-maximized*
If you want Vim to start with a maximized window, add this command to your
vimrc or gvimrc file: >
au GUIEnter * simalt ~x
<
There is a specific version of gvim.exe that runs under the Win32s subsystem
of Windows 3.1 or 3.11. See |win32s|.
==============================================================================
2. Vim as default editor *win16-default-editor*
To set Vim as the default editor for a file type you can use File Manager's
"Associate" feature.
When you open a file in Vim by double clicking it, Vim changes to that
file's directory.
See also |notepad|.
==============================================================================
3. Using the clipboard *win16-clipboard*
Windows has a clipboard, where you can copy text to, and paste text from. Vim
supports this in several ways.
The clipboard works in the same way as the Win32 version: see |gui-clipboard|.
==============================================================================
4. Shell Commands *win16-shell*
Vim spawns a DOS window for external commands, to make it possible to run any
DOS command. The window uses the _default.pif settings.
*win16-!start*
Normally, Vim waits for a command to complete before continuing (this makes
sense for most shell commands which produce output for Vim to use). If you
want Vim to start a program and return immediately, you can use the following
syntax:
:!start {command}
This may only work for a Windows program though.
Don't forget that you must tell Windows 3.1x to keep executing a DOS command
in the background while you switch back to Vim.
==============================================================================
5. Special colors *win16-colors*
On Win16, the normal DOS colors can be used. See |dos-colors|.
Additionally the system configured colors can also be used. These are known
by the names Sys_XXX, where XXX is the appropriate system color name, from the
following list (see the Win32 documentation for full descriptions). Case is
ignored.
Sys_BTNFace Sys_BTNShadow Sys_ActiveBorder
Sys_ActiveCaption Sys_AppWorkspace Sys_Background
Sys_BTNText Sys_CaptionText Sys_GrayText
Sys_Highlight Sys_HighlightText Sys_InactiveBorder
Sys_InactiveCaption Sys_InactiveCaptionText Sys_Menu
Sys_MenuText Sys_ScrollBar Sys_Window
Sys_WindowFrame Sys_WindowText
Probably the most useful values are
Sys_Window Normal window background
Sys_WindowText Normal window text
Sys_Highlight Highlighted background
Sys_HighlightText Highlighted text
These extra colors are also available:
Gray, Grey, LightYellow, SeaGreen, Orange, Purple, SlateBlue, Violet,
See also |rgb.txt|.
==============================================================================
*win16-dialogs*
6. Windows dialogs & browsers
The Win16 GUI can use familiar Windows components for some operations, as well
as the traditional interface shared with the console version.
6.1 Dialogs
The dialogs displayed by the "confirm" family (i.e. the 'confirm' option,
|:confirm| command and |confirm()| function) are GUI-based rather than the
console-based ones used by other versions. There is no option to change this.
6.2 File Browsers
When prepending ":browse" before file editing commands, a file requester is
used to allow you to select an existing file. See |:browse|.
==============================================================================
7. Various *win16-various*
*win16-printing*
The "File/Print" menu uses Notepad to print the current buffer. This is a bit
clumsy, but it's portable. If you want something else, you can define your
own print command. For example, you could look for the 16-bit version of
PrintFile. See $VIMRUNTIME/menu.vim for how it works by default.
Using this should also work: >
:w >>prn
Vim supports a number of standard MS Windows features. Some of these are
detailed elsewhere: see |'mouse'|, |win32-hidden-menus|.
Also see |:simalt|
*win16-drag-n-drop*
You can drag and drop one or more files into the vim window, where they will
be opened as normal. If you hold down Shift while doing this, Vim changes to
the (first) dropped file's directory. If you hold Ctrl, Vim will always split
a new window for the file. Otherwise it's only done if the current buffer has
been changed.
You can also drop a directory's icon, but rather than open all files in the
directory (which wouldn't usually be what you want) Vim instead changes to
that directory and begins a new file.
If Vim happens to be editing a command line, the names of the dropped files
and directories will be inserted at the cursor. This allows you to use these
names with any Ex command.
*win16-truetype*
It is recommended that you use a raster font and not a TrueType
fixed-pitch font. E.g. use Courier, not Courier New. This is not just
to use less resources but because there are subtle bugs in the
handling of fixed-pitch TrueType in Win3.1x. In particular, when you move
a block cursor over a pipe character '|', the cursor is drawn in the wrong
size and bits get left behind. This is a bug in the Win3.1x GDI, it doesn't
happen if you run the exe under 95/NT.
vim:tw=78:sw=4:ts=8:ft=help:norl:
+10
View File
@@ -378,6 +378,16 @@ Write this in the file ~/.gtkrc and it will be used by GTK+. For GTK+ 2
you might have to use the file ~/.gtkrc-2.0 instead, depending on your
distribution.
For GTK+ 3, an effect similar to the above can be obtained by adding the
following snippet of CSS code to $XDG_HOME_DIR/gtk-3.0/gtk.css (usually,
$HOME/.config/gtk-3.0/gtk.css):
>
.tooltip {
background-color: #ffffcc;
color: #000000;
}
<
Using Vim as a GTK+ plugin *gui-gtk-socketid*
When the GTK+ version of Vim starts up normally, it creates its own top level
+1 -3
View File
@@ -1,4 +1,4 @@
*help.txt* For Vim version 7.4. Last change: 2016 Jan 10
*help.txt* For Vim version 7.4. Last change: 2016 Feb 27
VIM - main help file
k
@@ -155,7 +155,6 @@ Special issues ~
GUI ~
|gui.txt| Graphical User Interface (GUI)
|gui_w16.txt| Windows 3.1 GUI
|gui_w32.txt| Win32 GUI
|gui_x11.txt| X11 GUI
|gui_mac.txt| MacVim GUI
@@ -166,7 +165,6 @@ Interfaces ~
|if_mzsch.txt| MzScheme interface
|if_perl.txt| Perl interface
|if_pyth.txt| Python interface
|if_sniff.txt| SNiFF+ interface
|if_tcl.txt| Tcl interface
|if_ole.txt| OLE automation interface for Win32
|if_ruby.txt| Ruby interface
+3 -87
View File
@@ -1,95 +1,11 @@
*if_sniff.txt* For Vim version 7.4. Last change: 2005 Mar 29
*if_sniff.txt* For Vim version 7.4. Last change: 2016 Feb 27
VIM REFERENCE MANUAL
by Anton Leherbauer (toni@takefive.co.at)
SNiFF+ and Vim *sniff*
1. Introduction |sniff-intro|
2. Commands |sniff-commands|
3. Compiling Vim with SNiFF+ interface |sniff-compiling|
{Vi does not have any of these commands} *E275* *E274* *E276* *E278* *E279*
The SNiFF+ interface only works, when Vim was compiled with the |+sniff|
feature.
==============================================================================
1. Introduction *sniff-intro*
The following features for the use with SNiFF+ are available:
* Vim can be used for all editing requests
* SNiFF+ recognizes and updates all browsers when a file is saved in Vim
* SNiFF+ commands can be issued directly from Vim
How to use Vim with SNiFF+
1. Make sure SNiFF+ is running.
2. In the Editor view of the Preferences dialog set the Field named
'External Editor' to 'Emacs/Vim'.
4. Start Vim
5. Connect to SNiFF+ (:sniff connect)
Once a connection is established, SNiFF+ uses Vim for all requests to show or
edit source code. On the other hand, you can send queries to SNiFF+ with the
:sniff command.
==============================================================================
2. Commands *sniff-commands*
*:sniff* *:sni*
:sni[ff] request [symbol] Send request to sniff with optional symbol.
{not in Vi}
:sni[ff] Display all possible requests and the connection
status
Most requests require a symbol (identifier) as parameter. If it is omitted,
Vim will use the current word under the cursor.
The available requests are listed below:
request mapping description
-------------------------------------------------------------------------------
connect sc Establish connection with SNiFF+.
Make sure SNiFF+ is prepared for this in the
Preferences
disconnect sq Disconnect from SNiFF+. You can reconnect any
time with :sniff connect (or 'sc')
toggle st Toggle between implementation
and definition file
find-symbol sf Load the symbol into a Symbol Browser
browse-class sb Loads the class into a Class Browser
superclass ss Edit superclass of symbol
overridden so Edit overridden method of symbol
retrieve-file srf Retrieve symbol in current file
retrieve-project srp Retrieve symbol in current project
retrieve-all-projects srP Retrieve symbol in all projects
retrieve-next sR Retrieve symbol using current Retriever
settings
goto-symbol sg Goto definition or implementation of symbol
hierarchy sh Load symbol into the Hierarchy Browser
restr-hier sH same as above but show only related classes
xref-to sxt Start a refers-to query on symbol and
load the results into the Cross Referencer
xref-by sxb Start a referred-by query on symbol
xref-has sxh Start a refers-to components query on symbol
xref-used-by sxu Start a referred-by as component query on
symbol
show-docu sd Show documentation of symbol
gen-docu sD Generate documentation of symbol
The mappings are defined in a file 'sniff.vim', which is part of every SNiFF+
product ($SNIFF_DIR/config/sniff.vim). This file is sourced whenever Vim
connects to SNiFF+.
==============================================================================
3. Compiling Vim with SNiFF+ interface *sniff-compiling*
To compile Vim with SNiFF+ support, you need two source files of the extra
archive: if_sniff.c and if_sniff.h.
On Unix: Edit the Makefile and uncomment the line "--enable-sniff". Or run
configure manually with this argument.
On NT: Specify SNIFF=yes with your make command.
The SNiFF+ support was removed at patch 7.4.1433. If you want to check it out
sync to before that.
vim:tw=78:ts=8:ft=help:norl:
+2 -2
View File
@@ -1,4 +1,4 @@
*index.txt* For Vim version 7.4. Last change: 2016 Jan 19
*index.txt* For Vim version 7.4. Last change: 2016 Feb 27
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1324,6 +1324,7 @@ tag command action ~
|:lnfile| :lnf[ile] go to first location in next file
|:lnoremap| :ln[oremap] like ":noremap!" but includes Lang-Arg mode
|:loadkeymap| :loadk[eymap] load the following keymaps until EOF
|:loadplugin| :loadp[lugin] load a plugin from 'packpath'
|:loadview| :lo[adview] load view for current window from a file
|:lockmarks| :loc[kmarks] following command keeps marks where they are
|:lockvar| :lockv[ar] lock variables
@@ -1500,7 +1501,6 @@ tag command action ~
|:smile| :smi[le] make the user happy
|:snext| :sn[ext] split window and go to next file in the
argument list
|:sniff| :sni[ff] send request to sniff
|:snomagic| :sno[magic] :substitute with 'nomagic'
|:snoremap| :snor[emap] like ":noremap" but for Select mode
|:snoremenu| :snoreme[nu] like ":noremenu" but for Select mode
+1 -3
View File
@@ -1,4 +1,4 @@
*message.txt* For Vim version 7.4. Last change: 2013 Feb 23
*message.txt* For Vim version 7.4. Last change: 2016 Feb 27
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -476,8 +476,6 @@ in memory, you can reduce that with these options:
helps for a change that affects all lines.
- 'undoreload' Set to zero to disable.
Also see |msdos-limitations|.
*E339* >
Pattern too long
+3 -1
View File
@@ -1,4 +1,4 @@
*netbeans.txt* For Vim version 7.4. Last change: 2016 Jan 31
*netbeans.txt* For Vim version 7.4. Last change: 2016 Feb 18
VIM REFERENCE MANUAL by Gordon Prieur et al.
@@ -194,6 +194,8 @@ There are two different ways to run Vim in NetBeans mode:
+ an IDE may start Vim with the |-nb| command line argument
+ NetBeans can be started from within Vim with the |:nbstart| command
Vim uses a 3 second timeout on trying to make the connection.
*netbeans-parameters*
Three forms can be used to setup the NetBeans connection parameters.
When started from the command line, the |-nb| command line argument may be:
+10 -13
View File
@@ -1,4 +1,4 @@
*options.txt* For Vim version 7.4. Last change: 2016 Feb 12
*options.txt* For Vim version 7.4. Last change: 2016 Feb 24
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1216,10 +1216,7 @@ A jump table for the options with a short description can be found at |Q_op|.
'bioskey' 'biosk' boolean (default on)
global
{not in Vi} {only for MS-DOS}
When on the BIOS is called to obtain a keyboard character. This works
better to detect CTRL-C, but only works for the console. When using a
terminal over a serial port reset this option.
Also see |'conskey'|.
This was for MS-DOS and is no longer supported.
*'blurradius'* *'blur'*
'blurradius' 'blur' number (default 0)
@@ -1959,13 +1956,7 @@ A jump table for the options with a short description can be found at |Q_op|.
'conskey' 'consk' boolean (default off)
global
{not in Vi} {only for MS-DOS}
When on direct console I/O is used to obtain a keyboard character.
This should work in most cases. Also see |'bioskey'|. Together,
three methods of console input are available:
'conskey' 'bioskey' action ~
on on or off direct console input
off on BIOS
off off STDIN
This was for MS-DOS and is no longer supported.
*'copyindent'* *'ci'* *'nocopyindent'* *'noci'*
'copyindent' 'ci' boolean (default off)
@@ -1982,7 +1973,7 @@ A jump table for the options with a short description can be found at |Q_op|.
NOTE: 'copyindent' is reset when 'compatible' is set.
Also see 'preserveindent'.
*'cpoptions'* *'cpo'*
*'cpoptions'* *'cpo'* *cpo*
'cpoptions' 'cpo' string (Vim default: "aABceFs",
Vi default: all flags)
global
@@ -5545,6 +5536,12 @@ A jump table for the options with a short description can be found at |Q_op|.
This option was supported on RISC OS, which has been removed.
*'packpath'* *'pp'*
'packpath' 'pp' string (default: see 'runtimepath')
{not in Vi}
Directories used to find packages. See |packages|.
*'paragraphs'* *'para'*
'paragraphs' 'para' string (default "IPLPPPQPP TPHPLIPpLpItpplpipbp")
global
+1 -2
View File
@@ -1,4 +1,4 @@
*os_390.txt* For Vim version 7.4. Last change: 2010 May 30
*os_390.txt* For Vim version 7.4. Last change: 2016 Feb 27
VIM REFERENCE MANUAL by Ralf Schandl
@@ -108,7 +108,6 @@ Never tested:
- Langmap (|'langmap'|)
- Python support (|Python|)
- Right-to-left mode (|'rightleft'|)
- SNiFF+ interface (|sniff|)
- TCL interface (|tcl|)
...
+2
View File
@@ -94,6 +94,7 @@ Shift-Insert paste text (from clipboard) *<S-Insert>*
CTRL-Insert copy Visual text (to clipboard) *<C-Insert>*
CTRL-Del cut Visual text (to clipboard) *<C-Del>*
Shift-Del cut Visual text (to clipboard) *<S-Del>*
CTRL-X cut Visual text (to clipboard)
These mappings accomplish this (Win32 and DJGPP versions of Vim):
@@ -102,6 +103,7 @@ Shift-Insert <M-N><M-T> "*P "-d"*P <C-R><C-O>*
CTRL-Insert <M-N><M-U> "*y
Shift-Del <M-N><M-W> "*d
CTRL-Del <M-N><M-X> "*d
CTRL-X <C-X> "*d
Or these mappings (non-Win32 version of Vim):
+6 -267
View File
@@ -1,276 +1,15 @@
*os_msdos.txt* For Vim version 7.4. Last change: 2005 Mar 29
*os_msdos.txt* For Vim version 7.4. Last change: 2016 Feb 26
VIM REFERENCE MANUAL by Bram Moolenaar
*msdos* *ms-dos* *MSDOS* *MS-DOS*
This file contains the particularities for the MS-DOS version of Vim.
This file used to contain the particularities for the MS-DOS version of Vim.
MS-DOS support was removed in patch 7.4.1399. If you want to use it you will
need to get a version older than that. Note that the MS-DOS version doesn't
work, there is not enough memory. The DOS32 version (using DJGPP) might still
work on older systems.
1. Two versions for MS-DOS |msdos-versions|
2. Known problems |msdos-problems|
3. Long file names |msdos-longfname|
4. Termcap codes |msdos-termcap|
5. Shifted arrow keys |msdos-arrows|
6. Filename extensions |msdos-fname-extensions|
7. Memory usage and limitations |msdos-limitations|
8. Symbolically linked files |msdos-linked-files|
9. Copy/paste in a dos box |msdos-copy-paste|
Additionally, there are a number of common Win32 and DOS items:
File locations |dos-locations|
Using backslashes |dos-backslash|
Standard mappings |dos-standard-mappings|
Screen output and colors |dos-colors|
File formats |dos-file-formats|
:cd command |dos-:cd|
Interrupting |dos-CTRL-Break|
Temp files |dos-temp-files|
Shell option default |dos-shell|
For compiling Vim see src/INSTALL.pc. *msdos-compiling*
==============================================================================
1. Two versions for MS-DOS *msdos-versions*
There are two versions of Vim that can be used with MS-DOS machines:
*dos16*
Dos16 version Can be used on any MS-DOS system, only uses up to 640 Kbyte of
memory. Also runs on OS/2, Windows 95, and NT. Excludes some
Vim-specific features (autocommands, syntax highlighting,
etc.). Recommended for use on pre-386 machines.
*dos32*
Dos32 version Requires 386 processor and a |DPMI| driver, uses all
available memory. Supports long file names and the Windows
clipboard, but NOT on Windows NT. Recommended for MS-DOS,
Windows 3.1 and Windows 95.
There are also two versions that run under Windows:
Win32 version Requires Windows 95 or Windows NT, uses all available
memory, supports long file names, etc. Has some problems on
Windows 95. Recommended for Windows NT. See |os_win32.txt|
Win32 GUI Requirements like the Win32 version, but runs in its own
window, instead of a console. Has scrollbars, menu, etc.
Recommended for Windows 95 and Windows NT. See |gui-w32|.
It is recommended to use the Dos32 or Win32 version. Although the Dos16
version is able to edit very big files, it quickly runs out of memory when
making big changes. Disabling undo helps: ":set ul=-1". The screen updating
of the Dos16 version is the fastest of the three on DOS or Windows 95; on
Windows NT, the Win32 version is just as fast.
*DPMI*
For the Dos32 version, you may need a DPMI driver when running in MS-DOS. If
you are running Windows or installed a clever memory manager, it will probably
work already. If you get the message "No DPMI", you need to install a DPMI
driver. Such a driver is included with the executable in CSDPMI4B.ZIP. Run
"cwsdpmi" just before starting Vim each time. Or you might want to include
"cwsdpmi -p" in your autoexec.bat to make it resident. The latest version of
"CSDPMI*.ZIP" can be obtained from: "ftp.neosoft.com:pub/users/s/sandmann".
*minimal-features*
The 16 bit DOS version has been compiled with minimal features. Check the
|+feature-list| which ones are included (marked with a "T").
You can include more features by editing feature.h and recompiling.
==============================================================================
2. Known problems *msdos-problems*
When using smartdrive (MS-DOS 6.x) with write-behind caching, it is possible
that Vim will try to create a swap file on a read-only file system (e.g.
write protected floppy). You will then be given the message >
A serious disk error has occurred .., Retry (r)?
There is nothing you can do but unprotect the floppy or switch off the
computer. Even CTRL-ALT-DEL will not get you out of this. This is really a
problem of smartdrive, not Vim. Smartdrive works fine otherwise. If this
bothers you, don't use the write-behind caching.
Vim can't read swap files that have been opened already, unless the "share"
command has been used. If you see stray warnings for existing swap files,
include the "share" command in your config.sys or autoexec.bat (see your MSDOS
documentation).
The Dos16 version can only have about 10 files open (in a window or hidden) at
one time. With more files you will get error messages when trying to read or
write a file, and for filter commands. Or Vim runs out of memory, and random
problems may result.
The Dos32 version cannot have an unlimited number of files open at any one
time. The limit depends on the setting of FILES in your CONFIG.SYS. This
defaults to 15; if you need to edit a lot of files, you should increase this.
If you do not set FILES high enough, you can get strange errors, and shell
commands may cause a crash!
The Dos32 version can work with long file names. When doing file name
completion, matches for the short file name will also be found. But this will
result in the corresponding long file name. For example, if you have the long
file name "this_is_a_test" with the short file name "this_i~1", the command
":e *1" will start editing "this_is_a_test".
When using the Dos32 version and you run into problems with DPMI support,
check if there is a program in your config.sys that eats resources. One
program known to cause this problem is "netx", which says "NetWare v. 3.26
Workstation shell". Replace it with version 3.32 to fix the problem.
The Dos32 version will parse its arguments to handle quotation. This is good
to edit a file with spaces in its name, for example: >
vim "program files\accessories\ppp.scp"
A side effect is that single quotes are removed. Insert a backslash to avoid
that. For example, to edit the file "fi'le.txt": >
vim fi\'le.txt
==============================================================================
3. Long file names *msdos-longfname*
If the Dos32 version is run on Windows 95, it can use long file names. It
will work by default. If you want to disable this, use this setting:
set LFN=N
You can put this in your autoexec.bat file.
Note: If you have installed DJGPP on your machine, you probably have a
"djgpp.env" file, which contains "LFN=n". You need to use "LFN=Y" to switch
on using long file names then.
==============================================================================
4. Termcap codes *msdos-termcap*
If you want to use another output method (e.g., when using a terminal on a COM
port), set the terminal name to "pcansi". You can change the termcap options
when needed (see |terminal-options|). Note that the
normal IBM ansi.sys does not support all the codes of the builtin pcansi
terminal. If you use ansi.sys, you will need to delete the termcap entries
t_al and t_dl with >
:set t_al= t_dl=
Otherwise, the screen will not be updated correctly. It is better to use
nansi.sys, nnansi.sys, or the like instead of ansi.sys.
If you want to use Vim on a terminal connected to a COM: port, reset the
'bioskey' option. Otherwise the commands will be read from the PC keyboard.
CTRL-C and CTRL-P may not work correctly with 'bioskey' reset.
==============================================================================
5. Shifted arrow keys *msdos-arrows*
Use CTRL-arrow-left and CTRL-arrow-right instead of SHIFT-arrow-left and
SHIFT-arrow-right. The arrow-up and arrow-down cannot be used with SHIFT or
CTRL.
==============================================================================
6. Filename extensions *msdos-fname-extensions*
MS-DOS allows for only one file name extension. Therefore, when appending an
extension, the '.' in the original file name is replaced with a '_', the name
is truncated to 8 characters, and the new extension (e.g., ".swp") is
appended. Two examples: "test.c" becomes "test_c.bak", "thisisat.est"
becomes "thisisat.bak". To reduce these problems, the default for
'backupext' is "~" instead of ".bak". The backup file for "thisisat.est"
then becomes "thisisat.es~". The 'shortname' option is not available,
because it would always be set.
==============================================================================
7. Memory usage and limitations *msdos-limitations*
A swap file is used to store most of the text. You should be able to edit
very large files. However, memory is used for undo and other things. If you
delete a lot of text, you can still run out of memory in the Dos16 version.
If Vim gives an "Out of memory" warning, you should stop editing. The result
of further editing actions is unpredictable. Setting 'undolevels' to 0 saves
some memory. Running the maze macros on a big maze is guaranteed to run out
of memory, because each change is remembered for undo. In this case set
'undolevels' to a negative number. This will switch off undo completely.
*msdos-clipboard-limits*
In the Dos32 version, extended memory is used to avoid these problems.
However, if you are using the clipboard, you can still run into memory
limitations because the Windows clipboard can only communicate with Vim using
Dos memory. This means that the largest amount of text that can be sent to
or received from the Windows clipboard is limited by how much free Dos memory
is available on your system.
You can usually maximize the amount of available Dos memory by adding the
following lines to Dos's "config.sys" file: >
DOS=HIGH,UMB
DEVICE=C:\WINDOWS\himem.sys
DEVICE=C:\WINDOWS\emm386.exe RAM
Modifying config.sys in this way will also help to make more memory available
for the Dos16 version, if you are using that.
In the Dos16 version the line length is limited to about 32000 characters.
When reading a file the lines are automatically split. But editing a line
in such a way that it becomes too long may give unexpected results.
==============================================================================
8. Symbolically linked files *msdos-linked-files*
When using Vim to edit a symbolically linked file on a unix NFS file server,
you may run into problems. When writing the file, Vim does not "write
through" the symlink. Instead, it deletes the symbolic link and creates a new
file in its place.
On Unix, Vim is prepared for links (symbolic or hard). A backup copy of the
original file is made and then the original file is overwritten. This assures
that all properties of the file remain the same. On non-Unix systems, the
original file is renamed and a new file is written. Only the protection bits
are set like the original file. However, this doesn't work properly when
working on an NFS-mounted file system where links and other things exist. The
only way to fix this in the current version is not making a backup file, by
":set nobackup nowritebackup" |'writebackup'|
A similar problem occurs when mounting a Unix filesystem through Samba or a
similar system. When Vim creates a new file it will get the default user ID
for the mounted file system. This may be different from the original user ID.
To avoid this set the 'backupcopy' option to "yes".
==============================================================================
9. Copy/paste in a dos box *msdos-copy-paste*
*E450* *E451* *E452* *E453* *E454*
The 32 bit version can copy/paste from/to the Windows clipboard directly. Use
the "* register. Large amounts of text can be copied this way, but it must be
possible to allocate memory for it, see |msdos-clipboard-limits|. When moving
text from one Vim to another, the type of the selection
(characterwise/linewise/blockwise) is passed on.
In other versions, the following can be used.
(posted to comp.editors by John Velman <velman@igate1.hac.com>)
How to copy/paste text from/to vim in a dos box:
1) To get VIM to run in a window, instead of full screen, press alt+enter.
This toggles back and forth between full screen and a dos window.
NOTE: In Windows 95 you must have the property "Fast Pasting" unchecked!
In the properties dialog box for the MS-DOS window, go to "MS-DOS
Prompt/Misc/Fast pasting" and make sure that it is NOT checked.
To make this permanent, change the properties for
"\windows\system\conagent.exe" (from Philip Nelson, unverified).
2) To paste something _into_ Vim, put Vim in insert mode.
3) Put the text you want to paste on the windows clipboard.
4) Click the control box in the upper left of the Vim window. (This looks
like a big minus sign.) If you don't want to use the mouse, you can get
this with alt+spacebar.
5) On the resulting dropdown menu choose "Edit".
6) On the child dropdown menu choose "Paste".
To copy something from the Vim window to the clipboard,
1) Select the control box to get the control drop down menu.
2) Select "Edit".
3) Select "Mark".
4) Using either the keys or the mouse, select the part of the Vim window that
you want to copy. To use the keys, use the arrow keys, and hold down shift
to extend the selection.
5) When you've completed your selection, press 'enter'. The selection
is now in the windows clipboard. By the way, this can be any
rectangular selection, for example columns 4-25 in rows 7-10. It can
include anything in the VIM window: the output of a :!dir, for
example.
vim:tw=78:ts=8:ft=help:norl:
+115 -27
View File
@@ -1,4 +1,4 @@
*pi_netrw.txt* For Vim version 7.4. Last change: 2015 Oct 31
*pi_netrw.txt* For Vim version 7.4. Last change: 2016 Feb 16
------------------------------------------------
NETRW REFERENCE MANUAL by Charles E. Campbell
@@ -6,7 +6,7 @@
Author: Charles E. Campbell <NdrOchip@ScampbellPfamily.AbizM>
(remove NOSPAM from Campbell's email first)
Copyright: Copyright (C) 1999-2015 Charles E Campbell *netrw-copyright*
Copyright: Copyright (C) 2016 Charles E Campbell *netrw-copyright*
The VIM LICENSE applies to the files in this package, including
netrw.vim, pi_netrw.txt, netrwFileHandlers.vim, netrwSettings.vim, and
syntax/netrw.vim. Like anything else that's free, netrw.vim and its
@@ -48,9 +48,10 @@ Copyright: Copyright (C) 1999-2015 Charles E Campbell *netrw-copyright*
Introduction To Browsing............................|netrw-intro-browse|
Quick Reference: Maps...............................|netrw-browse-maps|
Quick Reference: Commands...........................|netrw-browse-cmds|
Banner Display......................................|netrw-I|
Bookmarking A Directory.............................|netrw-mb|
Browsing............................................|netrw-cr|
Squeezing the Current Tree-Listing Directory......|:netrw-s-cr|
Squeezing the Current Tree-Listing Directory........|netrw-s-cr|
Browsing With A Horizontally Split Window...........|netrw-o|
Browsing With A New Tab.............................|netrw-t|
Browsing With A Vertically Split Window.............|netrw-v|
@@ -75,11 +76,13 @@ Copyright: Copyright (C) 1999-2015 Charles E Campbell *netrw-copyright*
Making The Browsing Directory The Current Directory.|netrw-c|
Marking Files.......................................|netrw-mf|
Unmarking Files.....................................|netrw-mF|
Marking Files By Location List......................|netrw-qL|
Marking Files By QuickFix List......................|netrw-qF|
Marking Files By Regular Expression.................|netrw-mr|
Marked Files: Arbitrary Shell Command...............|netrw-mx|
Marked Files: Arbitrary Shell Command, En Bloc......|netrw-mX|
Marked Files: Arbitrary Vim Command.................|netrw-mv|
Marked Files: Argument List.........................|netrw-ma| |netrw-mA|
Marked Files: Compression And Decompression.........|netrw-mz|
Marked Files: Copying...............................|netrw-mc|
Marked Files: Diff..................................|netrw-md|
@@ -1113,6 +1116,7 @@ QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2
qb List bookmarked directories and history |netrw-qb|
qf Display information on file |netrw-qf|
qF Mark files using a quickfix list |netrw-qF|
qL Mark files using a |location-list| |netrw-qL|
r Reverse sorting order |netrw-r|
R Rename the designated file(s)/directory(ies) |netrw-R|
s Select sorting style: by name, time, or file size |netrw-s|
@@ -1162,6 +1166,14 @@ QUICK REFERENCE: COMMANDS *netrw-explore-cmds* *netrw-browse-cmds* {{{2
:Texplore[!] [dir] Tab & Explore..........................|netrw-explore|
:Vexplore[!] [dir] Vertical Split & Explore...............|netrw-explore|
BANNER DISPLAY *netrw-I*
One may toggle the banner display on and off by pressing "I".
Also See: |g:netrw_banner|
BOOKMARKING A DIRECTORY *netrw-mb* *netrw-bookmark* *netrw-bookmarks* {{{2
One may easily "bookmark" the currently browsed directory by using >
@@ -1203,7 +1215,7 @@ Related Topics:
|g:netrw_home| controls where .netrwbook is kept
BROWSING *netrw-cr* {{{2
BROWSING *netrw-enter* *netrw-cr* {{{2
Browsing is simple: move the cursor onto a file or directory of interest.
Hitting the <cr> (the return key) will select the file or directory.
@@ -1244,11 +1256,21 @@ The price for such re-use is that when changes are made (such as new files
are introduced into a directory), the listing may become out-of-date. One may
always refresh directory listing buffers by pressing ctrl-L (see
|netrw-ctrl-l|).
*:netrw-s-cr*
Squeezing the Current Tree-Listing Directory~
When the tree listing style is enabled (see |netrw-i|) and one is using
gvim, then the <s-cr> mapping may be used to squeeze (close) the
directory currently containing the cursor.
*netrw-s-cr*
Squeezing the Current Tree-Listing Directory~
When the tree listing style is enabled (see |netrw-i|) and one is using
gvim, then the <s-cr> mapping may be used to squeeze (close) the
directory currently containing the cursor.
Otherwise, one may remap a key combination of one's own choice to get
this effect: >
nmap <buffer> <silent> <nowait> YOURKEYCOMBO <Plug>NetrwTreeSqueeze
<
Put this line in $HOME/ftplugin/netrw/netrw.vim; it needs to be generated
for netrw buffers only.
Related topics:
|netrw-ctrl-r| |netrw-o| |netrw-p|
@@ -1497,7 +1519,8 @@ One may also use visual mode (see |visual-start|) to select the text that the
special handler will use. Normally gx uses expand("<cfile>") to pick up the
text under the cursor; one may change what |expand()| uses via the
|g:netrw_gx| variable. Alternatively, one may select the text to be used by
gx via first making a visual selection (see |visual-block|).
gx via first making a visual selection (see |visual-block|) or by changing
the |'isfname'| option (which is global, so netrw doesn't modify it).
Associated setting variables:
|g:netrw_gx| control how gx picks up the text under the cursor
@@ -1715,8 +1738,9 @@ Also see: |g:netrw_alto| |g:netrw_altv| |g:netrw_winsize|
EXPLORING WITH STARS AND PATTERNS {{{2
When Explore, Sexplore, Hexplore, or Vexplore are used with one of the
following four patterns Explore generates a list of files which satisfy
the request. >
following four patterns Explore generates a list of files which satisfy the
request for the local file system. These exploration patterns will not work
with remote file browsing.
*/filepat files in current directory which satisfy filepat
**/filepat files in current directory or below which satisfy the
@@ -2081,15 +2105,22 @@ Netrw provides several ways to mark files:
:MF *.c
<
* Note that :MF uses |<f-args>| to break the line
at spaces.
(Note that :MF uses |<f-args>| to break the line
at spaces)
* Mark files using the |argument-list| (|netrw-mA|)
* Mark files based upon a |location-list| (|netrw-qL|)
* Mark files based upon the quickfix list (|netrw-qF|)
(|quickfix-error-lists|)
The following netrw maps make use of marked files:
|netrw-a| Hide marked files/directories
|netrw-D| Delete marked files/directories
|netrw-ma| Move marked files' names to |arglist|
|netrw-mA| Move |arglist| filenames to marked file list
|netrw-mb| Append marked files to bookmarks
|netrw-mB| Delete marked files from bookmarks
|netrw-mc| Copy marked files to target
@@ -2148,8 +2179,14 @@ UNMARKING FILES *netrw-mF* {{{2
The "mF" command will unmark all files in the current buffer. One may also use
mf (|netrw-mf|) on a specific, already marked, file to unmark just that file.
MARKING FILES BY LOCATION LIST *netrw-qL* {{{2
(also see |netrw-mf|)
MARKING FILES BY QUICKFIX LIST *netrw-qF* {{{2
One may convert |location-list|s into a marked file list using "qL".
You may then proceed with commands such as me (|netrw-me|) to edit them.
MARKING FILES BY QUICKFIX LIST *netrw-qF* {{{2
(also see |netrw-mf|)
One may convert |quickfix-error-lists| into a marked file list using "qF".
@@ -2225,6 +2262,16 @@ The command that will be run with this example:
tar cf mynewtarball.tar 'file1' 'file2' ...
MARKED FILES: ARGUMENT LIST *netrw-ma* *netrw-mA*
(See |netrw-mf| and |netrw-mr| for how to mark files)
(uses the global marked-file list)
Using ma, one moves filenames from the marked file list to the argument list.
Using mA, one moves filenames from the argument list to the marked file list.
See Also: |netrw-qF| |argument-list| |:args|
MARKED FILES: COMPRESSION AND DECOMPRESSION *netrw-mz* {{{2
(See |netrw-mf| and |netrw-mr| for how to mark files)
(uses the local marked file list)
@@ -2234,7 +2281,7 @@ If any marked files are decompressed, then "mz" will compress them
using the command specified by |g:netrw_compress|; by default,
that's "gzip".
For decompression, netrw provides a |Dictionary| of suffices and their
For decompression, netrw uses a |Dictionary| of suffices and their
associated decompressing utilities; see |g:netrw_decompress|.
Remember that one can mark multiple files by regular expression
@@ -2289,7 +2336,7 @@ The command will ask for the requested pattern; one may then enter: >
pattern
<
With /pattern/, editing will start with the first item on the |quickfix| list
that vimgrep sets up (see |:copen|, |:cnext|, |:cprevious|). The |:vimgrep|
that vimgrep sets up (see |:copen|, |:cnext|, |:cprevious|, |:cclose|). The |:vimgrep|
command is in use, so without 'g' each line is added to quickfix list only
once; with 'g' every match is included.
@@ -2758,6 +2805,16 @@ your browsing preferences. (see also: |netrw-settings|)
evaluation will be suppressed
(see |'ballooneval'|)
*g:netrw_sizestyle* not defined: actual bytes (default)
="b" : actual bytes (default)
="h" : human-readable (ex. 5k, 4m, 3g)
uses 1000 base
="H" : human-readable (ex. 5K, 4M, 3G)
uses 1024 base
The long listing (|netrw-i|) and query-file
maps (|netrw-qf|) will display file size
using the specified style.
*g:netrw_usetab* if this variable exists and is non-zero, then
the <tab> map supporting shrinking/expanding a
Lexplore or netrw window will be enabled.
@@ -3026,14 +3083,14 @@ These will:
Related: if you like this idea, you may also find :Lexplore
(|netrw-:Lexplore|) or |g:netrw_chgwin| of interest
Also see: |g:netrw_chgwin| |netrw-P| |'previewwindow'|
Also see: |g:netrw_chgwin| |netrw-P| |'previewwindow'| |CTRL-W_z| |:pclose|
PREVIOUS WINDOW *netrw-P* *netrw-prvwin* {{{2
To edit a file or directory in the previously used (last accessed) window (see
:he |CTRL-W_p|), press a "P". If there's only one window, then the one window
will be horizontally split (by default).
To edit a file or directory under the cursor in the previously used (last
accessed) window (see :he |CTRL-W_p|), press a "P". If there's only one
window, then the one window will be horizontally split (by default).
If there's more than one window, the previous window will be re-used on
the selected file/directory. If the previous window's associated buffer
@@ -3172,7 +3229,7 @@ only if your terminal supports differentiating <c-tab> from a plain
* Else bring up a |:Lexplore| window
If |g:netrw_usetab| exists or is zero, or if there is a pre-existing mapping
for <c-tab>, then the <tab> will not be mapped. One may map something other
for <c-tab>, then the <c-tab> will not be mapped. One may map something other
than a <c-tab>, too: (but you'll still need to have had g:netrw_usetab set) >
nmap <unique> (whatever) <Plug>NetrwShrink
@@ -3639,13 +3696,13 @@ called netrw.vimrc with the following contents: >
<
Then run netrw as follows: >
vim -u netrw.vimrc --noplugins [some path here]
vim -u netrw.vimrc --noplugins -i NONE [some path here]
<
Perform whatever netrw commands you need to, and check that the problem is
still present. This procedure sidesteps any issues due to personal .vimrc
settings and other plugins. If the problem does not appear, then you need
to determine what setting in your .vimrc is causing the conflict with netrw
or which plugin.
settings, .viminfo file, and other plugins. If the problem does not appear,
then you need to determine which setting in your .vimrc is causing the
conflict with netrw or which plugin(s) is/are involved.
Step 3: If the problem still is present, then get a debugging trace from
netrw:
@@ -3700,6 +3757,37 @@ netrw:
==============================================================================
12. History *netrw-history* {{{1
v155: Oct 29, 2015 * (Timur Fayzrakhmanov) reported that netrw's
mapping of ctrl-l was not allowing refresh of
other windows when it was done in a netrw
window.
Nov 05, 2015 * Improved s:TreeSqueezeDir() to use search()
instead of a loop
* NetrwBrowse() will return line to
w:netrw_bannercnt if cursor ended up in
banner
Nov 16, 2015 * Added a <Plug>NetrwTreeSqueeze (|netrw-s-cr|)
Nov 17, 2015 * Commented out imaps -- perhaps someone can
tell me how they're useful and should be
retained?
Nov 20, 2015 * Added |netrw-ma| and |netrw-mA| support
Nov 20, 2015 * gx (|netrw-gx|) on an url downloaded the
file in addition to simply bringing up the
url in a browser. Fixed.
Nov 23, 2015 * Added |g:netrw_sizestyle| support
Nov 27, 2015 * Inserted a lot of <c-u>s into various netrw
maps.
Jan 05, 2016 * |netrw-qL| implemented to mark files based
upon |location-list|s; similar to |netrw-qF|.
Jan 19, 2016 * using - call delete(directoryname,"d") -
instead of using g:netrw_localrmdir if
v7.4 + patch#1107 is available
Jan 28, 2016 * changed to using |winsaveview()| and
|winrestview()|
Jan 28, 2016 * s:NetrwTreePath() now does a save and
restore of view
Feb 08, 2016 * Fixed a tree-listing problem with remote
directories
v154: Feb 26, 2015 * (Yuri Kanivetsky) reported a situation where
a file was not treated properly as a file
due to g:netrw_keepdir == 1
@@ -3860,7 +3948,7 @@ netrw:
handling.
* |:Lexplore| path: will be used to update
a left-side netrw browsing directory.
Mar 12, 2014 * |:netrw-s-cr|: use <s-cr> to close
Mar 12, 2014 * |netrw-s-cr|: use <s-cr> to close
tree directory implemented
Mar 13, 2014 * (Tony Mechylynck) reported that using
the browser with ftp on a directory,
+3 -2
View File
@@ -1,4 +1,4 @@
*quickref.txt* For Vim version 7.4. Last change: 2015 Nov 10
*quickref.txt* For Vim version 7.4. Last change: 2016 Feb 24
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -815,7 +815,8 @@ Short explanation of each option: *option-list*
'omnifunc' 'ofu' function for filetype-specific completion
'opendevice' 'odev' allow reading/writing devices on MS-Windows
'operatorfunc' 'opfunc' function to be called for |g@| operator
'osfiletype' 'oft' no longer supported
'osfiletype' 'oft' no longer supported
'packpath' 'pp' list of directories used for packages
'paragraphs' 'para' nroff macros that separate paragraphs
'paste' allow pasting text
'pastetoggle' 'pt' key code that causes 'paste' to toggle
+74 -6
View File
@@ -1,4 +1,4 @@
*repeat.txt* For Vim version 7.4. Last change: 2016 Feb 12
*repeat.txt* For Vim version 7.4. Last change: 2016 Feb 26
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -12,8 +12,9 @@ Chapter 26 of the user manual introduces repeating |usr_26.txt|.
2. Multiple repeats |multi-repeat|
3. Complex repeats |complex-repeat|
4. Using Vim scripts |using-scripts|
5. Debugging scripts |debug-scripts|
6. Profiling |profiling|
5. Using Vim packages |packages|
6. Debugging scripts |debug-scripts|
7. Profiling |profiling|
==============================================================================
1. Single repeats *single-repeat*
@@ -212,6 +213,24 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
about each searched file.
{not in Vi}
*:loadp* *:loadplugin*
:loadp[lugin] {name} Search for an optional plugin directory and source the
plugin files found. It is similar to: >
:runtime pack/*/opt/{name}/plugin/*.vim
< However, `:loadplugin` uses 'packpath' instead of
'runtimepath'. And the directory found is added to
'runtimepath'.
If you have a directory under 'packpath' that doesn't
actually have a plugin file, just create an empty one.
This will still add the directory to 'runtimepath'.
Note that {name} is the directory name, not the name
of the .vim file. If the "{name}/plugin" directory
contains more than one file they are all sourced.
Also see |load-plugin|.
:scripte[ncoding] [encoding] *:scripte* *:scriptencoding* *E167*
Specify the character encoding used in the script.
The following lines will be converted from [encoding]
@@ -388,7 +407,56 @@ Rationale:
< Therefore the unusual leading backslash is used.
==============================================================================
5. Debugging scripts *debug-scripts*
5. Using Vim packages *packages*
A Vim package is a directory that contains one or more plugins. The
advantages over normal plugins:
- A package can be downloaded as an archive and unpacked in its own directory.
That makes it easy to updated and/or remove.
- A package can be a git, mercurial, etc. respository. That makes it really
easy to update.
- A package can contain multiple plugins that depend on each other.
- A package can contain plugins that are automatically loaded on startup and
ones that are only loaded when needed with `:loadplugin`.
Let's assume your Vim files are in the "~/.vim" directory and you want to add a
package from a zip archive "/tmp/mypack.zip":
% mkdir -p ~/.vim/pack/my
% cd ~/.vim/pack/my
% unzip /tmp/mypack.zip
The directory name "my" is arbitrary, you can pick anything you like.
You would now have these files under ~/.vim:
pack/my/README.txt
pack/my/ever/always/plugin/always.vim
pack/my/ever/always/syntax/always.vim
pack/my/opt/mydebug/plugin/debugger.vim
When Vim starts up it scans all directories in 'packpath' for plugins under the
"ever" directory and loads them. When found that directory is added to
'runtimepath'.
In the example Vim will find "my/ever/always/plugin/always.vim" and adds
"~/.vim/pack/my/ever/always" to 'runtimepath'.
If the "always" plugin kicks in and sets the 'filetype' to "always", Vim will
find the syntax/always.vim file, because its directory is in 'runtimepath'.
*load-plugin*
To load an optional plugin from a pack use the `:loadplugin` command: >
:loadplugin mydebug
This could be done inside always.vim, if some conditions are met.
Or you could add this command to your |.vimrc|.
It is perfectly normal for a package to only have files in the "opt"
directory. You then need to load each plugin when you want to use it.
Loading packages will not happen if loading plugins is disabled, see
|load-plugins|.
==============================================================================
6. Debugging scripts *debug-scripts*
Besides the obvious messages that you can add to your scripts to find out what
they are doing, Vim offers a debug mode. This allows you to step through a
@@ -500,7 +568,7 @@ Additionally, these commands can be used:
About the additional commands in debug mode:
- There is no command-line completion for them, you get the completion for the
normal Ex commands only.
- You can shorten them, up to a single character, unless more then one command
- You can shorten them, up to a single character, unless more than one command
starts with the same letter. "f" stands for "finish", use "fr" for "frame".
- Hitting <CR> will repeat the previous one. When doing another command, this
is reset (because it's not clear what you want to repeat).
@@ -613,7 +681,7 @@ OBSCURE
user, don't use typeahead for debug commands.
==============================================================================
6. Profiling *profile* *profiling*
7. Profiling *profile* *profiling*
Profiling means that Vim measures the time that is spent on executing
functions and/or scripts. The |+profile| feature is required for this.
+30 -7
View File
@@ -1,4 +1,4 @@
*starting.txt* For Vim version 7.4. Last change: 2014 Jul 09
*starting.txt* For Vim version 7.4. Last change: 2016 Feb 27
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -12,9 +12,10 @@ Starting Vim *starting*
4. Initialization |initialization|
5. $VIM and $VIMRUNTIME |$VIM|
6. Suspending |suspend|
7. Saving settings |save-settings|
8. Views and Sessions |views-sessions|
9. The viminfo file |viminfo-file|
7. Exiting |exiting|
8. Saving settings |save-settings|
9. Views and Sessions |views-sessions|
10. The viminfo file |viminfo-file|
==============================================================================
1. Vim arguments *vim-arguments*
@@ -413,6 +414,11 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
not needed, because Vim will be able to find out what type
of terminal you are using. (See |terminal-info|.) {not in Vi}
*--not-a-term*
--not-a-term Tells Vim that the user knows that the input and/or output is
not connected to a terminal. This will avoid the warning and
the two second delay that would happen. {not in Vi}
*-d*
-d Start in diff mode, like |vimdiff|.
{not in Vi} {not available when compiled without the |+diff|
@@ -857,6 +863,10 @@ accordingly. Vim proceeds in this order:
commands from the command line have not been executed yet. You can
use "--cmd 'set noloadplugins'" |--cmd|.
Plugin packs are loaded. These are plugins, as above, but found in
'packpath' directories. Every plugin directory found is added in
'runtimepath'. See |packages|.
5. Set 'shellpipe' and 'shellredir'
The 'shellpipe' and 'shellredir' options are set according to the
value of the 'shell' option, unless they have been set before.
@@ -1134,7 +1144,20 @@ can't paste it in another application (since Vim is going to sleep an attempt
to get the selection would make the program hang).
==============================================================================
7. Saving settings *save-settings*
7. Exiting *exiting*
There are several ways to exit Vim:
- Close the last window with `:quit`. Only when there are no changes.
- Close the last window with `:quit!`. Also when there are changes.
- Close all windows with `:qall`. Only when there are no changes.
- Close all windows with `:qall!`. Also when there are changes.
- Use `:cquit`. Also when there are changes.
When using `:cquit` or when there was an error message Vim exits with exit
code 1. Errors can be avoided by using `:silent!`.
==============================================================================
8. Saving settings *save-settings*
Mostly you will edit your vimrc files manually. This gives you the greatest
flexibility. There are a few commands to generate a vimrc file automatically.
@@ -1196,7 +1219,7 @@ option, which has several side effects. See |'compatible'|.
'compatible' option to the output file first, because of these side effects.
==============================================================================
8. Views and Sessions *views-sessions*
9. Views and Sessions *views-sessions*
This is introduced in sections |21.4| and |21.5| of the user manual.
@@ -1343,7 +1366,7 @@ To automatically save and restore views for *.c files: >
au BufWinEnter *.c silent loadview
==============================================================================
9. The viminfo file *viminfo* *viminfo-file* *E136*
10. The viminfo file *viminfo* *viminfo-file* *E136*
*E575* *E576* *E577*
If you exit Vim and later start it again, you would normally lose a lot of
information. The viminfo file can be used to remember that information, which
+9 -2
View File
@@ -1,4 +1,4 @@
*syntax.txt* For Vim version 7.4. Last change: 2016 Jan 28
*syntax.txt* For Vim version 7.4. Last change: 2016 Feb 25
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -2890,7 +2890,7 @@ You may wish to embed languages into sh. I'll give an example courtesy of
Lorance Stinson on how to do this with awk as an example. Put the following
file into $HOME/.vim/after/syntax/sh/awkembed.vim: >
" AWK Embedding: {{{1
" AWK Embedding:
" ==============
" Shamelessly ripped from aspperl.vim by Aaron Hope.
if exists("b:current_syntax")
@@ -3361,6 +3361,13 @@ Note that schemas are not actually limited to plain scalars, but this is the
only difference between schemas defined in YAML specification and the only
difference defined in the syntax file.
ZSH *zsh.vim* *ft-zsh-syntax*
The syntax script for zsh allows for syntax-based folding: >
:let g:zsh_fold_enable = 1
==============================================================================
5. Defining a syntax *:syn-define* *E410*
+42 -50
View File
@@ -740,6 +740,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
'option' intro.txt /*'option'*
'osfiletype' options.txt /*'osfiletype'*
'pa' options.txt /*'pa'*
'packpath' options.txt /*'packpath'*
'para' options.txt /*'para'*
'paragraphs' options.txt /*'paragraphs'*
'paste' options.txt /*'paste'*
@@ -760,6 +761,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
'pmbcs' options.txt /*'pmbcs'*
'pmbfn' options.txt /*'pmbfn'*
'popt' options.txt /*'popt'*
'pp' options.txt /*'pp'*
'preserveindent' options.txt /*'preserveindent'*
'previewheight' options.txt /*'previewheight'*
'previewwindow' options.txt /*'previewwindow'*
@@ -1288,7 +1290,6 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
+scrollbind various.txt /*+scrollbind*
+signs various.txt /*+signs*
+smartindent various.txt /*+smartindent*
+sniff various.txt /*+sniff*
+startuptime various.txt /*+startuptime*
+statusline various.txt /*+statusline*
+sun_workshop various.txt /*+sun_workshop*
@@ -1340,6 +1341,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
--literal starting.txt /*--literal*
--nofork starting.txt /*--nofork*
--noplugin starting.txt /*--noplugin*
--not-a-term starting.txt /*--not-a-term*
--remote remote.txt /*--remote*
--remote-expr remote.txt /*--remote-expr*
--remote-send remote.txt /*--remote-send*
@@ -2463,6 +2465,8 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:lo starting.txt /*:lo*
:loadk mbyte.txt /*:loadk*
:loadkeymap mbyte.txt /*:loadkeymap*
:loadp repeat.txt /*:loadp*
:loadplugin repeat.txt /*:loadplugin*
:loadview starting.txt /*:loadview*
:loc motion.txt /*:loc*
:lockmarks motion.txt /*:lockmarks*
@@ -2573,7 +2577,6 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:nbkey netbeans.txt /*:nbkey*
:nbstart netbeans.txt /*:nbstart*
:ne editing.txt /*:ne*
:netrw-s-cr pi_netrw.txt /*:netrw-s-cr*
:new windows.txt /*:new*
:next editing.txt /*:next*
:next_f editing.txt /*:next_f*
@@ -2859,6 +2862,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:sign-unplace sign.txt /*:sign-unplace*
:sil various.txt /*:sil*
:silent various.txt /*:silent*
:silent! various.txt /*:silent!*
:sim gui_w32.txt /*:sim*
:simalt gui_w32.txt /*:simalt*
:sin change.txt /*:sin*
@@ -2879,8 +2883,6 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:smile index.txt /*:smile*
:sn windows.txt /*:sn*
:snext windows.txt /*:snext*
:sni if_sniff.txt /*:sni*
:sniff if_sniff.txt /*:sniff*
:sno change.txt /*:sno*
:snomagic change.txt /*:snomagic*
:snor map.txt /*:snor*
@@ -3582,6 +3584,7 @@ CTRL-\_CTRL-N intro.txt /*CTRL-\\_CTRL-N*
CTRL-] tagsrch.txt /*CTRL-]*
CTRL-^ editing.txt /*CTRL-^*
CTRL-{char} intro.txt /*CTRL-{char}*
Channel eval.txt /*Channel*
Chinese mbyte.txt /*Chinese*
Cmd-. gui_mac.txt /*Cmd-.*
Cmd-Down gui_mac.txt /*Cmd-Down*
@@ -3612,7 +3615,6 @@ D change.txt /*D*
DOS os_dos.txt /*DOS*
DOS-format editing.txt /*DOS-format*
DOS-format-write editing.txt /*DOS-format-write*
DPMI os_msdos.txt /*DPMI*
Dictionaries eval.txt /*Dictionaries*
Dictionary eval.txt /*Dictionary*
Dictionary-function eval.txt /*Dictionary-function*
@@ -3805,12 +3807,7 @@ E270 if_ruby.txt /*E270*
E271 if_ruby.txt /*E271*
E272 if_ruby.txt /*E272*
E273 if_ruby.txt /*E273*
E274 if_sniff.txt /*E274*
E275 if_sniff.txt /*E275*
E276 if_sniff.txt /*E276*
E277 remote.txt /*E277*
E278 if_sniff.txt /*E278*
E279 if_sniff.txt /*E279*
E28 syntax.txt /*E28*
E280 if_tcl.txt /*E280*
E281 if_tcl.txt /*E281*
@@ -3993,11 +3990,6 @@ E447 editing.txt /*E447*
E448 various.txt /*E448*
E449 eval.txt /*E449*
E45 message.txt /*E45*
E450 os_msdos.txt /*E450*
E451 os_msdos.txt /*E451*
E452 os_msdos.txt /*E452*
E453 os_msdos.txt /*E453*
E454 os_msdos.txt /*E454*
E455 print.txt /*E455*
E456 print.txt /*E456*
E457 print.txt /*E457*
@@ -4476,7 +4468,6 @@ E893 eval.txt /*E893*
E894 eval.txt /*E894*
E895 if_mzsch.txt /*E895*
E896 channel.txt /*E896*
E897 channel.txt /*E897*
E898 channel.txt /*E898*
E899 channel.txt /*E899*
E90 message.txt /*E90*
@@ -4496,6 +4487,8 @@ E911 eval.txt /*E911*
E912 eval.txt /*E912*
E913 eval.txt /*E913*
E914 eval.txt /*E914*
E916 eval.txt /*E916*
E917 eval.txt /*E917*
E92 message.txt /*E92*
E93 windows.txt /*E93*
E94 windows.txt /*E94*
@@ -4564,6 +4557,7 @@ InsertEnter autocmd.txt /*InsertEnter*
InsertLeave autocmd.txt /*InsertLeave*
J change.txt /*J*
Japanese mbyte.txt /*Japanese*
Job eval.txt /*Job*
K various.txt /*K*
KDE gui_x11.txt /*KDE*
KVim gui_x11.txt /*KVim*
@@ -4709,6 +4703,7 @@ ShellCmdPost autocmd.txt /*ShellCmdPost*
ShellFilterPost autocmd.txt /*ShellFilterPost*
SourceCmd autocmd.txt /*SourceCmd*
SourcePre autocmd.txt /*SourcePre*
Special eval.txt /*Special*
SpellFileMissing autocmd.txt /*SpellFileMissing*
StdinReadPost autocmd.txt /*StdinReadPost*
StdinReadPre autocmd.txt /*StdinReadPre*
@@ -5220,11 +5215,18 @@ cc change.txt /*cc*
ceil() eval.txt /*ceil()*
ch.vim syntax.txt /*ch.vim*
ch_close() eval.txt /*ch_close()*
ch_evalexpr() eval.txt /*ch_evalexpr()*
ch_evalraw() eval.txt /*ch_evalraw()*
ch_getbufnr() eval.txt /*ch_getbufnr()*
ch_getjob() eval.txt /*ch_getjob()*
ch_log() eval.txt /*ch_log()*
ch_logfile() eval.txt /*ch_logfile()*
ch_open() eval.txt /*ch_open()*
ch_read() eval.txt /*ch_read()*
ch_readraw() eval.txt /*ch_readraw()*
ch_sendexpr() eval.txt /*ch_sendexpr()*
ch_sendraw() eval.txt /*ch_sendraw()*
ch_setoptions() eval.txt /*ch_setoptions()*
ch_status() eval.txt /*ch_status()*
change-list-jumps motion.txt /*change-list-jumps*
change-name tips.txt /*change-name*
@@ -5253,6 +5255,7 @@ changetick eval.txt /*changetick*
changing change.txt /*changing*
channel channel.txt /*channel*
channel-callback channel.txt /*channel-callback*
channel-close channel.txt /*channel-close*
channel-commands channel.txt /*channel-commands*
channel-demo channel.txt /*channel-demo*
channel-mode channel.txt /*channel-mode*
@@ -5323,6 +5326,7 @@ clipboard-html options.txt /*clipboard-html*
clipboard-unnamed options.txt /*clipboard-unnamed*
clipboard-unnamedplus options.txt /*clipboard-unnamedplus*
clojure-indent indent.txt /*clojure-indent*
close-cb channel.txt /*close-cb*
cmd-key gui_mac.txt /*cmd-key*
cmd-movement gui_mac.txt /*cmd-movement*
cmd-shortcuts gui_mac.txt /*cmd-shortcuts*
@@ -5416,6 +5420,7 @@ count-items tips.txt /*count-items*
count-variable eval.txt /*count-variable*
count1-variable eval.txt /*count1-variable*
cp-default version5.txt /*cp-default*
cpo options.txt /*cpo*
cpo-! options.txt /*cpo-!*
cpo-# options.txt /*cpo-#*
cpo-$ options.txt /*cpo-$*
@@ -5651,8 +5656,6 @@ dos-locations os_dos.txt /*dos-locations*
dos-shell os_dos.txt /*dos-shell*
dos-standard-mappings os_dos.txt /*dos-standard-mappings*
dos-temp-files os_dos.txt /*dos-temp-files*
dos16 os_msdos.txt /*dos16*
dos32 os_msdos.txt /*dos32*
dosbatch.vim syntax.txt /*dosbatch.vim*
double-click term.txt /*double-click*
download intro.txt /*download*
@@ -5691,6 +5694,8 @@ end intro.txt /*end*
end-of-file pattern.txt /*end-of-file*
enlightened-terminal syntax.txt /*enlightened-terminal*
erlang.vim syntax.txt /*erlang.vim*
err-cb channel.txt /*err-cb*
err-timeout channel.txt /*err-timeout*
errmsg-variable eval.txt /*errmsg-variable*
error-file-format quickfix.txt /*error-file-format*
error-messages message.txt /*error-messages*
@@ -5749,6 +5754,7 @@ execute-menus gui.txt /*execute-menus*
exepath() eval.txt /*exepath()*
exim starting.txt /*exim*
exists() eval.txt /*exists()*
exiting starting.txt /*exiting*
exp() eval.txt /*exp()*
expand() eval.txt /*expand()*
expand-env options.txt /*expand-env*
@@ -6078,6 +6084,7 @@ ft-xml-omni insert.txt /*ft-xml-omni*
ft-xml-syntax syntax.txt /*ft-xml-syntax*
ft-xpm-syntax syntax.txt /*ft-xpm-syntax*
ft-yaml-syntax syntax.txt /*ft-yaml-syntax*
ft-zsh-syntax syntax.txt /*ft-zsh-syntax*
ft_ada.txt ft_ada.txt /*ft_ada.txt*
ft_sql.txt ft_sql.txt /*ft_sql.txt*
ftdetect filetype.txt /*ftdetect*
@@ -6262,6 +6269,7 @@ g:netrw_sepchr pi_netrw.txt /*g:netrw_sepchr*
g:netrw_servername pi_netrw.txt /*g:netrw_servername*
g:netrw_sftp_cmd pi_netrw.txt /*g:netrw_sftp_cmd*
g:netrw_silent pi_netrw.txt /*g:netrw_silent*
g:netrw_sizestyle pi_netrw.txt /*g:netrw_sizestyle*
g:netrw_sort_by pi_netrw.txt /*g:netrw_sort_by*
g:netrw_sort_direction pi_netrw.txt /*g:netrw_sort_direction*
g:netrw_sort_options pi_netrw.txt /*g:netrw_sort_options*
@@ -6485,7 +6493,6 @@ gui-shell-win32 gui_w32.txt /*gui-shell-win32*
gui-start gui.txt /*gui-start*
gui-toolbar gui.txt /*gui-toolbar*
gui-vert-scroll gui.txt /*gui-vert-scroll*
gui-w16 gui_w16.txt /*gui-w16*
gui-w32 gui_w32.txt /*gui-w32*
gui-w32-cmdargs gui_w32.txt /*gui-w32-cmdargs*
gui-w32-dialogs gui_w32.txt /*gui-w32-dialogs*
@@ -6508,7 +6515,6 @@ gui-x11-start gui_x11.txt /*gui-x11-start*
gui-x11-various gui_x11.txt /*gui-x11-various*
gui.txt gui.txt /*gui.txt*
gui_mac.txt gui_mac.txt /*gui_mac.txt*
gui_w16.txt gui_w16.txt /*gui_w16.txt*
gui_w32.txt gui_w32.txt /*gui_w32.txt*
gui_x11.txt gui_x11.txt /*gui_x11.txt*
guifontwide_gtk2 options.txt /*guifontwide_gtk2*
@@ -6873,6 +6879,7 @@ iquote motion.txt /*iquote*
is motion.txt /*is*
isdirectory() eval.txt /*isdirectory()*
islocked() eval.txt /*islocked()*
isnan() eval.txt /*isnan()*
it motion.txt /*it*
italic syntax.txt /*italic*
items() eval.txt /*items()*
@@ -6886,6 +6893,7 @@ java.vim syntax.txt /*java.vim*
javascript-cinoptions indent.txt /*javascript-cinoptions*
javascript-indenting indent.txt /*javascript-indenting*
job channel.txt /*job*
job-callback channel.txt /*job-callback*
job-channel-overview channel.txt /*job-channel-overview*
job-close-cb channel.txt /*job-close-cb*
job-control channel.txt /*job-control*
@@ -6893,15 +6901,16 @@ job-err-cb channel.txt /*job-err-cb*
job-err-io channel.txt /*job-err-io*
job-exit-cb channel.txt /*job-exit-cb*
job-in-io channel.txt /*job-in-io*
job-killonexit channel.txt /*job-killonexit*
job-may-start channel.txt /*job-may-start*
job-options channel.txt /*job-options*
job-out-cb channel.txt /*job-out-cb*
job-out-io channel.txt /*job-out-io*
job-start channel.txt /*job-start*
job-start-nochannel channel.txt /*job-start-nochannel*
job-stoponexit channel.txt /*job-stoponexit*
job-term channel.txt /*job-term*
job_getchannel() eval.txt /*job_getchannel()*
job_setoptions() eval.txt /*job_setoptions()*
job_start() eval.txt /*job_start()*
job_status() eval.txt /*job_status()*
job_stop() eval.txt /*job_stop()*
@@ -6992,6 +7001,7 @@ list-repeat windows.txt /*list-repeat*
lite.vim syntax.txt /*lite.vim*
literal-string eval.txt /*literal-string*
lnum-variable eval.txt /*lnum-variable*
load-plugin repeat.txt /*load-plugin*
load-plugins starting.txt /*load-plugins*
load-vim-script repeat.txt /*load-vim-script*
local-additions help.txt /*local-additions*
@@ -7184,7 +7194,6 @@ message.txt message.txt /*message.txt*
messages message.txt /*messages*
meta intro.txt /*meta*
min() eval.txt /*min()*
minimal-features os_msdos.txt /*minimal-features*
missing-options vi_diff.txt /*missing-options*
mkdir() eval.txt /*mkdir()*
mlang.txt mlang.txt /*mlang.txt*
@@ -7215,18 +7224,7 @@ mouse_win-variable eval.txt /*mouse_win-variable*
movement intro.txt /*movement*
ms-dos os_msdos.txt /*ms-dos*
msdos os_msdos.txt /*msdos*
msdos-arrows os_msdos.txt /*msdos-arrows*
msdos-clipboard-limits os_msdos.txt /*msdos-clipboard-limits*
msdos-compiling os_msdos.txt /*msdos-compiling*
msdos-copy-paste os_msdos.txt /*msdos-copy-paste*
msdos-fname-extensions os_msdos.txt /*msdos-fname-extensions*
msdos-limitations os_msdos.txt /*msdos-limitations*
msdos-linked-files os_msdos.txt /*msdos-linked-files*
msdos-longfname os_msdos.txt /*msdos-longfname*
msdos-mode gui_w32.txt /*msdos-mode*
msdos-problems os_msdos.txt /*msdos-problems*
msdos-termcap os_msdos.txt /*msdos-termcap*
msdos-versions os_msdos.txt /*msdos-versions*
msql.vim syntax.txt /*msql.vim*
mswin.vim gui_w32.txt /*mswin.vim*
multi-byte mbyte.txt /*multi-byte*
@@ -7306,6 +7304,7 @@ netrw-:Texplore pi_netrw.txt /*netrw-:Texplore*
netrw-:Vexplore pi_netrw.txt /*netrw-:Vexplore*
netrw-C pi_netrw.txt /*netrw-C*
netrw-D pi_netrw.txt /*netrw-D*
netrw-I pi_netrw.txt /*netrw-I*
netrw-O pi_netrw.txt /*netrw-O*
netrw-P pi_netrw.txt /*netrw-P*
netrw-P18 pi_netrw.txt /*netrw-P18*
@@ -7355,6 +7354,7 @@ netrw-dirlist pi_netrw.txt /*netrw-dirlist*
netrw-downdir pi_netrw.txt /*netrw-downdir*
netrw-edithide pi_netrw.txt /*netrw-edithide*
netrw-editwindow pi_netrw.txt /*netrw-editwindow*
netrw-enter pi_netrw.txt /*netrw-enter*
netrw-ex pi_netrw.txt /*netrw-ex*
netrw-explore pi_netrw.txt /*netrw-explore*
netrw-explore-cmds pi_netrw.txt /*netrw-explore-cmds*
@@ -7391,10 +7391,12 @@ netrw-list pi_netrw.txt /*netrw-list*
netrw-listbookmark pi_netrw.txt /*netrw-listbookmark*
netrw-listhack pi_netrw.txt /*netrw-listhack*
netrw-login pi_netrw.txt /*netrw-login*
netrw-mA pi_netrw.txt /*netrw-mA*
netrw-mB pi_netrw.txt /*netrw-mB*
netrw-mF pi_netrw.txt /*netrw-mF*
netrw-mT pi_netrw.txt /*netrw-mT*
netrw-mX pi_netrw.txt /*netrw-mX*
netrw-ma pi_netrw.txt /*netrw-ma*
netrw-mb pi_netrw.txt /*netrw-mb*
netrw-mc pi_netrw.txt /*netrw-mc*
netrw-md pi_netrw.txt /*netrw-md*
@@ -7455,6 +7457,7 @@ netrw-pscp pi_netrw.txt /*netrw-pscp*
netrw-psftp pi_netrw.txt /*netrw-psftp*
netrw-putty pi_netrw.txt /*netrw-putty*
netrw-qF pi_netrw.txt /*netrw-qF*
netrw-qL pi_netrw.txt /*netrw-qL*
netrw-qb pi_netrw.txt /*netrw-qb*
netrw-qf pi_netrw.txt /*netrw-qf*
netrw-quickcom pi_netrw.txt /*netrw-quickcom*
@@ -7471,6 +7474,7 @@ netrw-reverse pi_netrw.txt /*netrw-reverse*
netrw-rexplore pi_netrw.txt /*netrw-rexplore*
netrw-rightmouse pi_netrw.txt /*netrw-rightmouse*
netrw-s pi_netrw.txt /*netrw-s*
netrw-s-cr pi_netrw.txt /*netrw-s-cr*
netrw-settings pi_netrw.txt /*netrw-settings*
netrw-settings-window pi_netrw.txt /*netrw-settings-window*
netrw-sexplore pi_netrw.txt /*netrw-sexplore*
@@ -7660,7 +7664,10 @@ os_unix.txt os_unix.txt /*os_unix.txt*
os_vms.txt os_vms.txt /*os_vms.txt*
os_win32.txt os_win32.txt /*os_win32.txt*
other-features vi_diff.txt /*other-features*
out-cb channel.txt /*out-cb*
out-timeout channel.txt /*out-timeout*
p change.txt /*p*
packages repeat.txt /*packages*
page-down intro.txt /*page-down*
page-up intro.txt /*page-up*
page_down intro.txt /*page_down*
@@ -8107,10 +8114,6 @@ slice eval.txt /*slice*
slow-fast-terminal term.txt /*slow-fast-terminal*
slow-start starting.txt /*slow-start*
slow-terminal term.txt /*slow-terminal*
sniff if_sniff.txt /*sniff*
sniff-commands if_sniff.txt /*sniff-commands*
sniff-compiling if_sniff.txt /*sniff-compiling*
sniff-intro if_sniff.txt /*sniff-intro*
socket-interface channel.txt /*socket-interface*
sort() eval.txt /*sort()*
sorting change.txt /*sorting*
@@ -9079,25 +9082,13 @@ w: eval.txt /*w:*
w:current_syntax syntax.txt /*w:current_syntax*
w:quickfix_title quickfix.txt /*w:quickfix_title*
w:var eval.txt /*w:var*
waittime channel.txt /*waittime*
warningmsg-variable eval.txt /*warningmsg-variable*
white-space pattern.txt /*white-space*
whitespace pattern.txt /*whitespace*
wildcard editing.txt /*wildcard*
wildcards editing.txt /*wildcards*
wildmenumode() eval.txt /*wildmenumode()*
win16-!start gui_w16.txt /*win16-!start*
win16-clipboard gui_w16.txt /*win16-clipboard*
win16-colors gui_w16.txt /*win16-colors*
win16-default-editor gui_w16.txt /*win16-default-editor*
win16-dialogs gui_w16.txt /*win16-dialogs*
win16-drag-n-drop gui_w16.txt /*win16-drag-n-drop*
win16-gui gui_w16.txt /*win16-gui*
win16-maximized gui_w16.txt /*win16-maximized*
win16-printing gui_w16.txt /*win16-printing*
win16-shell gui_w16.txt /*win16-shell*
win16-start gui_w16.txt /*win16-start*
win16-truetype gui_w16.txt /*win16-truetype*
win16-various gui_w16.txt /*win16-various*
win32 os_win32.txt /*win32*
win32-!start gui_w32.txt /*win32-!start*
win32-PATH os_win32.txt /*win32-PATH*
@@ -9274,6 +9265,7 @@ zn fold.txt /*zn*
zo fold.txt /*zo*
zr fold.txt /*zr*
zs scroll.txt /*zs*
zsh.vim syntax.txt /*zsh.vim*
zt scroll.txt /*zt*
zuG spell.txt /*zuG*
zuW spell.txt /*zuW*
+59 -63
View File
@@ -1,4 +1,4 @@
*todo.txt* For Vim version 7.4. Last change: 2016 Feb 15
*todo.txt* For Vim version 7.4. Last change: 2016 Feb 27
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -35,39 +35,31 @@ not be repeated below, unless there is extra information.
-------------------- Known bugs and current work -----------------------
+channel:
- Move netbeans NL handling to channel.c, use it for NL mode channel
- ch_open fails when socket isn't present yet. (Marcin Szamotulski)
Retry when error is "connection refused".
- channel test waittime is disabled for MS-Windows, causes a crash.
- channel needs both stdout and stderr (GUI implementation)
- A callback on ch_sendraw() should be put at the end of the list of callback
handlers. When a message arrives invoke the first one and remove it.
- implement TODO items in ":help channel":
- implement ch_setoptions(handle, {options})
- job_setoptions(job, {options})
- ch_close() closes stdin/stdout/stderr
- out-cb
- err-cb
- exit-cb move code from mch_clear_job()
- job argument: killonexit
- ch_read() for stderr
- ch_getjob(handle)
- ch_read(handle [, timeout])
- ch_readall(handle [, timeout])
- job_info() should remove usable info: process ID, run/dead, etc.
- job_start() options:
term
in-io
in-file
out-io
out-file
out-buffer
err-io
err-file
err-buffer
existing channel to use
- job_maystart()
- job_gethandle(), job_sethandle()
- add ch_status(): Whether channel is open. Perhaps also mode, timeout.
- When channel closes invoke "close-cb".
- add job_info(): process ID, run/dead, etc.
- add ch_info(): in/out/err mode, timeout, callbacks, etc.
- Move more details from eval.txt to channel.txt. Add tags in eval.txt.
- When receiving malformed json starting with a quote it doesn't get
discarded.
- When message in queue but there is no callback, drop it after a while?
- Crash when closing channel after ch_sendexpr() with callback and outstanding
request (Christian Robinson).
- cleanup on exit? in mch_getout() and getout().
- On Mac a 1 msec waittime is needed in ch_open(), why?
- Add more log calls, basically at every branch, before every callback, etc.
- Add timestamp to queued messages and callbacks with ID, remove after a
- When a message in the queue but there is no callback, drop it after a while?
Add timestamp to queued messages and callbacks with ID, remove after a
minute.
- cleanup on exit? in mch_getout() and getout().
- Add more log calls, basically at every branch, before every callback, etc.
- add remark about undo sync, is there a way to force it?
- When starting a job, have an option to open the server socket, so we know
the port, and pass it to the command with --socket-fd {nr}. (Olaf Dabrunz,
@@ -76,9 +68,15 @@ not be repeated below, unless there is extra information.
- Add a test where ["eval","getline(123)"] gets a line with special
characters (NUL, 0x80, etc.). Check that it isn't garbled.
- make sure errors lead to a useful error msg. ["ex","foobar"]
- json: implement UTF-16 surrogate pair.
- For connection to server, a "keep open" flag would be useful. Retry
connecting in the main loop with zero timeout.
For Win32 isinf() should be inline. (ZyX)
Add ":packadd"? Like :loadplugin but only adds the dir to 'runtimepath'.
emoji patch from Yasuhiro Matsumoto.
More plugin support:
- Have a way to install a callback from the main loop. Called every second or
so.
@@ -91,9 +89,8 @@ More plugin support:
gettabnr({id}) tab page nr of {id} or -1 if not open
gotowin({id})
Make it so that the window ID can be used where currently a window nr is used
Patch on #608: (Ken Takata)
https://bitbucket.org/k_takata/vim-ktakata-mq/src/479934b94fd56b064c9e4bd8737585c5df69d56a/fix-gvimext-loadlibrary.patch?fileviewer=file-view-default
Patch from Anton Lindqvist, 2016 Feb 21, to make bufwinnr() return a list.
Perhaps add bufwinid() instead.
This difference is unexpected:
echo v:true == 1
@@ -102,25 +99,17 @@ This difference is unexpected:
0
It's because tv_equal() works different.
Add "runtime/bundles" ?
runtime/bundles/netrw/spec.vim
runtime/bundles/netrw/autoload/netrw.vim
runtime/bundles/netrw/syntax/netrw.vim
etc.
Need an alternative for 'runtimepath' that tells where bundles are to be
found. 'bundlepath' ?
The plugins under 'bundlepath' would always be loaded. Also have a path for
optional plugins? 'optbundlepath'? Or have directories "bundlesdef" and
"bundlesopt"?
Then use a command "loadplugin" to find a plugin in "optional".
"bundles" is used by some plugin managers, need another name. "packages"?
Add a "requires" / "provides" mechanism?
if my_feature_enabled
require +python
endif
require my_other_plugin
~/vim/packages/netrw/def/netrw/plugin/netrw.vim
~/vim/packages/netrw/opt/nwdebug/plugin/nwdebug.vim
Compiler warnings. (John Marriott, Feb 17)
Compiler warnings in if_ole.cpp. Patch by Ken Takata, Feb 18.
When running "make install" don't overwrite the doc/tags file, generate it
elsewhere, so that the distributed file doesn't change.
Fix to support --nofork for Windows batch files. (Kevin Cantú, 2016 Feb 23,
#658)
Patch to add GTK 3 support. (Kazunobu Kuriyama, 2016 Feb 13)
Why does this: echo "a" . 1.1
result in: a11
@@ -170,12 +159,18 @@ Regexp problems:
matches the empty string. (Dominique Pelle, 2015 Oct 2, Nov 24)
- Search for \\~ causes error E874.
Patch to fix that folds close with autocomplete. #643
Christian Brabandt, 2016 Feb 18.
Also include update_curswant() fix for getcurpos(). (Christian Brabandt, 2016
Feb 9)
Patch to put undo options together in undo window.
(Gary Johnson, 2016 Jan 28)
Patch to have better check for {action} argument of setqflist().
Nikolai Pavlov, Feb 25, #661. Can be even more strict.
Patch for clearing history. (Yegappan Lakshmanan, 2016 Jan 31, second message
has tests)
@@ -187,6 +182,14 @@ Patch for test86 and test87. (Roland Puntaier, #622)
Patch for Python: #622. (Roland Puntaier, 2016 Feb 2)
What does it change?
Win32: patch to use 64 bit stat() if possible. (Ken Takata, 2014 May 12)
More tests May 14. Update May 29. Update Aug 10.
Now part of large file patches. (Ken Takata, 2016 Feb 1)
Two patches now? New update Feb 24.
Patch to support 64 bit ints for Number. (Ken Takata, 2016 Jan 21)
Also in update of Feb 24?
Need to try out instructions in INSSTALLpc.txt about how to install all
interfaces and how to build Vim with them.
Appveyor build with self-installing executable, includes getting most
@@ -239,12 +242,7 @@ directory exists. (Sergio Gallelli, 2013 Dec 29)
Patch to avoid redrawing tabline when the popup menu is visible.
(Christian Brabandt, 2016 Jan 28)
Win32: patch to use 64 bit stat() if possible. (Ken Takata, 2014 May 12)
More tests May 14. Update May 29. Update Aug 10.
Now part of large file patches. (Ken Takata, 2016 Feb 1)
Two patches now?
Patch to support 64 bit ints for Number. (Ken Takata, 2016 Jan 21)
Patch to add {skip} argument to search(). (Christian Brabandt, 2016 Feb 24)
7 Add a watchpoint in the debug mode: An expression that breaks execution
when evaluating to non-zero. Add the "watchadd expr" command, stop when
@@ -275,7 +273,7 @@ With a 'cpo' flag. (Christian Brabandt, 2016 Feb 8)
Patch to add TagNotFound autocommand. (Anton Lindqvist, 2016 Feb 3)
Patch to add Error autocommand. (Anton Lindqvist, 2016 Feb 14)
Patch to add Error autocommand. (Anton Lindqvist, 2016 Feb 17)
Only remembers one error.
Illegal memory access, requires ASAN to see. (Dominique Pelle, 2015 Jul 28)
@@ -317,6 +315,9 @@ Half-finished patch to fix the Problem using cgn to change a search hit when
replacement includes hit. Reported by John Beckett, fix by Christian Brabandt,
2016 Jan 11.
Patch to add :mapgroup, put mappings in a group like augroup.
(Yasuhiro Matsumoto, 2016 Feb 19)
Value returned by virtcol() changes depending on how lines wrap. This is
inconsistent with the documentation.
@@ -326,9 +327,6 @@ Can we cache the syntax attributes, so that updates for 'relativenumber' and
Build with Python on Mac does not always use the right library.
(Kazunobu Kuriyama, 2015 Mar 28)
Patch to add GTK 3 support. (Kazunobu Kuriyama, 2016 Feb 13)
Does not fully work yet.
Need a Vim equivalent of Python's None and a way to test for it.
Use v:none. var == v:none
@@ -1567,8 +1565,6 @@ still delete them. Also convert all buffer file names?
Update src/testdir/main.aap.
"vim -c 'sniff connect'" hangs Vim. (Dominique Pelle, 2008 Dec 7)
Something wrong with session that has "cd" commands and "badd", in such a way
that Vim doesn't find the edited file in the buffer list, causing the
ATTENTION message? (Tony Mechelynck, 2008 Dec 1)
+1 -4
View File
@@ -1,4 +1,4 @@
*usr_29.txt* For Vim version 7.4. Last change: 2008 Jun 28
*usr_29.txt* For Vim version 7.4. Last change: 2016 Feb 27
VIM USER MANUAL - by Bram Moolenaar
@@ -265,9 +265,6 @@ doesn't work if the tags file isn't sorted.
The 'taglength' option can be used to tell Vim the number of significant
characters in a tag.
When you use the SNiFF+ program, you can use the Vim interface to it |sniff|.
SNiFF+ is a commercial program.
Cscope is a free program. It does not only find places where an identifier is
declared, but also where it is used. See |cscope|.
+2 -3
View File
@@ -1,4 +1,4 @@
*various.txt* For Vim version 7.4. Last change: 2016 Feb 15
*various.txt* For Vim version 7.4. Last change: 2016 Feb 27
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -413,7 +413,6 @@ m *+ruby/dyn* Ruby interface |ruby-dynamic| |/dyn|
N *+scrollbind* |'scrollbind'|
B *+signs* |:sign|
N *+smartindent* |'smartindent'|
m *+sniff* SniFF interface |sniff|
N *+startuptime* |--startuptime| argument
N *+statusline* Options 'statusline', 'rulerformat' and special
formats of 'titlestring' and 'iconstring'
@@ -518,7 +517,7 @@ N *+X11* Unix only: can restore window title |X11|
:redi[r] END End redirecting messages. {not in Vi}
*:sil* *:silent*
*:sil* *:silent* *:silent!*
:sil[ent][!] {command} Execute {command} silently. Normal messages will not
be given or added to the message history.
When [!] is added, error messages will also be
+2 -2
View File
@@ -1,4 +1,4 @@
*version5.txt* For Vim version 7.4. Last change: 2016 Jan 03
*version5.txt* For Vim version 7.4. Last change: 2016 Feb 27
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -934,7 +934,7 @@ Don't add "-L/usr/lib" to the link line, causes problems on a few systems.
When compiling, allow a choice for minimal, normal or maximal features in an
easy way, by changing a single line in src/feature.h.
The DOS16 version has been compiled with minimal features to avoid running
out of memory too quickly. |dos16|
out of memory too quickly.
The Win32, DJGPP, and OS/2 versions use maximal features, because they have
enough memory.
The Amiga version is available with normal and maximal features.
+96
View File
@@ -0,0 +1,96 @@
" Vim filetype plugin
" Language: Eiffel
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2010 Aug 29
if (exists("b:did_ftplugin"))
finish
endif
let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo&vim
setlocal comments=:--
setlocal commentstring=--\ %s
setlocal formatoptions-=t formatoptions+=croql
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "Eiffel Source Files (*.e)\t*.e\n" .
\ "Eiffel Control Files (*.ecf, *.ace, *.xace)\t*.ecf;*.ace;*.xace\n" .
\ "All Files (*.*)\t*.*\n"
endif
if exists("loaded_matchit") && !exists("b:match_words")
let b:match_ignorecase = 0
" Silly \%^ trick to match note at head of pair and in middle prevents
" 'g%' wrapping from 'note' to 'end'
let b:match_words = '\%^:' .
\ '\<\%(^note\|indexing\|class\|^obsolete\|inherit\|insert\|^create\|convert\|feature\|^invariant\)\>:' .
\ '^end\>,' .
\ '\<\%(do\|deferred\|external\|once\%(\s\+"\)\@!\|check\|debug\|if\|inspect\|from\|across\)\>:' .
\ '\%(\%(^\s\+\)\@<=\%(then\|until\|loop\)\|\%(then\|until\|loop\)\s\+[^ -]\|' .
\ '\<\%(ensure\%(\s\+then\)\=\|rescue\|_then\|elseif\|else\|when\|\s\@<=invariant\|_until\|_loop\|variant\|_as\|alias\)\>\):' .
\ '\s\@<=end\>'
let b:match_skip = 's:\<eiffel\%(Comment\|String\|Operator\)\>'
noremap [% <Nop>
noremap ]% <Nop>
vnoremap a% <Nop>
endif
let b:undo_ftplugin = "setl fo< com< cms<" .
\ "| unlet! b:browsefilter b:match_ignorecase b:match_words b:match_skip"
if !exists("g:no_plugin_maps") && !exists("g:no_eiffel_maps")
function! s:DoMotion(pattern, count, flags) abort
normal! m'
for i in range(a:count)
call search(a:pattern, a:flags)
endfor
endfunction
let sections = '^\%(note\|indexing\|' .
\ '\%(\%(deferred\|expanded\|external\|frozen\)\s\+\)*class\|' .
\ 'obsolete\|inherit\|insert\|create\|convert\|feature\|' .
\ 'invariant\|end\)\>'
nnoremap <silent> <buffer> ]] :<C-U>call <SID>DoMotion(sections, v:count1, 'W')<CR>
xnoremap <silent> <buffer> ]] :<C-U>exe "normal! gv"<Bar>call <SID>DoMotion(sections, v:count1, 'W')<CR>
nnoremap <silent> <buffer> [[ :<C-U>call <SID>DoMotion(sections, v:count1, 'Wb')<CR>
xnoremap <silent> <buffer> [[ :<C-U>exe "normal! gv"<Bar>call <SID>DoMotion(sections, v:count1, 'Wb')<CR>
function! s:DoFeatureMotion(count, flags)
let view = winsaveview()
call cursor(1, 1)
let [features_start, _] = searchpos('^feature\>')
call search('^\s\+\a') " find the first feature
let spaces = indent(line('.'))
let [features_end, _] = searchpos('^\%(invariant\|note\|end\)\>')
call winrestview(view)
call s:DoMotion('\%>' . features_start . 'l\%<' . features_end . 'l^\s*\%' . (spaces + 1) . 'v\zs\a', a:count, a:flags)
endfunction
nnoremap <silent> <buffer> ]m :<C-U>call <SID>DoFeatureMotion(v:count1, 'W')<CR>
xnoremap <silent> <buffer> ]m :<C-U>exe "normal! gv"<Bar>call <SID>DoFeatureMotion(v:count1, 'W')<CR>
nnoremap <silent> <buffer> [m :<C-U>call <SID>DoFeatureMotion(v:count1, 'Wb')<CR>
xnoremap <silent> <buffer> [m :<C-U>exe "normal! gv"<Bar>call <SID>DoFeatureMotion(v:count1, 'Wb')<CR>
let comment_block_start = '^\%(\s\+--.*\n\)\@<!\s\+--'
let comment_block_end = '^\s\+--.*\n\%(\s\+--\)\@!'
nnoremap <silent> <buffer> ]- :<C-U>call <SID>DoMotion(comment_block_start, 1, 'W')<CR>
xnoremap <silent> <buffer> ]- :<C-U>exe "normal! gv"<Bar>call <SID>DoMotion(comment_block_start, 1, 'W')<CR>
nnoremap <silent> <buffer> [- :<C-U>call <SID>DoMotion(comment_block_end, 1, 'Wb')<CR>
xnoremap <silent> <buffer> [- :<C-U>exe "normal! gv"<Bar>call <SID>DoMotion(comment_block_end, 1, 'Wb')<CR>
let b:undo_ftplugin = b:undo_ftplugin .
\ "| silent! execute 'unmap <buffer> [[' | silent! execute 'unmap <buffer> ]]'" .
\ "| silent! execute 'unmap <buffer> [m' | silent! execute 'unmap <buffer> ]m'" .
\ "| silent! execute 'unmap <buffer> [-' | silent! execute 'unmap <buffer> ]-'"
endif
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: nowrap sw=2 sts=2 ts=8
+4 -4
View File
@@ -3,7 +3,7 @@
" Maintainer: Christian Brabandt <cb@256bit.org>
" Previous Maintainer: Peter Aronoff <telemachus@arpinum.org>
" Original Author: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2016-01-15
" Latest Revision: 2016-02-15
" License: Vim (see :h license)
" Repository: https://github.com/chrisbra/vim-sh-indent
@@ -12,14 +12,14 @@ if exists("b:did_indent")
endif
let b:did_indent = 1
let b:undo_indent = 'setlocal indentexpr< indentkeys< smartindent<'
setlocal indentexpr=GetShIndent()
setlocal indentkeys+=0=then,0=do,0=else,0=elif,0=fi,0=esac,0=done,0=end,),0=;;,0=;&
setlocal indentkeys+=0=fin,0=fil,0=fip,0=fir,0=fix
setlocal indentkeys-=:,0#
setlocal nosmartindent
let b:undo_indent = 'setlocal indentexpr< indentkeys< smartindent<'
if exists("*GetShIndent")
finish
endif
@@ -67,7 +67,7 @@ function! GetShIndent()
if !s:is_case_ended(line)
let ind += s:indent_value('case-statements')
endif
elseif line =~ '^\s*\<\k\+\>\s*()\s*{' || line =~ '^\s*{'
elseif line =~ '^\s*\<\k\+\>\s*()\s*{' || line =~ '^\s*{' || line =~ '^\s*function\s*\w\S\+\s*\%(()\)\?\s*{'
if line !~ '}\s*\%(#.*\)\=$'
let ind += s:indent_value('default')
endif
+3 -1
View File
@@ -1,7 +1,7 @@
" These commands create the option window.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2015 Nov 10
" Last Change: 2016 Feb 21
" If there already is an option window, jump to that one.
if bufwinnr("option-window") > 0
@@ -228,6 +228,8 @@ else
endif
call append("$", "runtimepath\tlist of directories used for runtime files and plugins")
call <SID>OptionG("rtp", &rtp)
call append("$", "packpath\tlist of directories used for plugin packages")
call <SID>OptionG("pp", &pp)
call append("$", "helpfile\tname of the main help file")
call <SID>OptionG("hf", &hf)
+1 -2
View File
@@ -1,6 +1,6 @@
" Vim plugin for showing matching parens
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2016 Feb 09
" Last Change: 2016 Feb 16
" Exit quickly when:
" - this plugin was already loaded (or disabled)
@@ -97,7 +97,6 @@ function! s:Highlight_Matching_Pair()
if has_getcurpos
" getcurpos() is more efficient but doesn't exist before 7.4.313.
let save_cursor = getcurpos()
let g:saved_cursor = save_cursor
else
let save_cursor = winsaveview()
endif
+5 -5
View File
@@ -1,6 +1,6 @@
" netrwPlugin.vim: Handles file transfer and remote directory listing across a network
" PLUGIN SECTION
" Date: Nov 07, 2014
" Date: Feb 08, 2016
" Maintainer: Charles E Campbell <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
" Copyright: Copyright (C) 1999-2013 Charles E. Campbell {{{1
@@ -20,7 +20,7 @@
if &cp || exists("g:loaded_netrwPlugin")
finish
endif
let g:loaded_netrwPlugin = "v154"
let g:loaded_netrwPlugin = "v155"
let s:keepcpo = &cpo
set cpo&vim
"DechoRemOn
@@ -55,10 +55,10 @@ augroup Network
augroup END
" Commands: :Nread, :Nwrite, :NetUserPass {{{2
com! -count=1 -nargs=* Nread call netrw#SavePosn()<bar>call netrw#NetRead(<count>,<f-args>)<bar>call netrw#RestorePosn()
com! -range=% -nargs=* Nwrite call netrw#SavePosn()<bar><line1>,<line2>call netrw#NetWrite(<f-args>)<bar>call netrw#RestorePosn()
com! -count=1 -nargs=* Nread let s:svpos= winsaveview()<bar>call netrw#NetRead(<count>,<f-args>)<bar>call winrestview(s:svpos)
com! -range=% -nargs=* Nwrite let s:svpos= winsaveview()<bar><line1>,<line2>call netrw#NetWrite(<f-args>)<bar>call winrestview(s:svpos)
com! -nargs=* NetUserPass call NetUserPass(<f-args>)
com! -nargs=* Nsource call netrw#SavePosn()<bar>call netrw#NetSource(<f-args>)<bar>call netrw#RestorePosn()
com! -nargs=* Nsource let s:svpos= winsaveview()<bar>call netrw#NetSource(<f-args>)<bar>call winrestview(s:svpos)
com! -nargs=? Ntree call netrw#SetTreetop(<q-args>)
" Commands: :Explore, :Sexplore, Hexplore, Vexplore, Lexplore {{{2
+8 -7
View File
@@ -1,15 +1,16 @@
" Vim syntax file
" Language: Fortran 2008 (and older: Fortran 2003, 95, 90, and 77)
" Version: 0.96
" Last Change: 2015 Nov. 30
" Version: 0.97
" Last Change: 2016 Feb. 26
" Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/>
" Usage: For instructions, do :help fortran-syntax from Vim
" Credits:
" Version 0.1 was based on the fortran 77 syntax file by Mario Eusebio and
" Preben Guldberg. Useful suggestions and contributions were made by: Andrej Panjkov,
" Bram Moolenaar, Thomas Olsen, Michael Sternberg, Christian Reile,
" Version 0.1 (April 2000) was based on the fortran 77 syntax file by Mario Eusebio and
" Preben Guldberg. Since then, useful suggestions and contributions have been made,
" in chronological order, by:
" Andrej Panjkov, Bram Moolenaar, Thomas Olsen, Michael Sternberg, Christian Reile,
" Walter Dieudonné, Alexander Wagner, Roman Bertle, Charles Rendleman,
" Andrew Griffiths, Joe Krahn, Hendrik Merx, and Matt Thompson.
" Andrew Griffiths, Joe Krahn, Hendrik Merx, Matt Thompson, and Jan Hermann.
if exists("b:current_syntax")
finish
@@ -407,7 +408,7 @@ if exists("fortran_fold")
else
syn region fortran77Loop transparent fold keepend start="\<do\s\+\z(\d\+\)" end="^\s*\z1\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
syn region fortran90Loop transparent fold keepend extend start="\(\<end\s\+\)\@<!\<do\(\s\+\a\|\s*$\)" skip="^\s*[!#].*$" excludenl end="\<end\s*do\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
syn region fortranIfBlock transparent fold keepend extend start="\(\<e\(nd\|lse\)\s\+\)\@<!\<if\s*(.\+)\s*then\>" skip="^\s*[!#].*$" end="\<end\s*if\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
syn region fortranIfBlock transparent fold keepend extend start="\(\<e\(nd\|lse\)\s\+\)\@<!\<if\s*(\(.\|&\s*\n\)\+)\(\s\|&\s*\n\)*then\>" skip="^\s*[!#].*$" end="\<end\s*if\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
syn region fortranCase transparent fold keepend extend start="\<select\s*case\>" skip="^\s*[!#].*$" end="\<end\s*select\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
endif
endif
+7 -2
View File
@@ -2,8 +2,8 @@
" Language: shell (sh) Korn shell (ksh) bash (sh)
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
" Previous Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int>
" Last Change: Dec 11, 2015
" Version: 143
" Last Change: Feb 18, 2016
" Version: 145
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH
" For options and settings, please use: :help ft-sh-syntax
" This file includes many ideas from Eric Brunet (eric.brunet@ens.fr)
@@ -85,6 +85,11 @@ if g:sh_fold_enabled && &fdm == "manual"
setl fdm=syntax
endif
" set up the syntax-highlighting iskeyword
if has("patch-7.4.1141")
exe "syn iskeyword ".&iskeyword.",-"
endif
" Set up folding commands for shell {{{1
" =================================
if s:sh_fold_functions
+32 -32
View File
@@ -1,8 +1,8 @@
" Vim syntax file
" Language: TeX
" Maintainer: Charles E. Campbell <NdrchipO@ScampbellPfamily.AbizM>
" Last Change: Jan 20, 2016
" Version: 91
" Last Change: Feb 18, 2016
" Version: 92
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX
"
" Notes: {{{1
@@ -200,7 +200,7 @@ if !exists("g:tex_no_math")
endif
" Try to flag {} and () mismatches: {{{1
if s:tex_fast =~ 'm'
if s:tex_fast =~# 'm'
if !s:tex_no_error
syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchGroup,texError
syn region texMatcher matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchGroup,texError,@NoSpell
@@ -217,7 +217,7 @@ endif
if !s:tex_no_error
syn match texError "[}\])]"
endif
if s:tex_fast =~ 'M'
if s:tex_fast =~# 'M'
if !exists("g:tex_no_math")
if !s:tex_no_error
syn match texMathError "}" contained
@@ -260,14 +260,14 @@ syn match texLigature "\\\([ijolL]\|ae\|oe\|ss\|AA\|AE\|OE\)$"
" \begin{}/\end{} section markers: {{{1
syn match texBeginEnd "\\begin\>\|\\end\>" nextgroup=texBeginEndName
if s:tex_fast =~ 'm'
if s:tex_fast =~# 'm'
syn region texBeginEndName matchgroup=Delimiter start="{" end="}" contained nextgroup=texBeginEndModifier contains=texComment
syn region texBeginEndModifier matchgroup=Delimiter start="\[" end="]" contained contains=texComment,@NoSpell
endif
" \documentclass, \documentstyle, \usepackage: {{{1
syn match texDocType "\\documentclass\>\|\\documentstyle\>\|\\usepackage\>" nextgroup=texBeginEndName,texDocTypeArgs
if s:tex_fast =~ 'm'
if s:tex_fast =~# 'm'
syn region texDocTypeArgs matchgroup=Delimiter start="\[" end="]" contained nextgroup=texBeginEndName contains=texComment,@NoSpell
endif
@@ -281,7 +281,7 @@ syn match texInput "\\input\s\+[a-zA-Z/.0-9_^]\+"hs=s+7 contains=texStatemen
syn match texInputFile "\\include\(graphics\|list\)\=\(\[.\{-}\]\)\=\s*{.\{-}}" contains=texStatement,texInputCurlies,texInputFileOpt
syn match texInputFile "\\\(epsfig\|input\|usepackage\)\s*\(\[.*\]\)\={.\{-}}" contains=texStatement,texInputCurlies,texInputFileOpt
syn match texInputCurlies "[{}]" contained
if s:tex_fast =~ 'm'
if s:tex_fast =~# 'm'
syn region texInputFileOpt matchgroup=Delimiter start="\[" end="\]" contained contains=texComment
endif
@@ -349,7 +349,7 @@ syn match texSpaceCode "\\\(math\|cat\|del\|lc\|sf\|uc\)code`"me=e-1 nextgroup=
syn match texSpaceCodeChar "`\\\=.\(\^.\)\==\(\d\|\"\x\{1,6}\|`.\)" contained
" Sections, subsections, etc: {{{1
if s:tex_fast =~ 'p'
if s:tex_fast =~# 'p'
if !s:tex_nospell
TexFold syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' contains=@texFoldGroup,@texDocGroup,@Spell
TexFold syn region texPartZone matchgroup=texSection start='\\part\>' end='\ze\s*\\\%(part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texPartGroup,@Spell
@@ -376,8 +376,8 @@ if s:tex_fast =~ 'p'
endif
" particular support for bold and italic {{{1
if s:tex_fast =~ 'b'
if s:tex_conceal =~ 'b'
if s:tex_fast =~# 'b'
if s:tex_conceal =~# 'b'
if !exists("g:tex_nospell") || !g:tex_nospell
syn region texBoldStyle matchgroup=texTypeStyle start="\\textbf\s*{" matchgroup=texTypeStyle end="}" concealends contains=@texBoldGroup,@Spell
syn region texBoldItalStyle matchgroup=texTypeStyle start="\\textit\s*{" matchgroup=texTypeStyle end="}" concealends contains=@texItalGroup,@Spell
@@ -414,7 +414,7 @@ if !exists("g:tex_no_math")
let foldcmd= ""
endif
exe "syn cluster texMathZones add=".grpname
if s:tex_fast =~ 'M'
if s:tex_fast =~# 'M'
exe 'syn region '.grpname.' start='."'".'\\begin\s*{\s*'.a:mathzone.'\s*}'."'".' end='."'".'\\end\s*{\s*'.a:mathzone.'\s*}'."'".' keepend contains=@texMathZoneGroup'.foldcmd
exe 'syn sync match '.syncname.' grouphere '.grpname.' "\\begin\s*{\s*'.a:mathzone.'\*\s*}"'
exe 'syn sync match '.syncname.' grouphere '.grpname.' "\\begin\s*{\s*'.a:mathzone.'\*\s*}"'
@@ -424,7 +424,7 @@ if !exists("g:tex_no_math")
let grpname = "texMathZone".a:sfx.'S'
let syncname = "texSyncMathZone".a:sfx.'S'
exe "syn cluster texMathZones add=".grpname
if s:tex_fast =~ 'M'
if s:tex_fast =~# 'M'
exe 'syn region '.grpname.' start='."'".'\\begin\s*{\s*'.a:mathzone.'\*\s*}'."'".' end='."'".'\\end\s*{\s*'.a:mathzone.'\*\s*}'."'".' keepend contains=@texMathZoneGroup'.foldcmd
exe 'syn sync match '.syncname.' grouphere '.grpname.' "\\begin\s*{\s*'.a:mathzone.'\*\s*}"'
exe 'syn sync match '.syncname.' grouphere '.grpname.' "\\begin\s*{\s*'.a:mathzone.'\*\s*}"'
@@ -448,8 +448,8 @@ if !exists("g:tex_no_math")
call TexNewMathZone("L","xxalignat",0)
" Inline Math Zones: {{{2
if s:tex_fast =~ 'M'
if has("conceal") && &enc == 'utf-8' && s:tex_conceal =~ 'd'
if s:tex_fast =~# 'M'
if has("conceal") && &enc == 'utf-8' && s:tex_conceal =~# 'd'
syn region texMathZoneV matchgroup=Delimiter start="\\(" matchgroup=Delimiter end="\\)\|%stopzone\>" keepend concealends contains=@texMathZoneGroup
syn region texMathZoneW matchgroup=Delimiter start="\\\[" matchgroup=Delimiter end="\\]\|%stopzone\>" keepend concealends contains=@texMathZoneGroup
syn region texMathZoneX matchgroup=Delimiter start="\$" skip="\\\\\|\\\$" matchgroup=Delimiter end="\$" end="%stopzone\>" concealends contains=@texMathZoneGroup
@@ -466,7 +466,7 @@ if !exists("g:tex_no_math")
syn match texMathOper "[_^=]" contained
" Text Inside Math Zones: {{{2
if s:tex_fast =~ 'M'
if s:tex_fast =~# 'M'
if !exists("g:tex_nospell") || !g:tex_nospell
syn region texMathText matchgroup=texStatement start='\\\(\(inter\)\=text\|mbox\)\s*{' end='}' contains=@texFoldGroup,@Spell
else
@@ -476,7 +476,7 @@ if !exists("g:tex_no_math")
" \left..something.. and \right..something.. support: {{{2
syn match texMathDelimBad contained "\S"
if has("conceal") && &enc == 'utf-8' && s:tex_conceal =~ 'm'
if has("conceal") && &enc == 'utf-8' && s:tex_conceal =~# 'm'
syn match texMathDelim contained "\\left\\{\>" skipwhite nextgroup=texMathDelimSet1,texMathDelimSet2,texMathDelimBad contains=texMathSymbol cchar={
syn match texMathDelim contained "\\right\\}\>" skipwhite nextgroup=texMathDelimSet1,texMathDelimSet2,texMathDelimBad contains=texMathSymbol cchar=}
let s:texMathDelimList=[
@@ -568,13 +568,13 @@ else
" allows syntax-folding of 2 or more contiguous comment lines
" single-line comments are not folded
syn match texComment "%.*$" contains=@texCommentGroup
if s:tex_fast =~ 'c'
if s:tex_fast =~# 'c'
TexFold syn region texComment start="^\zs\s*%.*\_s*%" skip="^\s*%" end='^\ze\s*[^%]' contains=@texCommentGroup
TexFold syn region texNoSpell contained matchgroup=texComment start="%\s*nospell\s*{" end="%\s*nospell\s*}" contains=@texFoldGroup,@NoSpell
endif
else
syn match texComment "%.*$" contains=@texCommentGroup
if s:tex_fast =~ 'c'
if s:tex_fast =~# 'c'
syn region texNoSpell contained matchgroup=texComment start="%\s*nospell\s*{" end="%\s*nospell\s*}" contains=@texFoldGroup,@NoSpell
endif
endif
@@ -583,7 +583,7 @@ endif
" Separate lines used for verb` and verb# so that the end conditions {{{1
" will appropriately terminate.
" If g:tex_verbspell exists, then verbatim texZones will permit spellchecking there.
if s:tex_fast =~ 'v'
if s:tex_fast =~# 'v'
if exists("g:tex_verbspell") && g:tex_verbspell
syn region texZone start="\\begin{[vV]erbatim}" end="\\end{[vV]erbatim}\|%stopzone\>" contains=@Spell
" listings package:
@@ -614,7 +614,7 @@ if s:tex_fast =~ 'v'
endif
" Tex Reference Zones: {{{1
if s:tex_fast =~ 'r'
if s:tex_fast =~# 'r'
syn region texZone matchgroup=texStatement start="@samp{" end="}\|%stopzone\>" contains=@texRefGroup
syn region texRefZone matchgroup=texStatement start="\\nocite{" end="}\|%stopzone\>" contains=@texRefGroup
syn region texRefZone matchgroup=texStatement start="\\bibliography{" end="}\|%stopzone\>" contains=@texRefGroup
@@ -628,13 +628,13 @@ syn match texRefZone '\\cite\%([tp]\*\=\)\=' nextgroup=texRefOption,texCite
" Handle newcommand, newenvironment : {{{1
syn match texNewCmd "\\newcommand\>" nextgroup=texCmdName skipwhite skipnl
if s:tex_fast =~ 'V'
if s:tex_fast =~# 'V'
syn region texCmdName contained matchgroup=Delimiter start="{"rs=s+1 end="}" nextgroup=texCmdArgs,texCmdBody skipwhite skipnl
syn region texCmdArgs contained matchgroup=Delimiter start="\["rs=s+1 end="]" nextgroup=texCmdBody skipwhite skipnl
syn region texCmdBody contained matchgroup=Delimiter start="{"rs=s+1 skip="\\\\\|\\[{}]" matchgroup=Delimiter end="}" contains=@texCmdGroup
endif
syn match texNewEnv "\\newenvironment\>" nextgroup=texEnvName skipwhite skipnl
if s:tex_fast =~ 'V'
if s:tex_fast =~# 'V'
syn region texEnvName contained matchgroup=Delimiter start="{"rs=s+1 end="}" nextgroup=texEnvBgn skipwhite skipnl
syn region texEnvBgn contained matchgroup=Delimiter start="{"rs=s+1 end="}" nextgroup=texEnvEnd skipwhite skipnl contains=@texEnvGroup
syn region texEnvEnd contained matchgroup=Delimiter start="{"rs=s+1 end="}" skipwhite skipnl contains=@texEnvGroup
@@ -660,11 +660,11 @@ syn match texString "\(``\|''\|,,\)"
" makeatletter -- makeatother sections
if !s:tex_no_error
if s:tex_fast =~ 'S'
if s:tex_fast =~# 'S'
syn region texStyle matchgroup=texStatement start='\\makeatletter' end='\\makeatother' contains=@texStyleGroup contained
endif
syn match texStyleStatement "\\[a-zA-Z@]\+" contained
if s:tex_fast =~ 'S'
if s:tex_fast =~# 'S'
syn region texStyleMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" contains=@texStyleGroup,texError contained
syn region texStyleMatcher matchgroup=Delimiter start="\[" end="]" contains=@texStyleGroup,texError contained
endif
@@ -675,7 +675,7 @@ if has("conceal") && &enc == 'utf-8'
" Math Symbols {{{2
" (many of these symbols were contributed by Björn Winckler)
if s:tex_conceal =~ 'm'
if s:tex_conceal =~# 'm'
let s:texMathList=[
\ ['|' , '‖'],
\ ['aleph' , 'ℵ'],
@@ -956,7 +956,7 @@ if has("conceal") && &enc == 'utf-8'
" \ ['uminus' , 'X']
" \ ['uplus' , 'X']
for texmath in s:texMathList
if texmath[0] =~ '\w$'
if texmath[0] =~# '\w$'
exe "syn match texMathSymbol '\\\\".texmath[0]."\\>' contained conceal cchar=".texmath[1]
else
exe "syn match texMathSymbol '\\\\".texmath[0]."' contained conceal cchar=".texmath[1]
@@ -995,7 +995,7 @@ if has("conceal") && &enc == 'utf-8'
endif
" Greek {{{2
if s:tex_conceal =~ 'g'
if s:tex_conceal =~# 'g'
fun! s:Greek(group,pat,cchar)
exe 'syn match '.a:group." '".a:pat."' contained conceal cchar=".a:cchar
endfun
@@ -1042,14 +1042,14 @@ if has("conceal") && &enc == 'utf-8'
endif
" Superscripts/Subscripts {{{2
if s:tex_conceal =~ 's'
if s:tex_fast =~ 's'
if s:tex_conceal =~# 's'
if s:tex_fast =~# 's'
syn region texSuperscript matchgroup=Delimiter start='\^{' skip="\\\\\|\\[{}]" end='}' contained concealends contains=texSpecialChar,texSuperscripts,texStatement,texSubscript,texSuperscript,texMathMatcher
syn region texSubscript matchgroup=Delimiter start='_{' skip="\\\\\|\\[{}]" end='}' contained concealends contains=texSpecialChar,texSubscripts,texStatement,texSubscript,texSuperscript,texMathMatcher
endif
" s:SuperSub:
fun! s:SuperSub(group,leader,pat,cchar)
if a:pat =~ '^\\' || (a:leader == '\^' && a:pat =~ g:tex_superscripts) || (a:leader == '_' && a:pat =~ g:tex_subscripts)
if a:pat =~# '^\\' || (a:leader == '\^' && a:pat =~# g:tex_superscripts) || (a:leader == '_' && a:pat =~# g:tex_subscripts)
" call Decho("SuperSub: group<".a:group."> leader<".a:leader."> pat<".a:pat."> cchar<".a:cchar.">")
exe 'syn match '.a:group." '".a:leader.a:pat."' contained conceal cchar=".a:cchar
exe 'syn match '.a:group."s '".a:pat ."' contained conceal cchar=".a:cchar.' nextgroup='.a:group.'s'
@@ -1154,7 +1154,7 @@ if has("conceal") && &enc == 'utf-8'
endif
" Accented characters: {{{2
if s:tex_conceal =~ 'a'
if s:tex_conceal =~# 'a'
if b:tex_stylish
syn match texAccent "\\[bcdvuH][^a-zA-Z@]"me=e-1
syn match texLigature "\\\([ijolL]\|ae\|oe\|ss\|AA\|AE\|OE\)[^a-zA-Z@]"me=e-1
@@ -1169,7 +1169,7 @@ if has("conceal") && &enc == 'utf-8'
let i= i + 1
continue
endif
if accent =~ '\a'
if accent =~# '\a'
exe "syn match texAccent '".'\\'.accent.'\(\s*{'.a:chr.'}\|\s\+'.a:chr.'\)'."' conceal cchar=".a:{i}
else
exe "syn match texAccent '".'\\'.accent.'\s*\({'.a:chr.'}\|'.a:chr.'\)'."' conceal cchar=".a:{i}
+51 -52
View File
@@ -1,8 +1,8 @@
" Vim syntax file
" Language: Vim 7.4 script
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
" Last Change: January 20, 2016
" Version: 7.4-40
" Last Change: February 17, 2016
" Version: 7.4-44
" Automatically generated keyword lists: {{{1
" Quit when a syntax file was already loaded {{{2
@@ -18,39 +18,38 @@ syn keyword vimTodo contained COMBAK FIXME TODO XXX
syn cluster vimCommentGroup contains=vimTodo,@Spell
" regular vim commands {{{2
syn keyword vimCommand contained a argd argu[ment] bf[irst] brea[k] buf cabc[lear] cc cfdo changes clo[se] cN[ext] colo[rscheme] con[tinue] cr[ewind] d delel deletp dep 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 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] sci scr[iptnames] setl[ocal] sgi sh[ell] sIe sil[ent] sir sm[ap] sno[magic] sp spellu[ndo] sre[wind] srp star[tinsert] sun[hide] sy ta tabfir[st] tabN[ext] tags th[row] tN tr[ewind] un unl verb[ose] vimgrepa[dd] w winp[os] wqa[ll] xa[ll] xnoremenu
syn keyword vimCommand contained ab argd[elete] as[cii] bl[ast] breaka[dd] bufdo cad[dbuffer] ccl[ose] cf[ile] chd[ir] cmapc[lear] cnf com cope[n] cs de delep delf di 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] 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] scI scs sf[ind] sgI si sig sim[alt] sIr sme snoreme spe spellw[rong] srg st startr[eplace] sunme syn tab tabl[ast] tabo[nly] tc[l] tj[ump] tn[ext] try una[bbreviate] unlo[ckvar] ve[rsion] vi[sual] wa[ll] win[size] w[rite] x[it] xprop
syn keyword vimCommand contained abc[lear] argdo au bm[odified] breakd[el] b[uffer] cadde[xpr] cd cfir[st] che[ckpath] cn cNf comc[lear] co[py] cscope debug d[elete] delf[unction] dif 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 nor 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] scl scscope sfir[st] sgl sI sIg sin sl smenu snoremenu spelld[ump] sp[lit] sri sta[g] stj[ump] sunmenu sync tabc[lose] tabm[ove] tabp[revious] tcld[o] tl[ast] tN[ext] ts[elect] u[ndo] uns[ilent] vert[ical] viu[sage] wh[ile] wn[ext] ws[verb] xmapc[lear] xunme
syn keyword vimCommand contained abo[veleft] arge[dit] bad[d] bn[ext] breakl[ist] buffers caddf[ile] cdo cgetb[uffer] checkt[ime] cN cnf[ile] comp[iler] cpf[ile] cstag debugg[reedy] deletel dell diffg[et] dif[fupdate] 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] nore 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] sc scp se[t] sg sgn sic sign sIn sla[st] sn[ext] so spe[llgood] spr[evious] srI star st[op] sus[pend] syncbind tabd[o] tabN tabr[ewind] tclf[ile] tm to[pleft] tu undoj[oin] up[date] vi vmapc[lear] win wN[ext] wundo xme xunmenu
syn keyword vimCommand contained al[l] argg[lobal] ba[ll] bN[ext] br[ewind] bun[load] cal[l] ce[nter] cgete[xpr] cl cnew[er] cNf[ile] con cp[revious] cuna[bbrev] del deletep delm[arks] 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] nos[wapfile] 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] sce scr setf[iletype] sgc sgp sIc sil sip sl[eep] sN[ext] sor[t] spelli[nfo] sr srl start stopi[nsert] sv[iew] syntime tabe[dit] tabnew tabs te[aroff] tm[enu] tp[revious] tu[nmenu] undol[ist] v vie[w] vne[w] winc[md] wp[revious] wv[iminfo] xmenu xwininfo
syn keyword vimCommand contained ar argl[ocal] bd[elete] bo[tright] bro[wse] bw[ipeout] cat[ch] cex[pr] cg[etfile] cla[st] cn[ext] col[der] conf[irm] cq[uit] cw[indow] delc[ommand] deletl delp 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 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] scg scripte[ncoding] setg[lobal] sge sgr sie sIl sIp sm[agic] sni[ff] so[urce] spellr[epall] src srn startg[replace] sts[elect] sw[apname] t tabf[ind] tabn[ext] ta[g] tf[irst] tn tr u unh[ide] ve vim[grep] vs[plit] windo wq x xnoreme y[ank]
syn keyword vimCommand contained arga[dd] ar[gs] bel[owright] bp[revious] bu c cb[uffer] cf c[hange] cl[ist]
syn keyword vimCommand contained a arga[dd] argl[ocal] ba[ll] bn[ext] breakd[el] bufdo cabc[lear] cat[ch] ce[nter] cgetb[uffer] che[ckpath] cmapc[lear] cnf com cope[n] cs de delep delf di difft[his] dj[ump] dr[op] ec elsei[f] endf[unction] exi[t] filetype fix[del] for gr[ep] h[elp] hid[e] ij[ump] isp[lit] keepalt lad la[st] lcl[ose] lex[pr] lgete[xpr] ll lne lnf[ile] loc[kmarks] lr[ewind] lv[imgrep] marks mk mkv[imrc] mz[scheme] new noswap[file] o[pen] ped[it] pp[op] profd[el] ptf[irst] ptN[ext] py python3 re redr[aw] rew[ind] rubyf[ile] sa[rgument] sbn[ext] scripte[ncoding] setf[iletype] sh[ell] sim[alt] sm[ap] sni[ff] sor[t] spelli[nfo] spr[evious] start st[op] sunmenu syn ta tabf[ind] tabnew tabr[ewind] tcld[o] tj[ump] tN tr tu[nmenu] undoj[oin] uns[ilent] ve[rsion] vimgrepa[dd] vs[plit] winc[md] wN[ext] ws[verb] x[it] xnoremenu
syn keyword vimCommand contained ab argd ar[gs] bd[elete] bN[ext] breakl[ist] b[uffer] cad cb[uffer] cex[pr] cgete[xpr] checkt[ime] cn cNf comc[lear] co[py] cscope debug d[elete] delf[unction] diffg[et] diffu[pdate] dl ds[earch] echoe[rr] em[enu] en[dif] exu[sage] fin fo[ld] fu grepa[dd] helpc[lose] his[tory] il[ist] iuna[bbrev] keepj[umps] laddb[uffer] lat lcs lf lg[etfile] lla[st] lnew[er] lNf[ile] lockv[ar] ls lvimgrepa[dd] mat[ch] mk[exrc] mo n n[ext] nu[mber] opt[ions] pe[rl] pr prof[ile] ptj[ump] ptp[revious] py3 q r[ead] redraws[tatus] ri[ght] rundo sav[eas] sbN[ext] scrip[tnames] setg[lobal] si sl sme sno[magic] so[urce] spellr[epall] sre[wind] startg[replace] stopi[nsert] sus[pend] sync tab tabfir[st] tabn[ext] tabs tclf[ile] tl[ast] tn[ext] tr[ewind] u undol[ist] up[date] vert[ical] vi[sual] w windo wp[revious] wundo xmapc[lear] xunme
syn keyword vimCommand contained abc[lear] argd[elete] argu[ment] bel[owright] bo[tright] br[ewind] buffers caddb[uffer] cc cf cg[etfile] cl cN cnf[ile] comp[iler] cpf[ile] cstag debugg[reedy] deletel dell diffo[ff] dig dli[st] dsp[lit] echom[sg] en endt[ry] f fina[lly] foldc[lose] fun gui helpf[ind] i imapc[lear] j[oin] kee[pmarks] lad[dexpr] later lcscope lfdo lgr[ep] lli[st] lne[xt] lo lol[der] lt[ag] lw[indow] menut mks[ession] mod[e] nbc[lose] nmapc[lear] o ownsyntax perld[o] pre[serve] promptf[ind] ptl[ast] ptr[ewind] py3do qa[ll] rec[over] reg[isters] rightb[elow] ru[ntime] sba[ll] sbp[revious] scs setl[ocal] sig sla[st] smenu snoreme spe spellu[ndo] st star[tinsert] sts[elect] sv[iew] syncbind tabc[lose] tabl[ast] tabN[ext] ta[g] te[aroff] tm tN[ext] try un unh[ide] v vi viu[sage] wa[ll] winp[os] wq wv[iminfo] xme xunmenu
syn keyword vimCommand contained abo[veleft] argdo as[cii] bf[irst] bp[revious] bro[wse] bun[load] cad[dexpr] ccl[ose] cfdo c[hange] cla[st] cnew[er] cNf[ile] con cp[revious] cuna[bbrev] del deletep delm[arks] diffp[atch] dig[raphs] do e echon endf endw[hile] f[ile] fin[d] folddoc[losed] fu[nction] gvim helpg[rep] ia in ju[mps] keepp[atterns] laddf[ile] lb[uffer] ld[o] lf[ile] lgrepa[dd] lmak[e] lN[ext] loadk lop[en] lua ma menut[ranslate] mksp[ell] m[ove] nb[key] noa ol[dfiles] p po[p] prev[ious] promptr[epl] ptn pts[elect] pydo q[uit] red res[ize] ru rv[iminfo] sbf[irst] sbr[ewind] scscope sf[ind] sign sl[eep] sn[ext] snoremenu spelld[ump] spellw[rong] sta[g] startr[eplace] sun[hide] sw[apname] syntime tabd[o] tabm[ove] tabo[nly] tags tf[irst] tm[enu] to[pleft] ts[elect] una[bbreviate] unl ve vie[w] vmapc[lear] wh[ile] win[size] wqa[ll] x xmenu xwininfo
syn keyword vimCommand contained al[l] arge[dit] au bl[ast] brea[k] bu bw[ipeout] caddf[ile] cd cf[ile] changes cl[ist] cn[ext] col[der] conf[irm] cq[uit] cw[indow] delc[ommand] deletl delp diffpu[t] dir doau ea e[dit] endfo[r] ene[w] files fini[sh] foldd[oopen] g h helpt[ags] iabc[lear] intro k l lan lc[d] le[ft] lfir[st] lh[elpgrep] lmapc[lear] lnf loadkeymap lpf[ile] luado mak[e] mes mkv mz nbs[tart] noautocmd omapc[lear] pc[lose] popu p[rint] ps[earch] ptN pu[t] pyf[ile] quita[ll] redi[r] ret[ab] rub[y] sal[l] sbl[ast] sb[uffer] se[t] sfir[st] sil[ent] sm[agic] sN[ext] so spe[llgood] sp[lit] star stj[ump] sunme sy t tabe[dit] tabN tabp[revious] tc[l] th[row] tn tp[revious] tu u[ndo] unlo[ckvar] verb[ose] vim[grep] vne[w] win wn[ext] w[rite] xa[ll] xnoreme y[ank]
syn keyword vimCommand contained ar argg[lobal] bad[d] bm[odified] breaka[dd] buf c cal[l] cdo cfir[st] chd[ir] clo[se] cN[ext] colo[rscheme] con[tinue] cr[ewind] d delel deletp dep diffs[plit] di[splay] dp earlier el[se] endfun ex filet fir[st] foldo[pen] go[to] ha[rdcopy] hi if is[earch] keepa la lan[guage] lch[dir] lefta[bove] lgetb[uffer] l[ist] lN lNf lo[adview] lp[revious] luafile ma[rk] messages mkvie[w] mzf[ile] ne noh[lsearch] on[ly] pe popu[p] pro pta[g] ptn[ext] pw[d] py[thon] r red[o] retu[rn] rubyd[o] san[dbox] sbm[odified] scrip
syn match vimCommand contained "\<z[-+^.=]\=\>"
syn keyword vimStdPlugin contained DiffOrig Man N[ext] P[rint] S TOhtml XMLent XMLns
" vimOptions are caught only when contained in a vimSet {{{2
syn keyword vimOption contained acd ambw arshape background ballooneval bg bl brk buftype cf cinkeys cmdwinheight com 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 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 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 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 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 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 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 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 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 tcldll 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 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 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 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 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 concealcursor
syn keyword vimOption contained acd ambw arshape background ballooneval bg bl brk buftype cf cinkeys 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 termbidi tgst titleold top ttimeoutlen ttyscroll ul ur verbosefile visualbell wcm wi wildmenu winfixwidth wm wrapscan
syn keyword vimOption contained ai anti autochdir backspace balloonexpr bh bo browsedir casemap cfu cino cms 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 termencoding thesaurus titlestring tpm ttm ttytype undodir ut vfile vop wd wic wildmode winheight wmh write
syn keyword vimOption contained akm antialias autoindent backup bdir bin bomb bs cb ch cinoptions co 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 terse tildeop tl tr tty tw undofile vb vi wa weirdinvert wig wildoptions winminheight wmnu writeany
syn keyword vimOption contained al ar autoread backupcopy bdlay binary breakat bsdir cc charconvert cinw cocu 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 textauto timeout tm ts ttybuiltin tx undolevels vbs viewdir wak wfh wildchar wim winminwidth wmw writebackup
syn keyword vimOption contained aleph arab autowrite backupdir belloff biosk breakindent bsk ccv ci cinwords cole 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 tcldll textmode timeoutlen to tsl ttyfast uc undoreload vdir viewoptions warn wfw wildcharm winaltkeys winwidth wop writedelay
syn keyword vimOption contained allowrevins arabic autowriteall backupext beval bioskey breakindentopt bt cd cin clipboard colorcolumn 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 tenc textwidth title toolbar tsr ttym udf updatecount ve viminfo wb wh wildignore window wiv wrap ws
syn keyword vimOption contained altkeymap arabicshape aw backupskip bex bk bri bufhidden cdpath cindent cmdheight columns 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 term tf titlelen toolbariconsize ttimeout ttymouse udir updatetime verbose virtualedit wc whichwrap wildignorecase winfixheight wiw wrapmargin ww
syn keyword vimOption contained ambiwidth ari awa balloondelay bexpr bkc briopt buflisted cedit cink cmdwinheight com
" vimOptions: These are the turn-off setting variants {{{2
syn keyword vimOption contained noacd noallowrevins noantialias noarabic noarshape noautoread noaw noballooneval nobinary nobk nobreakindent nocf nocindent noconsk nocp nocscopetag nocst nocul nocursorline nodg noea noedcompatible noeol noesckeys noexpandtab nofic nofixeol nofoldenable nogd nohid nohkmap nohls noicon noimc noimdisable noinfercase nojoinspaces nolangnoremap nolbr nolisp nolnr 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
syn keyword vimOption contained noai noaltkeymap noar noarabicshape noautochdir noautowrite noawa nobeval nobiosk nobl nobri noci nocompatible noconskey nocrb nocscopeverbose nocsverb nocursorbind nodeco nodiff noeb noek noequalalways noet noexrc nofileignorecase nofk nofs nogdefault nohidden nohkmapp nohlsearch noignorecase noimcmdline noincsearch noinsertmode nojs nolazyredraw nolinebreak nolist noloadplugins nolz nomacatsui nomh nomod nomodifiable nomore nomousefocus nonu noodev nopaste nopreserveindent noprompt noreadonly noremap norevins norightleft nornu nors noruler nosc noscrollbind nosecure noshellslash noshiftround noshowcmd noshowmatch nosi nosmartcase nosmarttab nosn nospell nosplitright nosr nosta nostmp noswf notagbsearch notagstack notbidi notermbidi notextauto notf notildeop notitle notop nottimeout nottyfast noudf novb nowa nowb nowfh nowic nowildmenu nowinfixwidth nowmnu nowrapscan nowriteany nows
syn keyword vimOption contained noakm noanti noarab noari noautoindent noautowriteall nobackup nobin nobioskey nobomb nobuflisted nocin noconfirm nocopyindent nocscoperelative nocsre nocuc nocursorcolumn nodelcombine nodigraph noed noendofline noerrorbells noex nofen nofixendofline nofkmap nofsync noguipty nohk nohkp noic noim noimd noinf nois
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
syn keyword vimOption contained noai noaltkeymap noar noarabicshape noautochdir noautowrite noawa nobeval nobiosk nobl nocf nocindent noconsk nocp nocscopetag nocst nocul nocursorline nodg noea noedcompatible noeol noesckeys noexpandtab nofic nofixeol nofoldenable noguipty nohk nohkp noic noignorecase noimc noimd noincsearch noinfercase nois nojs nolbr nolisp noloadplugins nolz nomacatsui nomh nomod nomodifiable nomore nomousefocus nonu noodev nopaste nopreserveindent noprompt noreadonly noremap norevins norightleft nornu nors noruler nosc noscrollbind nosecure noshellslash noshiftround noshowcmd noshowmatch nosi nosmartcase nosmarttab nosn nospell nosplitright nosr nosta nostmp noswf notagbsearch notagstack notbidi notermbidi notextauto notf notildeop notitle notop nottimeout nottyfast noudf novb nowa nowb nowfh nowic nowildmenu nowinfixwidth nowmnu nowrapscan nowriteany nows
syn keyword vimOption contained noakm noanti noarab noari noautoindent noautowriteall nobackup nobin nobioskey nobomb noci nocompatible noconskey nocrb nocscopeverbose nocsverb nocursorbind nodeco nodiff noeb noek noequalalways noet noexrc nofileignorecase nofk nogd nohid nohkmap nohls
" vimOptions: These are the invertible variants {{{2
syn keyword vimOption contained invacd invallowrevins invantialias invarabic invarshape invautoread invaw invballooneval invbinary invbk invbreakindent invcf invcindent invconsk invcp invcscopetag invcst invcul invcursorline invdg invea invedcompatible inveol invesckeys invexpandtab invfic invfixeol invfoldenable invgd invhid invhkmap invhls invicon invimc invimdisable invinfercase invjoinspaces invlangnoremap invlbr invlisp invlnr invlpl invma invmagic invml invmodeline invmodified invmousef invmousehide invnumber invopendevice invpi invpreviewwindow invpvw invrelativenumber invrestorescreen invri invrl invro invru invsb invscb invscs invsft invshelltemp invshortname invshowfulltag invshowmode invsm invsmartindent invsmd invsol invsplitbelow invspr invssl invstartofline invswapfile invta invtagrelative invtbi invtbs invterse invtextmode invtgst invtimeout invto invtr invttybuiltin invtx invundofile invvisualbell invwarn invweirdinvert invwfw invwildignorecase invwinfixheight invwiv invwrap invwrite invwritebackup
syn keyword vimOption contained invai invaltkeymap invar invarabicshape invautochdir invautowrite invawa invbeval invbiosk invbl invbri invci invcompatible invconskey invcrb invcscopeverbose invcsverb invcursorbind invdeco invdiff inveb invek invequalalways invet invexrc invfileignorecase invfk invfs invgdefault invhidden invhkmapp invhlsearch invignorecase invimcmdline invincsearch invinsertmode invjs invlazyredraw invlinebreak invlist invloadplugins invlz invmacatsui invmh invmod invmodifiable invmore invmousefocus invnu invodev invpaste invpreserveindent invprompt invreadonly invremap invrevins invrightleft invrnu invrs invruler invsc invscrollbind invsecure invshellslash invshiftround invshowcmd invshowmatch invsi invsmartcase invsmarttab invsn invspell invsplitright invsr invsta invstmp invswf invtagbsearch invtagstack invtbidi invtermbidi invtextauto invtf invtildeop invtitle invtop invttimeout invttyfast invudf invvb invwa invwb invwfh invwic invwildmenu invwinfixwidth invwmnu invwrapscan invwriteany invws
syn keyword vimOption contained invakm invanti invarab invari invautoindent invautowriteall invbackup invbin invbioskey invbomb invbuflisted invcin invconfirm invcopyindent invcscoperelative invcsre invcuc invcursorcolumn invdelcombine invdigraph inved invendofline inverrorbells invex invfen invfixendofline invfkmap invfsync invguipty invhk invhkp invic invim invimd invinf invis
syn keyword vimOption contained invacd invallowrevins invantialias invarabic invarshape invautoread invaw invballooneval invbinary invbk invbuflisted invcin invconfirm invcopyindent invcscoperelative invcsre invcuc invcursorcolumn invdelcombine invdigraph inved invendofline inverrorbells invex invfen invfixendofline invfkmap invgdefault invhidden invhkmapp invhlsearch invicon invim invimcmdline invimdisable invinf invinsertmode invjoinspaces invlazyredraw invlinebreak invlist invlpl invma invmagic invml invmodeline invmodified invmousef invmousehide invnumber invopendevice invpi invpreviewwindow invpvw invrelativenumber invrestorescreen invri invrl invro invru invsb invscb invscs invsft invshelltemp invshortname invshowfulltag invshowmode invsm invsmartindent invsmd invsol invsplitbelow invspr invssl invstartofline invswapfile invta invtagrelative invtbi invtbs invterse invtextmode invtgst invtimeout invto invtr invttybuiltin invtx invundofile invvisualbell invwarn invweirdinvert invwfw invwildignorecase invwinfixheight invwiv invwrap invwrite invwritebackup
syn keyword vimOption contained invai invaltkeymap invar invarabicshape invautochdir invautowrite invawa invbeval invbiosk invbl invcf invcindent invconsk invcp invcscopetag invcst invcul invcursorline invdg invea invedcompatible inveol invesckeys invexpandtab invfic invfixeol invfoldenable invguipty invhk invhkp invic invignorecase invimc invimd invincsearch invinfercase invis invjs invlbr invlisp invloadplugins invlz invmacatsui invmh invmod invmodifiable invmore invmousefocus invnu invodev invpaste invpreserveindent invprompt invreadonly invremap invrevins invrightleft invrnu invrs invruler invsc invscrollbind invsecure invshellslash invshiftround invshowcmd invshowmatch invsi invsmartcase invsmarttab invsn invspell invsplitright invsr invsta invstmp invswf invtagbsearch invtagstack invtbidi invtermbidi invtextauto invtf invtildeop invtitle invtop invttimeout invttyfast invudf invvb invwa invwb invwfh invwic invwildmenu invwinfixwidth invwmnu invwrapscan invwriteany invws
syn keyword vimOption contained invakm invanti invarab invari invautoindent invautowriteall invbackup invbin invbioskey invbomb invci invcompatible invconskey invcrb invcscopeverbose invcsverb invcursorbind invdeco invdiff inveb invek invequalalways invet invexrc invfileignorecase invfk invgd invhid invhkmap invhls
" termcap codes (which can also be set) {{{2
syn keyword vimOption contained t_AB t_al t_bc t_ce t_cl t_Co t_Cs t_CV t_db t_DL t_EI t_F1 t_F2 t_F3 t_F4 t_F5 t_F6 t_F7 t_F8 t_F9 t_fs t_IE t_IS t_k1 t_K1 t_k2 t_k3 t_K3 t_k4 t_K4 t_k5 t_K5 t_k6 t_K6 t_k7 t_K7 t_k8 t_K8 t_k9 t_K9 t_KA t_kb t_kB t_KB t_KC t_kd t_kD t_KD t_ke t_KE t_KF t_KG t_kh t_KH t_kI t_KI t_KJ t_KK t_kl t_KL t_kN t_kP t_kr t_ks t_ku t_le t_mb t_md t_me t_mr t_ms t_nd t_op t_RB t_RI t_RV t_Sb t_se t_Sf t_SI t_so t_sr t_SR t_te t_ti t_ts t_u7 t_ue t_us t_ut t_vb t_ve t_vi t_vs t_WP t_WS t_xn t_xs t_ZH t_ZR
syn keyword vimOption contained t_AF t_AL t_cd t_Ce t_cm t_cs t_CS t_da t_dl
syn keyword vimOption contained t_AB t_al t_bc t_ce t_cl t_Co t_Cs t_CV t_db t_dl t_DL t_EI t_F1 t_F2 t_F3 t_F4 t_F5 t_F6 t_F7 t_F8 t_F9 t_fs t_IE t_IS t_k1 t_K1 t_k2 t_k3 t_K3 t_k4 t_K4 t_k5 t_K5 t_k6 t_K6 t_k7 t_K7 t_k8 t_K8 t_k9 t_K9 t_KA t_kb t_kB t_KB t_KC t_kd t_kD t_KD t_ke t_KE t_KF t_KG t_kh t_KH t_kI t_KI t_KJ t_KK t_kl t_KL t_kN t_kP t_kr t_ks t_ku t_le t_mb t_md t_me t_mr t_ms t_nd t_op t_RI t_RV t_Sb t_se t_Sf t_SI t_so t_sr t_SR t_te t_ti t_ts t_u7 t_ue t_us t_ut t_vb t_ve t_vi t_vs t_WP t_WS t_xn t_xs t_ZH t_ZR
syn keyword vimOption contained t_AF t_AL t_cd t_Ce t_cm t_cs t_CS t_da
syn match vimOption contained "t_%1"
syn match vimOption contained "t_#2"
syn match vimOption contained "t_#4"
@@ -76,51 +75,51 @@ syn match vimHLGroup contained "Conceal"
syn case match
" Function Names {{{2
syn keyword vimFuncName contained abs alloc_fail argc argv assert_exception assert_true browse buflisted bufnr byteidx ceil cindent complete confirm cosh cursor did_filetype empty eventhandler exists expr8 filereadable finddir floor fnamemodify foldlevel foreground get getchar getcmdline getcmdwintype getfontname getftime getloclist getpos getregtype getwinposx glob has hasmapto histget hlID indent inputdialog inputsave invert items len line localtime luaeval mapcheck matchaddpos matchend max mode nr2char perleval printf pyeval reltime remote_foreground remote_send repeat round screencol searchdecl searchpos setbufvar setline setpos settabvar sha256 simplify sort spellsuggest str2float strdisplaywidth string strridx submatch synID synIDtrans system tabpagebuflist tabpagewinnr taglist tanh tolower tr type undotree values visualmode winbufnr winheight winnr winrestview winwidth writefile
syn keyword vimFuncName contained acos and argidx asin assert_fails atan browsedir bufloaded bufwinnr byteidxcomp changenr clearmatches complete_add copy count deepcopy diff_filler escape executable exp extend filewritable findfile fmod foldclosed foldtext function getbufline getcharmod getcmdpos getcurpos getfperm getftype getmatches getqflist gettabvar getwinposy glob2regpat has_key histadd histnr hostname index inputlist inputsecret isdirectory join libcall line2byte log map match matcharg matchlist min mzeval or pow pumvisible range reltimestr remote_peek remove resolve screenattr screenrow searchpair server2client setcharsearch setloclist setqflist settabwinvar shellescape sin soundfold split str2nr strftime strlen strtrans substitute synIDattr synstack systemlist tabpagenr tagfiles tan tempname toupper trunc undofile uniq virtcol wildmenumode wincol winline winrestcmd winsaveview wordcount xor
syn keyword vimFuncName contained add append arglistid assert_equal assert_false atan2 bufexists bufname byte2line call char2nr col complete_check cos cscope_connection delete diff_hlID eval exepath expand feedkeys filter float2nr fnameescape foldclosedend foldtextresult garbagecollect getbufvar getcharsearch getcmdtype getcwd getfsize getline getpid getreg gettabwinvar getwinvar globpath haslocaldir histdel hlexists iconv input inputrestore insert islocked keys libcallnr lispindent log10 maparg matchadd matchdelete matchstr mkdir nextnonblank pathshorten prevnonblank py3eval readfile remote_expr remote_read rename reverse screenchar search searchpairpos serverlist setcmdpos setmatches setreg setwinvar shiftwidth sinh spellbadword sqrt strchars stridx strpart strwidth synconcealed
syn keyword vimFuncName contained abs alloc_fail argc argv assert_exception assert_true browse buflisted bufnr byteidx ceil cindent complete confirm cos cscope_connection delete diff_hlID eval exepath expand feedkeys filter float2nr fnameescape foldclosedend foldtextresult garbagecollect getbufvar getcharsearch getcmdtype getcwd getfsize getline getpid getreg gettabwinvar getwinvar globpath haslocaldir histdel hlexists iconv input inputrestore insert islocked jsondecode len line localtime luaeval mapcheck matchaddpos matchend max mode nr2char perleval printf pyeval reltime remote_foreground remote_send repeat round screencol searchdecl searchpos server2client setcharsearch setloclist setqflist settabwinvar shellescape sin soundfold split str2nr strftime strlen strtrans substitute synIDattr system tabpagenr taglist tanh tolower tr type undotree values visualmode winbufnr winheight winnr winrestview winwidth writefile
syn keyword vimFuncName contained acos and argidx asin assert_fails atan browsedir bufloaded bufwinnr byteidxcomp changenr clearmatches complete_add connect cosh cursor did_filetype empty eventhandler exists expr8 filereadable finddir floor fnamemodify foldlevel foreground get getchar getcmdline getcmdwintype getfontname getftime getloclist getpos getregtype getwinposx glob has hasmapto histget hlID indent inputdialog inputsave invert items jsonencode libcall line2byte log map match matcharg matchlist min mzeval or pow pumvisible range reltimestr remote_peek remove resolve screenattr screenrow searchpair sendexpr serverlist setcmdpos setmatches setreg setwinvar shiftwidth sinh spellbadword sqrt strchars stridx strpart strwidth synconcealed synIDtrans systemlist tabpagewinnr tan tempname toupper trunc undofile uniq virtcol wildmenumode wincol winline winrestcmd winsaveview wordcount xor
syn keyword vimFuncName contained add append arglistid assert_equal assert_false atan2 bufexists bufname byte2line call char2nr col complete_check copy count deepcopy diff_filler escape executable exp extend filewritable findfile fmod foldclosed foldtext function getbufline getcharmod getcmdpos getcurpos getfperm getftype getmatches getqflist gettabvar getwinposy glob2regpat has_key histadd histnr hostname index inputlist inputsecret isdirectory join keys libcallnr lispindent log10 maparg matchadd matchdelete matchstr mkdir nextnonblank pathshorten prevnonblank py3eval readfile remote_expr remote_read rename reverse screenchar search searchpairpos sendraw setbufvar setline setpos settabvar sha256 simplify sort spellsuggest str2float strdisplaywidth string strridx submatch synID synstack tabpagebuflist tagfiles
"--- syntax here and above generated by mkvimvim ---
" Special Vim Highlighting (not automatic) {{{1
" Set up folding commands
if exists("g:vimsyn_folding") && g:vimsyn_folding =~ '[aflmpPrt]'
if g:vimsyn_folding =~ 'a'
if exists("g:vimsyn_folding") && g:vimsyn_folding =~# '[aflmpPrt]'
if g:vimsyn_folding =~# 'a'
com! -nargs=* VimFolda <args> fold
else
com! -nargs=* VimFolda <args>
endif
if g:vimsyn_folding =~ 'f'
if g:vimsyn_folding =~# 'f'
com! -nargs=* VimFoldf <args> fold
else
com! -nargs=* VimFoldf <args>
endif
if g:vimsyn_folding =~ 'l'
if g:vimsyn_folding =~# 'l'
com! -nargs=* VimFoldl <args> fold
else
com! -nargs=* VimFoldl <args>
endif
if g:vimsyn_folding =~ 'm'
if g:vimsyn_folding =~# 'm'
com! -nargs=* VimFoldm <args> fold
else
com! -nargs=* VimFoldm <args>
endif
if g:vimsyn_folding =~ 'p'
if g:vimsyn_folding =~# 'p'
com! -nargs=* VimFoldp <args> fold
else
com! -nargs=* VimFoldp <args>
endif
if g:vimsyn_folding =~ 'P'
if g:vimsyn_folding =~# 'P'
com! -nargs=* VimFoldP <args> fold
else
com! -nargs=* VimFoldP <args>
endif
if g:vimsyn_folding =~ 'r'
if g:vimsyn_folding =~# 'r'
com! -nargs=* VimFoldr <args> fold
else
com! -nargs=* VimFoldr <args>
endif
if g:vimsyn_folding =~ 't'
if g:vimsyn_folding =~# 't'
com! -nargs=* VimFoldt <args> fold
else
com! -nargs=* VimFoldt <args>
@@ -191,7 +190,7 @@ syn keyword vimFTOption contained detect indent off on plugin
" Augroup : vimAugroupError removed because long augroups caused sync'ing problems. {{{2
" ======= : Trade-off: Increasing synclines with slower editing vs augroup END error checking.
syn cluster vimAugroupList contains=vimAugroup,vimIsCommand,vimCommand,vimUserCmd,vimExecute,vimNotFunc,vimFuncName,vimFunction,vimFunctionError,vimLineComment,vimMap,vimSpecFile,vimOper,vimNumber,vimOperParen,vimComment,vimString,vimSubst,vimMark,vimRegister,vimAddress,vimFilter,vimCmplxRepeat,vimComment,vimLet,vimSet,vimAutoCmd,vimRegion,vimSynLine,vimNotation,vimCtrlChar,vimFuncVar,vimContinue
if exists("g:vimsyn_folding") && g:vimsyn_folding =~ 'a'
if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'a'
syn region vimAugroup fold matchgroup=vimAugroupKey start="\<aug\%[roup]\>\ze\s\+\K\k*" end="\<aug\%[roup]\>\ze\s\+[eE][nN][dD]\>" contains=vimAutoCmd,@vimAugroupList
else
syn region vimAugroup matchgroup=vimAugroupKey start="\<aug\%[roup]\>\ze\s\+\K\k*" end="\<aug\%[roup]\>\ze\s\+[eE][nN][dD]\>" contains=vimAutoCmd,@vimAugroupList
@@ -219,7 +218,7 @@ syn cluster vimFuncList contains=vimCommand,vimFunctionError,vimFuncKey,Tag,vimF
syn cluster vimFuncBodyList contains=vimAbb,vimAddress,vimAugroupKey,vimAutoCmd,vimCmplxRepeat,vimComment,vimComment,vimContinue,vimCtrlChar,vimEcho,vimEchoHL,vimExecute,vimIf,vimIsCommand,vimFBVar,vimFunc,vimFunction,vimFuncVar,vimGlobal,vimHighlight,vimIsCommand,vimLet,vimLineComment,vimMap,vimMark,vimNorm,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegion,vimRegister,vimSet,vimSpecFile,vimString,vimSubst,vimSynLine,vimUnmap,vimUserCommand
syn match vimFunction "\<fu\%[nction]!\=\s\+\%(<[sS][iI][dD]>\|[sSgGbBwWtTlL]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)*\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody
if exists("g:vimsyn_folding") && g:vimsyn_folding =~ 'f'
if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'f'
syn region vimFuncBody contained fold start="\ze\s*(" matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\)" contains=@vimFuncBodyList
else
syn region vimFuncBody contained start="\ze\s*(" matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\)" contains=@vimFuncBodyList
@@ -303,7 +302,7 @@ syn cluster vimSubstList contains=vimPatSep,vimPatRegion,vimPatSepErr,vimSubstTw
syn cluster vimSubstRepList contains=vimSubstSubstr,vimSubstTwoBS,vimNotation
syn cluster vimSubstList add=vimCollection
syn match vimSubst "\(:\+\s*\|^\s*\||\s*\)\<\%(s\%[ubstitute]\|sm\%[agic]\|sno\%[magic]\)[:[:alpha:]]\@!" nextgroup=vimSubstPat
syn match vimSubst "s\%[ubstitute][:#[:alpha:]]\@!" nextgroup=vimSubstPat contained
syn match vimSubst "\%(^\|[^\\]\)s\%[ubstitute][:#[:alpha:]]\@!" nextgroup=vimSubstPat contained
syn match vimSubst "/\zss\%[ubstitute]\ze/" nextgroup=vimSubstPat
syn match vimSubst1 contained "s\%[ubstitute]\>" nextgroup=vimSubstPat
syn region vimSubstPat contained matchgroup=vimSubstDelim start="\z([^a-zA-Z( \t[\]&]\)"rs=s+1 skip="\\\\\|\\\z1" end="\z1"re=e-1,me=e-1 contains=@vimSubstList nextgroup=vimSubstRep4 oneline
@@ -612,12 +611,12 @@ syn region vimGlobal matchgroup=Statement start='\<v\%[global]!\=/' skip='\\.' e
" Allows users to specify the type of embedded script highlighting
" they want: (perl/python/ruby/tcl support)
" g:vimsyn_embed == 0 : don't embed any scripts
" g:vimsyn_embed =~ 'l' : embed lua (but only if vim supports it)
" g:vimsyn_embed =~ 'm' : embed mzscheme (but only if vim supports it)
" g:vimsyn_embed =~ 'p' : embed perl (but only if vim supports it)
" g:vimsyn_embed =~ 'P' : embed python (but only if vim supports it)
" g:vimsyn_embed =~ 'r' : embed ruby (but only if vim supports it)
" g:vimsyn_embed =~ 't' : embed tcl (but only if vim supports it)
" g:vimsyn_embed =~# 'l' : embed lua (but only if vim supports it)
" g:vimsyn_embed =~# 'm' : embed mzscheme (but only if vim supports it)
" g:vimsyn_embed =~# 'p' : embed perl (but only if vim supports it)
" g:vimsyn_embed =~# 'P' : embed python (but only if vim supports it)
" g:vimsyn_embed =~# 'r' : embed ruby (but only if vim supports it)
" g:vimsyn_embed =~# 't' : embed tcl (but only if vim supports it)
if !exists("g:vimsyn_embed")
let g:vimsyn_embed= "lmpPr"
endif
@@ -632,7 +631,7 @@ if !filereadable(s:luapath)
endif
endfor
endif
if (g:vimsyn_embed =~ 'l' && has("lua")) && filereadable(s:luapath)
if (g:vimsyn_embed =~# 'l' && has("lua")) && filereadable(s:luapath)
unlet! b:current_syntax
exe "syn include @vimLuaScript ".s:luapath
VimFoldl syn region vimLuaRegion matchgroup=vimScriptDelim start=+lua\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimLuaScript
@@ -654,7 +653,7 @@ if !filereadable(s:perlpath)
endif
endfor
endif
if (g:vimsyn_embed =~ 'p' && has("perl")) && filereadable(s:perlpath)
if (g:vimsyn_embed =~# 'p' && has("perl")) && filereadable(s:perlpath)
unlet! b:current_syntax
exe "syn include @vimPerlScript ".s:perlpath
VimFoldp syn region vimPerlRegion matchgroup=vimScriptDelim start=+pe\%[rl]\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimPerlScript
@@ -676,7 +675,7 @@ if !filereadable(s:rubypath)
endif
endfor
endif
if (g:vimsyn_embed =~ 'r' && has("ruby")) && filereadable(s:rubypath)
if (g:vimsyn_embed =~# 'r' && has("ruby")) && filereadable(s:rubypath)
unlet! b:current_syntax
exe "syn include @vimRubyScript ".s:rubypath
VimFoldr syn region vimRubyRegion matchgroup=vimScriptDelim start=+rub[y]\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimRubyScript
@@ -698,7 +697,7 @@ if !filereadable(s:pythonpath)
endif
endfor
endif
if g:vimsyn_embed =~ 'P' && (has("python") || has("python3")) && filereadable(s:pythonpath)
if g:vimsyn_embed =~# 'P' && (has("python") || has("python3")) && filereadable(s:pythonpath)
unlet! b:current_syntax
exe "syn include @vimPythonScript ".s:pythonpath
VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+py\%[thon]3\=\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimPythonScript
@@ -729,7 +728,7 @@ if s:trytcl
endif
endfor
endif
if (g:vimsyn_embed =~ 't' && has("tcl")) && filereadable(s:tclpath)
if (g:vimsyn_embed =~# 't' && has("tcl")) && filereadable(s:tclpath)
unlet! b:current_syntax
exe "syn include @vimTclScript ".s:tclpath
VimFoldt syn region vimTclRegion matchgroup=vimScriptDelim start=+tc[l]\=\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimTclScript
@@ -756,7 +755,7 @@ if !filereadable(s:mzschemepath)
endif
endfor
endif
if (g:vimsyn_embed =~ 'm' && has("mzscheme")) && filereadable(s:mzschemepath)
if (g:vimsyn_embed =~# 'm' && has("mzscheme")) && filereadable(s:mzschemepath)
unlet! b:current_syntax
let iskKeep= &isk
exe "syn include @vimMzSchemeScript ".s:mzschemepath
+18 -7
View File
@@ -2,7 +2,7 @@
" Language: Zsh shell script
" Maintainer: Christian Brabandt <cb@256bit.org>
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2016-01-25
" Latest Revision: 2016-02-15
" License: Vim (see :h license)
" Repository: https://github.com/chrisbra/vim-zsh
@@ -13,20 +13,29 @@ endif
let s:cpo_save = &cpo
set cpo&vim
setlocal iskeyword+=-
setlocal foldmethod=syntax
if v:version > 704 || (v:version == 704 && has("patch1142"))
syn iskeyword @,48-57,_,192-255,#,-
else
setlocal iskeyword+=-
endif
if get(g:, 'zsh_fold_enable', 0)
setlocal foldmethod=syntax
endif
syn keyword zshTodo contained TODO FIXME XXX NOTE
syn region zshComment oneline start='\%(^\|\s*\)#' end='$'
\ contains=zshTodo,@Spell
\ contains=zshTodo,@Spell fold
syn region zshComment start='^\s*#' end='^\%(\s*#\)\@!'
\ contains=zshTodo,@Spell fold
syn match zshPreProc '^\%1l#\%(!\|compdef\|autoload\).*$'
syn match zshQuoted '\\.'
syn region zshString matchgroup=zshStringDelimiter start=+"+ end=+"+
\ contains=zshQuoted,@zshDerefs,@zshSubst
syn region zshString matchgroup=zshStringDelimiter start=+'+ end=+'+
\ contains=zshQuoted,@zshDerefs,@zshSubst fold
syn region zshString matchgroup=zshStringDelimiter start=+'+ end=+'+ fold
" XXX: This should probably be more precise, but Zsh seems a bit confused about it itself
syn region zshPOSIXString matchgroup=zshStringDelimiter start=+\$'+
\ end=+'+ contains=zshQuoted
@@ -46,7 +55,7 @@ syn keyword zshException always
syn keyword zshKeyword function nextgroup=zshKSHFunction skipwhite
syn match zshKSHFunction contained '\k\+'
syn match zshKSHFunction contained '\w\S\+'
syn match zshFunction '^\s*\k\+\ze\s*()'
syn match zshOperator '||\|&&\|;\|&!\='
@@ -317,6 +326,8 @@ syn region zshMathSubst matchgroup=zshSubstDelim transparent
\ @zshDerefs,zshString keepend fold
syn region zshBrackets contained transparent start='{' skip='\\}'
\ end='}' fold
syn region zshBrackets transparent start='{' skip='\\}'
\ end='}' contains=TOP fold
syn region zshSubst matchgroup=zshSubstDelim start='\${' skip='\\}'
\ end='}' contains=@zshSubst,zshBrackets,zshQuoted,zshString fold
syn region zshOldSubst matchgroup=zshSubstDelim start=+`+ skip=+\\`+
+1 -1
View File
@@ -2,7 +2,7 @@
#
# Server that will accept connections from a Vim channel.
# Run this server and then in Vim you can open the channel:
# :let handle = ch_open('localhost:8765', 'json')
# :let handle = ch_open('localhost:8765')
#
# Then Vim can send requests to the server:
# :let response = ch_sendexpr(handle, 'hello!')
+22 -6
View File
@@ -158,6 +158,7 @@ HBITMAP IconToBitmap(HICON hIcon, HBRUSH hBackground, int width, int height)
# define VIMPACKAGE "vim"
# ifndef GETTEXT_DLL
# define GETTEXT_DLL "libintl.dll"
# define GETTEXT_DLL_ALT "libintl-8.dll"
# endif
// Dummy functions
@@ -194,21 +195,36 @@ dyn_libintl_init(char *dir)
{(char *)"bindtextdomain", (FARPROC*)&dyn_libintl_bindtextdomain},
{NULL, NULL}
};
DWORD len, len2;
LPWSTR buf = NULL;
LPWSTR buf2 = NULL;
// No need to initialize twice.
if (hLibintlDLL)
return 1;
// Load gettext library, first try the Vim runtime directory, then search
// the path.
strcat(dir, GETTEXT_DLL);
hLibintlDLL = LoadLibrary(dir);
if (!hLibintlDLL)
// Load gettext library from the Vim runtime directory.
// Add the directory to $PATH temporarily.
len = GetEnvironmentVariableW(L"PATH", NULL, 0);
len2 = MAX_PATH + 1 + len;
buf = (LPWSTR)malloc(len * sizeof(WCHAR));
buf2 = (LPWSTR)malloc(len2 * sizeof(WCHAR));
if (buf != NULL && buf2 != NULL)
{
GetEnvironmentVariableW(L"PATH", buf, len);
_snwprintf(buf2, len2, L"%S;%s", dir, buf);
SetEnvironmentVariableW(L"PATH", buf2);
hLibintlDLL = LoadLibrary(GETTEXT_DLL);
#ifdef GETTEXT_DLL_ALT
if (!hLibintlDLL)
return 0;
hLibintlDLL = LoadLibrary(GETTEXT_DLL_ALT);
#endif
SetEnvironmentVariableW(L"PATH", buf);
}
free(buf);
free(buf2);
if (!hLibintlDLL)
return 0;
// Get the addresses of the functions we need.
for (i = 0; libintl_entry[i].name != NULL
+1
View File
@@ -42,6 +42,7 @@
#include <windows.h>
#include <windowsx.h>
#include <shlobj.h>
#include <wchar.h>
/* Accommodate old versions of VC that don't have a modern Platform SDK */
#if (defined(_MSC_VER) && _MSC_VER < 1300) || !defined(MAXULONG_PTR)
+2 -53
View File
@@ -686,64 +686,13 @@ Or when using MinGW (as one line):
13. Windows 3.1x
================
make -f Make_w16.mak 16 bit, Borland C++ 5.0
Warning: Be sure to use the right make.exe. It should be Borland make.
You will almost certainly have to change the paths for libs and include files
in the Makefile. Look for "D:\BC5" and "ctl3dv2". You will get a number of
warnings which can be ignored ( _chmod, precompiled header files, and
"possibly incorrect assignment").
The makefile should also work for BC++ 4.0 and 4.5, but may need tweaking to
remove unsupported compiler & liker options.
For making the Win32s version, you need Microsoft Visual C++ 4.1 OR EARLIER.
In MSVC 4.2 support for Win32s was dropped! Use this command:
nmake -f Make_mvc.mak GUI=yes
The Windows 3.1x support was removed in patch 7.4.1364.
14. MS-DOS
==========
Summary:
ren Make_bc3.mak Makefile; make 16 bit, Borland C++ and Turbo C++
ren Make_tcc.mak Makefile; make 16 bit, Turbo C
make -f Make_djg.mak 32 bit, DJGPP 2.0
make -f Make_bc5.mak 32 bit, Borland C++ 5.x (edit it to
define DOS)
Warning: Be sure to use the right make.exe. Microsoft C make doesn't work;
Borland make only works with Make_bc3.mak, Make_bc5.mak and Make_tcc.mak;
DJGPP/GNU make must be used for Make_djg.mak.
The Borland C++ compiler has been used to generate the MS-DOS executable; it
should work without problems. You will probably have to change the paths for
LIBPATH and INCLUDEPATH in the start of the Makefile. You will get two
warnings which can be ignored (one about _chmod and one about precompiled
header files).
The "spawno" library by Ralf Brown was used in order to free memory when Vim
starts a shell or other external command. Only about 200 bytes are taken from
conventional memory. When recompiling get the spawno library from Simtel,
directory "msdos/c". It is called something like "spwno413.zip". Or follow
the instructions in the Makefile to remove the library.
The Turbo C Makefile has not been tested much lately. It is included for those
that don't have C++. You may need to make a few changes to get it to work.
DJGPP needs to be installed properly to compile Vim; you need a lot of things
before it works. When your setup is OK, Vim should compile with just one
warning (about an argument to signal()).
Make_bc5.mak is for those that have Borland C++ 5.0 or later. At the top of
the file, there are some variables you can change to make either a 32-bit
Windows exe (GUI or console mode), or a 16-bit MS-DOS version.
NOTE: multi-byte support is broken in the Borland libraries, not everything
will work properly! Esp. handling multi-byte file names.
If you get all kinds of strange error messages when compiling, try changing
the file format from "unix" to "dos".
The MS-DOS support was removed in patch 7.4.1399.
15. Installing after building from sources
+1 -1
View File
@@ -1255,7 +1255,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>97</string>
<string>98</string>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
+1 -1
View File
@@ -155,7 +155,7 @@ extern NSTimeInterval MMBalloonEvalInternalDelay;
- (BOOL)imState;
- (void)setImState:(BOOL)activated;
- (void *)addChannel:(channel_T *)channel which:(int)which;
- (void *)addChannel:(channel_T *)channel part:(int)part;
- (void)removeChannel:(void *)cookie;
#ifdef FEAT_BEVAL
+12 -12
View File
@@ -165,12 +165,12 @@ extern GuiFont gui_mch_retain_font(GuiFont font);
@interface MMChannel : NSObject {
channel_T *channel;
int which;
int part;
CFSocketRef socket;
CFRunLoopSourceRef runLoopSource;
}
- (id)initWithChannel:(channel_T *)c which:(int)w;
- (id)initWithChannel:(channel_T *)c part:(int)p;
- (void)read;
@end
@@ -1685,16 +1685,16 @@ extern GuiFont gui_mch_retain_font(GuiFont font);
[self flushQueue:YES];
}
- (void *)addChannel:(channel_T *)channel which:(int)which
- (void *)addChannel:(channel_T *)channel part:(int)part
{
MMChannel *mmChannel =
[[MMChannel alloc] initWithChannel:channel which:which];
return (__bridge void *)mmChannel;
[[MMChannel alloc] initWithChannel:channel part:part];
return (void *)mmChannel;
}
- (void)removeChannel:(void *)cookie
{
MMChannel *mmChannel = (__bridge MMChannel *)cookie;
MMChannel *mmChannel = (MMChannel *)cookie;
[mmChannel release];
}
@@ -3428,22 +3428,22 @@ static void socketReadCallback(CFSocketRef s,
const void *data,
void *info)
{
MMChannel *mmChannel = (__bridge MMChannel *)info;
MMChannel *mmChannel = (MMChannel *)info;
[mmChannel read];
}
- (id)initWithChannel:(channel_T *)c which:(int)w
- (id)initWithChannel:(channel_T *)c part:(int)p
{
self = [super init];
if (!self) return nil;
channel = c;
which = w;
part = p;
// Tell CFRunLoop that we are interested in channel socket input.
CFSocketContext ctx = {0, (__bridge void *)self, NULL, NULL, NULL};
CFSocketContext ctx = {0, (void *)self, NULL, NULL, NULL};
socket = CFSocketCreateWithNative(kCFAllocatorDefault,
channel->ch_pfd[which].ch_fd,
channel->ch_part[part].ch_fd,
kCFSocketReadCallBack,
&socketReadCallback,
&ctx);
@@ -3460,7 +3460,7 @@ static void socketReadCallback(CFSocketRef s,
- (void)read
{
#ifdef FEAT_CHANNEL
channel_read(channel, which, "MMChannel_read");
channel_read(channel, part, "MMChannel_read");
#endif
}
+2 -2
View File
@@ -2242,9 +2242,9 @@ static int vimModMaskToEventModifierFlags(int mods)
// -- Channel Support ------------------------------------------------------
void *
gui_macvim_add_channel(channel_T *channel, int which)
gui_macvim_add_channel(channel_T *channel, int part)
{
return [[MMBackend sharedInstance] addChannel:channel which:which];
return [[MMBackend sharedInstance] addChannel:channel part:part];
}
void
-184
View File
@@ -1,184 +0,0 @@
# Makefile for Borland C++ 3.1 or 4.0 to compile a 16 bit version of Vim.
#
# NOTE: THIS IS OLD AND PROBABLY NO LONGER WORKS.
#
# There are compilation options at the end of this file.
#
# Command line variables:
# BOR path to root of Borland C (E:\BORLANDC)
# DEBUG set to "yes" for debugging (no)
# SPAWNO path to the spawno library directory, empty if you do not have
# it; use 8.3 filenames! (C:\CC\SPAWN)
.AUTODEPEND
!ifndef BOR
BOR = E:\BORLANDC
!endif
!if ("$(DEBUG)" == "yes")
DEBUG_FLAG = -v
!else
DEBUG_FLAG =
!endif
CC = $(BOR)\bin\bcc.exe +VIM.CFG
TLINK = $(BOR)\bin\tlink.exe
!ifndef SPAWNO
SPAWNO = C:\CC\SPAWN
!endif
!if ("$(SPAWNO)" == "")
LIBPATH = $(BOR)\LIB
INCLUDEPATH = $(BOR)\INCLUDE
SPAWND =
SPAWNL =
!else
LIBPATH = $(BOR)\LIB;$(SPAWNO)
INCLUDEPATH = $(BOR)\INCLUDE;$(SPAWNO)
SPAWND = ;SPAWNO
SPAWNL = spawnl.lib
!endif
# *Implicit Rules*
#
# use -v for debugging
#
.c.obj:
$(CC) -c $(DEBUG_FLAG) {$< }
# *List Macros*
EXE_dependencies = \
blowfish.obj \
buffer.obj \
charset.obj \
crypt.obj \
crypt_zip.obj \
diff.obj \
digraph.obj \
edit.obj \
eval.obj \
ex_cmds.obj \
ex_cmds2.obj \
ex_docmd.obj \
ex_eval.obj \
ex_getln.obj \
fileio.obj \
fold.obj \
getchar.obj \
hardcopy.obj \
hashtab.obj \
json.obj \
main.obj \
mark.obj \
memfile.obj \
memline.obj \
menu.obj \
message.obj \
misc1.obj \
misc2.obj \
move.obj \
os_msdos.obj \
normal.obj \
ops.obj \
option.obj \
popupmnu.obj \
quickfix.obj \
regexp.obj \
screen.obj \
search.obj \
sha256.obj \
spell.obj \
syntax.obj \
tag.obj \
term.obj \
ui.obj \
undo.obj \
window.obj
all: vim.exe install.exe uninstal.exe xxd/xxd.exe
# *Explicit Rules*
vim.exe: vim.cfg $(EXE_dependencies) version.c
$(CC) $(DEBUG_FLAG) -c version.c
$(TLINK) /x/c/L$(LIBPATH) $(DEBUG_FLAG) @&&|
c0l.obj $(EXE_dependencies) version.obj
vim
# no map file
$(SPAWNL) cl.lib
|
install.exe: dosinst.c
$(CC) -einstall $(DEBUG_FLAG) dosinst.c
uninstal.exe: uninstal.c
$(CC) $(DEBUG_FLAG) uninstal.c
# This may fail for older make versions, building xxd will fail anyway then.
xxd/xxd.exe: xxd/xxd.c
cd xxd
$(MAKE) -f Make_bc3.mak BOR=$(BOR) DEBUG=$(DEBUG)
cd ..
# cleaning up: Delete all generated files
clean:
-del *.obj
-del vim.exe
-del vim.sym
-del install.exe
-del uninstal.exe
-del xxd\*.obj
-del xxd\xxd.exe
-del vim.cfg
-del testdir\*.out
# Individual File Dependencies (incomplete)
ex_docmd.obj: ex_docmd.c ex_cmds.h
ex_eval.obj: ex_eval.c ex_cmds.h
main.obj: main.c globals.h option.h
term.obj: term.c term.h
version.obj: version.c version.h
# Compiler Configuration File
#
# The following compile options can be changed for better machines.
# replace -1- with -2 to produce code for a 80286 or higher
# replace -1- with -3 to produce code for a 80386 or higher
# add -v for source debugging
vim.cfg: Make_bc3.mak
copy &&|
-ml
-1-
-f-
-C
-N
-O
-Z
-k-
-d
-h
-vi-
-H=VIM.SYM
-w-par
-weas
-wpre
-Iproto
-I$(INCLUDEPATH)
-L$(LIBPATH)
-DMSDOS;FEAT_TINY$(SPAWND)
| vim.cfg
test:
cd testdir
$(MAKE) -f Make_dos.mak small
cd ..
+8 -97
View File
@@ -7,6 +7,7 @@
#
# Contributed by Ben Singer.
# Updated 4/1997 by Ron Aaron
# 2016: removed support for 16 bit DOS
# 6/1997 - added support for 16 bit DOS
# Note: this has been tested, and works, for BC5. Your mileage may vary.
# Has been reported NOT to work with BC 4.52. Maybe it can be fixed?
@@ -34,8 +35,7 @@
# name value (default)
#
# BOR path to root of Borland C install (c:\bc5)
# LINK name of the linker ($(BOR)\bin\ilink if OSTYPE is DOS16,
# $(BOR)\bin\ilink32 otherwise)
# LINK name of the linker ($(BOR)\bin\ilink32)
# GUI no or yes: set to yes if you want the GUI version (yes)
# LUA define to path to Lua dir to get Lua support (not defined)
# LUA_VER define to version of Lua being used (51)
@@ -70,7 +70,6 @@
# GETTEXT no or yes: set to yes for multi-language support (yes)
# ICONV no or yes: set to yes for dynamic iconv support (yes)
# OLE no or yes: set to yes to make OLE gvim (no)
# OSTYPE DOS16 or WIN32 (WIN32)
# DEBUG no or yes: set to yes if you wish a DEBUGging build (no)
# CODEGUARD no or yes: set to yes if you want to use CODEGUARD (no)
# CPUNR 1 through 6: select -CPU argument to compile with (3)
@@ -78,12 +77,11 @@
# USEDLL no or yes: set to yes to use the Runtime library DLL (no)
# For USEDLL=yes the cc3250.dll is required to run Vim.
# VIMDLL no or yes: create vim32.dll, and stub (g)vim.exe (no)
# ALIGN 1, 2 or 4: Alignment to use (4 for Win32, 2 for DOS16)
# ALIGN 1, 2 or 4: Alignment to use (4 for Win32)
# FASTCALL no or yes: set to yes to use register-based function protocol (yes)
# OPTIMIZE SPACE, SPEED, or MAXSPEED: type of optimization (MAXSPEED)
# POSTSCRIPT no or yes: set to yes for PostScript printing
# FEATURES TINY, SMALL, NORMAL, BIG or HUGE
# (BIG for WIN32, SMALL for DOS16)
# FEATURES TINY, SMALL, NORMAL, BIG or HUGE (BIG for WIN32)
# WINVER 0x0400 or 0x0500: minimum Win32 version to support (0x0400)
# CSCOPE no or yes: include support for Cscope interface (yes)
# NETBEANS no or yes: include support for Netbeans interface; also
@@ -99,8 +97,7 @@
BOR = c:\bc5
!endif
### LINK: Name of the linker: tlink or ilink32 (this is below, depends on
# $(OSTYPE)
### LINK: Name of the linker: ilink32 (this is below)
### GUI: yes for GUI version, no for console version
!if ("$(GUI)"=="")
@@ -166,12 +163,6 @@ CHANNEL = yes
### OLE: no for normal gvim, yes for OLE-capable gvim (only works with GUI)
#OLE = yes
### OSTYPE: DOS16 for Windows 3.1 version, WIN32 for Windows 95/98/NT/2000
# version
!if ("$(OSTYPE)"=="")
OSTYPE = WIN32
!endif
### DEBUG: Uncomment to make an executable for debugging
# DEBUG = yes
!if ("$(DEBUG)"=="yes")
@@ -208,14 +199,10 @@ USEDLL = no
### VIMDLL: yes for a DLL version of VIM (NOT RECOMMENDED), no otherwise
#VIMDLL = yes
### ALIGN: alignment you desire: (1,2 or 4: s/b 4 for Win32, 2 for DOS)
### ALIGN: alignment you desire: (1,2 or 4: s/b 4 for Win32)
!if ("$(ALIGN)"=="")
!if ($(OSTYPE)==DOS16)
ALIGN = 2
!else
ALIGN = 4
!endif
!endif
### FASTCALL: yes to use FASTCALL calling convention (RECOMMENDED!), no otherwise
# Incompatible when calling external functions (like MSVC-compiled DLLs), so
@@ -239,13 +226,9 @@ FASTCALL = yes
OPTIMIZE = MAXSPEED
!endif
### FEATURES: TINY, SMALL, NORMAL, BIG or HUGE (BIG for WIN32, SMALL for DOS16)
### FEATURES: TINY, SMALL, NORMAL, BIG or HUGE (BIG for WIN32)
!if ("$(FEATURES)"=="")
! if ($(OSTYPE)==DOS16)
FEATURES = SMALL
! else
FEATURES = BIG
! endif
!endif
### POSTSCRIPT: uncomment this line if you want PostScript printing
@@ -266,24 +249,7 @@ WINVER = 0x0400
# Sanity checks for the above options:
#
!if ($(OSTYPE)==DOS16)
!if (($(CPUNR)+0)>4)
!error CPUNR Must be less than or equal to 4 for DOS16
!endif
!if (($(ALIGN)+0)>2)
!error ALIGN Must be less than or equal to 2 for DOS16
!endif
!else # not DOS16
!if (($(CPUNR)+0)<3)
!error CPUNR Must be greater or equal to 3 for WIN32
!endif
!endif
!if ($(OSTYPE)!=WIN32) && ($(OSTYPE)!=DOS16)
!error Check the OSTYPE variable again: $(OSTYPE) is not supported!
!endif
OSTYPE = WIN32
#
# Optimizations: change as desired (RECOMMENDATION: Don't change!):
@@ -305,11 +271,6 @@ OPT = $(OPT) -pr
OPT = $(OPT) -vi-
!endif
!endif
!if ($(OSTYPE)==DOS16)
!undef GUI
!undef VIMDLL
!undef USEDLL
!endif
# shouldn't have to change:
LIB = $(BOR)\lib
INCLUDE = $(BOR)\include;.;proto
@@ -483,16 +444,9 @@ TARGET = vimd.exe
# for now, anyway: VIMDLL is only for the GUI version
TARGET = vim.exe
!endif
!if ($(OSTYPE)==DOS16)
DEFINES= -DFEAT_$(FEATURES) -DMSDOS
EXETYPE=-ml
STARTUPOBJ = c0l.obj
LINK2 =
!else
EXETYPE=-WC
STARTUPOBJ = c0x32.obj
LINK2 = -ap -OS -o -P
!endif
RESFILE = vim.res
!endif
@@ -545,16 +499,6 @@ DEFINES = $(DEFINES) -DMSWINPS
##### BASE COMPILER/TOOLS RULES #####
MAKE = $(BOR)\bin\make
CFLAGS = -w-aus -w-par -w-pch -w-ngu -w-csu -I$(INCLUDE)
!if ($(OSTYPE)==DOS16)
BRC =
!if ("$(LINK)"=="")
LINK = $(BOR)\BIN\TLink
!endif
CC = $(BOR)\BIN\Bcc
LFLAGS = -Tde -c -m -L$(LIB) $(DEBUG_FLAG) $(LINK2)
LFLAGSDLL =
CFLAGS = $(CFLAGS) -H- $(HEADERS)
!else
BRC = $(BOR)\BIN\brc32
!if ("$(LINK)"=="")
LINK = $(BOR)\BIN\ILink32
@@ -563,7 +507,6 @@ CC = $(BOR)\BIN\Bcc32
LFLAGS = -OS -Tpe -c -m -L$(LIB) $(DEBUG_FLAG) $(LINK2)
LFLAGSDLL = -Tpd -c -m -L$(LIB) $(DEBUG_FLAG) $(LINK2)
CFLAGS = $(CFLAGS) -d -RT- -k- -Oi $(HEADERS) -f-
!endif
CC1 = -c
CC2 = -o
@@ -583,8 +526,6 @@ CCARG = +$(OBJDIR)\bcc.cfg
.cpp.obj:
$(CC) $(CCARG) $(CC1) $(CC2)$@ $*.cpp
!if ($(OSTYPE)==DOS16)
!else # win32:
vimmain = \
$(OBJDIR)\os_w32exe.obj
!if ("$(VIMDLL)"=="yes")
@@ -594,7 +535,6 @@ vimwinmain = \
vimwinmain = \
$(OBJDIR)\os_w32exe.obj
!endif
!endif
vimobj = \
$(OBJDIR)\blowfish.obj \
@@ -720,13 +660,8 @@ vimobj = $(vimobj) \
$(OBJDIR)\gui_w32.obj
!endif
!if ($(OSTYPE)==WIN32)
vimobj = $(vimobj) \
$(OBJDIR)\os_win32.obj $(OBJDIR)\os_mswin.obj $(OBJDIR)\winclip.obj
!elif ($(OSTYPE)==DOS16)
vimobj = $(vimobj) \
$(OBJDIR)\os_msdos.obj
!endif
# Blab what we are going to do:
MSG = Compiling $(OSTYPE) $(TARGET) $(OLETARGET), with:
!if ("$(GUI)"=="yes")
@@ -818,14 +753,10 @@ MSG = $(MSG) Align=$(ALIGNARG)
!message $(MSG)
!if ($(OSTYPE)==DOS16)
TARGETS = $(TARGET)
!else
!if ("$(VIMDLL)"=="yes")
TARGETS = $(DLLTARGET)
!endif
TARGETS = $(TARGETS) $(TARGET)
!endif
# Targets:
all: vim vimrun.exe install.exe xxd uninstal.exe GvimExt/gvimext.dll
@@ -851,18 +782,10 @@ GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h
cd ..
install.exe: dosinst.c $(OBJDIR)\bcc.cfg
!if ($(OSTYPE)==WIN32)
$(CC) $(CCARG) -WC -DWIN32 -einstall dosinst.c
!else
$(CC) $(CCARG) -WC -einstall dosinst.c
!endif
uninstal.exe: uninstal.c $(OBJDIR)\bcc.cfg
!if ($(OSTYPE)==WIN32)
$(CC) $(CCARG) -WC -DWIN32 -O2 -euninstal uninstal.c
!else
$(CC) $(CCARG) -WC -O2 -euninstal uninstal.c
!endif
clean:
!if "$(OS)" == "Windows_NT"
@@ -923,10 +846,7 @@ $(DLLTARGET): $(OBJDIR) $(vimdllobj)
cg32.lib+
!endif
# $(OSTYPE)==WIN32 causes os_mswin.c compilation. FEAT_SHORTCUT in it needs OLE
!if ("$(OLE)"=="yes" || $(OSTYPE)==WIN32)
ole2w32.lib +
!endif
!if ($(OSTYPE)==WIN32)
import32.lib+
!ifdef LUA
$(LUA_LIB_FLAG)lua.lib+
@@ -955,9 +875,6 @@ $(DLLTARGET): $(OBJDIR) $(vimdllobj)
cw32.lib
!endif
vim.def
!else
cl.lib
!endif
|
!if ("$(VIMDLL)"=="yes")
@@ -974,14 +891,11 @@ $(TARGET): $(OBJDIR) $(vimobj) $(OBJDIR)\$(RESFILE)
$(vimobj)
!endif
$<,$*
!if ($(OSTYPE)==WIN32)
!if ("$(CODEGUARD)"=="yes")
cg32.lib+
!endif
# $(OSTYPE)==WIN32 causes os_mswin.c compilation. FEAT_SHORTCUT in it needs OLE
!if ("$(OLE)"=="yes" || $(OSTYPE)==WIN32)
ole2w32.lib +
!endif
import32.lib+
!ifdef LUA
$(LUA_LIB_FLAG)lua.lib+
@@ -1011,9 +925,6 @@ $(TARGET): $(OBJDIR) $(vimobj) $(OBJDIR)\$(RESFILE)
!endif
$(OBJDIR)\$(RESFILE)
!else
emu.lib + cl.lib
!endif
|
test:
+1 -1
View File
@@ -860,7 +860,7 @@ $(OUTDIR)/ex_docmd.o: ex_docmd.c $(INCL) ex_cmds.h
$(OUTDIR)/ex_eval.o: ex_eval.c $(INCL) ex_cmds.h
$(CC) -c $(CFLAGS) ex_eval.c -o $(OUTDIR)/ex_eval.o
$(OUTDIR)/gui_w32.o: gui_w32.c gui_w48.c $(INCL)
$(OUTDIR)/gui_w32.o: gui_w32.c $(INCL)
$(CC) -c $(CFLAGS) gui_w32.c -o $(OUTDIR)/gui_w32.o
$(OUTDIR)/gui_dwrite.o: gui_dwrite.cpp $(INCL) gui_dwrite.h
-112
View File
@@ -1,112 +0,0 @@
#
# Makefile for VIM on MSDOS, using DJGPP 2.0
#
# NOTE: THIS IS OLD AND PROBABLY NO LONGER WORKS.
#
#>>>>> choose options:
### See feature.h for a list of optionals.
### Any other defines can be included here.
DEFINES =
#>>>>> name of the compiler and linker, name of lib directory
CC = gcc
#>>>>> end of choices
###########################################################################
INCL = vim.h globals.h option.h keymap.h macros.h ascii.h term.h os_msdos.h structs.h
CFLAGS = -O2 -DMSDOS -Iproto $(DEFINES) -Wall -Dinterrupt= -Dfar= -DMAXMEM=512 -D_NAIVE_DOS_REGS
OBJ = \
obj/blowfish.o \
obj/buffer.o \
obj/charset.o \
obj/crypt.o \
obj/crypt_zip.o \
obj/diff.o \
obj/digraph.o \
obj/edit.o \
obj/eval.o \
obj/ex_cmds.o \
obj/ex_cmds2.o \
obj/ex_docmd.o \
obj/ex_eval.o \
obj/ex_getln.o \
obj/fileio.o \
obj/fold.o \
obj/getchar.o \
obj/hardcopy.o \
obj/hashtab.o \
obj/main.o \
obj/mark.o \
obj/memfile.o \
obj/memline.o \
obj/menu.o \
obj/message.o \
obj/misc1.o \
obj/misc2.o \
obj/move.o \
obj/mbyte.o \
obj/normal.o \
obj/ops.o \
obj/option.o \
obj/os_msdos.o \
obj/popupmnu.o \
obj/quickfix.o \
obj/regexp.o \
obj/screen.o \
obj/search.o \
obj/sha256.o \
obj/spell.o \
obj/syntax.o \
obj/tag.o \
obj/term.o \
obj/ui.o \
obj/undo.o \
obj/window.o \
$(TERMLIB)
all: vim.exe install.exe uninstal.exe xxd/xxd.exe
# version.c is compiled each time, so that it sets the build time.
vim.exe: obj $(OBJ) version.c version.h
$(CC) $(CFLAGS) -s -o vim.exe version.c $(OBJ) -lpc
install.exe: dosinst.c
$(CC) $(CFLAGS) -s -o install.exe dosinst.c -lpc
uninstal.exe: uninstal.c
$(CC) $(CFLAGS) -s -o uninstal.exe uninstal.c -lpc
# This requires GNU make.
xxd/xxd.exe: xxd/xxd.c
$(MAKE) --directory=xxd -f Make_djg.mak
obj:
mkdir obj
tags:
command /c ctags *.c $(INCL) ex_cmds.h
clean:
-del obj\*.o
-rmdir obj
-del vim.exe
-del install.exe
-del xxd\xxd.exe
-del testdir\*.out
# This requires GNU make.
test:
$(MAKE) --directory=testdir -f Make_dos.mak
###########################################################################
obj/%.o: %.c obj $(INCL)
$(CC) -c $(CFLAGS) -o $@ $<
# Extra dependency (there are actually many more...)
obj/ex_docmd.o: ex_cmds.h
+6 -21
View File
@@ -82,8 +82,6 @@
# TCL_VER_LONG=[Tcl version, eg 8.3] (default is 8.3)
# You must set TCL_VER_LONG when you set TCL_VER.
#
# SNiFF+ interface: SNIFF=yes
#
# Cscope support: CSCOPE=yes
#
# Iconv library support (always dynamically loaded):
@@ -269,16 +267,6 @@ WP64CHECK = /Wp64
CTAGS = ctags
!endif
!if "$(SNIFF)" == "yes"
# SNIFF - Include support for SNiFF+.
SNIFF_INCL = if_sniff.h
SNIFF_OBJ = $(OBJDIR)/if_sniff.obj
SNIFF_LIB = shell32.lib
SNIFF_DEFS = -DFEAT_SNIFF
# The SNiFF integration needs multithreaded libraries!
MULTITHREADED = yes
!endif
!ifndef CSCOPE
CSCOPE = yes
!endif
@@ -380,7 +368,7 @@ WINVER = 0x0501
#VIMRUNTIMEDIR = somewhere
CFLAGS = -c /W3 /nologo $(CVARS) -I. -Iproto -DHAVE_PATHDEF -DWIN32 \
$(SNIFF_DEFS) $(CSCOPE_DEFS) $(NETBEANS_DEFS) $(CHANNEL_DEFS) \
$(CSCOPE_DEFS) $(NETBEANS_DEFS) $(CHANNEL_DEFS) \
$(NBDEBUG_DEFS) $(XPM_DEFS) \
$(DEFINES) -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) \
/Fo$(OUTDIR)/
@@ -528,7 +516,7 @@ CFLAGS = $(CFLAGS) /Zl /MTd
!endif # DEBUG
INCL = vim.h os_win32.h ascii.h feature.h globals.h keymap.h macros.h \
proto.h option.h structs.h term.h $(SNIFF_INCL) $(CSCOPE_INCL) \
proto.h option.h structs.h term.h $(CSCOPE_INCL) \
$(NBDEBUG_INCL)
OBJ = \
@@ -997,7 +985,7 @@ conflags = $(conflags) /map /mapinfo:lines
!ENDIF
LINKARGS1 = $(linkdebug) $(conflags)
LINKARGS2 = $(CON_LIB) $(GUI_LIB) $(NODEFAULTLIB) $(LIBC) $(OLE_LIB) user32.lib $(SNIFF_LIB) \
LINKARGS2 = $(CON_LIB) $(GUI_LIB) $(NODEFAULTLIB) $(LIBC) $(OLE_LIB) user32.lib \
$(LUA_LIB) $(MZSCHEME_LIB) $(PERL_LIB) $(PYTHON_LIB) $(PYTHON3_LIB) $(RUBY_LIB) \
$(TCL_LIB) $(NETBEANS_LIB) $(XPM_LIB) $(LINK_PDB)
@@ -1020,12 +1008,12 @@ all: $(VIM).exe \
$(VIM).exe: $(OUTDIR) $(OBJ) $(GUI_OBJ) $(OLE_OBJ) $(OLE_IDL) $(MZSCHEME_OBJ) \
$(LUA_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(PYTHON3_OBJ) $(RUBY_OBJ) $(TCL_OBJ) \
$(SNIFF_OBJ) $(CSCOPE_OBJ) $(NETBEANS_OBJ) $(CHANNEL_OBJ) $(XPM_OBJ) \
$(CSCOPE_OBJ) $(NETBEANS_OBJ) $(CHANNEL_OBJ) $(XPM_OBJ) \
version.c version.h
$(CC) $(CFLAGS) version.c
$(link) $(LINKARGS1) -out:$(VIM).exe $(OBJ) $(GUI_OBJ) $(OLE_OBJ) \
$(LUA_OBJ) $(MZSCHEME_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(PYTHON3_OBJ) $(RUBY_OBJ) \
$(TCL_OBJ) $(SNIFF_OBJ) $(CSCOPE_OBJ) $(NETBEANS_OBJ) $(CHANNEL_OBJ) \
$(TCL_OBJ) $(CSCOPE_OBJ) $(NETBEANS_OBJ) $(CHANNEL_OBJ) \
$(XPM_OBJ) $(OUTDIR)\version.obj $(LINKARGS2)
if exist $(VIM).exe.manifest mt.exe -nologo -manifest $(VIM).exe.manifest -updateresource:$(VIM).exe;1
@@ -1175,7 +1163,7 @@ $(OUTDIR)/gui.obj: $(OUTDIR) gui.c $(INCL) $(GUI_INCL)
$(OUTDIR)/gui_beval.obj: $(OUTDIR) gui_beval.c $(INCL) $(GUI_INCL)
$(OUTDIR)/gui_w32.obj: $(OUTDIR) gui_w32.c gui_w48.c $(INCL) $(GUI_INCL)
$(OUTDIR)/gui_w32.obj: $(OUTDIR) gui_w32.c $(INCL) $(GUI_INCL)
$(OUTDIR)/gui_dwrite.obj: $(OUTDIR) gui_dwrite.cpp $(INCL) $(GUI_INCL)
@@ -1212,9 +1200,6 @@ $(OUTDIR)/if_ole.obj: $(OUTDIR) if_ole.cpp $(INCL) if_ole.h
$(OUTDIR)/if_ruby.obj: $(OUTDIR) if_ruby.c $(INCL)
$(CC) $(CFLAGS) $(RUBY_INC) if_ruby.c
$(OUTDIR)/if_sniff.obj: $(OUTDIR) if_sniff.c $(INCL)
$(CC) $(CFLAGS) if_sniff.c
$(OUTDIR)/if_tcl.obj: $(OUTDIR) if_tcl.c $(INCL)
$(CC) $(CFLAGS) $(TCL_INC) if_tcl.c
+6 -20
View File
@@ -2,7 +2,7 @@
# Makefile for Vim on OpenVMS
#
# Maintainer: Zoltan Arpadffy <arpadffy@polarhome.com>
# Last change: 2016 Jan 22
# Last change: 2016 Feb 27
#
# This has script been tested on VMS 6.2 to 8.2 on DEC Alpha, VAX and IA64
# with MMS and MMK
@@ -66,7 +66,6 @@ CCVER = YES
# VIM_PERL = YES
# VIM_PYTHON = YES
# VIM_RUBY = YES
# VIM_SNIFF = YES
# X Input Method. For entering special languages like chinese and
# Japanese. Please define just one: VIM_XIM or VIM_HANGULIN
@@ -228,15 +227,6 @@ TCL_LIB = ,OS_VMS_TCL.OPT/OPT
TCL_INC = ,dka0:[tcl80.generic]
.ENDIF
.IFDEF VIM_SNIFF
# SNIFF related setup.
SNIFF_DEF = ,"FEAT_SNIFF"
SNIFF_SRC = if_sniff.c
SNIFF_OBJ = if_sniff.obj
SNIFF_LIB =
SNIFF_INC =
.ENDIF
.IFDEF VIM_RUBY
# RUBY related setup.
RUBY_DEF = ,"FEAT_RUBY"
@@ -293,7 +283,7 @@ VIMHOST = "''F$TRNLNM("SYS$NODE")'''F$TRNLNM("UCX$INET_HOST")'.''F$TRNLNM("UCX$I
.SUFFIXES : .obj .c
ALL_CFLAGS = /def=($(MODEL_DEF)$(DEFS)$(DEBUG_DEF)$(PERL_DEF)$(PYTHON_DEF) -
$(TCL_DEF)$(SNIFF_DEF)$(RUBY_DEF)$(XIM_DEF)$(HANGULIN_DEF)$(TAG_DEF)$(MZSCH_DEF)$(ICONV_DEF)) -
$(TCL_DEF)$(RUBY_DEF)$(XIM_DEF)$(HANGULIN_DEF)$(TAG_DEF)$(MZSCH_DEF)$(ICONV_DEF)) -
$(CFLAGS)$(GUI_FLAG) -
/include=($(C_INC)$(GUI_INC_DIR)$(GUI_INC)$(PERL_INC)$(PYTHON_INC)$(TCL_INC))
@@ -302,12 +292,12 @@ ALL_CFLAGS = /def=($(MODEL_DEF)$(DEFS)$(DEBUG_DEF)$(PERL_DEF)$(PYTHON_DEF) -
# as $(GUI_INC) - replaced with $(GUI_INC_VER)
# Otherwise should not be any other difference.
ALL_CFLAGS_VER = /def=($(MODEL_DEF)$(DEFS)$(DEBUG_DEF)$(PERL_DEF)$(PYTHON_DEF) -
$(TCL_DEF)$(SNIFF_DEF)$(RUBY_DEF)$(XIM_DEF)$(HANGULIN_DEF)$(TAG_DEF)$(MZSCH_DEF)$(ICONV_DEF)) -
$(TCL_DEF)$(RUBY_DEF)$(XIM_DEF)$(HANGULIN_DEF)$(TAG_DEF)$(MZSCH_DEF)$(ICONV_DEF)) -
$(CFLAGS)$(GUI_FLAG) -
/include=($(C_INC)$(GUI_INC_DIR)$(GUI_INC_VER)$(PERL_INC)$(PYTHON_INC)$(TCL_INC))
ALL_LIBS = $(LIBS) $(GUI_LIB_DIR) $(GUI_LIB) \
$(PERL_LIB) $(PYTHON_LIB) $(TCL_LIB) $(SNIFF_LIB) $(RUBY_LIB)
$(PERL_LIB) $(PYTHON_LIB) $(TCL_LIB) $(RUBY_LIB)
SRC = blowfish.c buffer.c charset.c crypt.c, crypt_zip.c diff.c digraph.c edit.c eval.c ex_cmds.c ex_cmds2.c \
ex_docmd.c ex_eval.c ex_getln.c if_xcmdsrv.c fileio.c fold.c getchar.c \
@@ -315,7 +305,7 @@ SRC = blowfish.c buffer.c charset.c crypt.c, crypt_zip.c diff.c digraph.c edit.c
misc2.c move.c normal.c ops.c option.c popupmnu.c quickfix.c regexp.c search.c sha256.c\
spell.c syntax.c tag.c term.c termlib.c ui.c undo.c version.c screen.c \
window.c os_unix.c os_vms.c pathdef.c \
$(GUI_SRC) $(PERL_SRC) $(PYTHON_SRC) $(TCL_SRC) $(SNIFF_SRC) \
$(GUI_SRC) $(PERL_SRC) $(PYTHON_SRC) $(TCL_SRC) \
$(RUBY_SRC) $(HANGULIN_SRC) $(MZSCH_SRC)
OBJ = blowfish.obj buffer.obj charset.obj crypt.obj, crypt_zip.obj diff.obj digraph.obj edit.obj eval.obj \
@@ -326,7 +316,7 @@ OBJ = blowfish.obj buffer.obj charset.obj crypt.obj, crypt_zip.obj diff.obj digr
regexp.obj search.obj sha256.obj spell.obj syntax.obj tag.obj term.obj termlib.obj \
ui.obj undo.obj screen.obj version.obj window.obj os_unix.obj \
os_vms.obj pathdef.obj if_mzsch.obj\
$(GUI_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(TCL_OBJ) $(SNIFF_OBJ) \
$(GUI_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(TCL_OBJ) \
$(RUBY_OBJ) $(HANGULIN_OBJ) $(MZSCH_OBJ)
# Default target is making the executable
@@ -778,10 +768,6 @@ if_ruby.obj : if_ruby.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h term.h macros.h structs.h regexp.h \
gui.h gui_beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
globals.h farsi.h arabic.h version.h
if_sniff.obj : if_sniff.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h term.h macros.h structs.h regexp.h \
gui.h gui_beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
globals.h farsi.h arabic.h os_unixx.h
gui_beval.obj : gui_beval.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h term.h macros.h structs.h regexp.h \
gui.h gui_beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
-204
View File
@@ -1,204 +0,0 @@
#
# Borland C++ 5.0[12] makefile for vim, 16-bit windows gui version
# By Vince Negri
#
# NOTE: THIS IS OLD AND PROBABLY NO LONGER WORKS.
#
# *************************************************************
# * WARNING!
# * This was originally produced by the IDE, but has since been
# * modified to make it work properly. Adjust with care!
# * In particular, leave LinkerLocalOptsAtW16_gvim16dexe alone
# * unless you are a guru.
# *************************************************************
#
# Look for BOR below and either pass a different value or
# adjust the path as required. For example
# make -fMake_w16.mak -DBOR=C:\PF\Borland\BC5.01 -B BccW16.cfg
# make -fMake_w16.mak
# Note: $(BOR) is effectively ignored unless BccW16.cfg is rebuilt.
#
# Does not compile with Borland C++ 4.51 Walter Briscoe 2003-02-24
# "out of memory" from compiler if gvim16 wildly wrong. WFB 2003-03-04
#
# vim16.def must be a DOS-formatted file. (\r\n line endings.)
# It is a UNIX-formatted file (\n line endings) in vim-*-extra.tar.gz
.AUTODEPEND
#
# Borland C++ tools
#
IMPLIB = Implib
BCC = Bcc +BccW16.cfg
TLINK = TLink
TLIB = TLib
BRC = Brc
TASM = Tasm
#
# IDE macros
#
#
# Options
#
!ifndef BOR
BOR = D:\BC5
!endif
# !ifndef INTDIR is lethal considering CLEAN below. WFB 2003-03-13
INTDIR=w16
# /Twe Make the target a Windows .EXE with explicit functions exportable +
# /x Map file off
# /l Include source line numbers in object map files`
# /c case sensitive link
# /C Case-sensitive exports and imports (16-bit only)
# /k Produce "No Stack" warning.
# /Oa Minimise segment alignment
# /Oc Minimise Chain fixes
# /Oi Minimise Iterated data
# /Or Minimise resource alignment
# /P -P=x Code pack size
# /V Windows version for application
# /L Folder to search for library files
LinkerLocalOptsAtW16_gvim16dexe =/Twe/x/l/c/C/k/Or/Oc/Oa/Oi/P=65535/V3.10
CompInheritOptsAt_gvim16dexe = \
-I$(BOR)\INCLUDE;PROTO;. \
-DFEAT_GUI;FEAT_GUI_MSWIN;FEAT_GUI_W16;MSWIN;WIN16;MSWIN16_FASTTEXT \
-DFEAT_TOOLBAR;WIN16_3DLOOK
#
# Dependency List
#
Dep_Gvim16 = \
gvim16.exe
ObjFiles = \
$(INTDIR)\buffer.obj\
$(INTDIR)\charset.obj\
$(INTDIR)\diff.obj\
$(INTDIR)\digraph.obj\
$(INTDIR)\edit.obj\
$(INTDIR)\eval.obj\
$(INTDIR)\ex_cmds.obj\
$(INTDIR)\ex_cmds2.obj\
$(INTDIR)\ex_docmd.obj\
$(INTDIR)\ex_eval.obj\
$(INTDIR)\ex_getln.obj\
$(INTDIR)\fileio.obj\
$(INTDIR)\fold.obj\
$(INTDIR)\getchar.obj\
$(INTDIR)\hardcopy.obj\
$(INTDIR)\hashtab.obj\
$(INTDIR)\gui.obj\
$(INTDIR)\gui_w16.obj\
$(INTDIR)\main.obj\
$(INTDIR)\mark.obj\
$(INTDIR)\mbyte.obj\
$(INTDIR)\memfile.obj\
$(INTDIR)\memline.obj\
$(INTDIR)\menu.obj\
$(INTDIR)\message.obj\
$(INTDIR)\misc1.obj\
$(INTDIR)\misc2.obj\
$(INTDIR)\move.obj\
$(INTDIR)\normal.obj\
$(INTDIR)\ops.obj\
$(INTDIR)\option.obj\
$(INTDIR)\os_win16.obj\
$(INTDIR)\os_msdos.obj\
$(INTDIR)\os_mswin.obj\
$(INTDIR)\winclip.obj\
$(INTDIR)\popupmnu.obj\
$(INTDIR)\quickfix.obj\
$(INTDIR)\regexp.obj\
$(INTDIR)\screen.obj\
$(INTDIR)\search.obj\
$(INTDIR)\spell.obj\
$(INTDIR)\syntax.obj\
$(INTDIR)\tag.obj\
$(INTDIR)\term.obj\
$(INTDIR)\ui.obj\
$(INTDIR)\undo.obj\
$(INTDIR)\version.obj\
$(INTDIR)\window.obj
Dep_gvim16dexe = \
vimtbar.lib\
vim16.def\
$(INTDIR)\vim16.res\
$(ObjFiles)
# Without the following, the implicit rule in BUILTINS.MAK is picked up
# for a rule for .c.obj rather than the local implicit rule
.SUFFIXES
.SUFFIXES .c .obj
.path.c = .
# -P- Force C++ compilation off
# -c Compilation only
# -n Place .OBJ files
{.}.c{$(INTDIR)}.obj:
$(BCC) -P- -c -n$(INTDIR)\ {$< }
Gvim16 : BccW16.cfg $(Dep_Gvim16)
echo MakeNode
gvim16.exe : $(Dep_gvim16dexe)
$(TLINK) $(LinkerLocalOptsAtW16_gvim16dexe) @&&|
c0wl.obj $(ObjFiles)
|,$*,,vimtbar ctl3dv2 import cwl, vim16.def,$(INTDIR)\vim16.res
# Force objects to be built if $(BOR) changes
$(ObjFiles) : Make_w16.mak BccW16.cfg
$(INTDIR)\vim16.res : vim16.rc
$(BRC) -R @&&|
$(CompInheritOptsAt_gvim16dexe) -fo$*.res $?
|
# Compiler configuration file
# There is no rule for $(INTDIR) as make always says it does not exist
BccW16.cfg :
-@if not exist $(INTDIR)\$(NULL) mkdir $(INTDIR)
Copy &&|
-3 ; Generate 80386 protected-mode compatible instructions
-a ; Byte alignment
-dc ; Move string literals from data segment to code segment
-ff ; Fast floating point
-H ; Generate and use precompiled headers
-H=$(INTDIR)\gvim16.csm ; gvim16.csm is the precompiled header filename
-k- ; No standard stack frame
-ml ; Large memory model
-OW ; Suppress the inc bp/dec bp on windows far functions
-O1 ; Generate smallest possible code
-O2 ; Generate fastest possible code (overrides prior -O1 control)
-pr ; Fastcall calling convention passing parameters in registers
-R- ; Exclude browser information in generated .OBJ files
-v- ; Turn off source debugging
-vi ; Turn inline function expansion on
-WE ; Only __far _export functions are exported
-w ; Display warnings
-w-par ; Suppress: Parameter 'parameter' is never used
-w-pch ; Cannot create pre-compiled header: initialized data in header
-w-sig ; identifier' declared but never used
-w-ucp ; Mixing pointers to different 'char' types
-wuse ; 'identifier' declared but never used
$(CompInheritOptsAt_gvim16dexe)
| $@
!IF "$(OS)" == "Windows_NT"
NULL=
DEL_TREE = rmdir /s /q
!ELSE
NULL=nul
DEL_TREE = deltree /y
!ENDIF
CLEAN:
-@if exist $(INTDIR)\$(NULL) $(DEL_TREE) $(INTDIR)
-@if exist BccW16.cfg erase BccW16.cfg
-@if exist gvim16.exe erase gvim16.exe
+11 -30
View File
@@ -466,9 +466,6 @@ CClink = $(CC)
# Uncomment this when you do not want inter process communication.
#CONF_OPT_CHANNEL = --disable-channel
# SNIFF - Include support for SNiFF+.
#CONF_OPT_SNIFF = --enable-sniff
# MULTIBYTE - To edit multi-byte characters.
# Uncomment this when you want to edit a multibyte language.
# It's automatically enabled with normal features, GTK or IME support.
@@ -908,7 +905,7 @@ SANITIZER_LIBS = $(SANITIZER_CFLAGS)
### after changing this, you need to do "make reconfig".
#CONF_TERM_LIB = --with-tlib=ncurses
### For GCC on MSDOS, the ".exe" suffix will be added.
### For GCC on MS-Windows, the ".exe" suffix will be added.
#EXEEXT = .exe
#LNKEXT = .exe
@@ -1353,7 +1350,7 @@ MACVIMGUI_TESTARG = VIMPROG=../$(RELEASEDIR)/MacVim.app/Contents/MacOS/$(VIMTARG
# All GUI files
ALL_GUI_SRC = gui.c gui_gtk.c gui_gtk_f.c gui_motif.c gui_xmdlg.c gui_xmebw.c gui_athena.c gui_gtk_x11.c gui_x11.c gui_at_sb.c gui_at_fs.c pty.c
ALL_GUI_PRO = gui.pro gui_gtk.pro gui_motif.pro gui_xmdlg.pro gui_athena.pro gui_gtk_x11.pro gui_x11.pro gui_w16.pro gui_w32.pro gui_photon.pro
ALL_GUI_PRO = gui.pro gui_gtk.pro gui_motif.pro gui_xmdlg.pro gui_athena.pro gui_gtk_x11.pro gui_x11.pro gui_w32.pro gui_photon.pro
# }}}
@@ -1408,7 +1405,7 @@ OSDEF_CFLAGS = $(PRE_DEFS) $(POST_DEFS)
LINT_CFLAGS = -DLINT -I. $(PRE_DEFS) $(POST_DEFS) $(RUBY_CFLAGS) $(LUA_CFLAGS) $(PERL_CFLAGS) $(PYTHON_CFLAGS) $(PYTHON3_CFLAGS) $(TCL_CFLAGS) -Dinline= -D__extension__= -Dalloca=alloca
LINT_EXTRA = -DUSE_SNIFF -DHANGUL_INPUT -D"__attribute__(x)="
LINT_EXTRA = -DHANGUL_INPUT -D"__attribute__(x)="
DEPEND_CFLAGS = -DPROTO -DDEPEND -DFEAT_GUI $(LINT_CFLAGS)
@@ -1549,14 +1546,13 @@ SRC = $(BASIC_SRC) \
$(PYTHON_SRC) $(PYTHON3_SRC) \
$(TCL_SRC) \
$(RUBY_SRC) \
$(SNIFF_SRC) \
$(WORKSHOP_SRC) \
$(WSDEBUG_SRC)
TAGS_SRC = *.c *.cpp if_perl.xs
EXTRA_SRC = hangulin.c if_lua.c if_mzsch.c auto/if_perl.c if_perlsfio.c \
if_python.c if_python3.c if_tcl.c if_ruby.c if_sniff.c \
if_python.c if_python3.c if_tcl.c if_ruby.c \
gui_beval.c workshop.c wsdebug.c integration.c \
netbeans.c channel.c \
$(GRESOURCE_SRC)
@@ -1578,7 +1574,7 @@ ALL_SRC = $(BASIC_SRC) $(ALL_GUI_SRC) $(UNITTEST_SRC) $(EXTRA_SRC)
# The perl sources also don't work well with lint.
LINT_SRC = $(BASIC_SRC) $(GUI_SRC) $(HANGULIN_SRC) \
$(PYTHON_SRC) $(PYTHON3_SRC) $(TCL_SRC) \
$(SNIFF_SRC) $(WORKSHOP_SRC) $(WSDEBUG_SRC) \
$(WORKSHOP_SRC) $(WSDEBUG_SRC) \
$(NETBEANS_SRC) $(CHANNEL_SRC)
#LINT_SRC = $(SRC)
#LINT_SRC = $(ALL_SRC)
@@ -1628,7 +1624,6 @@ OBJ_COMMON = \
objects/sha256.o \
objects/spell.o \
objects/syntax.o \
$(SNIFF_OBJ) \
objects/tag.o \
objects/term.o \
objects/ui.o \
@@ -1732,7 +1727,7 @@ PRO_AUTO = \
# Resources used for the Mac are in one directory.
RSRC_DIR = os_mac_rsrc
PRO_MANUAL = os_amiga.pro os_msdos.pro os_win16.pro os_win32.pro \
PRO_MANUAL = os_amiga.pro os_win32.pro \
os_mswin.pro winclip.pro os_beos.pro os_vms.pro $(PERL_PRO)
# Default target is making the executable and tools
@@ -1767,7 +1762,7 @@ config auto/config.mk: auto/configure config.mk.in config.h.in
$(CONF_OPT_TCL) $(CONF_OPT_RUBY) $(CONF_OPT_NLS) \
$(CONF_OPT_CSCOPE) $(CONF_OPT_MULTIBYTE) $(CONF_OPT_INPUT) \
$(CONF_OPT_OUTPUT) $(CONF_OPT_GPM) $(CONF_OPT_WORKSHOP) \
$(CONF_OPT_SNIFF) $(CONF_OPT_FEAT) $(CONF_TERM_LIB) \
$(CONF_OPT_FEAT) $(CONF_TERM_LIB) \
$(CONF_OPT_COMPBY) $(CONF_OPT_ACL) $(CONF_OPT_NETBEANS) \
$(CONF_OPT_CHANNEL) \
$(CONF_ARGS) $(CONF_OPT_MZSCHEME) $(CONF_OPT_PLTHOME) \
@@ -1853,7 +1848,7 @@ update-po:
# Generate function prototypes. This is not needed to compile vim, but if
# you want to use it, cproto is out there on the net somewhere -- Webb
#
# When generating os_amiga.pro, os_msdos.pro and os_win32.pro there will be a
# When generating os_amiga.pro and os_win32.pro there will be a
# few include files that can not be found, that's OK.
proto: $(PRO_AUTO) $(PRO_MANUAL)
@@ -1881,24 +1876,16 @@ os_amiga.pro: os_amiga.c
$(CPROTO) -DAMIGA -UHAVE_CONFIG_H -DBPTR=char* $< > proto/$@
echo "/* vim: set ft=c : */" >> proto/$@
os_msdos.pro: os_msdos.c
$(CPROTO) -DMSDOS -UHAVE_CONFIG_H $< > proto/$@
echo "/* vim: set ft=c : */" >> proto/$@
os_win16.pro: os_win16.c
$(CPROTO) -DWIN16 -UHAVE_CONFIG_H $< > proto/$@
echo "/* vim: set ft=c : */" >> proto/$@
os_win32.pro: os_win32.c
$(CPROTO) -DWIN32 -UHAVE_CONFIG_H $< > proto/$@
echo "/* vim: set ft=c : */" >> proto/$@
os_mswin.pro: os_mswin.c
$(CPROTO) -DWIN16 -DWIN32 -UHAVE_CONFIG_H $< > proto/$@
$(CPROTO) -DWIN32 -UHAVE_CONFIG_H $< > proto/$@
echo "/* vim: set ft=c : */" >> proto/$@
winclip.pro: winclip.c
$(CPROTO) -DWIN16 -DWIN32 -UHAVE_CONFIG_H $< > proto/$@
$(CPROTO) -DWIN32 -UHAVE_CONFIG_H $< > proto/$@
echo "/* vim: set ft=c : */" >> proto/$@
os_beos.pro: os_beos.c
@@ -2042,6 +2029,7 @@ test_arglist \
test_menu \
test_perl \
test_quickfix \
test_reltime \
test_searchpos \
test_set \
test_sort \
@@ -2848,9 +2836,6 @@ objects/if_python3.o: if_python3.c if_py_both.h
objects/if_ruby.o: if_ruby.c
$(CCC) $(RUBY_CFLAGS) -o $@ if_ruby.c
objects/if_sniff.o: if_sniff.c
$(CCC) -o $@ if_sniff.c
objects/if_tcl.o: if_tcl.c
$(CCC) $(TCL_CFLAGS) -o $@ if_tcl.c
@@ -3430,10 +3415,6 @@ objects/if_ruby.o: if_ruby.c auto/config.h vim.h feature.h os_unix.h auto/osdef.
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
farsi.h arabic.h version.h
objects/if_sniff.o: if_sniff.c vim.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
globals.h farsi.h arabic.h os_unixx.h
objects/gui_beval.o: gui_beval.c vim.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
+1 -1
View File
@@ -17,5 +17,5 @@ typedef enum {
aid_qf_namebuf,
aid_qf_errmsg,
aid_qf_pattern,
aid_last,
aid_last
} alloc_id_T;
+46
View File
@@ -0,0 +1,46 @@
@echo off
:: Batch file for building/testing Vim on AppVeyor
setlocal ENABLEDELAYEDEXPANSION
cd %APPVEYOR_BUILD_FOLDER%
cd src
echo "Building MinGW 32bit console version"
set PATH=c:\msys64\mingw32\bin;%PATH%
mingw32-make.exe -f Make_ming.mak GUI=no OPTIMIZE=speed IME=yes MBYTE=yes ICONV=yes DEBUG=no FEATURES=%FEATURE% || exit 1
:: Save vim.exe before Make clean, moved back below.
copy vim.exe testdir
mingw32-make.exe -f Make_ming.mak clean
:: Build Mingw huge version with python and channel support, or
:: with specified features without python.
echo "Building MinGW 32bit GUI version"
if "%FEATURE%" == "HUGE" (
mingw32-make.exe -f Make_ming.mak OPTIMIZE=speed CHANNEL=yes GUI=yes IME=yes MBYTE=yes ICONV=yes DEBUG=no PYTHON_VER=27 DYNAMIC_PYTHON=yes PYTHON=C:\Python27 PYTHON3_VER=34 DYNAMIC_PYTHON3=yes PYTHON3=C:\Python34 FEATURES=%FEATURE% || exit 1
) ELSE (
mingw32-make.exe -f Make_ming.mak OPTIMIZE=speed GUI=yes IME=yes MBYTE=yes ICONV=yes DEBUG=no FEATURES=%FEATURE% || exit 1
)
.\gvim -u NONE -c "redir @a | ver |0put a | wq" ver_ming.txt
echo "Building MSVC 64bit console Version"
sed -e "s/\$(LINKARGS2)/\$(LINKARGS2) | sed -e 's#.*\\\\r.*##'/" Make_mvc.mak > Make_mvc2.mak
nmake -f Make_mvc2.mak CPU=AMD64 OLE=no GUI=no IME=yes MBYTE=yes ICONV=yes DEBUG=no FEATURES=%FEATURE% || exit 1
nmake -f Make_mvc2.mak clean
:: build MSVC huge version with python and channel support
:: GUI needs to be last, so that testing works
echo "Building MSVC 64bit GUI Version"
if "%FEATURE%" == "HUGE" (
nmake -f Make_mvc2.mak DIRECTX=yes CPU=AMD64 CHANNEL=yes OLE=no GUI=yes IME=yes MBYTE=yes ICONV=yes DEBUG=no PYTHON_VER=27 DYNAMIC_PYTHON=yes PYTHON=C:\Python27-x64 PYTHON3_VER=34 DYNAMIC_PYTHON3=yes PYTHON3=C:\Python34-x64 FEATURES=%FEATURE% || exit 1
) ELSE (
nmake -f Make_mvc2.mak CPU=AMD64 OLE=no GUI=yes IME=yes MBYTE=yes ICONV=yes DEBUG=no FEATURES=%FEATURE% || exit 1
)
.\gvim -u NONE -c "redir @a | ver |0put a | wq" ver_msvc.txt
:: Restore vim.exe, tests will run with this.
move /Y testdir\vim.exe .
echo "version output MinGW"
type ver_ming.txt
echo "version output MVC"
type ver_msvc.txt
cd ..
+371 -35
View File
@@ -654,8 +654,6 @@ X_PRE_LIBS
X_CFLAGS
XMKMF
xmkmfpath
SNIFF_OBJ
SNIFF_SRC
CHANNEL_OBJ
CHANNEL_SRC
NETBEANS_OBJ
@@ -816,7 +814,6 @@ enable_cscope
enable_workshop
enable_netbeans
enable_channel
enable_sniff
enable_multibyte
enable_hangulinput
enable_xim
@@ -825,6 +822,7 @@ with_x
enable_gui
enable_gtk2_check
enable_gnome_check
enable_gtk3_check
enable_motif_check
enable_athena_check
enable_nextaw_check
@@ -1482,14 +1480,14 @@ Optional Features:
--enable-workshop Include Sun Visual Workshop support.
--disable-netbeans Disable NetBeans integration support.
--disable-channel Disable process communication support.
--enable-sniff Include Sniff interface.
--enable-multibyte Include multibyte editing support.
--enable-hangulinput Include Hangul input support.
--enable-xim Include XIM input support.
--enable-fontset Include X fontset output support.
--enable-gui=OPTS X11 GUI default=auto OPTS=auto/no/gtk2/gnome2/motif/athena/neXtaw/photon/carbon/macvim
--enable-gui=OPTS X11 GUI default=auto OPTS=auto/no/gtk2/gnome2/gtk3/motif/athena/neXtaw/photon/carbon/macvim
--enable-gtk2-check If auto-select GUI, check for GTK+ 2 default=yes
--enable-gnome-check If GTK GUI, check for GNOME default=no
--enable-gtk3-check If auto-select GUI, check for GTK+ 3 default=yes
--enable-motif-check If auto-select GUI, check for Motif default=yes
--enable-athena-check If auto-select GUI, check for Athena default=yes
--enable-nextaw-check If auto-select GUI, check for neXtaw default=yes
@@ -4408,7 +4406,7 @@ fi
CFLAGS=$SAVE_CFLAGS
if test "x$CARBON" = "xyes" -o "x$COCOA" = "xyes"; then
if test -z "$with_x" -a "X$enable_gui" != Xmotif -a "X$enable_gui" != Xathena -a "X$enable_gui" != Xgtk2; then
if test -z "$with_x" -a "X$enable_gui" != Xmotif -a "X$enable_gui" != Xathena -a "X$enable_gui" != Xgtk2 -a "X$enable_gui" != Xgtk3; then
with_x=no
fi
fi
@@ -7521,26 +7519,6 @@ if test "$enable_channel" = "yes"; then
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-sniff argument" >&5
$as_echo_n "checking --enable-sniff argument... " >&6; }
# Check whether --enable-sniff was given.
if test "${enable_sniff+set}" = set; then :
enableval=$enable_sniff;
else
enable_sniff="no"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_sniff" >&5
$as_echo "$enable_sniff" >&6; }
if test "$enable_sniff" = "yes"; then
$as_echo "#define FEAT_SNIFF 1" >>confdefs.h
SNIFF_SRC="if_sniff.c"
SNIFF_OBJ="objects/if_sniff.o"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-multibyte argument" >&5
$as_echo_n "checking --enable-multibyte argument... " >&6; }
# Check whether --enable-multibyte was given.
@@ -8627,6 +8605,7 @@ enable_gui_canon=`echo "_$enable_gui" | \
sed 's/[ _+-]//g;y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
SKIP_GTK2=YES
SKIP_GTK3=YES
SKIP_GNOME=YES
SKIP_MOTIF=YES
SKIP_ATHENA=YES
@@ -8697,6 +8676,9 @@ $as_echo "GTK+ 2.x GUI support" >&6; }
$as_echo "GNOME 2.x GUI support" >&6; }
SKIP_GNOME=
SKIP_GTK2=;;
gtk3) { $as_echo "$as_me:${as_lineno-$LINENO}: result: GTK+ 3.x GUI support" >&5
$as_echo "GTK+ 3.x GUI support" >&6; }
SKIP_GTK3=;;
motif) { $as_echo "$as_me:${as_lineno-$LINENO}: result: Motif GUI support" >&5
$as_echo "Motif GUI support" >&6; }
SKIP_MOTIF=;;
@@ -8748,6 +8730,23 @@ $as_echo "$enable_gnome_check" >&6; }
fi
fi
if test "x$SKIP_GTK3" != "xYES" -a "$enable_gui_canon" != "gtk3"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether or not to look for GTK+ 3" >&5
$as_echo_n "checking whether or not to look for GTK+ 3... " >&6; }
# Check whether --enable-gtk3-check was given.
if test "${enable_gtk3_check+set}" = set; then :
enableval=$enable_gtk3_check;
else
enable_gtk3_check="yes"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_gtk3_check" >&5
$as_echo "$enable_gtk3_check" >&6; }
if test "x$enable_gtk3_check" = "xno"; then
SKIP_GTK3=YES
fi
fi
if test "x$SKIP_MOTIF" != "xYES" -a "$enable_gui_canon" != "motif"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether or not to look for Motif" >&5
$as_echo_n "checking whether or not to look for Motif... " >&6; }
@@ -8942,13 +8941,13 @@ fi
if test "X$GTK_CONFIG" != "Xno" -o "X$PKG_CONFIG" != "Xno"; then
{
min_gtk_version=2.2.0
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
$as_echo_n "checking for GTK - version >= $min_gtk_version... " >&6; }
no_gtk=""
if (test "X$SKIP_GTK2" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
&& $PKG_CONFIG --exists gtk+-2.0; then
{
min_gtk_version=2.2.0
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
$as_echo_n "checking for GTK - version >= $min_gtk_version... " >&6; }
GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-2.0`
GTK_LIBS=`$PKG_CONFIG --libs gtk+-2.0`
@@ -8959,6 +8958,23 @@ $as_echo_n "checking for GTK - version >= $min_gtk_version... " >&6; }
gtk_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
}
elif (test "X$SKIP_GTK3" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
&& $PKG_CONFIG --exists gtk+-3.0; then
{
min_gtk_version=2.2.0
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
$as_echo_n "checking for GTK - version >= $min_gtk_version... " >&6; }
GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-3.0`
GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-3.0`
GTK_LIBS=`$PKG_CONFIG --libs gtk+-3.0`
gtk_major_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
gtk_minor_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
gtk_micro_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
}
else
no_gtk=yes
fi
@@ -9054,6 +9070,7 @@ $as_echo "no" >&6; }
rm -f conf.gtktest
if test "x$GTK_CFLAGS" != "x"; then
SKIP_GTK3=YES
SKIP_ATHENA=YES
SKIP_NEXTAW=YES
SKIP_MOTIF=YES
@@ -9155,6 +9172,218 @@ $as_echo "not found" >&6; }
fi
fi
if test -z "$SKIP_GTK3"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-gtktest argument" >&5
$as_echo_n "checking --disable-gtktest argument... " >&6; }
# Check whether --enable-gtktest was given.
if test "${enable_gtktest+set}" = set; then :
enableval=$enable_gtktest;
else
enable_gtktest=yes
fi
if test "x$enable_gtktest" = "xyes" ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: gtk test enabled" >&5
$as_echo "gtk test enabled" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: gtk test disabled" >&5
$as_echo "gtk test disabled" >&6; }
fi
if test "X$PKG_CONFIG" = "X"; then
# Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PKG_CONFIG+:} false; then :
$as_echo_n "(cached) " >&6
else
case $PKG_CONFIG in
[\\/]* | ?:[\\/]*)
ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
fi
if test "x$PKG_CONFIG" != "xno"; then
if test "X$GTK_CONFIG" != "Xno" -o "X$PKG_CONFIG" != "Xno"; then
{
no_gtk=""
if (test "X$SKIP_GTK2" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
&& $PKG_CONFIG --exists gtk+-2.0; then
{
min_gtk_version=3.0.0
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
$as_echo_n "checking for GTK - version >= $min_gtk_version... " >&6; }
GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-2.0`
GTK_LIBS=`$PKG_CONFIG --libs gtk+-2.0`
gtk_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
gtk_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
gtk_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
}
elif (test "X$SKIP_GTK3" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
&& $PKG_CONFIG --exists gtk+-3.0; then
{
min_gtk_version=3.0.0
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
$as_echo_n "checking for GTK - version >= $min_gtk_version... " >&6; }
GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-3.0`
GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-3.0`
GTK_LIBS=`$PKG_CONFIG --libs gtk+-3.0`
gtk_major_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
gtk_minor_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
gtk_micro_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
}
else
no_gtk=yes
fi
if test "x$enable_gtktest" = "xyes" -a "x$no_gtk" = "x"; then
{
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $GTK_CFLAGS"
LIBS="$LIBS $GTK_LIBS"
rm -f conf.gtktest
if test "$cross_compiling" = yes; then :
echo $ac_n "cross compiling; assumed OK... $ac_c"
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <gtk/gtk.h>
#include <stdio.h>
#if STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
#endif
int
main ()
{
int major, minor, micro;
char *tmp_version;
system ("touch conf.gtktest");
/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = g_strdup("$min_gtk_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_gtk_version");
exit(1);
}
if ((gtk_major_version > major) ||
((gtk_major_version == major) && (gtk_minor_version > minor)) ||
((gtk_major_version == major) && (gtk_minor_version == minor) &&
(gtk_micro_version >= micro)))
{
return 0;
}
return 1;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
else
no_gtk=yes
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
}
fi
if test "x$no_gtk" = x ; then
if test "x$enable_gtktest" = "xyes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
$as_echo "yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
$as_echo "found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
fi
GUI_LIB_LOC="$GTK_LIBDIR"
GTK_LIBNAME="$GTK_LIBS"
GUI_INC_LOC="$GTK_CFLAGS"
else
{
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
GTK_CFLAGS=""
GTK_LIBS=""
:
}
fi
}
else
GTK_CFLAGS=""
GTK_LIBS=""
:
fi
rm -f conf.gtktest
if test "x$GTK_CFLAGS" != "x"; then
SKIP_GTK2=YES
SKIP_GNOME=YES
SKIP_ATHENA=YES
SKIP_NEXTAW=YES
SKIP_MOTIF=YES
GUITYPE=GTK
$as_echo "#define HAVE_GTK_MULTIHEAD 1" >>confdefs.h
$as_echo "#define USE_GTK3 1" >>confdefs.h
fi
fi
fi
if test "x$GUITYPE" = "xGTK"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking version of Gdk-Pixbuf" >&5
$as_echo_n "checking version of Gdk-Pixbuf... " >&6; }
@@ -9163,7 +9392,7 @@ $as_echo_n "checking version of Gdk-Pixbuf... " >&6; }
gdk_pixbuf_version_minor=`echo $gdk_pixbuf_version | \
sed -e 's/[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*/\1/'`
if test "x$gdk_pixbuf_version_minor" != x -a \
$gdk_pixbuf_version_minor -ge 31 ; then
$gdk_pixbuf_version_minor -ge 31 ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: OK." >&5
$as_echo "OK." >&6; }
# Extract the first word of "glib-compile-resources", so it can be a program name with args.
@@ -9210,15 +9439,16 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking glib-compile-resources" >&5
$as_echo_n "checking glib-compile-resources... " >&6; }
if test "x$GLIB_COMPILE_RESOURCES" = xno ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot be found in PATH." >&5
GLIB_COMPILE_RESOURCES=""
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot be found in PATH." >&5
$as_echo "cannot be found in PATH." >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: usable." >&5
$as_echo "usable." >&6; }
$as_echo "#define USE_GRESOURCE 1" >>confdefs.h
$as_echo "#define USE_GRESOURCE 1" >>confdefs.h
GRESOURCE_SRC="auto/gui_gtk_gresources.c"
GRESOURCE_OBJ="objects/gui_gtk_gresources.o"
GRESOURCE_SRC="auto/gui_gtk_gresources.c"
GRESOURCE_OBJ="objects/gui_gtk_gresources.o"
fi
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not usable." >&5
@@ -9656,7 +9886,7 @@ done
fi
if test -z "$SKIP_ATHENA" -o -z "$SKIP_NEXTAW" -o -z "$SKIP_MOTIF" -o -z "$SKIP_GTK2"; then
if test -z "$SKIP_ATHENA" -o -z "$SKIP_NEXTAW" -o -z "$SKIP_MOTIF" -o -z "$SKIP_GTK2" -o -z "$SKIP_GTK3"; then
cppflags_save=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
for ac_header in X11/xpm.h X11/Sunkeysym.h
@@ -10859,6 +11089,48 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
$as_echo_n "checking for inline... " >&6; }
if ${ac_cv_c_inline+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#ifndef __cplusplus
typedef int foo_t;
static $ac_kw foo_t static_foo () {return 0; }
$ac_kw foo_t foo () {return 0; }
#endif
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_c_inline=$ac_kw
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
test "$ac_cv_c_inline" != no && break
done
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
$as_echo "$ac_cv_c_inline" >&6; }
case $ac_cv_c_inline in
inline | yes) ;;
*)
case $ac_cv_c_inline in
no) ac_val=;;
*) ac_val=$ac_cv_c_inline;;
esac
cat >>confdefs.h <<_ACEOF
#ifndef __cplusplus
#define inline $ac_val
#endif
_ACEOF
;;
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rlim_t" >&5
$as_echo_n "checking for rlim_t... " >&6; }
@@ -12218,6 +12490,70 @@ if ac_fn_c_try_link "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }; $as_echo "#define HAVE_FLOAT_FUNCS 1" >>confdefs.h
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf()" >&5
$as_echo_n "checking for isinf()... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#ifdef HAVE_MATH_H
# include <math.h>
#endif
#if STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
#endif
int
main ()
{
int r = isinf(1.11);
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }; $as_echo "#define HAVE_ISINF 1" >>confdefs.h
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for isnan()" >&5
$as_echo_n "checking for isnan()... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#ifdef HAVE_MATH_H
# include <math.h>
#endif
#if STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
#endif
int
main ()
{
int r = isnan(1.11);
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }; $as_echo "#define HAVE_ISNAN 1" >>confdefs.h
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
+1 -1
View File
@@ -34,7 +34,7 @@ typedef union {
char_u uc[8];
} block8;
#if defined(WIN3264) || defined(DOS32)
#if defined(WIN3264)
/* MS-Windows is always little endian */
#else
# ifdef HAVE_CONFIG_H
+5 -6
View File
@@ -545,9 +545,7 @@ buf_clear_file(buf_T *buf)
{
buf->b_ml.ml_line_count = 1;
unchanged(buf, TRUE);
#ifndef SHORT_FNAME
buf->b_shortname = FALSE;
#endif
buf->b_p_eol = TRUE;
buf->b_start_eol = TRUE;
#ifdef FEAT_MBYTE
@@ -1621,11 +1619,14 @@ enter_buffer(buf_T *buf)
#if defined(FEAT_AUTOCHDIR) || defined(PROTO)
/*
* Change to the directory of the current buffer.
* Don't do this while still starting up.
*/
void
do_autochdir(void)
{
if (curbuf->b_ffname != NULL && vim_chdirfile(curbuf->b_ffname) == OK)
if (starting == 0
&& curbuf->b_ffname != NULL
&& vim_chdirfile(curbuf->b_ffname) == OK)
shorten_fnames(TRUE);
}
#endif
@@ -2915,9 +2916,7 @@ setfname(
}
#endif
#ifndef SHORT_FNAME
buf->b_shortname = FALSE;
#endif
buf_name_changed(buf);
return OK;
@@ -4490,7 +4489,7 @@ fix_fname(char_u *fname)
# ifdef BACKSLASH_IN_FILENAME
|| strstr((char *)fname, "\\\\") != NULL
# endif
# if defined(MSWIN) || defined(DJGPP)
# if defined(MSWIN)
|| vim_strchr(fname, '~') != NULL
# endif
)
+858 -484
View File
File diff suppressed because it is too large Load Diff
+1 -2
View File
@@ -1761,8 +1761,7 @@ skiptowhite(char_u *p)
return p;
}
#if defined(FEAT_LISTCMDS) || defined(FEAT_SIGNS) || defined(FEAT_SNIFF) \
|| defined(PROTO)
#if defined(FEAT_LISTCMDS) || defined(FEAT_SIGNS) || defined(PROTO)
/*
* skiptowhite_esc: Like skiptowhite(), but also skip escaped chars
*/
+12 -3
View File
@@ -362,9 +362,6 @@
/* Define for linking via dlopen() or LoadLibrary() */
#undef DYNAMIC_TCL
/* Define if you want to include the Sniff interface. */
#undef FEAT_SNIFF
/* Define if you want to add support for ACL */
#undef HAVE_POSIX_ACL
#undef HAVE_SOLARIS_ZFS_ACL
@@ -460,3 +457,15 @@
/* Define if GResource is used to load icons */
#undef USE_GRESOURCE
/* Define if GTK+ GUI is to be linked against GTK+ 3 */
#undef USE_GTK3
/* Define if we have isinf() */
#undef HAVE_ISINF
/* Define if we have isnan() */
#undef HAVE_ISNAN
/* Define to inline symbol or empty */
#undef inline
-3
View File
@@ -101,9 +101,6 @@ RUBY_PRO = @RUBY_PRO@
RUBY_CFLAGS = @RUBY_CFLAGS@
RUBY_LIBS = @RUBY_LIBS@
SNIFF_SRC = @SNIFF_SRC@
SNIFF_OBJ = @SNIFF_OBJ@
AWK = @AWK@
STRIP = @STRIP@
+108 -23
View File
@@ -240,7 +240,7 @@ if test "`(uname) 2>/dev/null`" = Darwin; then
CFLAGS=$SAVE_CFLAGS
if test "x$CARBON" = "xyes" -o "x$COCOA" = "xyes"; then
if test -z "$with_x" -a "X$enable_gui" != Xmotif -a "X$enable_gui" != Xathena -a "X$enable_gui" != Xgtk2; then
if test -z "$with_x" -a "X$enable_gui" != Xmotif -a "X$enable_gui" != Xathena -a "X$enable_gui" != Xgtk2 -a "X$enable_gui" != Xgtk3; then
with_x=no
fi
fi
@@ -2074,19 +2074,6 @@ if test "$enable_channel" = "yes"; then
AC_SUBST(CHANNEL_OBJ)
fi
AC_MSG_CHECKING(--enable-sniff argument)
AC_ARG_ENABLE(sniff,
[ --enable-sniff Include Sniff interface.], ,
[enable_sniff="no"])
AC_MSG_RESULT($enable_sniff)
if test "$enable_sniff" = "yes"; then
AC_DEFINE(FEAT_SNIFF)
SNIFF_SRC="if_sniff.c"
AC_SUBST(SNIFF_SRC)
SNIFF_OBJ="objects/if_sniff.o"
AC_SUBST(SNIFF_OBJ)
fi
AC_MSG_CHECKING(--enable-multibyte argument)
AC_ARG_ENABLE(multibyte,
[ --enable-multibyte Include multibyte editing support.], ,
@@ -2251,7 +2238,7 @@ test "x$with_x" = xno -a "x$MACOSX" != "xyes" -a "x$QNX" != "xyes" && enable_gui
AC_MSG_CHECKING(--enable-gui argument)
AC_ARG_ENABLE(gui,
[ --enable-gui[=OPTS] X11 GUI [default=auto] [OPTS=auto/no/gtk2/gnome2/motif/athena/neXtaw/photon/carbon/macvim]], , enable_gui="auto")
[ --enable-gui[=OPTS] X11 GUI [default=auto] [OPTS=auto/no/gtk2/gnome2/gtk3/motif/athena/neXtaw/photon/carbon/macvim]], , enable_gui="auto")
dnl Canonicalize the --enable-gui= argument so that it can be easily compared.
dnl Do not use character classes for portability with old tools.
@@ -2260,6 +2247,7 @@ enable_gui_canon=`echo "_$enable_gui" | \
dnl Skip everything by default.
SKIP_GTK2=YES
SKIP_GTK3=YES
SKIP_GNOME=YES
SKIP_MOTIF=YES
SKIP_ATHENA=YES
@@ -2316,6 +2304,8 @@ else
gnome2) AC_MSG_RESULT(GNOME 2.x GUI support)
SKIP_GNOME=
SKIP_GTK2=;;
gtk3) AC_MSG_RESULT(GTK+ 3.x GUI support)
SKIP_GTK3=;;
motif) AC_MSG_RESULT(Motif GUI support)
SKIP_MOTIF=;;
athena) AC_MSG_RESULT(Athena GUI support)
@@ -2351,6 +2341,17 @@ if test "x$SKIP_GNOME" != "xYES" -a "$enable_gui_canon" != "gnome2"; then
fi
fi
if test "x$SKIP_GTK3" != "xYES" -a "$enable_gui_canon" != "gtk3"; then
AC_MSG_CHECKING(whether or not to look for GTK+ 3)
AC_ARG_ENABLE(gtk3-check,
[ --enable-gtk3-check If auto-select GUI, check for GTK+ 3 [default=yes]],
, enable_gtk3_check="yes")
AC_MSG_RESULT($enable_gtk3_check)
if test "x$enable_gtk3_check" = "xno"; then
SKIP_GTK3=YES
fi
fi
if test "x$SKIP_MOTIF" != "xYES" -a "$enable_gui_canon" != "motif"; then
AC_MSG_CHECKING(whether or not to look for Motif)
AC_ARG_ENABLE(motif-check,
@@ -2453,12 +2454,12 @@ AC_DEFUN(AM_PATH_GTK,
[
if test "X$GTK_CONFIG" != "Xno" -o "X$PKG_CONFIG" != "Xno"; then
{
min_gtk_version=ifelse([$1], ,2.2.0,$1)
AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
no_gtk=""
if (test "X$SKIP_GTK2" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
&& $PKG_CONFIG --exists gtk+-2.0; then
{
min_gtk_version=ifelse([$1], ,2.2.0,$1)
AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
dnl We should be using PKG_CHECK_MODULES() instead of this hack.
dnl But I guess the dependency on pkgconfig.m4 is not wanted or
dnl something like that.
@@ -2472,6 +2473,22 @@ AC_DEFUN(AM_PATH_GTK,
gtk_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
}
elif (test "X$SKIP_GTK3" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
&& $PKG_CONFIG --exists gtk+-3.0; then
{
min_gtk_version=ifelse([$1], ,3.0.0,$1)
AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-3.0`
GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-3.0`
GTK_LIBS=`$PKG_CONFIG --libs gtk+-3.0`
gtk_major_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
gtk_minor_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
gtk_micro_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
}
else
no_gtk=yes
fi
@@ -2647,6 +2664,7 @@ if test -z "$SKIP_GTK2"; then
GTK_LIBNAME="$GTK_LIBS"
GUI_INC_LOC="$GTK_CFLAGS"], )
if test "x$GTK_CFLAGS" != "x"; then
SKIP_GTK3=YES
SKIP_ATHENA=YES
SKIP_NEXTAW=YES
SKIP_MOTIF=YES
@@ -2675,6 +2693,44 @@ if test -z "$SKIP_GTK2"; then
fi
fi
dnl ---------------------------------------------------------------------------
dnl Check for GTK3.
dnl ---------------------------------------------------------------------------
if test -z "$SKIP_GTK3"; then
AC_MSG_CHECKING(--disable-gtktest argument)
AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program],
, enable_gtktest=yes)
if test "x$enable_gtktest" = "xyes" ; then
AC_MSG_RESULT(gtk test enabled)
else
AC_MSG_RESULT(gtk test disabled)
fi
if test "X$PKG_CONFIG" = "X"; then
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
fi
if test "x$PKG_CONFIG" != "xno"; then
AM_PATH_GTK(3.0.0,
[GUI_LIB_LOC="$GTK_LIBDIR"
GTK_LIBNAME="$GTK_LIBS"
GUI_INC_LOC="$GTK_CFLAGS"], )
if test "x$GTK_CFLAGS" != "x"; then
SKIP_GTK2=YES
SKIP_GNOME=YES
SKIP_ATHENA=YES
SKIP_NEXTAW=YES
SKIP_MOTIF=YES
GUITYPE=GTK
AC_SUBST(GTK_LIBNAME)
AC_DEFINE(HAVE_GTK_MULTIHEAD)
AC_DEFINE(USE_GTK3)
fi
fi
fi
dnl Check the version of Gdk-Pixbuf. If the version is 2.31 or later and
dnl glib-compile-resources is found in PATH, use GResource.
if test "x$GUITYPE" = "xGTK"; then
@@ -2684,17 +2740,18 @@ if test "x$GUITYPE" = "xGTK"; then
gdk_pixbuf_version_minor=`echo $gdk_pixbuf_version | \
sed -e 's/[[0-9]][[0-9]]*\.\([[0-9]][[0-9]]*\)\.[[0-9]][[0-9]]*/\1/'`
if test "x$gdk_pixbuf_version_minor" != x -a \
$gdk_pixbuf_version_minor -ge 31 ; then
$gdk_pixbuf_version_minor -ge 31 ; then
AC_MSG_RESULT([OK.])
AC_PATH_PROG(GLIB_COMPILE_RESOURCES,[glib-compile-resources],no)
AC_MSG_CHECKING([glib-compile-resources])
if test "x$GLIB_COMPILE_RESOURCES" = xno ; then
AC_MSG_RESULT([cannot be found in PATH.])
GLIB_COMPILE_RESOURCES=""
AC_MSG_RESULT([cannot be found in PATH.])
else
AC_MSG_RESULT([usable.])
AC_DEFINE(USE_GRESOURCE)
GRESOURCE_SRC="auto/gui_gtk_gresources.c"
GRESOURCE_OBJ="objects/gui_gtk_gresources.o"
AC_DEFINE(USE_GRESOURCE)
GRESOURCE_SRC="auto/gui_gtk_gresources.c"
GRESOURCE_OBJ="objects/gui_gtk_gresources.o"
fi
else
AC_MSG_RESULT([not usable.])
@@ -2896,7 +2953,7 @@ if test "$enable_xsmp" = "yes"; then
fi
if test -z "$SKIP_ATHENA" -o -z "$SKIP_NEXTAW" -o -z "$SKIP_MOTIF" -o -z "$SKIP_GTK2"; then
if test -z "$SKIP_ATHENA" -o -z "$SKIP_NEXTAW" -o -z "$SKIP_MOTIF" -o -z "$SKIP_GTK2" -o -z "$SKIP_GTK3"; then
dnl Check for X11/xpm.h and X11/Sunkeysym.h with the GUI include path
cppflags_save=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
@@ -3163,6 +3220,7 @@ AC_HEADER_TIME
AC_CHECK_TYPE(ino_t, long)
AC_CHECK_TYPE(dev_t, unsigned)
AC_C_BIGENDIAN(,,,)
AC_C_INLINE
AC_MSG_CHECKING(for rlim_t)
if eval "test \"`echo '$''{'ac_cv_type_rlim_t'+set}'`\" = set"; then
@@ -3684,6 +3742,33 @@ AC_TRY_LINK([
AC_MSG_RESULT(yes); AC_DEFINE(HAVE_FLOAT_FUNCS),
AC_MSG_RESULT(no))
dnl isinf() and isnan() need to include header files and may need -lm.
AC_MSG_CHECKING([for isinf()])
AC_TRY_LINK([
#ifdef HAVE_MATH_H
# include <math.h>
#endif
#if STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
#endif
], [int r = isinf(1.11); ],
AC_MSG_RESULT(yes); AC_DEFINE(HAVE_ISINF),
AC_MSG_RESULT(no))
AC_MSG_CHECKING([for isnan()])
AC_TRY_LINK([
#ifdef HAVE_MATH_H
# include <math.h>
#endif
#if STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
#endif
], [int r = isnan(1.11); ],
AC_MSG_RESULT(yes); AC_DEFINE(HAVE_ISNAN),
AC_MSG_RESULT(no))
dnl Link with -lposix1e for ACL stuff; if not found, try -lacl for SGI
dnl when -lacl works, also try to use -lattr (required for Debian).
dnl On Solaris, use the acl_get/set functions in libsec, if present.
+4 -4
View File
@@ -29,7 +29,7 @@ static int diff_flags = DIFF_FILLER;
static int diff_a_works = MAYBE; /* TRUE when "diff -a" works, FALSE when it
doesn't work, MAYBE when not checked yet */
#if defined(MSWIN) || defined(MSDOS)
#if defined(MSWIN)
static int diff_bin_works = MAYBE; /* TRUE when "diff --binary" works, FALSE
when it doesn't work, MAYBE when not
checked yet */
@@ -733,7 +733,7 @@ ex_diffupdate(
break;
#endif
#if defined(MSWIN) || defined(MSDOS)
#if defined(MSWIN)
/* If the "-a" argument works, also check if "--binary" works. */
if (ok && diff_a_works == MAYBE && diff_bin_works == MAYBE)
{
@@ -764,7 +764,7 @@ ex_diffupdate(
EMSG(_("E810: Cannot read or write temp files"));
EMSG(_("E97: Cannot create diffs"));
diff_a_works = MAYBE;
#if defined(MSWIN) || defined(MSDOS)
#if defined(MSWIN)
diff_bin_works = MAYBE;
#endif
goto theend;
@@ -845,7 +845,7 @@ diff_file(
* non-zero when differences have been found. */
vim_snprintf((char *)cmd, len, "diff %s%s%s%s%s %s",
diff_a_works == FALSE ? "" : "-a ",
#if defined(MSWIN) || defined(MSDOS)
#if defined(MSWIN)
diff_bin_works == TRUE ? "--binary " : "",
#else
"",
+15 -83
View File
@@ -39,74 +39,7 @@ static garray_T user_digraphs = {0, 0, (int)sizeof(digr_T), 10, NULL};
* compilers cannot handle them (Amiga SAS/C is the most picky one).
*/
static digr_T digraphdefault[] =
#if defined(MSDOS)
/*
* MSDOS digraphs.
*/
{{'C', ',', 128}, /* ~@ XX */
{'u', '"', 129}, /* */
{'e', '\'', 130}, /* */
{'a', '^', 131}, /* ƒ */
{'a', '"', 132}, /* „ */
{'a', '`', 133}, /* … */
{'a', '@', 134}, /* † */
{'c', ',', 135}, /* ~G XX */
{'e', '^', 136}, /* ~H XX */
{'e', '"', 137}, /* ‰ */
{'e', '`', 138}, /* Š */
{'i', '"', 139}, /* */
{'i', '^', 140}, /* Œ */
{'i', '`', 141}, /* */
{'A', '"', 142}, /* ~N XX */
{'A', '@', 143}, /* */
{'E', '\'', 144}, /* */
{'a', 'e', 145}, /* */
{'A', 'E', 146}, /* */
{'o', '^', 147}, /* “ */
{'o', '"', 148}, /* ” */
{'o', '`', 149}, /* • */
{'u', '^', 150}, /* */
{'u', '`', 151}, /* — */
{'y', '"', 152}, /* ˜ */
{'O', '"', 153}, /* ™ */
{'U', '"', 154}, /* š */
{'c', '|', 155}, /* */
{'$', '$', 156}, /* œ */
{'Y', '-', 157}, /* ~] XX */
{'P', 't', 158}, /* ž */
{'f', 'f', 159}, /* Ÿ */
{'a', '\'', 160}, /*   */
{'i', '\'', 161}, /* ¡ */
{'o', '\'', 162}, /* ¢ */
{'u', '\'', 163}, /* x XX */
{'n', '~', 164}, /* ¤ */
{'N', '~', 165}, /* ¥ */
{'a', 'a', 166}, /* ¦ */
{'o', 'o', 167}, /* § */
{'~', '?', 168}, /* ¨ */
{'-', 'a', 169}, /* © */
{'a', '-', 170}, /* ª */
{'1', '2', 171}, /* « */
{'1', '4', 172}, /* ¬ */
{'~', '!', 173}, /* ­ */
{'<', '<', 174}, /* ® */
{'>', '>', 175}, /* ¯ */
{'s', 's', 225}, /* á */
{'j', 'u', 230}, /* æ */
{'o', '/', 237}, /* í */
{'+', '-', 241}, /* ñ */
{'>', '=', 242}, /* ò */
{'<', '=', 243}, /* ó */
{':', '-', 246}, /* ö */
{'~', '~', 247}, /* ÷ */
{'~', 'o', 248}, /* ø */
{'2', '2', 253}, /* ý */
{NUL, NUL, NUL}
};
#else /* !MSDOS */
# ifdef __MINT__
#ifdef __MINT__
/*
* ATARI digraphs
@@ -171,8 +104,8 @@ static digr_T digraphdefault[] =
{NUL, NUL, NUL}
};
# else /* !__MINT__ */
# ifdef HPUX_DIGRAPHS
#else /* !__MINT__ */
# ifdef HPUX_DIGRAPHS
/*
* different HPUX digraphs
@@ -275,9 +208,9 @@ static digr_T digraphdefault[] =
{NUL, NUL, NUL}
};
# else /* !HPUX_DIGRAPHS */
# else /* !HPUX_DIGRAPHS */
# ifdef EBCDIC
# ifdef EBCDIC
/*
* EBCDIC - ISO digraphs
@@ -387,8 +320,8 @@ static digr_T digraphdefault[] =
{NUL, NUL, NUL}
};
# else
# if defined(MACOS) && !defined(FEAT_MBYTE)
# else
# if defined(MACOS) && !defined(FEAT_MBYTE)
/*
* Macintosh digraphs
@@ -516,9 +449,9 @@ static digr_T digraphdefault[] =
{NUL, NUL, NUL}
};
# else /* !MACOS */
# else /* !MACOS */
# ifdef OLD_DIGRAPHS
# ifdef OLD_DIGRAPHS
/*
* digraphs compatible with Vim 5.x
@@ -625,7 +558,7 @@ static digr_T digraphdefault[] =
{'y', '"', 255}, /* x XX */
{NUL, NUL, NUL}
};
# else /* OLD_DIGRAPHS */
# else /* OLD_DIGRAPHS */
/*
* digraphs for Unicode from RFC1345
@@ -2001,13 +1934,12 @@ static digr_T digraphdefault[] =
{NUL, NUL, NUL}
};
# endif /* OLD_DIGRAPHS */
# endif /* OLD_DIGRAPHS */
# endif /* Macintosh */
# endif /* EBCDIC */
# endif /* !HPUX_DIGRAPHS */
# endif /* !__MINT__ */
#endif /* !MSDOS */
# endif /* Macintosh */
# endif /* EBCDIC */
# endif /* !HPUX_DIGRAPHS */
#endif /* !__MINT__ */
/*
* handle digraphs after typing a character
+4 -16
View File
@@ -46,14 +46,14 @@
char *searchpath(char *name);
#endif
#if defined(DJGPP) || defined(UNIX_LINT)
#if defined(UNIX_LINT)
# include <unistd.h>
# include <errno.h>
#endif
#include "version.h"
#if defined(DJGPP) || defined(UNIX_LINT)
#if defined(UNIX_LINT)
# define vim_mkdir(x, y) mkdir((char *)(x), y)
#else
# if defined(WIN3264) && !defined(__BORLANDC__)
@@ -63,9 +63,7 @@ char *searchpath(char *name);
# endif
#endif
#ifndef DJGPP
# define sleep(n) Sleep((n) * 1000)
#endif
#define sleep(n) Sleep((n) * 1000)
/* ---------------------------------------- */
@@ -423,9 +421,7 @@ run_command(char *cmd)
char *p;
/* On WinNT, 'start' is a shell built-in for cmd.exe rather than an
* executable (start.exe) like in Win9x. DJGPP, being a DOS program,
* is given the COMSPEC command.com by WinNT, so we have to find
* cmd.exe manually and use it. */
* executable (start.exe) like in Win9x. */
cmd_path = searchpath_save("cmd.exe");
if (cmd_path != NULL)
{
@@ -640,14 +636,6 @@ char *sysdrive; /* system drive or "c:\" */
static void
do_inits(char **argv)
{
#ifdef DJGPP
/*
* Use Long File Names by default, if $LFN not set.
*/
if (getenv("LFN") == NULL)
putenv("LFN=y");
#endif
/* Find out the full path of our executable. */
if (my_fullpath(installdir, argv[0], BUFSIZE) == NULL)
{
+34 -26
View File
@@ -185,7 +185,8 @@ static int ins_compl_key2dir(int c);
static int ins_compl_pum_key(int c);
static int ins_compl_key2count(int c);
static int ins_compl_use_match(int c);
static int ins_complete(int c);
static int ins_complete(int c, int enable_pum);
static void show_pum(int save_w_wrow);
static unsigned quote_meta(char_u *dest, char_u *str, int len);
#endif /* FEAT_INS_EXPAND */
@@ -1051,12 +1052,6 @@ doESCkey:
case K_SELECT: /* end of Select mode mapping - ignore */
break;
#ifdef FEAT_SNIFF
case K_SNIFF: /* Sniff command received */
stuffcharReadbuff(K_SNIFF);
goto doESCkey;
#endif
case K_HELP: /* Help key works like <ESC> <Help> */
case K_F1:
case K_XF1:
@@ -1438,7 +1433,7 @@ doESCkey:
docomplete:
compl_busy = TRUE;
if (ins_complete(c) == FAIL)
if (ins_complete(c, TRUE) == FAIL)
compl_cont_status = 0;
compl_busy = FALSE;
break;
@@ -2774,6 +2769,8 @@ ins_compl_make_cyclic(void)
void
set_completion(colnr_T startcol, list_T *list)
{
int save_w_wrow = curwin->w_wrow;
/* If already doing completions stop it. */
if (ctrl_x_mode != 0)
ins_compl_prep(' ');
@@ -2803,11 +2800,15 @@ set_completion(colnr_T startcol, list_T *list)
compl_curr_match = compl_first_match;
if (compl_no_insert)
ins_complete(K_DOWN);
ins_complete(K_DOWN, FALSE);
else
ins_complete(Ctrl_N);
ins_complete(Ctrl_N, FALSE);
if (compl_no_select)
ins_complete(Ctrl_P);
ins_complete(Ctrl_P, FALSE);
/* Lazily show the popup menu, unless we got interrupted. */
if (!compl_interrupted)
show_pum(save_w_wrow);
out_flush();
}
@@ -3493,7 +3494,7 @@ ins_compl_new_leader(void)
}
#endif
compl_restarting = TRUE;
if (ins_complete(Ctrl_N) == FAIL)
if (ins_complete(Ctrl_N, TRUE) == FAIL)
compl_cont_status = 0;
compl_restarting = FALSE;
}
@@ -5031,7 +5032,7 @@ ins_compl_use_match(int c)
* Returns OK if completion was done, FAIL if something failed (out of mem).
*/
static int
ins_complete(int c)
ins_complete(int c, int enable_pum)
{
char_u *line;
int startcol = 0; /* column where searched text starts */
@@ -5624,20 +5625,9 @@ ins_complete(int c)
}
/* Show the popup menu, unless we got interrupted. */
if (!compl_interrupted)
if (enable_pum && !compl_interrupted)
{
/* RedrawingDisabled may be set when invoked through complete(). */
n = RedrawingDisabled;
RedrawingDisabled = 0;
/* If the cursor moved we need to remove the pum first. */
setcursor();
if (save_w_wrow != curwin->w_wrow)
ins_compl_del_pum();
ins_compl_show_pum();
setcursor();
RedrawingDisabled = n;
show_pum(save_w_wrow);
}
compl_was_interrupted = compl_interrupted;
compl_interrupted = FALSE;
@@ -5645,6 +5635,24 @@ ins_complete(int c)
return OK;
}
static void
show_pum(int save_w_wrow)
{
/* RedrawingDisabled may be set when invoked through complete(). */
int n = RedrawingDisabled;
RedrawingDisabled = 0;
/* If the cursor moved we need to remove the pum first. */
setcursor();
if (save_w_wrow != curwin->w_wrow)
ins_compl_del_pum();
ins_compl_show_pum();
setcursor();
RedrawingDisabled = n;
}
/*
* Looks in the first "len" chars. of "src" for search-metachars.
* If dest is not NULL the chars. are copied there quoting (with
+767 -169
View File
File diff suppressed because it is too large Load Diff
+2 -6
View File
@@ -1925,14 +1925,10 @@ write_viminfo(char_u *file, int forceit)
#ifdef UNIX
shortname,
#else
# ifdef SHORT_FNAME
TRUE,
# else
# ifdef FEAT_GUI_W32
# ifdef FEAT_GUI_W32
gui_is_win32s(),
# else
# else
FALSE,
# endif
# endif
#endif
fname,
+4 -8
View File
@@ -93,11 +93,7 @@ static struct cmdname
ex_func_T cmd_func; /* function for this command */
long_u cmd_argt; /* flags declared above */
int cmd_addr_type; /* flag for address type */
}
# if defined(FEAT_GUI_W16)
_far
# endif
cmdnames[] =
} cmdnames[] =
#else
# define EX(a, b, c, d, e) a
enum CMD_index
@@ -814,6 +810,9 @@ EX(CMD_loadview, "loadview", ex_loadview,
EX(CMD_loadkeymap, "loadkeymap", ex_loadkeymap,
CMDWIN,
ADDR_LINES),
EX(CMD_loadplugin, "loadplugin", ex_loadplugin,
BANG|FILE1|TRLBAR|SBOXOK|CMDWIN,
ADDR_LINES),
EX(CMD_lockmarks, "lockmarks", ex_wrongmodifier,
NEEDARG|EXTRA|NOTRLCOM,
ADDR_LINES),
@@ -1288,9 +1287,6 @@ EX(CMD_smenu, "smenu", ex_menu,
EX(CMD_snext, "snext", ex_next,
RANGE|NOTADR|BANG|FILES|EDITCMD|ARGOPT|TRLBAR,
ADDR_LINES),
EX(CMD_sniff, "sniff", ex_sniff,
EXTRA|TRLBAR,
ADDR_LINES),
EX(CMD_snomagic, "snomagic", ex_submagic,
RANGE|WHOLEFOLD|EXTRA|CMDWIN,
ADDR_LINES),
+129 -26
View File
@@ -131,9 +131,6 @@ do_debug(char_u *cmd)
redir_off = TRUE; /* don't redirect debug commands */
State = NORMAL;
#ifdef FEAT_SNIFF
want_sniff_request = 0; /* No K_SNIFF wanted */
#endif
if (!debug_did_msg)
MSG(_("Entering Debug mode. Type \"cont\" to continue."));
@@ -151,9 +148,7 @@ do_debug(char_u *cmd)
{
msg_scroll = TRUE;
need_wait_return = FALSE;
#ifdef FEAT_SNIFF
ProcessSniffRequests();
#endif
/* Save the current typeahead buffer and replace it with an empty one.
* This makes sure we get input from the user here and don't interfere
* with the commands being executed. Reset "ex_normal_busy" to avoid
@@ -2515,7 +2510,7 @@ ex_next(exarg_T *eap)
}
}
#ifdef FEAT_LISTCMDS
#if defined(FEAT_LISTCMDS) || defined(PROTO)
/*
* ":argedit"
*/
@@ -2638,6 +2633,15 @@ ex_listdo(exarg_T *eap)
}
#endif
#ifndef FEAT_QUICKFIX
if (eap->cmdidx == CMD_cdo || eap->cmdidx == CMD_ldo ||
eap->cmdidx == CMD_cfdo || eap->cmdidx == CMD_lfdo)
{
ex_ni(eap);
return;
}
#endif
#if defined(FEAT_AUTOCMD) && defined(FEAT_SYN_HL)
if (eap->cmdidx != CMD_windo && eap->cmdidx != CMD_tabdo)
/* Don't do syntax HL autocommands. Skipping the syntax file is a
@@ -2978,8 +2982,6 @@ ex_runtime(exarg_T *eap)
source_runtime(eap->arg, eap->forceit);
}
static void source_callback(char_u *fname, void *cookie);
static void
source_callback(char_u *fname, void *cookie UNUSED)
{
@@ -2998,19 +3000,9 @@ source_runtime(char_u *name, int all)
return do_in_runtimepath(name, all, source_callback, NULL);
}
/*
* Find "name" in 'runtimepath'. When found, invoke the callback function for
* it: callback(fname, "cookie")
* When "all" is TRUE repeat for all matches, otherwise only the first one is
* used.
* Returns OK when at least one match found, FAIL otherwise.
*
* If "name" is NULL calls callback for each entry in runtimepath. Cookie is
* passed by reference in this case, setting it to NULL indicates that callback
* has done its job.
*/
int
do_in_runtimepath(
static int
do_in_path(
char_u *path,
char_u *name,
int all,
void (*callback)(char_u *fname, void *ck),
@@ -3035,7 +3027,7 @@ do_in_runtimepath(
/* Make a copy of 'runtimepath'. Invoking the callback may change the
* value. */
rtp_copy = vim_strsave(p_rtp);
rtp_copy = vim_strsave(path);
buf = alloc(MAXPATHL);
if (buf != NULL && rtp_copy != NULL)
{
@@ -3043,7 +3035,7 @@ do_in_runtimepath(
{
verbose_enter();
smsg((char_u *)_("Searching for \"%s\" in \"%s\""),
(char *)name, (char *)p_rtp);
(char *)name, (char *)path);
verbose_leave();
}
@@ -3112,6 +3104,118 @@ do_in_runtimepath(
return did_one ? OK : FAIL;
}
/*
* Find "name" in 'runtimepath'. When found, invoke the callback function for
* it: callback(fname, "cookie")
* When "all" is TRUE repeat for all matches, otherwise only the first one is
* used.
* Returns OK when at least one match found, FAIL otherwise.
*
* If "name" is NULL calls callback for each entry in runtimepath. Cookie is
* passed by reference in this case, setting it to NULL indicates that callback
* has done its job.
*/
int
do_in_runtimepath(
char_u *name,
int all,
void (*callback)(char_u *fname, void *ck),
void *cookie)
{
return do_in_path(p_rtp, name, all, callback, cookie);
}
static void
source_pack_plugin(char_u *fname, void *cookie UNUSED)
{
char_u *p6, *p5, *p4, *p3, *p2, *p1, *p;
int c;
char_u *new_rtp;
int keep;
int oldlen;
int addlen;
p6 = p5 = p4 = p3 = p2 = p1 = get_past_head(fname);
for (p = p1; *p; mb_ptr_adv(p))
if (vim_ispathsep_nocolon(*p))
{
p6 = p5; p5 = p4; p4 = p3; p3 = p2; p2 = p1; p1 = p;
}
/* now we have:
* rtp/pack/name/ever/name/plugin/name.vim
* p6 p5 p4 p3 p2 p1
*/
/* find the part up to "pack" in 'runtimepath' */
c = *p6;
*p6 = NUL;
p = (char_u *)strstr((char *)p_rtp, (char *)fname);
if (p == NULL)
/* not found, append at the end */
p = p_rtp + STRLEN(p_rtp);
else
/* append after the matching directory. */
p += STRLEN(fname);
*p6 = c;
c = *p2;
*p2 = NUL;
if (strstr((char *)p_rtp, (char *)fname) == NULL)
{
/* directory not in 'runtimepath', add it */
oldlen = (int)STRLEN(p_rtp);
addlen = (int)STRLEN(fname);
new_rtp = alloc(oldlen + addlen + 2);
if (new_rtp == NULL)
{
*p2 = c;
return;
}
keep = (int)(p - p_rtp);
mch_memmove(new_rtp, p_rtp, keep);
new_rtp[keep] = ',';
mch_memmove(new_rtp + keep + 1, fname, addlen + 1);
if (p_rtp[keep] != NUL)
mch_memmove(new_rtp + keep + 1 + addlen, p_rtp + keep,
oldlen - keep + 1);
free_string_option(p_rtp);
p_rtp = new_rtp;
}
*p2 = c;
(void)do_source(fname, FALSE, DOSO_NONE);
}
/*
* Source the plugins in the package directories.
*/
void
source_packages()
{
do_in_path(p_pp, (char_u *)"pack/*/ever/*/plugin/*.vim",
TRUE, source_pack_plugin, NULL);
}
/*
* ":loadplugin {name}"
*/
void
ex_loadplugin(exarg_T *eap)
{
static char *pattern = "pack/*/opt/%s/plugin/*.vim";
int len;
char *pat;
len = (int)STRLEN(pattern) + (int)STRLEN(eap->arg);
pat = (char *)alloc(len);
if (pat == NULL)
return;
vim_snprintf(pat, len, pattern, eap->arg);
do_in_path(p_pp, (char_u *)pat, TRUE, source_pack_plugin, NULL);
vim_free(pat);
}
#if defined(FEAT_EVAL) && defined(FEAT_AUTOCMD)
/*
* ":options"
@@ -4229,8 +4333,7 @@ get_locale_val(int what)
{
char_u *loc;
/* Obtain the locale value from the libraries. For DJGPP this is
* redefined and it doesn't use the arguments. */
/* Obtain the locale value from the libraries. */
loc = (char_u *)setlocale(what, NULL);
# ifdef WIN32
+1 -10
View File
@@ -298,9 +298,6 @@ static void ex_popup(exarg_T *eap);
# define ex_rubydo ex_ni
# define ex_rubyfile ex_ni
#endif
#ifndef FEAT_SNIFF
# define ex_sniff ex_ni
#endif
#ifndef FEAT_KEYMAP
# define ex_loadkeymap ex_ni
#endif
@@ -648,9 +645,6 @@ do_exmode(
/* Ignore scrollbar and mouse events in Ex mode */
++hold_gui_events;
#endif
#ifdef FEAT_SNIFF
want_sniff_request = 0; /* No K_SNIFF wanted */
#endif
MSG(_("Entering Ex mode. Type \"visual\" to go to Normal mode."));
while (exmode_active)
@@ -668,9 +662,6 @@ do_exmode(
changedtick = curbuf->b_changedtick;
prev_msg_row = msg_row;
prev_line = curwin->w_cursor.lnum;
#ifdef FEAT_SNIFF
ProcessSniffRequests();
#endif
if (improved)
{
cmdline_row = msg_row;
@@ -3765,7 +3756,7 @@ set_one_cmd_context(
/* Check for environment variable */
if (*xp->xp_pattern == '$'
#if defined(MSDOS) || defined(MSWIN)
#if defined(MSWIN)
|| *xp->xp_pattern == '%'
#endif
)
+2 -5
View File
@@ -206,9 +206,6 @@ getcmdline(
struct cmdline_info save_ccline;
#endif
#ifdef FEAT_SNIFF
want_sniff_request = 0;
#endif
#ifdef FEAT_EVAL
if (firstc == -1)
{
@@ -4932,7 +4929,7 @@ expand_shellcmd(
if (*s == ' ')
++s; /* Skip space used for absolute path name. */
#if defined(MSDOS) || defined(MSWIN)
#if defined(MSWIN)
e = vim_strchr(s, ';');
#else
e = vim_strchr(s, ':');
@@ -5231,7 +5228,7 @@ globpath(
copy_option_part(&path, buf, MAXPATHL, ",");
if (STRLEN(buf) + STRLEN(file) + 2 < MAXPATHL)
{
# if defined(MSWIN) || defined(MSDOS)
# if defined(MSWIN)
/* Using the platform's path separator (\) makes vim incorrectly
* treat it as an escape character, use '/' instead. */
if (*buf != NUL && !after_pathsep(buf, buf + STRLEN(buf)))
+3 -3
View File
@@ -764,8 +764,8 @@ fkmap(int c)
if (!p_ri)
dec_cursor();
chg_c_toX_orX ();
chg_l_toXor_X ();
chg_c_toX_orX ();
chg_l_toXor_X ();
if (!p_ri)
inc_cursor();
@@ -1243,7 +1243,7 @@ fkmap(int c)
if (!p_ri)
dec_cursor();
tempc = LA;
tempc = LA;
}
else
{
+10 -17
View File
@@ -65,14 +65,10 @@
# if defined(UNIX) || defined(WIN3264) || defined(MACOS)
# define FEAT_HUGE
# else
# if defined(MSWIN) || defined(DJGPP) || defined(VMS) || defined(MACOS) || defined(AMIGA)
# if defined(MSWIN) || defined(VMS) || defined(MACOS) || defined(AMIGA)
# define FEAT_BIG
# else
# ifdef MSDOS
# define FEAT_SMALL
# else
# define FEAT_NORMAL
# endif
# define FEAT_NORMAL
# endif
# endif
#endif
@@ -320,7 +316,7 @@
*
* Disabled for EBCDIC as it requires multibyte.
*/
#if defined(FEAT_BIG) && !defined(WIN16) && VIM_SIZEOF_INT >= 4 && !defined(EBCDIC)
#if defined(FEAT_BIG) && VIM_SIZEOF_INT >= 4 && !defined(EBCDIC)
# define FEAT_ARABIC
#endif
#ifdef FEAT_ARABIC
@@ -467,7 +463,7 @@
* and byte2line().
* Note: Required for Macintosh.
*/
#if defined(FEAT_NORMAL) && !defined(MSDOS)
#if defined(FEAT_NORMAL)
# define FEAT_TITLE
#endif
@@ -541,7 +537,6 @@
* with HAVE_TGETENT defined).
*
* (nothing) Machine specific termcap entries will be included.
* This is default for win16 to save static data.
*
* SOME_BUILTIN_TCAPS Include most useful builtin termcap entries (used only
* with NO_BUILTIN_TCAPS not defined).
@@ -554,7 +549,7 @@
/* #define NO_BUILTIN_TCAPS */
#endif
#if !defined(NO_BUILTIN_TCAPS) && !defined(FEAT_GUI_W16)
#if !defined(NO_BUILTIN_TCAPS)
# ifdef FEAT_BIG
# define ALL_BUILTIN_TCAPS
# else
@@ -625,8 +620,7 @@
*/
#if (defined(FEAT_NORMAL) || defined(FEAT_GUI_GTK) || defined(FEAT_ARABIC) \
|| defined(FEAT_GUI_MACVIM)) \
&& !defined(FEAT_MBYTE) && !defined(WIN16) \
&& VIM_SIZEOF_INT >= 4 && !defined(EBCDIC)
&& !defined(FEAT_MBYTE) && VIM_SIZEOF_INT >= 4 && !defined(EBCDIC)
# define FEAT_MBYTE
#endif
@@ -769,7 +763,7 @@
|| defined(FEAT_GUI_MACVIM) \
|| (defined(FEAT_GUI_MOTIF) && defined(HAVE_XM_NOTEBOOK_H)) \
|| defined(FEAT_GUI_MAC) \
|| (defined(FEAT_GUI_MSWIN) && !defined(WIN16) \
|| (defined(FEAT_GUI_MSWIN) \
&& (!defined(_MSC_VER) || _MSC_VER > 1020)))
# define FEAT_GUI_TABLINE
#endif
@@ -1069,7 +1063,7 @@
# ifdef FEAT_BIG
# define FEAT_MOUSE_SGR
# endif
# if defined(FEAT_NORMAL) && (defined(MSDOS) || defined(WIN3264))
# if defined(FEAT_NORMAL) && defined(WIN3264)
# define DOS_MOUSE
# endif
# if defined(FEAT_NORMAL) && defined(__QNX__)
@@ -1191,10 +1185,10 @@
*/
#ifdef FEAT_NORMAL
/* MS-DOS console and Win32 console can change cursor shape */
# if defined(MSDOS) || (defined(WIN3264) && !defined(FEAT_GUI_W32))
# if defined(WIN3264) && !defined(FEAT_GUI_W32)
# define MCH_CURSOR_SHAPE
# endif
# if defined(FEAT_GUI_W32) || defined(FEAT_GUI_W16) || defined(FEAT_GUI_MOTIF) \
# if defined(FEAT_GUI_W32) || defined(FEAT_GUI_MOTIF) \
|| defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_GTK) \
|| defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MACVIM)
# define FEAT_MOUSESHAPE
@@ -1241,7 +1235,6 @@
* +perl Perl interface: "--enable-perlinterp"
* +python Python interface: "--enable-pythoninterp"
* +tcl TCL interface: "--enable-tclinterp"
* +sniff Sniff interface: "--enable-sniff"
* +sun_workshop Sun Workshop integration
* +netbeans_intg Netbeans integration
* +channel Inter process communication
+15 -47
View File
@@ -445,7 +445,7 @@ readfile(
return FAIL;
}
#endif
#if defined(MSDOS) || defined(MSWIN)
#if defined(MSWIN)
/*
* MS-Windows allows opening a device, but we will probably get stuck
* trying to read it.
@@ -521,12 +521,12 @@ readfile(
/*
* for UNIX: check readonly with perm and mch_access()
* for MSDOS and Amiga: check readonly by trying to open the file for writing
* for Amiga: check readonly by trying to open the file for writing
*/
file_readonly = FALSE;
if (read_stdin)
{
#if defined(MSDOS) || defined(MSWIN)
#if defined(MSWIN)
/* Force binary I/O on stdin to avoid CR-LF -> LF conversion. */
setmode(0, O_BINARY);
#endif
@@ -561,7 +561,7 @@ readfile(
msg_scroll = msg_save;
#ifndef UNIX
/*
* On MSDOS and Amiga we can't open a directory, check here.
* On Amiga we can't open a directory, check here.
*/
isdir_f = (mch_isdir(fname));
perm = mch_getperm(fname); /* check if the file exists */
@@ -3546,7 +3546,7 @@ buf_write(
}
if (c == NODE_WRITABLE)
{
# if defined(MSDOS) || defined(MSWIN)
# if defined(MSWIN)
/* MS-Windows allows opening a device, but we will probably get stuck
* trying to write to it. */
if (!p_odev)
@@ -3791,7 +3791,7 @@ buf_write(
struct stat st_new;
char_u *dirp;
char_u *rootname;
#if defined(UNIX) && !defined(SHORT_FNAME)
#if defined(UNIX)
int did_set_shortname;
#endif
@@ -3834,7 +3834,7 @@ buf_write(
goto nobackup;
}
#if defined(UNIX) && !defined(SHORT_FNAME)
#if defined(UNIX)
did_set_shortname = FALSE;
#endif
@@ -3846,12 +3846,7 @@ buf_write(
/*
* Make backup file name.
*/
backup = buf_modname(
#ifdef SHORT_FNAME
TRUE,
#else
(buf->b_p_sn || buf->b_shortname),
#endif
backup = buf_modname((buf->b_p_sn || buf->b_shortname),
rootname, backup_ext, FALSE);
if (backup == NULL)
{
@@ -3878,7 +3873,6 @@ buf_write(
{
vim_free(backup);
backup = NULL; /* no backup file to delete */
# ifndef SHORT_FNAME
/*
* may try again with 'shortname' set
*/
@@ -3891,7 +3885,6 @@ buf_write(
/* setting shortname didn't help */
if (did_set_shortname)
buf->b_shortname = FALSE;
# endif
break;
}
#endif
@@ -4059,12 +4052,7 @@ buf_write(
backup = NULL;
else
{
backup = buf_modname(
#ifdef SHORT_FNAME
TRUE,
#else
(buf->b_p_sn || buf->b_shortname),
#endif
backup = buf_modname((buf->b_p_sn || buf->b_shortname),
rootname, backup_ext, FALSE);
vim_free(rootname);
}
@@ -4911,12 +4899,7 @@ restore_backup:
*/
if (*p_pm && dobackup)
{
char *org = (char *)buf_modname(
#ifdef SHORT_FNAME
TRUE,
#else
(buf->b_p_sn || buf->b_shortname),
#endif
char *org = (char *)buf_modname((buf->b_p_sn || buf->b_shortname),
fname, p_pm, FALSE);
if (backup != NULL)
@@ -5291,7 +5274,7 @@ check_mtime(buf_T *buf, struct stat *st)
static int
time_differs(long t1, long t2)
{
#if defined(__linux__) || defined(MSDOS) || defined(MSWIN)
#if defined(__linux__) || defined(MSWIN)
/* On a FAT filesystem, esp. under Linux, there are only 5 bits to store
* the seconds. Since the roundoff is done when flushing the inode, the
* time may change unexpectedly by one second!!! */
@@ -6034,9 +6017,9 @@ shorten_fname(char_u *full_path, char_u *dir_name)
if (fnamencmp(dir_name, full_path, len) == 0)
{
p = full_path + len;
#if defined(MSDOS) || defined(MSWIN)
#if defined(MSWIN)
/*
* MSDOS: when a file is in the root directory, dir_name will end in a
* MSWIN: when a file is in the root directory, dir_name will end in a
* slash, since C: by itself does not define a specific dir. In this
* case p may already be correct. <negri>
*/
@@ -6051,7 +6034,7 @@ shorten_fname(char_u *full_path, char_u *dir_name)
#endif
}
}
#if defined(MSDOS) || defined(MSWIN)
#if defined(MSWIN)
/*
* When using a file in the current drive, remove the drive name:
* "A:\dir\file" -> "\dir\file". This helps when moving a session file on
@@ -6168,12 +6151,7 @@ modname(
char_u *ext,
int prepend_dot) /* may prepend a '.' to file name */
{
return buf_modname(
#ifdef SHORT_FNAME
TRUE,
#else
(curbuf->b_p_sn || curbuf->b_shortname),
#endif
return buf_modname((curbuf->b_p_sn || curbuf->b_shortname),
fname, ext, prepend_dot);
}
@@ -6212,9 +6190,7 @@ buf_modname(
retval[fnamelen++] = PATHSEP;
retval[fnamelen] = NUL;
}
#ifndef SHORT_FNAME
prepend_dot = FALSE; /* nothing to prepend a dot to */
#endif
}
else
{
@@ -6240,9 +6216,7 @@ buf_modname(
#ifdef USE_LONG_FNAME
&& (!USE_LONG_FNAME || shortname)
#else
# ifndef SHORT_FNAME
&& shortname
# endif
#endif
)
if (*ptr == '.') /* replace '.' by '_' */
@@ -6255,10 +6229,8 @@ buf_modname(
}
/* the file name has at most BASENAMELEN characters. */
#ifndef SHORT_FNAME
if (STRLEN(ptr) > (unsigned)BASENAMELEN)
ptr[BASENAMELEN] = '\0';
#endif
s = ptr + STRLEN(ptr);
@@ -6268,9 +6240,7 @@ buf_modname(
#ifdef USE_LONG_FNAME
if (!USE_LONG_FNAME || shortname)
#else
# ifndef SHORT_FNAME
if (shortname)
# endif
#endif
{
/*
@@ -6325,7 +6295,6 @@ buf_modname(
*/
STRCPY(s, ext);
#ifndef SHORT_FNAME
/*
* Prepend the dot.
*/
@@ -6338,7 +6307,6 @@ buf_modname(
STRMOVE(e + 1, e);
*e = '.';
}
#endif
/*
* Check that, after appending the extension, the file name is really
+4 -26
View File
@@ -1677,15 +1677,6 @@ vgetc(void)
c = CSI;
#endif
}
#ifdef MSDOS
/*
* If K_NUL was typed, it is replaced by K_NUL, 3 in mch_inchar().
* Delete the 3 here.
*/
else if (c == K_NUL && vpeekc() == 3)
(void)vgetorpeek(TRUE);
#endif
/* a keypad or special function key was not mapped, use it like
* its ASCII equivalent */
switch (c)
@@ -5241,7 +5232,7 @@ check_map(
}
#endif
#if defined(MSDOS) || defined(MSWIN) || defined(MACOS)
#if defined(MSWIN) || defined(MACOS)
#define VIS_SEL (VISUAL+SELECTMODE) /* abbreviation */
@@ -5254,7 +5245,7 @@ static struct initmap
int mode;
} initmappings[] =
{
#if defined(MSDOS) || defined(MSWIN)
#if defined(MSWIN)
/* Use the Windows (CUA) keybindings. */
# ifdef FEAT_GUI
/* paste, copy and cut */
@@ -5274,17 +5265,6 @@ static struct initmap
/* paste, copy and cut */
# ifdef FEAT_CLIPBOARD
# ifdef DJGPP
{(char_u *)"\316\122 \"*P", NORMAL}, /* SHIFT-Insert is "*P */
{(char_u *)"\316\122 \"-d\"*P", VIS_SEL}, /* SHIFT-Insert is "-d"*P */
{(char_u *)"\316\122 \022\017*", INSERT}, /* SHIFT-Insert is ^R^O* */
{(char_u *)"\316\222 \"*y", VIS_SEL}, /* CTRL-Insert is "*y */
# if 0 /* Shift-Del produces the same code as Del */
{(char_u *)"\316\123 \"*d", VIS_SEL}, /* SHIFT-Del is "*d */
# endif
{(char_u *)"\316\223 \"*d", VIS_SEL}, /* CTRL-Del is "*d */
{(char_u *)"\030 \"-d", VIS_SEL}, /* CTRL-X is "-d */
# else
{(char_u *)"\316\324 \"*P", NORMAL}, /* SHIFT-Insert is "*P */
{(char_u *)"\316\324 \"-d\"*P", VIS_SEL}, /* SHIFT-Insert is "-d"*P */
{(char_u *)"\316\324 \022\017*", INSERT}, /* SHIFT-Insert is ^R^O* */
@@ -5292,7 +5272,6 @@ static struct initmap
{(char_u *)"\316\327 \"*d", VIS_SEL}, /* SHIFT-Del is "*d */
{(char_u *)"\316\330 \"*d", VIS_SEL}, /* CTRL-Del is "*d */
{(char_u *)"\030 \"-d", VIS_SEL}, /* CTRL-X is "-d */
# endif
# else
{(char_u *)"\316\324 P", NORMAL}, /* SHIFT-Insert is P */
{(char_u *)"\316\324 \"-dP", VIS_SEL}, /* SHIFT-Insert is "-dP */
@@ -5328,7 +5307,7 @@ static struct initmap
void
init_mappings(void)
{
#if defined(MSDOS) || defined(MSWIN) ||defined(MACOS)
#if defined(MSWIN) ||defined(MACOS)
int i;
for (i = 0; i < (int)(sizeof(initmappings) / sizeof(struct initmap)); ++i)
@@ -5336,8 +5315,7 @@ init_mappings(void)
#endif
}
#if defined(MSDOS) || defined(MSWIN) \
|| defined(FEAT_CMDWIN) || defined(MACOS) || defined(PROTO)
#if defined(MSWIN) || defined(FEAT_CMDWIN) || defined(MACOS) || defined(PROTO)
/*
* Add a mapping "map" for mode "mode".
* Need to put string in allocated memory, because do_map() will modify it.
+1 -4
View File
@@ -19,7 +19,7 @@
*/
EXTERN long Rows /* nr of rows in the screen */
#ifdef DO_INIT
# if defined(MSDOS) || defined(WIN3264)
# if defined(WIN3264)
= 25L
# else
= 24L
@@ -950,9 +950,6 @@ EXTERN int ctrl_x_mode INIT(= 0); /* Which Ctrl-X mode are we in? */
#endif
EXTERN int no_abbr INIT(= TRUE); /* TRUE when no abbreviations loaded */
#ifdef MSDOS
EXTERN int beep_count INIT(= 0); /* nr of beeps since last char typed */
#endif
#ifdef USE_EXE_NAME
EXTERN char_u *exe_name; /* the name of the executable */
+6 -12
View File
@@ -2201,7 +2201,7 @@ gui_outstr_nowrap(
guicolor_T fg_color;
guicolor_T bg_color;
guicolor_T sp_color;
#if !defined(MSWIN16_FASTTEXT) && !defined(FEAT_GUI_GTK)
#if !defined(FEAT_GUI_GTK)
GuiFont font = NOFONT;
# ifdef FEAT_MBYTE
GuiFont wide_font = NOFONT;
@@ -2258,7 +2258,7 @@ gui_outstr_nowrap(
highlight_mask = gui.highlight_mask;
hl_mask_todo = highlight_mask;
#if !defined(MSWIN16_FASTTEXT) && !defined(FEAT_GUI_GTK)
#if !defined(FEAT_GUI_GTK)
/* Set the font */
if (aep != NULL && aep->ae_u.gui.font != NOFONT)
font = aep->ae_u.gui.font;
@@ -2375,11 +2375,9 @@ gui_outstr_nowrap(
clip_may_clear_selection(gui.row, gui.row);
#ifndef MSWIN16_FASTTEXT
/* If there's no bold font, then fake it */
if (hl_mask_todo & (HL_BOLD | HL_STANDOUT))
draw_flags |= DRAW_BOLD;
#endif
/*
* When drawing bold or italic characters the spill-over from the left
@@ -2400,11 +2398,7 @@ gui_outstr_nowrap(
draw_flags |= DRAW_UNDERL;
#else
/* Do we underline the text? */
if ((hl_mask_todo & HL_UNDERLINE)
# ifndef MSWIN16_FASTTEXT
|| (hl_mask_todo & HL_ITALIC)
# endif
)
if ((hl_mask_todo & HL_UNDERLINE) || (hl_mask_todo & HL_ITALIC))
draw_flags |= DRAW_UNDERL;
#endif
/* Do we undercurl the text? */
@@ -3381,7 +3375,7 @@ gui_init_which_components(char_u *oldval UNUSED)
static int prev_footer = -1;
int using_footer = FALSE;
#endif
#if defined(FEAT_MENU) && !defined(WIN16)
#if defined(FEAT_MENU)
static int prev_tearoff = -1;
int using_tearoff = FALSE;
#endif
@@ -3458,7 +3452,7 @@ gui_init_which_components(char_u *oldval UNUSED)
break;
#endif
case GO_TEAROFF:
#if defined(FEAT_MENU) && !defined(WIN16)
#if defined(FEAT_MENU)
using_tearoff = TRUE;
#endif
break;
@@ -3565,7 +3559,7 @@ gui_init_which_components(char_u *oldval UNUSED)
fix_size = TRUE;
}
#endif
#if defined(FEAT_MENU) && !defined(WIN16) && !(defined(WIN3264) && !defined(FEAT_TEAROFF))
#if defined(FEAT_MENU) && !(defined(WIN3264) && !defined(FEAT_TEAROFF))
if (using_tearoff != prev_tearoff)
{
gui_mch_toggle_tearoffs(using_tearoff);
+9 -7
View File
@@ -151,13 +151,8 @@
#define TEAR_LEN (9) /* length of above string */
/* for the toolbar */
#ifdef FEAT_GUI_W16
# define TOOLBAR_BUTTON_HEIGHT 15
# define TOOLBAR_BUTTON_WIDTH 16
#else
# define TOOLBAR_BUTTON_HEIGHT 18
# define TOOLBAR_BUTTON_WIDTH 18
#endif
#define TOOLBAR_BUTTON_HEIGHT 18
#define TOOLBAR_BUTTON_WIDTH 18
#define TOOLBAR_BORDER_HEIGHT 12 /* room above+below buttons for MSWindows */
#ifdef FEAT_GUI_MSWIN
@@ -372,7 +367,9 @@ typedef struct Gui
#endif
#ifdef FEAT_GUI_GTK
# ifndef USE_GTK3
int visibility; /* Is shell partially/fully obscured? */
# endif
GdkCursor *blank_pointer; /* Blank pointer */
/* X Resources */
@@ -394,7 +391,12 @@ typedef struct Gui
GdkColor *fgcolor; /* GDK-styled foreground color */
GdkColor *bgcolor; /* GDK-styled background color */
GdkColor *spcolor; /* GDK-styled special color */
# ifdef USE_GTK3
cairo_surface_t *surface; /* drawarea surface */
gboolean by_signal; /* cause of draw operation */
# else
GdkGC *text_gc; /* cached GC for normal text */
# endif
PangoContext *text_context; /* the context used for all text */
PangoFont *ascii_font; /* cached font for ASCII strings */
PangoGlyphString *ascii_glyphs; /* cached code point -> glyph map */
+161 -2
View File
@@ -122,7 +122,11 @@ general_beval_cb(BalloonEval *beval, int state UNUSED)
#if !(defined(FEAT_GUI_W32) || defined(FEAT_GUI_MACVIM)) || defined(PROTO)
#ifdef FEAT_GUI_GTK
# include <gdk/gdkkeysyms.h>
# if GTK_CHECK_VERSION(3,0,0)
# include <gdk/gdkkeysyms-compat.h>
# else
# include <gdk/gdkkeysyms.h>
# endif
# include <gtk/gtk.h>
#else
# include <X11/keysym.h>
@@ -164,8 +168,16 @@ static gint target_event_cb(GtkWidget *, GdkEvent *, gpointer);
static gint mainwin_event_cb(GtkWidget *, GdkEvent *, gpointer);
static void pointer_event(BalloonEval *, int, int, unsigned);
static void key_event(BalloonEval *, unsigned, int);
# if GTK_CHECK_VERSION(3,0,0)
static gboolean timeout_cb(gpointer);
# else
static gint timeout_cb(gpointer);
static gint balloon_expose_event_cb(GtkWidget *, GdkEventExpose *, gpointer);
# endif
# if GTK_CHECK_VERSION(3,0,0)
static gboolean balloon_draw_event_cb (GtkWidget *, cairo_t *, gpointer);
# else
static gint balloon_expose_event_cb (GtkWidget *, GdkEventExpose *, gpointer);
# endif
#else
static void addEventHandler(Widget, BalloonEval *);
static void removeEventHandler(BalloonEval *);
@@ -459,10 +471,16 @@ addEventHandler(GtkWidget *target, BalloonEval *beval)
* This allows us to catch events independently of the signal handlers
* in gui_gtk_x11.c.
*/
# if GTK_CHECK_VERSION(3,0,0)
g_signal_connect(G_OBJECT(target), "event",
G_CALLBACK(target_event_cb),
beval);
# else
/* Should use GTK_OBJECT() here, but that causes a lint warning... */
gtk_signal_connect((GtkObject*)(target), "event",
GTK_SIGNAL_FUNC(target_event_cb),
beval);
# endif
/*
* Nasty: Key press events go to the main window thus the drawing area
* will never see them. This means we have to connect to the main window
@@ -471,9 +489,15 @@ addEventHandler(GtkWidget *target, BalloonEval *beval)
if (gtk_socket_id == 0 && gui.mainwin != NULL
&& gtk_widget_is_ancestor(target, gui.mainwin))
{
# if GTK_CHECK_VERSION(3,0,0)
g_signal_connect(G_OBJECT(gui.mainwin), "event",
G_CALLBACK(mainwin_event_cb),
beval);
# else
gtk_signal_connect((GtkObject*)(gui.mainwin), "event",
GTK_SIGNAL_FUNC(mainwin_event_cb),
beval);
# endif
}
}
@@ -481,17 +505,29 @@ addEventHandler(GtkWidget *target, BalloonEval *beval)
removeEventHandler(BalloonEval *beval)
{
/* LINTED: avoid warning: dubious operation on enum */
# if GTK_CHECK_VERSION(3,0,0)
g_signal_handlers_disconnect_by_func(G_OBJECT(beval->target),
G_CALLBACK(target_event_cb),
beval);
# else
gtk_signal_disconnect_by_func((GtkObject*)(beval->target),
GTK_SIGNAL_FUNC(target_event_cb),
beval);
# endif
if (gtk_socket_id == 0 && gui.mainwin != NULL
&& gtk_widget_is_ancestor(beval->target, gui.mainwin))
{
/* LINTED: avoid warning: dubious operation on enum */
# if GTK_CHECK_VERSION(3,0,0)
g_signal_handlers_disconnect_by_func(G_OBJECT(gui.mainwin),
G_CALLBACK(mainwin_event_cb),
beval);
# else
gtk_signal_disconnect_by_func((GtkObject*)(gui.mainwin),
GTK_SIGNAL_FUNC(mainwin_event_cb),
beval);
# endif
}
}
@@ -517,7 +553,17 @@ target_event_cb(GtkWidget *widget, GdkEvent *event, gpointer data)
* GDK_POINTER_MOTION_HINT_MASK is set, thus we cannot obtain
* the coordinates from the GdkEventMotion struct directly.
*/
# if GTK_CHECK_VERSION(3,0,0)
{
GdkWindow * const win = gtk_widget_get_window(widget);
GdkDisplay * const dpy = gdk_window_get_display(win);
GdkDeviceManager * const mngr = gdk_display_get_device_manager(dpy);
GdkDevice * const dev = gdk_device_manager_get_client_pointer(mngr);
gdk_window_get_device_position(win, dev , &x, &y, &state);
}
# else
gdk_window_get_pointer(widget->window, &x, &y, &state);
# endif
pointer_event(beval, x, y, (unsigned int)state);
}
else
@@ -609,8 +655,13 @@ pointer_event(BalloonEval *beval, int x, int y, unsigned state)
}
else
{
# if GTK_CHECK_VERSION(3,0,0)
beval->timerID = g_timeout_add((guint)p_bdlay,
&timeout_cb, beval);
# else
beval->timerID = gtk_timeout_add((guint32)p_bdlay,
&timeout_cb, beval);
# endif
}
}
}
@@ -647,7 +698,11 @@ key_event(BalloonEval *beval, unsigned keyval, int is_keypress)
cancelBalloon(beval);
}
# if GTK_CHECK_VERSION(3,0,0)
static gboolean
# else
static gint
# endif
timeout_cb(gpointer data)
{
BalloonEval *beval = (BalloonEval *)data;
@@ -663,6 +718,37 @@ timeout_cb(gpointer data)
return FALSE; /* don't call me again */
}
# if GTK_CHECK_VERSION(3,0,0)
static gboolean
balloon_draw_event_cb(GtkWidget *widget,
cairo_t *cr,
gpointer data UNUSED)
{
GtkStyleContext *context = NULL;
gint width = -1, height = -1;
if (widget == NULL)
return TRUE;
context = gtk_widget_get_style_context(widget);
width = gtk_widget_get_allocated_width(widget);
height = gtk_widget_get_allocated_height(widget);
gtk_style_context_save(context);
gtk_style_context_add_class(context, "tooltip");
gtk_style_context_set_state(context, GTK_STATE_FLAG_NORMAL);
cairo_save(cr);
gtk_render_frame(context, cr, 0, 0, width, height);
gtk_render_background(context, cr, 0, 0, width, height);
cairo_restore(cr);
gtk_style_context_restore(context);
return FALSE;
}
# else
static gint
balloon_expose_event_cb(GtkWidget *widget,
GdkEventExpose *event,
@@ -675,6 +761,7 @@ balloon_expose_event_cb(GtkWidget *widget,
return FALSE; /* continue emission */
}
# endif /* !GTK_CHECK_VERSION(3,0,0) */
#else /* !FEAT_GUI_GTK */
@@ -957,8 +1044,37 @@ set_printable_label_text(GtkLabel *label, char_u *text)
aep = syn_gui_attr2entry(hl_attr(HLF_8));
pixel = (aep != NULL) ? aep->ae_u.gui.fg_color : INVALCOLOR;
if (pixel != INVALCOLOR)
# if GTK_CHECK_VERSION(3,0,0)
{
GdkVisual * const visual = gtk_widget_get_visual(gui.drawarea);
if (visual == NULL)
{
color.red = 0;
color.green = 0;
color.blue = 0;
}
else
{
guint32 r_mask, g_mask, b_mask;
gint r_shift, g_shift, b_shift;
gdk_visual_get_red_pixel_details(visual, &r_mask, &r_shift,
NULL);
gdk_visual_get_green_pixel_details(visual, &g_mask, &g_shift,
NULL);
gdk_visual_get_blue_pixel_details(visual, &b_mask, &b_shift,
NULL);
color.red = ((pixel & r_mask) >> r_shift) / 255.0 * 65535;
color.green = ((pixel & g_mask) >> g_shift) / 255.0 * 65535;
color.blue = ((pixel & b_mask) >> b_shift) / 255.0 * 65535;
}
}
# else
gdk_colormap_query_color(gtk_widget_get_colormap(gui.drawarea),
(unsigned long)pixel, &color);
# endif
pdest = buf;
p = text;
@@ -1059,8 +1175,10 @@ drawBalloon(BalloonEval *beval)
screen_w = gdk_screen_width();
screen_h = gdk_screen_height();
# endif
# if !GTK_CHECK_VERSION(3,0,0)
gtk_widget_ensure_style(beval->balloonShell);
gtk_widget_ensure_style(beval->balloonLabel);
# endif
set_printable_label_text(GTK_LABEL(beval->balloonLabel), beval->msg);
/*
@@ -1081,10 +1199,18 @@ drawBalloon(BalloonEval *beval)
MAX(20, screen_w - 20)));
/* Calculate the balloon's width and height. */
# if GTK_CHECK_VERSION(3,0,0)
gtk_widget_get_preferred_size(beval->balloonShell, &requisition, NULL);
# else
gtk_widget_size_request(beval->balloonShell, &requisition);
# endif
/* Compute position of the balloon area */
# if GTK_CHECK_VERSION(3,0,0)
gdk_window_get_origin(gtk_widget_get_window(beval->target), &x, &y);
# else
gdk_window_get_origin(beval->target->window, &x, &y);
# endif
x += beval->x;
y += beval->y;
@@ -1099,7 +1225,11 @@ drawBalloon(BalloonEval *beval)
y = CLAMP(y + y_offset, 0, MAX(0, screen_h - requisition.height));
/* Show the balloon */
# if GTK_CHECK_VERSION(3,0,0)
gtk_window_move(GTK_WINDOW(beval->balloonShell), x, y);
# else
gtk_widget_set_uposition(beval->balloonShell, x, y);
# endif
gtk_widget_show(beval->balloonShell);
beval->showState = ShS_SHOWING;
@@ -1126,7 +1256,11 @@ cancelBalloon(BalloonEval *beval)
if (beval->timerID != 0)
{
# if GTK_CHECK_VERSION(3,0,0)
g_source_remove(beval->timerID);
# else
gtk_timeout_remove(beval->timerID);
# endif
beval->timerID = 0;
}
beval->showState = ShS_NEUTRAL;
@@ -1138,17 +1272,42 @@ createBalloonEvalWindow(BalloonEval *beval)
beval->balloonShell = gtk_window_new(GTK_WINDOW_POPUP);
gtk_widget_set_app_paintable(beval->balloonShell, TRUE);
# if GTK_CHECK_VERSION(3,0,0)
gtk_window_set_resizable(GTK_WINDOW(beval->balloonShell), FALSE);
# else
gtk_window_set_policy(GTK_WINDOW(beval->balloonShell), FALSE, FALSE, TRUE);
# endif
gtk_widget_set_name(beval->balloonShell, "gtk-tooltips");
# if GTK_CHECK_VERSION(3,0,0)
gtk_container_set_border_width(GTK_CONTAINER(beval->balloonShell), 4);
# else
gtk_container_border_width(GTK_CONTAINER(beval->balloonShell), 4);
# endif
# if GTK_CHECK_VERSION(3,0,0)
g_signal_connect(G_OBJECT(beval->balloonShell), "draw",
G_CALLBACK(balloon_draw_event_cb), NULL);
# else
gtk_signal_connect((GtkObject*)(beval->balloonShell), "expose_event",
GTK_SIGNAL_FUNC(balloon_expose_event_cb), NULL);
# endif
beval->balloonLabel = gtk_label_new(NULL);
gtk_label_set_line_wrap(GTK_LABEL(beval->balloonLabel), FALSE);
gtk_label_set_justify(GTK_LABEL(beval->balloonLabel), GTK_JUSTIFY_LEFT);
# if GTK_CHECK_VERSION(3,16,0)
gtk_label_set_xalign(GTK_LABEL(beval->balloonLabel), 0.5);
gtk_label_set_yalign(GTK_LABEL(beval->balloonLabel), 0.5);
# elif GTK_CHECK_VERSION(3,14,0)
GValue align_val = G_VALUE_INIT;
g_value_init(&align_val, G_TYPE_FLOAT);
g_value_set_float(&align_val, 0.5);
g_object_set_property(G_OBJECT(beval->balloonLabel), "xalign", &align_val);
g_object_set_property(G_OBJECT(beval->balloonLabel), "yalign", &align_val);
g_value_unset(&align_val);
# else
gtk_misc_set_alignment(GTK_MISC(beval->balloonLabel), 0.5f, 0.5f);
# endif
gtk_widget_set_name(beval->balloonLabel, "vim-balloon-label");
gtk_widget_show(beval->balloonLabel);
+5 -1
View File
@@ -11,7 +11,11 @@
#define GUI_BEVAL_H
#ifdef FEAT_GUI_GTK
# include <gtk/gtkwidget.h>
# ifdef USE_GTK3
# include <gtk/gtk.h>
# else
# include <gtk/gtkwidget.h>
# endif
#else
# if defined(FEAT_GUI_X11)
# include <X11/Intrinsic.h>
+3 -2
View File
@@ -237,7 +237,8 @@ public:
AddRef();
}
~GdiTextRenderer()
// add "virtual" to avoid a compiler warning
virtual ~GdiTextRenderer()
{
SafeRelease(&pRenderTarget_);
SafeRelease(&pRenderingParams_);
@@ -255,7 +256,7 @@ public:
__maybenull void* clientDrawingContext,
__out DWRITE_MATRIX* transform)
{
//forward the render target's transform
// forward the render target's transform
pRenderTarget_->GetCurrentTransform(transform);
return S_OK;
}
+707 -38
View File
File diff suppressed because it is too large Load Diff
+386 -4
View File
@@ -19,13 +19,19 @@
* children at arbitrary positions width arbitrary sizes. This finally puts
* an end on our resize problems with which we where struggling for such a
* long time.
*
* Support for GTK+ 3 was added by:
*
* 2016 Kazunobu Kuriyama <kazunobu.kuriyama@gmail.com>
*/
#include "vim.h"
#include <gtk/gtk.h> /* without this it compiles, but gives errors at
runtime! */
#include "gui_gtk_f.h"
#include <gtk/gtksignal.h>
#if !GTK_CHECK_VERSION(3,0,0)
# include <gtk/gtksignal.h>
#endif
#ifdef WIN3264
# include <gdk/gdkwin32.h>
#else
@@ -52,10 +58,23 @@ static void gtk_form_unrealize(GtkWidget *widget);
static void gtk_form_map(GtkWidget *widget);
static void gtk_form_size_request(GtkWidget *widget,
GtkRequisition *requisition);
#if GTK_CHECK_VERSION(3,0,0)
static void gtk_form_get_preferred_width(GtkWidget *widget,
gint *minimal_width,
gint *natural_width);
static void gtk_form_get_preferred_height(GtkWidget *widget,
gint *minimal_height,
gint *natural_height);
#endif
static void gtk_form_size_allocate(GtkWidget *widget,
GtkAllocation *allocation);
#if GTK_CHECK_VERSION(3,0,0)
static gboolean gtk_form_draw(GtkWidget *widget,
cairo_t *cr);
#else
static gint gtk_form_expose(GtkWidget *widget,
GdkEventExpose *event);
#endif
static void gtk_form_remove(GtkContainer *container,
GtkWidget *widget);
@@ -73,22 +92,27 @@ static void gtk_form_position_child(GtkForm *form,
gboolean force_allocate);
static void gtk_form_position_children(GtkForm *form);
#if !GTK_CHECK_VERSION(3,0,0)
static GdkFilterReturn gtk_form_filter(GdkXEvent *gdk_xevent,
GdkEvent *event,
gpointer data);
static GdkFilterReturn gtk_form_main_filter(GdkXEvent *gdk_xevent,
GdkEvent *event,
gpointer data);
#endif
#if !GTK_CHECK_VERSION(3,16,0)
static void gtk_form_set_static_gravity(GdkWindow *window,
gboolean use_static);
#endif
static void gtk_form_send_configure(GtkForm *form);
static void gtk_form_child_map(GtkWidget *widget, gpointer user_data);
static void gtk_form_child_unmap(GtkWidget *widget, gpointer user_data);
#if !GTK_CHECK_VERSION(3,0,0)
static GtkWidgetClass *parent_class = NULL;
#endif
/* Public interface
*/
@@ -98,7 +122,11 @@ gtk_form_new(void)
{
GtkForm *form;
#if GTK_CHECK_VERSION(3,0,0)
form = g_object_new(GTK_TYPE_FORM, NULL);
#else
form = gtk_type_new(gtk_form_get_type());
#endif
return GTK_WIDGET(form);
}
@@ -120,8 +148,12 @@ gtk_form_put(GtkForm *form,
child->window = NULL;
child->x = x;
child->y = y;
#if GTK_CHECK_VERSION(3,0,0)
gtk_widget_set_size_request(child->widget, -1, -1);
#else
child->widget->requisition.width = 0;
child->widget->requisition.height = 0;
#endif
child->mapped = FALSE;
form->children = g_list_append(form->children, child);
@@ -131,13 +163,24 @@ gtk_form_put(GtkForm *form,
* that gtk_widget_set_parent() realizes the widget if it's visible
* and its parent is mapped.
*/
#if GTK_CHECK_VERSION(3,0,0)
if (gtk_widget_get_realized(GTK_WIDGET(form)))
#else
if (GTK_WIDGET_REALIZED(form))
#endif
gtk_form_attach_child_window(form, child);
gtk_widget_set_parent(child_widget, GTK_WIDGET(form));
#if !GTK_CHECK_VERSION(3,0,0)
gtk_widget_size_request(child->widget, NULL);
#endif
#if GTK_CHECK_VERSION(3,0,0)
if (gtk_widget_get_realized(GTK_WIDGET(form))
&& !gtk_widget_get_realized(child_widget))
#else
if (GTK_WIDGET_REALIZED(form) && !GTK_WIDGET_REALIZED(child_widget))
#endif
gtk_form_realize_child(form, child);
gtk_form_position_child(form, child, TRUE);
@@ -193,6 +236,9 @@ gtk_form_thaw(GtkForm *form)
/* Basic Object handling procedures
*/
#if GTK_CHECK_VERSION(3,0,0)
G_DEFINE_TYPE(GtkForm, gtk_form, GTK_TYPE_CONTAINER)
#else
GtkType
gtk_form_get_type(void)
{
@@ -213,6 +259,7 @@ gtk_form_get_type(void)
}
return form_type;
}
#endif /* !GTK_CHECK_VERSION(3,0,0) */
static void
gtk_form_class_init(GtkFormClass *klass)
@@ -223,14 +270,25 @@ gtk_form_class_init(GtkFormClass *klass)
widget_class = (GtkWidgetClass *) klass;
container_class = (GtkContainerClass *) klass;
#if !GTK_CHECK_VERSION(3,0,0)
parent_class = gtk_type_class(gtk_container_get_type());
#endif
widget_class->realize = gtk_form_realize;
widget_class->unrealize = gtk_form_unrealize;
widget_class->map = gtk_form_map;
#if GTK_CHECK_VERSION(3,0,0)
widget_class->get_preferred_width = gtk_form_get_preferred_width;
widget_class->get_preferred_height = gtk_form_get_preferred_height;
#else
widget_class->size_request = gtk_form_size_request;
#endif
widget_class->size_allocate = gtk_form_size_allocate;
#if GTK_CHECK_VERSION(3,0,0)
widget_class->draw = gtk_form_draw;
#else
widget_class->expose_event = gtk_form_expose;
#endif
container_class->remove = gtk_form_remove;
container_class->forall = gtk_form_forall;
@@ -239,15 +297,22 @@ gtk_form_class_init(GtkFormClass *klass)
static void
gtk_form_init(GtkForm *form)
{
#if GTK_CHECK_VERSION(3,0,0)
gtk_widget_set_has_window(GTK_WIDGET(form), TRUE);
#endif
form->children = NULL;
#if !GTK_CHECK_VERSION(3,0,0)
form->width = 1;
form->height = 1;
#endif
form->bin_window = NULL;
#if !GTK_CHECK_VERSION(3,0,0)
form->configure_serial = 0;
form->visibility = GDK_VISIBILITY_PARTIAL;
#endif
form->freeze_count = 0;
}
@@ -267,40 +332,92 @@ gtk_form_realize(GtkWidget *widget)
g_return_if_fail(GTK_IS_FORM(widget));
form = GTK_FORM(widget);
#if GTK_CHECK_VERSION(3,0,0)
gtk_widget_set_realized(widget, TRUE);
#else
GTK_WIDGET_SET_FLAGS(form, GTK_REALIZED);
#endif
attributes.window_type = GDK_WINDOW_CHILD;
#if GTK_CHECK_VERSION(3,0,0)
{
GtkAllocation allocation;
gtk_widget_get_allocation(widget, &allocation);
attributes.x = allocation.x;
attributes.y = allocation.y;
attributes.width = allocation.width;
attributes.height = allocation.height;
}
#else
attributes.x = widget->allocation.x;
attributes.y = widget->allocation.y;
attributes.width = widget->allocation.width;
attributes.height = widget->allocation.height;
#endif
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual(widget);
#if GTK_CHECK_VERSION(3,0,0)
attributes.event_mask = GDK_EXPOSURE_MASK;
#else
attributes.colormap = gtk_widget_get_colormap(widget);
attributes.event_mask = GDK_VISIBILITY_NOTIFY_MASK;
#endif
#if GTK_CHECK_VERSION(3,0,0)
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
#else
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
#endif
#if GTK_CHECK_VERSION(3,0,0)
gtk_widget_set_window(widget,
gdk_window_new(gtk_widget_get_parent_window(widget),
&attributes, attributes_mask));
gdk_window_set_user_data(gtk_widget_get_window(widget), widget);
#else
widget->window = gdk_window_new(gtk_widget_get_parent_window(widget),
&attributes, attributes_mask);
gdk_window_set_user_data(widget->window, widget);
#endif
attributes.x = 0;
attributes.y = 0;
attributes.event_mask = gtk_widget_get_events(widget);
#if GTK_CHECK_VERSION(3,0,0)
form->bin_window = gdk_window_new(gtk_widget_get_window(widget),
&attributes, attributes_mask);
#else
form->bin_window = gdk_window_new(widget->window,
&attributes, attributes_mask);
#endif
gdk_window_set_user_data(form->bin_window, widget);
#if !GTK_CHECK_VERSION(3,16,0)
gtk_form_set_static_gravity(form->bin_window, TRUE);
#endif
#if GTK_CHECK_VERSION(3,0,0)
{
GtkStyleContext * const sctx = gtk_widget_get_style_context(widget);
gtk_style_context_add_class(sctx, "gtk-form");
gtk_style_context_set_state(sctx, GTK_STATE_FLAG_NORMAL);
# if !GTK_CHECK_VERSION(3,18,0)
gtk_style_context_set_background(sctx, gtk_widget_get_window(widget));
gtk_style_context_set_background(sctx, form->bin_window);
# endif
}
#else
widget->style = gtk_style_attach(widget->style, widget->window);
gtk_style_set_background(widget->style, widget->window, GTK_STATE_NORMAL);
gtk_style_set_background(widget->style, form->bin_window, GTK_STATE_NORMAL);
#endif
#if !GTK_CHECK_VERSION(3,0,0)
gdk_window_add_filter(widget->window, gtk_form_main_filter, form);
gdk_window_add_filter(form->bin_window, gtk_form_filter, form);
#endif
for (tmp_list = form->children; tmp_list; tmp_list = tmp_list->next)
{
@@ -308,7 +425,11 @@ gtk_form_realize(GtkWidget *widget)
gtk_form_attach_child_window(form, child);
#if GTK_CHECK_VERSION(3,0,0)
if (gtk_widget_get_visible(child->widget))
#else
if (GTK_WIDGET_VISIBLE(child->widget))
#endif
gtk_form_realize_child(form, child);
}
}
@@ -332,17 +453,30 @@ gtk_form_map(GtkWidget *widget)
form = GTK_FORM(widget);
#if GTK_CHECK_VERSION(3,0,0)
gtk_widget_set_mapped(widget, TRUE);
#else
GTK_WIDGET_SET_FLAGS(widget, GTK_MAPPED);
#endif
#if GTK_CHECK_VERSION(3,0,0)
gdk_window_show(gtk_widget_get_window(widget));
#else
gdk_window_show(widget->window);
#endif
gdk_window_show(form->bin_window);
for (tmp_list = form->children; tmp_list; tmp_list = tmp_list->next)
{
GtkFormChild *child = tmp_list->data;
#if GTK_CHECK_VERSION(3,0,0)
if (gtk_widget_get_visible(child->widget)
&& !gtk_widget_get_mapped(child->widget))
#else
if (GTK_WIDGET_VISIBLE(child->widget)
&& !GTK_WIDGET_MAPPED(child->widget))
#endif
gtk_widget_map(child->widget);
}
}
@@ -369,12 +503,21 @@ gtk_form_unrealize(GtkWidget *widget)
if (child->window != NULL)
{
#if GTK_CHECK_VERSION(3,0,0)
g_signal_handlers_disconnect_by_func(G_OBJECT(child->widget),
G_CALLBACK(gtk_form_child_map),
child);
g_signal_handlers_disconnect_by_func(G_OBJECT(child->widget),
G_CALLBACK(gtk_form_child_unmap),
child);
#else
gtk_signal_disconnect_by_func(GTK_OBJECT(child->widget),
GTK_SIGNAL_FUNC(gtk_form_child_map),
child);
gtk_signal_disconnect_by_func(GTK_OBJECT(child->widget),
GTK_SIGNAL_FUNC(gtk_form_child_unmap),
child);
#endif
gdk_window_set_user_data(child->window, NULL);
gdk_window_destroy(child->window);
@@ -385,20 +528,33 @@ gtk_form_unrealize(GtkWidget *widget)
tmp_list = tmp_list->next;
}
#if GTK_CHECK_VERSION(3,0,0)
if (GTK_WIDGET_CLASS (gtk_form_parent_class)->unrealize)
(* GTK_WIDGET_CLASS (gtk_form_parent_class)->unrealize) (widget);
#else
if (GTK_WIDGET_CLASS (parent_class)->unrealize)
(* GTK_WIDGET_CLASS (parent_class)->unrealize) (widget);
#endif
}
static void
gtk_form_size_request(GtkWidget *widget, GtkRequisition *requisition)
{
#if !GTK_CHECK_VERSION(3,0,0)
GList *tmp_list;
GtkForm *form;
#endif
g_return_if_fail(GTK_IS_FORM(widget));
#if !GTK_CHECK_VERSION(3,0,0)
form = GTK_FORM(widget);
#endif
#if GTK_CHECK_VERSION(3,0,0)
requisition->width = 1;
requisition->height = 1;
#else
requisition->width = form->width;
requisition->height = form->height;
@@ -410,25 +566,71 @@ gtk_form_size_request(GtkWidget *widget, GtkRequisition *requisition)
gtk_widget_size_request(child->widget, NULL);
tmp_list = tmp_list->next;
}
#endif
}
#if GTK_CHECK_VERSION(3,0,0)
static void
gtk_form_get_preferred_width(GtkWidget *widget,
gint *minimal_width,
gint *natural_width)
{
GtkRequisition requisition;
gtk_form_size_request(widget, &requisition);
*minimal_width = requisition.width;
*natural_width = requisition.width;
}
static void
gtk_form_get_preferred_height(GtkWidget *widget,
gint *minimal_height,
gint *natural_height)
{
GtkRequisition requisition;
gtk_form_size_request(widget, &requisition);
*minimal_height = requisition.height;
*natural_height = requisition.height;
}
#endif /* GTK_CHECK_VERSION(3,0,0) */
static void
gtk_form_size_allocate(GtkWidget *widget, GtkAllocation *allocation)
{
GList *tmp_list;
GtkForm *form;
gboolean need_reposition;
#if GTK_CHECK_VERSION(3,0,0)
GtkAllocation cur_alloc;
#endif
g_return_if_fail(GTK_IS_FORM(widget));
#if GTK_CHECK_VERSION(3,0,0)
gtk_widget_get_allocation(widget, &cur_alloc);
if (cur_alloc.x == allocation->x
&& cur_alloc.y == allocation->y
&& cur_alloc.width == allocation->width
&& cur_alloc.height == allocation->height)
#else
if (widget->allocation.x == allocation->x
&& widget->allocation.y == allocation->y
&& widget->allocation.width == allocation->width
&& widget->allocation.height == allocation->height)
#endif
return;
#if GTK_CHECK_VERSION(3,0,0)
need_reposition = cur_alloc.width != allocation->width
|| cur_alloc.height != allocation->height;
#else
need_reposition = widget->allocation.width != allocation->width
|| widget->allocation.height != allocation->height;
#endif
form = GTK_FORM(widget);
if (need_reposition)
@@ -444,20 +646,81 @@ gtk_form_size_allocate(GtkWidget *widget, GtkAllocation *allocation)
}
}
#if GTK_CHECK_VERSION(3,0,0)
if (gtk_widget_get_realized(widget))
#else
if (GTK_WIDGET_REALIZED(widget))
#endif
{
#if GTK_CHECK_VERSION(3,0,0)
gdk_window_move_resize(gtk_widget_get_window(widget),
allocation->x, allocation->y,
allocation->width, allocation->height);
#else
gdk_window_move_resize(widget->window,
allocation->x, allocation->y,
allocation->width, allocation->height);
#endif
gdk_window_move_resize(GTK_FORM(widget)->bin_window,
0, 0,
allocation->width, allocation->height);
}
#if GTK_CHECK_VERSION(3,0,0)
gtk_widget_set_allocation(widget, allocation);
#else
widget->allocation = *allocation;
#endif
if (need_reposition)
gtk_form_send_configure(form);
}
#if GTK_CHECK_VERSION(3,0,0)
static void
gtk_form_render_background(GtkWidget *widget, cairo_t *cr)
{
gtk_render_background(gtk_widget_get_style_context(widget), cr,
0, 0,
gtk_widget_get_allocated_width(widget),
gtk_widget_get_allocated_height(widget));
}
static gboolean
gtk_form_draw(GtkWidget *widget, cairo_t *cr)
{
GList *tmp_list = NULL;
GtkForm *form = NULL;
g_return_val_if_fail(GTK_IS_FORM(widget), FALSE);
gtk_form_render_background(widget, cr);
form = GTK_FORM(widget);
for (tmp_list = form->children; tmp_list; tmp_list = tmp_list->next)
{
GtkFormChild * const formchild = tmp_list->data;
if (!gtk_widget_get_has_window(formchild->widget) &&
gtk_cairo_should_draw_window(cr, formchild->window))
{
/* To get gtk_widget_draw() to work, it is required to call
* gtk_widget_size_allocate() in advance with a well-posed
* allocation for a given child widget in order to set a
* certain private GtkWidget variable, called
* widget->priv->alloc_need, to the proper value; othewise,
* gtk_widget_draw() fails and the relevant scrollbar won't
* appear on the screen.
*
* Calling gtk_form_position_child() like this is one of ways
* to make sure of that. */
gtk_form_position_child(form, formchild, TRUE);
gtk_form_render_background(formchild->widget, cr);
}
}
return GTK_WIDGET_CLASS(gtk_form_parent_class)->draw(widget, cr);
}
#else /* !GTK_CHECK_VERSION(3,0,0) */
static gint
gtk_form_expose(GtkWidget *widget, GdkEventExpose *event)
{
@@ -497,6 +760,7 @@ gtk_form_expose(GtkWidget *widget, GdkEventExpose *event)
return FALSE;
}
#endif /* !GTK_CHECK_VERSION(3,0,0) */
/* Container method
*/
@@ -522,12 +786,22 @@ gtk_form_remove(GtkContainer *container, GtkWidget *widget)
if (tmp_list)
{
#if GTK_CHECK_VERSION(3,0,0)
const gboolean was_visible = gtk_widget_get_visible(widget);
#endif
if (child->window)
{
#if GTK_CHECK_VERSION(3,0,0)
g_signal_handlers_disconnect_by_func(G_OBJECT(child->widget),
G_CALLBACK(&gtk_form_child_map), child);
g_signal_handlers_disconnect_by_func(G_OBJECT(child->widget),
G_CALLBACK(&gtk_form_child_unmap), child);
#else
gtk_signal_disconnect_by_func(GTK_OBJECT(child->widget),
GTK_SIGNAL_FUNC(&gtk_form_child_map), child);
gtk_signal_disconnect_by_func(GTK_OBJECT(child->widget),
GTK_SIGNAL_FUNC(&gtk_form_child_unmap), child);
#endif
/* FIXME: This will cause problems for reparenting NO_WINDOW
* widgets out of a GtkForm
@@ -536,7 +810,10 @@ gtk_form_remove(GtkContainer *container, GtkWidget *widget)
gdk_window_destroy(child->window);
}
gtk_widget_unparent(widget);
#if GTK_CHECK_VERSION(3,0,0)
if (was_visible)
gtk_widget_queue_resize(GTK_WIDGET(container));
#endif
form->children = g_list_remove_link(form->children, tmp_list);
g_list_free_1(tmp_list);
g_free(child);
@@ -577,7 +854,11 @@ gtk_form_attach_child_window(GtkForm *form, GtkFormChild *child)
if (child->window != NULL)
return; /* been there, done that */
#if GTK_CHECK_VERSION(3,0,0)
if (!gtk_widget_get_has_window(child->widget))
#else
if (GTK_WIDGET_NO_WINDOW(child->widget))
#endif
{
GtkWidget *widget;
GdkWindowAttr attributes;
@@ -588,34 +869,75 @@ gtk_form_attach_child_window(GtkForm *form, GtkFormChild *child)
attributes.window_type = GDK_WINDOW_CHILD;
attributes.x = child->x;
attributes.y = child->y;
#if GTK_CHECK_VERSION(3,0,0)
{
GtkRequisition requisition;
gtk_widget_get_preferred_size(child->widget, &requisition, NULL);
attributes.width = requisition.width;
attributes.height = requisition.height;
}
#else
attributes.width = child->widget->requisition.width;
attributes.height = child->widget->requisition.height;
#endif
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual(widget);
#if !GTK_CHECK_VERSION(3,0,0)
attributes.colormap = gtk_widget_get_colormap(widget);
#endif
attributes.event_mask = GDK_EXPOSURE_MASK;
#if GTK_CHECK_VERSION(3,0,0)
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
#else
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
#endif
child->window = gdk_window_new(form->bin_window,
&attributes, attributes_mask);
gdk_window_set_user_data(child->window, widget);
#if GTK_CHECK_VERSION(3,0,0)
{
GtkStyleContext * const sctx = gtk_widget_get_style_context(widget);
gtk_style_context_set_state(sctx, GTK_STATE_FLAG_NORMAL);
# if !GTK_CHECK_VERSION(3,18,0)
gtk_style_context_set_background(sctx, child->window);
# endif
}
#else
gtk_style_set_background(widget->style,
child->window,
GTK_STATE_NORMAL);
#endif
gtk_widget_set_parent_window(child->widget, child->window);
#if !GTK_CHECK_VERSION(3,16,0)
gtk_form_set_static_gravity(child->window, TRUE);
#endif
/*
* Install signal handlers to map/unmap child->window
* alongside with the actual widget.
*/
#if GTK_CHECK_VERSION(3,0,0)
g_signal_connect(G_OBJECT(child->widget), "map",
G_CALLBACK(&gtk_form_child_map), child);
g_signal_connect(G_OBJECT(child->widget), "unmap",
G_CALLBACK(&gtk_form_child_unmap), child);
#else
gtk_signal_connect(GTK_OBJECT(child->widget), "map",
GTK_SIGNAL_FUNC(&gtk_form_child_map), child);
gtk_signal_connect(GTK_OBJECT(child->widget), "unmap",
GTK_SIGNAL_FUNC(&gtk_form_child_unmap), child);
#endif
}
#if GTK_CHECK_VERSION(3,0,0)
else if (!gtk_widget_get_realized(child->widget))
#else
else if (!GTK_WIDGET_REALIZED(child->widget))
#endif
{
gtk_widget_set_parent_window(child->widget, form->bin_window);
}
@@ -627,8 +949,14 @@ gtk_form_realize_child(GtkForm *form, GtkFormChild *child)
gtk_form_attach_child_window(form, child);
gtk_widget_realize(child->widget);
#if !GTK_CHECK_VERSION(3,16,0)
if (child->window == NULL) /* might be already set, see above */
# if GTK_CHECK_VERSION(3,0,0)
gtk_form_set_static_gravity(gtk_widget_get_window(child->widget), TRUE);
# else
gtk_form_set_static_gravity(child->widget->window, TRUE);
# endif
#endif
}
static void
@@ -646,9 +974,18 @@ gtk_form_position_child(GtkForm *form, GtkFormChild *child,
{
if (!child->mapped)
{
#if GTK_CHECK_VERSION(3,0,0)
if (gtk_widget_get_mapped(GTK_WIDGET(form))
&& gtk_widget_get_visible(child->widget))
#else
if (GTK_WIDGET_MAPPED(form) && GTK_WIDGET_VISIBLE(child->widget))
#endif
{
#if GTK_CHECK_VERSION(3,0,0)
if (!gtk_widget_get_mapped(child->widget))
#else
if (!GTK_WIDGET_MAPPED(child->widget))
#endif
gtk_widget_map(child->widget);
child->mapped = TRUE;
@@ -659,15 +996,31 @@ gtk_form_position_child(GtkForm *form, GtkFormChild *child,
if (force_allocate)
{
GtkAllocation allocation;
#if GTK_CHECK_VERSION(3,0,0)
GtkRequisition requisition;
gtk_widget_get_preferred_size(child->widget, &requisition, NULL);
#endif
#if GTK_CHECK_VERSION(3,0,0)
if (!gtk_widget_get_has_window(child->widget))
#else
if (GTK_WIDGET_NO_WINDOW(child->widget))
#endif
{
if (child->window)
{
#if GTK_CHECK_VERSION(3,0,0)
gdk_window_move_resize(child->window,
x, y,
requisition.width,
requisition.height);
#else
gdk_window_move_resize(child->window,
x, y,
child->widget->requisition.width,
child->widget->requisition.height);
#endif
}
allocation.x = 0;
@@ -679,8 +1032,13 @@ gtk_form_position_child(GtkForm *form, GtkFormChild *child,
allocation.y = y;
}
#if GTK_CHECK_VERSION(3,0,0)
allocation.width = requisition.width;
allocation.height = requisition.height;
#else
allocation.width = child->widget->requisition.width;
allocation.height = child->widget->requisition.height;
#endif
gtk_widget_size_allocate(child->widget, &allocation);
}
@@ -691,7 +1049,11 @@ gtk_form_position_child(GtkForm *form, GtkFormChild *child,
{
child->mapped = FALSE;
#if GTK_CHECK_VERSION(3,0,0)
if (gtk_widget_get_mapped(child->widget))
#else
if (GTK_WIDGET_MAPPED(child->widget))
#endif
gtk_widget_unmap(child->widget);
}
}
@@ -717,6 +1079,7 @@ gtk_form_position_children(GtkForm *form)
* them or discards them, depending on whether we are obscured
* or not.
*/
#if !GTK_CHECK_VERSION(3,0,0)
static GdkFilterReturn
gtk_form_filter(GdkXEvent *gdk_xevent, GdkEvent *event UNUSED, gpointer data)
{
@@ -783,7 +1146,9 @@ gtk_form_main_filter(GdkXEvent *gdk_xevent,
}
return GDK_FILTER_CONTINUE;
}
#endif /* !GTK_CHECK_VERSION(3,0,0) */
#if !GTK_CHECK_VERSION(3,16,0)
static void
gtk_form_set_static_gravity(GdkWindow *window, gboolean use_static)
{
@@ -791,13 +1156,18 @@ gtk_form_set_static_gravity(GdkWindow *window, gboolean use_static)
* results in an annoying assertion error message. */
gdk_window_set_static_gravities(window, use_static);
}
#endif /* !GTK_CHECK_VERSION(3,16,0) */
void
gtk_form_move_resize(GtkForm *form, GtkWidget *widget,
gint x, gint y, gint w, gint h)
{
#if GTK_CHECK_VERSION(3,0,0)
gtk_widget_set_size_request(widget, w, h);
#else
widget->requisition.width = w;
widget->requisition.height = h;
#endif
gtk_form_move(form, widget, x, y);
}
@@ -811,11 +1181,24 @@ gtk_form_send_configure(GtkForm *form)
widget = GTK_WIDGET(form);
event.type = GDK_CONFIGURE;
#if GTK_CHECK_VERSION(3,0,0)
event.window = gtk_widget_get_window(widget);
{
GtkAllocation allocation;
gtk_widget_get_allocation(widget, &allocation);
event.x = allocation.x;
event.y = allocation.y;
event.width = allocation.width;
event.height = allocation.height;
}
#else
event.window = widget->window;
event.x = widget->allocation.x;
event.y = widget->allocation.y;
event.width = widget->allocation.width;
event.height = widget->allocation.height;
#endif
gtk_main_do_event((GdkEvent*)&event);
}
@@ -841,4 +1224,3 @@ gtk_form_child_unmap(GtkWidget *widget UNUSED, gpointer user_data)
child->mapped = FALSE;
gdk_window_hide(child->window);
}
+19
View File
@@ -9,8 +9,12 @@
#ifndef __GTK_FORM_H__
#define __GTK_FORM_H__
#ifdef USE_GTK3
#include <gtk/gtk.h>
#else
#include <gdk/gdk.h>
#include <gtk/gtkcontainer.h>
#endif
#ifdef __cplusplus
@@ -18,10 +22,17 @@ extern "C" {
#endif
#define GTK_TYPE_FORM (gtk_form_get_type ())
#ifdef USE_GTK3
#define GTK_FORM(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GTK_TYPE_FORM, GtkForm))
#define GTK_FORM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GTK_TYPE_FORM, GtkFormClass))
#define GTK_IS_FORM(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GTK_TYPE_FORM))
#define GTK_IS_FORM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GTK_TYPE_FORM))
#else
#define GTK_FORM(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_FORM, GtkForm))
#define GTK_FORM_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_FORM, GtkFormClass))
#define GTK_IS_FORM(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_FORM))
#define GTK_IS_FORM_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_FORM))
#endif
typedef struct _GtkForm GtkForm;
@@ -33,13 +44,17 @@ struct _GtkForm
GList *children;
#ifndef USE_GTK3
guint width;
guint height;
#endif
GdkWindow *bin_window;
#ifndef USE_GTK3
GdkVisibilityState visibility;
gulong configure_serial;
#endif
gint freeze_count;
};
@@ -49,7 +64,11 @@ struct _GtkFormClass
GtkContainerClass parent_class;
};
#ifdef USE_GTK3
GType gtk_form_get_type(void);
#else
GtkType gtk_form_get_type(void);
#endif
GtkWidget *gtk_form_new(void);
+1323 -58
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -6513,7 +6513,7 @@ im_get_status(void)
static MenuRef contextMenu = NULL;
enum
{
kTabContextMenuId = 42,
kTabContextMenuId = 42
};
// the caller has to CFRelease() the returned string
-1564
View File
File diff suppressed because it is too large Load Diff
+4075 -20
View File
File diff suppressed because it is too large Load Diff
-4156
View File
File diff suppressed because it is too large Load Diff
-36
View File
@@ -145,9 +145,6 @@ static void gui_x11_focus_change_cb(Widget w, XtPointer data, XEvent *event, Boo
static void gui_x11_enter_cb(Widget w, XtPointer data, XEvent *event, Boolean *dum);
static void gui_x11_leave_cb(Widget w, XtPointer data, XEvent *event, Boolean *dum);
static void gui_x11_mouse_cb(Widget w, XtPointer data, XEvent *event, Boolean *dum);
#ifdef FEAT_SNIFF
static void gui_x11_sniff_request_cb(XtPointer closure, int *source, XtInputId *id);
#endif
static void gui_x11_check_copy_area(void);
#ifdef FEAT_CLIENTSERVER
static void gui_x11_send_event_handler(Widget, XtPointer, XEvent *, Boolean *);
@@ -1163,20 +1160,6 @@ gui_x11_mouse_cb(
gui_send_mouse_event(button, x, y, repeated_click, vim_modifiers);
}
#ifdef FEAT_SNIFF
/* ARGSUSED */
static void
gui_x11_sniff_request_cb(
XtPointer closure UNUSED,
int *source UNUSED,
XtInputId *id UNUSED)
{
static char_u bytes[3] = {CSI, (int)KS_EXTRA, (int)KE_SNIFF};
add_to_input_buf(bytes, 3);
}
#endif
/*
* End of call-back routines
*/
@@ -2818,28 +2801,9 @@ gui_mch_wait_for_chars(long wtime)
static int timed_out;
XtIntervalId timer = (XtIntervalId)0;
XtInputMask desired;
#ifdef FEAT_SNIFF
static int sniff_on = 0;
static XtInputId sniff_input_id = 0;
#endif
timed_out = FALSE;
#ifdef FEAT_SNIFF
if (sniff_on && !want_sniff_request)
{
if (sniff_input_id)
XtRemoveInput(sniff_input_id);
sniff_on = 0;
}
else if (!sniff_on && want_sniff_request)
{
sniff_input_id = XtAppAddInput(app_context, fd_from_sniff,
(XtPointer)XtInputReadMask, gui_x11_sniff_request_cb, 0);
sniff_on = 1;
}
#endif
if (wtime > 0)
timer = XtAppAddTimeOut(app_context, (long_u)wtime, gui_x11_timer_cb,
&timed_out);
-17
View File
@@ -1,17 +0,0 @@
#define IDR_VIM 150
#define IDR_VIM_ERROR 151
#define IDR_VIM_ALERT 152
#define IDR_VIM_INFO 153
#define IDR_VIM_QUESTION 154
#define IDR_ICOBUDDYBASE 200
#define IDR_ICOBUDDY_DEF1 (IDR_ICOBUDDYBASE + 3)
#define IDR_ICOBUDDY_DEF2 (IDR_ICOBUDDYBASE + 0)
#define IDR_ICOBUDDY_DEF3 (IDR_ICOBUDDYBASE + 1)
#define IDR_ICOBUDDY_DEF4 (IDR_ICOBUDDYBASE + 2)
#define IDR_ICOBUDDY_GRIN (IDR_ICOBUDDYBASE + 4)
#define IDR_ICOBUDDY_ALARM (IDR_ICOBUDDYBASE + 5)
+9 -5
View File
@@ -2062,7 +2062,10 @@ cs_print_tags_priv(char **matches, char **cntxts, int num_matches)
strcpy(tbuf, matches[0]);
ptag = strtok(tbuf, "\t");
if (ptag == NULL)
{
vim_free(tbuf);
return;
}
newsize = (int)(strlen(cstag_msg) + strlen(ptag));
buf = (char *)alloc(newsize);
@@ -2092,12 +2095,13 @@ cs_print_tags_priv(char **matches, char **cntxts, int num_matches)
continue;
(void)strcpy(tbuf, matches[idx]);
if (strtok(tbuf, (const char *)"\t") == NULL)
continue;
if ((fname = strtok(NULL, (const char *)"\t")) == NULL)
continue;
if ((lno = strtok(NULL, (const char *)"\t")) == NULL)
if (strtok(tbuf, (const char *)"\t") == NULL
|| (fname = strtok(NULL, (const char *)"\t")) == NULL
|| (lno = strtok(NULL, (const char *)"\t")) == NULL)
{
vim_free(tbuf);
continue;
}
extra = strtok(NULL, (const char *)"\t");
lno[strlen(lno)-2] = '\0'; /* ignore ;" at the end */
+4 -9
View File
@@ -11,16 +11,11 @@
#if defined(FEAT_CSCOPE) || defined(PROTO)
#if defined(UNIX)
# include <sys/types.h> /* pid_t */
# include <sys/stat.h> /* dev_t, ino_t */
#else
# if defined (WIN32)
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
# endif
# include <windows.h>
#if defined (WIN32)
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
# endif
# include <windows.h>
#endif
#define CSCOPE_SUCCESS 0
+16
View File
@@ -852,7 +852,11 @@ static int mz_threads_allow = 0;
static void CALLBACK timer_proc(HWND, UINT, UINT, DWORD);
static UINT timer_id = 0;
#elif defined(FEAT_GUI_GTK)
# if GTK_CHECK_VERSION(3,0,0)
static gboolean timer_proc(gpointer);
# else
static gint timer_proc(gpointer);
# endif
static guint timer_id = 0;
#elif defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)
static void timer_proc(XtPointer, XtIntervalId *);
@@ -892,7 +896,11 @@ static void remove_timer(void);
static void CALLBACK
timer_proc(HWND hwnd UNUSED, UINT uMsg UNUSED, UINT idEvent UNUSED, DWORD dwTime UNUSED)
# elif defined(FEAT_GUI_GTK)
# if GTK_CHECK_VERSION(3,0,0)
static gboolean
# else
static gint
# endif
timer_proc(gpointer data UNUSED)
# elif defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)
static void
@@ -919,7 +927,11 @@ setup_timer(void)
# if defined(FEAT_GUI_W32)
timer_id = SetTimer(NULL, 0, p_mzq, timer_proc);
# elif defined(FEAT_GUI_GTK)
# if GTK_CHECK_VERSION(3,0,0)
timer_id = g_timeout_add((guint)p_mzq, (GSourceFunc)timer_proc, NULL);
# else
timer_id = gtk_timeout_add((guint32)p_mzq, (GtkFunction)timer_proc, NULL);
# endif
# elif defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)
timer_id = XtAppAddTimeOut(app_context, p_mzq, timer_proc, NULL);
# elif defined(FEAT_GUI_MAC)
@@ -935,7 +947,11 @@ remove_timer(void)
# if defined(FEAT_GUI_W32)
KillTimer(NULL, timer_id);
# elif defined(FEAT_GUI_GTK)
# if GTK_CHECK_VERSION(3,0,0)
g_source_remove(timer_id);
# else
gtk_timeout_remove(timer_id);
# endif
# elif defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)
XtRemoveTimeOut(timer_id);
# elif defined(FEAT_GUI_MAC)

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