Compare commits

...

122 Commits

Author SHA1 Message Date
Bram Moolenaar
322a24af83 updated for version 7.4.595
Problem:    The test_command_count test fails when using Japanese.
Solution:   Force the language to C. (Hirohito Higashi)
2015-01-27 13:28:46 +01:00
Bram Moolenaar
1dc92334eb updated for version 7.4.594
Problem:    Using a block delete while 'breakindent' is set does not work
            properly.
Solution:   Use "line" instead of "prev_pend" as the first argument to
            lbr_chartabsize_adv().  (Hirohito Higashi)
2015-01-27 13:22:20 +01:00
Bram Moolenaar
e0ad365498 updated for version 7.4.593
Problem:    Crash when searching for "x\{0,90000}". (Dominique Pelle)
Solution:   Bail out from the NFA engine when the max limit is much higher
            than the min limit.
2015-01-27 12:59:55 +01:00
Bram Moolenaar
df5caa08f6 updated for version 7.4.592
Problem:    When doing ":e foobar" when already editing "foobar" and 'buftype'
            is "nofile" the buffer is cleared. (Xavier de Gaye)
Solution:   Do no clear the buffer.
2015-01-27 11:26:15 +01:00
Bram Moolenaar
8a94d873aa Update runtime files. 2015-01-25 13:02:57 +01:00
Bram Moolenaar
df82661c9c updated for version 7.4.591
Problem:    test_listlbr_utf8 fails when the conceal feature is not available.
Solution:   Check for the conceal feature. (Kazunobu Kuriyama)
2015-01-22 22:41:56 +01:00
Bram Moolenaar
eea478f885 updated for version 7.4.590
Problem:    Using ctrl_x_mode as if it contains flags.
Solution:   Don't use AND with CTRL_X_OMNI. (Hirohito Higashi)
2015-01-22 22:40:20 +01:00
Bram Moolenaar
1ec4dd41de updated for version 7.4.589
Problem:    In the MS-Windows console Vim can't handle greek characters when
            encoding is utf-8.
Solution:   Escape K_NUL. (Yasuhiro Matsumoto)
2015-01-20 19:39:35 +01:00
Bram Moolenaar
4bde00c595 updated for version 7.4.588
Problem:    ":0argedit foo" puts the new argument in the second place instead
            of the first.
Solution:   Adjust the range type. (Ingo Karkat)
2015-01-20 19:31:02 +01:00
Bram Moolenaar
6a6028cf4b updated for version 7.4.587
Problem:    Conceal does not work properly with 'linebreak'. (cs86661)
Solution:   Save and restore boguscols. (Christian Brabandt)
2015-01-20 19:01:35 +01:00
Bram Moolenaar
6bf7a5933f updated for version 7.4.586
Problem:    Parallel building of the documentation html files is not reliable.
Solution:   Remove a cyclic dependency. (Reiner Herrmann)
2015-01-20 17:27:22 +01:00
Bram Moolenaar
e823183254 updated for version 7.4.585
Problem:    Range for :bdelete does not work. (Ronald Schild)
Solution:   Also allow unloaded buffers.
2015-01-20 13:29:49 +01:00
Bram Moolenaar
ff8a75dab7 updated for version 7.4.584
Problem:    With tiny features test_command_count may fail.
Solution:   Source small.vim. (Christian Brabandt)
2015-01-20 12:39:39 +01:00
Bram Moolenaar
ff13610d7b updated for version 7.4.583
Problem:    With tiny features test 16 may fail.
Solution:   Source small.vim. (Christian Brabandt)
2015-01-20 12:14:01 +01:00
Bram Moolenaar
ef795d1a5b updated for version 7.4.582
Problem:    Can't match "%>80v" properly. (Axel Bender)
Solution:   Correctly handle ">". (Christian Brabandt)
2015-01-18 16:46:32 +01:00
Bram Moolenaar
7cbc703fdc updated for version 7.4.581
Problem:    Compiler warnings for unitinialized variables. (John Little)
Solution:   Initialize the variables.
2015-01-18 14:08:56 +01:00
Bram Moolenaar
164f3269b1 updated for version 7.4.580
Problem:    ":52wincmd v" still gives an invalid range error. (Charles
            Campbell)
Solution:   Skip over white space.
2015-01-14 21:22:01 +01:00
Bram Moolenaar
83caecf314 Updated runtime files. 2015-01-14 19:42:21 +01:00
Bram Moolenaar
d574ea2f80 updated for version 7.4.579
Problem:    Wrong cursor positioning when 'linebreak' is set and lines wrap.
Solution:   (Christian Brabandt)
2015-01-14 19:35:14 +01:00
Bram Moolenaar
084abaec06 updated for version 7.4.578
Problem:    Using getcurpos() after "$" in an empty line returns a negative
            number.
Solution:   Don't add one when this would overflow. (Hirohito Higashi)
2015-01-14 19:00:38 +01:00
Bram Moolenaar
a20bcad15c updated for version 7.4.577
Problem:    Matching with a virtual column has a lot of overhead on very long
            lines. (Issue 310)
Solution:   Bail out early if there can't be a match. (Christian Brabandt)
            Also check for CTRL-C at every position.
2015-01-14 18:40:28 +01:00
Bram Moolenaar
ba3f58e296 updated for version 7.4.576
Problem:    Redrawing problem with 'relativenumber' and 'linebreak'.
Solution:   Temporarily reset 'linebreak' and restore it in more places.
            (Christian Brabandt)
2015-01-14 17:52:30 +01:00
Bram Moolenaar
ea67672534 updated for version 7.4.575
Problem:    Unicode character properties are outdated.
Solution:   Update the tables with the latest version.
2015-01-14 17:40:09 +01:00
Bram Moolenaar
615b9978dd updated for version 7.4.574
Problem:    No error for eval('$').
Solution:   Check for empty name. (Yasuhiro Matsumoto)
2015-01-14 17:15:05 +01:00
Bram Moolenaar
5000869712 updated for version 7.4.573
Problem:    Mapping CTRL-C in Visual mode doesn't work. (Ingo Karkat)
Solution:   Call get_real_state() instead of using State directly.
2015-01-14 16:08:32 +01:00
Bram Moolenaar
84c8e5ab9c updated for version 7.4.572
Problem:    Address type of :wincmd depends on the argument.
Solution:   Check the argument.
2015-01-14 15:47:36 +01:00
Bram Moolenaar
435797304a updated for version 7.4.571
Problem:    Can't build with tiny features. (Ike Devolder)
Solution:   Add #ifdef.
2015-01-14 14:08:44 +01:00
Bram Moolenaar
0c7485fdbb updated for version 7.4.570
Problem:    Building with dynamic library does not work for Ruby 2.2.0
Solution:   Change #ifdefs and #defines. (Ken Takata)
2015-01-14 14:04:10 +01:00
Bram Moolenaar
9da7ff70cc Updated runtime files. 2015-01-14 12:52:36 +01:00
Bram Moolenaar
651863c94a updated for version 7.4.569
Problem:    Having CTRL-C interrupt or not does not check the mode of the
            mapping. (Ingo Karkat)
Solution:   Use a bitmask with the map mode. (Christian Brabandt)
2015-01-14 12:44:41 +01:00
Bram Moolenaar
8be6388b76 updated for version 7.4.568
Problem:    Giving an error for ":0wincmd w" is a problem for some plugins.
Solution:   Allow the zero in the range. (Marcin Szamotulski)
2015-01-14 11:25:05 +01:00
Bram Moolenaar
e271909625 Updated syntax files. 2015-01-10 15:09:25 +01:00
Bram Moolenaar
c60c4f6e06 updated for version 7.4.567
Problem:    Non-ascii vertical separater characters are always redrawn.
Solution:   Compare only the one byte that's stored. (Thiago Padilha)
2015-01-07 19:04:28 +01:00
Bram Moolenaar
8feef4ff62 Update runtime files. 2015-01-07 16:57:10 +01:00
Bram Moolenaar
a162bc555e updated for version 7.4.566
Problem:    :argdo, :bufdo, :windo and :tabdo don't take a range.
Solution:   Support the range. (Marcin Szamotulski)
2015-01-07 16:54:21 +01:00
Bram Moolenaar
3ffc79a4a8 updated for version 7.4.565
Problem:    Ranges for arguments, buffers, tabs, etc. are not checked to be
            valid but limited to the maximum.  This can cause the wrong thing
            to happen.
Solution:   Give an error for an invalid value. (Marcin Szamotulski)
            Use windows range for ":wincmd".
2015-01-07 15:57:17 +01:00
Bram Moolenaar
49a6ed8a8a updated for version 7.4.564
Problem:    FEAT_OSFILETYPE is used even though it's never defined.
Solution:   Remove the code. (Christian Brabandt)
2015-01-07 14:43:39 +01:00
Bram Moolenaar
684d409f63 updated for version 7.4.563
Problem:    No test for replacing on a tab in Virtual replace mode.
Solution:   Add a test. (Elias Diem)
2015-01-07 14:02:52 +01:00
Bram Moolenaar
0027c218e9 updated for version 7.4.562
Problem:    Segfault with wide screen and error in 'rulerformat'. (Ingo Karkat)
Solution:   Check there is enough space. (Christian Brabandt)
2015-01-07 13:31:52 +01:00
Bram Moolenaar
abe382cd2a updated for version 7.4.561
Problem:    Ex range handling is wrong for buffer-local user commands.
Solution:   Check for CMD_USER_BUF. (Marcin Szamotulski)
2015-01-07 13:15:45 +01:00
Bram Moolenaar
e88b0033f6 updated for version 7.4.560
Problem:    Memory leak using :wviminfo. Issue 296.
Solution:   Free memory when needed. (idea by Christian Brabandt)
2014-12-17 21:00:49 +01:00
Bram Moolenaar
fc3f23bedf updated for version 7.4.559
Problem:    Appending a block in the middle of a tab does not work correctly
            when virtualedit is set.
Solution:   Decrement spaces and count, don't reset them. (James McCoy)
2014-12-17 18:35:42 +01:00
Bram Moolenaar
527a6785c7 updated for version 7.4.558
Problem:    When the X server restarts Vim may get stuck.
Solution:   Destroy the application context and create it again.  (Issue 203)
2014-12-17 17:59:31 +01:00
Bram Moolenaar
140e995ed5 updated for version 7.4.557
Problem:    One more small issue.
Solution:   Update function proto.
2014-12-17 14:47:56 +01:00
Bram Moolenaar
ae38d05271 updated for version 7.4.556
Problem:    Failed commands in Python interface not handled correctly.
Solution:   Restore window and buffer on failure.
2014-12-17 14:46:09 +01:00
Bram Moolenaar
36ff08479f updated for version 7.4.555
Problem:    test_close_count may fail for some combination of features.
Solution:   Require normal features.
2014-12-17 14:42:46 +01:00
Bram Moolenaar
6f2dd9e75e updated for version 7.4.554
Problem:    Missing part of patch 7.4.519.
Solution:   Copy back regprog after calling vim_regexec.
2014-12-17 14:41:10 +01:00
Bram Moolenaar
caad4f0a0b updated for version 7.4.553
Problem:    Various small issues.
Solution:   Fix those issues.
2014-12-17 14:36:14 +01:00
Bram Moolenaar
e3faf44bef Updated runtime files. 2014-12-14 01:27:49 +01:00
Bram Moolenaar
c68c72ea7b updated for version 7.4.552
Problem:    Langmap applies to Insert mode expression mappings.
Solution:   Check for Insert mode. (Daniel Hahler)
2014-12-14 00:43:54 +01:00
Bram Moolenaar
b12db9f92e updated for version 7.4.551
Problem:    "ygn" may yank too much. (Fritzophrenic)  Issue 295.
Solution:   Check the width of the next match. (Christian Brabandt)
2014-12-13 22:00:22 +01:00
Bram Moolenaar
3f9be97015 updated for version 7.4.550
Problem:    curs_rows() function is always called with the second argument
            false.
Solution:   Remove the argument. (Christian Brabandt)
            validate_botline_win() can then also be removed.
2014-12-13 21:09:57 +01:00
Bram Moolenaar
ddfb925480 Add new files for 7.4.549. 2014-12-13 21:03:10 +01:00
Bram Moolenaar
ef92390cb7 updated for version 7.4.549
Problem:    Function name not recognized correctly when inside a function.
Solution:   Don't check for an alpha character.
2014-12-13 21:00:55 +01:00
Bram Moolenaar
2d78cd7756 updated for version 7.4.548
Problem:    Function name not recognized correctly when inside a function.
Solution:   Don't check for an alpha character.
2014-12-13 20:50:09 +01:00
Bram Moolenaar
8340dd9b29 updated for version 7.4.547
Problem:    Using "vit" does not select a multi-byte character at the end
            correctly.
Solution:   Advance the cursor over the multi-byte character. (Christian
            Brabandt)
2014-12-13 20:11:33 +01:00
Bram Moolenaar
2f1e51a43c updated for version 7.4.546
Problem:    Repeated use of vim_snprintf() with a number.
Solution:   Move these vim_snprintf() calls into a function.
2014-12-13 03:58:09 +01:00
Bram Moolenaar
aff5c3a530 updated for version 7.4.545
Problem:    Highlighting for multi-line matches is not correct.
Solution:   Stop highlight at the end of the match. (Hirohito Higashi)
2014-12-13 03:36:39 +01:00
Bram Moolenaar
d96c52c71b updated for version 7.4.544
Problem:    Warnings for unused arguments when compiling with a combination of
            features.
Solution:   Add "UNUSED".
2014-12-13 03:20:14 +01:00
Bram Moolenaar
cc2b9d5dc0 updated for version 7.4.543
Problem:    Since patch 7.4.232 "1,3s/\n//" joins two lines instead of three.
            (Eliseo Martínez)  Issue 287
Solution:   Correct the line count. (Christian Brabandt)
            Also set the last used search pattern.
2014-12-13 03:17:11 +01:00
Bram Moolenaar
f1d6ccf2f9 updated for version 7.4.542
Problem:    Using a range for window and buffer commands has a few problems.
            Cannot specify the type of range for a user command.
Solution:   Add the -addr argument for user commands.  Fix problems. (Marcin
            Szamotulski)
2014-12-08 04:16:44 +01:00
Bram Moolenaar
b2a851fee4 updated for version 7.4.541
Problem:    Crash when doing a range assign.
Solution:   Check for NULL poiter. (Yukihiro Nakadaira)
2014-12-07 00:18:33 +01:00
Bram Moolenaar
ed32d9424d Update runtime files. 2014-12-06 23:33:00 +01:00
Bram Moolenaar
f8a447c6dc updated for version 7.4.540
Problem:    Cannot build with tiny and small features. (Taro Muraoka)
Solution:   Add #ifdef around CMD_USER.
2014-11-30 22:51:06 +01:00
Bram Moolenaar
4d84d9325f updated for version 7.4.539
Problem:    Crash when computing buffer count.  Problem with range for user
            commands.  Line range wrong in Visual area.
Solution:   Avoid segfault in compute_buffer_local_count().  Check for
            CMD_USER when checking type of range. (Marcin Szamotulski)
2014-11-30 14:50:16 +01:00
Bram Moolenaar
0b10541606 updated for version 7.4.538
Problem:    Tests fail with small features plus Python.
Solution:   Disallow weird combination of options.  Do not set "fdm" when
            folding is disabled.
2014-11-30 13:34:23 +01:00
Bram Moolenaar
76440e2efe updated for version 7.4.537
Problem:    Value of v:hlsearch reflects an internal variable.
Solution:   Make the value reflect whether search highlighting is actually
            displayed. (Christian Brabandt)
2014-11-27 19:14:49 +01:00
Bram Moolenaar
f1e30ccb82 updated for version 7.4.536
Problem:    Test 63 fails when using a black&white terminal.
Solution:   Add attributes for a non-color terminal. (Christian Brabandt)
2014-11-27 18:57:11 +01:00
Bram Moolenaar
f240e181d7 updated for version 7.4.535
Problem:    Can't build with tiny features.
Solution:   Add #ifdefs and skip a test.
2014-11-27 18:33:02 +01:00
Bram Moolenaar
2a0b33e284 Add files added by patch 7.4.530 to the repository. 2014-11-27 17:46:22 +01:00
Bram Moolenaar
9014074913 updated for version 7.4.534
Problem:    Warnings when compiling if_ruby.c.
Solution:   Avoid the warnings. (Ken Takata)
2014-11-27 17:44:08 +01:00
Bram Moolenaar
0a38396937 updated for version 7.4.533
Problem:    ":hardcopy" leaks memory in case of errors.
Solution:   Free memory in all code paths. (Christian Brabandt)
2014-11-27 17:37:57 +01:00
Bram Moolenaar
a3dfccc6e9 updated for version 7.4.532
Problem:    When using 'incsearch' "2/pattern/e" highlights the first match.
Solution:   Move the code to set extra_col inside the loop for count.  (Ozaki
            Kiichi)
2014-11-27 17:29:56 +01:00
Bram Moolenaar
1c40a66bad updated for version 7.4.531
Problem:    Comments about parsing an Ex command are wrong.
Solution:   Correct the steop numbers.
2014-11-27 16:38:11 +01:00
Bram Moolenaar
b96a7f325c updated for version 7.4.530
Problem:    Many commands take a count or range that is not using line
            numbers.
Solution:   For each command specify what kind of count it uses.  For windows,
            buffers and arguments have "$" and "." have a relevant meaning.
            (Marcin Szamotulski)
2014-11-27 16:22:48 +01:00
Bram Moolenaar
baf0344ed7 updated for version 7.4.529
Problem:    No test for what 7.4.517 fixes.
Solution:   Adjust the tests for breakindent. (Christian Brabandt)
2014-11-27 14:09:13 +01:00
Bram Moolenaar
cbdf0a0b4a updated for version 7.4.528
Problem:    Crash when using matchadd() (Yasuhiro Matsumoto)
Solution:   Copy the match regprog.
2014-11-27 13:37:10 +01:00
Bram Moolenaar
8c731505b0 updated for version 7.4.527
Problem:    Still confusing regexp failure and NFA_TOO_EXPENSIVE.
Solution:   NFA changes equivalent of 7.4.526.
2014-11-23 15:57:49 +01:00
Bram Moolenaar
66a3e797a2 updated for version 7.4.526
Problem:    matchstr() fails on long text. Daniel Hahler)
Solution:   Return NFA_TOO_EXPENSIVE from regexec_nl(). (Christian Brabandt)
2014-11-20 23:07:05 +01:00
Bram Moolenaar
b738c9a442 updated for version 7.4.525
Problem:    map() leaks memory when there is an error in the expression.
Solution:   Call clear_tv(). (Christian Brabandt)
2014-11-19 20:04:48 +01:00
Bram Moolenaar
2683c8e7f7 updated for version 7.4.524
Problem:    When using ":ownsyntax" spell checking is messed up. (Issue 78)
Solution:   Use the window-local option values. (Christian Brabandt)
2014-11-19 19:33:16 +01:00
Bram Moolenaar
2f3b510b0f Update runtime files. 2014-11-19 18:54:17 +01:00
Bram Moolenaar
b1e265045c updated for version 7.4.523
Problem:    When the X11 server is stopped and restarted, while Vim is kept in
            the background, copy/paste no longer works. (Issue 203)
Solution:   Setup the clipboard again. (Christian Brabandt)
2014-11-19 18:48:46 +01:00
Bram Moolenaar
4c7b2f50fd updated for version 7.4.522
Problem:    Specifying wrong buffer size for GetLongPathName().
Solution:   Use the actual size. (Ken Takata)
2014-11-19 18:03:28 +01:00
Bram Moolenaar
06e7ce1a01 updated for version 7.4.521
Problem:    When using "vep" a mark is moved to the next line. (Maxi Padulo,
            Issue 283)
Solution:   Decrement the line number. (Christian Brabandt)
2014-11-19 17:35:39 +01:00
Bram Moolenaar
57bc4633b2 updated for version 7.4.520
Problem:    Sun PCK locale is not recognzed.
Solution:   Add PCK in the table. (Keiichi Oono)
2014-11-19 17:05:55 +01:00
Bram Moolenaar
dffa5b8ecf updated for version 7.4.519
Problem:    Crash when using syntax highlighting.
Solution:   When regprog is freed and replaced, store the result.
2014-11-19 16:38:07 +01:00
Bram Moolenaar
df46f6f07f updated for version 7.4.518
Problem:    Using status line height in width computations.
Solution:   Use one instead. (Hirohito Higashi)
2014-11-19 13:40:08 +01:00
Bram Moolenaar
a365091dbb updated for version 7.4.517
Problem:    With a wrapping line the cursor may not end up in the right place.
            (Nazri Ramliy)
Solution:   Adjust n_extra for a Tab that wraps. (Christian Brabandt)
2014-11-19 13:21:57 +01:00
Bram Moolenaar
1ba903fb92 Update translations. 2014-11-13 14:26:09 +01:00
Bram Moolenaar
c229967caa Update runtime files. 2014-11-13 14:25:38 +01:00
Bram Moolenaar
8a349ff944 updated for version 7.4.516
Problem:    Completing a function name containing a # does not work.  Issue
            253.
Solution:   Recognize the # character. (Christian Brabandt)
2014-11-12 20:09:06 +01:00
Bram Moolenaar
54fb438134 updated for version 7.4.515
Problem:    In a help buffer the global 'foldmethod' is used.  (Paul Marshall)
Solution:   Reset 'foldmethod' when starting to edit a help file.  Move the
            code to a separate function.
2014-11-12 19:28:16 +01:00
Bram Moolenaar
ef6875be7a updated for version 7.4.514
Problem:    Memory access error. (Dominique Pelle)
Solution:   Update tpos. (Christian Brabandt)
2014-11-12 18:59:25 +01:00
Bram Moolenaar
42d84f8aed updated for version 7.4.513
Problem:    Crash because reference count is wrong for list returned by
            getreg().
Solution:   Increment the reference count. (Kimmy Lindvall)
2014-11-12 18:49:16 +01:00
Bram Moolenaar
b8e0bdbda3 updated for version 7.4.512
Problem:    Cannot generate prototypes for Win32 files and VMS.
Solution:   Add typedefs and #ifdef
2014-11-12 16:10:48 +01:00
Bram Moolenaar
3e9a161496 updated for version 7.4.511
Problem:    Generating proto for if_ruby.c uses type not defined elsewhere.
Solution:   Do not generate a prototype for
            rb_gc_writebarrier_unprotect_promoted()
2014-11-12 16:05:04 +01:00
Bram Moolenaar
b103138b1e updated for version 7.4.510
Problem:    "-fwrapv" argument breaks use of cproto.
Solution:   Remove the alphabetic arguments in a drastic way.
2014-11-12 15:45:21 +01:00
Bram Moolenaar
3a0c908983 updated for version 7.4.509
Problem:    Users are not aware their encryption is weak.
Solution:   Give a warning when prompting for the key.
2014-11-12 15:15:42 +01:00
Bram Moolenaar
983c4e93dc updated for version 7.4.508
Problem:    When generating ja.sjis.po the header is not correctly adjusted.
Solution:   Check for the right header string. (Ken Takata)
2014-11-12 13:07:53 +01:00
Bram Moolenaar
345326aa3d updated for version 7.4.507
Problem:    Building with MingW and Perl.
Solution:   Remove quotes. (Ken Takata)
2014-11-06 10:03:01 +01:00
Bram Moolenaar
374bf024d2 updated for version 7.4.506
Problem:    MS-Windows: Cannot open a file with 259 characters.
Solution:   Fix off-by-one error. (Ken Takata)
2014-11-05 19:33:24 +01:00
Bram Moolenaar
f9e6c3b8b0 updated for version 7.4.505
Problem:    On MS-Windows when 'encoding' is a double-byte encoding a file
            name longer than MAX_PATH bytes but shorter than that in
            characters causes problems.
Solution:   Fail on file names longer than MAX_PATH bytes. (Ken Takata)
2014-11-05 18:36:03 +01:00
Bram Moolenaar
0434482e5a updated for version 7.4.504
Problem:    Restriction of the MS-Windows installer that the path must end in
            "Vim" prevents installing more than one version.
Solution:   Remove the restriction. (Tim Lebedkov)
2014-11-05 18:18:17 +01:00
Bram Moolenaar
6b2e938f13 updated for version 7.4.503
Problem:    Cannot append a list of lines to a file.
Solution:   Add the append option to writefile(). (Yasuhiro Matsumoto)
2014-11-05 18:06:01 +01:00
Bram Moolenaar
4391cf98ec updated for version 7.4.502
Problem:    Language mapping also applies to mapped characters.
Solution:   Add the 'langnoremap' option, when on 'langmap' does not apply to
            mapped characters. (Christian Brabandt)
2014-11-05 17:44:52 +01:00
Bram Moolenaar
c3940c76e8 updated for version 7.4.501
Problem:    Typo in file pattern.
Solution:   Insert a slash and remove a dot.
2014-11-05 17:04:18 +01:00
Bram Moolenaar
32efaf6154 Update runtime files. 2014-11-05 17:02:17 +01:00
Bram Moolenaar
72971a2611 updated for version 7.4.500
Problem:    Test 72 still fails once in a while.
Solution:   Don't set 'fileformat' to unix, reset it. (Ken Takata)
2014-11-05 16:39:28 +01:00
Bram Moolenaar
e90c853ff6 updated for version 7.4.499
Problem:    substitute() can be slow with long strings.
Solution:   Store a pointer to the end, instead of calling strlen() every
            time. (Ozaki Kiichi)
2014-11-05 16:03:44 +01:00
Bram Moolenaar
9c7d98d7c2 updated for version 7.4.498
Problem:    Typo in DOS makefile.
Solution:   Change exists to exist. (Ken Takata)
2014-11-05 15:46:09 +01:00
Bram Moolenaar
fda3729a06 updated for version 7.4.497
Problem:    With some regexp patterns the NFA engine uses many states and
            becomes very slow.  To the user it looks like Vim freezes.
Solution:   When the number of states reaches a limit fall back to the old
            engine. (Christian Brabandt)
2014-11-05 14:27:36 +01:00
Bram Moolenaar
4f7e821f26 updated for version 7.4.496
Problem:    Many lines are both in Make_cyg.mak and Make_ming.mak
Solution:   Move the common parts to one file. (Ken Takata)
2014-11-05 13:53:32 +01:00
Bram Moolenaar
666578b539 updated for version 7.4.495
Problem:    XPM isn't used correctly in the Cygwin Makefile.
Solution:   Include the rules like in Make_ming.mak. (Ken Takata)
2014-11-05 13:43:21 +01:00
Bram Moolenaar
eda73607a7 updated for version 7.4.494
Problem:    Cursor shape is wrong after a CompleteDone autocommand.
Solution:   Update the cursor and mouse shape after ":normal" restores the
            state. (Jacob Niehus)
2014-11-05 09:53:23 +01:00
Bram Moolenaar
086329d3f6 updated for version 7.4.493
Problem:    A TextChanged autocommand is triggered when saving a file.
            (William Gardner)
Solution:   Update last_changedtick after calling unchanged(). (Christian
            Brabandt)
2014-10-31 19:51:36 +01:00
Bram Moolenaar
2f31e39978 updated for version 7.4.492
Problem:    In Insert mode, after inserting a newline that inserts a comment
            leader, CTRL-O moves to the right. (ZyX) Issue 57.
Solution:   Correct the condition for moving the cursor back to the NUL.
            (Christian Brabandt)
2014-10-31 19:20:36 +01:00
Bram Moolenaar
b851a96d5c updated for version 7.4.491
Problem:    When winrestview() has a negative "topline" value there are
            display errors.
Solution:   Correct a negative value to 1. (Hirohito Higashi)
2014-10-31 15:45:52 +01:00
Bram Moolenaar
6a64365c95 updated for version 7.4.490
Problem:    Cannot specify the buffer to use for "do" and "dp", making them
            useless for three-way diff.
Solution:   Use the count as the buffer number. (James McCoy)
2014-10-31 13:54:25 +01:00
Bram Moolenaar
fe3c410098 updated for version 7.4.489
Problem:    Cursor movement still wrong when 'lbr' is set and there is a
            number column. (Hirohito Higashi)
Solution:   Add correction for number column. (Hiroyuki Takagi)
2014-10-31 12:42:01 +01:00
Bram Moolenaar
7a373dd0d4 updated for version 7.4.488
Problem:    test_mapping fails for some people.
Solution:   Set the 'encoding' option. (Ken Takata)
2014-10-22 22:09:01 +02:00
Bram Moolenaar
a94618e16c Add the missing test files. 2014-10-21 22:36:31 +02:00
204 changed files with 10266 additions and 5134 deletions

View File

@@ -102,6 +102,9 @@ SRC_ALL = \
src/testdir/pythonx/topmodule/submodule/subsubmodule/subsubsubmodule.py \
src/testdir/python_after/*.py \
src/testdir/python_before/*.py \
src/testdir/bench*.in \
src/testdir/bench*.vim \
src/testdir/samples/*.txt \
src/proto.h \
src/proto/blowfish.pro \
src/proto/buffer.pro \
@@ -277,6 +280,7 @@ SRC_DOS = \
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 \

View File

@@ -1,6 +1,6 @@
# NSIS file to create a self-installing exe for Vim.
# It requires NSIS version 2.0 or later.
# Last Change: 2010 Jul 30
# Last Change: 2014 Nov 5
# WARNING: if you make changes to this script, look out for $0 to be valid,
# because uninstall deletes most files in $0.
@@ -38,7 +38,7 @@ SetDatablockOptimize on
RequestExecutionLevel highest
ComponentText "This will install Vim ${VER_MAJOR}.${VER_MINOR} on your computer."
DirText "Choose a directory to install Vim (must end in 'vim')"
DirText "Choose a directory to install Vim (should contain 'vim')"
Icon icons\vim_16c.ico
# NSIS2 uses a different strategy with six different images in a strip...
#EnabledBitmap icons\enabled.bmp
@@ -135,11 +135,6 @@ FunctionEnd
# We only accept the directory if it ends in "vim". Using .onVerifyInstDir has
# the disadvantage that the browse dialog is difficult to use.
Function CheckInstallDir
StrCpy $0 $INSTDIR 3 -3
StrCmp $0 "vim" PathGood
MessageBox MB_OK "The path must end in 'vim'."
Abort
PathGood:
FunctionEnd
Function .onInstSuccess

View File

@@ -1,6 +1,6 @@
" Vim autoload file for editing compressed files.
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2008 Jul 04
" Last Change: 2014 Nov 05
" These functions are used by the gzip plugin.
@@ -120,6 +120,8 @@ fun gzip#read(cmd)
silent! exe "bwipe " . tmp_esc
silent! exe "bwipe " . tmpe_esc
endif
" Store the OK flag, so that we can use it when writing.
let b:uncompressOk = ok
" Restore saved option values.
let &pm = pm_save
@@ -146,8 +148,10 @@ endfun
" After writing compressed file: Compress written file with "cmd"
fun gzip#write(cmd)
if exists('b:uncompressOk') && !b:uncompressOk
echomsg "Not compressing file because uncompress failed; reset b:uncompressOk to compress anyway"
" don't do anything if the cmd is not supported
if s:check(a:cmd)
elseif s:check(a:cmd)
" Rename the file before compressing it.
let nm = resolve(expand("<afile>"))
let nmt = s:tempname(nm)

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
" netrwSettings.vim: makes netrw settings simpler
" Date: Aug 27, 2013
" Date: Dec 30, 2014
" Maintainer: Charles E Campbell <drchipNOSPAM at campbellfamily dot biz>
" Version: 14
" Version: 15
" Copyright: Copyright (C) 1999-2007 Charles E. Campbell {{{1
" Permission is hereby granted to use and distribute this code,
" with or without modifications, provided that this copyright
@@ -19,7 +19,7 @@
if exists("g:loaded_netrwSettings") || &cp
finish
endif
let g:loaded_netrwSettings = "v14"
let g:loaded_netrwSettings = "v15"
if v:version < 700
echohl WarningMsg
echo "***warning*** this version of netrwSettings needs vim 7.0"
@@ -31,7 +31,7 @@ endif
" NetrwSettings: {{{1
fun! netrwSettings#NetrwSettings()
" this call is here largely just to insure that netrw has been loaded
call netrw#NetrwSavePosn()
call netrw#SavePosn()
if !exists("g:loaded_netrw")
echohl WarningMsg | echomsg "***sorry*** netrw needs to be loaded prior to using NetrwSettings" | echohl None
return
@@ -177,6 +177,7 @@ fun! netrwSettings#NetrwSettings()
put = 'let g:netrw_sort_direction = '.g:netrw_sort_direction
put = 'let g:netrw_sort_options = '.g:netrw_sort_options
put = 'let g:netrw_sort_sequence = '.g:netrw_sort_sequence
put = 'let g:netrw_servername = '.g:netrw_servername
put = 'let g:netrw_special_syntax = '.g:netrw_special_syntax
put = 'let g:netrw_ssh_browse_reject = '.g:netrw_ssh_browse_reject
put = 'let g:netrw_ssh_cmd = '.g:netrw_ssh_cmd

View File

@@ -61,9 +61,16 @@ function! netrw_gitignore#Hide(...)
" convert gitignore patterns to Netrw/Vim regex patterns
let escaped_lines = []
for line in gitignore_lines
let escaped = line
let escaped = substitute(escaped, '\.', '\\.', 'g')
let escaped = substitute(escaped, '*', '.*', 'g')
let escaped = line
let escaped = substitute(escaped, '\*\*', '*', 'g')
let escaped = substitute(escaped, '\.', '\\.', 'g')
let escaped = substitute(escaped, '\$', '\\$', 'g')
let escaped = substitute(escaped, '*', '.*', 'g')
" correction: dot, dollar and asterisks chars shouldn't be escaped when
" within regex matching groups.
let escaped = substitute(escaped, '\(\[[^]]*\)\zs\\\.', '\.', 'g')
let escaped = substitute(escaped, '\(\[[^]]*\)\zs\\\$', '\$', 'g')
let escaped = substitute(escaped, '\(\[[^]]*\)\zs\.\*', '*', 'g')
let escaped_lines = add(escaped_lines, escaped)
endfor

View File

@@ -3,7 +3,7 @@
" Maintainer: Dávid Szabó ( complex857 AT gmail DOT com )
" Previous Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
" URL: https://github.com/shawncplus/phpcomplete.vim
" Last Change: 2014 Oct 02
" Last Change: 2014 Dec 01
"
" OPTIONS:
"
@@ -1172,11 +1172,11 @@ function! phpcomplete#GetCurrentInstruction(line_number, col_number, phpbegin) "
" break if we are on a "naked" stop_char (operators, colon, openparent...)
if index(stop_chars, current_char) != -1
let do_break = 1
" dont break does not look like a "->"
" dont break if it does look like a "->"
if (prev_char == '-' && current_char == '>') || (current_char == '-' && next_char == '>')
let do_break = 0
endif
" dont break if its looks like a "::"
" dont break if it does look like a "::"
if (prev_char == ':' && current_char == ':') || (current_char == ':' && next_char == ':')
let do_break = 0
endif
@@ -1356,8 +1356,12 @@ function! phpcomplete#GetCallChainReturnType(classname_candidate, class_candidat
endif
" make @return self, static, $this the same way
" (not exactly what php means by these)
if returnclass == 'self' || returnclass == 'static' || returnclass == '$this'
let classname_candidate = a:classname_candidate
if returnclass == 'self' || returnclass == 'static' || returnclass == '$this' || returnclass == 'self[]' || returnclass == 'static[]' || returnclass == '$this[]'
if returnclass =~ '\[\]$'
let classname_candidate = a:classname_candidate.'[]'
else
let classname_candidate = a:classname_candidate
endif
let class_candidate_namespace = a:class_candidate_namespace
else
let [classname_candidate, class_candidate_namespace] = phpcomplete#ExpandClassName(returnclass, fullnamespace, a:imports)
@@ -1527,7 +1531,7 @@ function! phpcomplete#GetClassName(start_line, context, current_namespace, impor
let function_boundary = phpcomplete#GetCurrentFunctionBoundaries()
let search_end_line = max([1, function_boundary[0][0]])
" -1 makes us ignore the current line (where the completion was invoked
let lines = reverse(getline(search_end_line, line('.') - 1))
let lines = reverse(getline(search_end_line, a:start_line - 1))
" check Constant lookup
let constant_object = matchstr(a:context, '\zs'.class_name_pattern.'\ze::')
@@ -1638,9 +1642,32 @@ function! phpcomplete#GetClassName(start_line, context, current_namespace, impor
" assignment for the variable in question with a variable on the right hand side
if line =~# '^\s*'.object.'\s*=&\?\s*'.variable_name_pattern
let tailing_semicolon = match(line, ';\s*$')
let tailing_semicolon = tailing_semicolon != -1 ? tailing_semicolon : strlen(getline(a:start_line - i))
let prev_context = phpcomplete#GetCurrentInstruction(a:start_line - i, tailing_semicolon - 1, b:phpbegin)
" try to find the next non-comment or string ";" char
let start_col = match(line, '^\s*'.object.'\C\s*=\zs&\?\s*'.variable_name_pattern)
let filelines = reverse(lines)
let [pos, char] = s:getNextCharWithPos(filelines, [a:start_line - i - 1, start_col])
let chars_read = 1
" read while end of the file
while char != 'EOF' && chars_read < 1000
let last_pos = pos
let [pos, char] = s:getNextCharWithPos(filelines, pos)
let chars_read += 1
" we got a candidate
if char == ';'
let synIDName = synIDattr(synID(pos[0] + 1, pos[1] + 1, 0), 'name')
" it's not a comment or string, end search
if synIDName !~? 'comment\|string'
break
endif
endif
endwhile
let prev_context = phpcomplete#GetCurrentInstruction(last_pos[0] + 1, last_pos[1], b:phpbegin)
if prev_context == ''
" cannot get previous context give up
return
endif
let prev_class = phpcomplete#GetClassName(a:start_line - i, prev_context, a:current_namespace, a:imports)
if stridx(prev_class, '\') != -1
@@ -1656,9 +1683,32 @@ function! phpcomplete#GetClassName(start_line, context, current_namespace, impor
" assignment for the variable in question with a function on the right hand side
if line =~# '^\s*'.object.'\s*=&\?\s*'.function_invocation_pattern
let tailing_semicolon = match(line, ';\s*$')
let tailing_semicolon = tailing_semicolon != -1 ? tailing_semicolon : strlen(getline(a:start_line - i))
let prev_context = phpcomplete#GetCurrentInstruction(a:start_line - i, tailing_semicolon - 1, b:phpbegin)
" try to find the next non-comment or string ";" char
let start_col = match(line, '\C^\s*'.object.'\s*=\zs&\?\s*'.function_invocation_pattern)
let filelines = reverse(lines)
let [pos, char] = s:getNextCharWithPos(filelines, [a:start_line - i - 1, start_col])
let chars_read = 1
" read while end of the file
while char != 'EOF' && chars_read < 1000
let last_pos = pos
let [pos, char] = s:getNextCharWithPos(filelines, pos)
let chars_read += 1
" we got a candidate
if char == ';'
let synIDName = synIDattr(synID(pos[0] + 1, pos[1] + 1, 0), 'name')
" it's not a comment or string, end search
if synIDName !~? 'comment\|string'
break
endif
endif
endwhile
let prev_context = phpcomplete#GetCurrentInstruction(last_pos[0] + 1, last_pos[1], b:phpbegin)
if prev_context == ''
" cannot get previous context give up
return
endif
let function_name = matchstr(prev_context, '^'.function_invocation_pattern.'\ze')
let function_name = matchstr(function_name, '^\zs.\+\ze\s*($') " strip the trailing (

View File

@@ -229,7 +229,6 @@ HTMLS = \
starting.html \
syntax.html \
tabpage.html \
tags.html \
tagsrch.html \
term.html \
tips.html \

View File

@@ -1,4 +1,4 @@
*diff.txt* For Vim version 7.4. Last change: 2014 May 20
*diff.txt* For Vim version 7.4. Last change: 2014 Oct 31
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -266,13 +266,17 @@ that the buffers will be equal within the specified range.
See below for [range].
*do*
do Same as ":diffget" without argument or range. The "o" stands
for "obtain" ("dg" can't be used, it could be the start of
"dgg"!). Note: this doesn't work in Visual mode.
[count]do Same as ":diffget" without range. The "o" stands for "obtain"
("dg" can't be used, it could be the start of "dgg"!). Note:
this doesn't work in Visual mode.
If you give a [count], it is used as the [bufspec] argument
for ":diffget".
*dp*
dp Same as ":diffput" without argument or range.
Note: this doesn't work in Visual mode.
[count]dp Same as ":diffput" without range. Note: this doesn't work in
Visual mode.
If you give a [count], it is used as the [bufspec] argument
for ":diffput".
When no [range] is given, the diff at the cursor position or just above it is

View File

@@ -1,4 +1,4 @@
*editing.txt* For Vim version 7.4. Last change: 2014 Sep 19
*editing.txt* For Vim version 7.4. Last change: 2015 Jan 04
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -611,7 +611,7 @@ list of the current window.
:[count]arga[dd] {name} .. *:arga* *:argadd* *E479*
:[count]arga[dd]
Add the {name}s to the argument list. When {name} is
omitted at the current buffer name to the argument
omitted add the current buffer name to the argument
list.
If [count] is omitted, the {name}s are added just
after the current entry in the argument list.
@@ -622,7 +622,8 @@ list of the current window.
:argadd x a b x c
:0argadd x x a b c
:1argadd x a x b c
:99argadd x a b c x
:$argadd x a b c x
:+2argadd y a b c x y
There is no check for duplicates, it is possible to
add a file to the argument list twice.
The currently edited file is not changed.
@@ -644,11 +645,19 @@ list of the current window.
< {not in Vi} {not available when compiled without the
|+listcmds| feature}
:{range}argd[elete] Delete the {range} files from the argument list.
:[range]argd[elete] Delete the {range} files from the argument list.
Example: >
:10,$argdel
< Deletes arguments 10 and further, keeping 1-9. >
:$argd
< Deletes just the last one. >
:argd
:.argd
< Deletes the current argument. >
:%argd
< Removes all the files from the arglist.
When the last number in the range is too high, up to
the last argument is deleted. Example: >
:10,1000argdel
< Deletes arguments 10 and further, keeping 1-9.
the last argument is deleted.
{not in Vi} {not available when compiled without the
|+listcmds| feature}
@@ -823,8 +832,9 @@ current window. The two windows then share this list, until one of them uses
USING THE ARGUMENT LIST
*:argdo*
:argdo[!] {cmd} Execute {cmd} for each file in the argument list.
It works like doing this: >
:[range]argdo[!] {cmd} Execute {cmd} for each file in the argument list or
if [range] is specified only for arguments in that
range. It works like doing this: >
:rewind
:{cmd}
:next
@@ -1080,9 +1090,12 @@ The names can be in upper- or lowercase.
the last file in the argument list has not been
edited. See |:confirm| and 'confirm'. {not in Vi}
:q[uit]! Quit without writing, also when visible buffers have
changes. Does not exit when there are changed hidden
buffers. Use ":qall!" to exit always.
:q[uit]! Quit without writing, also when currently visible
buffers have changes. Does not exit when this is the
last window and there is a changed hidden buffer.
In this case, the first changed hidden buffer becomes
the current buffer.
Use ":qall!" to exit always.
:cq[uit] Quit always, without writing, and return an error
code. See |:cq|. Used for Manx's QuickFix mode (see
@@ -1379,7 +1392,7 @@ reveal it to others. The 'viminfo' file is not encrypted.
You could do this to edit very secret text: >
:set noundofile viminfo=
:noswapfile edit secrets.txt
Keep in mind that without a swap file you risk loosing your work in a crash.
Keep in mind that without a swap file you risk losing your work in a crash.
WARNING: If you make a typo when entering the key and then write the file and
exit, the text will be lost!
@@ -1415,13 +1428,11 @@ Do this before writing the file. When reading an encrypted file it will be
set automatically to the method used when that file was written. You can
change 'cryptmethod' before writing that file to change the method.
To set the default method, used for new files, use one of these in your
|vimrc| file: >
set cm=zip
To set the default method, used for new files, use this in your |vimrc|
file: >
set cm=blowfish2
Use the first one if you need to be compatible with Vim 7.2 and older. Using
"blowfish2" is highly recommended if you can use a Vim version that supports
it.
Using "blowfish2" is highly recommended. Only use another method if you
must use an older Vim version that does not support it.
The message given for reading and writing a file will show "[crypted]" when
using zip, "[blowfish]" when using blowfish, etc.

View File

@@ -1,4 +1,4 @@
*eval.txt* For Vim version 7.4. Last change: 2014 Sep 27
*eval.txt* For Vim version 7.4. Last change: 2014 Dec 07
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -956,7 +956,7 @@ Decimal, Hexadecimal (starting with 0x or 0X), or Octal (starting with 0).
Floating point numbers can be written in two forms:
[-+]{N}.{M}
[-+]{N}.{M}e[-+]{exp}
[-+]{N}.{M}[eE][-+]{exp}
{N} and {M} are numbers. Both {N} and {M} must be present and can only
contain digits.
@@ -1457,10 +1457,10 @@ v:foldstart Used for 'foldtext': first line of closed fold.
Read-only in the |sandbox|. |fold-foldtext|
*v:hlsearch* *hlsearch-variable*
v:hlsearch Variable that determines whether search highlighting is on.
Makes sense only if 'hlsearch' is enabled which requires
|+extra_search|. Setting this variable to zero acts the like
|:nohlsearch| command, setting it to one acts like >
v:hlsearch Variable that indicates whether search highlighting is on.
Setting it makes sense only if 'hlsearch' is enabled which
requires |+extra_search|. Setting this variable to zero acts
the like |:nohlsearch| command, setting it to one acts like >
let &hlsearch = &hlsearch
<
*v:insertmode* *insertmode-variable*
@@ -1755,8 +1755,8 @@ count( {list}, {expr} [, {ic} [, {start}]])
Number count how many {expr} are in {list}
cscope_connection( [{num} , {dbpath} [, {prepend}]])
Number checks existence of cscope connection
cursor( {lnum}, {col} [, {coladd}])
Number move cursor to {lnum}, {col}, {coladd}
cursor( {lnum}, {col} [, {off}])
Number move cursor to {lnum}, {col}, {off}
cursor( {list}) Number move cursor to position in {list}
deepcopy( {expr} [, {noref}]) any make a full copy of {expr}
delete( {fname}) Number delete file {fname}
@@ -2041,7 +2041,7 @@ winrestcmd() String returns command to restore window sizes
winrestview( {dict}) none restore view of current window
winsaveview() Dict save view of current window
winwidth( {nr}) Number width of window {nr}
writefile( {list}, {fname} [, {binary}])
writefile( {list}, {fname} [, {flags}])
Number write list of lines to file {fname}
xor( {expr}, {expr}) Number bitwise XOR
@@ -2395,6 +2395,10 @@ col({expr}) The result is a Number, which is the byte index of the column
number of bytes in the cursor line plus one)
'x position of mark x (if the mark is not set, 0 is
returned)
v In Visual mode: the start of the Visual area (the
cursor is the end). When not in Visual mode
returns the cursor position. Differs from |'<| in
that it's updated right away.
Additionally {expr} can be [lnum, col]: a |List| with the line
and column number. Most useful when the column is "$", to get
the last column of a specific line. When "lnum" or "col" is
@@ -2623,6 +2627,7 @@ cursor({list})
If {col} is zero, the cursor will stay in the current column.
If {curswant} is given it is used to set the preferred column
for vertical movement. Otherwise {col} is used.
When 'virtualedit' is used {off} specifies the offset in
screen columns from the start of the character. E.g., a
position within a <Tab> or after the last character.
@@ -3304,6 +3309,17 @@ getchar([expr]) *getchar()*
: endif
: endwhile
:endfunction
<
You may also receive syntetic characters, such as
|<CursorHold>|. Often you will want to ignore this and get
another character: >
:function GetKey()
: let c = getchar()
: while c == "\<CursorHold>"
: let c = getchar()
: endwhile
: return c
:endfunction
getcharmod() *getcharmod()*
The result is a Number which is the state of the modifiers for
@@ -3514,7 +3530,7 @@ getpos({expr}) Get the position for {expr}. For possible values of {expr}
This can be used to save and restore the position of a mark: >
let save_a_mark = getpos("'a")
...
call setpos(''a', save_a_mark
call setpos("'a", save_a_mark)
< Also see |getcurpos()| and |setpos()|.
@@ -4851,7 +4867,7 @@ readfile({fname} [, {binary} [, {max}]])
separated with CR will result in a single long line (unless a
NL appears somewhere).
All NUL characters are replaced with a NL character.
When {binary} is equal to "b" binary mode is used:
When {binary/append} contains "b" binary mode is used:
- When the last line ends in a NL an extra empty list item is
added.
- No CR characters are removed.
@@ -6406,6 +6422,10 @@ virtcol({expr}) *virtcol()*
plus one)
'x position of mark x (if the mark is not set, 0 is
returned)
v In Visual mode: the start of the Visual area (the
cursor is the end). When not in Visual mode
returns the cursor position. Differs from |'<| in
that it's updated right away.
Note that only marks in the current file can be used.
Examples: >
virtcol(".") with text "foo^Lbar", with cursor on the "^L", returns 5
@@ -6555,14 +6575,20 @@ winwidth({nr}) *winwidth()*
:endif
<
*writefile()*
writefile({list}, {fname} [, {binary}])
writefile({list}, {fname} [, {flags}])
Write |List| {list} to file {fname}. Each list item is
separated with a NL. Each list item must be a String or
Number.
When {binary} is equal to "b" binary mode is used: There will
When {flags} contains "b" then binary mode is used: There will
not be a NL after the last list item. An empty item at the
end does cause the last line in the file to end in a NL.
All NL characters are replaced with a NUL character.
When {flags} contains "a" then append mode is used, lines are
append to the file: >
:call writefile(["foo"], "event.log", "a")
:call writefile(["bar"], "event.log", "a")
>
< All NL characters are replaced with a NUL character.
Inserting CR characters needs to be done before passing {list}
to writefile().
An existing file is overwritten, if possible.
@@ -7345,7 +7371,7 @@ This does NOT work: >
:unlet v
< *E741*
If you try to change a locked variable you get an
error message: "E741: Value of {name} is locked"
error message: "E741: Value is locked: {name}"
[depth] is relevant when locking a |List| or
|Dictionary|. It specifies how deep the locking goes:

View File

@@ -222,7 +222,7 @@ o Keyboard
Note:
<09> stands for Farsi PSP (break without space)
<09> stands for Farsi PCN (for HAMZE attribute )
<09> stands for Farsi PCN (for HAMZE attribute)
Restrictions
------------

View File

@@ -1,4 +1,4 @@
*gui_w32.txt* For Vim version 7.4. Last change: 2012 Aug 04
*gui_w32.txt* For Vim version 7.4. Last change: 2014 Dec 20
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -452,9 +452,10 @@ detailed elsewhere: see |'mouse'|, |win32-hidden-menus|.
You can drag and drop one or more files into the Vim window, where they will
be opened as normal. See |drag-n-drop|.
*:simalt* *:si*
*:simalt* *:sim*
:sim[alt] {key} simulate pressing {key} while holding Alt pressed.
{not in Vi} {only for Win32 versions}
Note: ":si" means ":s" with the "i" flag.
Normally, Vim takes control of all Alt-<Key> combinations, to increase the
number of possible mappings. This clashes with the standard use of Alt as the

View File

@@ -197,7 +197,7 @@ files in it.
--remote-silent "+call cursor(10, 27)"
- Places the cursor on line 10 column 27
In Vim >
:h --remote-silent for mor details
:h --remote-silent for more details
[.Net remarks provided by Dave Fishburn and Brian Sturk]

View File

@@ -1,4 +1,4 @@
*indent.txt* For Vim version 7.4. Last change: 2014 Apr 23
*indent.txt* For Vim version 7.4. Last change: 2014 Dec 06
VIM REFERENCE MANUAL by Bram Moolenaar

View File

@@ -1,4 +1,4 @@
*index.txt* For Vim version 7.4. Last change: 2014 Sep 19
*index.txt* For Vim version 7.4. Last change: 2015 Jan 07
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1465,7 +1465,7 @@ tag command action ~
buffer list
|:sbrewind| :sbr[ewind] split window and go to first file in the
buffer list
|:scriptnames| :scrip[tnames] list names of all sourced Vim scripts
|:scriptnames| :scr[iptnames] list names of all sourced Vim scripts
|:scriptencoding| :scripte[ncoding] encoding used in sourced Vim script
|:scscope| :scs[cope] split window and execute cscope command
|:set| :se[t] show or set options

View File

@@ -1,4 +1,4 @@
*intro.txt* For Vim version 7.4. Last change: 2014 May 24
*intro.txt* For Vim version 7.4. Last change: 2015 Jan 20
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -135,7 +135,7 @@ http://www.vim.org/maillist.php
Bug reports: *bugs* *bug-reports* *bugreport.vim*
Send bug reports to: Vim Developers <vim_dev@vim.org>
Send bug reports to: Vim Developers <vim-dev@vim.org>
This is a maillist, you need to become a member first and many people will see
the message. If you don't want that, e.g. because it is a security issue,
send it to <bugs@vim.org>, this only goes to the Vim maintainer (that's Bram).

View File

@@ -1,4 +1,4 @@
*map.txt* For Vim version 7.4. Last change: 2014 Oct 03
*map.txt* For Vim version 7.4. Last change: 2014 Dec 08
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1358,6 +1358,19 @@ Possible attributes are:
Note that -range=N and -count=N are mutually exclusive - only one should be
specified.
*E889* *:command-addr*
It is possible that the special characters in the range like ., $ or % which
by default correspond to the current line, last line and the whole buffer,
relate to arguments, (loaded) buffers, windows or tab pages.
Possible values are:
-addr=lines Range of lines (this is the default)
-addr=arguments Range for arguments
-addr=buffers Range for buffers (also not loaded buffers)
-addr=loaded_buffers Range for loaded buffers
-addr=windows Range for windows
-addr=tabs Range for tab pages
Special cases *:command-bang* *:command-bar*
*:command-register* *:command-buffer*
There are some special cases as well:

View File

@@ -1,4 +1,4 @@
*options.txt* For Vim version 7.4. Last change: 2014 Sep 23
*options.txt* For Vim version 7.4. Last change: 2014 Dec 17
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -730,8 +730,6 @@ A jump table for the options with a short description can be found at |Q_op|.
open a file, switch buffers, delete a buffer or open/close a window.
It will change to the directory containing the file which was opened
or selected.
This option is provided for backward compatibility with the Vim
released with Sun ONE Studio 4 Enterprise Edition.
Note: When this option is on some plugins may not work.
*'arabic'* *'arab'* *'noarabic'* *'noarab'*
@@ -2221,7 +2219,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'cryptmethod'* *'cm'*
'cryptmethod' string (default "zip")
'cryptmethod' 'cm' string (default "zip")
global or local to buffer |global-local|
{not in Vi}
Method used for encryption when the buffer is written to a file:
@@ -4534,6 +4532,8 @@ A jump table for the options with a short description can be found at |Q_op|.
be able to execute Normal mode commands.
This is the opposite of the 'keymap' option, where characters are
mapped in Insert mode.
Also consider setting 'langnoremap' to avoid 'langmap' applies to
characters resulting from a mapping.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
@@ -4589,6 +4589,18 @@ A jump table for the options with a short description can be found at |Q_op|.
:source $VIMRUNTIME/menu.vim
< Warning: This deletes all menus that you defined yourself!
*'langnoremap'* *'lnr'*
'langnoremap' 'lnr' boolean (default off)
global
{not in Vi}
{only available when compiled with the |+langmap|
feature}
When on, setting 'langmap' does not apply to characters resulting from
a mapping. This basically means, if you noticed that setting
'langmap' disables some of your mappings, try setting this option.
This option defaults to off for backwards compatibility. Set it on if
that works for you to avoid mappings to break.
*'laststatus'* *'ls'*
'laststatus' 'ls' number (default 1)
global
@@ -5626,6 +5638,10 @@ A jump table for the options with a short description can be found at |Q_op|.
Note that when using the NFA engine and the pattern contains something
that is not supported the pattern will not match. This is only useful
for debugging the regexp engine.
Using automatic selection enables Vim to switch the engine, if the
default engine becomes too costly. E.g., when the NFA engine uses too
many states. This should prevent Vim from hanging on a combination of
a complex pattern with long text.
*'relativenumber'* *'rnu'* *'norelativenumber'* *'nornu'*
'relativenumber' 'rnu' boolean (default off)
@@ -7744,6 +7760,9 @@ A jump table for the options with a short description can be found at |Q_op|.
current buffer: >
setlocal ul=-1
< This helps when you run out of memory for a single change.
The local value is set to -123456 when the global value is to be used.
Also see |clear-undo|.
*'undoreload'* *'ur'*

File diff suppressed because it is too large Load Diff

View File

@@ -693,7 +693,7 @@ It is possible to achieve a poor man's version of duplex printing using the PS
utility psselect. This utility has options -e and -o for printing just the
even or odd pages of a PS file respectively.
First generate a PS file with the 'hardcopy' command, then generate a new
First generate a PS file with the 'hardcopy' command, then generate new
files with all the odd and even numbered pages with: >
psselect -o test.ps odd.ps

View File

@@ -1,4 +1,4 @@
*quickref.txt* For Vim version 7.4. Last change: 2014 Aug 06
*quickref.txt* For Vim version 7.4. Last change: 2014 Nov 19
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -764,6 +764,7 @@ Short explanation of each option: *option-list*
'keywordprg' 'kp' program to use for the "K" command
'langmap' 'lmap' alphabetic characters for other language mode
'langmenu' 'lm' language to be used for the menus
'langnoremap' 'lnr' do not apply 'langmap' to mapped characters
'laststatus' 'ls' tells when last window has status lines
'lazyredraw' 'lz' don't redraw while executing macros
'linebreak' 'lbr' wrap long lines at a blank
@@ -1313,11 +1314,16 @@ Context-sensitive completion on the command-line:
|CTRL-W_R| CTRL-W R rotate windows upwards
|CTRL-W_x| CTRL-W x exchange current window with next one
|CTRL-W_=| CTRL-W = make all windows equal height
|CTRL-W_=| CTRL-W = make all windows equal height & width
|CTRL-W_-| CTRL-W - decrease current window height
|CTRL-W_+| CTRL-W + increase current window height
|CTRL-W__| CTRL-W _ set current window height (default:
very high)
|CTRL-W_<| CTRL-W < decrease current window width
|CTRL-W_>| CTRL-W > increase current window width
|CTRL-W_bar| CTRL-W | set current window width (default:
widest possible)
------------------------------------------------------------------------------
*Q_bu* Buffer list commands

View File

@@ -178,14 +178,14 @@ Hurrah for VIM!! It is "at your fingertips" like vi, and has the extensions
that vi sorely needs: highlighting for executing commands on blocks, an easily
navigable and digestible help screen, and more. (Paul Pax)
The reason WHY I don't have this amazingly useful macro any more, is that I
The reason WHY I don't have this amazingly useful macro anymore, is that I
now use VIM - and this is built in!! (Stephen Riehm, Germany)
I am a user of VIM and I love it. I use it to do all my programming, C,
C++, HTML what ever. (Tim Allwine)
I discovered VIM after years of struggling with the original vi, and I just
can't live without it any more. (Emmanuel Mogenet, USA)
can't live without it anymore. (Emmanuel Mogenet, USA)
Emacs has not a bit of chance to survive so long as VIM is around. Besides,
it also has the most detailed software documentation I have ever seen---much

View File

@@ -1,4 +1,4 @@
*repeat.txt* For Vim version 7.4. Last change: 2014 Mar 25
*repeat.txt* For Vim version 7.4. Last change: 2015 Jan 07
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -64,6 +64,9 @@ replacement string.
For the definition of a pattern, see |pattern|.
NOTE [cmd] may contain a range; see |collapse| and |edit-paragraph-join| for
examples.
The global commands work by first scanning through the [range] lines and
marking each line where a match occurs (for a multi-line pattern, only the
start of the match matters).
@@ -232,8 +235,8 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
command is ignored.
{not in Vi}
*:scrip* *:scriptnames*
:scrip[tnames] List all sourced script names, in the order they were
*:scr* *:scriptnames*
:scr[iptnames] List all sourced script names, in the order they were
first sourced. The number is used for the script ID
|<SID>|.
{not in Vi} {not available when compiled without the

View File

@@ -1,4 +1,4 @@
*syntax.txt* For Vim version 7.4. Last change: 2014 Sep 27
*syntax.txt* For Vim version 7.4. Last change: 2015 Jan 07
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1128,6 +1128,14 @@ to standard by placing this in your vimrc file: >
:let enforce_freedesktop_standard = 1
DIFF *diff.vim*
The diff highlighting normally finds translated headers. This can be slow if
there are very long lines in the file. To disable translations: >
:let diff_translations = 0
DIRCOLORS *dircolors.vim* *ft-dircolors-syntax*
The dircolors utility highlighting definition has one option. It exists to
@@ -5065,6 +5073,7 @@ This will set the "w:current_syntax" variable to "foo". The value of
restoring "b:current_syntax", since the syntax files do set
"b:current_syntax". The value set by the syntax file is assigned to
"w:current_syntax".
Note: This resets the 'spell', 'spellcapcheck' and 'spellfile' options.
Once a window has its own syntax, syntax commands executed from other windows
on the same buffer (including :syntax clear) have no effect. Conversely,

View File

@@ -1,4 +1,4 @@
*tabpage.txt* For Vim version 7.4. Last change: 2012 Aug 08
*tabpage.txt* For Vim version 7.4. Last change: 2015 Jan 04
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -61,16 +61,25 @@ In the GUI tab pages line you can use the right mouse button to open menu.
:[count]tabe[dit] *:tabe* *:tabedit* *:tabnew*
:[count]tabnew
Open a new tab page with an empty window, after the current
tab page. For [count] see |:tab| below.
tab page. If [count] is given the new tab page appears after
the tab page [count] otherwise the new tab page will appear
after the current one. >
:tabnew " opens tabpage after the current one
:.tabnew " as above
:+tabnew " opens tabpage after the next tab page
" note: it is one further than :tabnew
:-tabnew " opens tabpage before the current one
:0tabnew " opens tabpage before the first one
:$tabnew " opens tabpage after the last one
:[count]tabe[dit] [++opt] [+cmd] {file}
:[count]tabnew [++opt] [+cmd] {file}
Open a new tab page and edit {file}, like with |:edit|.
For [count] see |:tab| below.
For [count] see |:tabnew| above.
:[count]tabf[ind] [++opt] [+cmd] {file} *:tabf* *:tabfind*
Open a new tab page and edit {file} in 'path', like with
|:find|. For [count] see |:tab| below.
|:find|. For [count] see |:tabnew| above.
{not available when the |+file_in_path| feature was disabled
at compile time}
@@ -110,12 +119,18 @@ something else.
- When 'hidden' is not set, [!] is not used, a buffer has
changes, and there is no other window on this buffer.
Changes to the buffer are not written and won't get lost, so
this is a "safe" command.
this is a "safe" command. >
:tabclose " close the current tab page
:{count}tabc[lose][!]
:tabc[lose][!] {count}
Close tab page {count}. Fails in the same way as `:tabclose`
above.
above. >
:-tabclose " close the previous tab page
:+tabclose " close the next tab page
:1tabclose " close the first tab page
:$tabclose " close the last tab page
<
*:tabo* *:tabonly*
:tabo[nly][!] Close all other tab pages.
When the 'hidden' option is set, all buffers in closed windows
@@ -124,7 +139,17 @@ something else.
modified buffers are written. Otherwise, windows that have
buffers that are modified are not removed, unless the [!] is
given, then they become hidden. But modified buffers are
never abandoned, so changes cannot get lost.
never abandoned, so changes cannot get lost. >
:tabonly " close all tab pages except the current
:{count}tabo[nly][!]
Close all tab pages except the {count}th one. >
:.tabonly " one
:-tabonly " close all tab pages except the previous
" one
:+tabonly " close all tab pages except the next one
:1tabonly " close all tab pages except the first one
:$tabonly " close all tab pages except the last one
SWITCHING TO ANOTHER TAB PAGE:
@@ -176,7 +201,15 @@ REORDERING TAB PAGES:
:[N]tabm[ove]
Move the current tab page to after tab page N. Use zero to
make the current tab page the first one. Without N the tab
page is made the last one.
page is made the last one. >
:-tabmove " move the tab page to the left
:tabmove " move the tab page to the right
:.tabmove " as above
:+tabmove " as above
:0tabmove " move the tab page to the beginning of the tab
" list
:$tabmove " move the tab page to the end of the tab list
<
:tabm[ove] +[N]
:tabm[ove] -[N]
@@ -191,8 +224,10 @@ clarification what +N means in this context see |[range]|.
LOOPING OVER TAB PAGES:
*:tabd* *:tabdo*
:tabd[o] {cmd} Execute {cmd} in each tab page.
It works like doing this: >
:[range]tabd[o] {cmd}
Execute {cmd} in each tab page or if [range] is given only in
tab pages which tab page number is in the [range]. It works
like doing this: >
:tabfirst
:{cmd}
:tabnext
@@ -238,8 +273,8 @@ window on the same buffer and then edit another buffer. Thus ":tabnew"
triggers:
WinLeave leave current window
TabLeave leave current tab page
TabEnter enter new tab page
WinEnter enter window in new tab page
TabEnter enter new tab page
BufLeave leave current buffer
BufEnter enter new empty buffer

View File

@@ -392,6 +392,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
'kp' options.txt /*'kp'*
'langmap' options.txt /*'langmap'*
'langmenu' options.txt /*'langmenu'*
'langnoremap' options.txt /*'langnoremap'*
'laststatus' options.txt /*'laststatus'*
'lazyredraw' options.txt /*'lazyredraw'*
'lbr' options.txt /*'lbr'*
@@ -405,6 +406,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
'listchars' options.txt /*'listchars'*
'lm' options.txt /*'lm'*
'lmap' options.txt /*'lmap'*
'lnr' options.txt /*'lnr'*
'loadplugins' options.txt /*'loadplugins'*
'lpl' options.txt /*'lpl'*
'ls' options.txt /*'ls'*
@@ -1396,6 +1398,8 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
.dic spell.txt /*.dic*
.exrc starting.txt /*.exrc*
.gvimrc gui.txt /*.gvimrc*
.netrwbook pi_netrw.txt /*.netrwbook*
.netrwhist pi_netrw.txt /*.netrwhist*
.vimrc starting.txt /*.vimrc*
/ pattern.txt /*\/*
/$ pattern.txt /*\/$*
@@ -2055,6 +2059,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
:comc map.txt /*:comc*
:comclear map.txt /*:comclear*
:command map.txt /*:command*
:command-addr map.txt /*:command-addr*
:command-bang map.txt /*:command-bang*
:command-bar map.txt /*:command-bar*
:command-buffer map.txt /*:command-buffer*
@@ -2723,7 +2728,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
:sbr windows.txt /*:sbr*
:sbrewind windows.txt /*:sbrewind*
:sbuffer windows.txt /*:sbuffer*
:scrip repeat.txt /*:scrip*
:scr repeat.txt /*:scr*
:scripte repeat.txt /*:scripte*
:scriptencoding repeat.txt /*:scriptencoding*
:scriptnames repeat.txt /*:scriptnames*
@@ -2758,7 +2763,6 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
:sfirst windows.txt /*:sfirst*
:sh various.txt /*:sh*
:shell various.txt /*:shell*
:si gui_w32.txt /*:si*
:sig sign.txt /*:sig*
:sign sign.txt /*:sign*
:sign-define sign.txt /*:sign-define*
@@ -2771,6 +2775,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
:sign-unplace sign.txt /*:sign-unplace*
:sil various.txt /*:sil*
:silent various.txt /*:silent*
:sim gui_w32.txt /*:sim*
:simalt gui_w32.txt /*:simalt*
:sl various.txt /*:sl*
:sla windows.txt /*:sla*
@@ -4333,6 +4338,7 @@ E885 sign.txt /*E885*
E886 starting.txt /*E886*
E887 if_pyth.txt /*E887*
E888 pattern.txt /*E888*
E889 map.txt /*E889*
E89 message.txt /*E89*
E90 message.txt /*E90*
E91 options.txt /*E91*
@@ -5411,6 +5417,7 @@ diff-options diff.txt /*diff-options*
diff-original-file diff.txt /*diff-original-file*
diff-patchexpr diff.txt /*diff-patchexpr*
diff.txt diff.txt /*diff.txt*
diff.vim syntax.txt /*diff.vim*
diff_filler() eval.txt /*diff_filler()*
diff_hlID() eval.txt /*diff_hlID()*
digraph digraph.txt /*digraph*
@@ -5473,6 +5480,7 @@ edit-dialogs editing.txt /*edit-dialogs*
edit-files editing.txt /*edit-files*
edit-intro editing.txt /*edit-intro*
edit-no-break usr_25.txt /*edit-no-break*
edit-paragraph-join usr_25.txt /*edit-paragraph-join*
editing.txt editing.txt /*editing.txt*
efm-%> quickfix.txt /*efm-%>*
efm-entries quickfix.txt /*efm-entries*
@@ -6003,6 +6011,7 @@ g:netrw_errorlvl pi_netrw.txt /*g:netrw_errorlvl*
g:netrw_fastbrowse pi_netrw.txt /*g:netrw_fastbrowse*
g:netrw_fetch_cmd pi_netrw.txt /*g:netrw_fetch_cmd*
g:netrw_ffkeep pi_netrw.txt /*g:netrw_ffkeep*
g:netrw_file_cmd pi_netrw.txt /*g:netrw_file_cmd*
g:netrw_fname_escape pi_netrw.txt /*g:netrw_fname_escape*
g:netrw_ftp pi_netrw.txt /*g:netrw_ftp*
g:netrw_ftp_browse_reject pi_netrw.txt /*g:netrw_ftp_browse_reject*
@@ -6014,6 +6023,7 @@ g:netrw_ftp_timelist_cmd pi_netrw.txt /*g:netrw_ftp_timelist_cmd*
g:netrw_ftpextracmd pi_netrw.txt /*g:netrw_ftpextracmd*
g:netrw_ftpmode pi_netrw.txt /*g:netrw_ftpmode*
g:netrw_glob_escape pi_netrw.txt /*g:netrw_glob_escape*
g:netrw_gx pi_netrw.txt /*g:netrw_gx*
g:netrw_hide pi_netrw.txt /*g:netrw_hide*
g:netrw_home pi_netrw.txt /*g:netrw_home*
g:netrw_http_cmd pi_netrw.txt /*g:netrw_http_cmd*
@@ -6021,10 +6031,13 @@ g:netrw_http_put_cmd pi_netrw.txt /*g:netrw_http_put_cmd*
g:netrw_http_xcmd pi_netrw.txt /*g:netrw_http_xcmd*
g:netrw_ignorenetrc pi_netrw.txt /*g:netrw_ignorenetrc*
g:netrw_keepdir pi_netrw.txt /*g:netrw_keepdir*
g:netrw_keepj pi_netrw.txt /*g:netrw_keepj*
g:netrw_list_cmd pi_netrw.txt /*g:netrw_list_cmd*
g:netrw_list_cmd_options pi_netrw.txt /*g:netrw_list_cmd_options*
g:netrw_list_hide pi_netrw.txt /*g:netrw_list_hide*
g:netrw_liststyle pi_netrw.txt /*g:netrw_liststyle*
g:netrw_localcopycmd pi_netrw.txt /*g:netrw_localcopycmd*
g:netrw_localcopydircmd pi_netrw.txt /*g:netrw_localcopydircmd*
g:netrw_localmkdir pi_netrw.txt /*g:netrw_localmkdir*
g:netrw_localmovecmd pi_netrw.txt /*g:netrw_localmovecmd*
g:netrw_localrmdir pi_netrw.txt /*g:netrw_localrmdir*
@@ -6045,6 +6058,7 @@ g:netrw_rsync_cmd pi_netrw.txt /*g:netrw_rsync_cmd*
g:netrw_scp_cmd pi_netrw.txt /*g:netrw_scp_cmd*
g:netrw_scpport pi_netrw.txt /*g:netrw_scpport*
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_sort_by pi_netrw.txt /*g:netrw_sort_by*
@@ -6993,6 +7007,8 @@ netrw-:Hexplore pi_netrw.txt /*netrw-:Hexplore*
netrw-:Lexplore pi_netrw.txt /*netrw-:Lexplore*
netrw-:MF pi_netrw.txt /*netrw-:MF*
netrw-:MT pi_netrw.txt /*netrw-:MT*
netrw-:NetrwC pi_netrw.txt /*netrw-:NetrwC*
netrw-:NetrwMB pi_netrw.txt /*netrw-:NetrwMB*
netrw-:Rexplore pi_netrw.txt /*netrw-:Rexplore*
netrw-:Sexplore pi_netrw.txt /*netrw-:Sexplore*
netrw-:Texplore pi_netrw.txt /*netrw-:Texplore*
@@ -7001,6 +7017,7 @@ netrw-C pi_netrw.txt /*netrw-C*
netrw-D pi_netrw.txt /*netrw-D*
netrw-O pi_netrw.txt /*netrw-O*
netrw-P pi_netrw.txt /*netrw-P*
netrw-P18 pi_netrw.txt /*netrw-P18*
netrw-R pi_netrw.txt /*netrw-R*
netrw-S pi_netrw.txt /*netrw-S*
netrw-Tb pi_netrw.txt /*netrw-Tb*
@@ -7030,6 +7047,7 @@ netrw-createfile pi_netrw.txt /*netrw-createfile*
netrw-credits pi_netrw.txt /*netrw-credits*
netrw-ctrl-h pi_netrw.txt /*netrw-ctrl-h*
netrw-ctrl-l pi_netrw.txt /*netrw-ctrl-l*
netrw-ctrl-r pi_netrw.txt /*netrw-ctrl-r*
netrw-ctrl_l pi_netrw.txt /*netrw-ctrl_l*
netrw-curdir pi_netrw.txt /*netrw-curdir*
netrw-d pi_netrw.txt /*netrw-d*
@@ -7056,6 +7074,7 @@ netrw-gf pi_netrw.txt /*netrw-gf*
netrw-gh pi_netrw.txt /*netrw-gh*
netrw-gitignore pi_netrw.txt /*netrw-gitignore*
netrw-gp pi_netrw.txt /*netrw-gp*
netrw-grep pi_netrw.txt /*netrw-grep*
netrw-gx pi_netrw.txt /*netrw-gx*
netrw-handler pi_netrw.txt /*netrw-handler*
netrw-help pi_netrw.txt /*netrw-help*
@@ -7077,6 +7096,7 @@ netrw-login pi_netrw.txt /*netrw-login*
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-mb pi_netrw.txt /*netrw-mb*
netrw-mc pi_netrw.txt /*netrw-mc*
netrw-md pi_netrw.txt /*netrw-md*
@@ -7094,6 +7114,7 @@ netrw-mr pi_netrw.txt /*netrw-mr*
netrw-ms pi_netrw.txt /*netrw-ms*
netrw-mt pi_netrw.txt /*netrw-mt*
netrw-mu pi_netrw.txt /*netrw-mu*
netrw-mv pi_netrw.txt /*netrw-mv*
netrw-mx pi_netrw.txt /*netrw-mx*
netrw-mz pi_netrw.txt /*netrw-mz*
netrw-netrc pi_netrw.txt /*netrw-netrc*
@@ -7113,6 +7134,7 @@ netrw-p13 pi_netrw.txt /*netrw-p13*
netrw-p14 pi_netrw.txt /*netrw-p14*
netrw-p15 pi_netrw.txt /*netrw-p15*
netrw-p16 pi_netrw.txt /*netrw-p16*
netrw-p17 pi_netrw.txt /*netrw-p17*
netrw-p2 pi_netrw.txt /*netrw-p2*
netrw-p3 pi_netrw.txt /*netrw-p3*
netrw-p4 pi_netrw.txt /*netrw-p4*

View File

@@ -410,7 +410,7 @@ adjust the various t_ codes. This avoids the problem that the xterm can
produce different codes, depending on the mode it is in (8-bit, VT102,
VT220, etc.). The result is that codes like <xF1> are no longer needed.
Note: This is only done on startup. If the xterm options are changed after
Vim has started, the escape sequences may not be recognized any more.
Vim has started, the escape sequences may not be recognized anymore.
*xterm-resize*
Window resizing with xterm only works if the allowWindowOps resource is

View File

@@ -1,4 +1,4 @@
*todo.txt* For Vim version 7.4. Last change: 2014 Oct 15
*todo.txt* For Vim version 7.4. Last change: 2015 Jan 23
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -37,6 +37,9 @@ not be repeated below, unless there is extra information.
Regexp problems:
- The NFA engine does not implement the time limit passed to
nfa_regexec_multi()
- Using win_linetabsize() can still be slow. Cache the result, store col and
vcol. Reset them when moving to another line.
- Very slow with a long line and Ruby highlighting. (John Whitley, 2014 Dec 4)
- Bug with pattern: '\vblock (\d+)\.\n.*\d+%(\1)@<!\.$'
(Lech Lorens, 2014 Feb 3)
- Issue 164: freeze on regexp search.
@@ -44,6 +47,7 @@ Regexp problems:
2013 Dec 11)
- Using \@> and \?. (Brett Stahlman, 2013 Dec 21) Remark from Marcin Szamotulski
Remark from Brett 2014 Jan 6 and 7.
- Difference in NFA and old engine. (Brett Stahlman, 2014 Nov 5)
- Bug when using \>. (Ramel, 2014 Feb 2) (Aaron Bohannon, 2014 Feb 13)
- NFA regexp doesn't handle \%<v correctly. (Ingo Karkat, 2014 May 12)
- Does not work with NFA regexp engine:
@@ -52,6 +56,13 @@ Regexp problems:
- Using back reference before the capturing group sometimes works with the old
engine, can we do this with the new engine? E.g. with
"/\%(<\1>\)\@<=.*\%(<\/\(\w\+\)>\)\@=" matching text inside HTML tags.
- Diff highlighting can be very slow. (Issue 309)
- Using "{1,1000}" is much slower than it was with the old engine.
(Dominique Pelle, 2015 Jan 22)
- Using %> for a virtual column has a check based on 'tabsize'. Better would
be to cache the result of win_linetabsize(col), storing both col and vcol,
and use them to decide whether win_linetabsize() needs to be called. Reset
col and vcol when moving to another line.
Still using freed memory after using setloclist(). (lcd, 2014 Jul 23)
More info Jul 24. Not clear why.
@@ -63,100 +74,172 @@ Breaks test_eval. Inefficient, can we only compute y_width when needed?
Problem that a previous silent ":throw" causes a following try/catch not to
work. (ZyX, 2013 Sep 28)
Patch to avoid problems with encoding conversion with diff.vim.
(Yasuhiro Matsumoto, 2014 Sep 1.
Depends on current language, language of file can be different.
Problem using ":try" inside ":execute". (ZyX, 2013 Sep 15)
":cd C:\Windows\System32\drivers\etc*" does not work, even though the
directory exists. (Sergio Gallelli, 2013 Dec 29)
Patch by Marcin Szamotulski to add count to :close (2014 Aug 10, update Aug
14, Aug 30)
Make ":1close" close the first window.
Make ":+1close" close the next window.
Make ":-1close" close the previous window.
Doesn't look right, asked for updates.
The entries added by matchaddpos() are returned by getmatches() but can't be
set with setmatches(). (lcd47, 2014 Jun 29)
Patch to fix that 0x80 in abbreviation isn't handled correctly.
(Christian Brabandt, 2014 Oct 1)
Check for valid yank reg seems wrong. Patch by Zyx, 2014 Oct 12.
":sign-jump" uses first window in buffer instead of current window.
Patch by James McCoy, 2013 Nov 22. Update 2014 Oct 5.
Patch to fix issue 57, on the issue.
Patch for issue 101, maintainer unreachable.
Gvim: when both Tab and CTRL-I are mapped, use CTRL-I not for Tab.
Patch to fix that last_changedtick is not update on saving. (Christian
Brabandt, 2014 Oct 10, second one)
substitute() can be slow with long strings. Patch by Ozaki Kiichi, 2014 Oct
12.
Remove restriction in NSIS installer that the end of the path must be "Vim".
(Tim Lebedkov, 2014 Sep 24) Again Oct 12.
Problem using ":try" inside ":execute". (ZyX, 2013 Sep 15)
Python: ":py raw_input('prompt')" doesn't work. (Manu Hack)
'foldexpr' applies to help. (Paul Marshall, 2014 Sep 24)
Patch to fix issue 203. (Christian Brabandt, 2014 Oct 8)
Patch to fix issue 253. (Christian Brabandt, 2014 Oct 8)
Patch to fix issue 78. (Christian Brabandt, 2014 Oct 8)
Patch to fix leak in map() with error. (Christian Brabandt, 2014 Oct 11)
MS-Windows: When editing a file with a leading space, writing it uses the
wrong name. (Aram, 2014 Nov 7) Vim 7.4.
Value returned by virtcol() changes depending on how lines wrap. This is
inconsistent with the documentation.
On MS-Windows running tests with Mercurial has problems when the input files
are changed. (Ken Takata, Taro Muraoka, 2014 Sep 25)
Better greek spell checking. Issue 299.
Patch to fix slow valgrind highlighting. (Dominique, 2015 Jan 15)
Does maintainer respond?
Patch on issue 212: feedkeys() with dot doesn't work as expected.
Patch to support hex values for setting option value.
(Zyx, 2014 Nov 6)
Patch to fix problems with small screen sizes. (Christian Brabandt, 2015 Jan
8)
":tabdo windo echo 'hi'" causes "* register not to be changed.
(Salman Halim, 2015 Jan 17)
Patch by Christian, 2015 Jan 20. There is another problem, wait a bit.
On MS-Windows running tests with Mercurial has problems when the fileformat of
the input files are changed. (Ken Takata, Taro Muraoka, 2014 Sep 25)
Update Nov 5.
MS-Windows: Crash opening very long file name starting with "\\".
(Christian Brock, 2012 Jun 29)
Patch for this from Marcin Szamotulski, 2014 Dec 28:
8 Make the # register writable, so that it can be restored after jumping
around in windows.
Using CTRL-L while popup menu is visible behaves like CTRL-P, which is wrong.
Patch by Yasuhiro Matsumoto, 2015 Jan 5.
Is this right? Comment from Amadeus Demarzi.
Another patch from Christian, Jan 6.
Comment from Hirohito Higashi, Jan 6.
Cursorline background color not mixed with character highlight.
Patch by Yasuhiro Matsumoto, 2014 Dec 3.
Problem using diff syntax with cp932 encoding. Idea from Yasuhiro Matsumoto,
patch from Ken Takata (2014 Nov 6)
ml_updatechunk() is slow when retrying for another encoding. (John Little,
2014 Sep 11)
Patch to add a different escape sequence for replace mode.
(Omar Sandoval, 2014 Nov 30)
Patch on Issue 166, popup drawing with '$' in 'cpo'.
Calling setreg() with an empty list doesn't work.
Patch by Yasuhiro Matsumoto, 2014 Dec 14.
Extended file attributes lost on write (backupcopy=no). Issue 306.
Window height computed incorrectly when Vim is minimized.
Patch to fix this. (Ingo Karkat, 2014 Dec 19)
Patch to allow values greater than 255 for ctermfg/ctermbg on Windows.
(Yasuhiro Matsumoto, 2014 Dec 5)
Mixup of highlighting when there is a match and SpellBad. (ZyX, 2015 Jan 1)
Problem caused by patch 7.3.638: window->open does not update window
correctly. Issue 91. With patch.
Patch for drag&drop reordering of GUI tab pages reordering.
(Ken Takata, 2013 Nov 22, second one, also by Masamichi Abe)
'ff' is wrong for one-line file without EOL. (Patch on Issue 77)
Patch on Issue 72: 'autochdir' causes problems for :vimgrep.
When 'balloonexpr' returns a list the result has a trailing newline.
Just remove one trailing newline. (lcd, 2014 Oct 17)
Make comments in the test Makefile silent. (Kartik Agaram, 2014 Sep 24)
Patch to add GUI colors to the terminal, when it supports it. (ZyX, 2013 Jan
26, update 2013 Dec 14, another 2014 Nov 22)
Result of systemlist() does not show whether text ended in line break.
(Bjorn Linse, 2014 Nov 27)
When in 'comments' "n:x" follows after three-part comment directly it repeats
any one-character from the previous line. (Kartik Agaram, 2014 Sep 19)
Syntax highlighting slow (hangs) in SASS file. (Niek Bosch, 2013 Aug 21)
Patch to add the EndOfBuffer highlight group, used instead of NonText for "~"
lines. (Marco Hinz, 2014 Nov 2)
Adding "~" to 'cdpath' doesn't work for completion? (Davido, 2013 Aug 19)
Plugins need to make a lot of effort, lots of mappings, to know what happened
before pressing the key that triggers a plugin action. How about keeping the
last N pressed keys, so that they do not need to be mapped?
":q!" should reset modified flag for current buffer, if another buffer is
modified no need to abandon it again.
Patch from Yasuhiro Matsumoto, 2014 Nov 21.
Update from Hirohito Higashi, 2014 Nov 21.
With test, Nov 23.
Wrong scrolling when using incsearch. Patch by Christian Brabandt, 2014 Dec 4.
Is this a good solution?
Can assign to s:type when a function s:type has been defined.
Also the other way around: define a function while a variable with that name
was already defined.
(Yasuhiro Matsumoto, 2014 Nov 3)
Patch to make closed folds line up. (Charles Campbell, 2014 Sep 12)
Remark from Roland Eggner: does it cause crashes? (2014 Dec 12)
Updated patch by Roland Eggner, Dec 16
Updated patch from Charles, Dec 29.
Patch to open folds for 'incsearch'. (Christian Brabandt, 2015 Jan 6)
Patch for building a 32bit Vim with 64bit MingW compiler.
(Michael Soyka, 2014 Oct 15)
Delete old code in os_msdos.c, mch_FullName().
Patch: On MS-Windows shellescape() may have to triple double quotes.
(Ingo Karkat, 2015 Jan 16)
Redo only remembers the last change. Could use "{count}g." to redo an older
change. How does the user know which change? At least have a way to list
them: ":repeats".
Patch for glob(), adding slash to normal files. (Ingo Karkat, 2014 Dec 22)
Using "." to repeat an Ex command puts that command in history. Probably
should not happen. If the command is the result of a mapping it's not put in
history either. (Jacob Niehus, 2014 Nov 2)
Patch from Jacob, Nov 2.
"hi link" does not respect groups with GUI settings only. (Mark Lodato, 2014
Jun 8)
Patch to switch to the BT regexp engine when the NFA engine uses many states.
(Christian Brabandt, 2014 Oct 3)
Bug: Autocompleting ":tag/pat" replaces "/pat" with a match but does not
insert a space. (Micha Mos, 2014 Nov 7)
Patch to add the :bvimgrep command. (Christian Brabandt, 2014 Nov 12)
Update Dec 6.
Patch to add argument to :cquit. (Thinca, 2014 Oct 12)
No error for missing endwhile. (ZyX, 2014 Mar 20)
start_global_changes() plus end_global_changes() causes problem for
clip_unnamed_plus. (Jason Pleau, 2014 Sep 12)
The entries added by matchaddpos() are returned by getmatches() but can't be
set with setmatches(). (lcd47, 2014 Jun 29)
Patch to add :arglocal and :arglists. (Marcin Szamotulski, 2014 Aug 6)
@@ -167,12 +250,16 @@ Spell files use a latin single quote. Unicode also has another single quote:
New OpenOffice spell files support this with ICONV. But they are not
compatible with Vim spell files. The old files can no longer be downloaded.
Patch to make FocusGained and FocusLost work in modern terminals. (Hayaki
Saito, 2013 Apr 24) Has a problem (email 2015 Jan 7).
Update 2015 Jan 10.
Win32: patch to use 64 bit stat() if possible. (Ken Takata, 2014 May 12)
More tests May 14. Update May 29. Update Aug 10.
The garbage collector may use too much stack. Make set_ref_in_item()
iterative instead of recursive. Test program by Marc Weber (2013 Dec 10)
Patch by Ben Fritz, 2014 Jun 22.
Patch by Ben Fritz, 2014 Jun 22. Update 2015 Jan 21.
Related: Vim hangs when freeing a lot of objects. Patch by Yasuhiro
Matsumoto, 2014 Aug 26.
@@ -183,6 +270,8 @@ its height? It's like dragging the status bar above it at the same time.
Can we make ":unlet $VAR" use unsetenv() to delete the env var?
What for systems that don't have unsetenv()?
Patch to add a :domodeline command. (Christian Brabandt, 2014 Oct 21)
This does not give an error: (Andre Sihera, 2014 Mar 21)
vim -u NONE 1 2 3 -c 'bufdo if 1 | echo 1'
This neither: (ZyX)
@@ -260,6 +349,10 @@ Yasuhiro Matsumoto, 2013 May 31.
Or should we add a more general mechanism, like a lambda() function?
Patch by Yasuhiro Matsumoto, 2014 Sep 16.
Patch to fix display of listchars on the cursorline. (Nayuri Aohime, 2013)
Update suggested by Yasuhiro Matsumoto, 2014 Nov 25:
https://gist.github.com/presuku/d3d6b230b9b6dcfc0477
VMS: Select() doesn't work properly, typing ESC may hang Vim. Use sys$qiow
instead. (Samuel Ferencik, 2013 Sep 28)
@@ -273,12 +366,8 @@ Patch to add v:completed_item. (Shougo Matsu, 2013 Nov 29).
Patch to get MSVC version in a nicer way. (Ken Takata, 2014 Jul 24)
Patch to make test 100 work on MS-Windows. (Taro Muraoka, 2013 Dec 12)
Patch to define macros for hardcoded values. (Elias Diem, 2013 Dec 14)
Perl: support for Activestate perl 5.18: Issue 170.
Several syntax file match "^\s*" which may get underlined if that's in the
highlight group. Add a "\zs" after it?
@@ -343,9 +432,6 @@ Patch from Christian Brabandt doesn't fix it completely.
Patch from Christian Brabandt to preserve upper case marks when wiping out a
buffer. (2013 Dec 9)
Patch for drag&drop reordering of GUI tab pages reordering.
(Ken Takata, 2013 Nov 22, second one, also by Masamichi Abe)
GTK: problem with 'L' in 'guioptions' changing the window width.
(Aaron Cornelius, 2012 Feb 6)
@@ -373,9 +459,6 @@ Works OK for echo, just not for ":call" and ":call call()". (Ted, 2011 Mar
Patch by Christian Brabandt, 2013 Mar 23.
Not 100% sure this is the right solution.
Problem caused by patch 7.3.638: window->open does not update window
correctly. Issue 91.
Patch to add {lhs} to :mapclear: clear all maps starting with {lhs}.
(Christian Brabandt, 2013 Dec 9)
@@ -415,6 +498,9 @@ optional. (2013 Jul 12)
Dialog is too big on Linux too. (David Fishburn, 2013 Sep 2)
Patch to check whether a buffer is quickfix or a location list.
(Yasuhiro Matsumoto, 2014 Dec 9)
Patch to allow setting w:quickfix_title via setqflist() and setloclist()
functions. (Christian Brabandt, 2013 May 8, update May 21)
Patch to add getlocstack() / setlocstack(). (Christian Brabandt, 2013 May 14)
@@ -423,9 +509,6 @@ Update by Daniel Hahler, 2014 Jul 4, Aug 14, Oct 14, Oct 15.
Patch to make fold updates much faster. (Christian Brabandt, 2012 Dec)
MS-Windows: Patch to make tests copy files to avoid changing the fileformat of
the files under version control. (Taro Muraoka, 2013 Jul 5)
Issue 54: document behavior of -complete, also expands arg.
- Add regex for 'paragraphs' and 'sections': 'parare' and 'sectre'. Combine
@@ -434,8 +517,6 @@ Patch by Christian Brabandt, 2013 Apr 20, unfinished.
Bug: findfile("any", "file:///tmp;") does not work.
'ff' is wrong for one-line file without EOL. (Issue 77)
Patch to set antialiasing style on Windows. (Ondrej Balaz, 2013 Mar 14)
Needs a different check for CLEARTYPE_QUALITY.
@@ -499,15 +580,10 @@ Patch to improve equivalence classes in regexp patterns.
Patch with suggestions for starting.txt. (Tony Mechelynck, 2012 Oct 24)
But use Gnome instead of GTK?
Patch to make FocusGained and FocusLost work in modern terminals. (Hayaki
Saito, 2013 Apr 24)
Should be possible to enable/disable matchparen per window or buffer.
Add a check for b:no_match_paren in Highlight_matching_Pair() (Marcin
Szamotulski, 2012 Nov 8)
Issue 72: 'autochdir' causes problems for :vimgrep.
Session file creation: 'autochdir' causes trouble. Keep it off until after
loading all files.
@@ -528,6 +604,14 @@ MS-Windows resizing problems:
causes the window to move unnecessarily. (William E. Skeith III, 2012 Jan
12) Patch: 2012 Jan 13 Needs more work (2012 Feb 2)
Patch to use Modern UI 2.0 for the Nsis installer. (Guopeng Wen, 2010 Jul 30)
Latest version: 2011 May 18
8 Windows install with NSIS: make it possible to do a silent install, see
http://nsis.sourceforge.net/Docs/Chapter4.html#4.12
Version from Guopeng Wen that does this (2010 Dec 27)
Alternative: MSI installer: https://github.com/petrkle/vim-msi/
Or the one on Issue 279
'iminsert' global value set when using ":setlocal iminsert"? (Wu, 2012 Jun 23)
Patch to append regexp to tag commands to make it possible to select one out
@@ -635,6 +719,9 @@ Syntax region with 'concealends' and a 'cchar' value, 'conceallevel' set to 2,
only one of the two ends gets the cchar displayed. (Brett Stahlman, 2010 Aug
21, Ben Fritz, 2010 Sep 14)
The :syntax cchar value can only be a single character. It would be useful to
support combining characters. (Charles Campbell)
'cursorline' works on a text line only. Add 'cursorscreenline' for
highlighting the screen line. (Christian Brabandt, 2012 Mar 31)
@@ -759,6 +846,10 @@ Need for CursorHold that retriggers. Use a key that doesn't do anything, or a
function that resets did_cursorhold.
Patch by Christian Brabandt, 2011 May 6.
Add event for when the text scrolls. A bit like CursorMoved. Also a similar
one for insert mode. Use the event in matchparen to update the highlight if
the match scrolls into view.
7 Use "++--", "+++--" for different levels instead of "+---" "+----".
Patch by Christian Brabandt, 2011 Jul 27.
Update by Ben Fritz, with fix for TOhtml. (2011 Jul 30)
@@ -846,9 +937,6 @@ names, shell commands and the like. (Kikuchan, 2010 Oct 14)
Assume the system converts between the actual encoding of the filesystem to
the system encoding (usually utf-8).
Patch to add GUI colors to the terminal, when it supports it. (ZyX, 2013 Jan
26, update 2013 Dec 14)
Problem producing tags file when hebrew.frx is present. It has a BOM.
Results in E670. (Tony Mechelynck, 2010 May 2)
@@ -1507,13 +1595,6 @@ with "gvim -nb:localhost:55555:foo". From nc do: '1:editFile!0 "foo"'. Then
go to Insert mode and add a few lines. Then backspacing every other time
moves the cursor instead of deleting. (Chris Kaiser, 2007 Sep 25)
Patch to use Modern UI 2.0 for the Nsis installer. (Guopeng Wen, 2010 Jul 30)
Latest version: 2011 May 18
8 Windows install with NSIS: make it possible to do a silent install, see
http://nsis.sourceforge.net/Docs/Chapter4.html#4.12
Version from Guopeng Wen that does this (2010 Dec 27)
Alternative: MSI installer: https://github.com/petrkle/vim-msi/
Windows installer should install 32-bit version of right-click handler also on
64-bit systems. (Brian Cunningham, 2011 Dec 28)
@@ -1537,8 +1618,6 @@ Changes for Win32 makefile. (Mike Williams, 2007 Jan 22, Alexei Alexandrov,
Win32: Can't complete shell command names. Why is setting xp_context in
set_one_cmd_context() inside #ifndef BACKSLASH_IN_FILENAME?
Win32: Patch for convert_filterW(). (Taro Muraoka, 2007 Mar 2)
Win32: Patch for cscope external command. (Mike Williams, 2007 Aug 7)
Win32: XPM support only works with path without spaces. Patch by Mathias
@@ -5005,8 +5084,6 @@ Argument list:
Registers:
8 Don't display empty registers with ":display". (Etienne)
8 Make the # register writable, so that it can be restored after jumping
around in windows.
8 Add put command that overwrites existing text. Should also work for
blocks. Useful to move text around in a table. Works like using "R ^R r"
for every line.

View File

@@ -194,7 +194,7 @@ child, you should have the intention to do this for at least one year.
How do you know that the money will be spent right? First of all you have my
personal guarantee as the author of Vim. I trust the people that are working
at the centre, I know them personally. Further more, the centre has been
at the centre, I know them personally. Furthermore, the centre has been
co-sponsored and inspected by World Vision, Save the Children Fund and is now
under the supervision of Pacific Academy Outreach Society. The centre is
visited about once a year to check the progress (at our own cost). I have

View File

@@ -532,7 +532,7 @@ MATCHING ANY SINGLE CHARACTER
The . (dot) character matches any existing character. For example, the
pattern "c.m" matches a string whose first character is a c, whose second
character is anything, and whose the third character is m. Example:
character is anything, and whose third character is m. Example:
We use a computer that became the cummin winter. ~
xxx xxx xxx

View File

@@ -1,4 +1,4 @@
*usr_25.txt* For Vim version 7.4. Last change: 2007 May 11
*usr_25.txt* For Vim version 7.4. Last change: 2014 Oct 29
VIM USER MANUAL - by Bram Moolenaar
@@ -402,7 +402,7 @@ the cursor keys: >
:map <Down> gj
TURNING A PARAGRAPH INTO ONE LINE
TURNING A PARAGRAPH INTO ONE LINE *edit-paragraph-join*
If you want to import text into a program like MS-Word, each paragraph should
be a single line. If your paragraphs are currently separated with empty

View File

@@ -135,7 +135,7 @@ For the first file the cursor will be positioned on line "num".
If "num" is missing, the cursor will be positioned on the last line.
.TP
+/{pat}
For the first file the cursor will be positioned on the
For the first file the cursor will be positioned in the line with the
first occurrence of {pat}.
See ":help search\-pattern" for the available search patterns.
.TP

View File

@@ -1,4 +1,4 @@
*windows.txt* For Vim version 7.4. Last change: 2014 Sep 23
*windows.txt* For Vim version 7.4. Last change: 2014 Dec 05
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -263,28 +263,57 @@ left of the Vim window.
Closing a window
----------------
:q[uit]
:{count}q[uit]
CTRL-W q *CTRL-W_q*
CTRL-W CTRL-Q *CTRL-W_CTRL-Q*
:q[uit] Quit current window. When quitting the last window (not
counting a help window), exit Vim.
Without {count}: Quit the current window. If {count} is
given quit the {count} window.
When quitting the last window (not counting a help window),
exit Vim.
When 'hidden' is set, and there is only one window for the
current buffer, it becomes hidden.
When 'hidden' is not set, and there is only one window for the
current buffer, and the buffer was changed, the command fails.
(Note: CTRL-Q does not work on all terminals)
current buffer, it becomes hidden. When 'hidden' is not set,
and there is only one window for the current buffer, and the
buffer was changed, the command fails.
(Note: CTRL-Q does not work on all terminals).
If [count] is greater than the last window number the last
window will be closed: >
:1quit " quit the first window
:$quit " quit the last window
:9quit " quit the last window
" if there are less than 9 windows opened
:-quit " quit the previews window
:+quit " quit the next window
:+2quit " quit the second next window
<
:q[uit]!
:{count}q[uit]!
Without {count}: Quit the current window. If {count} is
given quit the {count} window.
:q[uit]! Quit current window. If this was the last window for a buffer,
any changes to that buffer are lost. When quitting the last
window (not counting help windows), exit Vim. The contents of
the buffer are lost, even when 'hidden' is set.
If this was the last window for a buffer, any changes to that
buffer are lost. When quitting the last window (not counting
help windows), exit Vim. The contents of the buffer are lost,
even when 'hidden' is set.
:clo[se][!]
:{count}clo[se][!]
CTRL-W c *CTRL-W_c* *:clo* *:close*
:clo[se][!] Close current window. When the 'hidden' option is set, or
when the buffer was changed and the [!] is used, the buffer
becomes hidden (unless there is another window editing it).
Without {count}: Close the current window. If {count} is
given close the {count} window.
When the 'hidden' option is set, or when the buffer was
changed and the [!] is used, the buffer becomes hidden (unless
there is another window editing it).
When there is only one window in the current tab page and
there is another tab page, this closes the current tab page.
|tab-page|.
This command fails when: *E444*
- There is only one window on the screen.
- When 'hidden' is not set, [!] is not used, the buffer has
@@ -298,14 +327,19 @@ CTRL-W CTRL-C *CTRL-W_CTRL-C*
command.
*:hide*
:hid[e] Quit current window, unless it is the last window on the
screen. The buffer becomes hidden (unless there is another
window editing it or 'bufhidden' is "unload" or "delete").
:hid[e]
:{count}hid[e]
Quit the current window, unless it is the last window on the
screen. For {count} see |:quit| command.
The buffer becomes hidden (unless there is another window
editing it or 'bufhidden' is "unload", "delete" or "wipe").
If the window is the last one in the current tab page the tab
page is closed. |tab-page|
The value of 'hidden' is irrelevant for this command.
Changes to the buffer are not written and won't get lost, so
this is a "safe" command.
page is closed. |tab-page|
The value of 'hidden' is irrelevant for this command. Changes
to the buffer are not written and won't get lost, so this is a
"safe" command.
:hid[e] {cmd} Execute {cmd} with 'hidden' is set. The previous value of
'hidden' is restored after {cmd} has been executed.
@@ -314,12 +348,16 @@ CTRL-W CTRL-C *CTRL-W_CTRL-C*
< This will edit "Makefile", and hide the current buffer if it
has any changes.
:on[ly][!]
:{count}on[ly][!]
CTRL-W o *CTRL-W_o* *E445*
CTRL-W CTRL-O *CTRL-W_CTRL-O* *:on* *:only*
:on[ly][!] Make the current window the only one on the screen. All other
windows are closed.
Make the current window the only one on the screen. All other
windows are closed. For {count} see |:quit| command.
When the 'hidden' option is set, all buffers in closed windows
become hidden.
When 'hidden' is not set, and the 'autowrite' option is set,
modified buffers are written. Otherwise, windows that have
buffers that are modified are not removed, unless the [!] is
@@ -660,8 +698,9 @@ can also get to them with the buffer list commands, like ":bnext".
8. Do a command in all buffers or windows *list-repeat*
*:windo*
:windo {cmd} Execute {cmd} in each window.
It works like doing this: >
:[range]windo {cmd} Execute {cmd} in each window or if [range] is given
only in windows for which the window number lies in
the [range]. It works like doing this: >
CTRL-W t
:{cmd}
CTRL-W w
@@ -679,8 +718,10 @@ can also get to them with the buffer list commands, like ":bnext".
Also see |:tabdo|, |:argdo| and |:bufdo|.
*:bufdo*
:bufdo[!] {cmd} Execute {cmd} in each buffer in the buffer list.
It works like doing this: >
:[range]bufdo[!] {cmd} Execute {cmd} in each buffer in the buffer list or if
[range] is given only for buffers for which their
buffer numer is in the [range]. It works like doing
this: >
:bfirst
:{cmd}
:bnext
@@ -992,7 +1033,11 @@ list of buffers. |unlisted-buffer|
Actually, the buffer isn't completely deleted, it is removed
from the buffer list |unlisted-buffer| and option values,
variables and mappings/abbreviations for the buffer are
cleared.
cleared. Examples: >
:.,$-bdelete " delete buffers from the current one to
" last but one
:%bdelete " delete all buffers
<
:bdelete[!] {bufname} *E93* *E94*
Like ":bdelete[!] [N]", but buffer given by name. Note that a
@@ -1016,7 +1061,11 @@ list of buffers. |unlisted-buffer|
Like |:bdelete|, but really delete the buffer. Everything
related to the buffer is lost. All marks in this buffer
become invalid, option settings are lost, etc. Don't use this
unless you know what you are doing.
unless you know what you are doing. Examples: >
:.+,$bwipeout " wipe out all buffers after the current
" one
:%bwipeout " wipe out all buffers
<
:[N]bun[load][!] *:bun* *:bunload* *E515*
:bun[load][!] [N]

View File

@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2014 Oct 09
" Last Change: 2015 Jan 14
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@@ -782,6 +782,9 @@ au BufNewFile,BufRead *.git/config,.gitconfig,.gitmodules setf gitconfig
au BufNewFile,BufRead *.git/modules/*/COMMIT_EDITMSG setf gitcommit
au BufNewFile,BufRead *.git/modules/*/config setf gitconfig
au BufNewFile,BufRead */.config/git/config setf gitconfig
if !empty($XDG_CONFIG_HOME)
au BufNewFile,BufRead $XDG_CONFIG_HOME/git/config setf gitconfig
endif
au BufNewFile,BufRead git-rebase-todo setf gitrebase
au BufNewFile,BufRead .msg.[0-9]*
\ if getline(1) =~ '^From.*# This line is ignored.$' |
@@ -1049,6 +1052,9 @@ au BufNewFile,BufRead *.ldif setf ldif
" Ld loader
au BufNewFile,BufRead *.ld setf ld
" Less
au BufNewFile,BufRead *.less setf less
" Lex
au BufNewFile,BufRead *.lex,*.l,*.lxx,*.l++ setf lex
@@ -1853,7 +1859,7 @@ au BufNewFile,BufRead sgml.catalog* call s:StarSetf('catalog')
" Shell scripts (sh, ksh, bash, bash2, csh); Allow .profile_foo etc.
" Gentoo ebuilds are actually bash scripts
au BufNewFile,BufRead .bashrc*,bashrc,bash.bashrc,.bash_profile*,.bash_logout*,*.bash,*.ebuild call SetFileTypeSH("bash")
au BufNewFile,BufRead .bashrc*,bashrc,bash.bashrc,.bash_profile*,.bash_logout*,.bash_aliases*,*.bash,*.ebuild call SetFileTypeSH("bash")
au BufNewFile,BufRead .kshrc*,*.ksh call SetFileTypeSH("ksh")
au BufNewFile,BufRead */etc/profile,.profile*,*.sh,*.env call SetFileTypeSH(getline(1))
@@ -2023,6 +2029,10 @@ func! s:FTRules()
setf conf " Better than hog
return
endif
if path =~ '^/\(etc\|usr/share\)/polkit-1/rules\.d'
setf javascript
return
endif
try
let config_lines = readfile('/etc/udev/udev.conf')
catch /^Vim\%((\a\+)\)\=:E484/
@@ -2499,6 +2509,8 @@ au BufNewFile,BufRead */etc/yum.conf setf dosini
" Zimbu
au BufNewFile,BufRead *.zu setf zimbu
" Zimbu Templates
au BufNewFile,BufRead *.zut setf zimbutempl
" Zope
" dtml (zope dynamic template markup language), pt (zope page template),

View File

@@ -2,7 +2,7 @@
" Language: J
" Maintainer: David Bürgin <676c7473@gmail.com>
" URL: https://github.com/glts/vim-j
" Last Change: 2014-04-05
" Last Change: 2015-01-11
if exists('b:did_ftplugin')
finish
@@ -16,39 +16,41 @@ setlocal iskeyword=48-57,A-Z,_,a-z
setlocal comments=:NB.
setlocal commentstring=NB.\ %s
setlocal formatoptions-=t
setlocal shiftwidth=2 softtabstop=2 expandtab
setlocal shiftwidth=2
setlocal softtabstop=2
setlocal expandtab
setlocal matchpairs=(:)
let b:undo_ftplugin = 'setlocal matchpairs< expandtab< softtabstop< shiftwidth< formatoptions< commentstring< comments< iskeyword<'
" Section movement with ]] ][ [[ []. The start/end patterns below are amended
" inside the function in order to avoid matching on the current cursor line.
let s:sectionstart = '.\{-}\<\%([0-4]\|13\|noun\|adverb\|conjunction\|verb\|monad\|dyad\)\s\+\%(:\s*0\|def\s\+0\|define\)\>.*'
let s:sectionstart = '\%(\s*Note\|.\{-}\<\%([0-4]\|13\|noun\|adverb\|conjunction\|verb\|monad\|dyad\)\s\+\%(:\s*0\|def\s\+0\|define\)\)\>.*'
let s:sectionend = '\s*)\s*'
function! s:SearchSection(end, backwards, visualmode) abort
if a:visualmode !=# ''
normal! gv
endif
let flags = a:backwards ? 'bsW' : 'sW'
let l:flags = a:backwards ? 'bsW' : 'sW'
if a:end
call search('^' . s:sectionend . (a:backwards ? '\n\_.\{-}\%#' : '$'), flags)
call search('^' . s:sectionend . (a:backwards ? '\n\_.\{-}\%#' : '$'), l:flags)
else
call search('^' . s:sectionstart . (a:backwards ? '\n\_.\{-}\%#' : '$'), flags)
call search('^' . s:sectionstart . (a:backwards ? '\n\_.\{-}\%#' : '$'), l:flags)
endif
endfunction
noremap <script> <buffer> <silent> ]] :<C-U>call <SID>SearchSection(0, 0, '')<CR>
xnoremap <script> <buffer> <silent> ]] :<C-U>call <SID>SearchSection(0, 0, visualmode())<CR>
noremap <buffer> <silent> ]] :<C-U>call <SID>SearchSection(0, 0, '')<CR>
xnoremap <buffer> <silent> ]] :<C-U>call <SID>SearchSection(0, 0, visualmode())<CR>
sunmap <buffer> ]]
noremap <script> <buffer> <silent> ][ :<C-U>call <SID>SearchSection(1, 0, '')<CR>
xnoremap <script> <buffer> <silent> ][ :<C-U>call <SID>SearchSection(1, 0, visualmode())<CR>
noremap <buffer> <silent> ][ :<C-U>call <SID>SearchSection(1, 0, '')<CR>
xnoremap <buffer> <silent> ][ :<C-U>call <SID>SearchSection(1, 0, visualmode())<CR>
sunmap <buffer> ][
noremap <script> <buffer> <silent> [[ :<C-U>call <SID>SearchSection(0, 1, '')<CR>
xnoremap <script> <buffer> <silent> [[ :<C-U>call <SID>SearchSection(0, 1, visualmode())<CR>
noremap <buffer> <silent> [[ :<C-U>call <SID>SearchSection(0, 1, '')<CR>
xnoremap <buffer> <silent> [[ :<C-U>call <SID>SearchSection(0, 1, visualmode())<CR>
sunmap <buffer> [[
noremap <script> <buffer> <silent> [] :<C-U>call <SID>SearchSection(1, 1, '')<CR>
xnoremap <script> <buffer> <silent> [] :<C-U>call <SID>SearchSection(1, 1, visualmode())<CR>
noremap <buffer> <silent> [] :<C-U>call <SID>SearchSection(1, 1, '')<CR>
xnoremap <buffer> <silent> [] :<C-U>call <SID>SearchSection(1, 1, visualmode())<CR>
sunmap <buffer> []
let b:undo_ftplugin .= ' | silent! execute "unmap <buffer> ]]"'
@@ -66,7 +68,7 @@ endif
" Enhanced "%" matching (see ":help matchit")
if exists('loaded_matchit') && !exists('b:match_words')
let b:match_ignorecase = 0
let b:match_words = '^.\{-}\<\%([0-4]\|13\|noun\|adverb\|conjunction\|verb\|monad\|dyad\)\s\+\%(\:\s*0\|def\s\+0\|define\)\>:^\s*\:\s*$:^\s*)\s*$'
let b:match_words = '^\%(\s*Note\|.\{-}\<\%([0-4]\|13\|noun\|adverb\|conjunction\|verb\|monad\|dyad\)\s\+\%(\:\s*0\|def\s\+0\|define\)\)\>:^\s*\:\s*$:^\s*)\s*$'
\ . ',\<\%(for\%(_\a\k*\)\=\|if\|select\|try\|whil\%(e\|st\)\)\.:\<\%(case\|catch[dt]\=\|else\%(if\)\=\|fcase\)\.:\<end\.'
let b:undo_ftplugin .= ' | unlet! b:match_ignorecase b:match_words'
endif

20
runtime/ftplugin/less.vim Normal file
View File

@@ -0,0 +1,20 @@
" Vim filetype plugin
" Language: less
" Maintainer: Alessandro Vioni <jenoma@gmail.com>
" URL: https://github.com/genoma/vim-less
" Last Change: 2014 November 24
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
let b:undo_ftplugin = "setl cms< def< inc< inex< ofu< sua<"
setlocal formatoptions-=t formatoptions+=croql
setlocal comments=:// commentstring=//\ %s
setlocal omnifunc=csscomplete#CompleteCSS
setlocal suffixesadd=.less

View File

@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: man
" Maintainer: SungHyun Nam <goweol@gmail.com>
" Last Change: 2013 Jul 17
" Last Change: 2014 Dec 29
" To make the ":Man" command available before editing a manual page, source
" this script from your startup vimrc file.
@@ -63,7 +63,9 @@ endtry
func <SID>PreGetPage(cnt)
if a:cnt == 0
let old_isk = &iskeyword
setl iskeyword+=(,)
if &ft == 'man'
setl iskeyword+=(,)
endif
let str = expand("<cword>")
let &l:iskeyword = old_isk
let page = substitute(str, '(*\(\k\+\).*', '\1', '')
@@ -157,10 +159,10 @@ func <SID>GetPage(...)
silent exec "r!/usr/bin/man ".s:GetCmdArg(sect, page)." | col -b"
" Remove blank lines from top and bottom.
while getline(1) =~ '^\s*$'
silent norm ggdd
silent keepj norm ggdd
endwhile
while getline('$') =~ '^\s*$'
silent norm Gdd
silent keepj norm Gdd
endwhile
1
setl ft=man nomod

View File

@@ -1,7 +1,10 @@
" Vim filetype plugin file
" Language: matlab
" Maintainer: Jake Wasserman <jwasserman at gmail dot com>
" Last Changed: 2006 Jan 12
" Last Changed: 2014 Dec 30
" Contributors:
" Charles Campbell
if exists("b:did_ftplugin")
finish
@@ -12,10 +15,11 @@ let s:save_cpo = &cpo
set cpo-=C
if exists("loaded_matchit")
let s:conditionalEnd = '\(([^()]*\)\@!\<end\>\([^()]*)\)\@!'
let b:match_words = '\<if\>\|\<while\>\|\<for\>\|\<switch\>:' .
\ s:conditionalEnd . ',\<if\>:\<elseif\>:\<else\>:' .
\ s:conditionalEnd
let s:conditionalEnd = '\%(([^()]*\)\@!\<end\>\%([^()]*)\)\@!'
let b:match_words=
\ '\<\%(if\|switch\|for\|while\)\>:\<\%(elseif\|case\|break\|continue\|else\|otherwise\)\>:'.s:conditionalEnd.','.
\ '\<function\>:\<return\>:\<endfunction\>'
unlet s:conditionalEnd
endif
setlocal suffixesadd=.m

View File

@@ -1,9 +1,11 @@
" Vim indent file
" Language: Fortran95 (and Fortran90, Fortran77, F and elf90)
" Version: 0.40
" Last Change: 2011 Dec. 28
" Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www.unb.ca/chem/ajit/>
" Language: Fortran 2008 (and earlier versions: 2003, 95, 90, and 77)
" Version: 0.41
" Last Change: 2015 Jan. 15
" Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/>
" Usage: Do :help fortran-indent from Vim
" Credits:
" Useful suggestions were made by: Albert Oliver Serra.
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
@@ -36,8 +38,8 @@ if !exists("b:fortran_fixed_source")
else
" f90 and f95 allow both fixed and free source form
" assume fixed source form unless signs of free source form
" are detected in the first five columns of the first 250 lines
" Detection becomes more accurate and time-consuming if more lines
" are detected in the first five columns of the first s:lmax lines.
" Detection becomes more accurate and more time-consuming if more lines
" are checked. Increase the limit below if you keep lots of comments at
" the very top of each file and you have a fast computer
let s:lmax = 500
@@ -129,7 +131,7 @@ function FortranGetIndent(lnum)
if getline(v:lnum) =~? '^\s*\(\d\+\s\)\=\s*'
\. '\(else\|else\s*if\|else\s*where\|case\|'
\. 'end\s*\(if\|where\|select\|interface\|'
\. 'type\|forall\|associate\|enum\)\)\>'
\. 'type\|forall\|associate\|enum\|block\)\)\>'
let ind = ind - &sw
" Fix indent for case statement immediately after select
if prevstat =~? '\<select\s\+\(case\|type\)\>'
@@ -141,8 +143,11 @@ function FortranGetIndent(lnum)
if prevstat =~ '&\s*$' && prev2stat !~ '&\s*$'
let ind = ind + &sw
endif
if prevstat =~ '&\s*$' && prevstat =~ '\<else\s*if\>'
let ind = ind - &sw
endif
"Line after last continuation line
if prevstat !~ '&\s*$' && prev2stat =~ '&\s*$'
if prevstat !~ '&\s*$' && prev2stat =~ '&\s*$' && prevstat !~? '\<then\>'
let ind = ind - &sw
endif

View File

@@ -2,7 +2,7 @@
" Header: "{{{
" Maintainer: Bram Moolenaar
" Original Author: Andy Wokula <anwoku@yahoo.de>
" Last Change: 2014 Aug 23
" Last Change: 2015 Jan 11
" Version: 1.0
" Description: HTML indent script with cached state for faster indenting on a
" range of lines.
@@ -883,7 +883,7 @@ endfunc "}}}
" THE MAIN INDENT FUNCTION. Return the amount of indent for v:lnum.
func! HtmlIndent()
"{{{
if prevnonblank(v:lnum - 1) <= 1
if prevnonblank(v:lnum - 1) < 1
" First non-blank line has no indent.
return 0
endif

View File

@@ -2,7 +2,7 @@
" Language: J
" Maintainer: David Bürgin <676c7473@gmail.com>
" URL: https://github.com/glts/vim-j
" Last Change: 2014-04-05
" Last Change: 2015-01-11
if exists('b:did_indent')
finish
@@ -26,25 +26,25 @@ if !exists('g:j_indent_definitions')
endif
function GetJIndent() abort
let prevlnum = prevnonblank(v:lnum-1)
if prevlnum == 0
let l:prevlnum = prevnonblank(v:lnum - 1)
if l:prevlnum == 0
return 0
endif
let indent = indent(prevlnum)
let prevline = getline(prevlnum)
if prevline =~# '^\s*\%(case\|catch[dt]\=\|do\|else\%(if\)\=\|fcase\|for\%(_\a\k*\)\=\|if\|select\|try\|whil\%(e\|st\)\)\.\%(\%(\<end\.\)\@!.\)*$'
let l:indent = indent(l:prevlnum)
let l:prevline = getline(l:prevlnum)
if l:prevline =~# '^\s*\%(case\|catch[dt]\=\|do\|else\%(if\)\=\|fcase\|for\%(_\a\k*\)\=\|if\|select\|try\|whil\%(e\|st\)\)\.\%(\%(\<end\.\)\@!.\)*$'
" Increase indentation after an initial control word that starts or
" continues a block and is not terminated by "end."
let indent += shiftwidth()
elseif g:j_indent_definitions && (prevline =~# '\<\%([1-4]\|13\|adverb\|conjunction\|verb\|monad\|dyad\)\s\+\%(:\s*0\|def\s\+0\|define\)\>' || prevline =~# '^\s*:\s*$')
let l:indent += shiftwidth()
elseif g:j_indent_definitions && (l:prevline =~# '\<\%([1-4]\|13\|adverb\|conjunction\|verb\|monad\|dyad\)\s\+\%(:\s*0\|def\s\+0\|define\)\>' || l:prevline =~# '^\s*:\s*$')
" Increase indentation in explicit definitions of adverbs, conjunctions,
" and verbs
let indent += shiftwidth()
let l:indent += shiftwidth()
endif
" Decrease indentation in lines that start with either control words that
" continue or end a block, or the special items ")" and ":"
if getline(v:lnum) =~# '^\s*\%()\|:\|\%(case\|catch[dt]\=\|do\|else\%(if\)\=\|end\|fcase\)\.\)'
let indent -= shiftwidth()
let l:indent -= shiftwidth()
endif
return indent
return l:indent
endfunction

13
runtime/indent/less.vim Normal file
View File

@@ -0,0 +1,13 @@
" Vim indent file
" Language: less
" Maintainer: Alessandro Vioni <jenoma@gmail.com>
" URL: https://github.com/genoma/vim-less
" Last Change: 2014 November 24
if exists("b:did_indent")
finish
endif
runtime! indent/css.vim
" vim:set sw=2:

View File

@@ -2,7 +2,7 @@
" Language: Lua script
" Maintainer: Marcus Aurelius Farias <marcus.cf 'at' bol.com.br>
" First Author: Max Ischenko <mfi 'at' ukr.net>
" Last Change: 2007 Jul 23
" Last Change: 2014 Nov 12
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
@@ -54,7 +54,7 @@ function! GetLuaIndent()
" Subtract a 'shiftwidth' on end, else (and elseif), until and '}'
" This is the part that requires 'indentkeys'.
let midx = match(getline(v:lnum), '^\s*\%(end\|else\|until\|}\)')
let midx = match(getline(v:lnum), '^\s*\%(end\>\|else\>\|until\>\|}\)')
if midx != -1 && synIDattr(synID(v:lnum, midx + 1, 1), "name") != "luaComment"
let ind = ind - &shiftwidth
endif

View File

@@ -3,8 +3,8 @@
" Author: John Wellesz <John.wellesz (AT) teaser (DOT) fr>
" URL: http://www.2072productions.com/vim/indent/php.vim
" Home: https://github.com/2072/PHP-Indenting-for-VIm
" Last Change: 2014 April 3rd
" Version: 1.49
" Last Change: 2014 November 26th
" Version: 1.57
"
"
" Type :help php-indent for available options
@@ -48,7 +48,7 @@ endif
let b:did_indent = 1
let php_sync_method = 0
let g:php_sync_method = 0
@@ -112,7 +112,7 @@ setlocal nocindent
setlocal nolisp
setlocal indentexpr=GetPhpIndent()
setlocal indentkeys=0{,0},0),:,!^F,o,O,e,*<Return>,=?>,=<?,=*/
setlocal indentkeys=0{,0},0),0],:,!^F,o,O,e,*<Return>,=?>,=<?,=*/
@@ -128,11 +128,14 @@ if exists("*GetPhpIndent")
endif
let s:PHP_validVariable = '[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*'
let s:notPhpHereDoc = '\%(break\|return\|continue\|exit\|die\|else\)'
let s:blockstart = '\%(\%(\%(}\s*\)\=else\%(\s\+\)\=\)\=if\>\|\%(}\s*\)\?else\>\|do\>\|while\>\|switch\>\|case\>\|default\>\|for\%(each\)\=\>\|declare\>\|class\>\|trait\>\|use\>\|interface\>\|abstract\>\|final\>\|try\>\|\%(}\s*\)\=catch\>\|\%(}\s*\)\=finally\>\)'
let s:functionDecl = '\<function\>\%(\s\+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*\)\=\s*(.*'
let s:functionDecl = '\<function\>\%(\s\+'.s:PHP_validVariable.'\)\=\s*(.*'
let s:endline= '\s*\%(//.*\|#.*\|/\*.*\*/\s*\)\=$'
let s:terminated = '\%(\%(;\%(\s*\%(?>\|}\)\)\=\|<<<''\=\a\w*''\=$\|^\s*}\)'.s:endline.'\)\|^[^''"`]*[''"`]$'
let s:terminated = '\%(\%(;\%(\s*\%(?>\|}\)\)\=\|<<<''\=\a\w*''\=$\|^\s*}\|^\s*'.s:PHP_validVariable.':\)'.s:endline.'\)\|^[^''"`]*[''"`]$'
let s:PHP_startindenttag = '<?\%(.*?>\)\@!\|<script[^>]*>\%(.*<\/script>\)\@!'
@@ -140,7 +143,7 @@ let s:PHP_startindenttag = '<?\%(.*?>\)\@!\|<script[^>]*>\%(.*<\/script>\)\@!'
let s:escapeDebugStops = 0
function! DebugPrintReturn(scriptLine)
if ! s:escapeDebugStops
if ! s:escapeDebugStops
echo "debug:" . a:scriptLine
let c = getchar()
if c == "\<Del>"
@@ -158,8 +161,6 @@ function! GetLastRealCodeLNum(startline) " {{{
let lnum = b:GetLastRealCodeLNum_ADD
endif
let old_lnum = lnum
while lnum > 1
let lnum = prevnonblank(lnum)
let lastline = getline(lnum)
@@ -217,7 +218,7 @@ function! GetLastRealCodeLNum(startline) " {{{
let lnum=0
endif
if b:InPHPcode_and_script && !b:InPHPcode
if b:InPHPcode_and_script && 1 > b:InPHPcode
let b:InPHPcode_and_script = 0
endif
@@ -237,7 +238,7 @@ endfun
function! Skippmatch() " {{{
let synname = synIDattr(synID(line("."), col("."), 0), "name")
if synname == "Delimiter" || synname == "phpRegionDelimiter" || synname =~# "^phpParent" || synname == "phpArrayParens" || synname =~# '^php\%(Block\|Brace\)' || synname == "javaScriptBraces" || synname =~# "^phpComment" && b:UserIsTypingComment
if synname == "Delimiter" || synname == "phpRegionDelimiter" || synname =~# "^phpParent" || synname == "phpArrayParens" || synname =~# '^php\%(Block\|Brace\)' || synname == "javaScriptBraces" || synname =~# '^php\%(Doc\)\?Comment' && b:UserIsTypingComment
return 0
else
return 1
@@ -249,7 +250,7 @@ function! FindOpenBracket(lnum, blockStarter) " {{{
let line = searchpair('{', '', '}', 'bW', 'Skippmatch()')
if a:blockStarter == 1
while line > 1
while line > 1
let linec = getline(line)
if linec =~ s:terminated || linec =~ '^\s*\%(' . s:blockstart . '\)\|'. s:functionDecl . s:endline
@@ -310,7 +311,6 @@ let s:defaultORcase = '^\s*\%(default\|case\).*:'
function! FindTheSwitchIndent (lnum) " {{{
let test = GetLastRealCodeLNum(a:lnum - 1)
if test <= 1
@@ -353,7 +353,7 @@ function! IslinePHP (lnum, tofind) " {{{
if synname == 'phpStringSingle' || synname == 'phpStringDouble' || synname == 'phpBacktick'
if cline !~ '^\s*[''"`]'
return ""
return "SpecStringEntrails"
else
return synname
end
@@ -372,7 +372,7 @@ if ! s:autoresetoptions
endif
function! ResetPhpOptions()
if ! b:optionsset && &filetype == "php"
if ! b:optionsset && &filetype =~ "php"
if b:PHP_autoformatcomment
setlocal comments=s1:/*,mb:*,ex:*/,://,:#
@@ -418,7 +418,7 @@ function! GetPhpIndent()
let b:PHP_indentinghuge = 0
let b:PHP_CurrentIndentLevel = b:PHP_default_indenting
endif
let b:PHP_lastindented = v:lnum
let real_PHP_lastindented = v:lnum
let b:PHP_LastIndentedWasComment=0
let b:PHP_InsideMultilineComment=0
let b:PHP_indentbeforelast = 0
@@ -430,9 +430,12 @@ function! GetPhpIndent()
elseif v:lnum > b:PHP_lastindented
let real_PHP_lastindented = b:PHP_lastindented
let b:PHP_lastindented = v:lnum
else
let real_PHP_lastindented = v:lnum
endif
let b:PHP_lastindented = v:lnum
if !b:InPHPcode_checked " {{{ One time check
let b:InPHPcode_checked = 1
@@ -443,11 +446,15 @@ function! GetPhpIndent()
endif
if synname!=""
if synname != "phpHereDoc" && synname != "phpHereDocDelimiter"
if synname == "SpecStringEntrails"
let b:InPHPcode = -1 " thumb down
let b:UserIsTypingComment = 0
let b:InPHPcode_tofind = ""
elseif synname != "phpHereDoc" && synname != "phpHereDocDelimiter"
let b:InPHPcode = 1
let b:InPHPcode_tofind = ""
if synname =~# "^phpComment"
if synname =~# '^php\%(Doc\)\?Comment'
let b:UserIsTypingComment = 1
else
let b:UserIsTypingComment = 0
@@ -483,9 +490,16 @@ function! GetPhpIndent()
if b:InPHPcode_tofind!=""
if cline =~? b:InPHPcode_tofind
let b:InPHPcode = 1
let b:InPHPcode_tofind = ""
let b:UserIsTypingComment = 0
if b:InPHPcode == -1
let b:InPHPcode = 1
return -1
end
let b:InPHPcode = 1
if cline =~ '\*/'
call cursor(v:lnum, 1)
if cline !~ '^\*/'
@@ -510,7 +524,7 @@ function! GetPhpIndent()
endif
endif
if b:InPHPcode
if 1 == b:InPHPcode
if !b:InPHPcode_and_script && last_line =~ '\%(<?.*\)\@<!?>\%(.*<?\)\@!' && IslinePHP(lnum, '?>')=~"Delimiter"
if cline !~? s:PHP_startindenttag
@@ -520,8 +534,8 @@ function! GetPhpIndent()
let b:InPHPcode_and_script = 1
endif
elseif last_line =~ '^[^''"`]\+[''"`]$' " a string identifier with nothing after it and no other string identifier before
let b:InPHPcode = 0
elseif last_line =~ '^[^''"`]\+[''"`]$'
let b:InPHPcode = -1
let b:InPHPcode_tofind = substitute( last_line, '^.*\([''"`]\).*$', '^[^\1]*\1[;,]$', '')
elseif last_line =~? '<<<''\=\a\w*''\=$'
let b:InPHPcode = 0
@@ -538,7 +552,7 @@ function! GetPhpIndent()
endif " }}}
if !b:InPHPcode && !b:InPHPcode_and_script
if 1 > b:InPHPcode && !b:InPHPcode_and_script
return -1
endif
@@ -568,7 +582,7 @@ function! GetPhpIndent()
endif
endif
if !b:PHP_InsideMultilineComment && cline =~ '^\s*/\*' && cline !~ '\*/\s*$'
if !b:PHP_InsideMultilineComment && cline =~ '^\s*/\*\%(.*\*/\)\@!'
if getline(v:lnum + 1) !~ '^\s*\*'
return -1
endif
@@ -669,17 +683,17 @@ function! GetPhpIndent()
endwhile
elseif last_line =~# unstated && cline !~ '^\s*);\='.endline
let ind = ind + &sw " we indent one level further when the preceding line is not stated
let ind = ind + &sw
return ind + addSpecial
elseif (ind != b:PHP_default_indenting || last_line =~ '^[)\]]' ) && last_line =~ terminated " Added || last_line =~ '^)' on 2007-12-30 (array indenting problem broke other things)
elseif (ind != b:PHP_default_indenting || last_line =~ '^[)\]]' ) && last_line =~ terminated
let previous_line = last_line
let last_line_num = lnum
let LastLineClosed = 1
let isSingleLineBlock = 0
while 1
if ! isSingleLineBlock && previous_line =~ '^\s*}\|;\s*}'.endline " XXX
if ! isSingleLineBlock && previous_line =~ '^\s*}\|;\s*}'.endline
call cursor(last_line_num, 1)
if previous_line !~ '^}'
@@ -740,14 +754,19 @@ function! GetPhpIndent()
endif
endif
let plinnum = GetLastRealCodeLNum(lnum - 1)
if (last_line !~ '^\s*}\%(}}\)\@!')
let plinnum = GetLastRealCodeLNum(lnum - 1)
else
let plinnum = GetLastRealCodeLNum(FindOpenBracket(lnum, 1) - 1)
endif
let AntepenultimateLine = getline(plinnum)
let last_line = substitute(last_line,"\\(//\\|#\\)\\(\\(\\([^\"']*\\([\"']\\)[^\"']*\\5\\)\\+[^\"']*$\\)\\|\\([^\"']*$\\)\\)",'','')
if ind == b:PHP_default_indenting
if last_line =~ terminated
if last_line =~ terminated && last_line !~# s:defaultORcase
let LastLineClosed = 1
endif
endif
@@ -755,10 +774,10 @@ function! GetPhpIndent()
if !LastLineClosed
if last_line =~# '[{(\[]'.endline || last_line =~? '\h\w*\s*(.*,$' && AntepenultimateLine !~ '[,(]'.endline
if last_line =~# '[{(\[]'.endline || last_line =~? '\h\w*\s*(.*,$' && AntepenultimateLine !~ '[,(\[]'.endline
let dontIndent = 0
if last_line =~ '\S\+\s*{'.endline && last_line !~ '^\s*\%(' . s:blockstart . '\)\|'. s:functionDecl . s:endline
if last_line =~ '\S\+\s*{'.endline && last_line !~ '^\s*)\s*{'.endline && last_line !~ '^\s*\%(' . s:blockstart . '\)\|'. s:functionDecl . s:endline
let dontIndent = 1
endif
@@ -774,7 +793,7 @@ function! GetPhpIndent()
elseif last_line =~ '\S\+\s*),'.endline
call cursor(lnum, 1)
call search('),'.endline, 'W') " line never begins with ) so no need for 'c' flag
call search('),'.endline, 'W')
let openedparent = searchpair('(', '', ')', 'bW', 'Skippmatch()')
if openedparent != lnum
let ind = indent(openedparent)
@@ -784,7 +803,7 @@ function! GetPhpIndent()
let ind = ind + &sw
elseif AntepenultimateLine =~ '\%(;\%(\s*\%(?>\|}\)\)\=\|<<<''\=\a\w*''\=$\|^\s*}\|{\)'.endline . '\|' . s:defaultORcase
elseif AntepenultimateLine =~ '{'.endline || AntepenultimateLine =~ terminated || AntepenultimateLine =~# s:defaultORcase
let ind = ind + &sw
endif

View File

@@ -1,7 +1,7 @@
" Vim indent file
" Language: Vim script
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2014 Sep 19
" Last Change: 2014 Dec 12
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
@@ -89,7 +89,7 @@ function GetVimIndentIntern()
" Subtract a 'shiftwidth' on a :endif, :endwhile, :catch, :finally, :endtry,
" :endfun, :else and :augroup END.
if cur_text =~ '^\s*\(ene\@!\|cat\|fina\|el\|aug\%[roup]\s*!\=\s\+END\)'
if cur_text =~ '^\s*\(ene\@!\|cat\|fina\|el\|aug\%[roup]\s*!\=\s\+[eE][nN][dD]\)'
let ind = ind - &sw
endif

View File

@@ -1,6 +1,6 @@
" Vim Plugin: Edit the file with an existing Vim if possible
" Maintainer: Bram Moolenaar
" Last Change: 2013 Feb 24
" Last Change: 2014 Dec 06
" This is a plugin, drop it in your (Unix) ~/.vim/plugin or (Win32)
" $VIM/vimfiles/plugin directory. Or make a symbolic link, so that you
@@ -112,7 +112,7 @@ func! EditExisting(fname, command)
endif
if a:command != ''
exe "normal " . a:command
exe "normal! " . a:command
endif
redraw

View File

@@ -1,7 +1,7 @@
" These commands create the option window.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2014 Oct 09
" Last Change: 2014 Nov 19
" If there already is an option window, jump to that one.
if bufwinnr("option-window") > 0
@@ -149,7 +149,7 @@ setlocal ts=15 tw=0 noro buftype=nofile
call append(0, '" Each "set" line shows the current value of an option (on the left).')
call append(1, '" Hit <CR> on a "set" line to execute it.')
call append(2, '" A boolean option will be toggled.')
call append(3, '" For other options you can edit the value.')
call append(3, '" For other options you can edit the value before hitting <CR>.')
call append(4, '" Hit <CR> on a help line to open a help window on this option.')
call append(5, '" Hit <CR> on an index line to jump there.')
call append(6, '" Hit <Space> on a "set" line to refresh it.')
@@ -1194,8 +1194,10 @@ if has("keymap")
call <SID>OptionL("kmp")
endif
if has("langmap")
call append("$", "langmap\ttranslate characters for Normal mode")
call append("$", "langmap\tlist of characters that are translated in Normal mode")
call <SID>OptionG("lmap", &lmap)
call append("$", "langnoremap\tdon't apply 'langmap' to mapped characters")
call <SID>BinOptionG("lnr", &lnr)
endif
if has("xim")
call append("$", "imdisable\twhen set never use IM; overrules following IM options")

View File

@@ -1,6 +1,6 @@
" netrwPlugin.vim: Handles file transfer and remote directory listing across a network
" PLUGIN SECTION
" Date: Jan 22, 2014
" Date: Nov 07, 2014
" 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 = "v152"
let g:loaded_netrwPlugin = "v153"
if v:version < 702
echohl WarningMsg
echo "***warning*** you need vim version 7.2 for this version of netrw"
@@ -54,15 +54,15 @@ augroup END
" Network Browsing Reading Writing: {{{2
augroup Network
au!
au BufReadCmd file://* call netrw#FileUrlRead(expand("<amatch>"))
au BufReadCmd ftp://*,rcp://*,scp://*,http://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau BufReadPre ".fnameescape(expand("<amatch>"))|call netrw#Nread(2,expand("<amatch>"))|exe "sil doau BufReadPost ".fnameescape(expand("<amatch>"))
au FileReadCmd ftp://*,rcp://*,scp://*,http://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau FileReadPre ".fnameescape(expand("<amatch>"))|call netrw#Nread(1,expand("<amatch>"))|exe "sil doau FileReadPost ".fnameescape(expand("<amatch>"))
au BufWriteCmd ftp://*,rcp://*,scp://*,http://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau BufWritePre ".fnameescape(expand("<amatch>"))|exe 'Nwrite '.fnameescape(expand("<amatch>"))|exe "sil doau BufWritePost ".fnameescape(expand("<amatch>"))
au FileWriteCmd ftp://*,rcp://*,scp://*,http://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau FileWritePre ".fnameescape(expand("<amatch>"))|exe "'[,']".'Nwrite '.fnameescape(expand("<amatch>"))|exe "sil doau FileWritePost ".fnameescape(expand("<amatch>"))
try
au SourceCmd ftp://*,rcp://*,scp://*,http://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe 'Nsource '.fnameescape(expand("<amatch>"))
catch /^Vim\%((\a\+)\)\=:E216/
au SourcePre ftp://*,rcp://*,scp://*,http://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe 'Nsource '.fnameescape(expand("<amatch>"))
au BufReadCmd file://* call netrw#FileUrlRead(expand("<amatch>"))
au BufReadCmd ftp://*,rcp://*,scp://*,http://*,file://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau BufReadPre ".fnameescape(expand("<amatch>"))|call netrw#Nread(2,expand("<amatch>"))|exe "sil doau BufReadPost ".fnameescape(expand("<amatch>"))
au FileReadCmd ftp://*,rcp://*,scp://*,http://*,file://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau FileReadPre ".fnameescape(expand("<amatch>"))|call netrw#Nread(1,expand("<amatch>"))|exe "sil doau FileReadPost ".fnameescape(expand("<amatch>"))
au BufWriteCmd ftp://*,rcp://*,scp://*,http://*,file://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau BufWritePre ".fnameescape(expand("<amatch>"))|exe 'Nwrite '.fnameescape(expand("<amatch>"))|exe "sil doau BufWritePost ".fnameescape(expand("<amatch>"))
au FileWriteCmd ftp://*,rcp://*,scp://*,http://*,file://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau FileWritePre ".fnameescape(expand("<amatch>"))|exe "'[,']".'Nwrite '.fnameescape(expand("<amatch>"))|exe "sil doau FileWritePost ".fnameescape(expand("<amatch>"))
try
au SourceCmd ftp://*,rcp://*,scp://*,http://*,file://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe 'Nsource '.fnameescape(expand("<amatch>"))
catch /^Vim\%((\a\+)\)\=:E216/
au SourcePre ftp://*,rcp://*,scp://*,http://*,file://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe 'Nsource '.fnameescape(expand("<amatch>"))
endtry
augroup END
@@ -81,18 +81,26 @@ com! -nargs=* -bar -bang -count=0 -complete=dir Vexplore call netrw#Explore(<cou
com! -nargs=* -bar -count=0 -complete=dir Texplore call netrw#Explore(<count>,0,6 ,<q-args>)
com! -nargs=* -bar -bang Nexplore call netrw#Explore(-1,0,0,<q-args>)
com! -nargs=* -bar -bang Pexplore call netrw#Explore(-2,0,0,<q-args>)
com! -nargs=* -bar -complete=dir Lexplore call netrw#Lexplore(<q-args>)
com! -nargs=* -bar -bang -count=0 -complete=dir Lexplore call netrw#Lexplore(<count>,<bang>0,<q-args>)
" Commands: NetrwSettings {{{2
com! -nargs=0 NetrwSettings call netrwSettings#NetrwSettings()
com! -bang NetrwClean call netrw#Clean(<bang>0)
" Maps:
if !exists("g:netrw_nogx") && maparg('gx','n') == ""
if !hasmapto('<Plug>NetrwBrowseX')
nmap <unique> gx <Plug>NetrwBrowseX
if !exists("g:netrw_nogx")
if maparg('gx','n') == ""
if !hasmapto('<Plug>NetrwBrowseX')
nmap <unique> gx <Plug>NetrwBrowseX
endif
nno <silent> <Plug>NetrwBrowseX :call netrw#BrowseX(expand((exists("g:netrw_gx")? g:netrw_gx : '<cfile>')),netrw#CheckIfRemote())<cr>
endif
if maparg('gx','v') == ""
if !hasmapto('<Plug>NetrwBrowseXVis')
vmap <unique> gx <Plug>NetrwBrowseXVis
endif
vno <silent> <Plug>NetrwBrowseXVis :<c-u>call netrw#BrowseXVis()<cr>
endif
nno <silent> <Plug>NetrwBrowseX :call netrw#NetrwBrowseX(expand("<cfile>"),0)<cr>
endif
" ---------------------------------------------------------------------
@@ -119,7 +127,7 @@ fun! s:LocalBrowse(dirname)
" call Decho("(LocalBrowse) dirname<".a:dirname."> (isdirectory, amiga)")
if a:dirname != '' && isdirectory(a:dirname)
sil! call netrw#LocalBrowseCheck(a:dirname)
if exists("w:netrw_bannercnt")
if exists("w:netrw_bannercnt") && line('.') < w:netrw_bannercnt
exe w:netrw_bannercnt
endif
endif
@@ -128,7 +136,7 @@ fun! s:LocalBrowse(dirname)
" call Decho("(LocalBrowse) dirname<".a:dirname."> ft=".&ft." (isdirectory, not amiga)")
" call Dredir("LocalBrowse ft last set: ","verbose set ft")
sil! call netrw#LocalBrowseCheck(a:dirname)
if exists("w:netrw_bannercnt")
if exists("w:netrw_bannercnt") && line('.') < w:netrw_bannercnt
exe w:netrw_bannercnt
endif

View File

@@ -1,9 +1,9 @@
" Vim syntax file
" Language: AmigaDos
" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz>
" Last Change: Sep 11, 2006
" Version: 6
" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
" Last Change: Oct 23, 2014
" Version: 7
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_AMIGA
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded

View File

@@ -1,13 +1,15 @@
" Vim syntax file
" Language: awk, nawk, gawk, mawk
" Maintainer: Antonio Colombo <azc100@gmail.com>
" Last Change: 2012 May 18
" Last Change: 2014 Oct 21
" AWK ref. is: Alfred V. Aho, Brian W. Kernighan, Peter J. Weinberger
" The AWK Programming Language, Addison-Wesley, 1988
" GAWK ref. is: Arnold D. Robbins
" Effective AWK Programming, Third Edition, O'Reilly, 2001
" Effective AWK Programming, Fourth Edition, O'Reilly, 2015
" (also available with the gawk source distribution)
" MAWK is a "new awk" meaning it implements AWK ref.
" mawk conforms to the Posix 1003.2 (draft 11.3)
@@ -33,17 +35,27 @@ set cpo&vim
syn keyword awkStatement break continue delete exit
syn keyword awkStatement function getline next
syn keyword awkStatement print printf return
" GAWK ref. p. 117
" GAWK ref. Chapter 7
syn keyword awkStatement nextfile
" AWK ref. p. 42, GAWK ref. p. 142-166
syn keyword awkFunction atan2 close cos exp fflush int log rand sin sqrt srand
syn keyword awkFunction gsub index length match split sprintf sub
syn keyword awkFunction substr system
" GAWK ref. p. 142-166
syn keyword awkFunction asort gensub mktime strftime strtonum systime
"
" GAWK ref. Chapter 9, Functions
"
" Numeric Functions
syn keyword awkFunction atan2 cos div exp int log rand sin sqrt srand
" String Manipulation Functions
syn keyword awkFunction asort asort1 gensub gsub index length match
syn keyword awkFunction patsplit split sprintf strtonum sub substr
syn keyword awkFunction tolower toupper
syn keyword awkFunction and or xor compl lshift rshift
syn keyword awkFunction dcgettext bindtextdomain
" Input Output Functions
syn keyword awkFunction close fflush system
" Time Functions
syn keyword awkFunction mktime strftime systime
" Bit Manipulation Functions
syn keyword awkFunction and compl lshift or rshift xor
" Getting Type Function
syn keyword awkFunction isarray
" String-Translation Functions
syn keyword awkFunction bindtextdomain dcgettext dcngetext
syn keyword awkConditional if else
syn keyword awkRepeat while for
@@ -51,13 +63,16 @@ syn keyword awkRepeat while for
syn keyword awkTodo contained TODO
syn keyword awkPatterns BEGIN END
" AWK ref. p. 36
syn keyword awkVariables ARGC ARGV FILENAME FNR FS NF NR
syn keyword awkVariables OFMT OFS ORS RLENGTH RS RSTART SUBSEP
" GAWK ref. p. 120-126
syn keyword awkVariables ARGIND BINMODE CONVFMT ENVIRON ERRNO
syn keyword awkVariables FIELDWIDTHS IGNORECASE LINT PROCINFO
syn keyword awkVariables RT RLENGTH TEXTDOMAIN
" GAWK ref. Chapter 7
" Built-in Variables That Control awk
syn keyword awkVariables BINMODE CONVFMT FIELDWIDTHS FPAT FS
syn keyword awkVariables IGNORECASE LINT OFMT OFS ORS PREC
syn keyword awkVariables ROUNDMODE RS SUBSEP TEXTDOMAIN
" Built-in Variables That Convey Information
syn keyword awkVariables ARGC ARGV ARGIND ENVIRON ERRNO FILENAME
syn keyword awkVariables FNR NF FUNCTAB NR PROCINFO RLENGTH RSTART
syn keyword awkVariables RT SYMTAB
syn keyword awkRepeat do
@@ -115,15 +130,15 @@ syn case match
"syn match awkIdentifier "\<[a-zA-Z_][a-zA-Z0-9_]*\>"
" Arithmetic operators: +, and - take care of ++, and --
"syn match awkOperator "+\|-\|\*\|/\|%\|="
"syn match awkOperator "+=\|-=\|\*=\|/=\|%="
"syn match awkOperator "^\|^="
syn match awkOperator "+\|-\|\*\|/\|%\|="
syn match awkOperator "+=\|-=\|\*=\|/=\|%="
syn match awkOperator "^\|^="
" Comparison expressions.
"syn match awkExpression "==\|>=\|=>\|<=\|=<\|\!="
"syn match awkExpression "\~\|\!\~"
"syn match awkExpression "?\|:"
"syn keyword awkExpression in
syn match awkExpression "==\|>=\|=>\|<=\|=<\|\!="
syn match awkExpression "\~\|\!\~"
syn match awkExpression "?\|:"
syn keyword awkExpression in
" Boolean Logic (OR, AND, NOT)
"syn match awkBoolLogic "||\|&&\|\!"
@@ -187,8 +202,8 @@ if version >= 508 || !exists("did_awk_syn_inits")
HiLink awkFloat Float
HiLink awkFileIO Special
"HiLink awkOperator Special
"HiLink awkExpression Special
HiLink awkOperator Special
HiLink awkExpression Special
HiLink awkBoolLogic Special
HiLink awkPatterns Special

View File

@@ -1,7 +1,7 @@
" Vim syntax file
" Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2014 Sep 23
" Last Change: 2014 Nov 13
" Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax")
@@ -61,10 +61,9 @@ else
syn region cCppString start=+L\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell
endif
syn region cCppOut2 contained start="0" end="^\s*\(%:\|#\)\s*\(endif\>\|else\>\|elif\>\)" contains=cSpaceError,cCppSkip
syn region cCppSkip contained start="^\s*\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" contains=cSpaceError,cCppSkip
syn cluster cStringGroup contains=cCppString,cCppOut2,cCppSkip
syn cluster cStringGroup contains=cCppString,cCppSkip
syn match cCharacter "L\='[^\\]'"
syn match cCharacter "L'[^']*'" contains=cSpecial
@@ -462,8 +461,7 @@ hi def link cTodo Todo
hi def link cBadContinuation Error
hi def link cCppOutSkip cCppOutIf2
hi def link cCppInElse2 cCppOutIf2
hi def link cCppOutIf2 cCppOut2 " Old syntax group for #if 0 body
hi def link cCppOut2 cCppOut " Old syntax group for #if of #if 0
hi def link cCppOutIf2 cCppOut
hi def link cCppOut Comment
let b:current_syntax = "c"

View File

@@ -1,11 +1,13 @@
" Vim syntax file
" Language: configure.in script: M4 with sh
" Maintainer: Christian Hammesr <ch@lathspell.westend.com>
" Last Change: 2008 Sep 03
" Last Change: 2015 Jan 14
" (patch from Yngve Inntjore Levinsen to detect AC_MSG)
" (patch from Khym Chanur to add @Spell)
" Well, I actually even do not know much about m4. This explains why there
" is probably very much missing here, yet !
" But I missed a good hilighting when editing my GNU autoconf/automake
" But I missed good highlighting when editing my GNU autoconf/automake
" script, so I wrote this quick and dirty patch.
@@ -20,14 +22,19 @@ endif
" define the config syntax
syn match configdelimiter "[()\[\];,]"
syn match configoperator "[=|&\*\+\<\>]"
syn match configcomment "\(dnl.*\)\|\(#.*\)"
syn match configcomment "\(dnl.*\)\|\(#.*\)" contains=configDnl,@Spell
syn match configfunction "\<[A-Z_][A-Z0-9_]*\>"
syn match confignumber "[-+]\=\<\d\+\(\.\d*\)\=\>"
syn keyword configDnl dnl contained
syn keyword configkeyword if then else fi test for in do done
syn keyword configspecial cat rm eval
syn region configstring start=+"+ skip=+\\"+ end=+"+
syn region configstring start=+'+ skip=+\\'+ end=+'+
syn region configstring start=+`+ skip=+\\'+ end=+`+
" This shortens the script, see syn-ext-match..
syn region configstring start=+\z(["'`]\)+ skip=+\\\z1+ end=+\z1+ contains=@Spell
" Anything inside AC_MSG_TYPE([...]) and AC_MSG_TYPE(...) is a string.
syn region configstring matchgroup=configfunction start="AC_MSG_[A-Z]*\ze(\[" matchgroup=configdelimiter end="\])" contains=configdelimiter,@Spell
syn region configstring matchgroup=configfunction start="AC_MSG_[A-Z]*\ze([^[]" matchgroup=configdelimiter end=")" contains=configdelimiter,@Spell
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
@@ -43,6 +50,7 @@ if version >= 508 || !exists("did_config_syntax_inits")
HiLink configdelimiter Delimiter
HiLink configoperator Operator
HiLink configcomment Comment
HiLink configDnl Comment
HiLink configfunction Function
HiLink confignumber Number
HiLink configkeyword Keyword

View File

@@ -5,7 +5,7 @@
" License: This file can be redistribued and/or modified under the same terms
" as Vim itself.
" Filenames: /tmp/crontab.* used by "crontab -e"
" Last Change: 2012-05-16
" Last Change: 2015-01-20
"
" crontab line format:
" Minutes Hours Days Months Days_of_Week Commands # comments
@@ -13,11 +13,17 @@
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
syntax clear
elseif exists("b:current_syntax")
finish
finish
endif
syntax match crontabNick "^\s*@\(reboot\|yearly\|annually\|monthly\|weekly\|daily\|midnight\|hourly\)\>" nextgroup=crontabCmd skipwhite
syntax match crontabVar "^\s*\k\w*\s*="me=e-1
syntax case ignore
syntax match crontabMin "^\s*[-0-9/,.*]\+" nextgroup=crontabHr skipwhite
syntax match crontabHr "\s[-0-9/,.*]\+" nextgroup=crontabDay skipwhite contained
syntax match crontabDay "\s[-0-9/,.*]\+" nextgroup=crontabMnth skipwhite contained
@@ -32,45 +38,41 @@ syntax region crontabCmd start="\S" end="$" skipwhite contained keepend contains
syntax match crontabCmnt "^\s*#.*" contains=@Spell
syntax match crontabPercent "[^\\]%.*"lc=1 contained
syntax match crontabNick "^\s*@\(reboot\|yearly\|annually\|monthly\|weekly\|daily\|midnight\|hourly\)\>" nextgroup=crontabCmd skipwhite
syntax match crontabVar "^\s*\k\w*\s*="me=e-1
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_crontab_syn_inits")
if version < 508
let did_crontab_syn_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
if version < 508
let did_crontab_syn_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink crontabMin Number
HiLink crontabHr PreProc
HiLink crontabDay Type
HiLink crontabMin Number
HiLink crontabHr PreProc
HiLink crontabDay Type
HiLink crontabMnth Number
HiLink crontabMnth12 Number
HiLink crontabMnthS Number
HiLink crontabMnthN Number
HiLink crontabMnth Number
HiLink crontabMnth12 Number
HiLink crontabMnthS Number
HiLink crontabMnthN Number
HiLink crontabDow PreProc
HiLink crontabDow7 PreProc
HiLink crontabDowS PreProc
HiLink crontabDowN PreProc
HiLink crontabDow PreProc
HiLink crontabDow7 PreProc
HiLink crontabDowS PreProc
HiLink crontabDowN PreProc
HiLink crontabNick Special
HiLink crontabVar Identifier
HiLink crontabPercent Special
HiLink crontabNick Special
HiLink crontabVar Identifier
HiLink crontabPercent Special
" comment out next line for to suppress unix commands coloring.
HiLink crontabCmd Statement
HiLink crontabCmd Statement
HiLink crontabCmnt Comment
HiLink crontabCmnt Comment
delcommand HiLink
delcommand HiLink
endif
let b:current_syntax = "crontab"

View File

@@ -1,9 +1,9 @@
" Vim syntax file
" Language: C-shell (csh)
" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz>
" Version: 10
" Last Change: Sep 11, 2006
" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
" Version: 11
" Last Change: Oct 23, 2014
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_CSH
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded

View File

@@ -1,9 +1,9 @@
" Vim syntax file
" Language: DCL (Digital Command Language - vms)
" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz>
" Last Change: Sep 11, 2006
" Version: 6
" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
" Last Change: Oct 23, 2014
" Version: 7
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_DCL
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded

View File

@@ -2,7 +2,7 @@
" Language: Diff (context or unified)
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Translations by Jakson Alves de Aquino.
" Last Change: 2013 Oct 06
" Last Change: 2015 Jan 07
" Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax")
@@ -18,6 +18,9 @@ syn match diffIsA "^File .* is a .* while file .* is a .*"
syn match diffNoEOL "^\\ No newline at end of file .*"
syn match diffCommon "^Common subdirectories: .*"
" Disable the translations by setting diff_translations to zero.
if !exists("diff_translations") || diff_translations
" ca
syn match diffOnly "^Només a .*"
syn match diffIdentical "^Els fitxers .* i .* són idèntics$"
@@ -125,7 +128,7 @@ syn match diffIdentical "^םיהז םניה .*-ו .* םיצבקה$"
syn match diffDiffer "^הזמ הז םינוש `.*'-ו `.*' םיצבקה$"
syn match diffBDiffer "^הזמ הז םינוש `.*'-ו `.*' םיירניב םיצבק$"
syn match diffIsA "^.* .*-ל .* .* תוושהל ןתינ אל$"
syn match diffNoEOL "^\\ ץבוקה ףוסב השדח-הרוש ות רסח"
syn match diffNoEOL "^\\ ץבוקה ףוסב השד.-הרוש ות רס."
syn match diffCommon "^.*-ו .* :תוהז תויקית-תת$"
" hr
@@ -320,6 +323,8 @@ syn match diffIsA "^檔案 .* 是.*而檔案 .* 是.*"
syn match diffNoEOL "^\\ 檔案末沒有 newline 字元"
syn match diffCommon "^.* 和 .* 有共同的副目錄$"
endif
syn match diffRemoved "^-.*"
syn match diffRemoved "^<.*"

View File

@@ -1,9 +1,9 @@
" Vim syntax file
" Language: Elm Filter rules
" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz>
" Last Change: Sep 11, 2006
" Version: 5
" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
" Last Change: Oct 23, 2014
" Version: 6
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_ELMFILT
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded

View File

@@ -1,10 +1,10 @@
" Vim syntax file
" Language: exports
" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz>
" Last Change: Sep 06, 2005
" Version: 4
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
" Last Change: Oct 23, 2014
" Version: 5
" Notes: This file includes both SysV and BSD 'isms
" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_EXPORTS
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded

View File

@@ -1,15 +1,15 @@
" Vim syntax file
" Language: Fortran 2008 (and earlier versions: 2003, 95, 90, and 77)
" Version: 0.94
" Last Change: 2012 June 18
" Maintainer: Ajit J. Thakkar (ajit AT unb.ca); <http://www.unb.ca/chem/ajit/>
" Version: 0.95
" Last Change: 2015 Jan. 15
" 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 were made by: Andrej Panjkov,
" Bram Moolenaar, Thomas Olsen, Michael Sternberg, Christian Reile,
" Walter Dieudonn<6E>, Alexander Wagner, Roman Bertle, Charles Rendleman,
" Andrew Griffiths, Joe Krahn, and Hendrik Merx.
" Andrew Griffiths, Joe Krahn, Hendrik Merx, and Matt Thompson.
if exists("b:current_syntax")
finish
@@ -298,6 +298,41 @@ if b:fortran_dialect == "f08"
syn keyword fortranIntrinsic bge bgt ble blt dshiftl dshiftr findloc iall iany iparity image_index lcobound ucobound maskl maskr num_images parity popcnt poppar shifta shiftl shiftr this_image
syn keyword fortranIO newunit
syn keyword fortranType contiguous
" CUDA fortran
syn match fortranTypeCUDA "\<attributes\>"
syn keyword fortranTypeCUDA host global device value
syn keyword fortranTypeCUDA shared constant pinned texture
syn keyword fortranTypeCUDA dim1 dim2 dim3 dim4
syn keyword fortranTypeCUDA cudadeviceprop cuda_count_kind cuda_stream_kind
syn keyword fortranTypeCUDA cudaEvent cudaFuncAttributes cudaArrayPtr
syn keyword fortranTypeCUDA cudaSymbol cudaChannelFormatDesc cudaPitchedPtr
syn keyword fortranTypeCUDA cudaExtent cudaMemcpy3DParms
syn keyword fortranTypeCUDA cudaFuncCachePreferNone cudaFuncCachePreferShared
syn keyword fortranTypeCUDA cudaFuncCachePreferL1 cudaLimitStackSize
syn keyword fortranTypeCUDA cudaLimitPrintfSize cudaLimitMallocHeapSize
syn keyword fortranTypeCUDA cudaSharedMemBankSizeDefault cudaSharedMemBankSizeFourByte cudaSharedMemBankSizeEightByte
syn keyword fortranTypeCUDA cudaEventDefault cudaEventBlockingSync cudaEventDisableTiming
syn keyword fortranTypeCUDA cudaMemcpyHostToDevice cudaMemcpyDeviceToHost
syn keyword fortranTypeCUDA cudaMemcpyDeviceToDevice
syn keyword fortranTypeCUDA cudaErrorNotReady cudaSuccess cudaErrorInvalidValue
syn keyword fortranTypeCUDA c_devptr
syn match fortranStringCUDA "blockidx%[xyz]"
syn match fortranStringCUDA "blockdim%[xyz]"
syn match fortranStringCUDA "griddim%[xyz]"
syn match fortranStringCUDA "threadidx%[xyz]"
syn keyword fortranIntrinsicCUDA warpsize syncthreads syncthreads_and syncthreads_count syncthreads_or threadfence threadfence_block threadfence_system gpu_time allthreads anythread ballot
syn keyword fortranIntrinsicCUDA atomicadd atomicsub atomicmax atomicmin atomicand atomicor atomicxor atomicexch atomicinc atomicdec atomiccas sizeof __shfl __shfl_up __shfl_down __shfl_xor
syn keyword fortranIntrinsicCUDA cudaChooseDevice cudaDeviceGetCacheConfig cudaDeviceGetLimit cudaDeviceGetSharedMemConfig cudaDeviceReset cudaDeviceSetCacheConfig cudaDeviceSetLimit cudaDeviceSetSharedMemConfig cudaDeviceSynchronize cudaGetDevice cudaGetDeviceCount cudaGetDeviceProperties cudaSetDevice cudaSetDeviceFlags cudaSetValidDevices
syn keyword fortranIntrinsicCUDA cudaThreadExit cudaThreadSynchronize cudaGetLastError cudaGetErrorString cudaPeekAtLastError cudaStreamCreate cudaStreamDestroy cudaStreamQuery cudaStreamSynchronize cudaStreamWaitEvent cudaEventCreate cudaEventCreateWithFlags cudaEventDestroy cudaEventElapsedTime cudaEventQuery cudaEventRecord cudaEventSynchronize
syn keyword fortranIntrinsicCUDA cudaFuncGetAttributes cudaFuncSetCacheConfig cudaFuncSetSharedMemConfig cudaSetDoubleForDevice cudaSetDoubleForHost cudaFree cudaFreeArray cudaFreeHost cudaGetSymbolAddress cudaGetSymbolSize
syn keyword fortranIntrinsicCUDA cudaHostAlloc cudaHostGetDevicePointer cudaHostGetFlags cudaHostRegister cudaHostUnregister cudaMalloc cudaMallocArray cudaMallocHost cudaMallocPitch cudaMalloc3D cudaMalloc3DArray
syn keyword fortranIntrinsicCUDA cudaMemcpy cudaMemcpyArraytoArray cudaMemcpyAsync cudaMemcpyFromArray cudaMemcpyFromSymbol cudaMemcpyFromSymbolAsync cudaMemcpyPeer cudaMemcpyPeerAsync cudaMemcpyToArray cudaMemcpyToSymbol cudaMemcpyToSymbolAsync cudaMemcpy2D cudaMemcpy2DArrayToArray cudaMemcpy2DAsync cudaMemcpy2DFromArray cudaMemcpy2DToArray cudaMemcpy3D cudaMemcpy3DAsync
syn keyword fortranIntrinsicCUDA cudaMemGetInfo cudaMemset cudaMemset2D cudaMemset3D cudaDeviceCanAccessPeer cudaDeviceDisablePeerAccess cudaDeviceEnablePeerAccess cudaPointerGetAttributes cudaDriverGetVersion cudaRuntimeGetVersion
syn region none matchgroup=fortranType start="<<<" end=">>>" contains=ALLBUT,none
endif
syn cluster fortranCommentGroup contains=fortranTodo
@@ -453,6 +488,11 @@ else
hi! def link fortranConditionalR fortranConditional
endif
" CUDA
hi def link fortranIntrinsicCUDA fortranIntrinsic
hi def link fortranTypeCUDA fortranType
hi def link fortranStringCUDA fortranString
hi def link fortranFormatSpec Identifier
hi def link fortranFloat Float
hi def link fortranPreCondit PreCondit

View File

@@ -2,7 +2,8 @@
" Language: HTML
" Maintainer: Claudio Fleiner <claudio@fleiner.com>
" URL: http://www.fleiner.com/vim/syntax/html.vim
" Last Change: 2012 Oct 05
" Last Change: 2015 Jan 07
" included patch from David Felix
" Please check :help html.vim for some comments and a description of the options
@@ -168,7 +169,7 @@ if main_syntax != 'java' || exists("java_javascript")
" JAVA SCRIPT
syn include @htmlJavaScript syntax/javascript.vim
unlet b:current_syntax
syn region javaScript start=+<script\_[^>]*>+ keepend end=+</script>+me=s-1 contains=@htmlJavaScript,htmlCssStyleComment,htmlScriptTag,@htmlPreproc
syn region javaScript start=+<script\_[^>]*>+ keepend end=+</script\_[^>]*>+me=s-1 contains=@htmlJavaScript,htmlCssStyleComment,htmlScriptTag,@htmlPreproc
syn region htmlScriptTag contained start=+<script+ end=+>+ fold contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent
HtmlHiLink htmlScriptTag htmlTag
@@ -193,7 +194,7 @@ if main_syntax != 'java' || exists("java_vb")
" VB SCRIPT
syn include @htmlVbScript syntax/vb.vim
unlet b:current_syntax
syn region javaScript start=+<script \_[^>]*language *=\_[^>]*vbscript\_[^>]*>+ keepend end=+</script>+me=s-1 contains=@htmlVbScript,htmlCssStyleComment,htmlScriptTag,@htmlPreproc
syn region javaScript start=+<script \_[^>]*language *=\_[^>]*vbscript\_[^>]*>+ keepend end=+</script\_[^>]*>+me=s-1 contains=@htmlVbScript,htmlCssStyleComment,htmlScriptTag,@htmlPreproc
endif
syn cluster htmlJavaScript add=@htmlPreproc

View File

@@ -2,7 +2,7 @@
" Language: J
" Maintainer: David Bürgin <676c7473@gmail.com>
" URL: https://github.com/glts/vim-j
" Last Change: 2014-10-05
" Last Change: 2015-01-11
if exists('b:current_syntax')
finish
@@ -23,12 +23,12 @@ syntax match jControl /\<\%(for\|goto\|label\)_\a\k*\./
" Standard library names. A few names need to be defined with ":syntax match"
" because they would otherwise take precedence over the corresponding jControl
" and jDefineExpression items.
syntax keyword jStdlibNoun ARGV BINPATH CR CRLF DEL Debug EAV EMPTY FF FHS IF64 IFIOS IFJCDROID IFJHS IFQT IFRASPI IFUNIX IFWIN IFWINCE IFWINE IFWOW64 JB01 JBOXED JCHAR JCMPX JFL JINT JPTR JSIZES JSTR JTYPES JVERSION LF LF2 TAB UNAME UNXLIB andurl dbhelp libjqt
syntax keyword jStdlibAdverb define each every fapplylines inv inverse items leaf rows table
syntax keyword jStdlibNoun ARGV BINPATH CR CRLF DEL Debug EAV EMPTY FF FHS IF64 IFIOS IFJCDROID IFJHS IFQT IFRASPI IFUNIX IFWIN IFWINCE IFWINE IFWOW64 JB01 JBOXED JCHAR JCMPX JFL JINT JPTR JSIZES JSTR JTYPES JVERSION LF LF2 TAB UNAME UNXLIB dbhelp libjqt
syntax keyword jStdlibAdverb define each every fapplylines inv inverse items leaf rows rxapply rxmerge table
syntax keyword jStdlibConjunction bind cuts def on
syntax keyword jStdlibVerb AND Endian IFDEF Note OR XOR alpha17 alpha27 anddf android_exec_host andunzip apply boxopen boxxopen bx calendar cd cdcb cder cderx cdf charsub chopstring clear coclass cocreate cocurrent codestroy coerase cofind cofindv cofullname coinfo coinsert coname conames conew conl conouns conounsx copath copathnl copathnlx coreset costate cut cutLF cutopen cutpara datatype dbctx dberm dberr dbg dbjmp dblocals dblxq dblxs dbnxt dbq dbr dbret dbrr dbrrx dbrun dbs dbsig dbsq dbss dbst dbstack dbstk dbstop dbstopme dbstopnext dbstops dbtrace dbview deb debc delstring detab dfh dir dircompare dircompares dirfind dirpath dirss dirssrplc dirtree dirused dlb dltb dltbs dquote drop dropafter dropto dtb dtbs echo empty endian erase evtloop exit expand f2utf8 fappend fappends fboxname fc fcopynew fdir ferase fetch fexist fexists fgets file2url fixdotdot fliprgb fmakex foldpara foldtext fpathcreate fpathname fputs fread freadblock freadr freads frename freplace fsize fss fssrplc fstamp fstringreplace ftype fview fwrite fwritenew fwrites getargs getdate getenv getqtbin hfd hostpathsep ic install iospath isatty isotimestamp isutf8 jcwdpath joinstring jpathsep jsystemdefs list ljust load loadd mema memf memr memw nameclass namelist names nc nl pick quote require rjust rplc script scriptd setbreak show sign sminfo smoutput sort split splitnostring splitstring ss startupandroid startupconsole startupide stderr stdin stdout stringreplace symdat symget symset take takeafter taketo timespacex timestamp timex tmoutput toCRLF toHOST toJ todate todayno tolower topara toupper tsdiff tsrep tstamp type ucp ucpcount unxlib usleep utf8 uucp valdate wcsize weekday weeknumber weeksinyear winpathsep
syntax keyword jStdlibVerb AND Endian IFDEF OR XOR anddf android_exec_am android_exec_host andunzip apply boxopen boxxopen bx calendar cd cdcb cder cderx cdf charsub chopstring cleartags clear coclass cocreate cocurrent codestroy coerase cofind cofindv cofullname coinfo coinsert compare coname conames conew conl conouns conounsx copath copathnl copathnlx coreset costate cut cutLF cutopen cutpara datatype dbctx dberm dberr dbg dbjmp dblocals dblxq dblxs dbnxt dbq dbr dbret dbrr dbrrx dbrun dbs dbsig dbsq dbss dbst dbstack dbstk dbstop dbstopme dbstopnext dbstops dbtrace dbview deb debc delstring detab dfh dir dircompare dircompares dirfind dirpath dirss dirssrplc dirtree dirused dlb dltb dltbs dquote drop dropafter dropto dtb dtbs echo empty endian erase evtloop exit expand f2utf8 fappend fappends fboxname fc fcompare fcompares fcopynew fdir ferase fetch fexist fexists fgets file2url fixdotdot fliprgb fmakex foldpara foldtext fpathcreate fpathname fputs fread freadblock freadr freads frename freplace fsize fss fssrplc fstamp fstringreplace ftype fview fwrite fwritenew fwrites getalpha getargs getdate getenv getqtbin hfd hostpathsep ic install iospath isatty isotimestamp isutf8 jcwdpath joinstring jpath jpathsep jsystemdefs launch list ljust load loadd loadtags mema memf memr memw nameclass namelist names nc nl pick quote require rjust rplc rxE rxall rxcomp rxcut rxeq rxerror rxfirst rxfree rxfrom rxhandles rxin rxindex rxinfo rxmatch rxmatches rxrplc rxutf8 script scriptd scripts setalpha setbreak shell show sign sminfo smoutput sort split splitnostring splitstring ss startupandroid startupconsole startupide stderr stdin stdout stringreplace symdat symget symset ta tagcp tagopen tagselect take takeafter taketo timespacex timestamp timex tmoutput toCRLF toHOST toJ todate todayno tolower topara toupper tsdiff tsrep tstamp type ucp ucpcount unxlib usleep utf8 uucp valdate wcsize weekday weeknumber weeksinyear winpathsep xedit
syntax match jStdlibNoun /\<\%(adverb\|conjunction\|dyad\|monad\|noun\|verb\)\>/
syntax match jStdlibVerb /\<\%(assert\|break\|do\)\>\.\@!/
syntax match jStdlibVerb /\<\%(Note\|\%(assert\|break\|do\)\.\@!\)\>/
" Numbers. Matching J numbers is difficult. In fact, the job cannot be done
" with regular expressions alone. Below is a sketch of the pattern used. It
@@ -75,12 +75,12 @@ syntax match jConjunction /;\.\|\^:\|![.:]/
" the next line. The trick is to split the problem into two regions and link
" them with "nextgroup=". The fold wrapper provides syntax folding.
syntax region jNounDefineFold
\ matchgroup=NONE start=/\<\%(\%(0\|noun\)\s\+\%(\:\s*0\|def\s\+0\|define\)\>\)\@=/
\ matchgroup=NONE start=/\%(\%(\%(^\s*Note\)\|\<\%(0\|noun\)\s\+\%(\:\s*0\|def\s\+0\|define\)\)\>\)\@=/
\ keepend matchgroup=NONE end=/^\s*)\s*$/
\ contains=jNounDefineStart
\ fold
syntax region jNounDefineStart
\ matchgroup=jDefineExpression start=/\<\%(0\|noun\)\s\+\%(\:\s*0\|def\s\+0\|define\)\>/
\ matchgroup=jDefineExpression start=/\%(\%(^\s*Note\)\|\<\%(0\|noun\)\s\+\%(\:\s*0\|def\s\+0\|define\)\)\>/
\ keepend matchgroup=NONE end=/$/
\ contains=@jStdlibItems,@jPrimitiveItems,jNumber,jString,jParenGroup,jParen,jComment
\ contained oneline skipempty nextgroup=jDefineEnd,jNounDefine
@@ -112,7 +112,7 @@ syntax region jParenGroup
\ oneline transparent
syntax keyword jTodo contained TODO FIXME XXX
syntax match jComment /NB\..*$/ contains=jTodo,@Spell
syntax match jComment /\<NB\..*$/ contains=jTodo,@Spell
syntax match jSharpBang /\%^#!.*$/

79
runtime/syntax/less.vim Normal file
View File

@@ -0,0 +1,79 @@
" Vim syntax file
" Language: less
" Maintainer: Alessandro Vioni <jenoma@gmail.com>
" URL: https://github.com/genoma/vim-less
" Last Change: 2014 November 24
if exists("b:current_syntax")
finish
endif
runtime! syntax/css.vim
runtime! after/syntax/css.vim
syn case ignore
syn cluster lessCssProperties contains=cssFontProp,cssFontDescriptorProp,cssColorProp,cssTextProp,cssBoxProp,cssGeneratedContentProp,cssPagingProp,cssUIProp,cssRenderProp,cssAuralProp,cssTableProp
syn cluster lessCssAttributes contains=css.*Attr,lessEndOfLineComment,lessComment,cssValue.*,cssColor,cssURL,lessDefault,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssRenderProp
syn region lessDefinition matchgroup=cssBraces start="{" end="}" contains=TOP
syn match lessProperty "\%([{};]\s*\|^\)\@<=\%([[:alnum:]-]\|#{[^{}]*}\)\+\s*:" contains=css.*Prop skipwhite nextgroup=lessCssAttribute contained containedin=lessDefinition
syn match lessProperty "^\s*\zs\s\%(\%([[:alnum:]-]\|#{[^{}]*}\)\+\s*:\|:[[:alnum:]-]\+\)"hs=s+1 contains=css.*Prop skipwhite nextgroup=lessCssAttribute
syn match lessProperty "^\s*\zs\s\%(:\=[[:alnum:]-]\+\s*=\)"hs=s+1 contains=css.*Prop skipwhite nextgroup=lessCssAttribute
syn match lessCssAttribute +\%("\%([^"]\|\\"\)*"\|'\%([^']\|\\'\)*'\|#{[^{}]*}\|[^{};]\)*+ contained contains=@lessCssAttributes,lessVariable,lessFunction,lessInterpolation
syn match lessDefault "!default\>" contained
" less variables and media queries
syn match lessVariable "@[[:alnum:]_-]\+" nextgroup=lessCssAttribute skipwhite
syn match lessMedia "@media" nextgroup=lessCssAttribute skipwhite
" Less functions
syn match lessFunction "\<\%(escape\|e\|unit\)\>(\@=" contained
syn match lessFunction "\<\%(ceil\|floor\|percentage\|round\|sqrt\|abs\|sin\|asin\|cos\|acos\|tan\|atan\|pi\|pow\|min\|max\)\>(\@=" contained
syn match lessFunction "\<\%(rgb\|rgba\|argb\|argb\|hsl\|hsla\|hsv\|hsva\)\>(\@=" contained
syn match lessFunction "\<\%(hue\|saturation\|lightness\|red\|green\|blue\|alpha\|luma\)\>(\@=" contained
syn match lessFunction "\<\%(saturate\|desaturate\|lighten\|darken\|fadein\|fadeout\|fade\|spin\|mix\|greyscale\|contrast\)\>(\@=" contained
syn match lessFunction "\<\%(multiply\|screen\|overlay\|softlight\|hardlight\|difference\|exclusion\|average\|negation\)\>(\@=" contained
" Less id class visualization
syn match lessIdChar "#[[:alnum:]_-]\@=" nextgroup=lessId,lessClassIdCall
syn match lessId "[[:alnum:]_-]\+" contained
syn match lessClassIdCall "[[:alnum:]_-]\+()" contained
syn match lessClassChar "\.[[:alnum:]_-]\@=" nextgroup=lessClass,lessClassCall
syn match lessClass "[[:alnum:]_-]\+" contained
syn match lessClassCall "[[:alnum:]_-]\+()" contained
syn match lessAmpersand "&" contains=lessIdChar,lessClassChar
syn region lessInclude start="@import" end=";\|$" contains=lessComment,cssURL,cssUnicodeEscape,cssMediaType,cssStringQ,cssStringQQ
syn keyword lessTodo FIXME NOTE TODO OPTIMIZE XXX contained
syn region lessComment start="^\z(\s*\)//" end="^\%(\z1 \)\@!" contains=lessTodo,@Spell
syn region lessCssComment start="^\z(\s*\)/\*" end="^\%(\z1 \)\@!" contains=lessTodo,@Spell
syn match lessEndOfLineComment "//.*" contains=lessComment,lessTodo,@Spell
hi def link lessEndOfLineComment lessComment
hi def link lessCssComment lessComment
hi def link lessComment Comment
hi def link lessDefault cssImportant
hi def link lessVariable Identifier
hi def link lessFunction PreProc
hi def link lessTodo Todo
hi def link lessInclude Include
hi def link lessIdChar Special
hi def link lessClassChar Special
hi def link lessAmpersand Character
hi def link lessId Identifier
hi def link lessClass Type
hi def link lessCssAttribute PreProc
hi def link lessClassCall Type
hi def link lessClassIdCall Type
hi def link lessTagName cssTagName
hi def link lessDeprecated cssDeprecated
hi def link lessMedia cssMedia
let b:current_syntax = "less"
" vim:set sw=2:

View File

@@ -1,28 +1,23 @@
" Vim syntax file
" Language: Lisp
" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz>
" Last Change: Nov 16, 2010
" Version: 22
" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
" Last Change: Oct 06, 2014
" Version: 23
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_LISP
"
" Thanks to F Xavier Noria for a list of 978 Common Lisp symbols
" taken from the HyperSpec
" Thanks to F Xavier Noria for a list of 978 Common Lisp symbols taken from HyperSpec
" Clisp additions courtesy of http://clisp.cvs.sourceforge.net/*checkout*/clisp/clisp/emacs/lisp.vim
" ---------------------------------------------------------------------
" Load Once: {{{1
" For vim-version 5.x: Clear all syntax items
" For vim-version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
if exists("b:current_syntax")
finish
endif
if version >= 600
setlocal iskeyword=38,42,43,45,47-58,60-62,64-90,97-122,_
if exists("g:lisp_isk")
exe "setl isk=".g:lisp_isk
else
set iskeyword=38,42,43,45,47-58,60-62,64-90,97-122,_
setl isk=38,42,43,45,47-58,60-62,64-90,97-122,_
endif
if exists("g:lispsyntax_ignorecase") || exists("g:lispsyntax_clisp")

View File

@@ -1,9 +1,9 @@
" Vim syntax file
" Language: Maple V (based on release 4)
" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz>
" Last Change: Jan 05, 2010
" Version: 10
" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
" Last Change: Oct 23, 2014
" Version: 11
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_MAPLE
"
" Package Function Selection: {{{1
" Because there are a lot of packages, and because of the potential for namespace

View File

@@ -1,7 +1,8 @@
" Vim syntax file
" Language: mplayer(1) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2007-06-17
" Language: mplayer(1) configuration file
" Maintainer: Dmitri Vereshchagin <dmitri.vereshchagin@gmail.com>
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2015-01-24
if exists("b:current_syntax")
finish
@@ -19,7 +20,7 @@ syn region mplayerconfComment display oneline start='#' end='$'
syn keyword mplayerconfPreProc include
syn keyword mplayerconfBoolean yes no
syn keyword mplayerconfBoolean yes no true false
syn match mplayerconfNumber '\<\d\+\>'
@@ -68,7 +69,49 @@ syn keyword mplayerconfOption hardframedrop nomouseinput bandwidth dumpstream
\ audio-delay audio-preload endpos ffourcc
\ include info noautoexpand noskip o oac of
\ ofps ovc skiplimit v vobsubout vobsuboutid
\ lameopts lavcopts nuvopts xvidencopts
\ lameopts lavcopts nuvopts xvidencopts a52drc
\ adapter af-add af-clr af-del af-pre
\ allow-dangerous-playlist-parsing ass
\ ass-border-color ass-bottom-margin ass-color
\ ass-font-scale ass-force-style ass-hinting
\ ass-line-spacing ass-styles ass-top-margin
\ ass-use-margins ausid bluray-angle
\ bluray-device border border-pos-x border-pos-y
\ cache-min cache-seek-min capture codecpath
\ codecs-file correct-pts crash-debug
\ doubleclick-time dvd-speed edl-backward-delay
\ edl-start-pts embeddedfonts fafmttag
\ field-dominance fontconfig force-avi-aspect
\ force-key-frames frameno-file fullscreen gamma
\ gui gui-include gui-wid heartbeat-cmd
\ heartbeat-interval hr-edl-seek
\ http-header-fields idle ignore-start
\ key-fifo-size list-properties menu-chroot
\ menu-keepdir menu-startup mixer-channel
\ monitor-orientation monitorpixelaspect
\ mouse-movements msgcharset msgcolor msglevel
\ msgmodule name noar nocache noconfig
\ noconsolecontrols nocorrect-pts nodouble
\ noedl-start-pts noencodedups
\ noflip-hebrew-commas nogui noidx noodml
\ nostop-xscreensaver nosub noterm-osd
\ osd-duration osd-fractions panscanrange
\ pausing playing-msg priority profile
\ progbar-align psprobe pvr radio referrer
\ refreshrate reuse-socket rtc rtc-device
\ rtsp-destination rtsp-port
\ rtsp-stream-over-http screenh show-profile
\ softvol softvol-max sub-paths subfont
\ term-osd-esc title tvscan udp-ip udp-master
\ udp-port udp-seek-threshold udp-slave
\ unrarexec use-filedir-conf use-filename-title
\ vf-add vf-clr vf-del vf-pre volstep volume
\ zrhdec zrydoff
syn region mplayerconfString display oneline start=+"+ end=+"+
syn region mplayerconfString display oneline start=+'+ end=+'+
syn region mplayerconfProfile display oneline start='^\s*\[' end='\]'
hi def link mplayerconfTodo Todo
hi def link mplayerconfComment Comment
@@ -76,6 +119,8 @@ hi def link mplayerconfPreProc PreProc
hi def link mplayerconfBoolean Boolean
hi def link mplayerconfNumber Number
hi def link mplayerconfOption Keyword
hi def link mplayerconfString String
hi def link mplayerconfProfile Special
let b:current_syntax = "mplayerconf"

View File

@@ -1,7 +1,7 @@
" Language : Netrw Remote-Directory Listing Syntax
" Maintainer : Charles E. Campbell, Jr.
" Last change: Mar 07, 2014
" Version : 18
" Maintainer : Charles E. Campbell
" Last change: Oct 06, 2014
" Version : 19
" ---------------------------------------------------------------------
" Syntax Clearing: {{{1
@@ -16,7 +16,7 @@ endif
syn cluster NetrwGroup contains=netrwHide,netrwSortBy,netrwSortSeq,netrwQuickHelp,netrwVersion,netrwCopyTgt
syn cluster NetrwTreeGroup contains=netrwDir,netrwSymLink,netrwExe
syn match netrwPlain "\(\S\+ \)*\S\+" contains=@NoSpell
syn match netrwPlain "\(\S\+ \)*\S\+" contains=netrwLink,@NoSpell
syn match netrwSpecial "\%(\S\+ \)*\S\+[*|=]\ze\%(\s\{2,}\|$\)" contains=netrwClassify,@NoSpell
syn match netrwDir "\.\{1,2}/" contains=netrwClassify,@NoSpell
"syn match netrwDir "\%(\S\+ \)*\S\+/" contains=netrwClassify,@NoSpell
@@ -24,7 +24,11 @@ syn match netrwDir "\%(\S\+ \)*\S\+/\ze\%(\s\{2,}\|$\)" contains=netrwClassi
syn match netrwSizeDate "\<\d\+\s\d\{1,2}/\d\{1,2}/\d\{4}\s" skipwhite contains=netrwDateSep,@NoSpell nextgroup=netrwTime
syn match netrwSymLink "\%(\S\+ \)*\S\+@\ze\%(\s\{2,}\|$\)" contains=netrwClassify,@NoSpell
syn match netrwExe "\%(\S\+ \)*\S*[^~]\*\ze\%(\s\{2,}\|$\)" contains=netrwClassify,@NoSpell
if has("gui_running") && (&enc == 'utf-8' || &enc == 'utf-16' || &enc == 'ucs-4')
syn match netrwTreeBar "^\%([-+|│] \)\+" contains=netrwTreeBarSpace nextgroup=@netrwTreeGroup
else
syn match netrwTreeBar "^\%([-+|] \)\+" contains=netrwTreeBarSpace nextgroup=@netrwTreeGroup
endif
syn match netrwTreeBarSpace " " contained
syn match netrwClassify "[*=|@/]\ze\%(\s\{2,}\|$\)" contained
@@ -44,10 +48,11 @@ syn match netrwList ".*$" contained contains=netrwComma,@NoSpell
syn match netrwComma "," contained
syn region netrwQuickHelp matchgroup=Comment start="Quick Help:\s\+" end="$" contains=netrwHelpCmd,netrwQHTopic,@NoSpell keepend contained
syn match netrwHelpCmd "\S\+\ze:" contained skipwhite contains=@NoSpell nextgroup=netrwCmdSep
syn match netrwQHTopic "-\a\+-" contained skipwhite
syn match netrwQHTopic "([a-zA-Z &]\+)" contained skipwhite
syn match netrwCmdSep ":" contained nextgroup=netrwCmdNote
syn match netrwCmdNote ".\{-}\ze " contained contains=@NoSpell
syn match netrwVersion "(netrw.*)" contained contains=@NoSpell
syn match netrwLink "-->" contained skipwhite
" -----------------------------
" Special filetype highlighting {{{1
@@ -95,6 +100,7 @@ if !exists("did_drchip_netrwlist_syntax")
hi default link netrwComma netrwComment
hi default link netrwHide netrwComment
hi default link netrwMarkFile TabLineSel
hi default link netrwLink Special
" special syntax highlighting (see :he g:netrw_special_syntax)
hi default link netrwBak NonText

View File

@@ -3,12 +3,11 @@
" Maintainer: Jakson Aquino <jalvesaq@gmail.com>
" Former Maintainers: Vaidotas Zemlys <zemlys@gmail.com>
" Tom Payne <tom@tompayne.org>
" Last Change: Wed Jul 09, 2014 10:29PM
" Last Change: Wed Dec 31, 2014 12:36AM
" Filenames: *.R *.r *.Rhistory *.Rt
"
" NOTE: The highlighting of R functions is defined in the
" r-plugin/functions.vim, which is part of vim-r-plugin2:
" http://www.vim.org/scripts/script.php?script_id=2628
"
" NOTE: The highlighting of R functions is defined in
" runtime files created by a filetype plugin, if installed.
"
" CONFIGURATION:
" syntax folding can be turned on by
@@ -37,9 +36,9 @@ syn match rComment contains=@Spell,rCommentTodo "#.*"
syn match rOKeyword contained "@\(param\|return\|name\|rdname\|examples\|include\|docType\)"
syn match rOKeyword contained "@\(S3method\|TODO\|aliases\|alias\|assignee\|author\|callGraphDepth\|callGraph\)"
syn match rOKeyword contained "@\(callGraphPrimitives\|concept\|exportClass\|exportMethod\|exportPattern\|export\|formals\)"
syn match rOKeyword contained "@\(format\|importClassesFrom\|importFrom\|importMethodsFrom\|import\|keywords\)"
syn match rOKeyword contained "@\(format\|importClassesFrom\|importFrom\|importMethodsFrom\|import\|keywords\|useDynLib\)"
syn match rOKeyword contained "@\(method\|noRd\|note\|references\|seealso\|setClass\|slot\|source\|title\|usage\)"
syn match rOKeyword contained "@\(family\|template\|templateVar\|description\|details\|inheritsParams\)"
syn match rOKeyword contained "@\(family\|template\|templateVar\|description\|details\|inheritParams\)"
syn match rOComment contains=@Spell,rOKeyword "#'.*"
@@ -79,12 +78,12 @@ syn keyword rRepeat for in repeat while
syn keyword rConstant T F LETTERS letters month.abb month.name pi
syn keyword rConstant R.version.string
syn keyword rNumber NA_integer_ NA_real_ NA_complex_ NA_character_
syn keyword rNumber NA_integer_ NA_real_ NA_complex_ NA_character_
" Constants
syn keyword rConstant NULL
syn keyword rBoolean FALSE TRUE
syn keyword rNumber NA Inf NaN
syn keyword rNumber NA Inf NaN
" integer
syn match rInteger "\<\d\+L"
@@ -93,7 +92,7 @@ syn match rInteger "\<\d\+[Ee]+\=\d\+L"
" number with no fractional part or exponent
syn match rNumber "\<\d\+\>"
" hexadecimal number
" hexadecimal number
syn match rNumber "\<0x\([0-9]\|[a-f]\|[A-F]\)\+"
" floating point number with integer and fractional parts and optional exponent
@@ -111,17 +110,19 @@ syn match rComplex "\<\d\+\.\d*\([Ee][-+]\=\d\+\)\=i"
syn match rComplex "\<\.\d\+\([Ee][-+]\=\d\+\)\=i"
syn match rComplex "\<\d\+[Ee][-+]\=\d\+i"
syn match rAssign '='
syn match rOperator "&"
syn match rOperator '-'
syn match rOperator '\*'
syn match rOperator '+'
syn match rOperator '='
if &filetype != "rmd" && &filetype != "rrst"
syn match rOperator "[|!<>^~/:]"
else
syn match rOperator "[|!<>^~`/:]"
endif
syn match rOperator "%\{2}\|%\S\{-}%"
syn match rOperator '\([!><]\)\@<=='
syn match rOperator '=='
syn match rOpError '\*\{3}'
syn match rOpError '//'
syn match rOpError '&&&'
@@ -129,8 +130,8 @@ syn match rOpError '|||'
syn match rOpError '<<'
syn match rOpError '>>'
syn match rArrow "<\{1,2}-"
syn match rArrow "->\{1,2}"
syn match rAssign "<\{1,2}-"
syn match rAssign "->\{1,2}"
" Special
syn match rDelimiter "[,;:]"
@@ -151,9 +152,14 @@ syn match rBraceError "[)}]" contained
syn match rCurlyError "[)\]]" contained
syn match rParenError "[\]}]" contained
" Source list of R functions. The list is produced by the Vim-R-plugin
" http://www.vim.org/scripts/script.php?script_id=2628
runtime r-plugin/functions.vim
" Source list of R functions produced by a filetype plugin (if installed)
if has("nvim")
" Nvim-R
runtime R/functions.vim
else
" Vim-R-plugin
runtime r-plugin/functions.vim
endif
syn match rDollar display contained "\$"
syn match rDollar display contained "@"
@@ -171,7 +177,7 @@ if &filetype == "rhelp"
endif
" Type
syn keyword rType array category character complex double function integer list logical matrix numeric vector data.frame
syn keyword rType array category character complex double function integer list logical matrix numeric vector data.frame
" Name of object with spaces
if &filetype != "rmd" && &filetype != "rrst"
@@ -179,13 +185,19 @@ if &filetype != "rmd" && &filetype != "rrst"
endif
if &filetype == "rhelp"
syn match rhPreProc "^#ifdef.*"
syn match rhPreProc "^#endif.*"
syn match rhPreProc "^#ifdef.*"
syn match rhPreProc "^#endif.*"
syn match rhSection "\\dontrun\>"
endif
if exists("r_syn_minlines")
exe "syn sync minlines=" . r_syn_minlines
else
syn sync minlines=40
endif
" Define the default highlighting.
hi def link rArrow Statement
hi def link rAssign Statement
hi def link rBoolean Boolean
hi def link rBraceError Error
hi def link rComment Comment
@@ -204,7 +216,7 @@ hi def link rHelpIdent Identifier
hi def link rhPreProc PreProc
hi def link rhSection PreCondit
hi def link rInteger Number
hi def link rLstElmt Normal
hi def link rLstElmt Normal
hi def link rNameWSpace Normal
hi def link rNumber Number
hi def link rOperator Operator

View File

@@ -1,8 +1,9 @@
" Vim syntax file
" Language: Windows Registry export with regedit (*.reg)
" Maintainer: Dominique St<EFBFBD>phan (dominique@mggen.com)
" URL: http://www.mggen.com/vim/syntax/registry.zip
" Last change: 2004 Apr 23
" Maintainer: Dominique Stéphan (dominique@mggen.com)
" URL: http://www.mggen.com/vim/syntax/registry.zip (doesn't work)
" Last change: 2014 Oct 31
" Included patch from Alexander A. Ulitin
" clear any unwanted syntax defs
" For version 5.x: Clear all syntax items
@@ -17,7 +18,7 @@ endif
syn case ignore
" Head of regedit .reg files, it's REGEDIT4 on Win9#/NT
syn match registryHead "^REGEDIT[0-9]*$"
syn match registryHead "^REGEDIT[0-9]*\s*$\|^Windows Registry Editor Version \d*\.\d*\s*$"
" Comment
syn match registryComment "^;.*$"
@@ -58,7 +59,7 @@ syn region registryRemove start="\[\-" end="\]" contains=registryHKEY,registryGU
" Subkey
syn match registrySubKey "^\".*\"="
" Default value
syn match registrySubKey "^\@="
syn match registrySubKey "^@="
" Numbers

View File

@@ -1,15 +1,11 @@
" Vim syntax file
" Language: rpcgen
" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz>
" Last Change: Sep 06, 2005
" Version: 8
" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
" Last Change: Jan 13, 2015
" Version: 10
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_RPCGEN
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
if exists("b:current_syntax")
finish
endif

View File

@@ -2,10 +2,10 @@
" 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: Mar 20, 2014
" Version: 132
" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax
" For options and settings, please use: :help ft-sh-syntax
" Last Change: Jan 08, 2015
" Version: 134
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH
" For options and settings, please use: :help ft-sh-syntax
" This file includes many ideas from ?ric Brunet (eric.brunet@ens.fr)
" For version 5.x: Clear all syntax items {{{1
@@ -17,7 +17,7 @@ elseif exists("b:current_syntax")
endif
" AFAICT "." should be considered part of the iskeyword. Using iskeywords in
" syntax is dicey, so the following code permits the user to
" syntax is dicey, so the following code permits the user to prevent/override
" g:sh_isk set to a string : specify iskeyword.
" g:sh_noisk exists : don't change iskeyword
" g:sh_noisk does not exist : (default) append "." to iskeyword
@@ -104,7 +104,7 @@ syn cluster shErrorList contains=shDoError,shIfError,shInError,shCaseError,shEsa
if exists("b:is_kornshell")
syn cluster ErrorList add=shDTestError
endif
syn cluster shArithParenList contains=shArithmetic,shCaseEsac,shDeref,shDerefSimple,shEcho,shEscape,shNumber,shOperator,shPosnParm,shExSingleQuote,shExDoubleQuote,shRedir,shSingleQuote,shDoubleQuote,shStatement,shVariable,shAlias,shTest,shCtrlSeq,shSpecial,shParen,bashSpecialVariables,bashStatement
syn cluster shArithParenList contains=shArithmetic,shCaseEsac,shComment,shDeref,shDerefSimple,shDo,shEcho,shEscape,shIf,shFor,shNumber,shOperator,shPosnParm,shExSingleQuote,shExDoubleQuote,shRedir,shSingleQuote,shDoubleQuote,shStatement,shVariable,shAlias,shTest,shCtrlSeq,shSpecial,shParen,bashSpecialVariables,bashStatement
syn cluster shArithList contains=@shArithParenList,shParenError
syn cluster shCaseEsacList contains=shCaseStart,shCase,shCaseBar,shCaseIn,shComment,shDeref,shDerefSimple,shCaseCommandSub,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote,shCtrlSeq,@shErrorList,shStringSpecial,shCaseRange
syn cluster shCaseList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq
@@ -127,7 +127,7 @@ syn cluster shHereList contains=shBeginHere,shHerePayload
syn cluster shHereListDQ contains=shBeginHere,@shDblQuoteList,shHerePayload
syn cluster shIdList contains=shCommandSub,shWrapLineOperator,shSetOption,shDeref,shDerefSimple,shRedir,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shCtrlSeq,shStringSpecial,shAtExpr
syn cluster shIfList contains=@shLoopList,shDblBrace,shDblParen,shFunctionKey,shFunctionOne,shFunctionTwo
syn cluster shLoopList contains=@shCaseList,shTestOpr,shExpr,shDblBrace,shConditional,shCaseEsac,shTest,@shErrorList,shSet,shOption
syn cluster shLoopList contains=@shCaseList,shIf,shFor,shForPP,shTestOpr,shExpr,shDblBrace,shConditional,shCaseEsac,shTest,@shErrorList,shSet,shOption
syn cluster shSubShList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shIf,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq,shOperator
syn cluster shTestList contains=shCharClass,shComment,shCommandSub,shDeref,shDerefSimple,shExDoubleQuote,shDoubleQuote,shExpr,shNumber,shOperator,shExSingleQuote,shSingleQuote,shTestOpr,shTest,shCtrlSeq
" Echo: {{{1
@@ -151,18 +151,18 @@ endif
" Error Codes: {{{1
" ============
if !exists("g:sh_no_error")
syn match shDoError "\<done\>"
syn match shIfError "\<fi\>"
syn match shInError "\<in\>"
syn match shCaseError ";;"
syn match shEsacError "\<esac\>"
syn match shCurlyError "}"
syn match shParenError ")"
syn match shOK '\.\(done\|fi\|in\|esac\)'
syn match shDoError "\<done\>"
syn match shIfError "\<fi\>"
syn match shInError "\<in\>"
syn match shCaseError ";;"
syn match shEsacError "\<esac\>"
syn match shCurlyError "}"
syn match shParenError ")"
syn match shOK '\.\(done\|fi\|in\|esac\)'
if exists("b:is_kornshell")
syn match shDTestError "]]"
syn match shDTestError "]]"
endif
syn match shTestError "]"
syn match shTestError "]"
endif
" Options: {{{1
@@ -197,9 +197,10 @@ syn region shTest transparent matchgroup=shStatement start="\<test\s" skip=+\\\\
syn match shTestOpr contained "<=\|>=\|!=\|==\|-.\>\|-\(nt\|ot\|ef\|eq\|ne\|lt\|le\|gt\|ge\)\>\|[!<>]"
syn match shTestOpr contained '=' skipwhite nextgroup=shTestDoubleQuote,shTestSingleQuote,shTestPattern
syn match shTestPattern contained '\w\+'
syn match shTestDoubleQuote contained '\%(\%(\\\\\)*\\\)\@<!"[^"]*"'
syn region shTestDoubleQuote contained start='"' skip='\\"' end='"' contains=shBQpairs
syn match shTestSingleQuote contained '\\.'
syn match shTestSingleQuote contained "'[^']*'"
syn match shBQpairs contained '\\\\'
if exists("b:is_kornshell") || exists("b:is_bash")
syn region shDblBrace matchgroup=Delimiter start="\[\[" skip=+\\\\\|\\$+ end="\]\]" contains=@shTestList
syn region shDblParen matchgroup=Delimiter start="((" skip=+\\\\\|\\$+ end="))" contains=@shTestList
@@ -216,11 +217,11 @@ if s:sh_fold_ifdofor
syn region shIf fold transparent matchgroup=shConditional start="\<if\_s" matchgroup=shConditional skip=+-fi\>+ end="\<;\_s*then\>" end="\<fi\>" contains=@shIfList
syn region shFor fold matchgroup=shLoop start="\<for\ze\_s\s*\%(((\)\@!" end="\<in\_s" end="\<do\>"me=e-2 contains=@shLoopList,shDblParen skipwhite nextgroup=shCurlyIn
else
syn region shDo transparent matchgroup=shConditional start="\<do\>" matchgroup=shConditional end="\<done\>" contains=@shLoopList
syn region shDo transparent matchgroup=shConditional start="\<do\>" matchgroup=shConditional end="\<done\>" contains=@shLoopList
syn region shIf transparent matchgroup=shConditional start="\<if\_s" matchgroup=shConditional skip=+-fi\>+ end="\<;\_s*then\>" end="\<fi\>" contains=@shIfList
syn region shFor matchgroup=shLoop start="\<for\ze\_s\s*\%(((\)\@!" end="\<in\>" end="\<do\>"me=e-2 contains=@shLoopList,shDblParen skipwhite nextgroup=shCurlyIn
syn match shForPP '\<for\>\ze\_s*(('
endif
syn region shForPP matchgroup=shLoop start='\<for\>\_s*((' end='))' contains=shTestOpr
if exists("b:is_kornshell") || exists("b:is_bash")
syn cluster shCaseList add=shRepeat
syn cluster shFunctionList add=shRepeat
@@ -280,7 +281,7 @@ if exists("b:is_kornshell") || exists("b:is_bash")
elseif !exists("g:sh_no_error")
syn region shCommandSub matchgroup=Error start="\$(" end=")" contains=@shCommandSubList
endif
syn region shCmdParenRegion matchgroup=shCmdSubRegion start="(" skip='\\\\\|\\.' end=")" contains=@shCommandSubList
syn region shCmdParenRegion matchgroup=shCmdSubRegion start="(\ze[^(]" skip='\\\\\|\\.' end=")" contains=@shCommandSubList
if exists("b:is_bash")
syn cluster shCommandSubList add=bashSpecialVariables,bashStatement
@@ -321,12 +322,12 @@ elseif !exists("g:sh_no_error")
endif
syn region shSingleQuote matchgroup=shQuote start=+'+ end=+'+ contains=@Spell
syn region shDoubleQuote matchgroup=shQuote start=+\%(\%(\\\\\)*\\\)\@<!"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell
"syn region shDoubleQuote matchgroup=shQuote start=+"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell
syn match shStringSpecial "[^[:print:] \t]" contained
syn match shStringSpecial "\%(\\\\\)*\\[\\"'`$()#]"
"syn match shSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shMoreSpecial,shComment
syn match shSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shMoreSpecial
syn match shSpecial "^\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shComment
syn match shMoreSpecial "\%(\\\\\)*\\[\\"'`$()#]" contained nextgroup=shMoreSpecial
syn match shSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shMoreSpecial,shComment
syn match shSpecial "^\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shComment
syn match shMoreSpecial "\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shMoreSpecial contained
" Comments: {{{1
"==========
@@ -363,9 +364,9 @@ elseif s:sh_fold_heredoc
syn region shHereDoc matchgroup=shRedir19 fold start="<<\\\z([^ \t|]*\)" matchgroup=shRedir19 end="^\z1\s*$"
else
syn region shHereDoc matchgroup=shRedir20 start="<<\s*\\\=\z([^ \t|]*\)" matchgroup=shRedir20 end="^\z1\s*$" contains=@shDblQuoteList
syn region shHereDoc matchgroup=shRedir20 start="<<\s*\\\=\z([^ \t|]*\)" matchgroup=shRedir20 end="^\z1\s*$" contains=@shDblQuoteList
syn region shHereDoc matchgroup=shRedir21 start="<<\s*\"\z([^ \t|]*\)\"" matchgroup=shRedir21 end="^\z1\s*$"
syn region shHereDoc matchgroup=shRedir22 start="<<-\s*\z([^ \t|]*\)" matchgroup=shRedir22 end="^\s*\z1\s*$" contains=@shDblQuoteList
syn region shHereDoc matchgroup=shRedir22 start="<<-\s*\z([^ \t|]*\)" matchgroup=shRedir22 end="^\s*\z1\s*$" contains=@shDblQuoteList
syn region shHereDoc matchgroup=shRedir23 start="<<-\s*'\z([^ \t|]*\)'" matchgroup=shRedir23 end="^\s*\z1\s*$"
syn region shHereDoc matchgroup=shRedir24 start="<<\s*'\z([^ \t|]*\)'" matchgroup=shRedir24 end="^\z1\s*$"
syn region shHereDoc matchgroup=shRedir25 start="<<-\s*\"\z([^ \t|]*\)\"" matchgroup=shRedir25 end="^\s*\z1\s*$"
@@ -450,21 +451,21 @@ syn match shDerefSpecial contained "\({[#!]\)\@<=[[:alnum:]*@_]\+" nextgroup=@s
syn match shDerefVar contained "{\@<=\k\+" nextgroup=@shDerefVarList
" sh ksh bash : ${var[... ]...} array reference: {{{1
syn region shDerefVarArray contained matchgroup=shDeref start="\[" end="]" contains=@shCommandSubList nextgroup=shDerefOp,shDerefOpError
syn region shDerefVarArray contained matchgroup=shDeref start="\[" end="]" contains=@shCommandSubList nextgroup=shDerefOp,shDerefOpError
" Special ${parameter OPERATOR word} handling: {{{1
" sh ksh bash : ${parameter:-word} word is default value
" sh ksh bash : ${parameter:=word} assign word as default value
" sh ksh bash : ${parameter:?word} display word if parameter is null
" sh ksh bash : ${parameter:+word} use word if parameter is not null, otherwise nothing
" ksh bash : ${parameter#pattern} remove small left pattern
" ksh bash : ${parameter##pattern} remove large left pattern
" ksh bash : ${parameter%pattern} remove small right pattern
" ksh bash : ${parameter%%pattern} remove large right pattern
" bash : ${parameter^pattern} Case modification
" bash : ${parameter^^pattern} Case modification
" bash : ${parameter,pattern} Case modification
" bash : ${parameter,,pattern} Case modification
" sh ksh bash : ${parameter:-word} word is default value
" sh ksh bash : ${parameter:=word} assign word as default value
" sh ksh bash : ${parameter:?word} display word if parameter is null
" sh ksh bash : ${parameter:+word} use word if parameter is not null, otherwise nothing
" ksh bash : ${parameter#pattern} remove small left pattern
" ksh bash : ${parameter##pattern} remove large left pattern
" ksh bash : ${parameter%pattern} remove small right pattern
" ksh bash : ${parameter%%pattern} remove large right pattern
" bash : ${parameter^pattern} Case modification
" bash : ${parameter^^pattern} Case modification
" bash : ${parameter,pattern} Case modification
" bash : ${parameter,,pattern} Case modification
syn cluster shDerefPatternList contains=shDerefPattern,shDerefString
if !exists("g:sh_no_error")
syn match shDerefOpError contained ":[[:punct:]]"
@@ -576,7 +577,7 @@ hi def link shDoubleQuote shString
hi def link shEcho shString
hi def link shEchoDelim shOperator
hi def link shEchoQuote shString
hi def link shForPP shLoop
"hi def link shForPP shLoop
hi def link shEmbeddedEcho shString
hi def link shEscape shCommandSub
hi def link shExDoubleQuote shDoubleQuote
@@ -598,12 +599,12 @@ hi def link shSetOption shOption
hi def link shSingleQuote shString
hi def link shSource shOperator
hi def link shStringSpecial shSpecial
hi def link shStringSpecial Unique
hi def link shSubShRegion shOperator
hi def link shTestOpr shConditional
hi def link shTestPattern shString
hi def link shTestDoubleQuote shString
hi def link shTestSingleQuote shString
hi def link shBQpairs shString
hi def link shVariable shSetList
hi def link shWrapLineOperator shOperator

View File

@@ -1,15 +1,11 @@
" Vim syntax file
" Language: sendmail
" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz>
" Last Change: Sep 06, 2005
" Version: 4
" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
" Last Change: Jan 13, 2015
" Version: 6
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SM
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
if exists("b:current_syntax")
finish
endif

View File

@@ -1,9 +1,8 @@
" Vim syntax file
" This is a GENERATED FILE. Please always refer to source file at the URI below.
" Language: strace output
" Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz>
" Last Change: 2002-10-10
" URL: http://trific.ath.cx/Ftp/vim/syntax/strace.vim
" Maintainer: David Necas (Yeti) <yeti@physics.muni.cz>
" Last Change: 2015-01-16
" Setup
if version >= 600
@@ -17,7 +16,7 @@ endif
syn case match
" Parse the line
syn match straceSpecialChar "\\\d\d\d\|\\." contained
syn match straceSpecialChar "\\\o\{1,3}\|\\." contained
syn region straceString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=straceSpecialChar oneline
syn match straceNumber "\W[+-]\=\(\d\+\)\=\.\=\d\+\([eE][+-]\=\d\+\)\="lc=1
syn match straceNumber "\W0x\x\+"lc=1

View File

@@ -1,8 +1,8 @@
" Language: tags
" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchip@PcampbellAfamily.Mbiz>
" Last Change: Sep 06, 2005
" Version: 3
" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax
" Maintainer: Charles E. Campbell <NdrOchip@PcampbellAfamily.Mbiz>
" Last Change: Oct 23, 2014
" Version: 4
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TAGS
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded

View File

@@ -1,8 +1,8 @@
" Vim syntax file
" Language: TeX
" Maintainer: Charles E. Campbell <NdrchipO@ScampbellPfamily.AbizM>
" Last Change: Sep 09, 2014
" Version: 82
" Last Change: Nov 18, 2014
" Version: 83
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX
"
" Notes: {{{1
@@ -64,6 +64,8 @@ if version >= 508 || !exists("did_tex_syntax_inits")
endif
if exists("g:tex_no_error") && g:tex_no_error
let s:tex_no_error= 1
else
let s:tex_no_error= 0
endif
" by default, enable all region-based highlighting
@@ -76,7 +78,6 @@ if exists("g:tex_fast")
else
let s:tex_fast= g:tex_fast
endif
let s:tex_no_error= 1
else
let s:tex_fast= "bcmMprsSvV"
endif
@@ -141,7 +142,7 @@ endif
" Clusters: {{{1
" --------
syn cluster texCmdGroup contains=texCmdBody,texComment,texDefParm,texDelimiter,texDocType,texInput,texLength,texLigature,texMathDelim,texMathOper,texNewCmd,texNewEnv,texRefZone,texSection,texBeginEnd,texBeginEndName,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle
if !exists("s:tex_no_error")
if !exists("s:tex_no_error") || !s:tex_no_error
syn cluster texCmdGroup add=texMathError
endif
syn cluster texEnvGroup contains=texMatcher,texMathDelim,texSpecialChar,texStatement
@@ -157,13 +158,13 @@ else
endif
syn cluster texPreambleMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,texMathZoneZ
syn cluster texRefGroup contains=texMatcher,texComment,texDelimiter
if !exists("tex_no_math")
if !exists("g:tex_no_math")
syn cluster texMathZones contains=texMathZoneV,texMathZoneW,texMathZoneX,texMathZoneY,texMathZoneZ
syn cluster texMatchGroup add=@texMathZones
syn cluster texMathDelimGroup contains=texMathDelimBad,texMathDelimKey,texMathDelimSet1,texMathDelimSet2
syn cluster texMathMatchGroup contains=@texMathZones,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMathDelim,texMathMatcher,texMathOper,texNewCmd,texNewEnv,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone
syn cluster texMathZoneGroup contains=texComment,texDelimiter,texLength,texMathDelim,texMathMatcher,texMathOper,texMathSymbol,texMathText,texRefZone,texSpecialChar,texStatement,texTypeSize,texTypeStyle
if !exists("s:tex_no_error")
if !exists("s:tex_no_error") || !s:tex_no_error
syn cluster texMathMatchGroup add=texMathError
syn cluster texMathZoneGroup add=texMathError
endif
@@ -185,7 +186,7 @@ endif
" Try to flag {} and () mismatches: {{{1
if s:tex_fast =~ 'm'
if !exists("s:tex_no_error")
if !exists("s:tex_no_error") || !s:tex_no_error
syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" contains=@texMatchGroup,texError
syn region texMatcher matchgroup=Delimiter start="\[" end="]" contains=@texMatchGroup,texError,@NoSpell
else
@@ -198,12 +199,12 @@ if s:tex_fast =~ 'm'
syn region texParen start="(" end=")" contains=@texMatchGroup
endif
endif
if !exists("s:tex_no_error")
if !exists("s:tex_no_error") || !s:tex_no_error
syn match texError "[}\])]"
endif
if s:tex_fast =~ 'M'
if !exists("tex_no_math")
if !exists("s:tex_no_error")
if !exists("g:tex_no_math")
if !exists("s:tex_no_error") || !s:tex_no_error
syn match texMathError "}" contained
endif
syn region texMathMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\}" end="}" end="%stopzone\>" contained contains=@texMathMatchGroup
@@ -217,7 +218,7 @@ if exists("g:tex_tex") || b:tex_stylish
syn match texStatement "\\[a-zA-Z@]\+"
else
syn match texStatement "\\\a\+"
if !exists("s:tex_no_error")
if !exists("s:tex_no_error") || !s:tex_no_error
syn match texError "\\\a*@[a-zA-Z@]*"
endif
endif
@@ -358,6 +359,7 @@ if s:tex_fast =~ 'p'
syn region texSubParaZone matchgroup=texSection start='\\subparagraph\>' end='\ze\s*\\\%(\%(sub\)\=paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@Spell
syn region texTitle matchgroup=texSection start='\\\%(author\|title\)\>\s*{' end='}' contains=@texFoldGroup,@Spell
syn region texAbstract matchgroup=texSection start='\\begin\s*{\s*abstract\s*}' end='\\end\s*{\s*abstract\s*}' contains=@texFoldGroup,@Spell
syn region texSpellZone matchgroup=texSpellZone start="%spellzone_start" end="%spellzone_end" contains=@Spell
endif
else
if g:tex_fold_enabled && has("folding")
@@ -397,14 +399,14 @@ if s:tex_fast =~ 'b'
endif
" Bad Math (mismatched): {{{1
if !exists("g:tex_no_math") && !exists("s:tex_no_error")
if !exists("g:tex_no_math") && (!exists("s:tex_no_error") || !s:tex_no_error)
syn match texBadMath "\\end\s*{\s*\(array\|gathered\|bBpvV]matrix\|split\|subequations\|smallmatrix\|xxalignat\)\s*}"
syn match texBadMath "\\end\s*{\s*\(align\|alignat\|displaymath\|displaymath\|eqnarray\|equation\|flalign\|gather\|math\|multline\|xalignat\)\*\=\s*}"
syn match texBadMath "\\[\])]"
endif
" Math Zones: {{{1
if !exists("tex_no_math")
if !exists("g:tex_no_math")
" TexNewMathZone: function creates a mathzone with the given suffix and mathzone name. {{{2
" Starred forms are created if starform is true. Starred
" forms have syntax group and synchronization groups with a
@@ -541,7 +543,7 @@ else
syn match texSpecialChar "\\[SP@]\A"me=e-1
endif
syn match texSpecialChar "\\\\"
if !exists("tex_no_math")
if !exists("g:tex_no_math")
syn match texOnlyMath "[_^]"
endif
syn match texSpecialChar "\^\^[0-9a-f]\{2}\|\^\^\S"
@@ -574,12 +576,14 @@ else
syn match texComment "%.*$" contains=@texCommentGroup
if s:tex_fast =~ 'c'
syn region texComment start="^\zs\s*%.*\_s*%" skip="^\s*%" end='^\ze\s*[^%]' fold
syn region texNoSpell contained fold matchgroup=texComment start="%\s*nospell\s*{" end="%\s*nospell\s*}" contains=@texFoldGroup,@NoSpell
syn region texNoSpell contained matchgroup=texComment start="%\s*nospell\s*{" end="%\s*nospell\s*}" fold contains=@texFoldGroup,@NoSpell
syn region texSpellZone matchgroup=texComment start="%\s*spellzone_start" end="%\s*spellzone_end" fold contains=@Spell,@texFoldGroup
endif
else
syn match texComment "%.*$" contains=@texCommentGroup
syn match texComment "%.*$" contains=@texCommentGroup
if s:tex_fast =~ 'c'
syn region texNoSpell contained matchgroup=texComment start="%\s*nospell\s*{" end="%\s*nospell\s*}" contains=@texFoldGroup,@NoSpell
syn region texNoSpell contained matchgroup=texComment start="%\s*nospell\s*{" end="%\s*nospell\s*}" contains=@texFoldGroup,@NoSpell
syn region texSpellZone matchgroup=texComment start="%\s*spellzone_start" end="%\s*spellzone_end" contains=@Spell,@texFoldGroup
endif
endif
endif
@@ -663,7 +667,7 @@ syn match texLength "\<\d\+\([.,]\d\+\)\=\s*\(true\)\=\s*\(bp\|cc\|cm\|dd\|em\
syn match texString "\(``\|''\|,,\)"
" makeatletter -- makeatother sections
if !exists("s:tex_no_error")
if !exists("s:tex_no_error") || !s:tex_no_error
if s:tex_fast =~ 'S'
syn region texStyle matchgroup=texStatement start='\\makeatletter' end='\\makeatother' contains=@texStyleGroup contained
endif
@@ -794,8 +798,8 @@ if has("conceal") && &enc == 'utf-8'
\ ['left(' , '('],
\ ['left\[' , '['],
\ ['left\\{' , '{'],
\ ['leftarrow' , ''],
\ ['Leftarrow' , ''],
\ ['leftarrow' , ''],
\ ['Leftarrow' , ''],
\ ['leftarrowtail' , '↢'],
\ ['leftharpoondown', '↽'],
\ ['leftharpoonup' , '↼'],
@@ -881,8 +885,8 @@ if has("conceal") && &enc == 'utf-8'
\ ['right)' , ')'],
\ ['right]' , ']'],
\ ['right\\}' , '}'],
\ ['rightarrow' , ''],
\ ['Rightarrow' , ''],
\ ['rightarrow' , ''],
\ ['Rightarrow' , ''],
\ ['rightarrowtail' , '↣'],
\ ['rightleftharpoons', '⇌'],
\ ['rightsquigarrow', '↝'],
@@ -995,6 +999,7 @@ if has("conceal") && &enc == 'utf-8'
syn match texMathSymbol '\\hat{W}' contained conceal cchar=Ŵ
syn match texMathSymbol '\\hat{y}' contained conceal cchar=ŷ
syn match texMathSymbol '\\hat{Y}' contained conceal cchar=Ŷ
" syn match texMathSymbol '\\bar{a}' contained conceal cchar=a̅
endif
" Greek {{{2
@@ -1011,7 +1016,7 @@ if has("conceal") && &enc == 'utf-8'
call s:Greek('texGreek','\\zeta\>' ,'ζ')
call s:Greek('texGreek','\\eta\>' ,'η')
call s:Greek('texGreek','\\theta\>' ,'θ')
call s:Greek('texGreek','\\vartheta\>' ,'ϑ')
call s:Greek('texGreek','\\vartheta\>' ,'ϑ')
call s:Greek('texGreek','\\kappa\>' ,'κ')
call s:Greek('texGreek','\\lambda\>' ,'λ')
call s:Greek('texGreek','\\mu\>' ,'μ')
@@ -1022,11 +1027,11 @@ if has("conceal") && &enc == 'utf-8'
call s:Greek('texGreek','\\rho\>' ,'ρ')
call s:Greek('texGreek','\\varrho\>' ,'ϱ')
call s:Greek('texGreek','\\sigma\>' ,'σ')
call s:Greek('texGreek','\\varsigma\>' ,'ς')
call s:Greek('texGreek','\\varsigma\>' ,'ς')
call s:Greek('texGreek','\\tau\>' ,'τ')
call s:Greek('texGreek','\\upsilon\>' ,'υ')
call s:Greek('texGreek','\\phi\>' ,'φ')
call s:Greek('texGreek','\\varphi\>' ,'ϕ')
call s:Greek('texGreek','\\phi\>' ,'ϕ')
call s:Greek('texGreek','\\varphi\>' ,'φ')
call s:Greek('texGreek','\\chi\>' ,'χ')
call s:Greek('texGreek','\\psi\>' ,'ψ')
call s:Greek('texGreek','\\omega\>' ,'ω')
@@ -1245,7 +1250,7 @@ syn sync match texSyncStop groupthere NONE "%stopzone\>"
" (one can't tell if a "$$" starts or stops a math zone by itself)
" The following grouptheres coupled with minlines above
" help improve the odds of good syncing.
if !exists("tex_no_math")
if !exists("g:tex_no_math")
syn sync match texSyncMathZoneA groupthere NONE "\\end{abstract}"
syn sync match texSyncMathZoneA groupthere NONE "\\end{center}"
syn sync match texSyncMathZoneA groupthere NONE "\\end{description}"
@@ -1285,7 +1290,7 @@ if did_tex_syntax_inits == 1
HiLink texInputFileOpt texCmdArgs
HiLink texInputCurlies texDelimiter
HiLink texLigature texSpecialChar
if !exists("tex_no_math")
if !exists("g:tex_no_math")
HiLink texMathDelimSet1 texMathDelim
HiLink texMathDelimSet2 texMathDelim
HiLink texMathDelimKey texMathDelim

View File

@@ -1,8 +1,8 @@
" Vim syntax file
" Language: Vim 7.4 script
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
" Last Change: Mar 20, 2014
" Version: 7.4-27
" Last Change: Jan 13, 2015
" Version: 7.4-28
" Automatically generated keyword lists: {{{1
" Quit when a syntax file was already loaded {{{2
@@ -14,26 +14,27 @@ set cpo&vim
" vimTodo: contains common special-notices for comments {{{2
" Use the vimCommentGroup cluster to add your own.
syn keyword vimTodo contained COMBAK FIXME TODO XXX
syn cluster vimCommentGroup contains=vimTodo,@Spell
" regular vim commands {{{2
syn keyword vimCommand contained a arga[dd] ar[gs] bd[elete] bN[ext] breakd[el] bufdo cabc[lear] cat[ch] cex[pr] c[hange] cla[st] cnew[er] cNf[ile] con cp[revious] cuna[bbrev] del deletep delm[arks] diffp[atch] dig[raphs] do e echon endf endw[hile] f[ile] fin[d] folddoc[losed] fu[nction] gvim helpt[ags] iabc[lear] intro k l lan lc[d] lefta[bove] lg[etfile] lla[st] lnew[er] lNf[ile] lockv[ar] ls lvimgrepa[dd] mat[ch] mk[exrc] mo n n[ext] o ownsyntax perld[o] pre[serve] promptf[ind] ptl[ast] ptr[ewind] py3do qa[ll] r[ead] redr[aw] retu[rn] rub[y] rv[iminfo] sba[ll] 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[elete] argu[ment] bel[owright] bo[tright] breakl[ist] b[uffer] cad cb[uffer] cf[ile] changes cl[ist] cn[ext] col[der] conf[irm] cq[uit] cw[indow] delc[ommand] deletl delp diffpu[t] dir doau ea e[dit] endfo[r] ene[w] files fini[sh] foldd[oopen] g h hi if is[earch] keepa la lan[guage] lch[dir] lex[pr] lgr[ep] lli[st] lne[xt] lo lol[der] lt[ag] lw[indow] menut mks[ession] mod[e] nbc[lose] nmapc[lear] ol[dfiles] p po[p] prev[ious] promptr[epl] ptn pts[elect] pydo q[uit] rec[over] redraws[tatus] rew[ind] rubyd[o] sal[l] sbf[irst] sbp[revious] 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] argdo as[cii] bf[irst] bp[revious] br[ewind] buffers caddb[uffer] cc cfir[st] chd[ir] clo[se] cN[ext] colo[rscheme] con[tinue] cr[ewind] d delel deletp dep diffs[plit] di[splay] dp earlier el[se] endfun ex filet fir[st] foldo[pen] go[to] ha[rdcopy] hid[e] ij[ump] isp[lit] keepalt lad la[st] lcl[ose] lf[ile] lgrepa[dd] lmak[e] lN[ext] loadk lop[en] lua ma menut[ranslate] mksp[ell] m[ove] nb[key] noa omapc[lear] pc[lose] popu p[rint] ps[earch] ptN pu[t] pyf[ile] quita[ll] red reg[isters] ri[ght] rubyf[ile] san[dbox] sbl[ast] sbr[ewind] 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] arge[dit] au bl[ast] br bro[wse] bun[load] cad[dexpr] ccl[ose] cgetb[uffer] che[ckpath] cmapc[lear] cnf com cope[n] cs de delep delf di difft[his] dj[ump] dr[op] ec elsei[f] endf[unction] exi[t] filetype fix[del] for gr[ep] h[elp] his[tory] il[ist] iuna[bbrev] keepj[umps] laddb[uffer] lat lcs lfir[st] lh[elpgrep] lmapc[lear] lnf loadkeymap lpf[ile] luado mak[e] mes mkv mz nbs[tart] noautocmd on[ly] pe popu[p] pro pta[g] ptn[ext] pw[d] py[thon] r redi[r] res[ize] rightb[elow] rundo sa[rgument] sbm[odified] sb[uffer] 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] argg[lobal] bad[d] bm[odified] brea[k] bu bw[ipeout] caddf[ile] cd cgete[xpr] checkt[ime] cn cNf comc[lear] co[py] cscope debug d[elete] delf[unction] diffg[et] diffu[pdate] dl ds[earch] echoe[rr] em[enu] en[dif] exu[sage] fin fo[ld] fu grepa[dd] helpf[ind] i imapc[lear] j[oin] kee[pmarks] lad[dexpr] later lcscope lgetb[uffer] l[ist] lN lNf lo[adview] lp[revious] luafile ma[rk] messages mkvie[w] mzf[ile] ne noh[lsearch] o[pen] ped[it] pp[op] profd[el] ptf[irst] ptN[ext] py python3 re red[o] ret[ab] ru ru[ntime] sav[eas] sbn[ext] scrip 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 argl[ocal] ba[ll] bn[ext] breaka[dd] buf c cal[l] ce[nter] cg[etfile] cl cN cnf[ile] comp[iler] cpf[ile] cstag debugg[reedy] deletel dell diffo[ff] dig dli[st] dsp[lit] echom[sg] en endt[ry] f fina[lly] foldc[lose] fun gui helpg[rep] ia in ju[mps] keepp[atterns] laddf[ile] lb[uffer] le[ft] lgete[xpr] ll lne lnf[ile] loc[kmarks] lr[ewind] lv[imgrep] marks mk mkv[imrc] mz[scheme] new nu[mber] opt[ions] pe[rl] pr prof[ile] ptj[ump] ptp[revious] py3 q
syn match vimCommand contained "\<z[-+^.=]\="
syn keyword vimCommand contained a arga[dd] ar[gs] bd[elete] bN[ext] breakl[ist] b[uffer] cad cb[uffer] cf[ile] changes cl[ist] cn[ext] col[der] conf[irm] cq[uit] cw[indow] delc[ommand] deletl delp diffpu[t] dir doau ea e[dit] endfo[r] ene[w] files fini[sh] foldd[oopen] g h helpt[ags] iabc[lear] intro k l lan lc[d] lefta[bove] lg[etfile] lla[st] lnew[er] lNf[ile] lockv[ar] ls lvimgrepa[dd] mat[ch] mk[exrc] mo n n[ext] nu[mber] opt[ions] pe[rl] pr prof[ile] ptj[ump] ptp[revious] py3 q r[ead] redr[aw] retu[rn] rub[y] rv[iminfo] sba[ll] 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[elete] argu[ment] bel[owright] bo[tright] br[ewind] buffers caddb[uffer] cc cfir[st] chd[ir] clo[se] cN[ext] colo[rscheme] con[tinue] cr[ewind] d delel deletp dep diffs[plit] di[splay] dp earlier el[se] endfun ex filet fir[st] foldo[pen] go[to] ha[rdcopy] hi if is[earch] keepa la lan[guage] lch[dir] lex[pr] lgr[ep] lli[st] lne[xt] lo lol[der] lt[ag] lw[indow] menut mks[ession] mod[e] nbc[lose] nmapc[lear] o ownsyntax perld[o] pre[serve] promptf[ind] ptl[ast] ptr[ewind] py3do qa[ll] rec[over] redraws[tatus] rew[ind] rubyd[o] sal[l] sbf[irst] sbp[revious] 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] argdo as[cii] bf[irst] bp[revious] bro[wse] bun[load] cad[dexpr] ccl[ose] cgetb[uffer] che[ckpath] cmapc[lear] cnf com cope[n] cs de delep delf di difft[his] dj[ump] dr[op] ec elsei[f] endf[unction] exi[t] filetype fix[del] for gr[ep] h[elp] hid[e] ij[ump] isp[lit] keepalt lad la[st] lcl[ose] lf[ile] lgrepa[dd] lmak[e] lN[ext] loadk lop[en] lua ma menut[ranslate] mksp[ell] m[ove] nb[key] noa ol[dfiles] p po[p] prev[ious] promptr[epl] ptn pts[elect] pydo q[uit] red reg[isters] ri[ght] rubyf[ile] san[dbox] sbl[ast] sbr[ewind] 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] arge[dit] au bl[ast] brea[k] bu bw[ipeout] caddf[ile] cd cgete[xpr] checkt[ime] cn cNf comc[lear] co[py] cscope debug d[elete] delf[unction] diffg[et] diffu[pdate] dl ds[earch] echoe[rr] em[enu] en[dif] exu[sage] fin fo[ld] fu grepa[dd] helpc[lose] his[tory] il[ist] iuna[bbrev] keepj[umps] laddb[uffer] lat lcs lfir[st] lh[elpgrep] lmapc[lear] lnf loadkeymap lpf[ile] luado mak[e] mes mkv mz nbs[tart] noautocmd omapc[lear] pc[lose] popu p[rint] ps[earch] ptN pu[t] pyf[ile] quita[ll] redi[r] res[ize] rightb[elow] rundo sa[rgument] sbm[odified] sb[uffer] 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] argg[lobal] bad[d] bm[odified] breaka[dd] buf c cal[l] ce[nter] cg[etfile] cl cN cnf[ile] comp[iler] cpf[ile] cstag debugg[reedy] deletel dell diffo[ff] dig dli[st] dsp[lit] echom[sg] en endt[ry] f fina[lly] foldc[lose] fun gui helpf[ind] i imapc[lear] j[oin] kee[pmarks] lad[dexpr] later lcscope lgetb[uffer] l[ist] lN lNf lo[adview] lp[revious] luafile ma[rk] messages mkvie[w] mzf[ile] ne noh[lsearch] on[ly] pe popu[p] pro pta[g] ptn[ext] pw[d] py[thon] r red[o] ret[ab] ru ru[ntime] sav[eas] sbn[ext] scrip 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 argl[ocal] ba[ll] bn[ext] breakd[el] bufdo cabc[lear] cat[ch] cex[pr] c[hange] cla[st] cnew[er] cNf[ile] con cp[revious] cuna[bbrev] del deletep delm[arks] diffp[atch] dig[raphs] do e echon endf endw[hile] f[ile] fin[d] folddoc[losed] fu[nction] gvim helpg[rep] ia in ju[mps] keepp[atterns] laddf[ile] lb[uffer] le[ft] lgete[xpr] ll lne lnf[ile] loc[kmarks] lr[ewind] lv[imgrep] marks mk mkv[imrc] mz[scheme] new noswap[file] o[pen] ped[it] pp[op] profd[el] ptf[irst] ptN[ext] py python3 re
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 ambiwidth arabicshape autowriteall backupdir bdlay binary breakat bufhidden cd ci cinw co commentstring confirm cpoptions cscoperelative csre cursorcolumn delcombine diffopt ea efm ep et fdc fdo ffs filetype fo foldlevelstart formatexpr ft gfw gtt guipty hh hkmap ic imaf iminsert includeexpr inf isident key langmap lines lmap ma matchtime mco ml modeline mousefocus mousetime nrformats ofu para pdev pi previewwindow printmbfont qe relativenumber rightleftcmd ru sbr scrolloff selection shellcmdflag shellxescape showbreak si smartcase softtabstop spelllang sps sta su swb synmaxcol tagbsearch tbi termencoding thesaurus titlestring tpm ttm ttytype undodir ut vfile vop wcm whichwrap wildignore winaltkeys winminwidth wmnu write
syn keyword vimOption contained ai ambw ari aw backupext beval biosk brk buflisted cdpath cin cinwords cocu compatible consk cpt cscopetag cst cursorline dex digraph ead ei equalalways eventignore fde fdt fic fillchars foldclose foldmarker formatlistpat gcr ghr guicursor guitablabel hi hkmapp icon imak ims incsearch infercase isk keymap langmenu linespace loadplugins macatsui maxcombine mef mls modelines mousehide mp nu omnifunc paragraphs penc pm printdevice printoptions quoteescape remap rl ruf sc scrollopt selectmode shellpipe shellxquote showcmd sidescroll smartindent sol spellsuggest sr stal sua swf syntax taglength tbidi terse tildeop tl tr tty tw undofile vb vi wa wd wi wildignorecase window winwidth wmw writeany
syn keyword vimOption contained akm anti arshape awa backupskip bex bioskey browsedir buftype cedit cindent clipboard cole complete conskey crb cscopetagorder csto cwh dg dip eadirection ek equalprg ex fdi fen fileencoding fk foldcolumn foldmethod formatoptions gd go guifont guitabtooltip hid hkp iconstring imc imsearch inde insertmode iskeyword keymodel laststatus lisp lpl magic maxfuncdepth menuitems mm modifiable mousem mps number opendevice paste pex pmbcs printencoding prompt rdt report rlc ruler scb scs sessionoptions shellquote shiftround showfulltag sidescrolloff smarttab sp spf srr startofline suffixes switchbuf ta tagrelative tbis textauto timeout tm ts ttybuiltin tx undolevels vbs viewdir wak weirdinvert wic wildmenu winfixheight wiv wop writebackup
syn keyword vimOption contained al antialias autochdir background balloondelay bexpr bk bs casemap cf cink cmdheight colorcolumn completefunc copyindent cryptmethod cscopeverbose csverb debug dict dir eb enc errorbells expandtab fdl fenc fileencodings fkmap foldenable foldminlines formatprg gdefault gp guifontset helpfile hidden hl ignorecase imcmdline imsf indentexpr is isp keywordprg lazyredraw lispwords ls makeef maxmapdepth mfd mmd modified mousemodel msm numberwidth operatorfunc pastetoggle pexpr pmbfn printexpr pt re restorescreen rnu rulerformat scr sect sft shellredir shiftwidth showmatch siso smc spc spl ss statusline suffixesadd sws tabline tags tbs textmode timeoutlen to tsl ttyfast uc undoreload vdir viewoptions warn wfh wig wildmode winfixwidth wiw wrap writedelay
syn keyword vimOption contained aleph ar autoindent backspace ballooneval bg bkc bsdir cb cfu cinkeys cmdwinheight columns completeopt cot cscopepathcomp cspc cuc deco dictionary directory ed encoding errorfile exrc fdls fencs fileformat flp foldexpr foldnestmax fp gfm grepformat guifontwide helpheight highlight hlg im imd imstatusfunc indentkeys isf isprint km lbr list lsp makeprg maxmem mh mmp more mouses mzq nuw opfunc patchexpr pfn popt printfont pumheight readonly revins ro runtimepath scroll sections sh shellslash shm showmode sj smd spell splitbelow ssl stl sw sxe tabpagemax tagstack tenc textwidth title toolbar tsr ttym udf updatecount ve viminfo wb wfw wildchar wildoptions winheight wm wrapmargin ws
syn keyword vimOption contained allowrevins arab autoread backup balloonexpr bh bl bsk cc ch cino cmp com concealcursor cp cscopeprg csprg cul def diff display edcompatible endofline errorformat fcl fdm fex fileformats fml foldignore foldopen fs gfn grepprg guiheadroom helplang history hls imactivatefunc imdisable inc indk isfname joinspaces kmp lcs listchars lw mat maxmempattern mis mmt mouse mouseshape mzquantum odev osfiletype patchmode ph preserveindent printheader pvh redrawtime ri rs sb scrollbind secure shcf shelltemp shortmess showtabline slm sn spellcapcheck splitright ssop stmp swapfile sxq tabstop tal term tf titlelen toolbariconsize ttimeout ttymouse udir updatetime verbose virtualedit wc wh wildcharm wim winminheight wmh wrapscan ww
syn keyword vimOption contained altkeymap arabic autowrite backupcopy bdir bin bomb bt ccv charconvert cinoptions cms comments conceallevel cpo cscopequickfix csqf cursorbind define diffexpr dy ef eol esckeys fcs fdn ff fileignorecase fmr foldlevel foldtext fsync gfs gtl guioptions hf hk hlsearch imactivatekey imi include inex isi js kp linebreak lm lz matchpairs maxmemtot mkspellmem mod mousef mouset nf oft pa path pheader previewheight printmbcharset pvw regexpengine rightleft rtp sbo scrolljump sel shell shelltype shortname shq sm so spellfile spr st sts swapsync syn tag tb termbidi tgst titleold top ttimeoutlen ttyscroll ul ur verbosefile visualbell
syn keyword vimOption contained acd ambiwidth arabicshape autowriteall backupdir bdlay binary breakat bs casemap cf cink cmdheight colorcolumn completefunc copyindent cryptmethod cscopeverbose csverb debug dict dir eb enc errorbells expandtab fdl fenc fileencodings fkmap foldenable foldminlines formatprg gdefault gp guifontset helpfile hidden hl ignorecase imcmdline imsf indentexpr is isp keywordprg laststatus lisp loadplugins macatsui maxcombine mef mls modelines mousehide mp nu omnifunc paragraphs penc pm printdevice printoptions quoteescape remap rightleftcmd rtp sbo scrolljump sel shell shelltype shortname shq sm so spellfile spr st sts swapsync syn tag tb termbidi tgst titleold top ttimeoutlen ttyscroll ul ur verbosefile visualbell wcm wi wildmenu winfixwidth wm wrapscan
syn keyword vimOption contained ai ambw ari aw backupext beval biosk breakindent bsdir cb cfu cinkeys cmdwinheight columns completeopt cot cscopepathcomp cspc cuc deco dictionary directory ed encoding errorfile exrc fdls fencs fileformat flp foldexpr foldnestmax fp gfm grepformat guifontwide helpheight highlight hlg im imd imstatusfunc indentkeys isf isprint km lazyredraw lispwords lpl magic maxfuncdepth menuitems mm modifiable mousem mps number opendevice paste pex pmbcs printencoding prompt rdt renderoptions rl ru sbr scrolloff selection shellcmdflag shellxescape showbreak si smartcase softtabstop spelllang sps sta su swb synmaxcol tagbsearch tbi termencoding thesaurus titlestring tpm ttm ttytype undodir ut vfile vop wd wic wildmode winheight wmh write
syn keyword vimOption contained akm anti arshape awa backupskip bex bioskey breakindentopt bsk cc ch cino cmp com concealcursor cp cscopeprg csprg cul def diff display edcompatible endofline errorformat fcl fdm fex fileformats fml foldignore foldopen fs gfn grepprg guiheadroom helplang history hls imactivatefunc imdisable inc indk isfname joinspaces kmp lbr list ls makeef maxmapdepth mfd mmd modified mousemodel msm numberwidth operatorfunc pastetoggle pexpr pmbfn printexpr pt re report rlc ruf sc scrollopt selectmode shellpipe shellxquote showcmd sidescroll smartindent sol spellsuggest sr stal sua swf syntax taglength tbidi terse tildeop tl tr tty tw undofile vb vi wa weirdinvert wig wildoptions winminheight wmnu writeany
syn keyword vimOption contained al antialias autochdir background balloondelay bexpr bk bri bt ccv charconvert cinoptions cms comments conceallevel cpo cscopequickfix csqf cursorbind define diffexpr dy ef eol esckeys fcs fdn ff fileignorecase fmr foldlevel foldtext fsync gfs gtl guioptions hf hk hlsearch imactivatekey imi include inex isi js kp lcs listchars lsp makeprg maxmem mh mmp more mouses mzq nuw opfunc patchexpr pfn popt printfont pumheight readonly restorescreen rnu ruler scb scs sessionoptions shellquote shiftround showfulltag sidescrolloff smarttab sp spf srr startofline suffixes switchbuf ta tagrelative tbis textauto timeout tm ts ttybuiltin tx undolevels vbs viewdir wak wfh wildchar wim winminwidth wmw writebackup
syn keyword vimOption contained aleph ar autoindent backspace ballooneval bg bkc briopt bufhidden cd ci cinw co commentstring confirm cpoptions cscoperelative csre cursorcolumn delcombine diffopt ea efm ep et fdc fdo ffs filetype fo foldlevelstart formatexpr ft gfw gtt guipty hh hkmap ic imaf iminsert includeexpr inf isident key langmap linebreak lm lw mat maxmempattern mis mmt mouse mouseshape mzquantum odev osfiletype patchmode ph preserveindent printheader pvh redrawtime revins ro rulerformat scr sect sft shellredir shiftwidth showmatch siso smc spc spl ss statusline suffixesadd sws tabline tags tbs textmode timeoutlen to tsl ttyfast uc undoreload vdir viewoptions warn wfw wildcharm winaltkeys winwidth wop writedelay
syn keyword vimOption contained allowrevins arab autoread backup balloonexpr bh bl brk buflisted cdpath cin cinwords cocu compatible consk cpt cscopetag cst cursorline dex digraph ead ei equalalways eventignore fde fdt fic fillchars foldclose foldmarker formatlistpat gcr ghr guicursor guitablabel hi hkmapp icon imak ims incsearch infercase isk keymap langmenu lines lmap lz matchpairs maxmemtot mkspellmem mod mousef mouset nf oft pa path pheader previewheight printmbcharset pvw regexpengine ri rop runtimepath scroll sections sh shellslash shm showmode sj smd spell splitbelow ssl stl sw sxe tabpagemax tagstack tenc textwidth title toolbar tsr ttym udf updatecount ve viminfo wb wh wildignore window wiv wrap ws
syn keyword vimOption contained altkeymap arabic autowrite backupcopy bdir bin bomb browsedir buftype cedit cindent clipboard cole complete conskey crb cscopetagorder csto cwh dg dip eadirection ek equalprg ex fdi fen fileencoding fk foldcolumn foldmethod formatoptions gd go guifont guitabtooltip hid hkp iconstring imc imsearch inde insertmode iskeyword keymodel langnoremap linespace lnr ma matchtime mco ml modeline mousefocus mousetime nrformats ofu para pdev pi previewwindow printmbfont qe relativenumber rightleft rs sb scrollbind secure shcf shelltemp shortmess showtabline slm sn spellcapcheck splitright ssop stmp swapfile sxq tabstop tal term tf titlelen toolbariconsize ttimeout ttymouse udir updatetime verbose virtualedit wc whichwrap wildignorecase winfixheight wiw wrapmargin ww
" vimOptions: These are the turn-off setting variants {{{2
syn keyword vimOption contained noacd noallowrevins noantialias noarabic noarshape noautoread noaw noballooneval nobinary nobk nobuflisted nocin noconfirm nocopyindent nocscoperelative nocsre nocuc nocursorcolumn nodelcombine nodigraph noed noendofline noerrorbells noex nofen nofk nogd nohid nohkmap nohkp 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
@@ -62,7 +63,7 @@ syn keyword vimErrSetting contained hardtabs ht w1200 w300 w9600
" AutoCmd Events {{{2
syn case ignore
syn keyword vimAutoEvent contained BufAdd BufCreate BufDelete BufEnter BufFilePost BufFilePre BufHidden BufLeave BufNew BufNewFile BufRead BufReadCmd BufReadPost BufReadPre BufUnload BufWinEnter BufWinLeave BufWipeout BufWrite BufWriteCmd BufWritePost BufWritePre Cmd-event CmdwinEnter CmdwinLeave ColorScheme CompleteDone CursorHold CursorHoldI CursorMoved CursorMovedI EncodingChanged FileAppendCmd FileAppendPost FileAppendPre FileChangedRO FileChangedShell FileChangedShellPost FileEncoding FileReadCmd FileReadPost FileReadPre FileType FileWriteCmd FileWritePost FileWritePre FilterReadPost FilterReadPre FilterWritePost FilterWritePre FocusGained FocusLost FuncUndefined GUIEnter GUIFailed InsertChange InsertCharPre InsertEnter InsertLeave MenuPopup QuickFixCmdPost QuickFixCmdPre QuitPre RemoteReply SessionLoadPost ShellCmdPost ShellFilterPost SourceCmd SourcePre SpellFileMissing StdinReadPost StdinReadPre SwapExists Syntax TabEnter TabLeave TermChanged TermResponse TextChanged TextChangedI User UserGettingBored VimEnter VimLeave VimLeavePre VimResized WinEnter WinLeave
syn keyword vimAutoEvent contained BufAdd BufCreate BufDelete BufEnter BufFilePost BufFilePre BufHidden BufLeave BufNew BufNewFile BufRead BufReadCmd BufReadPost BufReadPre BufUnload BufWinEnter BufWinLeave BufWipeout BufWrite BufWriteCmd BufWritePost BufWritePre Cmd-event CmdUndefined CmdwinEnter CmdwinLeave ColorScheme CompleteDone CursorHold CursorHoldI CursorMoved CursorMovedI EncodingChanged FileAppendCmd FileAppendPost FileAppendPre FileChangedRO FileChangedShell FileChangedShellPost FileEncoding FileReadCmd FileReadPost FileReadPre FileType FileWriteCmd FileWritePost FileWritePre FilterReadPost FilterReadPre FilterWritePost FilterWritePre FocusGained FocusLost FuncUndefined GUIEnter GUIFailed InsertChange InsertCharPre InsertEnter InsertLeave MenuPopup QuickFixCmdPost QuickFixCmdPre QuitPre RemoteReply SessionLoadPost ShellCmdPost ShellFilterPost SourceCmd SourcePre SpellFileMissing StdinReadPost StdinReadPre SwapExists Syntax TabEnter TabLeave TermChanged TermResponse TextChanged TextChangedI User UserGettingBored VimEnter VimLeave VimLeavePre VimResized WinEnter WinLeave
" Highlight commonly used Groupnames {{{2
syn keyword vimGroup contained Comment Constant String Character Number Boolean Float Identifier Function Statement Conditional Repeat Label Operator Keyword Exception PreProc Include Define Macro PreCondit Type StorageClass Structure Typedef Special SpecialChar Tag Delimiter SpecialComment Debug Underlined Ignore Error Todo
@@ -73,9 +74,9 @@ syn match vimHLGroup contained "Conceal"
syn case match
" Function Names {{{2
syn keyword vimFuncName contained abs and argidx atan browsedir bufloaded bufwinnr byteidxcomp changenr clearmatches complete_add copy count deepcopy diff_filler escape executable expand feedkeys filter float2nr fnameescape foldclosedend foldtextresult garbagecollect getbufvar getcmdline getcwd getfsize getline getpid getreg gettabwinvar getwinvar has hasmapto histget hlID indent inputdialog inputsave invert items len line localtime luaeval mapcheck matcharg matchlist min mzeval or prevnonblank py3eval readfile remote_expr remote_read rename reverse screenchar search searchpairpos serverlist setcmdpos setloclist setpos setreg settabwinvar sha256 shiftwidth sin sort spellbadword split str2float strchars strftime string strpart strtrans submatch synconcealed synIDattr synstack tabpagebuflist tabpagewinnr taglist tanh tolower tr type undotree virtcol wildmenumode wincol winline winrestcmd winsaveview writefile
syn keyword vimFuncName contained acos append argv atan2 bufexists bufname byte2line call char2nr col complete_check cos cscope_connection delete diff_hlID eval exists expr8 filereadable finddir floor fnamemodify foldlevel foreground get getchar getcmdpos getfontname getftime getloclist getpos getregtype getwinposx glob has_key histadd histnr hostname index inputlist inputsecret isdirectory join libcall line2byte log map match matchdelete matchstr mkdir nextnonblank pathshorten printf pyeval reltime remote_foreground remote_send repeat round screencol searchdecl searchpos setbufvar setline setmatches setqflist settabvar setwinvar shellescape simplify sinh soundfold spellsuggest sqrt str2nr strdisplaywidth stridx strlen strridx strwidth substitute synID synIDtrans system tabpagenr tagfiles tan tempname toupper trunc undofile values visualmode winbufnr winheight winnr winrestview winwidth xor
syn keyword vimFuncName contained add argc asin browse buflisted bufnr byteidx ceil cindent complete confirm cosh cursor did_filetype empty eventhandler exp extend filewritable findfile fmod foldclosed foldtext function getbufline getcharmod getcmdtype getfperm getftype getmatches getqflist gettabvar getwinposy globpath haslocaldir histdel hlexists iconv input inputrestore insert islocked keys libcallnr lispindent log10 maparg matchadd matchend max mode nr2char pow pumvisible range reltimestr remote_peek remove resolve screenattr screenrow searchpair server2client
syn keyword vimFuncName contained abs and argidx asin browse buflisted bufnr byteidx ceil cindent complete confirm cosh cursor did_filetype empty eventhandler exists expr8 filereadable finddir floor fnamemodify foldlevel foreground get getchar getcmdpos getcwd getfsize getline getpid getreg gettabwinvar getwinvar has hasmapto histget hlID indent inputdialog inputsave invert items len line localtime luaeval mapcheck matchaddpos matchend max mode nr2char pow pumvisible range reltimestr remote_peek remove resolve screenattr screenrow searchpair server2client setcmdpos setmatches setreg setwinvar shiftwidth sin sort spellbadword split str2float strchars strftime string strpart strtrans submatch synconcealed synIDattr synstack systemlist tabpagenr tagfiles tan tempname toupper trunc undofile uniq virtcol wildmenumode wincol winline winrestcmd winsaveview writefile
syn keyword vimFuncName contained acos append arglistid atan browsedir bufloaded bufwinnr byteidxcomp changenr clearmatches complete_add copy count deepcopy diff_filler escape executable exp extend filewritable findfile fmod foldclosed foldtext function getbufline getcharmod getcmdtype getfontname getftime getloclist getpos getregtype getwinposx glob has_key histadd histnr hostname index inputlist inputsecret isdirectory join libcall line2byte log map match matcharg matchlist min mzeval or prevnonblank py3eval readfile remote_expr remote_read rename reverse screenchar search searchpairpos serverlist setline setpos settabvar sha256 simplify sinh soundfold spellsuggest sqrt str2nr strdisplaywidth stridx strlen strridx strwidth substitute synID synIDtrans system tabpagebuflist tabpagewinnr taglist tanh tolower tr type undotree values visualmode winbufnr winheight winnr winrestview winwidth xor
syn keyword vimFuncName contained add argc argv atan2 bufexists bufname byte2line call char2nr col complete_check cos cscope_connection delete diff_hlID eval exepath expand feedkeys filter float2nr fnameescape foldclosedend foldtextresult garbagecollect getbufvar getcmdline getcurpos getfperm getftype getmatches getqflist gettabvar getwinposy globpath haslocaldir histdel hlexists iconv input inputrestore insert islocked keys libcallnr lispindent log10 maparg matchadd matchdelete matchstr mkdir nextnonblank pathshorten printf pyeval reltime remote_foreground remote_send repeat round screencol searchdecl searchpos setbufvar setloclist setqflist settabwinvar shellescape
"--- syntax here and above generated by mkvimvim ---
" Special Vim Highlighting (not automatic) {{{1
@@ -99,14 +100,14 @@ endif
syn match vimNumber "\<\d\+\%(\.\d\+\%([eE][+-]\=\d\+\)\=\)\=" skipwhite nextgroup=vimGlobal,vimSubst,vimCommand
syn match vimNumber "-\d\+\%(\.\d\+\%([eE][+-]\=\d\+\)\=\)\=" skipwhite nextgroup=vimGlobal,vimSubst,vimCommand
syn match vimNumber "\<0[xX]\x\+"
syn match vimNumber "#\x\{6}"
syn match vimNumber "\%(^\|[^a-zA-Z]\)\zs#\x\{6}"
" All vimCommands are contained by vimIsCommands. {{{2
syn match vimCmdSep "[:|]\+" skipwhite nextgroup=vimAddress,vimAutoCmd,vimCommand,vimExtCmd,vimFilter,vimLet,vimMap,vimMark,vimSet,vimSyntax,vimUserCmd
syn match vimCmdSep "[:|]\+" skipwhite nextgroup=vimAddress,vimAutoCmd,vimIsCommand,vimExtCmd,vimFilter,vimLet,vimMap,vimMark,vimSet,vimSyntax,vimUserCmd
syn match vimIsCommand "\<\h\w*\>" contains=vimCommand
syn match vimVar contained "\<\h[a-zA-Z0-9#_]*\>"
syn match vimVar "\<[bwglsav]:\h[a-zA-Z0-9#_]*\>"
syn match vimFBVar contained "\<[bwglsav]:\h[a-zA-Z0-9#_]*\>"
syn match vimVar "\<[bwglsav]:\K\k*\>"
syn match vimVar contained "\<\K\k*\>"
syn match vimFBVar contained "\<[bwglsav]:\K\k*\>"
syn keyword vimCommand contained in
" Insertions And Appends: insert append {{{2
@@ -134,26 +135,25 @@ 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=vimIsCommand,vimCommand,vimUserCmd,vimExecute,vimNotFunc,vimFuncName,vimFunction,vimFunctionError,vimLineComment,vimSpecFile,vimOper,vimNumber,vimOperParen,vimComment,vimString,vimSubst,vimMark,vimRegister,vimAddress,vimFilter,vimCmplxRepeat,vimComment,vimLet,vimSet,vimAutoCmd,vimRegion,vimSynLine,vimNotation,vimCtrlChar,vimFuncVar,vimContinue
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'
syn region vimAugroup fold start="\<aug\%[roup]\>\s\+\h\w*" end="\<aug\%[roup]\>\s\+[eE][nN][dD]\>" contains=vimAugroupKey,vimAutoCmd,@vimAugroupList keepend
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 start="\<aug\%[roup]\>\s\+\h\w*" end="\<aug\%[roup]\>\s\+[eE][nN][dD]\>" contains=vimAugroupKey,vimAutoCmd,@vimAugroupList keepend
syn region vimAugroup matchgroup=vimAugroupKey start="\<aug\%[roup]\>\ze\s\+\K\k*" end="\<aug\%[roup]\>\ze\s\+[eE][nN][dD]\>" contains=vimAutoCmd,@vimAugroupList
endif
syn match vimAugroup "aug\%[roup]!" contains=vimAugroupKey
if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_noaugrouperror")
syn match vimAugroupError "\<aug\%[roup]\>\s\+[eE][nN][dD]\>"
endif
syn keyword vimAugroupKey contained aug[roup]
"syn keyword vimAugroupKey contained aug[roup]
" Operators: {{{2
" =========
" COMBAK: vimOperParen used to have "oneline"
syn cluster vimOperGroup contains=vimEnvvar,vimFunc,vimFuncVar,vimOper,vimOperParen,vimNumber,vimString,vimRegister,vimContinue
syn match vimOper "\(==\|!=\|>=\|<=\|=\~\|!\~\|>\|<\|=\)[?#]\{0,2}" skipwhite nextgroup=vimString,vimSpecFile
syn match vimOper "||\|&&\|[-+.]" skipwhite nextgroup=vimString,vimSpecFile
syn region vimOperParen matchgroup=vimParenSep start="(" end=")" contains=@vimOperGroup
syn region vimOperParen matchgroup=vimSep start="{" end="}" contains=@vimOperGroup nextgroup=vimVar,vimFuncVar
syn region vimOperParen oneline matchgroup=vimParenSep start="(" end=")" contains=@vimOperGroup
syn region vimOperParen oneline matchgroup=vimSep start="{" end="}" contains=@vimOperGroup nextgroup=vimVar,vimFuncVar
if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_noopererror")
syn match vimOperError ")"
endif
@@ -161,7 +161,7 @@ endif
" Functions : Tag is provided for those who wish to highlight tagged functions {{{2
" =========
syn cluster vimFuncList contains=vimCommand,vimFunctionError,vimFuncKey,Tag,vimFuncSID
syn cluster vimFuncBodyList contains=vimAbb,vimAddress,vimAugroupKey,vimAutoCmd,vimCmplxRepeat,vimComment,vimComment,vimContinue,vimCtrlChar,vimEcho,vimEchoHL,vimExecute,vimIf,vimIsCommand,vimFBVar,vimFunc,vimFunction,vimFuncVar,vimHighlight,vimIsCommand,vimLet,vimLineComment,vimMap,vimMark,vimNorm,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegion,vimRegister,vimSet,vimSpecFile,vimString,vimSubst,vimSynLine,vimUnmap,vimUserCommand
syn cluster vimFuncBodyList contains=vimAbb,vimAddress,vimAugroupKey,vimAutoCmd,vimCmplxRepeat,vimComment,vimComment,vimContinue,vimCtrlChar,vimEcho,vimEchoHL,vimExecute,vimIf,vimIsCommand,vimFBVar,vimFunc,vimFunction,vimFuncVar,vimGlobal,vimHighlight,vimIsCommand,vimLet,vimLineComment,vimMap,vimMark,vimNorm,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegion,vimRegister,vimSet,vimSpecFile,vimString,vimSubst,vimSynLine,vimUnmap,vimUserCommand
syn match vimFunction "\<fu\%[nction]!\=\s\+\%(<[sS][iI][dD]>\|[sSgGbBwWtTlL]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)*\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody
if exists("g:vimsyn_folding") && g:vimsyn_folding =~ 'f'
@@ -169,7 +169,7 @@ if exists("g:vimsyn_folding") && g:vimsyn_folding =~ 'f'
else
syn region vimFuncBody contained start="\ze(" matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\)" contains=@vimFuncBodyList
endif
syn match vimFuncVar contained "a:\(\h\w*\|\d\+\)"
syn match vimFuncVar contained "a:\(\K\k*\|\d\+\)"
syn match vimFuncSID contained "\c<sid>\|\<s:"
syn keyword vimFuncKey contained fu[nction]
syn match vimFuncBlank contained "\s\+"
@@ -326,9 +326,9 @@ syn keyword vimMap mapc[lear] smapc[lear]
syn keyword vimUnmap cu[nmap] iu[nmap] lu[nmap] nun[map] ou[nmap] sunm[ap] unm[ap] unm[ap] vu[nmap] xu[nmap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs
syn match vimMapLhs contained "\S\+" contains=vimNotation,vimCtrlChar skipwhite nextgroup=vimMapRhs
syn match vimMapBang contained "!" skipwhite nextgroup=vimMapMod,vimMapLhs
syn match vimMapMod contained "\c<\(buffer\|expr\|\(local\)\=leader\|plug\|script\|sid\|unique\|silent\)\+>" contains=vimMapModKey,vimMapModErr skipwhite nextgroup=vimMapMod,vimMapLhs
syn match vimMapMod contained "\c<\(buffer\|expr\|\(local\)\=leader\|nowait\|plug\|script\|sid\|unique\|silent\)\+>" contains=vimMapModKey,vimMapModErr skipwhite nextgroup=vimMapMod,vimMapLhs
syn match vimMapRhs contained ".*" contains=vimNotation,vimCtrlChar skipnl nextgroup=vimMapRhsExtend
syn match vimMapRhsExtend contained "^\s*\\.*$" contains=vimNotation,vimCtrlChar,vimContinue skipnl nextgroup=vimMapRhsExtend
syn match vimMapRhsExtend contained "^\s*\\.*$" contains=vimContinue
syn case ignore
syn keyword vimMapModKey contained buffer expr leader localleader plug script sid silent unique
syn case match
@@ -348,7 +348,7 @@ syn match vimMenuBang "!" contained skipwhite nextgroup=@vimMenuList
" Angle-Bracket Notation (tnx to Michael Geddes) {{{2
" ======================
syn case ignore
syn match vimNotation "\(\\\|<lt>\)\=<\([scamd]-\)\{0,4}x\=\(f\d\{1,2}\|[^ \t:]\|cr\|lf\|linefeed\|return\|k\=del\%[ete]\|bs\|backspace\|tab\|esc\|right\|left\|help\|undo\|insert\|ins\|k\=home\|k\=end\|kplus\|kminus\|kdivide\|kmultiply\|kenter\|kpoint\|space\|k\=\(page\)\=\(\|down\|up\|k\d\>\)\)>" contains=vimBracket
syn match vimNotation "\(\\\|<lt>\)\=<\([scamd]-\)\{0,4}x\=\(f\d\{1,2}\|[^ \t:]\|cr\|lf\|linefeed\|return\|k\=del\%[ete]\|bs\|backspace\|tab\|esc\|right\|left\|help\|undo\|insert\|ins\|k\=home\|k\=end\|kplus\|kminus\|kdivide\|kmultiply\|kenter\|kpoint\|space\|k\=\(page\)\=\(\|down\|up\|k[0-9]\)\)>" contains=vimBracket
syn match vimNotation "\(\\\|<lt>\)\=<\([scam2-4]-\)\{0,4}\(right\|left\|middle\)\(mouse\)\=\(drag\|release\)\=>" contains=vimBracket
syn match vimNotation "\(\\\|<lt>\)\=<\(bslash\|plug\|sid\|space\|bar\|nop\|nul\|lt\)>" contains=vimBracket
syn match vimNotation '\(\\\|<lt>\)\=<C-R>[0-9a-z"%#:.\-=]'he=e-1 contains=vimBracket
@@ -360,8 +360,8 @@ syn case match
" User Function Highlighting {{{2
" (following Gautam Iyer's suggestion)
" ==========================
syn match vimFunc "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%([a-zA-Z0-9_]\+\.\)*\I[a-zA-Z0-9_.]*\)\ze\s*(" contains=vimFuncName,vimUserFunc,vimExecute
syn match vimUserFunc contained "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%([a-zA-Z0-9_]\+\.\)*\I[a-zA-Z0-9_.]*\)\|\<\u[a-zA-Z0-9.]*\>\|\<if\>" contains=vimNotation
syn match vimFunc "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%([a-zA-Z0-9_.]\+\.\)*\I[a-zA-Z0-9_.]*\)\ze\s*(" contains=vimFuncName,vimUserFunc,vimExecute
syn match vimUserFunc contained "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%([a-zA-Z0-9_.]\+\.\)*\I[a-zA-Z0-9_.]*\)\|\<\u[a-zA-Z0-9.]*\>\|\<if\>" contains=vimNotation
syn match vimNotFunc "\<if\>\|\<el\%[seif]\>\|\<return\>\|\<while\>"
" Errors And Warnings: {{{2
@@ -407,7 +407,7 @@ syn keyword vimSynType contained clear skipwhite nextgroup=vimGroupList
" Syntax: cluster {{{2
syn keyword vimSynType contained cluster skipwhite nextgroup=vimClusterName
syn region vimClusterName contained matchgroup=vimGroupName start="\h\w*" skip="\\\\\|\\|" matchgroup=vimSep end="$\||" contains=vimGroupAdd,vimGroupRem,vimSynContains,vimSynError
syn region vimClusterName contained matchgroup=vimGroupName start="\k\+" skip="\\\\\|\\|" matchgroup=vimSep end="$\||" contains=vimGroupAdd,vimGroupRem,vimSynContains,vimSynError
syn match vimGroupAdd contained "add=" nextgroup=vimGroupList
syn match vimGroupRem contained "remove=" nextgroup=vimGroupList
syn cluster vimFuncBodyList add=vimSynType,vimGroupAdd,vimGroupRem
@@ -419,17 +419,17 @@ syn cluster vimFuncBodyList add=vimSynType
" Syntax: keyword {{{2
syn cluster vimSynKeyGroup contains=vimSynNextgroup,vimSynKeyOpt,vimSynKeyContainedin
syn keyword vimSynType contained keyword skipwhite nextgroup=vimSynKeyRegion
syn region vimSynKeyRegion contained oneline keepend matchgroup=vimGroupName start="\h\w*" skip="\\\\\|\\|" matchgroup=vimSep end="|\|$" contains=@vimSynKeyGroup
syn region vimSynKeyRegion contained oneline keepend matchgroup=vimGroupName start="\k\+" skip="\\\\\|\\|" matchgroup=vimSep end="|\|$" contains=@vimSynKeyGroup
syn match vimSynKeyOpt contained "\<\(conceal\|contained\|transparent\|skipempty\|skipwhite\|skipnl\)\>"
syn cluster vimFuncBodyList add=vimSynType
" Syntax: match {{{2
syn cluster vimSynMtchGroup contains=vimMtchComment,vimSynContains,vimSynError,vimSynMtchOpt,vimSynNextgroup,vimSynRegPat,vimNotation
syn keyword vimSynType contained match skipwhite nextgroup=vimSynMatchRegion
syn region vimSynMatchRegion contained keepend matchgroup=vimGroupName start="\h\w*" matchgroup=vimSep end="|\|$" contains=@vimSynMtchGroup
syn region vimSynMatchRegion contained keepend matchgroup=vimGroupName start="\k\+" matchgroup=vimSep end="|\|$" contains=@vimSynMtchGroup
syn match vimSynMtchOpt contained "\<\(conceal\|transparent\|contained\|excludenl\|skipempty\|skipwhite\|display\|extend\|skipnl\|fold\)\>"
if has("conceal")
syn match vimSynMtchOpt contained "\<cchar=" nextgroup=vimSynMtchCchar
syn match vimSynMtchOpt contained "\<cchar=" nextgroup=VimSynMtchCchar
syn match vimSynMtchCchar contained "\S"
endif
syn cluster vimFuncBodyList add=vimSynMtchGroup
@@ -441,7 +441,7 @@ syn keyword vimSynType contained enable list manual off on reset
syn cluster vimSynRegPatGroup contains=vimPatSep,vimNotPatSep,vimSynPatRange,vimSynNotPatRange,vimSubstSubstr,vimPatRegion,vimPatSepErr,vimNotation
syn cluster vimSynRegGroup contains=vimSynContains,vimSynNextgroup,vimSynRegOpt,vimSynReg,vimSynMtchGrp
syn keyword vimSynType contained region skipwhite nextgroup=vimSynRegion
syn region vimSynRegion contained keepend matchgroup=vimGroupName start="\h\w*" skip="\\\\\|\\|" end="|\|$" contains=@vimSynRegGroup
syn region vimSynRegion contained keepend matchgroup=vimGroupName start="\k\+" skip="\\\\\|\\|" end="|\|$" contains=@vimSynRegGroup
syn match vimSynRegOpt contained "\<\(conceal\(ends\)\=\|transparent\|contained\|excludenl\|skipempty\|skipwhite\|display\|keepend\|oneline\|extend\|skipnl\|fold\)\>"
syn match vimSynReg contained "\(start\|skip\|end\)="he=e-1 nextgroup=vimSynRegPat
syn match vimSynMtchGrp contained "matchgroup=" nextgroup=vimGroup,vimHLGroup
@@ -467,9 +467,9 @@ syn keyword vimSyncRegion contained region skipwhite nextgroup=vimSynReg
syn match vimSyncLinebreak contained "\<linebreaks=" skipwhite nextgroup=vimNumber
syn keyword vimSyncLinecont contained linecont skipwhite nextgroup=vimSynRegPat
syn match vimSyncLines contained "\(min\|max\)\=lines=" nextgroup=vimNumber
syn match vimSyncGroupName contained "\h\w*" skipwhite nextgroup=vimSyncKey
syn match vimSyncGroupName contained "\k\+" skipwhite nextgroup=vimSyncKey
syn match vimSyncKey contained "\<groupthere\|grouphere\>" skipwhite nextgroup=vimSyncGroup
syn match vimSyncGroup contained "\h\w*" skipwhite nextgroup=vimSynRegPat,vimSyncNone
syn match vimSyncGroup contained "\k\+" skipwhite nextgroup=vimSynRegPat,vimSyncNone
syn keyword vimSyncNone contained NONE
" Additional IsCommand, here by reasons of precedence {{{2
@@ -510,18 +510,17 @@ endif
syn match vimHiTerm contained "\cterm="he=e-1 nextgroup=vimHiAttribList
syn match vimHiStartStop contained "\c\(start\|stop\)="he=e-1 nextgroup=vimHiTermcap,vimOption
syn match vimHiCTerm contained "\ccterm="he=e-1 nextgroup=vimHiAttribList
syn match vimHiCtermFgBg contained "\ccterm[fb]g="he=e-1 nextgroup=vimHiNmbr,vimHiCtermColor,vimFgBgAttrib,vimHiCtermError
syn match vimHiCtermFgBg contained "\ccterm[fb]g="he=e-1 nextgroup=vimNumber,vimHiCtermColor,vimFgBgAttrib,vimHiCtermError
syn match vimHiGui contained "\cgui="he=e-1 nextgroup=vimHiAttribList
syn match vimHiGuiFont contained "\cfont="he=e-1 nextgroup=vimHiFontname
syn match vimHiGuiFgBg contained "\cgui\%([fb]g\|sp\)="he=e-1 nextgroup=vimHiGroup,vimHiGuiFontname,vimHiGuiRgb,vimFgBgAttrib
syn match vimHiTermcap contained "\S\+" contains=vimNotation
syn match vimHiNmbr contained '\d\+'
" Highlight: clear {{{2
syn keyword vimHiClear contained clear nextgroup=vimHiGroup
" Highlight: link {{{2
syn region vimHiLink contained oneline matchgroup=vimCommand start="\(\<hi\%[ghlight]\s\+\)\@<=\(\(def\%[ault]\s\+\)\=link\>\|\<def\>\)" end="$" contains=vimHiGroup,vimGroup,vimHLGroup,vimNotation
syn region vimHiLink contained oneline matchgroup=vimCommand start="\<\(def\%[ault]\s\+\)\=link\>\|\<def\>" end="$" contains=vimHiGroup,vimGroup,vimHLGroup,vimNotation
syn cluster vimFuncBodyList add=vimHiLink
" Control Characters {{{2
@@ -656,14 +655,20 @@ if g:vimsyn_embed =~ 'P' && (has("python") || has("python3")) && filereadable(s:
if exists("g:vimsyn_folding") && g:vimsyn_folding =~ 'P'
syn region vimPythonRegion fold matchgroup=vimScriptDelim start=+py\%[thon]3\=\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimPythonScript
syn region vimPythonRegion fold matchgroup=vimScriptDelim start=+py\%[thon]3\=\s*<<\s*$+ end=+\.$+ contains=@vimPythonScript
syn region vimPythonRegion fold matchgroup=vimScriptDelim start=+Py\%[thon]2or3\=\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimPythonScript
syn region vimPythonRegion fold matchgroup=vimScriptDelim start=+Py\%[thon]2or3\=\s*<<\s*$+ end=+\.$+ contains=@vimPythonScript
else
syn region vimPythonRegion matchgroup=vimScriptDelim start=+py\%[thon]3\=\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimPythonScript
syn region vimPythonRegion matchgroup=vimScriptDelim start=+py\%[thon]3\=\s*<<\s*$+ end=+\.$+ contains=@vimPythonScript
syn region vimPythonRegion matchgroup=vimScriptDelim start=+Py\%[thon]2or3\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimPythonScript
syn region vimPythonRegion matchgroup=vimScriptDelim start=+Py\%[thon]2or3\=\s*<<\s*$+ end=+\.$+ contains=@vimPythonScript
endif
syn cluster vimFuncBodyList add=vimPythonRegion
else
syn region vimEmbedError start=+py\%[thon]3\=\s*<<\s*\z(.*\)$+ end=+^\z1$+
syn region vimEmbedError start=+py\%[thon]3\=\s*<<\s*$+ end=+\.$+
syn region vimEmbedError start=+Py\%[thon]2or3\=\s*<<\s*\z(.*\)$+ end=+^\z1$+
syn region vimEmbedError start=+Py\%[thon]2or3\=\s*<<\s*$+ end=+\.$+
endif
unlet s:pythonpath
@@ -752,6 +757,8 @@ syn sync match vimAugroupSyncA groupthere NONE "\<aug\%[roup]\>\s\+[eE][nN][dD]"
" Highlighting Settings {{{2
" ====================
hi def link vimSubst1 vimSubst
hi def link vimBehaveModel vimBehave
if !exists("g:vimsyn_noerror")
hi def link vimBehaveError vimError
@@ -774,43 +781,22 @@ endif
hi def link vimAbb vimCommand
hi def link vimAddress vimMark
hi def link vimAugroupKey vimCommand
hi def link vimAuHighlight vimHighlight
hi def link vimAutoCmdOpt vimOption
hi def link vimAutoCmd vimCommand
hi def link vimAutoEvent Type
hi def link vimAutoSet vimCommand
hi def link vimBehaveModel vimBehave
hi def link vimBehave vimCommand
hi def link vimBracket Delimiter
hi def link vimCmplxRepeat SpecialChar
hi def link vimCommand Statement
hi def link vimComment Comment
hi def link vimCommentString vimString
hi def link vimCommentTitle PreProc
hi def link vimCondHL vimCommand
hi def link vimContinue Special
hi def link vimCtrlChar SpecialChar
hi def link vimEchoHLNone vimGroup
hi def link vimEchoHL vimCommand
hi def link vimElseIfErr Error
hi def link vimElseif vimCondHL
hi def link vimEnvvar PreProc
hi def link vimError Error
hi def link vimFBVar vimVar
hi def link vimFgBgAttrib vimHiAttrib
hi def link vimFold Folded
hi def link vimFTCmd vimCommand
hi def link vimFTOption vimSynType
hi def link vimFuncKey vimCommand
hi def link vimFuncName Function
hi def link vimFuncSID Special
hi def link vimFuncVar Identifier
hi def link vimGroupAdd vimSynOption
hi def link vimGroupName vimGroup
hi def link vimGroupRem vimSynOption
hi def link vimGroupSpecial Special
hi def link vimGroup Type
hi def link vimHiAttrib PreProc
hi def link vimHiClear vimHighlight
hi def link vimHiCtermFgBg vimHiTerm
hi def link vimHiCTerm vimHiTerm
@@ -820,94 +806,111 @@ hi def link vimHiGuiFgBg vimHiTerm
hi def link vimHiGuiFont vimHiTerm
hi def link vimHiGuiRgb vimNumber
hi def link vimHiGui vimHiTerm
hi def link vimHiNmbr Number
hi def link vimHiStartStop vimHiTerm
hi def link vimHiTerm Type
hi def link vimHLGroup vimGroup
hi def link vimHLMod PreProc
hi def link vimInsert vimString
hi def link vimKeyCode vimSpecFile
hi def link vimKeyword Statement
hi def link vimLet vimCommand
hi def link vimLineComment vimComment
hi def link vimMapBang vimCommand
hi def link vimMapModKey vimFuncSID
hi def link vimMapMod vimBracket
hi def link vimMap vimCommand
hi def link vimMark Number
hi def link vimMarkNumber vimNumber
hi def link vimMenuMod vimMapMod
hi def link vimMenuNameMore vimMenuName
hi def link vimMenuName PreProc
hi def link vimMtchComment vimComment
hi def link vimNorm vimCommand
hi def link vimNotation Special
hi def link vimNotFunc vimCommand
hi def link vimNotPatSep vimString
hi def link vimNumber Number
hi def link vimOperError Error
hi def link vimOper Operator
hi def link vimOption PreProc
hi def link vimParenSep Delimiter
hi def link vimPatSepErr vimPatSep
hi def link vimPatSepR vimPatSep
hi def link vimPatSep SpecialChar
hi def link vimPatSepZone vimString
hi def link vimPatSepZ vimPatSep
hi def link vimPattern Type
hi def link vimPlainMark vimMark
hi def link vimPlainRegister vimRegister
hi def link vimRegister SpecialChar
hi def link vimScriptDelim Comment
hi def link vimSearchDelim Statement
hi def link vimSearch vimString
hi def link vimSep Delimiter
hi def link vimSetMod vimOption
hi def link vimSetSep Statement
hi def link vimSetString vimString
hi def link vimSpecFile Identifier
hi def link vimSpecFileMod vimSpecFile
hi def link vimSpecial Type
hi def link vimStatement Statement
hi def link vimStringCont vimString
hi def link vimString String
hi def link vimSubst1 vimSubst
hi def link vimSubstDelim Delimiter
hi def link vimSubstFlags Special
hi def link vimSubstSubstr SpecialChar
hi def link vimSubstTwoBS vimString
hi def link vimSubst vimCommand
hi def link vimSynCaseError Error
hi def link vimSynCase Type
hi def link vimSyncC Type
hi def link vimSyncError Error
hi def link vimSyncGroupName vimGroupName
hi def link vimSyncGroup vimGroupName
hi def link vimSyncKey Type
hi def link vimSyncNone Type
hi def link vimSynContains vimSynOption
hi def link vimSynError Error
hi def link vimSynKeyContainedin vimSynContains
hi def link vimSynKeyOpt vimSynOption
hi def link vimSynMtchGrp vimSynOption
hi def link vimSynMtchOpt vimSynOption
hi def link vimSynNextgroup vimSynOption
hi def link vimSynNotPatRange vimSynRegPat
hi def link vimSynOption Special
hi def link vimSynPatRange vimString
hi def link vimSynRegOpt vimSynOption
hi def link vimSynRegPat vimString
hi def link vimSynReg Type
hi def link vimSyntax vimCommand
hi def link vimSynType vimSpecial
hi def link vimTodo Todo
hi def link vimUnmap vimMap
hi def link vimUserAttrbCmpltFunc Special
hi def link vimUserAttrbCmplt vimSpecial
hi def link vimUserAttrbKey vimOption
hi def link vimUserAttrb vimSpecial
hi def link vimUserCmdError Error
hi def link vimUserCommand vimCommand
hi def link vimAutoEvent Type
hi def link vimBracket Delimiter
hi def link vimCmplxRepeat SpecialChar
hi def link vimCommand Statement
hi def link vimComment Comment
hi def link vimCommentTitle PreProc
hi def link vimContinue Special
hi def link vimCtrlChar SpecialChar
hi def link vimElseIfErr Error
hi def link vimEnvvar PreProc
hi def link vimError Error
hi def link vimFold Folded
hi def link vimFuncName Function
hi def link vimFuncSID Special
hi def link vimFuncVar Identifier
hi def link vimGroupSpecial Special
hi def link vimGroup Type
hi def link vimHiAttrib PreProc
hi def link vimHiTerm Type
hi def link vimHLMod PreProc
hi def link vimKeyword Statement
hi def link vimMark Number
hi def link vimMenuName PreProc
hi def link vimNotation Special
hi def link vimNumber Number
hi def link vimOperError Error
hi def link vimOper Operator
hi def link vimOption PreProc
hi def link vimParenSep Delimiter
hi def link vimPatSep SpecialChar
hi def link vimPattern Type
hi def link vimRegister SpecialChar
hi def link vimScriptDelim Comment
hi def link vimSearchDelim Statement
hi def link vimSep Delimiter
hi def link vimSetSep Statement
hi def link vimSpecFile Identifier
hi def link vimSpecial Type
hi def link vimStatement Statement
hi def link vimString String
hi def link vimSubstDelim Delimiter
hi def link vimSubstFlags Special
hi def link vimSubstSubstr SpecialChar
hi def link vimSynCaseError Error
hi def link vimSynCase Type
hi def link vimSyncC Type
hi def link vimSyncError Error
hi def link vimSyncKey Type
hi def link vimSyncNone Type
hi def link vimSynError Error
hi def link vimSynOption Special
hi def link vimSynReg Type
hi def link vimTodo Todo
hi def link vimUserAttrbCmpltFunc Special
hi def link vimUserCmdError Error
hi def link vimUserFunc Normal
hi def link vimVar Identifier
hi def link vimWarn WarningMsg

View File

@@ -1,9 +1,9 @@
" Vim syntax file
" Language: xmath (a simulation tool)
" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz>
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
" Last Change: Sep 11, 2006
" Version: 6
" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax
" Version: 7
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_XMATH
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded

View File

@@ -1,10 +1,10 @@
" Vim syntax file
" Language: bin using xxd
" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz>
" Last Change: Sep 06, 2005
" Version: 7
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
" Last Change: Oct 23, 2014
" Version: 8
" Notes: use :help xxd to see how to invoke it
" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_XXD
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded

View File

@@ -1,8 +1,8 @@
" Vim syntax file
" Language: Yacc
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
" Last Change: Mar 20, 2014
" Version: 11
" Last Change: Jan 14, 2015
" Version: 12
" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax
"
" Options: {{{1

View File

@@ -1,7 +1,7 @@
" Vim syntax file
" Language: Zimbu
" Maintainer: Bram Moolenaar
" Last Change: 2012 Jun 01
" Last Change: 2014 Nov 23
if exists("b:current_syntax")
finish
@@ -12,7 +12,10 @@ syn include @Ccode syntax/c.vim
syn keyword zimbuTodo TODO FIXME XXX contained
syn match zimbuNoBar "|" contained
syn match zimbuParam "|[^| ]\+|" contained contains=zimbuNoBar
syn match zimbuComment "#.*$" contains=zimbuTodo,zimbuParam,@Spell
syn match zimbuNoBacktick "`" contained
syn match zimbuCode "`[^`]\+`" contained contains=zimbuNoBacktick
syn match zimbuComment "#.*$" contains=zimbuTodo,zimbuParam,zimbuCode,@Spell
syn match zimbuComment "/\*.\{-}\*/" contains=zimbuTodo,zimbuParam,zimbuCode,@Spell
syn match zimbuChar "'\\\=.'"
@@ -28,27 +31,32 @@ syn keyword zimbuBasicType fixed1 fixed2 fixed3 fixed4 fixed5 fixed6
syn keyword zimbuBasicType fixed7 fixed8 fixed9 fixed10 fixed11 fixed12
syn keyword zimbuBasicType fixed13 fixed14 fixed15
syn keyword zimbuCompType string stringval cstring varstring
syn keyword zimbuCompType bytes varbytes
syn keyword zimbuCompType tuple array list dict multiDict set multiSet
syn keyword zimbuCompType string varString
syn keyword zimbuCompType byteString varByteString
syn keyword zimbuCompType tuple array list dict dictList set callback
syn keyword zimbuCompType sortedList multiDict multiDictList multiSet
syn keyword zimbuCompType complex complex32 complex64 complex80 complex128
syn keyword zimbuCompType proc func def thread evalThread lock cond pipe
syn keyword zimbuType VAR ANY USE GET
syn keyword zimbuType VAR dyn type USE GET
syn match zimbuType "IO.File"
syn match zimbuType "IO.Stat"
syn keyword zimbuStatement IF ELSE ELSEIF WHILE REPEAT FOR IN TO STEP
syn keyword zimbuStatement IF ELSE ELSEIF IFNIL WHILE REPEAT FOR IN TO STEP
syn keyword zimbuStatement DO UNTIL SWITCH WITH
syn keyword zimbuStatement TRY CATCH FINALLY
syn keyword zimbuStatement GENERATE_IF GENERATE_ELSE GENERATE_ELSEIF
syn keyword zimbuStatement GENERATE_ERROR
syn keyword zimbuStatement BUILD_IF BUILD_ELSE BUILD_ELSEIF
syn keyword zimbuStatement CASE DEFAULT FINAL ABSTRACT VIRTUAL DEFINE REPLACE
syn keyword zimbuStatement IMPLEMENTS EXTENDS PARENT LOCAL
syn keyword zimbuStatement PART ALIAS CONNECT WRAP
syn keyword zimbuStatement PART ALIAS TYPE CONNECT WRAP
syn keyword zimbuStatement BREAK CONTINUE PROCEED
syn keyword zimbuStatement RETURN EXIT THROW
syn keyword zimbuStatement RETURN EXIT THROW DEFER
syn keyword zimbuStatement IMPORT AS OPTIONS MAIN
syn keyword zimbuStatement INTERFACE MODULE ENUM BITS SHARED
syn keyword zimbuStatement INTERFACE PIECE INCLUDE MODULE ENUM BITS
syn keyword zimbuStatement SHARED STATIC
syn keyword zimbuStatement LAMBDA
syn match zimbuStatement "\<\(FUNC\|PROC\|DEF\)\>"
syn match zimbuStatement "\<CLASS\>"
syn match zimbuStatement "}"
@@ -61,10 +69,13 @@ syn match zimbuAttribute "@default\>"
syn match zimbuAttribute "@define\>"
syn match zimbuAttribute "@replace\>"
syn match zimbuAttribute "@final\>"
syn match zimbuAttribute "@primitive\>"
syn match zimbuAttribute "@notOnExit\>"
syn match zimbuAttribute "@private\>"
syn match zimbuAttribute "@protected\>"
syn match zimbuAttribute "@public\>"
syn match zimbuAttribute "@local\>"
syn match zimbuAttribute "@file\>"
syn match zimbuAttribute "@directory\>"
syn match zimbuAttribute "@read=private\>"
@@ -78,15 +89,22 @@ syn match zimbuAttribute "@items=public\>"
syn match zimbuAttribute "@items=file\>"
syn match zimbuAttribute "@items=directory\>"
syn keyword zimbuMethod NEW EQUAL COPY COMPARE SIZE GET SET
syn keyword zimbuMethod NEW EQUAL COPY COMPARE SIZE GET SET INIT EARLYINIT
syn keyword zimbuOperator IS ISNOT ISA ISNOTA
syn keyword zimbuModule ARG CHECK E IO PROTO SYS HTTP ZC ZWT TIME THREAD
syn keyword zimbuModule ARG CHECK E GC IO LOG PROTO SYS HTTP ZC ZWT T TIME THREAD
syn match zimbuString +"\([^"\\]\|\\.\)*\("\|$\)+
syn match zimbuImport "\.\zsPROTO"
syn match zimbuImport "\.\zsCHEADER"
"syn match zimbuString +"\([^"\\]\|\\.\)*\("\|$\)+ contains=zimbuStringExpr
syn region zimbuString start=+"+ skip=+[^"\\]\|\\.+ end=+"\|$+ contains=zimbuStringExpr
syn match zimbuString +R"\([^"]\|""\)*\("\|$\)+
syn region zimbuString start=+'''+ end=+'''+
syn region zimbuLongString start=+''"+ end=+"''+
syn match zimbuStringExpr +\\([^)]*)+hs=s+2,he=e-1 contained contains=zimbuString,zimbuParenPairOuter
syn region zimbuParenPairOuter start=+(+ms=s+1 end=+)+me=e-1 contained contains=zimbuString,zimbuParenPair
syn region zimbuParenPair start=+(+ end=+)+ contained contains=zimbuString,zimbuParenPair
syn keyword zimbuFixed TRUE FALSE NIL THIS THISTYPE FAIL OK
syn keyword zimbuError NULL
@@ -97,12 +115,18 @@ syn match zimbuSpaceError display excludenl "\S\s\+$"ms=s+1
syn match zimbuSpaceError display " \+\t"
syn match zimbuSpaceError display "\t\+ "
syn match zimbuUses contained "uses([a-zA-Z_ ,]*)"
syn match zimbuUses contained "\<uses([a-zA-Z_ ,]*)"
syn match zimbuBlockgc contained "blockgc"
syn match zimbuBlockComment contained " #.*"
syn region zimbuCregion matchgroup=zimbuCblock start="^>>>" end="^<<<.*" contains=@Ccode,zimbuUses,zimbuBlockComment keepend
syn region zimbuCregion matchgroup=zimbuCblock start="^>>>" end="^<<<.*" contains=@Ccode,zimbuUses,zimbuBlockgc,zimbuBlockComment keepend
syn sync minlines=2000
" Assume long strings and C regions don't take more than 200 lines.
syn sync minlines=200
" When we find the start of a long string, without a # or " before it, we are
" sure to be inside a long string.
syn sync match zimbuLongStringSync grouphere zimbuLongString +^[^"#]*''\"+
hi def link zimbuBasicType Type
hi def link zimbuCompType Type
@@ -111,17 +135,23 @@ hi def link zimbuStatement Statement
hi def link zimbuOperator Statement
hi def link zimbuMethod PreProc
hi def link zimbuModule PreProc
hi def link zimbuImport PreProc
hi def link zimbuUses PreProc
hi def link zimbuBlockgc PreProc
hi def link zimbuAttribute PreProc
hi def link zimbuString Constant
hi def link zimbuLongString Special
hi def link zimbuChar Constant
hi def link zimbuFixed Constant
hi def link zimbuComment Comment
hi def link zimbuCommentStart zimbuComment
hi def link zimbuBlockComment Comment
hi def link zimbuCblock Comment
hi def link zimbuTodo Todo
hi def link zimbuParam Constant
hi def link zimbuCode Statement
hi def link zimbuNoBar Ignore
hi def link zimbuNoBacktick Ignore
hi def link zimbuSpaceError Error
hi def link zimbuError Error

View File

@@ -0,0 +1,976 @@
===============================================================================
= Ласкаво простимо в уроки VIM =
===============================================================================
Vim дуже потужний редактор, що має багато команд. Всі команди неможливо
помістити в підручнику на зразок цього, але цих уроків достатньо, щоб
ви навчились з легкістю користуватись Vim як універсальним редактором.
УВАГА:
Уроки цього підручника вимагають зміни тексту. Зробіть копію файлу, щоб
практикуватись на ньому.
Важливо пам'ятати, що цей підручник має на меті навчання на практиці.
Це означає що ви маєте застосовувати команди щоб вивчити їх. Просто
прочитавши текст, ви забудете команди.
Кнопки на клавіатурі, будемо позначати квадратними дужками: [кнопка].
А зараз переконайтесь, що включена англійська розкладка і не затиснутий
Caps Lock, і натисніть кнопку j щоб переміститись до першого уроку.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Урок 1.1: ПЕРЕМІЩЕННЯ КУРСОРА
** Щоб переміщати курсор використовуйте кнопки [h],[j],[k],[l],
як вказано на схемі:
^
[k]
<[h] [l]>
[j]
v
Таке розміщення спочатку може видатись трохи дивним. Як наприклад те, що
кнопка [l] переміщує курсор вправо. Але клавіші розміщені так, щоб
мінімізувати кількість рухів. Найчастіша дія яку користувач робить з
текстовим файлом - це читає його. А при читанні прокручують текст вниз.
Тому вниз прокручує [j] - вона знаходиться якраз під вказівним пальцем
правої руки.
Курсор можна переміщувати і класичним способом (курсорними клавішами), але
зручніше буде, якщо ви опануєте спосіб Vim. (Особливо якщо ви вже вмієте
набирати всліпу).
1. Попереміщуйте курсор по екрану, поки не призвичаїтесь.
2. Перемістіться до наступного уроку.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Урок 1.2: Вихід з Vim
Увага! Перед тим як виконувати цей урок прочитайте його повністю.
1. Натисніть [ESC] (щоб впевнитись що ви в звичайному режимі).
2. Наберіть: :q! [ENTER].
Це завершує роботу, відкидаючи всі зміни які ви здійснили.
3. Коли ви побачите привітання терміналу введіть команду яку ви використали
щоб відкрити цей підручник. Скоріш за все це було: vim tutor.txt [ENTER]
4. Якщо ви запам'ятали кроки з 1 по 3, виконайте їх, і переходьте до
наступного уроку.
Зауваження: Команда :q! [ENTER] завершує роботу і відкидає всі зміни. Через
кілька уроків ви навчитесь зберігати зміни в файл.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Урок 1.3:РЕДАГУВАННЯ ТЕКСТУ. ВИДАЛЕННЯ.
** Натисніть [x] щоб видалити символ під курсором. **
1. Перемістіть курсор до лінії нижче, яка позначена так: --->.
2. Щоб виправити помилки перемістіть курсор так, щоб він став над
символом який треба видалити.
3. Натисніть [x] щоб видалити непотрібний символ.
4. Повторіть кроки з другого по четвертий, поки речення не стане правильним.
---> Ккоровва перрестрибнуууууула ччерезз мііісяццць.
5. Тепер, коли речення правильне, можна перейти до уроку 1.4.
Зауваження: Протягом навчання не старайтесь запам'ятати все.
Вчіться практикою.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Урок 1.4: РЕДАГУВАННЯ ТЕКСТУ. ВСТАВКА
** Натисніть [i] щоб вставити текст. **
1. Перемістіть курсор на перший рядок позначений: --->.
2. Перемістіть курсор на символ, ПІСЛЯ якого потрібно вставити текст.
3. Натисніть [i] і наберіть необхідні вставки.
4. Коли всі помилки виправлені натисніть [ESC] щоб повернутись в звичайний
режим.
---> З прав текст.
---> З цього рядка пропав деякий текст.
5. Коли призвичаїтесь вставляти текст - переходьте до уроку 1.5.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Урок 1.5: РЕДАГУВАННЯ ТЕКСТУ. ДОДАВАННЯ.
** Натисніть [A] щоб додати текст. **
Увага! Тут і далі, коли мають наувазі клавішу з буквою в верхньому
регістрі, то це означає що її натискають з затиснутою [SHIFT].
1. Перемістіть курсор до першої лінії внизу позначеної --->.
Не має значення над яким символом знаходиться курсор.
2. Натисніть [A] і введіть необхідне доповнення.
3. Коли додавання завершене натисніть [ESC] щоб повернутись в
звичайний режим.
4. Перемістіть курсор до другої лінії позначеної ---> і повторіть
кроки 2 і 3 щоб виправити речення.
---> З цього рядка пропущ
З цього рядка пропущений текст.
---> З цього рядка також
З цього рядка також пропущений текст.
5. Після виконання вправ, переходьте до наступного уроку.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Урок 1.6: РЕДАГУВАННЯ ФАЙЛУ
** Використайте :wq щоб зберегти файл і вийти.**
Увага! Перед виконанням уроку прочитайте його повністю.
1. Вийдіть з цього підручника як ви робили в уроці 1.2: :q![ENTER]
Або якщо ви маєте доступ до іншого терміналу виконуйте наступні
дії в ньому.
2. В терміналі наберіть команду: vim НазваФайлу [ENTER]
'vim' - команда для запуску редактора, НазваФайлу - файл який будемо
редагувати. Якщо ввести неіснуючий файл, то він створиться
3. Відредагуйте текст, як навчились у попередніх уроках.
4. Щоб зберегти зміни у файлі, і вийти з Vim наберіть: :wq [ENTER]
5. Якщо ви вийшли з підручника на першому кроці, то зайдіть в нього
знову і переходьте до підсумку.
6. Після прочитання і засвоєння попередніх кроків виконайте їх.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ПІДСУМОК УРОКУ 1
1. Курсор керується курсорними клавішами, або клавішами [h][j][k][l]
[h] (вліво) [j] (вниз) [k] (вверх) [l] (вправо)
2. Щоб запустити Vim з терміналу наберіть: vim Назва файлу [ENTER]
3. Щоб вийти з Vim наберіть: [ESC] :q! [ENTER] щоб відкинути всі зміни.
або наберіть: [ESC] :wq [ENTER] щоб зберегти всі зміни.
4. Щоб видалити символ під курсором натисніть [x].
5. Щоб вставити, чи доповнити текст наберіть:
[i] текст що вставляєтсья [ESC] вставиться перед курсором
[A] текст до додається [ESC] додасть текст до рядка
Зауваження: Натискання [ESC] перенесе вас в звичайний режим, чи відмінить
не до кінця введену команду.
Тепер переходьте до уроку 2.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Урок 2.1: КОМАНДИ ВИДАЛЕННЯ
** Введіть dw щоб видалити слово. **
1. Натисніть [ESC], щоб переконатись що ви в звичайному режимі.
2. Перемістіть курсор до лінії нижче позначеної --->.
3. Перемістіть курсор до початку слова що має бути видалене.
4. Введіть dw щоб слово пропало.
Зауваження: Буква d з'явиться в останньому рядку екрану, якщо ви її натиснули.
Vim чекає введення наступного символа. Якщо з'явилось щось інше
значить ви щось не так ввели. Натисніть [ESC] і почніть спочатку.
---> Є деякі слова весело, які не потрібні папір в цьому реченні.
5. Повторюйте кроки 3 і 4 поки речення не стане правильне, а тоді переходьте
до уроку 2.2.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Урок 2.2: БІЛЬШЕ КОМАНД ВИДАЛЕННЯ
** Наберіть d$ щоб видалити символи від курсора до кінця рядка. **
1. Натисніть [ESC] щоб переконатись що ви в звичайному режимі.
2. Перемістіть курсор до лінії нижче, що позначена --->.
3. Перемістіть курсор до кінця правильного рядка (ПІСЛЯ першої крапки).
4. Введіть d$ щоб видалити все до кінця рядка.
---> Хтось надрукував кінець цього рядка двічі. кінець цього рядка двічі.
5. Перейдіть до уроку 2.3 щоб розібратись в цьому детальніше.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Урок 2.3:ОПЕРАТОРИ І ПЕРЕМІЩЕННЯ
Багато команд що змінюють текст утворені з оператора і переміщення.
Формат команди видалення з оператором d подано нижче:
d переміщення
Де:
d - оператор видалення.
переміщення - з чим працює оператор (описано нижче).
Короткий список переміщень:
w - до початку наступного слова, НЕ ВКЛЮЧАЮЧИ його перший символ.
e - до кінця поточного слова, ВКЛЮЧАЮЧИ останній символ.
$ - до кінця рядка, ВКЛЮЧАЮЧИ останній символ.
Тому введення de видалить символи від курсора, до кінця слова.
Зауваження: Натискання тільки переміщення в звичайному режимі відповідно
переміщує курсор.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Урок 2.4: ВИКОРИСТАННЯ ЛІЧИЛЬНИКА ДЛЯ ПЕРЕМІЩЕННЯ
** Введення числа перед переміщенням повторює його стільки раз. **
1. Перемістіть курсор до початку рядка позначеного --->
2. Введіть 2w щоб перемістити курсор на два слова вперед.
3. Введіть 3e щоб перемістити курсор в кінець третього слова.
4. Введіть 0 (нуль) щоб переміститись на початок рядка.
5. Повторіть кроки 2 і 3 з різними числами.
---> А це просто рядок зі словами, серед яких можна рухати курсором.
6. Переходьте до уроку 2.5.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Урок 2.5: БАГАТОРАЗОВЕ ВИДАЛЕННЯ
** Введення числа з оператором повторює його стільки ж разів. **
В комбінації з оператором видалення, і переміщення з лічильника можна
видаляти потрібне число елементів.
Для цього введіть
d число переміщення
1. Перемістіться до першого слова в ВЕРХНЬОМУ РЕГІСТРІ в рядку
позначеному --->.
2. Введіть d2w щоб видалити два слова.
3. Повторіть кроки 1 і 2 з різними числами, щоб видалити все зайве.
---> цей ABC DE рядок FGHI JK LMN OP слів Q RS TUV почищений.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Урок 2.6: ОПЕРАЦІЇ З РЯДКАМИ
** Введіть dd щоб видалити весь рядок. **
Через те, що видалення всього рядка є доволі частою дією розробники Vi
вирішили що для цієї операції потрібна проста команда, як dd.
1. Перемістіть курсор до другого рядка в вірші нижче.
2. Введіть dd щоб видалити рядок.
3. Потім перемістіться до четвертого рядка.
4. Введіть 2dd щоб видалити два рядки.
---> 1) Троянди червоні,
---> 2) Багнюка весела,
---> 3) Волошки голубі,
---> 4) В мене є машина,
---> 5) Годинник каже час,
---> 6) Цукерки солодкі,
---> 7) Дарую тобі.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Урок 2.7: ВІДКИНУТИ ЗМІНИ
** Натисніть u щоб скасувати останні команди, U щоб виправити ввесь рядок. **
1. Перемістіть курсор до рядка нижче позначеного ---> на місце першої помилки.
2. Натисніть x щоб видалити непотрібний символ.
3. Потім натисніть u щоб відмінити виправлення.
4. Цього разу виправте всі помилки в рядку використовуючи команду x .
5. Після цього введіть U, і відкиньте всі зміни в цілому рядку.
6. Натисніть u кілька разів, щоб відмінити U і попередні команди.
7. Тепер натисніть CTRL-R кілька разів, щоб повторити відмінені команди
(відмінити відміну).
---> Вииправте помилки наа цьоому рядку і вііідмініть їх.
8. Тепер можна переходити до підсумків другого уроку.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ПІДСУМОК УРОКУ 2
1. Щоб видалити все від курсора аж до початку наступного слова введіть: dw
2. Щоб видалити від курсора до кінця рядка: d$
3. Щоб видалити увесь рядок: dd
4. Щоб повторити переміщення, поставте перед ним число повторів: 2w
5. Формат команди зміни:
оператор [число] переміщення
де:
оператор - що робити, як наприклад d для видалення
[число] - кількість повторів
переміщення - куди переміститись перед виконанням оператора, як
як наприклад w (слово), $ (кінець рядка), і т.і.
6. Щоб переміститись до початку рядка використовуйте нуль: 0
7. Щоб відмінити попередню дію введіть: u (u в нижньому регістрі)
Щоб відмінити всі зміни рядка введіть: U (U в верхньому регістрі)
Щоб скасувати відміну натисніть: CTRL-R
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Урок 3.1: КОМАНДА PUT
** Введіть p щоб вставити перед тим видалений текст після курсору. **
1. Перемістіть курсор до першої ---> лінії внизу.
2. Введіть dd щоб видалити рядок і зберегти його в регістрі Vim.
3. Перемістіть курсор до рядка в), НАД тим місцем де має бути видалений рядок.
4. Натисніть p щоб вставити рядок під курсором.
5. Повторіть кроки від 2 до 4 щоб вставити всі рядки в правильному порядку.
---> г) всіх до кузні іззива.
---> б) а в коваля серце тепле,
---> в) а він клепче та й співа,
---> а) А в тій кузні коваль клепле,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Урок 3.2: Команда заміни
** Наберіть rx щоб замінити символ під курсором на x . **
1. Перемістіть курсор до першого рядка нижче, позначеного --->.
2. Помістіть курсор над першою помилкою.
3. Наберіть r а потім символ який має стояти там.
4. Повторіть кроки з 2 по 3 поки перший рядок не стане еквівалентним другому.
---> Коли ця лігія набираламт. хтось наьтснкв геправмльні унопкм!
---> Коли ця лінія набиралась, хтось натиснув неправильні кнопки!
5. Зараз переходьте до уроку 3.3.
Примітка: Ви маєте вчитись діями, а не простим заучуванням, пам'ятаєте?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Урок 3.3: ОПЕРАТОР ЗАМІНИ
** Щоб зробити заміну до кінця слова введіть ce . **
1. Перемістіть курсор до першого рядка позначеного --->.
2. Помістіть курсор над у в слові рукра.
3. Введіть ce і правильне закінчення слова (ядок в цьому випадку).
4. Натисніть [ESC] і переходьте до наступного символа, який потрібно замінити.
5. Повторюйте кроки 3 і 4 поки перше речення не стане таким самим як і друге.
---> Цей рукра має кілька слів що потретамув заміни за допоцкщшг оператора.
---> Цей рядок має кілька слів що потребують заміни за допомогою оператора.
Зауважте що ce видаляє слово, і поміщає вас в режим вставки.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Урок 3.4: БІЛЬШЕ ЗМІН З c
** Оператор заміни використовується з тими ж переміщеннями що і видалення. **
1. Оператор заміни працює в такий же спосіб що і видалення. Формат:
c [число] переміщення
2. Переміщення ті ж самі, такі як w (слово) і $ (кінець рядка).
3. Перемістіться до першого рядка позначеного --->.
4. Перемістіть курсор до першої помилки.
5. Наберіть c$ і решту рядка, щоб він став таким як другий і натисніть [ESC].
---> Кінець цього рядка потребує якихось дій щоб стати таким як кінець другого.
---> Кінець цього рядка можна виправити за допомогою команди c$.
Примітка: Можна використовувати кнопку Backspace щоб виправляти опечатки при
наборі.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ПІДСУМОК УРОКУ 3
1. Щоб вставити текст який був видалений наберіть p . Це вставляє
видалений текст ПІСЛЯ курсора (якщо був видалений рядок, вставка
продовжиться з рядка під курсором).
2. Щоб замінити символ під курсором наберіть r і необхідний символ.
3. Оператор заміни дозволяє робити заміну тексту від курсору, до потрібного
переміщення. Наприклад щоб замінити все від курсора до кінця слова
вводять ce . Щоб замінити закінчення рядка тиснуть c$ .
4. Формат заміни:
c [число] переміщення
Почнемо наступний урок.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Урок 4.1: ПОЗИЦІЯ КУРСОРА І СТАТУС ФАЙЛУ
** Введіть CTRL-G щоб побачити вашу позицію в файлі, і його статус.
Введіть G щоб переміститись на потрібний рядок файлу. **
ПРИМІТКА: Прочитайте увесь урок перед виконанням будь-яких кроків!!
1. Затисніть кнопку Ctrl і натисніть g . Це називається CTRL-G.
Внизу з'явиться повідомлення з назвою файлу, і позицією в файлі.
Запам'ятайте номер рядка для кроку 3.
ПРИМІТКА: Ви бачите позицію курсора в нижньому правому кутку екрану.
Це трапляється коли включена опція 'ruler' (читайте :help 'ruler' )
2. Натисніть G щоб переміститись до кінця файлу.
Наберіть gg щоб переміститись до початку файлу.
3. Наберіть номер рядка де ви були а потім G. Це перенесе вас до потрібного
рядка.
4. Якщо ви запам'ятали три попередні кроки, то виконуйте.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Урок 4.2: КОМАНДА ПОШУКУ
** Введіть / (слеш) і фразу, щоб шукати її в тексті. **
1. В звичайному режимі введіть символ / . Зауважте що він і курсор
з'являються в низу екрану, як і з командою : .
2. Тепер введіть 'очепятка' <ENTER>. Це буде словом яке ви шукатимете.
3. Щоб здійснити пошук цієї фрази ще раз введіть n .
Щоб шукати в протилежному напрямку введіть N .
4. Щоб шукати фразу в зворотньому напрямку використайте ? замість / .
5. Щоб переміститись назад до того місця звідки прийшли натисніть CTRL-O.
Повторіть щоб повернутись ще далі. (Це як кнопка назад в браузері)
CTRL-I переміщує вперед.
---> "очепятка" не є способом написати опечатка; очепятка це опечатка.
Примітка: Коли пошук досягає кінця файлу він продовжує з початку, хіба що
опція 'wrapscan' була виключена.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Урок 4.3: ПОШУК ПАРНИХ ДУЖОК
** Введіть % щоб знайти парну ),], чи } . **
1. Помістіть курсор над будь-якою (, [, чи { в рядку нижче позначеному --->.
2. Тепер введіть символ % .
3. Курсор переміститься до відповідної дужки.
4. Введіть % щоб перемістити курсор до іншої парної дужки.
5. Спробуйте з іншими дужками, і подивіться що вийде.
---> Це ( тестовий рядок ( з такими [ такими ] і такими { дужками } в ньому. ))
Примітка: Це корисно при відлагоджуванні програми з неправильними дужками.
І взагалі в кожному тексті дужки мають стояти правильно!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Урок 4.4: КОМАНДА ЗАМІНИ
** Наберіть :s/старе/нове/g щоб замінити 'старе' на 'нове'. **
1. Перемістіть курсор до лінії нижче позначеної --->.
2. Введіть :s/(біп)/блять [ENTER] . Зауважте що ця команда змінює тільки перше
входження (біп) в рядку.
3. Потім наберіть :s/(біп)/блять/g . Додавання g вказує що заміни
робляться у всьому рядку глобально.
---> люди не лю(біп), коли в слові "лю(біп)" "(біп)" заміняють на "(бiп)".
4. Щоб замінити кожне входження послідовності символів між двома рядками
наберіть :#,#s/старе/нове/g де #,# діапазон рядків в яких робиться
заміна.
Введіть :%s/старе/нове/g щоб змінити кожне входження у цілому файлі.
Введіть :%s/старе/нове/gc щоб замінити, кожне входження у файлі з
підтвердженням кожної заміни.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ПІДСУМОК УРОКУ 4
1. CTRL-G виводить вашу позицію в файлі і назву файлу.
G переміщує в кінець файлу.
число G переміщує до рядка з вказаним номером.
gg переміщує до першого рядка.
2. Ввід / і послідовності символів шукає послідовність ПІСЛЯ курсора.
Ввід ? і послідовності символів шукає послідовність ПЕРЕД курсором.
Після пошуку введіть n щоб знайти наступне входження в тому ж напрямку
або N щоб шукати в протилежному напрямку.
CTRL-O відносить вас до старішої позиції, CTRL-I до новішої позиції.
3. Ввід % коли курсор знаходиться над дужкою (,),[,],{, чи } переносить
курсор до протилежної дужки.
4. Щоб замінити перше входження старого слова на нове :s/старе/нове
Щоб замінити всі старі слова рядка на нові :s/старе/нове/g
Щоб замінити фрази між двома рядками :#,#s/старе/нове/g
Щоб замінити всі входження в файлі :%s/старе/нове/g
Щоб щоразу підтверджувати заміну додайте 'c' :%s/старе/нове/gc
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Урок 5.1: ЯК ВИКОНАТИ ЗОВНІШНЮ КОМАНДУ
** Введіть :! і зовнішню команду, щоб виконати ту команду. **
1. Введіть відому команду : щоб встановити курсор в низу екрану.
Це дозволяє вводити команди командного рядка.
2. Тепер введіть ! (символ знаку оклику) . Це дозволить вам виконати
будь-яку зовнішню команду.
3. Як приклад введіть :!ls [ENTER]. Це покаже список файлів каталогу, так
так ніби ви знаходитесь в оболонці терміналу. Або використайте :!dir
якщо ви раптом знаходитесь в Windows.
Примітка: Можна запускати будь-яку зовнішню команду таким способом, навіть з
аргументами.
Примітка: Всі команди що починаються з : мають закінчуватись натисканням
[ENTER]. Більше на цьому не наголошуватиметься.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Урок 5.2: ЩЕ ПРО ЗАПИС ФАЙЛІВ
** Щоб зберегти змінений текст, введіть :w НАЗВААЙЛУ **
1. Введіть :!dir чи :!ls щоб переглянути вміст вашої директорії.
Вам вже казали що після цього тиснуть [ENTER].
2. Виберіть ім'я файлу яке ще не використовується, наприклад TEST.
(Взагалі то це не обов'язково, якщо вміст обраного файлу не
є цінним)
3. Тепер введіть: :w TEST (де TEST це назва яку ви обрали.)
4. Це зберігає увесь файл (підручник Vim ) під ім'ям TEST.
Щоб перевірити знову наберіть :!ls щоб побачити зміни в каталозі.
Примітка: Якщо ви вийдете з Vim і запустите його знову командою vim TEST,
файл що ви відкриєте буде точною копією цього, коли ви його зберегли.
5. Зараз видаліть файл ввівши (Unix): :!rm TEST
чи (MS-DOS): :!del TEST
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Урок 5.3: ВИБІР ТЕКСТУ ДЛЯ ЗАПИСУ
** Щоб зберегти частину файлу, наберіть v переміщення :w НАЗВААЙЛУ **
1. Перемістіть курсор до цього рядка.
2. Натисніть v і перемістіть курсор на п'ять пунктів нижче. Зауважте, що
текст виділяється.
3. Натисніть символ : . Внизу екрану з'являються символи :'<,'> .
4. Введіть w TEST , де TEST назва файлу що ще не використовується.
Переконайтесь що ви бачите :'<,'>w TEST перед тим як натиснути [ENTER].
5. Vim запише вибрані рядки в файл TEST. Використайте :!dir чи !ls
щоб побачити це. Поки що не видаляйте його! Ми використаємо TEST в
наступному уроці.
Зауваження: Натискання v починає режим візуального виділення. Ви можете
переміщувати курсор щоб змінити розмір вибраної частини.
Потім можна використати оператор щоб зробити щось з текстом.
Наприклад d видалить текст.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Урок 5.4: ОТРИМАННЯ І ЗЛИТТЯ ФАЙЛІВ
** Щоб вставити вміст файлу введіть :r НАЗВААЙЛУ **
1. Помістіть курсор десь над цим рядком.
Зауваження: Після виконання кроку 2 ви побачите текст з уроку 5.3. Тоді
перемістіться вниз, щоб побачити вміст цього уроку знову.
2. Тоді отримайте вміст вашого файлу TEST використавши команду :r TEST ,
де TEST назва файлу що ви використали.
Файл що ви отримуєте поміщується під рядком курсора.
3. Щоб перевірити що файл вставлено, прокрутіть текст назад, і переконаєтесь
що тепер є дві копії урок 5.3, the original and the file version.
Примітка: Також ви можете вставляти вивід зовнішньої програми. Наприклад
:r !ls читає вивід команди ls і вставляє його під курсором.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Підсумок 5 уроку
1. :!команда виконує зовнішню команду.
2. :w НАЗВААЙЛУ записує поточний файл на диск під назвою НАЗВААЙЛУ.
3. v переміщення :w НАЗВААЙЛУ зберігає візуально виділену частину тексту
в файл НАЗВААЙЛУ.
4. :r НАЗВААЙЛУ отримує з диску файл НАЗВААЙЛУ і вставляє його під
курсором.
5. :r !ls читає вивід команди ls і вставляє її під поточною позицією курсора
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Урок 6.1: КОМАНДА ВСТАВКИ
** Введіть o щоб вставити новий рядок під курсором. **
1. Перемістіть курсор на рядок нижче, позначений --->.
2. Натисніть o щоб вставити новий рядок ПІД курсором та перейти в
режим вставки.
3. Тепер введіть текст і натисніть [ESC] щоб вийти з режиму вставки.
---> Після натискання o курсор ставиться на наступний рядок в режимі вставки.
4. Щоб вставити рядок НАД ABOVE курсором пишуть O в верхньому регістрі,
замість o. Спробуйте на рядку нижче.
---> Щоб вставити рядок над цим введіть O .
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Урок 6.2: КОМАНДА ДОПИСУВАННЯ
** Натисніть a щоб вставити текст після курсору. **
1. Перемістіть курсор до початку рядка внизу позначеного --->.
2. Тисніть e поки курсор не буде в кінці ря .
3. Натисніть a (маленьке) щоб додати текст ПІСЛЯ курсору.
4. Допишіть слова як рядок внизу. Натисніть [ESC] щоб вийти з режиму
вставки.
5. Використайте e щоб переміститись до наступного неповного слова та
to move to the next incomplete word and repeat steps 3 and 4.
---> Цей ря дозволить вам попрактикува в дописува тексту до рядка.
---> Цей рядок дозволить вам попрактикуватись в дописуванні тексту до рядка.
Примітка: a, i і A переходять в один і той же режим вставки, єдиною різницею
є тільки те, де вставляються символи.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Урок 6.3: ІНШИЙ СПОСІБ ЗАМІНИ
** Введіть велику R щоб замінити більш ніж один символ. **
1. Перемістіть курсор до першого рядка внизу позначеного --->.
Перемістіть курсор до першого xxx .
2. Тепер натисніть R і введіть номер під ним з другого рядка, так що він
замінює xxx .
3. Натисніть [ESC] щоб покинути режим заміни. Зауважте, що решта рядка
залишається незмінною.
4. Повторіть кроки від 1 до 3 щоб замінити всі xxx на числа з другого рядка.
---> Додавання 123 до xxx дає xxx.
---> Додавання 123 до 456 дає 579.
Зауваження: Режим заміни подібний до режиму вставки, тільки кожен введений
символ видаляє символ який стояв на його місці.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Урок 6.4: КОПІЮВАННЯ І ВСТАВКА
** Використайте оператор y щоб копіювати текст і p щоб його вставити **
1. Перейдіть до рядка нижче позначеного ---> і покладіть курсор після "а)".
2. Перейдіть в візуальний режим за допомогою клавіші v і перемістіть курсор
якраз перед словом "один".
3. Введіть y щоб копіювати (yank) виділений текст.
4. Перемістіть курсор до кінця наступного рядка: j$
5. Натисніть p щоб вставити (put) текст. Тоді введіть : два [ESC] .
6. так само додайте третій рядочок.
---> а) це рядок номер один
б)
Зауваження: також можна використовувати y як оператор;
yw копіює одне слово.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Урок 6.5: ВСТАНОВЛЕННЯ ОПЦІЙ
** Встановити опцію так що пошук чи заміна буде ігнорувати регістр **
1. Знайдіть слово 'ігнорувати' ввівши : /ігнорувати
Повторіть кілька разів натискаючи n .
2. Встановіть опцію ігнорування регістру 'ic' (Ignore case) ввівши: :set ic
3. Тепер пошукайте 'ігнорувати' знову ввівши n
Зауважте що Ігнорувати та ІГНОРУВАТИ тепер також знаходяться.
4. Ввімкніть 'hlsearch' (підсвітку пошуку) і 'incsearch' (інтерактивність)
командою :set hls is .
5. Тепер пошукайте щось знову і зауважте зміни: /ігнорувати [ENTER]
6. Щоб вимкнути ігнорування регістру напишіть: :set noic
Примітка: Щоб вимкнути підсвітку співпадінь введіть: :nohlsearch
Примітка: Якщо ви хочете не брати до уваги регістр тільки під час одного пошуку
використайте ключ \c. Наприклад: /ігнорувати\c [ENTER]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ПІДСУМОК УРОКУ 6
1. Введіть о щоб додати рядок ПІД курсором і почати режим вставки.
Введіть O щоб додати рядок НАД курсором.
2. Введіть a щоб вставити текст ПІСЛЯ курсора.
Введіть A щоб додати текст до рядка.
3. Переміщення e переміщує нас до кінця слова.
4. Оператор y копіює текст, p вставляє його.
5. Введення R переносить нас в режим заміни до натискання [ESC].
6. Набір ":set xxx" встановлює опцію "xxx". Деякі опції:
'ic' 'ignorecase' ігнорувати верхній/нижній регістр при пошуку
'is' 'incsearch' показувати співпадіння пошуку під час введення
фрази
'hls' 'hlsearch' пісвічувати всі співпадіння
Можна одночасно використовувати і коротку і довгу форму запису опції.
7. Використайте префікс "no" щоб вимкнути опцію: :set noic
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Урок 7.1: ОТРИМАННЯ ДОПОМОГИ
** Використання вбудованої довідкової системи **
Vim має всеосяжну систему довідки. Щоб ознайомитись з нею спробуйте один з
таких способів:
- натисніть кнопку [HELP] (якщо така є)
- натисніть [F1]
- наберіть :help
Прочитайте текст в вікні допомоги, щоб вияснити як вона працює.
Натисніть CTRL-W двічі щоб змінити вікно
Наберіть :q щоб закрити вікно довідки.
Можна знайти довідку майже на будь-яку тему додаючи аргумент після команди
":help" . Спробуйте одну з наступних (не забувайте натискати [ENTER]):
:help w
:help c_CTRL-D
:help insert-index
:help user-manual
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Урок 7.2: СТВОРЕННЯ СКРИПТА АВТОЗАПУСКУ
** Ввімкнення додаткових функцій Vim **
Vim має набагато більше функцій ніж Vi, але більшість з них відключені за
замовчуванням. Щоб почати використання додаткових функцій потрібно створити
файл "vimrc".
1. Почніть редагування файлу "vimrc" . Це залежить від вашої системи:
:e ~/.vimrc для Unix
:e $VIM/_vimrc для MS-Windows
2. Тепер прочитайте приклад вмісту "vimrc" :
:r $VIMRUNTIME/vimrc_example.vim
3. Збережіть файл:
:w
Наступного разу коли ви запустите Vim він буде використовувати підсвітку
синтаксису. Можна додати всі ваші улюблені налаштування в цей файл. Для більш
детальної інформації введіть :help vimrc-intro
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Урок 7.3: АВТОДОПОВНЕННЯ
** Автодоповнення за допомогою CTRL-D і [TAB] **
1. Переконайтесь що в Vim не включена зворотня сумісність: :set nocp
2. Подивіться що за файли існують в каталозі: :!ls чи :!dir
3. Введіть початок команди: :e
4. Натисніть CTRL-D і Vim покаже список команд що починаються з "e".
5. Натисніть [TAB] і Vim доповнить команду до ":edit".
6. Тепер додайте пропуск і початок існуючого імені файлу: :edit FIL
7. Натисніть [TAB]. Vim доповнить ім'я (якщо воно унікальне).
Зауваження: Доповнення працює для багатьох команд. Просто натискайте CTRL-D і
[TAB]. Це особливо корисно для команди :help .
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ПІДСУМОК УРОКУ 7
1. Введіть :help або натисніть [F1] щоб відкрити вікно довідки.
2. Введіть :help тема щоб знайти довідку про тему .
3. Введіть CTRL-W CTRL-W щоб змінити вікно.
4. Наберіть :q щоб закрити вікно
5. Створіть скрипт vimrc щоб змінювати ваші налаштування при запуску.
6. При наборі команди що починається з двокрапки : натисніть CTRL-D
щоб побачити можливі доповнення. Натисніть [TAB] щоб побачити одне з
доповнень.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Це завершує уроки Vim . Вони були націлені щоб дати вам короткий вступ в
редактор Vim, достатній для того щоб використовувати редактор комфортно.
Ці уроки зовсім далеко від повних, бо Vim має набагато більше команд. Можна
прочитати інструкцію користувача : ":help user-manual".
Для подальшого читання і вивчення рекомендується така книжка:
Vim - Vi Improved - by Steve Oualline
Publisher: New Riders
Особливо корисна для початківців.
Там багато прикладів і ілюстрацій.
Дивіться http://iccf-holland.org/click5.html
Ці уроки були написані Майклом С. Пірсом та Робертом Уаром.
Модифіковано для Vim Бремом Муленаром.
Переклад на українську Буник Т.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@@ -1,7 +1,7 @@
" An example for a vimrc file.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last change: 2014 Feb 05
" Last change: 2014 Nov 05
"
" To use it, copy it to
" for Unix and OS/2: ~/.vimrc
@@ -95,3 +95,10 @@ if !exists(":DiffOrig")
command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis
\ | wincmd p | diffthis
endif
if has('langmap') && exists('+langnoremap')
" Prevent that the langmap option applies to characters that result from a
" mapping. If unset (default), this may break plugins (but it's backward
" compatible).
set langnoremap
endif

View File

@@ -316,7 +316,7 @@ directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
If you have to use a `make' that does not supports the `VPATH'
If you have to use a `make' that does not support the `VPATH'
variable, you have to compile the package for one architecture at a time
in the source code directory. After you have installed the package for
one architecture, use `make distclean' before reconfiguring for another

View File

@@ -228,11 +228,15 @@ at:
http://www.mingw.org/
or you can use 'MinGW-w64' compiler.
http://mingw-w64.sourceforge.net/
Once you have downloaded the compiler binaries, unpack them on your hard disk
somewhere, and put them on your PATH. If you are on Win95/98 you can edit
your AUTOEXEC.BAT file with a line like:
set PATH=C:\GCC-2.95.2\BIN;%PATH%
set PATH=C:\MinGW\bin;%PATH%
or on NT/2000/XP, go to the Control Panel, (Performance and Maintenance),
System, Advanced, and edit the environment from there.
@@ -240,10 +244,10 @@ System, Advanced, and edit the environment from there.
Test if gcc is on your path. From a CMD (or COMMAND on '95/98) window:
C:\> gcc --version
2.95.2
gcc (GCC) 4.8.1
C:\> make --version
GNU Make version 3.77 (...etc...)
C:\> mingw32-make --version
GNU Make 3.82.90 (...etc...)
Now you are ready to rock 'n' roll. Unpack the vim sources (look on
www.vim.org for exactly which version of the vim files you need).
@@ -255,7 +259,7 @@ Change directory to 'vim\src':
and you type:
make -f Make_ming.mak gvim.exe
mingw32-make -f Make_ming.mak gvim.exe
After churning for a while, you will end up with 'gvim.exe' in the 'vim\src'
directory.
@@ -264,7 +268,7 @@ You should not need to do *any* editing of any files to get vim compiled this
way. If, for some reason, you want the console-mode-only version of vim (this
is NOT recommended on Win32, especially on '95/'98!!!), you can use:
make -f Make_ming.mak GUI=no vim.exe
mingw32-make -f Make_ming.mak GUI=no vim.exe
If you are dismayed by how big the EXE is, I strongly recommend you get 'UPX'
(also free!) and compress the file (typical compression is 50%). UPX can be
@@ -291,8 +295,7 @@ You need to uncomment lines in Make_ming.mak to have NLS defined.
Use Make_cyg.mak with Cygwin's GCC. See
http://users.skynet.be/antoine.mechelynck/vim/compile.htm
The Cygnus one many not fully work yet.
With Cygnus gcc you can use the Unix Makefile instead (you need to get the
With Cygnus gcc you should use the Unix Makefile instead (you need to get the
Unix archive then). Then you get a Cygwin application (feels like Vim is
running on Unix), while with Make_cyg.mak you get a Windows application (like
with the other makefiles).
@@ -316,9 +319,9 @@ your Linux (or other unix) box. To do this, you need to follow a few steps:
http://www.mingw.org/wiki/LinuxCrossMinGW
http://www.libsdl.org/extras/win32/cross/README.txt
2) Get and unpack both the Unix sources and the extra archive
3) in 'Make_ming.mak', set 'CROSS' to 'yes' instead of 'no'.
Make further changes to 'Make_ming.mak' as you wish.
If your cross-compiler prefix differs from the predefined value,
3) in 'Make_cyg_ming.mak', set 'CROSS' to 'yes' instead of 'no'.
Make further changes to 'Make_cyg_ming.mak' and 'Make_ming.mak' as you
wish. If your cross-compiler prefix differs from the predefined value,
set 'CROSS_COMPILE' corresponding.
4) make -f Make_ming.mak gvim.exe

View File

@@ -1,735 +1,52 @@
#
# Makefile for VIM on Win32, using Cygnus gcc
# Updated by Dan Sharp.
# Last Change: 2014 Aug 10
# Makefile for VIM on Win32, using MinGW cross compiler on Cygwin
#
# Also read INSTALLpc.txt!
#
# This compiles Vim as a Windows application. If you want Vim to run as a
# Cygwin application use the Makefile (just like on Unix).
#
# GUI no or yes: set to yes if you want the GUI version (yes)
# DIRECTX no or yes: set to yes if you want use DirectWrite (no)
# PERL define to path to Perl dir to get Perl support (not defined)
# PERL_VER define to version of Perl being used (56)
# DYNAMIC_PERL no or yes: set to yes to load the Perl DLL dynamically (yes)
# PYTHON define to path to Python dir to get PYTHON support (not defined)
# PYTHON_VER define to version of Python being used (22)
# DYNAMIC_PYTHON no or yes: use yes to load the Python DLL dynamically (yes)
# PYTHON3 define to path to Python3 dir to get PYTHON3 support (not defined)
# PYTHON3_VER define to version of Python3 being used (22)
# DYNAMIC_PYTHON3 no or yes: use yes to load the Python3 DLL dynamically (yes)
# TCL define to path to TCL dir to get TCL support (not defined)
# TCL_VER define to version of TCL being used (83)
# DYNAMIC_TCL no or yes: use yes to load the TCL DLL dynamically (yes)
# RUBY define to path to Ruby dir to get Ruby support (not defined)
# RUBY_VER define to version of Ruby being used (16)
# RUBY_VER_LONG same, but in format with dot. (1.6)
# You must set RUBY_VER_LONG when changing RUBY_VER.
# You must set RUBY_API_VER version to RUBY_VER_LONG.
# Don't set ruby API version to RUBY_VER like 191.
# DYNAMIC_RUBY no or yes: use yes to load the Ruby DLL dynamically (yes)
# MZSCHEME define to path to MzScheme dir to get MZSCHEME support (not defined)
# MZSCHEME_VER define to version of MzScheme being used (209_000)
# DYNAMIC_MZSCHEME no or yes: use yes to load the MzScheme DLLs dynamically (yes)
# MZSCHEME_DLLS path to MzScheme DLLs (libmzgc and libmzsch), for "static" build.
# MZSCHEME_USE_RACKET define to use "racket" instead of "mzsch".
# LUA define to path to Lua dir to get Lua support (not defined)
# LUA_VER define to version of Lua being used (51)
# DYNAMIC_LUA no or yes: use yes to load the Lua DLL dynamically (yes)
# GETTEXT no or yes: set to yes for dynamic gettext support (yes)
# ICONV no or yes: set to yes for dynamic iconv support (yes)
# MBYTE no or yes: set to yes to include multibyte support (yes)
# IME no or yes: set to yes to include IME support (yes)
# DYNAMIC_IME no or yes: set to yes to load imm32.dll dynamically (yes)
# OLE no or yes: set to yes to make OLE gvim (no)
# DEBUG no or yes: set to yes if you wish a DEBUGging build (no)
# CPUNR No longer supported, use ARCH.
# ARCH i386 through pentium4: select -march argument to compile with
# (i386)
# USEDLL no or yes: set to yes to use the Runtime library DLL (no)
# For USEDLL=yes the cygwin1.dll is required to run Vim.
# For "no" the mingw-gcc-g++ package or the mingw64-i686-gcc-g++
# package is required to compile Vim. Or set CC to gcc-3 and add
# -L/lib/w32api to EXTRA_LIBS.
# POSTSCRIPT no or yes: set to yes for PostScript printing (no)
# FEATURES TINY, SMALL, NORMAL, BIG or HUGE (BIG)
# WINVER Lowest Win32 version to support. (0x0500)
# CSCOPE no or yes: to include cscope interface support (yes)
# OPTIMIZE SPACE, SPEED, or MAXSPEED: set optimization level (MAXSPEED)
# NETBEANS no or yes: to include netbeans interface support (yes when GUI
# is yes)
# NBDEBUG no or yes: to include netbeans interface debugging support (no)
# XPM define to path to XPM dir to get XPM image support (not defined)
#>>>>> choose options:
ifndef GUI
GUI=yes
endif
ifndef FEATURES
FEATURES = BIG
endif
ifndef GETTEXT
GETTEXT = yes
endif
ifndef ICONV
ICONV = yes
endif
ifndef MBYTE
MBYTE = yes
endif
ifndef IME
IME = yes
endif
ifndef ARCH
ARCH = i386
endif
ifndef DIRECTX
DIRECTX = no
endif
ifndef WINVER
WINVER = 0x0500
endif
ifndef CSCOPE
CSCOPE = yes
endif
ifndef NETBEANS
ifeq ($(GUI),yes)
NETBEANS = yes
endif
endif
ifndef OPTIMIZE
OPTIMIZE = MAXSPEED
endif
# The old Make_cyg.mak (maintained by Dan Sharp et al.) was merged into
# Make_cyg_ming.mak. Note: USEDLL option was removed.
# This file contains Cygwin specific settings. Common settings are contained
# in Make_cyg_ming.mak.
#
# Last updated by Ken Takata.
# Last Change: 2014 Oct 21
# Link against the shared version of libstdc++ by default. Set
# STATIC_STDCPLUS to "yes" to link against static version instead.
ifndef STATIC_STDCPLUS
STATIC_STDCPLUS=no
endif
# uncomment 'PERL' if you want a perl-enabled version
#PERL=/cygdrive/c/perl
### See feature.h for a list of optionals.
### Any other defines can be included here.
# uncomment 'LUA' if you want a Lua-enabled version
#LUA=/cygdrive/c/lua
DEFINES = -DWIN32 -DHAVE_PATHDEF -DFEAT_$(FEATURES) \
-DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER)
ifeq ($(ARCH),x86-64)
DEFINES+=-DMS_WIN64
endif
INCLUDES = -march=$(ARCH) -Iproto
# uncomment 'MZSCHEME' if you want a MzScheme-enabled version
#MZSCHEME=/cygdrive/d/plt
#>>>>> name of the compiler and linker, name of lib directory
ifeq (yes, $(USEDLL))
# CROSS_COMPILE is used for the gvimext DLL.
# uncomment 'PYTHON' if you want a python-enabled version
#PYTHON=/cygdrive/c/python20
# uncomment 'PYTHON3' if you want a python3-enabled version
#PYTHON3=/cygdrive/c/python31
# uncomment 'TCL' if you want a Tcl-enabled version
#TCL=/cygdrive/c/tcl
# uncomment 'RUBY' if you want a Ruby-enabled version
#RUBY=/cygdribe/c/ruby
# Use MinGW(-w64) cross compiler.
# There are three MinGW packages in Cygwin:
# 32-bit: mingw-gcc-g++ and mingw64-i686-gcc-g++
# 64-bit: mingw64-x86_64-gcc-g++
# You may also need to set 'ARCH' in Make_cyg_ming.mak.
CROSS_COMPILE = i686-pc-mingw32-
CC = gcc
RC = windres
else
# i686-pc-mingw32-gcc, i686-w64-mingw32-gcc or gcc-3 can be used.
CROSS_COMPILE = i686-pc-mingw32-
CC = $(CROSS_COMPILE)gcc
RC = $(CROSS_COMPILE)windres
endif
#CROSS_COMPILE = i686-w64-mingw32-
#CROSS_COMPILE = x86_64-w64-mingw32-
##############################
# DYNAMIC_PERL=yes and no both work
##############################
ifdef PERL
DEFINES += -DFEAT_PERL
INCLUDES += -I$(PERL)/lib/CORE
EXTRA_OBJS += $(OUTDIR)/if_perl.o
ifndef DYNAMIC_PERL
DYNAMIC_PERL = yes
endif
ifndef PERL_VER
PERL_VER = 56
endif
ifeq (yes, $(DYNAMIC_PERL))
DEFINES += -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl$(PERL_VER).dll\"
else
EXTRA_LIBS += -L$(PERL)/lib/CORE -lperl$(PERL_VER)
endif
endif
##############################
# DYNAMIC_PYTHON=yes works.
# DYNAMIC_PYTHON=no does not (unresolved externals on link).
##############################
ifdef PYTHON
DEFINES += -DFEAT_PYTHON
EXTRA_OBJS += $(OUTDIR)/if_python.o
ifndef DYNAMIC_PYTHON
DYNAMIC_PYTHON = yes
endif
ifndef PYTHON_VER
PYTHON_VER = 22
endif
ifeq (yes, $(DYNAMIC_PYTHON))
DEFINES += -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL=\"python$(PYTHON_VER).dll\"
else
EXTRA_LIBS += $(PYTHON)/libs/python$(PYTHON_VER).lib
endif
endif
##############################
# DYNAMIC_PYTHON3=yes works.
# DYNAMIC_PYTHON3=no does not (unresolved externals on link).
##############################
ifdef PYTHON3
DEFINES += -DFEAT_PYTHON3
EXTRA_OBJS += $(OUTDIR)/if_python3.o
ifndef DYNAMIC_PYTHON3
DYNAMIC_PYTHON3 = yes
endif
ifndef PYTHON3_VER
PYTHON3_VER = 31
endif
ifeq (yes, $(DYNAMIC_PYTHON3))
DEFINES += -DDYNAMIC_PYTHON3 -DDYNAMIC_PYTHON3_DLL=\"python$(PYTHON3_VER).dll\"
else
EXTRA_LIBS += $(PYTHON3)/libs/python$(PYTHON3_VER).lib
endif
endif
##############################
# DYNAMIC_RUBY=yes works.
# DYNAMIC_RUBY=no does not (process exits).
##############################
ifdef RUBY
ifndef DYNAMIC_RUBY
DYNAMIC_RUBY=yes
endif
# Set default value
ifndef RUBY_VER
RUBY_VER = 16
endif
ifndef RUBY_VER_LONG
RUBY_VER_LONG = 1.6
endif
ifndef RUBY_API_VER
RUBY_API_VER = $(subst .,,$(RUBY_VER_LONG))
endif
ifndef RUBY_PLATFORM
ifeq ($(RUBY_VER), 16)
RUBY_PLATFORM = i586-mswin32
else
ifneq ($(wildcard $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/i386-mingw32),)
RUBY_PLATFORM = i386-mingw32
else
ifneq ($(wildcard $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/x64-mingw32),)
RUBY_PLATFORM = x64-mingw32
else
RUBY_PLATFORM = i386-mswin32
endif
endif
endif
endif
ifndef RUBY_INSTALL_NAME
ifeq ($(RUBY_VER), 16)
RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_API_VER)
else
ifeq ($(ARCH),x86-64)
RUBY_INSTALL_NAME = x64-msvcrt-ruby$(RUBY_API_VER)
else
RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_API_VER)
endif
endif
endif
ifeq (19, $(word 1,$(sort 19 $(RUBY_VER))))
RUBY_19_OR_LATER = 1
endif
DEFINES += -DFEAT_RUBY
ifneq ($(findstring w64-mingw32,$(CC)),)
# A workaround for mingw-w64
DEFINES += -DHAVE_STRUCT_TIMESPEC -DHAVE_STRUCT_TIMEZONE
endif
INCLUDES += -I$(RUBY)/lib/ruby/$(RUBY_VER_LONG)/$(RUBY_PLATFORM)
ifdef RUBY_19_OR_LATER
INCLUDES += -I$(RUBY)/include/ruby-$(RUBY_VER_LONG) -I$(RUBY)/include/ruby-$(RUBY_VER_LONG)/$(RUBY_PLATFORM)
endif
EXTRA_OBJS += $(OUTDIR)/if_ruby.o
ifeq (yes, $(DYNAMIC_RUBY))
DEFINES += -DDYNAMIC_RUBY -DDYNAMIC_RUBY_DLL=\"$(RUBY_INSTALL_NAME).dll\"
DEFINES += -DDYNAMIC_RUBY_VER=$(RUBY_VER)
else
EXTRA_LIBS += $(RUBY)/lib/$(RUBY_INSTALL_NAME)
endif
endif
##############################
# DYNAMIC_MZSCHEME=yes works
# DYNAMIC_MZSCHEME=no works too
##############################
ifdef MZSCHEME
DEFINES += -DFEAT_MZSCHEME
INCLUDES += -I$(MZSCHEME)/include
EXTRA_OBJS += $(OUTDIR)/if_mzsch.o
ifndef DYNAMIC_MZSCHEME
DYNAMIC_MZSCHEME = yes
endif
ifndef MZSCHEME_VER
MZSCHEME_VER = 209_000
endif
ifndef MZSCHEME_PRECISE_GC
MZSCHEME_PRECISE_GC=no
endif
# for version 4.x we need to generate byte-code for Scheme base
ifndef MZSCHEME_GENERATE_BASE
MZSCHEME_GENERATE_BASE=no
endif
ifndef MZSCHEME_USE_RACKET
MZSCHEME_MAIN_LIB=mzsch
else
MZSCHEME_MAIN_LIB=racket
endif
ifeq (yes, $(DYNAMIC_MZSCHEME))
DEFINES += -DDYNAMIC_MZSCHEME -DDYNAMIC_MZSCH_DLL=\"lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).dll\" -DDYNAMIC_MZGC_DLL=\"libmzgc$(MZSCHEME_VER).dll\"
else
ifndef MZSCHEME_DLLS
MZSCHEME_DLLS = $(MZSCHEME)
endif
ifeq (yes,$(MZSCHEME_PRECISE_GC))
MZSCHEME_LIB=-l$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER)
else
MZSCHEME_LIB = -l$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER) -lmzgc$(MZSCHEME_VER)
endif
EXTRA_LIBS += -L$(MZSCHEME_DLLS) -L$(MZSCHEME_DLLS)/lib $(MZSCHEME_LIB)
endif
ifeq (yes,$(MZSCHEME_GENERATE_BASE))
DEFINES += -DINCLUDE_MZSCHEME_BASE
MZ_EXTRA_DEP += mzscheme_base.c
endif
ifeq (yes,$(MZSCHEME_PRECISE_GC))
DEFINES += -DMZ_PRECISE_GC
endif
endif
##############################
# DYNAMIC_TCL=yes and no both work.
##############################
ifdef TCL
DEFINES += -DFEAT_TCL
INCLUDES += -I$(TCL)/include
EXTRA_OBJS += $(OUTDIR)/if_tcl.o
ifndef DYNAMIC_TCL
DYNAMIC_TCL = yes
endif
ifndef TCL_VER
TCL_VER = 83
endif
ifeq (yes, $(DYNAMIC_TCL))
DEFINES += -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"tcl$(TCL_VER).dll\"
EXTRA_LIBS += $(TCL)/lib/tclstub$(TCL_VER).lib
else
EXTRA_LIBS += $(TCL)/lib/tcl$(TCL_VER).lib
endif
endif
##############################
# DYNAMIC_LUA=yes works.
# DYNAMIC_LUA=no does not (unresolved externals on link).
##############################
ifdef LUA
DEFINES += -DFEAT_LUA
INCLUDES += -I$(LUA)/include
EXTRA_OBJS += $(OUTDIR)/if_lua.o
ifndef DYNAMIC_LUA
DYNAMIC_LUA = yes
endif
ifndef LUA_VER
LUA_VER = 51
endif
ifeq (yes, $(DYNAMIC_LUA))
DEFINES += -DDYNAMIC_LUA -DDYNAMIC_LUA_DLL=\"lua$(LUA_VER).dll\"
else
EXTRA_LIBS += $(LUA)/lib/lua$(LUA_VER).lib
endif
endif
##############################
ifeq (yes, $(GETTEXT))
DEFINES += -DDYNAMIC_GETTEXT
endif
##############################
ifeq (yes, $(ICONV))
DEFINES += -DDYNAMIC_ICONV
endif
##############################
ifeq (yes, $(MBYTE))
DEFINES += -DFEAT_MBYTE
endif
##############################
ifeq (yes, $(IME))
DEFINES += -DFEAT_MBYTE_IME
ifndef DYNAMIC_IME
DYNAMIC_IME = yes
endif
ifeq (yes, $(DYNAMIC_IME))
DEFINES += -DDYNAMIC_IME
else
EXTRA_LIBS += -limm32
endif
endif
##############################
ifeq (yes, $(DEBUG))
DEFINES += -DDEBUG
INCLUDES += -g -fstack-check
DEBUG_SUFFIX = d
else
ifeq ($(OPTIMIZE), SIZE)
OPTFLAG = -Os
else
ifeq ($(OPTIMIZE), MAXSPEED)
OPTFLAG = -O3 -fomit-frame-pointer -freg-struct-return
else
OPTFLAG = -O2
endif
endif
# A bug in the GCC <= 3.2 optimizer can cause a crash. The
# following option removes the problem optimization.
OPTFLAG += -fno-strength-reduce
INCLUDES += -s
endif
##############################
# USEDLL=yes will build a Cygwin32 executable that relies on cygwin1.dll.
# USEDLL=no will build a Mingw32 executable with no extra dll dependencies.
##############################
ifeq (yes, $(USEDLL))
DEFINES += -D_MAX_PATH=256 -D__CYGWIN__
endif
##############################
ifeq (yes, $(POSTSCRIPT))
DEFINES += -DMSWINPS
endif
##############################
ifeq (yes, $(CSCOPE))
DEFINES += -DFEAT_CSCOPE
EXTRA_OBJS += $(OUTDIR)/if_cscope.o
endif
##############################
ifeq ($(GUI),yes)
##############################
ifeq (yes, $(NETBEANS))
# Only allow NETBEANS for a GUI build.
DEFINES += -DFEAT_NETBEANS_INTG
EXTRA_OBJS += $(OUTDIR)/netbeans.o
EXTRA_LIBS += -lwsock32
ifeq (yes, $(NBDEBUG))
DEFINES += -DNBDEBUG
NBDEBUG_DEP = nbdebug.h nbdebug.c
endif
endif
##############################
ifeq (yes, $(DIRECTX))
# Only allow DIRECTX for a GUI build.
DEFINES += -DFEAT_DIRECTX -DDYNAMIC_DIRECTX
EXTRA_OBJS += $(OUTDIR)/gui_dwrite.o
EXTRA_LIBS += -ld2d1 -ldwrite
USE_STDCPLUS = yes
endif
##############################
ifneq ($(XPM),no)
# Only allow XPM for a GUI build.
DEFINES += -DFEAT_XPM_W32
INCLUDES += -I$(XPM)/include
EXTRA_OBJS += $(OUTDIR)/xpm_w32.o
EXTRA_LIBS += -L$(XPM)/lib -lXpm
endif
##############################
EXE = gvim$(DEBUG_SUFFIX).exe
OUTDIR = gobj$(DEBUG_SUFFIX)
DEFINES += -DFEAT_GUI_W32 -DFEAT_CLIPBOARD
EXTRA_OBJS += $(OUTDIR)/gui.o $(OUTDIR)/gui_w32.o $(OUTDIR)/gui_beval.o $(OUTDIR)/os_w32exe.o
EXTRA_LIBS += -mwindows -lcomctl32 -lversion
else
EXE = vim$(DEBUG_SUFFIX).exe
OUTDIR = obj$(DEBUG_SUFFIX)
LIBS += -luser32 -lgdi32 -lcomdlg32
endif
##############################
ifeq (yes, $(OLE))
DEFINES += -DFEAT_OLE
EXTRA_OBJS += $(OUTDIR)/if_ole.o
EXTRA_LIBS += -loleaut32
USE_STDCPLUS = yes
endif
##############################
ifneq (sh.exe, $(SHELL))
DEL = rm
MKDIR = mkdir -p
DIRSLASH = /
else
DEL = del
MKDIR = mkdir
DIRSLASH = \\
endif
##############################
ifeq (yes, $(USE_STDCPLUS))
ifeq (yes, $(STATIC_STDCPLUS))
EXTRA_LIBS += -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic
else
EXTRA_LIBS += -lstdc++
endif
endif
#>>>>> end of choices
###########################################################################
INCL = vim.h globals.h option.h keymap.h macros.h ascii.h term.h os_win32.h \
structs.h version.h
CFLAGS = $(OPTFLAG) $(DEFINES) $(INCLUDES)
RCFLAGS = -O coff $(DEFINES)
OBJ = \
$(OUTDIR)/blowfish.o \
$(OUTDIR)/buffer.o \
$(OUTDIR)/charset.o \
$(OUTDIR)/crypt.o \
$(OUTDIR)/crypt_zip.o \
$(OUTDIR)/diff.o \
$(OUTDIR)/digraph.o \
$(OUTDIR)/edit.o \
$(OUTDIR)/eval.o \
$(OUTDIR)/ex_cmds.o \
$(OUTDIR)/ex_cmds2.o \
$(OUTDIR)/ex_docmd.o \
$(OUTDIR)/ex_eval.o \
$(OUTDIR)/ex_getln.o \
$(OUTDIR)/fileio.o \
$(OUTDIR)/fold.o \
$(OUTDIR)/getchar.o \
$(OUTDIR)/hardcopy.o \
$(OUTDIR)/hashtab.o \
$(OUTDIR)/main.o \
$(OUTDIR)/mark.o \
$(OUTDIR)/memfile.o \
$(OUTDIR)/memline.o \
$(OUTDIR)/menu.o \
$(OUTDIR)/message.o \
$(OUTDIR)/misc1.o \
$(OUTDIR)/misc2.o \
$(OUTDIR)/move.o \
$(OUTDIR)/mbyte.o \
$(OUTDIR)/normal.o \
$(OUTDIR)/ops.o \
$(OUTDIR)/option.o \
$(OUTDIR)/os_win32.o \
$(OUTDIR)/os_mswin.o \
$(OUTDIR)/winclip.o \
$(OUTDIR)/pathdef.o \
$(OUTDIR)/popupmnu.o \
$(OUTDIR)/quickfix.o \
$(OUTDIR)/regexp.o \
$(OUTDIR)/screen.o \
$(OUTDIR)/search.o \
$(OUTDIR)/sha256.o \
$(OUTDIR)/spell.o \
$(OUTDIR)/syntax.o \
$(OUTDIR)/tag.o \
$(OUTDIR)/term.o \
$(OUTDIR)/ui.o \
$(OUTDIR)/undo.o \
$(OUTDIR)/version.o \
$(OUTDIR)/vimrc.o \
$(OUTDIR)/window.o \
$(EXTRA_OBJS)
all: $(EXE) xxd/xxd.exe vimrun.exe install.exe uninstal.exe GvimExt/gvimext.dll
# According to the Cygwin doc 1.2 FAQ, kernel32 should not be specified for
# linking unless calling ld directly.
# See /usr/doc/cygwin-doc-1.2/html/faq_toc.html#TOC93 for more information.
$(EXE): $(OUTDIR) $(OBJ)
$(CC) $(CFLAGS) -o $(EXE) $(OBJ) $(LIBS) -luuid -lole32 $(EXTRA_LIBS)
xxd/xxd.exe: xxd/xxd.c
$(MAKE) -C xxd -f Make_cyg.mak CC=$(CC) USEDLL=$(USEDLL)
GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h
$(MAKE) -C GvimExt -f Make_cyg.mak CROSS_COMPILE=$(CROSS_COMPILE)
vimrun.exe: vimrun.c
$(CC) $(CFLAGS) -o vimrun.exe vimrun.c $(LIBS)
install.exe: dosinst.c
$(CC) $(CFLAGS) -o install.exe dosinst.c $(LIBS) -luuid -lole32
uninstal.exe: uninstal.c
$(CC) $(CFLAGS) -o uninstal.exe uninstal.c $(LIBS)
$(OUTDIR):
$(MKDIR) $(OUTDIR)
tags:
command /c ctags *.c $(INCL)
clean:
-$(DEL) $(OUTDIR)$(DIRSLASH)*.o
-rmdir $(OUTDIR)
-$(DEL) $(EXE) vimrun.exe install.exe uninstal.exe
ifdef PERL
-$(DEL) if_perl.c
endif
ifdef MZSCHEME
-$(DEL) mzscheme_base.c
endif
-$(DEL) pathdef.c
$(MAKE) -C xxd -f Make_cyg.mak clean
$(MAKE) -C GvimExt -f Make_cyg.mak clean
distclean: clean
-$(DEL) obj$(DIRSLASH)*.o
-rmdir obj
-$(DEL) gobj$(DIRSLASH)*.o
-rmdir gobj
-$(DEL) objd$(DIRSLASH)*.o
-rmdir objd
-$(DEL) gobjd$(DIRSLASH)*.o
-rmdir gobjd
-$(DEL) *.exe
###########################################################################
$(OUTDIR)/%.o : %.c $(INCL)
$(CC) -c $(CFLAGS) $< -o $@
$(OUTDIR)/ex_docmd.o: ex_docmd.c $(INCL) ex_cmds.h
$(CC) -c $(CFLAGS) ex_docmd.c -o $(OUTDIR)/ex_docmd.o
$(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)
$(CC) -c $(CFLAGS) gui_w32.c -o $(OUTDIR)/gui_w32.o
$(OUTDIR)/gui_dwrite.o: gui_dwrite.cpp $(INCL) gui_dwrite.h
$(CC) -c $(CFLAGS) gui_dwrite.cpp -o $(OUTDIR)/gui_dwrite.o
$(OUTDIR)/if_cscope.o: if_cscope.c $(INCL) if_cscope.h
$(CC) -c $(CFLAGS) if_cscope.c -o $(OUTDIR)/if_cscope.o
$(OUTDIR)/if_ole.o: if_ole.cpp $(INCL)
$(CC) -c $(CFLAGS) if_ole.cpp -o $(OUTDIR)/if_ole.o
$(OUTDIR)/if_python.o : if_python.c if_py_both.h $(INCL)
$(CC) -c $(CFLAGS) -I$(PYTHON)/include $< -o $@
$(OUTDIR)/if_python3.o : if_python3.c if_py_both.h $(INCL)
$(CC) -c $(CFLAGS) -I$(PYTHON3)/include $< -o $@
if_perl.c: if_perl.xs typemap
$(PERL)/bin/perl `cygpath -d $(PERL)/lib/ExtUtils/xsubpp` \
-prototypes -typemap \
`cygpath -d $(PERL)/lib/ExtUtils/typemap` if_perl.xs > $@
$(OUTDIR)/if_perl.o: if_perl.c $(INCL)
ifeq (yes, $(USEDLL))
$(CC) -c $(CFLAGS) -I/usr/include/mingw -D__MINGW32__ if_perl.c -o $(OUTDIR)/if_perl.o
endif
$(OUTDIR)/if_ruby.o: if_ruby.c $(INCL)
ifeq (16, $(RUBY_VER))
$(CC) -c $(CFLAGS) -U_WIN32 if_ruby.c -o $(OUTDIR)/if_ruby.o
endif
$(OUTDIR)/netbeans.o: netbeans.c $(INCL) $(NBDEBUG_DEP)
$(CC) -c $(CFLAGS) netbeans.c -o $(OUTDIR)/netbeans.o
$(OUTDIR)/regexp.o: regexp.c regexp_nfa.c $(INCL)
$(CC) -c $(CFLAGS) regexp.c -o $(OUTDIR)/regexp.o
$(OUTDIR)/if_mzsch.o: if_mzsch.c $(INCL) if_mzsch.h $(MZ_EXTRA_DEP)
$(CC) -c $(CFLAGS) if_mzsch.c -o $(OUTDIR)/if_mzsch.o
$(OUTDIR)/vimrc.o: vim.rc version.h gui_w32_rc.h
$(RC) $(RCFLAGS) vim.rc -o $(OUTDIR)/vimrc.o
mzscheme_base.c:
$(MZSCHEME)/mzc --c-mods mzscheme_base.c ++lib scheme/base
pathdef.c: $(INCL)
ifneq (sh.exe, $(SHELL))
@echo creating pathdef.c
@echo '/* pathdef.c */' > pathdef.c
@echo '#include "vim.h"' >> pathdef.c
@echo 'char_u *default_vim_dir = (char_u *)"$(VIMRCLOC)";' >> pathdef.c
@echo 'char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR)";' >> pathdef.c
@echo 'char_u *all_cflags = (char_u *)"$(CC) $(CFLAGS)";' >> pathdef.c
@echo 'char_u *all_lflags = (char_u *)"$(CC) -s -o $(EXE) $(LIBS) -luuid -lole32 $(EXTRA_LIBS)";' >> pathdef.c
@echo 'char_u *compiled_user = (char_u *)"$(USERNAME)";' >> pathdef.c
@echo 'char_u *compiled_sys = (char_u *)"$(USERDOMAIN)";' >> pathdef.c
else
@echo creating pathdef.c
@echo /* pathdef.c */ > pathdef.c
@echo #include "vim.h" >> pathdef.c
@echo char_u *default_vim_dir = (char_u *)"$(VIMRCLOC)"; >> pathdef.c
@echo char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR)"; >> pathdef.c
@echo char_u *all_cflags = (char_u *)"$(CC) $(CFLAGS)"; >> pathdef.c
@echo char_u *all_lflags = (char_u *)"$(CC) -s -o $(EXE) $(LIBS) -luuid -lole32 $(EXTRA_LIBS)"; >> pathdef.c
@echo char_u *compiled_user = (char_u *)"$(USERNAME)"; >> pathdef.c
@echo char_u *compiled_sys = (char_u *)"$(USERDOMAIN)"; >> pathdef.c
endif
# Do not change this.
UNDER_CYGWIN = yes
include Make_cyg_ming.mak

851
src/Make_cyg_ming.mak Normal file
View File

@@ -0,0 +1,851 @@
# Makefile for VIM on Win32 (Cygwin and MinGW)
#
# This file contains common part for Cygwin and MinGW and it is included
# from Make_cyg.mak and Make_ming.mak.
#
# Info at http://www.mingw.org
# Alternative x86 and 64-builds: http://mingw-w64.sourceforge.net
# Also requires GNU make, which you can download from the same sites.
# Get missing libraries from http://gnuwin32.sf.net.
#
# Tested on Win32 NT 4 and Win95.
#
# To make everything, just 'make -f Make_ming.mak'.
# To make just e.g. gvim.exe, 'make -f Make_ming.mak gvim.exe'.
# After a run, you can 'make -f Make_ming.mak clean' to clean up.
#
# NOTE: Sometimes 'GNU Make' will stop after building vimrun.exe -- I think
# it's just run out of memory or something. Run again, and it will continue
# with 'xxd'.
#
# "make upx" makes *compressed* versions of the 32 bit GUI and console EXEs,
# using the excellent UPX compressor:
# http://upx.sourceforge.net/
# "make mpress" uses the MPRESS compressor for 32- and 64-bit EXEs:
# http://www.matcode.com/mpress.htm
#
# Maintained by Ron Aaron <ronaharon@yahoo.com> et al.
# Updated 2014 Oct 13.
#>>>>> choose options:
# set to yes for a debug build
DEBUG=no
# set to SIZE for size, SPEED for speed, MAXSPEED for maximum optimization
OPTIMIZE=MAXSPEED
# set to yes to make gvim, no for vim
GUI=yes
# set to yes if you want to use DirectWrite (DirectX)
# MinGW-w64 is needed, and ARCH should be set to i686 or x86-64.
DIRECTX=no
# FEATURES=[TINY | SMALL | NORMAL | BIG | HUGE]
# Set to TINY to make minimal version (few features).
FEATURES=BIG
# Set to one of i386, i486, i586, i686 as the minimum target processor.
# For amd64/x64 architecture set ARCH=x86-64 .
ARCH=i386
# Set to yes to cross-compile from unix; no=native Windows (and Cygwin).
CROSS=no
# Set to path to iconv.h and libiconv.a to enable using 'iconv.dll'.
#ICONV="."
ICONV=yes
GETTEXT=yes
# Set to yes to include multibyte support.
MBYTE=yes
# Set to yes to include IME support.
IME=yes
DYNAMIC_IME=yes
# Set to yes to enable writing a postscript file with :hardcopy.
POSTSCRIPT=no
# Set to yes to enable OLE support.
OLE=no
# Set the default $(WINVER) to make it work with pre-Win2k.
ifndef WINVER
WINVER = 0x0500
endif
# Set to yes to enable Cscope support.
CSCOPE=yes
# Set to yes to enable Netbeans support.
NETBEANS=$(GUI)
# Link against the shared version of libstdc++ by default. Set
# STATIC_STDCPLUS to "yes" to link against static version instead.
ifndef STATIC_STDCPLUS
STATIC_STDCPLUS=no
endif
# If the user doesn't want gettext, undefine it.
ifeq (no, $(GETTEXT))
GETTEXT=
endif
# Added by E.F. Amatria <eferna1@platea.ptic.mec.es> 2001 Feb 23
# Uncomment the first line and one of the following three if you want Native Language
# Support. You'll need gnu_gettext.win32, a MINGW32 Windows PORT of gettext by
# Franco Bez <franco.bez@gmx.de>. It may be found at
# http://home.a-city.de/franco.bez/gettext/gettext_win32_en.html
# Tested with mingw32 with GCC-2.95.2 on Win98
# Updated 2001 Jun 9
#GETTEXT=c:/gettext.win32.msvcrt
#STATIC_GETTEXT=USE_STATIC_GETTEXT
#DYNAMIC_GETTEXT=USE_GETTEXT_DLL
#DYNAMIC_GETTEXT=USE_SAFE_GETTEXT_DLL
SAFE_GETTEXT_DLL_OBJ = $(GETTEXT)/src/safe_gettext_dll/safe_gettext_dll.o
# Alternatively, if you uncomment the two following lines, you get a "safe" version
# without linking the safe_gettext_dll.o object file.
#DYNAMIC_GETTEXT=DYNAMIC_GETTEXT
#GETTEXT_DYNAMIC=gnu_gettext.dll
INTLPATH=$(GETTEXT)/lib/mingw32
INTLLIB=gnu_gettext
# If you are using gettext-0.10.35 from http://sourceforge.net/projects/gettext
# or gettext-0.10.37 from http://sourceforge.net/projects/mingwrep/
# uncomment the following, but I can't build a static version with them, ?-(|
#GETTEXT=c:/gettext-0.10.37-20010430
#STATIC_GETTEXT=USE_STATIC_GETTEXT
#DYNAMIC_GETTEXT=DYNAMIC_GETTEXT
#INTLPATH=$(GETTEXT)/lib
#INTLLIB=intl
# Perl interface:
# PERL=[Path to Perl directory] (Set inside Make_cyg.mak or Make_ming.mak)
# DYNAMIC_PERL=yes (to load the Perl DLL dynamically)
# PERL_VER=[Perl version, eg 56, 58, 510] (default is 56)
ifdef PERL
ifndef PERL_VER
PERL_VER=56
endif
ifndef DYNAMIC_PERL
DYNAMIC_PERL=yes
endif
# on Linux, for cross-compile, it's here:
#PERLLIB=/home/ron/ActivePerl/lib
# on NT, it's here:
PERLEXE=$(PERL)/bin/perl
PERLLIB=$(PERL)/lib
PERLLIBS=$(PERLLIB)/Core
ifeq ($(UNDER_CYGWIN),yes)
PERLTYPEMAP:=$(shell cygpath -m $(PERLLIB)/ExtUtils/typemap)
XSUBPPTRY:=$(shell cygpath -m $(PERLLIB)/ExtUtils/xsubpp)
else
PERLTYPEMAP=$(PERLLIB)/ExtUtils/typemap
XSUBPPTRY=$(PERLLIB)/ExtUtils/xsubpp
endif
XSUBPP_EXISTS=$(shell $(PERLEXE) -e "print 1 unless -e '$(XSUBPPTRY)'")
ifeq "$(XSUBPP_EXISTS)" ""
XSUBPP=$(PERLEXE) $(XSUBPPTRY)
else
XSUBPP=xsubpp
endif
endif
# Lua interface:
# LUA=[Path to Lua directory] (Set inside Make_cyg.mak or Make_ming.mak)
# DYNAMIC_LUA=yes (to load the Lua DLL dynamically)
# LUA_VER=[Lua version, eg 51, 52] (default is 51)
ifdef LUA
ifndef DYNAMIC_LUA
DYNAMIC_LUA=yes
endif
ifndef LUA_VER
LUA_VER=51
endif
ifeq (no,$(DYNAMIC_LUA))
LUA_LIB = -L$(LUA)/lib -llua
endif
endif
# MzScheme interface:
# MZSCHEME=[Path to MzScheme directory] (Set inside Make_cyg.mak or Make_ming.mak)
# DYNAMIC_MZSCHEME=yes (to load the MzScheme DLL dynamically)
# MZSCHEME_VER=[MzScheme version] (default is 205_000)
# MZSCHEME_DEBUG=no
ifdef MZSCHEME
ifndef DYNAMIC_MZSCHEME
DYNAMIC_MZSCHEME=yes
endif
ifndef MZSCHEME_VER
MZSCHEME_VER=205_000
endif
ifndef MZSCHEME_PRECISE_GC
MZSCHEME_PRECISE_GC=no
endif
# for version 4.x we need to generate byte-code for Scheme base
ifndef MZSCHEME_GENERATE_BASE
MZSCHEME_GENERATE_BASE=no
endif
ifndef MZSCHEME_USE_RACKET
MZSCHEME_MAIN_LIB=mzsch
else
MZSCHEME_MAIN_LIB=racket
endif
ifeq (no,$(DYNAMIC_MZSCHEME))
ifeq (yes,$(MZSCHEME_PRECISE_GC))
MZSCHEME_LIB=-l$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER)
else
MZSCHEME_LIB = -l$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER) -lmzgc$(MZSCHEME_VER)
endif
# the modern MinGW can dynamically link to dlls directly.
# point MZSCHEME_DLLS to where you put libmzschXXXXXXX.dll and libgcXXXXXXX.dll
ifndef MZSCHEME_DLLS
MZSCHEME_DLLS=$(MZSCHEME)
endif
MZSCHEME_LIBDIR=-L$(MZSCHEME_DLLS) -L$(MZSCHEME_DLLS)\lib
endif
endif
# Python interface:
# PYTHON=[Path to Python directory] (Set inside Make_cyg.mak or Make_ming.mak)
# DYNAMIC_PYTHON=yes (to load the Python DLL dynamically)
# PYTHON_VER=[Python version, eg 22, 23, ..., 27] (default is 22)
ifdef PYTHON
ifndef DYNAMIC_PYTHON
DYNAMIC_PYTHON=yes
endif
ifndef PYTHON_VER
PYTHON_VER=22
endif
ifeq (no,$(DYNAMIC_PYTHON))
PYTHONLIB=-L$(PYTHON)/libs -lpython$(PYTHON_VER)
endif
# my include files are in 'win32inc' on Linux, and 'include' in the standard
# NT distro (ActiveState)
ifeq ($(CROSS),no)
PYTHONINC=-I $(PYTHON)/include
else
PYTHONINC=-I $(PYTHON)/win32inc
endif
endif
# Python3 interface:
# PYTHON3=[Path to Python3 directory] (Set inside Make_cyg.mak or Make_ming.mak)
# DYNAMIC_PYTHON3=yes (to load the Python3 DLL dynamically)
# PYTHON3_VER=[Python3 version, eg 31, 32] (default is 31)
ifdef PYTHON3
ifndef DYNAMIC_PYTHON3
DYNAMIC_PYTHON3=yes
endif
ifndef PYTHON3_VER
PYTHON3_VER=31
endif
ifeq (no,$(DYNAMIC_PYTHON3))
PYTHON3LIB=-L$(PYTHON3)/libs -lPYTHON$(PYTHON3_VER)
endif
ifeq ($(CROSS),no)
PYTHON3INC=-I $(PYTHON3)/include
else
PYTHON3INC=-I $(PYTHON3)/win32inc
endif
endif
# TCL interface:
# TCL=[Path to TCL directory] (Set inside Make_cyg.mak or Make_ming.mak)
# DYNAMIC_TCL=yes (to load the TCL DLL dynamically)
# TCL_VER=[TCL version, eg 83, 84] (default is 83)
ifdef TCL
ifndef DYNAMIC_TCL
DYNAMIC_TCL=yes
endif
ifndef TCL_VER
TCL_VER = 83
endif
TCLINC += -I$(TCL)/include
endif
# Ruby interface:
# RUBY=[Path to Ruby directory] (Set inside Make_cyg.mak or Make_ming.mak)
# DYNAMIC_RUBY=yes (to load the Ruby DLL dynamically)
# RUBY_VER=[Ruby version, eg 18, 19, 20] (default is 18)
# RUBY_VER_LONG=[Ruby version, eg 1.8, 1.9.1, 2.0.0] (default is 1.8)
# You must set RUBY_VER_LONG when changing RUBY_VER.
# RUBY_API_VER is derived from RUBY_VER_LONG.
# Note: If you use Ruby 1.9.3, set as follows:
# RUBY_VER=19
# RUBY_VER_LONG=1.9.1 (not 1.9.3, because the API version is 1.9.1.)
ifdef RUBY
ifndef DYNAMIC_RUBY
DYNAMIC_RUBY=yes
endif
# Set default value
ifndef RUBY_VER
RUBY_VER = 18
endif
ifndef RUBY_VER_LONG
RUBY_VER_LONG = 1.8
endif
ifndef RUBY_API_VER
RUBY_API_VER = $(subst .,,$(RUBY_VER_LONG))
endif
ifndef RUBY_PLATFORM
ifeq ($(RUBY_VER), 16)
RUBY_PLATFORM = i586-mswin32
else
ifneq ($(wildcard $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/i386-mingw32),)
RUBY_PLATFORM = i386-mingw32
else
ifneq ($(wildcard $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/x64-mingw32),)
RUBY_PLATFORM = x64-mingw32
else
RUBY_PLATFORM = i386-mswin32
endif
endif
endif
endif
ifndef RUBY_INSTALL_NAME
ifeq ($(RUBY_VER), 16)
RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_API_VER)
else
ifeq ($(ARCH),x86-64)
RUBY_INSTALL_NAME = x64-msvcrt-ruby$(RUBY_API_VER)
else
RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_API_VER)
endif
endif
endif
ifeq (19, $(word 1,$(sort 19 $(RUBY_VER))))
RUBY_19_OR_LATER = 1
endif
RUBYINC = -I $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/$(RUBY_PLATFORM)
ifdef RUBY_19_OR_LATER
RUBYINC += -I $(RUBY)/include/ruby-$(RUBY_VER_LONG) -I $(RUBY)/include/ruby-$(RUBY_VER_LONG)/$(RUBY_PLATFORM)
endif
ifeq (no, $(DYNAMIC_RUBY))
RUBYLIB = -L$(RUBY)/lib -l$(RUBY_INSTALL_NAME)
endif
endif # RUBY
# See feature.h for a list of options.
# Any other defines can be included here.
DEF_GUI=-DFEAT_GUI_W32 -DFEAT_CLIPBOARD
DEFINES=-DWIN32 -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) \
-DHAVE_PATHDEF -DFEAT_$(FEATURES)
ifeq ($(ARCH),x86-64)
DEFINES+=-DMS_WIN64
endif
ifeq ($(CROSS),yes)
# cross-compiler prefix:
ifndef CROSS_COMPILE
CROSS_COMPILE = i586-pc-mingw32msvc-
endif
DEL = rm
MKDIR = mkdir -p
DIRSLASH = /
else
# normal (Windows) compilation:
ifndef CROSS_COMPILE
CROSS_COMPILE =
endif
ifneq (sh.exe, $(SHELL))
DEL = rm
MKDIR = mkdir -p
DIRSLASH = /
else
DEL = del
MKDIR = mkdir
DIRSLASH = \\
endif
endif
CC := $(CROSS_COMPILE)gcc
CXX := $(CROSS_COMPILE)g++
ifeq ($(UNDER_CYGWIN),yes)
WINDRES := $(CROSS_COMPILE)windres
else
WINDRES := windres
endif
WINDRES_CC = $(CC)
#>>>>> end of choices
###########################################################################
CFLAGS = -Iproto $(DEFINES) -pipe -w -march=$(ARCH) -Wall
WINDRES_FLAGS = --preprocessor="$(WINDRES_CC) -E -xc" -DRC_INVOKED
EXTRA_LIBS =
ifdef GETTEXT
DEFINES += -DHAVE_GETTEXT -DHAVE_LOCALE_H
GETTEXTINCLUDE = $(GETTEXT)/include
GETTEXTLIB = $(INTLPATH)
ifeq (yes, $(GETTEXT))
DEFINES += -DDYNAMIC_GETTEXT
else
ifdef DYNAMIC_GETTEXT
DEFINES += -D$(DYNAMIC_GETTEXT)
ifdef GETTEXT_DYNAMIC
DEFINES += -DGETTEXT_DYNAMIC -DGETTEXT_DLL=\"$(GETTEXT_DYNAMIC)\"
endif
endif
endif
endif
ifdef PERL
CFLAGS += -I$(PERLLIBS) -DFEAT_PERL
ifeq (yes, $(DYNAMIC_PERL))
CFLAGS += -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl$(PERL_VER).dll\"
EXTRA_LIBS += -L$(PERLLIBS) -lperl$(PERL_VER)
endif
endif
ifdef LUA
CFLAGS += -I$(LUA)/include -I$(LUA) -DFEAT_LUA
ifeq (yes, $(DYNAMIC_LUA))
CFLAGS += -DDYNAMIC_LUA -DDYNAMIC_LUA_DLL=\"lua$(LUA_VER).dll\"
endif
endif
ifdef MZSCHEME
CFLAGS += -I$(MZSCHEME)/include -DFEAT_MZSCHEME -DMZSCHEME_COLLECTS=\"$(MZSCHEME)/collects\"
ifeq (yes, $(DYNAMIC_MZSCHEME))
CFLAGS += -DDYNAMIC_MZSCHEME -DDYNAMIC_MZSCH_DLL=\"lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).dll\" -DDYNAMIC_MZGC_DLL=\"libmzgc$(MZSCHEME_VER).dll\"
endif
ifeq (yes, "$(MZSCHEME_DEBUG)")
CFLAGS += -DMZSCHEME_FORCE_GC
endif
endif
ifdef RUBY
CFLAGS += -DFEAT_RUBY $(RUBYINC)
ifeq (yes, $(DYNAMIC_RUBY))
CFLAGS += -DDYNAMIC_RUBY -DDYNAMIC_RUBY_DLL=\"$(RUBY_INSTALL_NAME).dll\"
CFLAGS += -DDYNAMIC_RUBY_VER=$(RUBY_VER)
endif
ifneq ($(findstring w64-mingw32,$(CC)),)
# A workaround for MinGW-w64
CFLAGS += -DHAVE_STRUCT_TIMESPEC -DHAVE_STRUCT_TIMEZONE
endif
endif
ifdef PYTHON
CFLAGS += -DFEAT_PYTHON
ifeq (yes, $(DYNAMIC_PYTHON))
CFLAGS += -DDYNAMIC_PYTHON
endif
endif
ifdef PYTHON3
CFLAGS += -DFEAT_PYTHON3
ifeq (yes, $(DYNAMIC_PYTHON3))
CFLAGS += -DDYNAMIC_PYTHON3
endif
endif
ifdef TCL
CFLAGS += -DFEAT_TCL $(TCLINC)
ifeq (yes, $(DYNAMIC_TCL))
CFLAGS += -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"tcl$(TCL_VER).dll\"
endif
endif
ifeq ($(POSTSCRIPT),yes)
DEFINES += -DMSWINPS
endif
ifeq (yes, $(OLE))
DEFINES += -DFEAT_OLE
endif
ifeq ($(CSCOPE),yes)
DEFINES += -DFEAT_CSCOPE
endif
ifeq ($(NETBEANS),yes)
# Only allow NETBEANS for a GUI build.
ifeq (yes, $(GUI))
DEFINES += -DFEAT_NETBEANS_INTG
ifeq ($(NBDEBUG), yes)
DEFINES += -DNBDEBUG
NBDEBUG_INCL = nbdebug.h
NBDEBUG_SRC = nbdebug.c
endif
endif
endif
# DirectWrite (DirectX)
ifeq ($(DIRECTX),yes)
# Only allow DirectWrite for a GUI build.
ifeq (yes, $(GUI))
DEFINES += -DFEAT_DIRECTX -DDYNAMIC_DIRECTX
endif
endif
# Only allow XPM for a GUI build.
ifeq (yes, $(GUI))
ifndef XPM
ifeq ($(ARCH),i386)
XPM = xpm/x86
endif
ifeq ($(ARCH),i486)
XPM = xpm/x86
endif
ifeq ($(ARCH),i586)
XPM = xpm/x86
endif
ifeq ($(ARCH),i686)
XPM = xpm/x86
endif
ifeq ($(ARCH),x86-64)
XPM = xpm/x64
endif
endif
ifdef XPM
ifneq ($(XPM),no)
CFLAGS += -DFEAT_XPM_W32 -I $(XPM)/include -I $(XPM)/../include
endif
endif
endif
ifeq ($(DEBUG),yes)
CFLAGS += -g -fstack-check
DEBUG_SUFFIX=d
else
ifeq ($(OPTIMIZE), SIZE)
CFLAGS += -Os
else
ifeq ($(OPTIMIZE), MAXSPEED)
CFLAGS += -O3
CFLAGS += -fomit-frame-pointer -freg-struct-return
else # SPEED
CFLAGS += -O2
endif
endif
CFLAGS += -s
endif
LIB = -lkernel32 -luser32 -lgdi32 -ladvapi32 -lcomdlg32 -lcomctl32 -lversion
GUIOBJ = $(OUTDIR)/gui.o $(OUTDIR)/gui_w32.o $(OUTDIR)/gui_beval.o $(OUTDIR)/os_w32exe.o
OBJ = \
$(OUTDIR)/blowfish.o \
$(OUTDIR)/buffer.o \
$(OUTDIR)/charset.o \
$(OUTDIR)/crypt.o \
$(OUTDIR)/crypt_zip.o \
$(OUTDIR)/diff.o \
$(OUTDIR)/digraph.o \
$(OUTDIR)/edit.o \
$(OUTDIR)/eval.o \
$(OUTDIR)/ex_cmds.o \
$(OUTDIR)/ex_cmds2.o \
$(OUTDIR)/ex_docmd.o \
$(OUTDIR)/ex_eval.o \
$(OUTDIR)/ex_getln.o \
$(OUTDIR)/fileio.o \
$(OUTDIR)/fold.o \
$(OUTDIR)/getchar.o \
$(OUTDIR)/hardcopy.o \
$(OUTDIR)/hashtab.o \
$(OUTDIR)/main.o \
$(OUTDIR)/mark.o \
$(OUTDIR)/memfile.o \
$(OUTDIR)/memline.o \
$(OUTDIR)/menu.o \
$(OUTDIR)/message.o \
$(OUTDIR)/misc1.o \
$(OUTDIR)/misc2.o \
$(OUTDIR)/move.o \
$(OUTDIR)/mbyte.o \
$(OUTDIR)/normal.o \
$(OUTDIR)/ops.o \
$(OUTDIR)/option.o \
$(OUTDIR)/os_win32.o \
$(OUTDIR)/os_mswin.o \
$(OUTDIR)/winclip.o \
$(OUTDIR)/pathdef.o \
$(OUTDIR)/popupmnu.o \
$(OUTDIR)/quickfix.o \
$(OUTDIR)/regexp.o \
$(OUTDIR)/screen.o \
$(OUTDIR)/search.o \
$(OUTDIR)/sha256.o \
$(OUTDIR)/spell.o \
$(OUTDIR)/syntax.o \
$(OUTDIR)/tag.o \
$(OUTDIR)/term.o \
$(OUTDIR)/ui.o \
$(OUTDIR)/undo.o \
$(OUTDIR)/version.o \
$(OUTDIR)/vimrc.o \
$(OUTDIR)/window.o
ifdef PERL
OBJ += $(OUTDIR)/if_perl.o
endif
ifdef LUA
OBJ += $(OUTDIR)/if_lua.o
endif
ifdef MZSCHEME
OBJ += $(OUTDIR)/if_mzsch.o
MZSCHEME_INCL = if_mzsch.h
ifeq (yes,$(MZSCHEME_GENERATE_BASE))
CFLAGS += -DINCLUDE_MZSCHEME_BASE
MZ_EXTRA_DEP += mzscheme_base.c
endif
ifeq (yes,$(MZSCHEME_PRECISE_GC))
CFLAGS += -DMZ_PRECISE_GC
endif
endif
ifdef PYTHON
OBJ += $(OUTDIR)/if_python.o
endif
ifdef PYTHON3
OBJ += $(OUTDIR)/if_python3.o
endif
ifdef RUBY
OBJ += $(OUTDIR)/if_ruby.o
endif
ifdef TCL
OBJ += $(OUTDIR)/if_tcl.o
endif
ifeq ($(CSCOPE),yes)
OBJ += $(OUTDIR)/if_cscope.o
endif
ifeq ($(NETBEANS),yes)
# Only allow NETBEANS for a GUI build.
ifeq (yes, $(GUI))
OBJ += $(OUTDIR)/netbeans.o
LIB += -lwsock32
endif
endif
ifeq ($(DIRECTX),yes)
# Only allow DIRECTX for a GUI build.
ifeq (yes, $(GUI))
OBJ += $(OUTDIR)/gui_dwrite.o
LIB += -ld2d1 -ldwrite
USE_STDCPLUS = yes
endif
endif
ifneq ($(XPM),no)
# Only allow XPM for a GUI build.
ifeq (yes, $(GUI))
OBJ += $(OUTDIR)/xpm_w32.o
# You'll need libXpm.a from http://gnuwin32.sf.net
LIB += -L$(XPM)/lib -lXpm
endif
endif
ifdef MZSCHEME
MZSCHEME_SUFFIX = Z
endif
ifeq ($(GUI),yes)
TARGET := gvim$(DEBUG_SUFFIX).exe
DEFINES += $(DEF_GUI)
OBJ += $(GUIOBJ)
LFLAGS += -mwindows
OUTDIR = gobj$(DEBUG_SUFFIX)$(MZSCHEME_SUFFIX)$(ARCH)
else
TARGET := vim$(DEBUG_SUFFIX).exe
OUTDIR = obj$(DEBUG_SUFFIX)$(MZSCHEME_SUFFIX)$(ARCH)
endif
ifdef GETTEXT
ifneq (yes, $(GETTEXT))
CFLAGS += -I$(GETTEXTINCLUDE)
ifndef STATIC_GETTEXT
LIB += -L$(GETTEXTLIB) -l$(INTLLIB)
ifeq (USE_SAFE_GETTEXT_DLL, $(DYNAMIC_GETTEXT))
OBJ+=$(SAFE_GETTEXT_DLL_OBJ)
endif
else
LIB += -L$(GETTEXTLIB) -lintl
endif
endif
endif
ifdef PERL
ifeq (no, $(DYNAMIC_PERL))
LIB += -L$(PERLLIBS) -lperl$(PERL_VER)
endif
endif
ifdef TCL
LIB += -L$(TCL)/lib
ifeq (yes, $(DYNAMIC_TCL))
LIB += -ltclstub$(TCL_VER)
else
LIB += -ltcl$(TCL_VER)
endif
endif
ifeq (yes, $(OLE))
LIB += -loleaut32
OBJ += $(OUTDIR)/if_ole.o
USE_STDCPLUS = yes
endif
ifeq (yes, $(MBYTE))
DEFINES += -DFEAT_MBYTE
endif
ifeq (yes, $(IME))
DEFINES += -DFEAT_MBYTE_IME
ifeq (yes, $(DYNAMIC_IME))
DEFINES += -DDYNAMIC_IME
else
LIB += -limm32
endif
endif
ifdef ICONV
ifneq (yes, $(ICONV))
LIB += -L$(ICONV)
CFLAGS += -I$(ICONV)
endif
DEFINES+=-DDYNAMIC_ICONV
endif
ifeq (yes, $(USE_STDCPLUS))
ifeq (yes, $(STATIC_STDCPLUS))
LIB += -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic
else
LIB += -lstdc++
endif
endif
all: $(TARGET) vimrun.exe xxd/xxd.exe install.exe uninstal.exe GvimExt/gvimext.dll
vimrun.exe: vimrun.c
$(CC) $(CFLAGS) -o vimrun.exe vimrun.c $(LIB)
install.exe: dosinst.c
$(CC) $(CFLAGS) -o install.exe dosinst.c $(LIB) -lole32 -luuid
uninstal.exe: uninstal.c
$(CC) $(CFLAGS) -o uninstal.exe uninstal.c $(LIB)
$(TARGET): $(OUTDIR) $(OBJ)
$(CC) $(CFLAGS) $(LFLAGS) -o $@ $(OBJ) $(LIB) -lole32 -luuid $(LUA_LIB) $(MZSCHEME_LIBDIR) $(MZSCHEME_LIB) $(PYTHONLIB) $(PYTHON3LIB) $(RUBYLIB)
upx: exes
upx gvim.exe
upx vim.exe
mpress: exes
mpress gvim.exe
mpress vim.exe
xxd/xxd.exe: xxd/xxd.c
$(MAKE) -C xxd -f Make_ming.mak CC='$(CC)'
GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h
$(MAKE) -C GvimExt -f Make_ming.mak CROSS=$(CROSS) CROSS_COMPILE=$(CROSS_COMPILE) CXX='$(CXX)' STATIC_STDCPLUS=$(STATIC_STDCPLUS)
clean:
-$(DEL) $(OUTDIR)$(DIRSLASH)*.o
-$(DEL) $(OUTDIR)$(DIRSLASH)*.res
-rmdir $(OUTDIR)
-$(DEL) *.exe
-$(DEL) pathdef.c
ifdef PERL
-$(DEL) if_perl.c
endif
ifdef MZSCHEME
-$(DEL) mzscheme_base.c
endif
$(MAKE) -C GvimExt -f Make_ming.mak clean
$(MAKE) -C xxd -f Make_ming.mak clean
###########################################################################
INCL = vim.h feature.h os_win32.h os_dos.h ascii.h keymap.h term.h macros.h \
structs.h regexp.h option.h ex_cmds.h proto.h globals.h farsi.h \
gui.h
$(OUTDIR)/if_python.o : if_python.c if_py_both.h $(INCL)
$(CC) -c $(CFLAGS) $(PYTHONINC) -DDYNAMIC_PYTHON_DLL=\"python$(PYTHON_VER).dll\" $< -o $@
$(OUTDIR)/if_python3.o : if_python3.c if_py_both.h $(INCL)
$(CC) -c $(CFLAGS) $(PYTHON3INC) -DDYNAMIC_PYTHON3_DLL=\"PYTHON$(PYTHON3_VER).dll\" $< -o $@
$(OUTDIR)/%.o : %.c $(INCL)
$(CC) -c $(CFLAGS) $< -o $@
$(OUTDIR)/vimrc.o: vim.rc version.h gui_w32_rc.h
$(WINDRES) $(WINDRES_FLAGS) $(DEFINES) \
--input-format=rc --output-format=coff -i vim.rc -o $@
$(OUTDIR):
$(MKDIR) $(OUTDIR)
$(OUTDIR)/ex_docmd.o: ex_docmd.c $(INCL) ex_cmds.h
$(CC) -c $(CFLAGS) ex_docmd.c -o $(OUTDIR)/ex_docmd.o
$(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)
$(CC) -c $(CFLAGS) gui_w32.c -o $(OUTDIR)/gui_w32.o
$(OUTDIR)/gui_dwrite.o: gui_dwrite.cpp $(INCL) gui_dwrite.h
$(CC) -c $(CFLAGS) gui_dwrite.cpp -o $(OUTDIR)/gui_dwrite.o
$(OUTDIR)/if_cscope.o: if_cscope.c $(INCL) if_cscope.h
$(CC) -c $(CFLAGS) if_cscope.c -o $(OUTDIR)/if_cscope.o
# Remove -D__IID_DEFINED__ for newer versions of the w32api
$(OUTDIR)/if_ole.o: if_ole.cpp $(INCL)
$(CC) $(CFLAGS) -c -o $(OUTDIR)/if_ole.o if_ole.cpp
$(OUTDIR)/if_ruby.o: if_ruby.c $(INCL)
ifeq (16, $(RUBY))
$(CC) $(CFLAGS) -U_WIN32 -c -o $(OUTDIR)/if_ruby.o if_ruby.c
endif
if_perl.c: if_perl.xs typemap
$(XSUBPP) -prototypes -typemap \
$(PERLTYPEMAP) if_perl.xs > $@
$(OUTDIR)/netbeans.o: netbeans.c $(INCL) $(NBDEBUG_INCL) $(NBDEBUG_SRC)
$(CC) -c $(CFLAGS) netbeans.c -o $(OUTDIR)/netbeans.o
$(OUTDIR)/regexp.o: regexp.c regexp_nfa.c $(INCL)
$(CC) -c $(CFLAGS) regexp.c -o $(OUTDIR)/regexp.o
$(OUTDIR)/if_mzsch.o: if_mzsch.c $(INCL) if_mzsch.h $(MZ_EXTRA_DEP)
$(CC) -c $(CFLAGS) if_mzsch.c -o $(OUTDIR)/if_mzsch.o
mzscheme_base.c:
$(MZSCHEME)/mzc --c-mods mzscheme_base.c ++lib scheme/base
pathdef.c: $(INCL)
ifneq (sh.exe, $(SHELL))
@echo creating pathdef.c
@echo '/* pathdef.c */' > pathdef.c
@echo '#include "vim.h"' >> pathdef.c
@echo 'char_u *default_vim_dir = (char_u *)"$(VIMRCLOC)";' >> pathdef.c
@echo 'char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR)";' >> pathdef.c
@echo 'char_u *all_cflags = (char_u *)"$(CC) $(CFLAGS)";' >> pathdef.c
@echo 'char_u *all_lflags = (char_u *)"$(CC) $(CFLAGS) $(LFLAGS) -o $(TARGET) $(LIB) -lole32 -luuid $(LUA_LIB) $(MZSCHEME_LIBDIR) $(MZSCHEME_LIB) $(PYTHONLIB) $(PYTHON3LIB) $(RUBYLIB)";' >> pathdef.c
@echo 'char_u *compiled_user = (char_u *)"$(USERNAME)";' >> pathdef.c
@echo 'char_u *compiled_sys = (char_u *)"$(USERDOMAIN)";' >> pathdef.c
else
@echo creating pathdef.c
@echo /* pathdef.c */ > pathdef.c
@echo #include "vim.h" >> pathdef.c
@echo char_u *default_vim_dir = (char_u *)"$(VIMRCLOC)"; >> pathdef.c
@echo char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR)"; >> pathdef.c
@echo char_u *all_cflags = (char_u *)"$(CC) $(CFLAGS)"; >> pathdef.c
@echo char_u *all_lflags = (char_u *)"$(CC) $(CFLAGS) $(LFLAGS) -o $(TARGET) $(LIB) -lole32 -luuid $(LUA_LIB) $(MZSCHEME_LIBDIR) $(MZSCHEME_LIB) $(PYTHONLIB) $(PYTHON3LIB) $(RUBYLIB)"; >> pathdef.c
@echo char_u *compiled_user = (char_u *)"$(USERNAME)"; >> pathdef.c
@echo char_u *compiled_sys = (char_u *)"$(USERDOMAIN)"; >> pathdef.c
endif

View File

@@ -1,193 +1,27 @@
# Makefile for VIM on Win32
#
# Info at http://www.mingw.org
# Alternative x86 and 64-builds: http://mingw-w64.sourceforge.net
# Also requires GNU make, which you can download from the same sites.
# Get missing libraries from http://gnuwin32.sf.net.
# Makefile for VIM on Win32, using MinGW
#
# Tested on Win32 NT 4 and Win95.
# Also read INSTALLpc.txt!
#
# To make everything, just 'make -f Make_ming.mak'.
# To make just e.g. gvim.exe, 'make -f Make_ming.mak gvim.exe'.
# After a run, you can 'make -f Make_ming.mak clean' to clean up.
# The old Make_ming.mak (maintained by Ron Aaron et al.) was merged into
# Make_cyg_ming.mak.
# This file contains MinGW specific settings. Common settings are contained
# in Make_cyg_ming.mak.
#
# NOTE: Sometimes 'GNU Make' will stop after building vimrun.exe -- I think
# it's just run out of memory or something. Run again, and it will continue
# with 'xxd'.
#
# "make upx" makes *compressed* versions of the 32 bit GUI and console EXEs,
# using the excellent UPX compressor:
# http://upx.sourceforge.net/
# "make mpress" uses the MPRESS compressor for 32- and 64-bit EXEs:
# http://www.matcode.com/mpress.htm
#
# Maintained by Ron Aaron <ronaharon@yahoo.com> et al.
# Updated 2014 Oct 13.
# Last updated by Ken Takata.
# Last Change: 2014 Oct 21
#>>>>> choose options:
# set to yes for a debug build
DEBUG=no
# set to SIZE for size, SPEED for speed, MAXSPEED for maximum optimization
OPTIMIZE=MAXSPEED
# set to yes to make gvim, no for vim
GUI=yes
# set to yes if you want to use DirectWrite (DirectX)
DIRECTX=no
# FEATURES=[TINY | SMALL | NORMAL | BIG | HUGE]
# Set to TINY to make minimal version (few features).
FEATURES=BIG
# Set to one of i386, i486, i586, i686 as the minimum target processor.
# For amd64/x64 architecture set ARCH=x86-64 .
ARCH=i386
# Set to yes to cross-compile from unix; no=native Windows.
CROSS=no
# Set to path to iconv.h and libiconv.a to enable using 'iconv.dll'.
#ICONV="."
ICONV=yes
GETTEXT=yes
# Set to yes to include multibyte support.
MBYTE=yes
# Set to yes to include IME support.
IME=yes
DYNAMIC_IME=yes
# Set to yes to enable writing a postscript file with :hardcopy.
POSTSCRIPT=no
# Set to yes to enable OLE support.
OLE=no
# Set the default $(WINVER) to make it work with pre-Win2k.
ifndef WINVER
WINVER = 0x0500
endif
# Set to yes to enable Cscope support.
CSCOPE=yes
# Set to yes to enable Netbeans support.
NETBEANS=$(GUI)
# Link against the shared version of libstdc++ by default. Set
# STATIC_STDCPLUS to "yes" to link against static version instead.
ifndef STATIC_STDCPLUS
STATIC_STDCPLUS=no
endif
# If the user doesn't want gettext, undefine it.
ifeq (no, $(GETTEXT))
GETTEXT=
endif
# Added by E.F. Amatria <eferna1@platea.ptic.mec.es> 2001 Feb 23
# Uncomment the first line and one of the following three if you want Native Language
# Support. You'll need gnu_gettext.win32, a MINGW32 Windows PORT of gettext by
# Franco Bez <franco.bez@gmx.de>. It may be found at
# http://home.a-city.de/franco.bez/gettext/gettext_win32_en.html
# Tested with mingw32 with GCC-2.95.2 on Win98
# Updated 2001 Jun 9
#GETTEXT=c:/gettext.win32.msvcrt
#STATIC_GETTEXT=USE_STATIC_GETTEXT
#DYNAMIC_GETTEXT=USE_GETTEXT_DLL
#DYNAMIC_GETTEXT=USE_SAFE_GETTEXT_DLL
SAFE_GETTEXT_DLL_OBJ = $(GETTEXT)/src/safe_gettext_dll/safe_gettext_dll.o
# Alternatively, if you uncomment the two following lines, you get a "safe" version
# without linking the safe_gettext_dll.o object file.
#DYNAMIC_GETTEXT=DYNAMIC_GETTEXT
#GETTEXT_DYNAMIC=gnu_gettext.dll
INTLPATH=$(GETTEXT)/lib/mingw32
INTLLIB=gnu_gettext
# If you are using gettext-0.10.35 from http://sourceforge.net/projects/gettext
# or gettext-0.10.37 from http://sourceforge.net/projects/mingwrep/
# uncomment the following, but I can't build a static version with them, ?-(|
#GETTEXT=c:/gettext-0.10.37-20010430
#STATIC_GETTEXT=USE_STATIC_GETTEXT
#DYNAMIC_GETTEXT=DYNAMIC_GETTEXT
#INTLPATH=$(GETTEXT)/lib
#INTLLIB=intl
# uncomment 'PERL' if you want a perl-enabled version
#PERL=C:/perl
ifdef PERL
ifndef PERL_VER
PERL_VER=56
endif
ifndef DYNAMIC_PERL
DYNAMIC_PERL=yes
endif
# on Linux, for cross-compile, it's here:
#PERLLIB=/home/ron/ActivePerl/lib
# on NT, it's here:
PERLLIB=$(PERL)/lib
PERLLIBS=$(PERLLIB)/Core
XSUBPPTRY=$(PERLLIB)/ExtUtils/xsubpp
XSUBPP_EXISTS=$(shell perl -e "print 1 unless -e '$(XSUBPPTRY)'")
ifeq "$(XSUBPP_EXISTS)" ""
XSUBPP=perl $(XSUBPPTRY)
else
XSUBPP=xsubpp
endif
endif
#PERL=c:/perl
# uncomment 'LUA' if you want a Lua-enabled version
#LUA=/usr/local
ifdef LUA
ifndef DYNAMIC_LUA
DYNAMIC_LUA=yes
endif
ifndef LUA_VER
LUA_VER=51
endif
ifeq (no,$(DYNAMIC_LUA))
LUA_LIB = -L$(LUA)/lib -llua
endif
endif
#LUA=c:/lua
# uncomment 'MZSCHEME' if you want a MzScheme-enabled version
#MZSCHEME=d:/plt
ifdef MZSCHEME
ifndef DYNAMIC_MZSCHEME
DYNAMIC_MZSCHEME=yes
endif
ifndef MZSCHEME_VER
MZSCHEME_VER=205_000
endif
ifndef MZSCHEME_PRECISE_GC
MZSCHEME_PRECISE_GC=no
endif
# for version 4.x we need to generate byte-code for Scheme base
ifndef MZSCHEME_GENERATE_BASE
MZSCHEME_GENERATE_BASE=no
endif
ifndef MZSCHEME_USE_RACKET
MZSCHEME_MAIN_LIB=mzsch
else
MZSCHEME_MAIN_LIB=racket
endif
ifeq (no,$(DYNAMIC_MZSCHEME))
ifeq (yes,$(MZSCHEME_PRECISE_GC))
MZSCHEME_LIB=-l$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER)
else
MZSCHEME_LIB = -l$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER) -lmzgc$(MZSCHEME_VER)
endif
# the modern MinGW can dynamically link to dlls directly.
# point MZSCHEME_DLLS to where you put libmzschXXXXXXX.dll and libgcXXXXXXX.dll
ifndef MZSCHEME_DLLS
MZSCHEME_DLLS=$(MZSCHEME)
endif
MZSCHEME_LIBDIR=-L$(MZSCHEME_DLLS) -L$(MZSCHEME_DLLS)\lib
endif
endif
# Python support -- works with the ActiveState python 2.0 release (and others
# too, probably)
#
# uncomment 'PYTHON' to make python-enabled version
# uncomment 'PYTHON' if you want a python-enabled version
# Put the path to the python distro here. If cross compiling from Linux, you
# will also need to convert the header files to unix instead of dos format:
# for fil in *.h ; do vim -e -c 'set ff=unix|w|q' $fil
@@ -200,631 +34,16 @@ endif
# on my NT box, it's here:
#PYTHON=c:/python20
ifdef PYTHON
ifndef DYNAMIC_PYTHON
DYNAMIC_PYTHON=yes
endif
# uncomment 'PYTHON3' if you want a python3-enabled version
#PYTHON3=c:/python31
ifndef PYTHON_VER
PYTHON_VER=22
endif
ifeq (no,$(DYNAMIC_PYTHON))
PYTHONLIB=-L$(PYTHON)/libs -lpython$(PYTHON_VER)
endif
# my include files are in 'win32inc' on Linux, and 'include' in the standard
# NT distro (ActiveState)
ifeq ($(CROSS),no)
PYTHONINC=-I $(PYTHON)/include
else
PYTHONINC=-I $(PYTHON)/win32inc
endif
endif
#PYTHON3: See comment for Python 2 above
ifdef PYTHON3
ifndef DYNAMIC_PYTHON3
DYNAMIC_PYTHON3=yes
endif
ifndef PYTHON3_VER
PYTHON3_VER=31
endif
ifeq (no,$(DYNAMIC_PYTHON3))
PYTHON3LIB=-L$(PYTHON3)/libs -lPYTHON$(PYTHON3_VER)
endif
ifeq ($(CROSS),no)
PYTHON3INC=-I $(PYTHON3)/include
else
PYTHON3INC=-I $(PYTHON3)/win32inc
endif
endif
# TCL interface:
# TCL=[Path to TCL directory]
# DYNAMIC_TCL=yes (to load the TCL DLL dynamically)
# TCL_VER=[TCL version, eg 83, 84] (default is 83)
# uncomment 'TCL' if you want a Tcl-enabled version
#TCL=c:/tcl
ifdef TCL
ifndef DYNAMIC_TCL
DYNAMIC_TCL=yes
endif
ifndef TCL_VER
TCL_VER = 83
endif
TCLINC += -I$(TCL)/include
endif
# Ruby interface:
# RUBY=[Path to Ruby directory]
# DYNAMIC_RUBY=yes (to load the Ruby DLL dynamically)
# RUBY_VER=[Ruby version, eg 16, 17] (default is 16)
# RUBY_VER_LONG=[Ruby version, eg 1.6, 1.7] (default is 1.6)
# You must set RUBY_VER_LONG when changing RUBY_VER.
# You must set RUBY_API_VER version to RUBY_VER_LONG.
# Don't set ruby API version to RUBY_VER like 191.
# uncomment 'RUBY' if you want a Ruby-enabled version
#RUBY=c:/ruby
ifdef RUBY
ifndef DYNAMIC_RUBY
DYNAMIC_RUBY=yes
endif
# Set default value
ifndef RUBY_VER
RUBY_VER = 16
endif
ifndef RUBY_VER_LONG
RUBY_VER_LONG = 1.6
endif
ifndef RUBY_API_VER
RUBY_API_VER = $(subst .,,$(RUBY_VER_LONG))
endif
ifndef RUBY_PLATFORM
ifeq ($(RUBY_VER), 16)
RUBY_PLATFORM = i586-mswin32
else
ifneq ($(wildcard $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/i386-mingw32),)
RUBY_PLATFORM = i386-mingw32
else
ifneq ($(wildcard $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/x64-mingw32),)
RUBY_PLATFORM = x64-mingw32
else
RUBY_PLATFORM = i386-mswin32
endif
endif
endif
endif
ifndef RUBY_INSTALL_NAME
ifeq ($(RUBY_VER), 16)
RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_API_VER)
else
ifeq ($(ARCH),x86-64)
RUBY_INSTALL_NAME = x64-msvcrt-ruby$(RUBY_API_VER)
else
RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_API_VER)
endif
endif
endif
ifeq (19, $(word 1,$(sort 19 $(RUBY_VER))))
RUBY_19_OR_LATER = 1
endif
RUBYINC = -I $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/$(RUBY_PLATFORM)
ifdef RUBY_19_OR_LATER
RUBYINC += -I $(RUBY)/include/ruby-$(RUBY_VER_LONG) -I $(RUBY)/include/ruby-$(RUBY_VER_LONG)/$(RUBY_PLATFORM)
endif
ifeq (no, $(DYNAMIC_RUBY))
RUBYLIB = -L$(RUBY)/lib -l$(RUBY_INSTALL_NAME)
endif
endif # RUBY
# See feature.h for a list of options.
# Any other defines can be included here.
DEF_GUI=-DFEAT_GUI_W32 -DFEAT_CLIPBOARD
DEFINES=-DWIN32 -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) \
-DHAVE_PATHDEF -DFEAT_$(FEATURES)
ifeq ($(ARCH),x86-64)
DEFINES+=-DMS_WIN64
endif
ifeq ($(CROSS),yes)
# cross-compiler prefix:
CROSS_COMPILE = i586-pc-mingw32msvc-
DEL = rm
MKDIR = mkdir -p
DIRSLASH = /
else
# normal (Windows) compilation:
CROSS_COMPILE =
ifneq (sh.exe, $(SHELL))
DEL = rm
MKDIR = mkdir -p
DIRSLASH = /
else
DEL = del
MKDIR = mkdir
DIRSLASH = \\
endif
endif
CC := $(CROSS_COMPILE)gcc
WINDRES := $(CROSS_COMPILE)windres
WINDRES_CC = $(CC)
#>>>>> end of choices
###########################################################################
CFLAGS = -Iproto $(DEFINES) -pipe -w -march=$(ARCH) -Wall
WINDRES_FLAGS = --preprocessor="$(WINDRES_CC) -E -xc" -DRC_INVOKED
EXTRA_LIBS =
ifdef GETTEXT
DEFINES += -DHAVE_GETTEXT -DHAVE_LOCALE_H
GETTEXTINCLUDE = $(GETTEXT)/include
GETTEXTLIB = $(INTLPATH)
ifeq (yes, $(GETTEXT))
DEFINES += -DDYNAMIC_GETTEXT
else
ifdef DYNAMIC_GETTEXT
DEFINES += -D$(DYNAMIC_GETTEXT)
ifdef GETTEXT_DYNAMIC
DEFINES += -DGETTEXT_DYNAMIC -DGETTEXT_DLL=\"$(GETTEXT_DYNAMIC)\"
endif
endif
endif
endif
ifdef PERL
CFLAGS += -I$(PERLLIBS) -DFEAT_PERL
ifeq (yes, $(DYNAMIC_PERL))
CFLAGS += -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl$(PERL_VER).dll\"
EXTRA_LIBS += -L$(PERLLIBS) -lperl$(PERL_VER)
endif
endif
ifdef LUA
CFLAGS += -I$(LUA)/include -DFEAT_LUA
ifeq (yes, $(DYNAMIC_LUA))
CFLAGS += -DDYNAMIC_LUA -DDYNAMIC_LUA_DLL=\"lua$(LUA_VER).dll\"
endif
endif
ifdef MZSCHEME
CFLAGS += -I$(MZSCHEME)/include -DFEAT_MZSCHEME -DMZSCHEME_COLLECTS=\"$(MZSCHEME)/collects\"
ifeq (yes, $(DYNAMIC_MZSCHEME))
CFLAGS += -DDYNAMIC_MZSCHEME -DDYNAMIC_MZSCH_DLL=\"lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).dll\" -DDYNAMIC_MZGC_DLL=\"libmzgc$(MZSCHEME_VER).dll\"
endif
ifeq (yes, "$(MZSCHEME_DEBUG)")
CFLAGS += -DMZSCHEME_FORCE_GC
endif
endif
ifdef RUBY
CFLAGS += -DFEAT_RUBY $(RUBYINC)
ifeq (yes, $(DYNAMIC_RUBY))
CFLAGS += -DDYNAMIC_RUBY -DDYNAMIC_RUBY_DLL=\"$(RUBY_INSTALL_NAME).dll\"
CFLAGS += -DDYNAMIC_RUBY_VER=$(RUBY_VER)
endif
endif
ifdef PYTHON
CFLAGS += -DFEAT_PYTHON
ifeq (yes, $(DYNAMIC_PYTHON))
CFLAGS += -DDYNAMIC_PYTHON
endif
endif
ifdef PYTHON3
CFLAGS += -DFEAT_PYTHON3
ifeq (yes, $(DYNAMIC_PYTHON3))
CFLAGS += -DDYNAMIC_PYTHON3
endif
endif
ifdef TCL
CFLAGS += -DFEAT_TCL $(TCLINC)
ifeq (yes, $(DYNAMIC_TCL))
CFLAGS += -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"tcl$(TCL_VER).dll\"
endif
endif
ifeq ($(POSTSCRIPT),yes)
DEFINES += -DMSWINPS
endif
ifeq (yes, $(OLE))
DEFINES += -DFEAT_OLE
endif
ifeq ($(CSCOPE),yes)
DEFINES += -DFEAT_CSCOPE
endif
ifeq ($(NETBEANS),yes)
# Only allow NETBEANS for a GUI build.
ifeq (yes, $(GUI))
DEFINES += -DFEAT_NETBEANS_INTG
ifeq ($(NBDEBUG), yes)
DEFINES += -DNBDEBUG
NBDEBUG_INCL = nbdebug.h
NBDEBUG_SRC = nbdebug.c
endif
endif
endif
# DirectWrite (DirectX)
ifeq ($(DIRECTX),yes)
# Only allow DirectWrite for a GUI build.
ifeq (yes, $(GUI))
DEFINES += -DFEAT_DIRECTX -DDYNAMIC_DIRECTX
endif
endif
# Only allow XPM for a GUI build.
ifeq (yes, $(GUI))
ifndef XPM
ifeq ($(ARCH),i386)
XPM = xpm/x86
endif
ifeq ($(ARCH),i486)
XPM = xpm/x86
endif
ifeq ($(ARCH),i586)
XPM = xpm/x86
endif
ifeq ($(ARCH),i686)
XPM = xpm/x86
endif
ifeq ($(ARCH),x86-64)
XPM = xpm/x64
endif
endif
ifdef XPM
ifneq ($(XPM),no)
CFLAGS += -DFEAT_XPM_W32 -I $(XPM)/include -I $(XPM)/../include
endif
endif
endif
ifeq ($(DEBUG),yes)
CFLAGS += -g -fstack-check
DEBUG_SUFFIX=d
else
ifeq ($(OPTIMIZE), SIZE)
CFLAGS += -Os
else
ifeq ($(OPTIMIZE), MAXSPEED)
CFLAGS += -O3
CFLAGS += -fomit-frame-pointer -freg-struct-return
else # SPEED
CFLAGS += -O2
endif
endif
CFLAGS += -s
endif
LIB = -lkernel32 -luser32 -lgdi32 -ladvapi32 -lcomdlg32 -lcomctl32 -lversion
GUIOBJ = $(OUTDIR)/gui.o $(OUTDIR)/gui_w32.o $(OUTDIR)/gui_beval.o $(OUTDIR)/os_w32exe.o
OBJ = \
$(OUTDIR)/blowfish.o \
$(OUTDIR)/buffer.o \
$(OUTDIR)/charset.o \
$(OUTDIR)/crypt.o \
$(OUTDIR)/crypt_zip.o \
$(OUTDIR)/diff.o \
$(OUTDIR)/digraph.o \
$(OUTDIR)/edit.o \
$(OUTDIR)/eval.o \
$(OUTDIR)/ex_cmds.o \
$(OUTDIR)/ex_cmds2.o \
$(OUTDIR)/ex_docmd.o \
$(OUTDIR)/ex_eval.o \
$(OUTDIR)/ex_getln.o \
$(OUTDIR)/fileio.o \
$(OUTDIR)/fold.o \
$(OUTDIR)/getchar.o \
$(OUTDIR)/hardcopy.o \
$(OUTDIR)/hashtab.o \
$(OUTDIR)/main.o \
$(OUTDIR)/mark.o \
$(OUTDIR)/memfile.o \
$(OUTDIR)/memline.o \
$(OUTDIR)/menu.o \
$(OUTDIR)/message.o \
$(OUTDIR)/misc1.o \
$(OUTDIR)/misc2.o \
$(OUTDIR)/move.o \
$(OUTDIR)/mbyte.o \
$(OUTDIR)/normal.o \
$(OUTDIR)/ops.o \
$(OUTDIR)/option.o \
$(OUTDIR)/os_win32.o \
$(OUTDIR)/os_mswin.o \
$(OUTDIR)/winclip.o \
$(OUTDIR)/pathdef.o \
$(OUTDIR)/popupmnu.o \
$(OUTDIR)/quickfix.o \
$(OUTDIR)/regexp.o \
$(OUTDIR)/screen.o \
$(OUTDIR)/search.o \
$(OUTDIR)/sha256.o \
$(OUTDIR)/spell.o \
$(OUTDIR)/syntax.o \
$(OUTDIR)/tag.o \
$(OUTDIR)/term.o \
$(OUTDIR)/ui.o \
$(OUTDIR)/undo.o \
$(OUTDIR)/version.o \
$(OUTDIR)/vimrc.o \
$(OUTDIR)/window.o
ifdef PERL
OBJ += $(OUTDIR)/if_perl.o
endif
ifdef LUA
OBJ += $(OUTDIR)/if_lua.o
endif
ifdef MZSCHEME
OBJ += $(OUTDIR)/if_mzsch.o
MZSCHEME_INCL = if_mzsch.h
ifeq (yes,$(MZSCHEME_GENERATE_BASE))
CFLAGS += -DINCLUDE_MZSCHEME_BASE
MZ_EXTRA_DEP += mzscheme_base.c
endif
ifeq (yes,$(MZSCHEME_PRECISE_GC))
CFLAGS += -DMZ_PRECISE_GC
endif
endif
ifdef PYTHON
OBJ += $(OUTDIR)/if_python.o
endif
ifdef PYTHON3
OBJ += $(OUTDIR)/if_python3.o
endif
ifdef RUBY
OBJ += $(OUTDIR)/if_ruby.o
endif
ifdef TCL
OBJ += $(OUTDIR)/if_tcl.o
endif
ifeq ($(CSCOPE),yes)
OBJ += $(OUTDIR)/if_cscope.o
endif
ifeq ($(NETBEANS),yes)
# Only allow NETBEANS for a GUI build.
ifeq (yes, $(GUI))
OBJ += $(OUTDIR)/netbeans.o
LIB += -lwsock32
endif
endif
ifeq ($(DIRECTX),yes)
# Only allow DIRECTX for a GUI build.
ifeq (yes, $(GUI))
OBJ += $(OUTDIR)/gui_dwrite.o
LIB += -ld2d1 -ldwrite
USE_STDCPLUS = yes
endif
endif
ifneq ($(XPM),no)
# Only allow XPM for a GUI build.
ifeq (yes, $(GUI))
OBJ += $(OUTDIR)/xpm_w32.o
# You'll need libXpm.a from http://gnuwin32.sf.net
LIB += -L$(XPM)/lib -lXpm
endif
endif
ifdef MZSCHEME
MZSCHEME_SUFFIX = Z
endif
ifeq ($(GUI),yes)
TARGET := gvim$(DEBUG_SUFFIX).exe
DEFINES += $(DEF_GUI)
OBJ += $(GUIOBJ)
LFLAGS += -mwindows
OUTDIR = gobj$(DEBUG_SUFFIX)$(MZSCHEME_SUFFIX)$(ARCH)
else
TARGET := vim$(DEBUG_SUFFIX).exe
OUTDIR = obj$(DEBUG_SUFFIX)$(MZSCHEME_SUFFIX)$(ARCH)
endif
ifdef GETTEXT
ifneq (yes, $(GETTEXT))
CFLAGS += -I$(GETTEXTINCLUDE)
ifndef STATIC_GETTEXT
LIB += -L$(GETTEXTLIB) -l$(INTLLIB)
ifeq (USE_SAFE_GETTEXT_DLL, $(DYNAMIC_GETTEXT))
OBJ+=$(SAFE_GETTEXT_DLL_OBJ)
endif
else
LIB += -L$(GETTEXTLIB) -lintl
endif
endif
endif
ifdef PERL
ifeq (no, $(DYNAMIC_PERL))
LIB += -L$(PERLLIBS) -lperl$(PERL_VER)
endif
endif
ifdef TCL
LIB += -L$(TCL)/lib
ifeq (yes, $(DYNAMIC_TCL))
LIB += -ltclstub$(TCL_VER)
else
LIB += -ltcl$(TCL_VER)
endif
endif
ifeq (yes, $(OLE))
LIB += -loleaut32
OBJ += $(OUTDIR)/if_ole.o
USE_STDCPLUS = yes
endif
ifeq (yes, $(MBYTE))
DEFINES += -DFEAT_MBYTE
endif
ifeq (yes, $(IME))
DEFINES += -DFEAT_MBYTE_IME
ifeq (yes, $(DYNAMIC_IME))
DEFINES += -DDYNAMIC_IME
else
LIB += -limm32
endif
endif
ifdef ICONV
ifneq (yes, $(ICONV))
LIB += -L$(ICONV)
CFLAGS += -I$(ICONV)
endif
DEFINES+=-DDYNAMIC_ICONV
endif
ifeq (yes, $(USE_STDCPLUS))
ifeq (yes, $(STATIC_STDCPLUS))
LIB += -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic
else
LIB += -lstdc++
endif
endif
all: $(TARGET) vimrun.exe xxd/xxd.exe install.exe uninstal.exe GvimExt/gvimext.dll
vimrun.exe: vimrun.c
$(CC) $(CFLAGS) -o vimrun.exe vimrun.c $(LIB)
install.exe: dosinst.c
$(CC) $(CFLAGS) -o install.exe dosinst.c $(LIB) -lole32 -luuid
uninstal.exe: uninstal.c
$(CC) $(CFLAGS) -o uninstal.exe uninstal.c $(LIB)
$(TARGET): $(OUTDIR) $(OBJ)
$(CC) $(CFLAGS) $(LFLAGS) -o $@ $(OBJ) $(LIB) -lole32 -luuid $(LUA_LIB) $(MZSCHEME_LIBDIR) $(MZSCHEME_LIB) $(PYTHONLIB) $(PYTHON3LIB) $(RUBYLIB)
upx: exes
upx gvim.exe
upx vim.exe
mpress: exes
mpress gvim.exe
mpress vim.exe
xxd/xxd.exe: xxd/xxd.c
$(MAKE) -C xxd -f Make_ming.mak CC=$(CC)
GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h
$(MAKE) -C GvimExt -f Make_ming.mak CROSS=$(CROSS) CROSS_COMPILE=$(CROSS_COMPILE)
clean:
-$(DEL) $(OUTDIR)$(DIRSLASH)*.o
-$(DEL) $(OUTDIR)$(DIRSLASH)*.res
-rmdir $(OUTDIR)
-$(DEL) *.exe
-$(DEL) pathdef.c
ifdef PERL
-$(DEL) if_perl.c
endif
ifdef MZSCHEME
-$(DEL) mzscheme_base.c
endif
$(MAKE) -C GvimExt -f Make_ming.mak clean
$(MAKE) -C xxd -f Make_ming.mak clean
###########################################################################
INCL = vim.h feature.h os_win32.h os_dos.h ascii.h keymap.h term.h macros.h \
structs.h regexp.h option.h ex_cmds.h proto.h globals.h farsi.h \
gui.h
$(OUTDIR)/if_python.o : if_python.c if_py_both.h $(INCL)
$(CC) -c $(CFLAGS) $(PYTHONINC) -DDYNAMIC_PYTHON_DLL=\"python$(PYTHON_VER).dll\" $< -o $@
$(OUTDIR)/if_python3.o : if_python3.c if_py_both.h $(INCL)
$(CC) -c $(CFLAGS) $(PYTHON3INC) -DDYNAMIC_PYTHON3_DLL=\"PYTHON$(PYTHON3_VER).dll\" $< -o $@
$(OUTDIR)/%.o : %.c $(INCL)
$(CC) -c $(CFLAGS) $< -o $@
$(OUTDIR)/vimrc.o: vim.rc version.h gui_w32_rc.h
$(WINDRES) $(WINDRES_FLAGS) $(DEFINES) \
--input-format=rc --output-format=coff -i vim.rc -o $@
$(OUTDIR):
$(MKDIR) $(OUTDIR)
$(OUTDIR)/ex_docmd.o: ex_docmd.c $(INCL) ex_cmds.h
$(CC) -c $(CFLAGS) ex_docmd.c -o $(OUTDIR)/ex_docmd.o
$(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)
$(CC) -c $(CFLAGS) gui_w32.c -o $(OUTDIR)/gui_w32.o
$(OUTDIR)/gui_dwrite.o: gui_dwrite.cpp $(INCL) gui_dwrite.h
$(CC) -c $(CFLAGS) gui_dwrite.cpp -o $(OUTDIR)/gui_dwrite.o
$(OUTDIR)/if_cscope.o: if_cscope.c $(INCL) if_cscope.h
$(CC) -c $(CFLAGS) if_cscope.c -o $(OUTDIR)/if_cscope.o
# Remove -D__IID_DEFINED__ for newer versions of the w32api
$(OUTDIR)/if_ole.o: if_ole.cpp $(INCL)
$(CC) $(CFLAGS) -c -o $(OUTDIR)/if_ole.o if_ole.cpp
$(OUTDIR)/if_ruby.o: if_ruby.c $(INCL)
ifeq (16, $(RUBY))
$(CC) $(CFLAGS) -U_WIN32 -c -o $(OUTDIR)/if_ruby.o if_ruby.c
endif
if_perl.c: if_perl.xs typemap
$(XSUBPP) -prototypes -typemap \
$(PERLLIB)/ExtUtils/typemap if_perl.xs > $@
$(OUTDIR)/netbeans.o: netbeans.c $(INCL) $(NBDEBUG_INCL) $(NBDEBUG_SRC)
$(CC) -c $(CFLAGS) netbeans.c -o $(OUTDIR)/netbeans.o
$(OUTDIR)/regexp.o: regexp.c regexp_nfa.c $(INCL)
$(CC) -c $(CFLAGS) regexp.c -o $(OUTDIR)/regexp.o
$(OUTDIR)/if_mzsch.o: if_mzsch.c $(INCL) if_mzsch.h $(MZ_EXTRA_DEP)
$(CC) -c $(CFLAGS) if_mzsch.c -o $(OUTDIR)/if_mzsch.o
mzscheme_base.c:
$(MZSCHEME)/mzc --c-mods mzscheme_base.c ++lib scheme/base
pathdef.c: $(INCL)
ifneq (sh.exe, $(SHELL))
@echo creating pathdef.c
@echo '/* pathdef.c */' > pathdef.c
@echo '#include "vim.h"' >> pathdef.c
@echo 'char_u *default_vim_dir = (char_u *)"$(VIMRCLOC)";' >> pathdef.c
@echo 'char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR)";' >> pathdef.c
@echo 'char_u *all_cflags = (char_u *)"$(CC) $(CFLAGS)";' >> pathdef.c
@echo 'char_u *all_lflags = (char_u *)"$(CC) $(CFLAGS) $(LFLAGS) -o $(TARGET) $(LIB) -lole32 -luuid $(LUA_LIB) $(MZSCHEME_LIBDIR) $(MZSCHEME_LIB) $(PYTHONLIB) $(PYTHON3LIB) $(RUBYLIB)";' >> pathdef.c
@echo 'char_u *compiled_user = (char_u *)"$(USERNAME)";' >> pathdef.c
@echo 'char_u *compiled_sys = (char_u *)"$(USERDOMAIN)";' >> pathdef.c
else
@echo creating pathdef.c
@echo /* pathdef.c */ > pathdef.c
@echo #include "vim.h" >> pathdef.c
@echo char_u *default_vim_dir = (char_u *)"$(VIMRCLOC)"; >> pathdef.c
@echo char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR)"; >> pathdef.c
@echo char_u *all_cflags = (char_u *)"$(CC) $(CFLAGS)"; >> pathdef.c
@echo char_u *all_lflags = (char_u *)"$(CC) $(CFLAGS) $(LFLAGS) -o $(TARGET) $(LIB) -lole32 -luuid $(LUA_LIB) $(MZSCHEME_LIBDIR) $(MZSCHEME_LIB) $(PYTHONLIB) $(PYTHON3LIB) $(RUBYLIB)"; >> pathdef.c
@echo char_u *compiled_user = (char_u *)"$(USERNAME)"; >> pathdef.c
@echo char_u *compiled_sys = (char_u *)"$(USERDOMAIN)"; >> pathdef.c
endif
# Do not change this.
UNDER_CYGWIN = no
include Make_cyg_ming.mak

View File

@@ -50,13 +50,14 @@
# Perl interface:
# PERL=[Path to Perl directory]
# DYNAMIC_PERL=yes (to load the Perl DLL dynamically)
# PERL_VER=[Perl version, in the form 55 (5.005), 56 (5.6.x), etc]
# PERL_VER=[Perl version, in the form 55 (5.005), 56 (5.6.x),
# 510 (5.10.x), etc]
# (default is 56)
#
# Python interface:
# PYTHON=[Path to Python directory]
# DYNAMIC_PYTHON=yes (to load the Python DLL dynamically)
# PYTHON_VER=[Python version, eg 15, 20] (default is 22)
# PYTHON_VER=[Python version, eg 22, 23, ..., 27] (default is 22)
#
# Python3 interface:
# PYTHON3=[Path to Python3 directory]
@@ -66,11 +67,13 @@
# Ruby interface:
# RUBY=[Path to Ruby directory]
# DYNAMIC_RUBY=yes (to load the Ruby DLL dynamically)
# RUBY_VER=[Ruby version, eg 16, 17] (default is 18)
# RUBY_VER_LONG=[Ruby version, eg 1.6, 1.7] (default is 1.8)
# RUBY_VER=[Ruby version, eg 18, 19, 20] (default is 18)
# RUBY_VER_LONG=[Ruby version, eg 1.8, 1.9.1, 2.0.0] (default is 1.8)
# You must set RUBY_VER_LONG when change RUBY_VER.
# You must set RUBY_API_VER to RUBY_VER_LONG.
# Don't set ruby API version to RUBY_VER like 191.
# RUBY_API_VER is derived from RUBY_VER_LONG.
# Note: If you use Ruby 1.9.3, set as follows:
# RUBY_VER=19
# RUBY_VER_LONG=1.9.1 (not 1.9.3, because the API version is 1.9.1.)
#
# Tcl interface:
# TCL=[Path to Tcl directory]

View File

@@ -2,7 +2,7 @@
# Makefile for Vim on OpenVMS
#
# Maintainer: Zoltan Arpadffy <arpadffy@polarhome.com>
# Last change: 2014 Feb 24
# Last change: 2014 Aug 10
#
# This has script been tested on VMS 6.2 to 8.2 on DEC Alpha, VAX and IA64
# with MMS and MMK
@@ -309,7 +309,7 @@ ALL_CFLAGS_VER = /def=($(MODEL_DEF)$(DEFS)$(DEBUG_DEF)$(PERL_DEF)$(PYTHON_DEF) -
ALL_LIBS = $(LIBS) $(GUI_LIB_DIR) $(GUI_LIB) \
$(PERL_LIB) $(PYTHON_LIB) $(TCL_LIB) $(SNIFF_LIB) $(RUBY_LIB)
SRC = blowfish.c buffer.c charset.c diff.c digraph.c edit.c eval.c ex_cmds.c ex_cmds2.c \
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 \
hardcopy.c hashtab.c main.c mark.c menu.c mbyte.c memfile.c memline.c message.c misc1.c \
misc2.c move.c normal.c ops.c option.c popupmnu.c quickfix.c regexp.c search.c sha256.c\
@@ -318,7 +318,7 @@ SRC = blowfish.c buffer.c charset.c diff.c digraph.c edit.c eval.c ex_cmds.c ex_
$(GUI_SRC) $(PERL_SRC) $(PYTHON_SRC) $(TCL_SRC) $(SNIFF_SRC) \
$(RUBY_SRC) $(HANGULIN_SRC) $(MZSCH_SRC)
OBJ = blowfish.obj buffer.obj charset.obj diff.obj digraph.obj edit.obj eval.obj \
OBJ = 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 \
if_xcmdsrv.obj fileio.obj fold.obj getchar.obj hardcopy.obj hashtab.obj main.obj mark.obj \
menu.obj memfile.obj memline.obj message.obj misc1.obj misc2.obj \

View File

@@ -1779,13 +1779,12 @@ update-po:
proto: $(PRO_AUTO) $(PRO_MANUAL)
# Filter out arguments that cproto doesn't support.
# Don't pass "-pthread" to cproto, it sees it as a list of individual flags.
# Don't pass "-fstack-protector" to cproto, for the same reason.
# Don't pass "-g" to cproto.
# Don't pass "-pthread", "-fwrapv" and similar arguments to cproto, it sees
# them as a list of individual flags.
# The -E"gcc -E" argument must be separate to avoid problems with shell
# quoting.
CPROTO = cproto $(PROTO_FLAGS) -DPROTO \
`echo '$(LINT_CFLAGS)' | sed -e 's/-pthread//g' -e 's/-fstack-protector//g' -e 's/\ -g\ / /g'`
`echo '$(LINT_CFLAGS)' | sed -e 's/ -[a-z-]\+//g'`
### Would be nice if this would work for "normal" make.
### Currently it only works for (Free)BSD make.
@@ -1879,6 +1878,9 @@ test check:
cd testdir; $(MAKE) -f Makefile $(GUI_TESTTARGET) VIMPROG=../$(VIMTARGET) $(GUI_TESTARG) SCRIPTSOURCE=../$(SCRIPTSOURCE)
$(MAKE) -f Makefile unittest
benchmark:
cd testdir; $(MAKE) -f Makefile benchmark VIMPROG=../$(VIMTARGET) SCRIPTSOURCE=../$(SCRIPTSOURCE)
unittesttargets:
$(MAKE) -f Makefile $(UNITTEST_TARGETS)
@@ -1888,16 +1890,24 @@ unittest unittests: $(UNITTEST_TARGETS)
done
# Run individual test, assuming that Vim was already compiled.
test1 test2 test3 test4 test5 test6 test7 test8 test9 \
test1 \
test_argument_count \
test_autoformat_join \
test_breakindent \
test_changelist \
test_close_count \
test_command_count \
test_eval \
test_insertcount \
test_listlbr \
test_listlbr_utf8 \
test_mapping \
test_options \
test_qf_title \
test_signs \
test_utf8 \
test_writefile \
test2 test3 test4 test5 test6 test7 test8 test9 \
test10 test11 test12 test13 test14 test15 test16 test17 test18 test19 \
test20 test21 test22 test23 test24 test25 test26 test27 test28 test29 \
test30 test31 test32 test33 test34 test35 test36 test37 test38 test39 \

12
src/auto/configure vendored
View File

@@ -5728,6 +5728,10 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_pythoninterp" >&5
$as_echo "$enable_pythoninterp" >&6; }
if test "$enable_pythoninterp" = "yes" -o "$enable_pythoninterp" = "dynamic"; then
if test "x$features" = "xtiny" -o "x$features" = "xsmall"; then
as_fn_error $? "cannot use Python with tiny or small features" "$LINENO" 5
fi
for ac_prog in python2 python
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -6044,6 +6048,10 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_python3interp" >&5
$as_echo "$enable_python3interp" >&6; }
if test "$enable_python3interp" = "yes" -o "$enable_python3interp" = "dynamic"; then
if test "x$features" = "xtiny" -o "x$features" = "xsmall"; then
as_fn_error $? "cannot use Python with tiny or small features" "$LINENO" 5
fi
for ac_prog in python3 python
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -6929,6 +6937,10 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_rubyinterp" >&5
$as_echo "$enable_rubyinterp" >&6; }
if test "$enable_rubyinterp" = "yes" -o "$enable_rubyinterp" = "dynamic"; then
if test "x$features" = "xtiny" -o "x$features" = "xsmall"; then
as_fn_error $? "cannot use Ruby with tiny or small features" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-ruby-command argument" >&5
$as_echo_n "checking --with-ruby-command argument... " >&6; }

View File

@@ -28,9 +28,9 @@
#include "vim.h"
#if defined(FEAT_CMDL_COMPL) || defined(FEAT_LISTCMDS) || defined(FEAT_EVAL) || defined(FEAT_PERL)
static char_u *buflist_match __ARGS((regprog_T *prog, buf_T *buf, int ignore_case));
static char_u *buflist_match __ARGS((regmatch_T *rmp, buf_T *buf, int ignore_case));
# define HAVE_BUFLIST_MATCH
static char_u *fname_match __ARGS((regprog_T *prog, char_u *name, int ignore_case));
static char_u *fname_match __ARGS((regmatch_T *rmp, char_u *name, int ignore_case));
#endif
static void buflist_setfpos __ARGS((buf_T *buf, win_T *win, linenr_T lnum, colnr_T col, int copy_options));
static wininfo_T *find_wininfo __ARGS((buf_T *buf, int skip_diff_buffer));
@@ -2220,7 +2220,6 @@ buflist_findpat(pattern, pattern_end, unlisted, diffmode, curtab_only)
int curtab_only; /* find buffers in current tab only */
{
buf_T *buf;
regprog_T *prog;
int match = -1;
int find_listed;
char_u *pat;
@@ -2265,14 +2264,16 @@ buflist_findpat(pattern, pattern_end, unlisted, diffmode, curtab_only)
{
for (attempt = 0; attempt <= 3; ++attempt)
{
regmatch_T regmatch;
/* may add '^' and '$' */
if (toggledollar)
*patend = (attempt < 2) ? NUL : '$'; /* add/remove '$' */
p = pat;
if (*p == '^' && !(attempt & 1)) /* add/remove '^' */
++p;
prog = vim_regcomp(p, p_magic ? RE_MAGIC : 0);
if (prog == NULL)
regmatch.regprog = vim_regcomp(p, p_magic ? RE_MAGIC : 0);
if (regmatch.regprog == NULL)
{
vim_free(pat);
return -1;
@@ -2283,7 +2284,7 @@ buflist_findpat(pattern, pattern_end, unlisted, diffmode, curtab_only)
#ifdef FEAT_DIFF
&& (!diffmode || diff_mode_buf(buf))
#endif
&& buflist_match(prog, buf, FALSE) != NULL)
&& buflist_match(&regmatch, buf, FALSE) != NULL)
{
if (curtab_only)
{
@@ -2310,7 +2311,7 @@ buflist_findpat(pattern, pattern_end, unlisted, diffmode, curtab_only)
match = buf->b_fnum; /* remember first match */
}
vim_regfree(prog);
vim_regfree(regmatch.regprog);
if (match >= 0) /* found one match */
break;
}
@@ -2352,7 +2353,6 @@ ExpandBufnames(pat, num_file, file, options)
int round;
char_u *p;
int attempt;
regprog_T *prog;
char_u *patc;
*num_file = 0; /* return values in case of FAIL */
@@ -2376,10 +2376,12 @@ ExpandBufnames(pat, num_file, file, options)
*/
for (attempt = 0; attempt <= 1; ++attempt)
{
regmatch_T regmatch;
if (attempt > 0 && patc == pat)
break; /* there was no anchor, no need to try again */
prog = vim_regcomp(patc + attempt * 11, RE_MAGIC);
if (prog == NULL)
regmatch.regprog = vim_regcomp(patc + attempt * 11, RE_MAGIC);
if (regmatch.regprog == NULL)
{
if (patc != pat)
vim_free(patc);
@@ -2397,7 +2399,7 @@ ExpandBufnames(pat, num_file, file, options)
{
if (!buf->b_p_bl) /* skip unlisted buffers */
continue;
p = buflist_match(prog, buf, p_wic);
p = buflist_match(&regmatch, buf, p_wic);
if (p != NULL)
{
if (round == 1)
@@ -2419,14 +2421,14 @@ ExpandBufnames(pat, num_file, file, options)
*file = (char_u **)alloc((unsigned)(count * sizeof(char_u *)));
if (*file == NULL)
{
vim_regfree(prog);
vim_regfree(regmatch.regprog);
if (patc != pat)
vim_free(patc);
return FAIL;
}
}
}
vim_regfree(prog);
vim_regfree(regmatch.regprog);
if (count) /* match(es) found, break here */
break;
}
@@ -2445,17 +2447,17 @@ ExpandBufnames(pat, num_file, file, options)
* Check for a match on the file name for buffer "buf" with regprog "prog".
*/
static char_u *
buflist_match(prog, buf, ignore_case)
regprog_T *prog;
buflist_match(rmp, buf, ignore_case)
regmatch_T *rmp;
buf_T *buf;
int ignore_case; /* when TRUE ignore case, when FALSE use 'fic' */
{
char_u *match;
/* First try the short file name, then the long file name. */
match = fname_match(prog, buf->b_sfname, ignore_case);
match = fname_match(rmp, buf->b_sfname, ignore_case);
if (match == NULL)
match = fname_match(prog, buf->b_ffname, ignore_case);
match = fname_match(rmp, buf->b_ffname, ignore_case);
return match;
}
@@ -2465,27 +2467,25 @@ buflist_match(prog, buf, ignore_case)
* Return "name" when there is a match, NULL when not.
*/
static char_u *
fname_match(prog, name, ignore_case)
regprog_T *prog;
fname_match(rmp, name, ignore_case)
regmatch_T *rmp;
char_u *name;
int ignore_case; /* when TRUE ignore case, when FALSE use 'fic' */
{
char_u *match = NULL;
char_u *p;
regmatch_T regmatch;
if (name != NULL)
{
regmatch.regprog = prog;
/* Ignore case when 'fileignorecase' or the argument is set. */
regmatch.rm_ic = p_fic || ignore_case;
if (vim_regexec(&regmatch, name, (colnr_T)0))
rmp->rm_ic = p_fic || ignore_case;
if (vim_regexec(rmp, name, (colnr_T)0))
match = name;
else
{
/* Replace $(HOME) with '~' and try matching again. */
p = home_replace_save(NULL, name);
if (p != NULL && vim_regexec(&regmatch, p, (colnr_T)0))
if (p != NULL && vim_regexec(rmp, p, (colnr_T)0))
match = name;
vim_free(p);
}
@@ -4409,6 +4409,8 @@ get_rel_pos(wp, buf, buflen)
long above; /* number of lines above window */
long below; /* number of lines below window */
if (buflen < 3) /* need at least 3 chars for writing */
return;
above = wp->w_topline - 1;
#ifdef FEAT_DIFF
above += diff_check_fill(wp, wp->w_topline) - wp->w_topfill;

View File

@@ -1178,26 +1178,50 @@ win_lbr_chartabsize(wp, line, s, col, headp)
added = 0;
if ((*p_sbr != NUL || wp->w_p_bri) && wp->w_p_wrap && col != 0)
{
numberextra = win_col_off(wp);
colnr_T sbrlen = 0;
int numberwidth = win_col_off(wp);
numberextra = numberwidth;
col += numberextra + mb_added;
if (col >= (colnr_T)W_WIDTH(wp))
{
col -= W_WIDTH(wp);
numberextra = W_WIDTH(wp) - (numberextra - win_col_off2(wp));
if (col >= numberextra && numberextra > 0)
col %= numberextra;
if (*p_sbr != NUL)
{
colnr_T sbrlen = (colnr_T)MB_CHARLEN(p_sbr);
sbrlen = (colnr_T)MB_CHARLEN(p_sbr);
if (col >= sbrlen)
col -= sbrlen;
}
if (numberextra > 0)
if (col >= numberextra && numberextra > 0)
col = col % numberextra;
else if (col > 0 && numberextra > 0)
col += numberwidth - win_col_off2(wp);
numberwidth -= win_col_off2(wp);
}
if (col == 0 || col + size > (colnr_T)W_WIDTH(wp))
if (col == 0 || col + size + sbrlen > (colnr_T)W_WIDTH(wp))
{
added = 0;
if (*p_sbr != NUL)
added += vim_strsize(p_sbr);
{
if (size + sbrlen + numberwidth > (colnr_T)W_WIDTH(wp))
{
/* calculate effective window width */
int width = (colnr_T)W_WIDTH(wp) - sbrlen - numberwidth;
int prev_width = col ? ((colnr_T)W_WIDTH(wp) - (sbrlen + col)) : 0;
if (width == 0)
width = (colnr_T)W_WIDTH(wp);
added += ((size - prev_width) / width) * vim_strsize(p_sbr);
if ((size - prev_width) % width)
/* wrapped, add another length of 'sbr' */
added += vim_strsize(p_sbr);
}
else
added += vim_strsize(p_sbr);
}
if (wp->w_p_bri)
added += get_breakindent_win(wp, line);

View File

@@ -1041,6 +1041,10 @@ AC_ARG_ENABLE(pythoninterp,
[enable_pythoninterp="no"])
AC_MSG_RESULT($enable_pythoninterp)
if test "$enable_pythoninterp" = "yes" -o "$enable_pythoninterp" = "dynamic"; then
if test "x$features" = "xtiny" -o "x$features" = "xsmall"; then
AC_MSG_ERROR([cannot use Python with tiny or small features])
fi
dnl -- find the python executable
AC_PATH_PROGS(vi_cv_path_python, python2 python)
if test "X$vi_cv_path_python" != "X"; then
@@ -1243,6 +1247,10 @@ AC_ARG_ENABLE(python3interp,
[enable_python3interp="no"])
AC_MSG_RESULT($enable_python3interp)
if test "$enable_python3interp" = "yes" -o "$enable_python3interp" = "dynamic"; then
if test "x$features" = "xtiny" -o "x$features" = "xsmall"; then
AC_MSG_ERROR([cannot use Python with tiny or small features])
fi
dnl -- find the python3 executable
AC_PATH_PROGS(vi_cv_path_python3, python3 python)
if test "X$vi_cv_path_python3" != "X"; then
@@ -1720,6 +1728,10 @@ AC_ARG_ENABLE(rubyinterp,
[enable_rubyinterp="no"])
AC_MSG_RESULT($enable_rubyinterp)
if test "$enable_rubyinterp" = "yes" -o "$enable_rubyinterp" = "dynamic"; then
if test "x$features" = "xtiny" -o "x$features" = "xsmall"; then
AC_MSG_ERROR([cannot use Ruby with tiny or small features])
fi
AC_MSG_CHECKING(--with-ruby-command argument)
AC_SUBST(vi_cv_path_ruby)
AC_ARG_WITH(ruby-command, [ --with-ruby-command=RUBY name of the Ruby command (default: ruby)],

View File

@@ -503,6 +503,26 @@ crypt_free_key(key)
}
}
/*
* Check the crypt method and give a warning if it's outdated.
*/
void
crypt_check_method(method)
int method;
{
if (method < CRYPT_M_BF2)
{
msg_scroll = TRUE;
MSG(_("Warning: Using a weak encryption method; see :help 'cm'"));
}
}
void
crypt_check_current_method()
{
crypt_check_method(crypt_get_method_nr(curbuf));
}
/*
* Ask the user for a crypt key.
* When "store" is TRUE, the new key is stored in the 'key' option, and the

View File

@@ -2107,12 +2107,20 @@ diff_infold(wp, lnum)
* "dp" and "do" commands.
*/
void
nv_diffgetput(put)
nv_diffgetput(put, count)
int put;
long count;
{
exarg_T ea;
char_u buf[30];
ea.arg = (char_u *)"";
if (count == 0)
ea.arg = (char_u *)"";
else
{
vim_snprintf((char *)buf, 30, "%ld", count);
ea.arg = buf;
}
if (put)
ea.cmdidx = CMD_diffput;
else

View File

@@ -3394,7 +3394,7 @@ ins_compl_bs()
* allow the word to be deleted, we won't match everything. */
if ((int)(p - line) - (int)compl_col < 0
|| ((int)(p - line) - (int)compl_col == 0
&& (ctrl_x_mode & CTRL_X_OMNI) == 0))
&& ctrl_x_mode != CTRL_X_OMNI))
return K_BS;
/* Deleted more than what was used to find matches or didn't finish
@@ -6916,8 +6916,14 @@ stop_insert(end_insert_pos, esc, nomove)
}
if (curwin->w_cursor.lnum != tpos.lnum)
curwin->w_cursor = tpos;
else if (cc != NUL)
++curwin->w_cursor.col; /* put cursor back on the NUL */
else
{
/* reset tpos, could have been invalidated in the loop above */
tpos = curwin->w_cursor;
tpos.col++;
if (cc != NUL && gchar_pos(&tpos) == NUL)
++curwin->w_cursor.col; /* put cursor back on the NUL */
}
/* <C-S-Right> may have started Visual mode, adjust the position for
* deleted characters. */

View File

@@ -2951,7 +2951,7 @@ set_var_lval(lp, endp, rettv, copy, op)
/*
* Check whether any of the list items is locked
*/
for (ri = rettv->vval.v_list->lv_first; ri != NULL; )
for (ri = rettv->vval.v_list->lv_first; ri != NULL && ll_li != NULL; )
{
if (tv_check_lock(ll_li->li_tv.v_lock, lp->ll_name))
return;
@@ -3368,11 +3368,11 @@ set_context_for_expression(xp, arg, cmdidx)
got_eq = TRUE;
xp->xp_context = EXPAND_EXPRESSION;
}
else if (c == '<'
else if ((c == '<' || c == '#')
&& xp->xp_context == EXPAND_FUNCTIONS
&& vim_strchr(xp->xp_pattern, '(') == NULL)
{
/* Function name can start with "<SNR>" */
/* Function name can start with "<SNR>" and contain '#'. */
break;
}
else if (cmdidx != CMD_let || got_eq)
@@ -7867,7 +7867,7 @@ get_env_tv(arg, rettv, evaluate)
if (evaluate)
{
if (len == 0)
return FAIL; /* can't be an environment variable */
return FAIL; /* invalid empty name */
cc = name[len];
name[len] = NUL;
@@ -10117,14 +10117,18 @@ f_eval(argvars, rettv)
typval_T *argvars;
typval_T *rettv;
{
char_u *s;
char_u *s, *p;
s = get_tv_string_chk(&argvars[0]);
if (s != NULL)
s = skipwhite(s);
p = s;
if (s == NULL || eval1(&s, rettv, TRUE) == FAIL)
{
if (p != NULL && !aborting())
EMSG2(_(e_invexpr2), p);
need_clr_eos = FALSE;
rettv->v_type = VAR_NUMBER;
rettv->vval.v_number = 0;
}
@@ -10720,18 +10724,20 @@ filter_map(argvars, rettv, map)
{
if (!HASHITEM_EMPTY(hi))
{
int r;
--todo;
di = HI2DI(hi);
if (tv_check_lock(di->di_tv.v_lock,
(char_u *)_(arg_errmsg)))
break;
vimvars[VV_KEY].vv_str = vim_strsave(di->di_key);
if (filter_map_one(&di->di_tv, expr, map, &rem) == FAIL
|| did_emsg)
r = filter_map_one(&di->di_tv, expr, map, &rem);
clear_tv(&vimvars[VV_KEY].vv_tv);
if (r == FAIL || did_emsg)
break;
if (!map && rem)
dictitem_remove(d, di);
clear_tv(&vimvars[VV_KEY].vv_tv);
}
}
hash_unlock(ht);
@@ -10782,6 +10788,7 @@ filter_map_one(tv, expr, map, remp)
if (*s != NUL) /* check for trailing chars after expr */
{
EMSG2(_(e_invexpr2), s);
clear_tv(&rettv);
goto theend;
}
if (map)
@@ -11934,7 +11941,8 @@ getpos_both(argvars, rettv, getcurpos)
#endif
(varnumber_T)0);
if (getcurpos)
list_append_number(l, (varnumber_T)curwin->w_curswant + 1);
list_append_number(l, curwin->w_curswant == MAXCOL ?
(varnumber_T)MAXCOL : (varnumber_T)curwin->w_curswant + 1);
}
else
rettv->vval.v_number = FALSE;
@@ -12008,6 +12016,8 @@ f_getreg(argvars, rettv)
rettv->v_type = VAR_LIST;
rettv->vval.v_list = (list_T *)get_reg_contents(regname,
(arg2 ? GREG_EXPR_SRC : 0) | GREG_LIST);
if (rettv->vval.v_list != NULL)
++rettv->vval.v_list->lv_refcount;
}
else
{
@@ -19576,7 +19586,7 @@ f_winrestview(argvars, rettv)
# endif
changed_window_setting();
if (curwin->w_topline == 0)
if (curwin->w_topline <= 0)
curwin->w_topline = 1;
if (curwin->w_topline > curbuf->b_ml.ml_line_count)
curwin->w_topline = curbuf->b_ml.ml_line_count;
@@ -19689,6 +19699,7 @@ f_writefile(argvars, rettv)
typval_T *rettv;
{
int binary = FALSE;
int append = FALSE;
char_u *fname;
FILE *fd;
int ret = 0;
@@ -19704,14 +19715,19 @@ f_writefile(argvars, rettv)
if (argvars[0].vval.v_list == NULL)
return;
if (argvars[2].v_type != VAR_UNKNOWN
&& STRCMP(get_tv_string(&argvars[2]), "b") == 0)
binary = TRUE;
if (argvars[2].v_type != VAR_UNKNOWN)
{
if (vim_strchr(get_tv_string(&argvars[2]), 'b') != NULL)
binary = TRUE;
if (vim_strchr(get_tv_string(&argvars[2]), 'a') != NULL)
append = TRUE;
}
/* Always open the file in binary mode, library functions have a mind of
* their own about CR-LF conversion. */
fname = get_tv_string(&argvars[1]);
if (*fname == NUL || (fd = mch_fopen((char *)fname, WRITEBIN)) == NULL)
if (*fname == NUL || (fd = mch_fopen((char *)fname,
append ? APPENDBIN : WRITEBIN)) == NULL)
{
EMSG2(_(e_notcreate), *fname == NUL ? (char_u *)_("<empty>") : fname);
ret = -1;
@@ -22272,14 +22288,11 @@ ex_function(eap)
if (*p == '!')
p = skipwhite(p + 1);
p += eval_fname_script(p);
if (ASCII_ISALPHA(*p))
vim_free(trans_function_name(&p, TRUE, 0, NULL));
if (*skipwhite(p) == '(')
{
vim_free(trans_function_name(&p, TRUE, 0, NULL));
if (*skipwhite(p) == '(')
{
++nesting;
indent += 2;
}
++nesting;
indent += 2;
}
}
@@ -24754,7 +24767,7 @@ repeat:
p = alloc(_MAX_PATH + 1);
if (p != NULL)
{
if (GetLongPathName(*fnamep, p, MAXPATHL))
if (GetLongPathName(*fnamep, p, _MAX_PATH))
{
vim_free(*bufp);
*bufp = *fnamep = p;
@@ -25076,6 +25089,7 @@ do_string_sub(str, pat, sub, flags)
int i;
int do_all;
char_u *tail;
char_u *end;
garray_T ga;
char_u *ret;
char_u *save_cpo;
@@ -25094,6 +25108,7 @@ do_string_sub(str, pat, sub, flags)
if (regmatch.regprog != NULL)
{
tail = str;
end = str + STRLEN(str);
while (vim_regexec_nl(&regmatch, str, (colnr_T)(tail - str)))
{
/* Skip empty match except for first match. */
@@ -25120,7 +25135,7 @@ do_string_sub(str, pat, sub, flags)
* - The text after the match.
*/
sublen = vim_regsub(&regmatch, sub, tail, FALSE, TRUE, FALSE);
if (ga_grow(&ga, (int)(STRLEN(tail) + sublen -
if (ga_grow(&ga, (int)((end - tail) + sublen -
(regmatch.endp[0] - regmatch.startp[0]))) == FAIL)
{
ga_clear(&ga);

View File

@@ -34,6 +34,7 @@ static int
_RTLENTRYF
#endif
help_compare __ARGS((const void *s1, const void *s2));
static void prepare_help_buffer __ARGS((void));
/*
* ":ascii" and "ga".
@@ -3528,74 +3529,25 @@ do_ecmd(fnum, ffname, sfname, eap, newlnum, flags, oldwin)
#endif
check_fname() == FAIL)
goto theend;
/* ":e foobar" when already editing "foobar" will reload the file.
* But when 'buftype' is "nofile" there is no file to load, so don't
* do anything. */
if (curbuf->b_p_bt[0] == 'n' && curbuf->b_p_bt[2] == 'f')
goto theend;
oldbuf = (flags & ECMD_OLDBUF);
}
#ifdef FEAT_AUTOCMD
buf = curbuf;
#endif
if ((flags & ECMD_SET_HELP) || keep_help_flag)
{
char_u *p;
curbuf->b_help = TRUE;
#ifdef FEAT_QUICKFIX
set_string_option_direct((char_u *)"buftype", -1,
(char_u *)"help", OPT_FREE|OPT_LOCAL, 0);
#endif
/*
* Always set these options after jumping to a help tag, because the
* user may have an autocommand that gets in the way.
* Accept all ASCII chars for keywords, except ' ', '*', '"', '|', and
* latin1 word characters (for translated help files).
* Only set it when needed, buf_init_chartab() is some work.
*/
p =
#ifdef EBCDIC
(char_u *)"65-255,^*,^|,^\"";
#else
(char_u *)"!-~,^*,^|,^\",192-255";
#endif
if (STRCMP(curbuf->b_p_isk, p) != 0)
{
set_string_option_direct((char_u *)"isk", -1, p,
OPT_FREE|OPT_LOCAL, 0);
check_buf_options(curbuf);
(void)buf_init_chartab(curbuf, FALSE);
}
curbuf->b_p_ts = 8; /* 'tabstop' is 8 */
curwin->w_p_list = FALSE; /* no list mode */
curbuf->b_p_ma = FALSE; /* not modifiable */
curbuf->b_p_bin = FALSE; /* reset 'bin' before reading file */
curwin->w_p_nu = 0; /* no line numbers */
curwin->w_p_rnu = 0; /* no relative line numbers */
RESET_BINDING(curwin); /* no scroll or cursor binding */
#ifdef FEAT_ARABIC
curwin->w_p_arab = FALSE; /* no arabic mode */
#endif
#ifdef FEAT_RIGHTLEFT
curwin->w_p_rl = FALSE; /* help window is left-to-right */
#endif
#ifdef FEAT_FOLDING
curwin->w_p_fen = FALSE; /* No folding in the help window */
#endif
#ifdef FEAT_DIFF
curwin->w_p_diff = FALSE; /* No 'diff' */
#endif
#ifdef FEAT_SPELL
curwin->w_p_spell = FALSE; /* No spell checking */
#endif
#ifdef FEAT_AUTOCMD
buf = curbuf;
#endif
set_buflisted(FALSE);
prepare_help_buffer();
}
else
{
#ifdef FEAT_AUTOCMD
buf = curbuf;
#endif
/* Don't make a buffer listed if it's a help buffer. Useful when
* using CTRL-O to go back to a help file. */
if (!curbuf->b_help)
@@ -4463,6 +4415,8 @@ do_sub(eap)
&& (*cmd == NUL || (cmd[1] == NUL && (*cmd == 'g' || *cmd == 'l'
|| *cmd == 'p' || *cmd == '#'))))
{
linenr_T joined_lines_count;
curwin->w_cursor.lnum = eap->line1;
if (*cmd == 'l')
eap->flags = EXFLAG_LIST;
@@ -4471,10 +4425,27 @@ do_sub(eap)
else if (*cmd == 'p')
eap->flags = EXFLAG_PRINT;
(void)do_join(eap->line2 - eap->line1 + 1, FALSE, TRUE, FALSE, TRUE);
sub_nlines = sub_nsubs = eap->line2 - eap->line1 + 1;
(void)do_sub_msg(FALSE);
ex_may_print(eap);
/* The number of lines joined is the number of lines in the range plus
* one. One less when the last line is included. */
joined_lines_count = eap->line2 - eap->line1 + 1;
if (eap->line2 < curbuf->b_ml.ml_line_count)
++joined_lines_count;
if (joined_lines_count > 1)
{
(void)do_join(joined_lines_count, FALSE, TRUE, FALSE, TRUE);
sub_nsubs = joined_lines_count - 1;
sub_nlines = 1;
(void)do_sub_msg(FALSE);
ex_may_print(eap);
}
if (!cmdmod.keeppatterns)
save_re_pat(RE_SUBST, pat, p_magic);
#ifdef FEAT_CMDHIST
/* put pattern in history */
add_to_history(HIST_SEARCH, pat, TRUE, NUL);
#endif
return;
}
@@ -6221,6 +6192,73 @@ find_help_tags(arg, num_matches, matches, keep_lang)
return OK;
}
/*
* Called when starting to edit a buffer for a help file.
*/
static void
prepare_help_buffer()
{
char_u *p;
curbuf->b_help = TRUE;
#ifdef FEAT_QUICKFIX
set_string_option_direct((char_u *)"buftype", -1,
(char_u *)"help", OPT_FREE|OPT_LOCAL, 0);
#endif
/*
* Always set these options after jumping to a help tag, because the
* user may have an autocommand that gets in the way.
* Accept all ASCII chars for keywords, except ' ', '*', '"', '|', and
* latin1 word characters (for translated help files).
* Only set it when needed, buf_init_chartab() is some work.
*/
p =
#ifdef EBCDIC
(char_u *)"65-255,^*,^|,^\"";
#else
(char_u *)"!-~,^*,^|,^\",192-255";
#endif
if (STRCMP(curbuf->b_p_isk, p) != 0)
{
set_string_option_direct((char_u *)"isk", -1, p, OPT_FREE|OPT_LOCAL, 0);
check_buf_options(curbuf);
(void)buf_init_chartab(curbuf, FALSE);
}
#ifdef FEAT_FOLDING
/* Don't use the global foldmethod.*/
set_string_option_direct((char_u *)"fdm", -1, (char_u *)"manual",
OPT_FREE|OPT_LOCAL, 0);
#endif
curbuf->b_p_ts = 8; /* 'tabstop' is 8 */
curwin->w_p_list = FALSE; /* no list mode */
curbuf->b_p_ma = FALSE; /* not modifiable */
curbuf->b_p_bin = FALSE; /* reset 'bin' before reading file */
curwin->w_p_nu = 0; /* no line numbers */
curwin->w_p_rnu = 0; /* no relative line numbers */
RESET_BINDING(curwin); /* no scroll or cursor binding */
#ifdef FEAT_ARABIC
curwin->w_p_arab = FALSE; /* no arabic mode */
#endif
#ifdef FEAT_RIGHTLEFT
curwin->w_p_rl = FALSE; /* help window is left-to-right */
#endif
#ifdef FEAT_FOLDING
curwin->w_p_fen = FALSE; /* No folding in the help window */
#endif
#ifdef FEAT_DIFF
curwin->w_p_diff = FALSE; /* No 'diff' */
#endif
#ifdef FEAT_SPELL
curwin->w_p_spell = FALSE; /* No spell checking */
#endif
set_buflisted(FALSE);
}
/*
* After reading a help file: May cleanup a help buffer when syntax
* highlighting is not used.

File diff suppressed because it is too large Load Diff

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