Compare commits

...

269 Commits

Author SHA1 Message Date
Bram Moolenaar
0588d4f9d2 patch 7.4.2139
Problem:    :delfunction causes illegal memory access.
Solution:   Correct logic when deciding to free a function.
2016-08-01 16:29:47 +02:00
Bram Moolenaar
2d3d60a7d4 patch 7.4.2138
Problem:    Test 86 and 87 fail.
Solution:   Call func_ref() also for regular functions.
2016-08-01 16:27:23 +02:00
Bram Moolenaar
437bafe4c8 patch 7.4.2137
Problem:    Using function() with a name will find another function when it is
            redefined.
Solution:   Add funcref().  Refer to lambda using a partial.  Fix several
            reference counting issues.
2016-08-01 15:40:54 +02:00
Bram Moolenaar
5801644819 patch 7.4.2136
Problem:    Closure function fails.
Solution:   Don't reset uf_scoped when it points to another funccal.
2016-07-31 18:30:22 +02:00
Bram Moolenaar
89eaa4185e patch 7.4.2135
Problem:    Various tiny issues.
Solution:   Update comments, white space, etc.
2016-07-31 14:17:27 +02:00
Bram Moolenaar
b54c3ff317 patch 7.4.2134
Problem:    No error for using function() badly.
Solution:   Check for passing wrong function name. (Ken Takata)
2016-07-31 14:11:58 +02:00
Bram Moolenaar
fc1f2015e8 patch 7.4.2133
Problem:    Can't build with tiny features.
Solution:   Add #ifdef.
2016-07-30 23:18:47 +02:00
Bram Moolenaar
31440a1f2b patch 7.4.2132
Problem:    test_partial has memory leaks reported.
Solution:   Add a note about why this happens.
2016-07-30 23:14:28 +02:00
Bram Moolenaar
57e69ff2cc patch 7.4.2131
Problem:    More memory leaks when using partial, e.g. for "exit-cb".
Solution:   Don't copy the callback when using a partial.
2016-07-30 23:05:09 +02:00
Bram Moolenaar
623e263ffb patch 7.4.2130
Problem:    Pending timers cause false memory leak reports.
Solution:   Free all timers on exit.
2016-07-30 22:47:56 +02:00
Bram Moolenaar
3ab14355ed patch 7.4.2129
Problem:    Memory leak when using timer_start(). (Dominique Pelle)
Solution:   Don't copy the callback when using a partial.
2016-07-30 22:32:11 +02:00
Bram Moolenaar
1e2258297b patch 7.4.2128
Problem:    Memory leak when saving for undo fails.
Solution:   Free allocated memory. (Hirohito Higashi)
2016-07-30 21:48:59 +02:00
Bram Moolenaar
3bcfca3ab4 patch 7.4.2127
Problem:    The short form of ":noswapfile" is ":noswap" instead of ":now".
            (Kent Sibilev)
Solution:   Only require three characters.  Add a test for the short forms.
2016-07-30 19:39:29 +02:00
Bram Moolenaar
90d121fa36 patch 7.4.2126
Problem:    No tests for :diffget and :diffput
Solution:   Add tests.
2016-07-30 19:11:25 +02:00
Bram Moolenaar
b20617b0b0 Add OSX build to Travis CI. (Christian Brabandt) 2016-07-30 17:41:49 +02:00
Bram Moolenaar
a5c0cc1133 patch 7.4.2125
Problem:    Compiler warning for loss of data.
Solution:   Add a type cast. (Christian Brabandt)
2016-07-30 16:40:39 +02:00
Bram Moolenaar
623cf88f9c patch 7.4.2124
Problem:    diffmode test leaves files behind, breaking another test.
Solution:   Delete the files.
2016-07-30 16:36:01 +02:00
Bram Moolenaar
42093c0ec5 patch 7.4.2123
Problem:    No new style test for diff mode.
Solution:   Add a test.  Check that folds are in sync.
2016-07-30 16:16:54 +02:00
Bram Moolenaar
b822cb0f93 patch 7.4.2122
Problem:    Mac: don't get +clipboard in huge build.
Solution:   Move #define down below including featureh.h
2016-07-30 14:12:23 +02:00
Bram Moolenaar
9532fe7fbe patch 7.4.2121
Problem:    No easy way to check if lambda and closure are supported.
Solution:   Add the +lambda feature.
2016-07-29 22:50:35 +02:00
Bram Moolenaar
10ce39a0d5 patch 7.4.2120
Problem:    User defined functions can't be a closure.
Solution:   Add the "closure" argument. Allow using :unlet on a bound
            variable. (Yasuhiro Matsumoto, Ken Takata)
2016-07-29 22:37:06 +02:00
Bram Moolenaar
1e96d9bf98 patch 7.4.2119
Problem:    Closures are not supported.
Solution:   Capture variables in lambdas from the outer scope. (Yasuhiro
            Matsumoto, Ken Takata)
2016-07-29 22:15:09 +02:00
Bram Moolenaar
83a2a80d6f patch 7.4.2118
Problem:    Mac: can't build with tiny features.
Solution:   Don't define FEAT_CLIPBOARD unconditionally. (Kazunobu Kuriyama)
2016-07-29 21:01:10 +02:00
Bram Moolenaar
f2c4c39119 patch 7.4.2117
Problem:    Deleting an augroup that still has autocmds does not give a
            warning.  The next defined augroup takes its place.
Solution:   Give a warning and prevent the index being used for another group
            name.
2016-07-29 20:50:24 +02:00
Bram Moolenaar
c73e4474b1 patch 7.4.2116
Problem:    The default vimrc for Windows is very conservative.
Solution:   Use the defaults.vim in the Windows installer.
2016-07-29 18:33:38 +02:00
Bram Moolenaar
b9a46fec3e patch 7.4.2115
Problem:    Loading defaults.vim with -C argument.
Solution:   Don't load the defaults script with -C argument.  Test sourcing
            the defaults script.  Set 'display' to "truncate".
2016-07-29 18:13:42 +02:00
Bram Moolenaar
d05b191b91 patch 7.4.2114
Problem:    Tiny build fails.
Solution:   Always include vim_time().
2016-07-29 17:03:54 +02:00
Bram Moolenaar
170b10b421 patch 7.4.2113
Problem:    Test for undo is flaky.
Solution:   Turn it into a new style test.  Use test_settime() to avoid
            flakyness.
2016-07-29 16:15:27 +02:00
Bram Moolenaar
b56195ed00 patch 7.4.2112
Problem:    getcompletion(.., 'dir') returns a match with trailing "*" when
            there are no matches. (Chdiza)
Solution:   Return an empty list when there are no matches.  Add a trailing
            slash to directories. (Yegappan Lakshmanan)  Add tests for no
            matches. (closes #947)
2016-07-28 22:53:37 +02:00
Bram Moolenaar
471a897569 Update gitignore for new test binary. (Oyvind Holm, closes #954) 2016-07-28 22:36:37 +02:00
Bram Moolenaar
8c08b5b569 patch 7.4.2111
Problem:    Defaults are very conservative.
Solution:   Move settings from vimrc_example.vim to defaults.vim.  Load
            defaults.vim if no .vimrc was found.
2016-07-28 22:24:15 +02:00
Bram Moolenaar
eac784eced patch 7.4.2110
Problem:    When there is an CmdUndefined autocmd then the error for a missing
            command is E464 instead of E492. (Manuel Ortega)
Solution:   Don't let the pointer be NULL.
2016-07-28 22:08:24 +02:00
Bram Moolenaar
ad9c2a08f0 patch 7.4.2109
Problem:    Setting 'display' to "lastline" is a drastic change, while
            omitting it results in lots of "@" lines.
Solution:   Add "truncate" to show "@@@" for a truncated line.
2016-07-27 23:26:04 +02:00
Bram Moolenaar
adfc5c2f9c patch 7.4.2108
Problem:    Netbeans test is flaky.
Solution:   Wait for the cursor to be positioned.
2016-07-27 22:56:48 +02:00
Bram Moolenaar
d955a0971c patch 7.4.2107
Problem:    Misplaced equal sign.
Solution:   Remove it.
2016-07-26 22:14:09 +02:00
Bram Moolenaar
ac77aec4da patch 7.4.2106
Problem:    Clang warns about missing field in initializer.
Solution:   Define COMMA and use it.  (Kazunobu Kuriyama)
2016-07-26 22:02:54 +02:00
Bram Moolenaar
eec2981bbe patch 7.4.2105
Problem:    Configure reports default features to be "normal" while it is
            "huge".
Solution:   Change the default text.
2016-07-26 21:27:36 +02:00
Bram Moolenaar
97baee80f0 patch 7.4.2104
Problem:    Code duplication when unreferencing a function.
Solution:   De-duplicate.
2016-07-26 20:46:08 +02:00
Bram Moolenaar
e99e84497b patch 7.4.2103
Problem:    Can't have "augroup END" right after ":au!".
Solution:   Check for the bar character before the command argument.
2016-07-26 20:43:40 +02:00
Bram Moolenaar
45a249513f patch 7.4.2102
Problem:    Tiny build with GUI fails.
Solution:   Revert one FOR_ALL_ change.
2016-07-24 22:25:15 +02:00
Bram Moolenaar
2932359000 patch 7.4.2101
Problem:    Looping over windows, buffers and tab pages is inconsistant.
Solution:   Use FOR_ALL_ macros everywhere. (Yegappan Lakshmanan)
2016-07-24 22:04:11 +02:00
Bram Moolenaar
6835dc61ae patch 7.4.2100
Problem:    "cgn" and "dgn" do not work correctly with a single character
            match and the replacement includes the searched pattern. (John
            Beckett)
Solution:   If the match is found in the wrong column try in the next column.
            Turn the test into new style. (Christian Brabandt)
2016-07-24 17:33:05 +02:00
Bram Moolenaar
73ac0c4281 patch 7.4.2099
Problem:    When a keymap is active only "(lang)" is displayed. (Ilya
            Dogolazky)
Solution:   Show the keymap name. (Dmitri Vereshchagin, closes #933)
2016-07-24 16:17:59 +02:00
Bram Moolenaar
6f1d9a096b Updated runtime files. 2016-07-24 14:12:38 +02:00
Bram Moolenaar
00b24be454 patch 7.4.2098
Problem:    Text object tests are old style.
Solution:   Turn them into new style tests. (James McCoy, closes #941)
2016-07-23 22:04:47 +02:00
Bram Moolenaar
d4f31dc454 patch 7.4.2097
Problem:    Warning from 64 bit compiler.
Solution:   use size_t instead of int. (Mike Williams)
2016-07-23 17:28:22 +02:00
Bram Moolenaar
b49edc11a1 patch 7.4.2096
Problem:    Lambda functions show up with completion.
Solution:   Don't show lambda functions. (Ken Takata)
2016-07-23 15:47:34 +02:00
Bram Moolenaar
61c04493b0 patch 7.4.2095
Problem:    Man test fails when run with the GUI.
Solution:   Adjust for different behavior of GUI.  Add assert_inrange().
2016-07-23 15:35:35 +02:00
Bram Moolenaar
4658228262 patch 7.4.2094
Problem:    The color allocation in X11 is overly complicated.
Solution:   Remove find_closest_color(), XAllocColor() already does this.
            (Kazunobu Kuriyama)
2016-07-23 14:35:12 +02:00
Bram Moolenaar
a58c58b7e1 patch 7.4.2093
Problem:    Netbeans test fails once in a while.  Leaving log file behind.
Solution:   Add it to the list of flaky tests.  Disable logfile.
2016-07-23 14:01:15 +02:00
Bram Moolenaar
870b749ce1 patch 7.4.2092
Problem:    GTK 3 build fails with older GTK version.
Solution:   Check the pango version. (Kazunobu Kuriyama)
2016-07-22 22:26:52 +02:00
Bram Moolenaar
2e45d21c81 patch 7.4.2091
Problem:    Coverity reports a resource leak when out of memory.
Solution:   Close the file before returning.
2016-07-22 22:12:38 +02:00
Bram Moolenaar
df48fb456f patch 7.4.2090
Problem:    Using submatch() in a lambda passed to substitute() is verbose.
Solution:   Use a static list and pass it as an optional argument to the
            function.  Fix memory leak.
2016-07-22 21:50:18 +02:00
Bram Moolenaar
36edf0685c patch 7.4.2089
Problem:    Color handling of X11 GUIs is too complicated.
Solution:   Simplify the code.  Use RGBA where appropriate. (Kazunobu
            Kuriyama)
2016-07-21 22:10:12 +02:00
Bram Moolenaar
f36213597d patch 7.4.2088
Problem:    Keymap test fails with normal features.
Solution:   Bail out if the keymap feature is not supported.
2016-07-21 22:03:02 +02:00
Bram Moolenaar
e25bc5abb4 patch 7.4.2087
Problem:    Digraph code test coverage is still low.
Solution:   Add more tests. (Christian Brabandt)
2016-07-21 21:23:38 +02:00
Bram Moolenaar
ac105ed3c4 patch 7.4.2086
Problem:    Using the system default encoding makes tests unpredictable.
Solution:   Always use utf-8 or latin1 in the new style tests.  Remove setting
            encoding and scriptencoding where it is not needed.
2016-07-21 20:33:32 +02:00
Bram Moolenaar
dfd63e30d1 patch 7.4.2085
Problem:    Digraph tests fails on some systems.
Solution:   Run it separately and set 'encoding' early.
2016-07-21 10:11:03 +02:00
Bram Moolenaar
6008433381 patch 7.4.2084
Problem:    New digraph test makes testing hang.
Solution:   Don't set "nocp".
2016-07-20 22:23:49 +02:00
Bram Moolenaar
19df5cc04d patch 7.4.2083
Problem:    Coverity complains about not restoring a value.
Solution:   Restore the value, although it's not really needed.  Change return
            to jump to cleanup, might leak memory.
2016-07-20 22:11:06 +02:00
Bram Moolenaar
397eadbe25 patch 7.4.2082
Problem:    Not much test coverage for digraphs.
Solution:   Add a new style digraph test. (Christian Brabandt)
2016-07-20 22:01:12 +02:00
Bram Moolenaar
c1542744e7 patch 7.4.2081
Problem:    Line numbers in the error list are not always adjusted.
Solution:   Set b_has_qf_entry properly. (Yegappan Lakshmanan)
2016-07-20 21:44:37 +02:00
Bram Moolenaar
b869c0da31 patch 7.4.2080
Problem:    When using PERROR() on some systems assert_fails() does not see
            the error.
Solution:   Make PERROR() always report the error.
2016-07-20 00:10:51 +02:00
Bram Moolenaar
53bdec2ac9 patch 7.4.2079
Problem:    Netbeans test fails on non-Unix systems.
Solution:   Only do the permission check on Unix systems.
2016-07-20 00:03:18 +02:00
Bram Moolenaar
ca8942c6e3 patch 7.4.2078
Problem:    Running checks in po diretory fails.
Solution:   Add colors used in syntax.c to the builtiin color table.
2016-07-19 23:36:31 +02:00
Bram Moolenaar
12c11d5530 patch 7.4.2077
Problem:    Cannot update 'tabline' when a tab was closed.
Solution:   Add the TabClosed autocmd event. (partly by Felipe Morales)
2016-07-19 23:13:03 +02:00
Bram Moolenaar
4f0383bc3f patch 7.4.2076
Problem:    Syntax error when dict has '>' key.
Solution:   Check for endchar. (Ken Takata)
2016-07-19 22:43:11 +02:00
Bram Moolenaar
c917da4b3e patch 7.4.2075
Problem:    No autocommand event to initialize a window or tab page.
Solution:   Add WinNew and TabNew events. (partly by Felipe Morales)
2016-07-19 22:31:36 +02:00
Bram Moolenaar
0a0f641b98 patch 7.4.2074
Problem:    One more place using a dummy variable.
Solution:   Use offsetof(). (Ken Takata)
2016-07-19 21:30:13 +02:00
Bram Moolenaar
68015bbd84 patch 7.4.2073
Problem:    rgb.txt is read for every color name.
Solution:   Load rgb.txt once. (Christian Brabandt)  Add a test.
2016-07-19 21:05:21 +02:00
Bram Moolenaar
72ab729c3d patch 7.4.2072
Problem:    substitute() does not support a Funcref argument.
Solution:   Support a Funcref like it supports  a string starting with "\=".
2016-07-19 19:10:51 +02:00
Bram Moolenaar
f562e72df7 patch 7.4.2071
Problem:    The return value of type() is difficult to use.
Solution:   Define v:t_ constants. (Ken Takata)
2016-07-19 17:25:25 +02:00
Bram Moolenaar
6cfdb2a3ba patch 7.4.2070
Problem:    Missing change to include file.
Solution:   Include the spell header file.
2016-07-19 17:01:31 +02:00
Bram Moolenaar
9ccfebddc3 patch 7.4.2069
Problem:    spell.c is too big.
Solution:   Split it in spell file handling and spell checking.
2016-07-19 16:39:08 +02:00
Bram Moolenaar
b9644433d2 patch 7.4.2068
Problem:    Not all arguments of trunc_string() are tested.  Memory access
            error when running the message tests.
Solution:   Add another test case. (Yegappan Lakshmanan)  Make it easy to run
            unittests with valgrind.  Fix the access error.
2016-07-19 12:33:44 +02:00
Bram Moolenaar
16ec3c9be3 patch 7.4.2067
Problem:    Compiler warning for char/char_u conversion. (Tony Mechelynck)
            Inefficient code.
Solution:   Use more lines to fill with spaces. (Nikolai Pavlov) Add type cast.
2016-07-18 22:22:39 +02:00
Bram Moolenaar
c1fb763184 patch 7.4.2066
Problem:    getcompletion() not well tested.
Solution:   Add more testing.
2016-07-17 23:34:21 +02:00
Bram Moolenaar
69aa099641 patch 7.4.2065
Problem:    Compiler warns for uninitialzed variable. (John Marriott)
Solution:   Set lnum to the right value.
2016-07-17 22:33:53 +02:00
Bram Moolenaar
4f5c5f2980 patch 7.4.2064
Problem:    Coverity warns for possible buffer overflow.
Solution:   Use vim_strcat() instead of strcat().
2016-07-17 22:25:36 +02:00
Bram Moolenaar
73dad1e64c patch 7.4.2063
Problem:    eval.c is still too big.
Solution:   Split off internal functions to evalfunc.c.
2016-07-17 22:13:49 +02:00
Bram Moolenaar
840268400d patch 7.4.2062
Problem:    Using dummy variable to compute struct member offset.
Solution:   Use offsetof().
2016-07-17 20:37:43 +02:00
Bram Moolenaar
e87e6dddc2 patch 7.4.2061
Problem:    qf_init_ext() is too big.
Solution:   Move code to qf_parse_line() (Yegappan Lakshmanan)
2016-07-17 19:25:04 +02:00
Bram Moolenaar
a9093fe094 patch 7.4.2060
Problem:    Wrong file name.
Solution:   Fix typo.
2016-07-17 19:02:16 +02:00
Bram Moolenaar
6583c44857 patch 7.4.2059
Problem:    Non-Unix builds fail.
Solution:   Update Makefiles for new files.
2016-07-17 18:41:47 +02:00
Bram Moolenaar
a9b579f3d7 patch 7.4.2058
Problem:    eval.c is too big.
Solution:   Move user functions to userfunc.c
2016-07-17 18:29:19 +02:00
Bram Moolenaar
da861d631d patch 7.4.2057
Problem:    eval.c is too big.
Solution:   Move List functions to list.c
2016-07-17 15:46:27 +02:00
Bram Moolenaar
1abc52c159 patch 7.4.2056
Problem:    Build fails.
Solution:   Add missing changes.
2016-07-17 15:06:51 +02:00
Bram Moolenaar
cd52459c38 patch 7.4.2055
Problem:    eval.c is too big.
Solution:   Move Dictionary functions to dict.c.
2016-07-17 14:57:05 +02:00
Bram Moolenaar
42ebd06642 Update runtime files. 2016-07-17 13:35:14 +02:00
Bram Moolenaar
2cb70a2744 Put building with interfaces on the right target. 2016-07-16 21:58:01 +02:00
Bram Moolenaar
b2b050ab16 patch 7.4.2054
Problem:    Wrong part of #ifdef removed.
Solution:   Use the right part. (Hirohito Higashi)
2016-07-16 21:52:46 +02:00
Bram Moolenaar
87776a1ac1 Correct build condition. 2016-07-16 21:37:49 +02:00
Bram Moolenaar
8de7465d77 Add missing "then". 2016-07-16 21:24:36 +02:00
Bram Moolenaar
1a9f947cde Add a separate build target for the unittests. Hopefully the coverage will be merged then. 2016-07-16 21:18:34 +02:00
Bram Moolenaar
8211fcbdc9 Run unittests before scripttests. Hopefully does not mess up coverage. 2016-07-16 20:55:12 +02:00
Bram Moolenaar
e21d62435e patch 7.4.2053
Problem:    Can't run scripttests in the top directory.
Solution:   Add targets to the top Makefile.
2016-07-16 20:43:14 +02:00
Bram Moolenaar
c3e539fa70 patch 7.4.2052
Problem:    Coverage report is messed up by the unittests.
Solution:   Add a separate test target for script tests.  Use that when
            collecting coverage information.
2016-07-16 20:37:56 +02:00
Bram Moolenaar
502ae4ba63 patch 7.4.2051
Problem:    No proper testing of trunc_string().
Solution:   Add a unittest for message.c.
2016-07-16 19:50:13 +02:00
Bram Moolenaar
015102e91e patch 7.4.2050
Problem:    When using ":vimgrep" may end up with duplicate buffers.
Solution:   When adding an error list entry pass the buffer number if possible.
2016-07-16 18:24:56 +02:00
Bram Moolenaar
f6acffbe83 patch 7.4.2049
Problem:    There is no way to get a list of the error lists.
Solution:   Add ":chistory" and ":lhistory".
2016-07-16 16:54:24 +02:00
Bram Moolenaar
a06ecab7a5 patch 7.4.2048
Problem:    There is still code and help for unsupported systems.
Solution:   Remove the code and text. (Hirohito Higashi)
2016-07-16 14:47:36 +02:00
Bram Moolenaar
bfafb4c4a0 patch 7.4.2047
Problem:    Compiler warning for initializing a struct.
Solution:   Initialize in another way. (Anton Lindqvist)
2016-07-16 14:20:45 +02:00
Bram Moolenaar
269f595f9e Updated runtime files. 2016-07-15 22:54:41 +02:00
Bram Moolenaar
e0d3797664 patch 7.4.2046
Problem:    The qf_init_ext() function is too big.
Solution:   Refactor it. (Yegappan Lakshmanan)
2016-07-15 22:36:01 +02:00
Bram Moolenaar
5ef2e76284 patch 7.4.2045
Problem:    Memory leak when using a function callback.
Solution:   Don't save the function name when it's in the partial.
2016-07-15 21:29:35 +02:00
Bram Moolenaar
069c1e7fa9 patch 7.4.2044
Problem:    filter() and map() either require a string or defining a function.
Solution:   Support lambda, a short way to define a function that evaluates an
            expression. (Yasuhiro Matsumoto, Ken Takata)
2016-07-15 21:25:08 +02:00
Bram Moolenaar
93431df9eb patch 7.4.2043
Problem:    setbuvfar() causes a screen redraw.
Solution:   Only use aucmd_prepbuf() for options.
2016-07-15 20:14:44 +02:00
Bram Moolenaar
fdadad994a patch 7.4.2042
Problem:    GTK: display updating is not done properly and can be slow.
Solution:   Use gdk_display_flush() instead of gdk_display_sync(). Don't call
            gdk_window_process_updates().  (Kazunobu Kuriyama)
2016-07-15 17:49:58 +02:00
Bram Moolenaar
603d657219 patch 7.4.2041
Problem:    Netbeans file authentication not tested.
Solution:   Add a test.
2016-07-15 17:41:56 +02:00
Bram Moolenaar
a6aa78a3e3 patch 7.4.2040
Problem:    New files missing from distribution.
Solution:   Add new test scripts.
2016-07-15 17:11:37 +02:00
Bram Moolenaar
321efdd77a patch 7.4.2039
Problem:    The Netbeans integration is not tested.
Solution:   Add a first Netbeans test.
2016-07-15 17:09:11 +02:00
Bram Moolenaar
9280e3f95d patch 7.4.2038
Problem:    Small build still fails.
Solution:   Adjust more #ifdefs.
2016-07-14 23:03:19 +02:00
Bram Moolenaar
7399895520 patch 7.4.2037
Problem:    Small build fails.
Solution:   Adjust #ifdefs.
2016-07-14 22:34:34 +02:00
Bram Moolenaar
480778b805 patch 7.4.2036
Problem:    Looking up a buffer by number is slow if there are many.
Solution:   Use a hashtab.
2016-07-14 22:09:39 +02:00
Bram Moolenaar
da4127794a patch 7.4.2035
Problem:    On Solaris with ZFS the ACL may get removed.
Solution:   Always restore the ACL for Solaris ZFS. (Danek Duvall)
2016-07-14 20:37:07 +02:00
Bram Moolenaar
f62e797ffa patch 7.4.2034
Problem:    Build fails with some version of MinGW. (illusorypan)
Solution:   Recognize mingw32. (Ken Takata, closes #921)
2016-07-14 20:25:03 +02:00
Bram Moolenaar
6d20e17544 patch 7.4.2033
Problem:    'cscopequickfix' option does not accept new value "a".
Solution:   Adjust list of command characters. (Ken Takata)
2016-07-13 22:44:12 +02:00
Bram Moolenaar
3e946fdc7b patch 7.4.2032
Problem:    Build fails with 64 bit MinGW. (Axel Bender)
Solution:   Handle dash vs. underscore. (Ken Takata, Hirohito Higashi)
2016-07-13 20:54:43 +02:00
Bram Moolenaar
89b10421ca patch 7.4.2031
Problem:    The list_lbr_utf8 test fails if ~/.vim/syntax/c.vim sets
            'textwidth' to a non-zero value. (Oyvind A. Holm)
Solution:   Add a setup.vim file that sets 'runtimepath' and $HOME to a safe
            value. (partly by Christian Brabandt, closes #912)
2016-07-12 22:51:22 +02:00
Bram Moolenaar
e048539195 patch 7.4.2030
Problem:    ARCH must be set properly when using MinGW.
Solution:   Detect the default value of ARCH from the current compiler. (Ken
            Takata)
2016-07-12 21:17:03 +02:00
Bram Moolenaar
38ee6b041e patch 7.4.2029
Problem:    printf() does not work with 64 bit numbers.
Solution:   use the "L" length modifier. (Ken Takata)
2016-07-12 21:11:33 +02:00
Bram Moolenaar
5498a41f5a patch 7.4.2028
Problem:    cppcheck warns for using index before limits check.
Solution:   Swap the expressions. (Dominique Pelle)
2016-07-11 23:19:05 +02:00
Bram Moolenaar
4c06815c44 patch 7.4.2027
Problem:    Can't build with +eval but without +menu.
Solution:   Add #ifdef. (John Marriott)
2016-07-11 23:15:25 +02:00
Bram Moolenaar
1436d8d51c patch 7.4.2026
Problem:    Reference counting for callbacks isn't right.
Solution:   Add free_callback(). (Ken Takata)  Fix reference count.
2016-07-11 22:41:15 +02:00
Bram Moolenaar
da3a77d9ec patch 7.4.2025
Problem:    The cursor blinking stops or is irregular when receiving date over
            a channel and writing it in a buffer, and when updating the status
            line. (Ramel Eshed)
Solution:   Make it a bit better by flushing GUI output.  Don't redraw the
            cursor after updating the screen if the blink state is off.
2016-07-10 23:16:09 +02:00
Bram Moolenaar
7c0a2f367f patch 7.4.2024
Problem:    More buf_valid() calls can be optimized.
Solution:   Use bufref_valid() instead.
2016-07-10 22:11:16 +02:00
Bram Moolenaar
ea3f2e7be4 patch 7.4.2023
Problem:    buflist_findname_stat() may find a dummy buffer.
Solution:   Set the BF_DUMMY flag after loading a dummy buffer.  Start
            finding buffers from the end of the list.
2016-07-10 20:27:32 +02:00
Bram Moolenaar
25065ec375 patch 7.4.2022
Problem:    Warnings from 64 bit compiler.
Solution:   Add type casts. (Mike Williams)
2016-07-10 19:22:53 +02:00
Bram Moolenaar
19ff9bf454 patch 7.4.2021
Problem:    Still too many buf_valid() calls.
Solution:   Make au_new_curbuf a bufref.  Use bufref_valid() in more places.
2016-07-10 19:03:57 +02:00
Bram Moolenaar
453f37dbfd patch 7.4.2020
Problem:    Can't build without +autocmd feature.
Solution:   Adjust #ifdefs.
2016-07-10 18:33:59 +02:00
Bram Moolenaar
c4a927ca8d patch 7.4.2019
Problem:    When ignoring case utf_fold() may consume a lot of time.
Solution:   Optimize for ASCII.
2016-07-10 18:24:27 +02:00
Bram Moolenaar
b25f9a97e9 patch 7.4.2018
Problem:    buf_valid() can be slow when there are many buffers.
Solution:   Add bufref_valid(), only go through the buffer list when a buffer
            was freed.
2016-07-10 18:21:50 +02:00
Bram Moolenaar
8240433f48 patch 7.4.2017
Problem:    When there are many errors adding them to the quickfix list takes
            a long time.
Solution:   Add BLN_NOOPT.  Don't call buf_valid() in buf_copy_options().
            Remember the last file name used.  When going through the buffer
            list start from the end of the list.  Only call buf_valid() when
            autocommands were executed.
2016-07-10 17:00:38 +02:00
Bram Moolenaar
2bc127f940 patch 7.4.2016
Problem:    Warning from MinGW about _WIN32_WINNT redefined. (John Marriott)
Solution:   First undefine it. (Ken Takata)
2016-07-10 13:57:40 +02:00
Bram Moolenaar
5c71994f4e patch 7.4.2015
Problem:    When a file gets a name when writing it 'acd' is not effective.
            (Dan Church)
Solution:   Invoke DO_AUTOCHDIR after writing the file. (Allen Haim, closes
            #777, closes #803)  Add test_autochdir() to enable 'acd' before
            "starting" is reset.
2016-07-09 23:40:45 +02:00
Bram Moolenaar
32b808a4bd patch 7.4.2014
Problem:    Using "noinsert" in 'completeopt' does not insert match.
Solution:   Set compl_enter_selects. (Shougo, closes #875)
2016-07-09 21:57:20 +02:00
Bram Moolenaar
67081e5061 patch 7.4.2013
Problem:    Using "noinsert" in 'completeopt' breaks redo.
Solution:   Set compl_curr_match. (Shougo, closes #874)
2016-07-09 21:49:03 +02:00
Bram Moolenaar
063b9d15ab Updated runtime files. 2016-07-09 20:21:48 +02:00
Bram Moolenaar
0d3e24be56 patch 7.4.2012
Problem:    Test for getcompletion() does not pass on all systems.
Solution:   Only test what is supported.
2016-07-09 19:20:59 +02:00
Bram Moolenaar
aa4d73235b patch 7.4.2011
Problem:    It is not easy to get a list of command arguments.
Solution:   Add getcompletion(). (Yegappan Lakshmanan)
2016-07-09 18:50:29 +02:00
Bram Moolenaar
537ef08408 patch 7.4.2010
Problem:    There is a :cbottom command but no :lbottom command.
Solution:   Add :lbottom. (Yegappan Lakshmanan)
2016-07-09 17:56:19 +02:00
Bram Moolenaar
ed59aa60d3 patch 7.4.2009
Problem:    Messages test fails.
Solution:   Don't set redir_execute before returning.
2016-07-09 17:41:12 +02:00
Bram Moolenaar
79815f1ec7 patch 7.4.2008
Problem:    evalcmd() has a confusing name.
Solution:   Rename to execute().  Make silent optional.  Support a list of
            commands.
2016-07-09 17:07:29 +02:00
Bram Moolenaar
fc4ad61607 patch 7.4.2007
Problem:    Running the tests leaves a viminfo file behind.
Solution:   Make the viminfo option empty.
2016-07-09 15:38:32 +02:00
Bram Moolenaar
30445cb6e9 patch 7.4.2006
Problem:    Crash when using tabnext in BufUnload autocmd. (Norio Takagi)
Solution:   First check that the current buffer is the right one. (Hirohito
            Higashi)
2016-07-09 15:21:02 +02:00
Bram Moolenaar
ee1deb4a00 patch 7.4.2005
Problem:    After using evalcmd() message output is in the wrong position.
            (Christian Brabandt)
Solution:   Reset msg_col.
2016-07-08 23:06:21 +02:00
Bram Moolenaar
65549bdef5 patch 7.4.2004
Problem:    GUI: cursor displayed in the wrong position.
Solution:   Correct screen_cur_col and screen_cur_row.
2016-07-08 22:52:37 +02:00
Bram Moolenaar
144445d15f patch 7.4.2003
Problem:    Still cursor flickering when a callback updates the screen. (David
            Samvelyan)
Solution:   Put the cursor in the right position after updating the screen.
2016-07-08 21:41:54 +02:00
Bram Moolenaar
a06ec8f345 patch 7.4.2002
Problem:    Crash when passing number to filter() or map().
Solution:   Convert to a string. (Ozaki Kiichi)
2016-07-08 20:11:07 +02:00
Bram Moolenaar
ba768495c2 patch 7.4.2001
Problem:    Tiny build fails. (Tony Mechelynck)
Solution:   Add #ifdef.
2016-07-08 15:32:54 +02:00
Bram Moolenaar
245a7cb6d3 patch 7.4.2000
Problem:    Evalcmd test fails.
Solution:   Add missing piece.
2016-07-08 10:53:12 +02:00
Bram Moolenaar
bc5d6dd1dd patch 7.4.1999
Problem:    evalcmd() doesn't work recursively.
Solution:   Use redir_evalcmd instead of redir_vname.
2016-07-07 23:04:18 +02:00
Bram Moolenaar
bf2cc5f36d patch 7.4.1998
Problem:    When writing buffer lines to a job there is no NL to NUL
            conversion.
Solution:   Make it work symmetrical with writing lines from a job into a
            buffer.
2016-07-07 20:45:06 +02:00
Bram Moolenaar
dcb1700186 patch 7.4.1997
Problem:    Cannot easily scroll the quickfix window.
Solution:   Add ":cbottom".
2016-07-07 18:58:59 +02:00
Bram Moolenaar
1e5e1231ac patch 7.4.1996
Problem:    Capturing the output of a command takes a few commands.
Solution:   Add evalcmd().
2016-07-07 17:33:02 +02:00
Bram Moolenaar
9d5d3c9c44 patch 7.4.1995
Problem:    GUI: cursor drawn in wrong place if a timer callback causes a
            screen update. (David Samvelyan)
Solution:   Also redraw the cursor when it's blinking and on.
2016-07-07 16:43:02 +02:00
Bram Moolenaar
05e418d436 patch 7.4.1994
Problem:    True-false test fails.
Solution:   Filter the dict to only keep the value that matters.
2016-07-07 16:35:16 +02:00
Bram Moolenaar
6bb450145e patch 7.4.1993
Problem:    Not all TRUE and FALSE arguments are tested.
Solution:   Add a few more tests.
2016-07-07 15:11:19 +02:00
Bram Moolenaar
e381d3d5e0 patch 7.4.1992
Problem:    Values for true and false can be confusing.
Solution:   Update the documentation.  Add a test.  Make v:true evaluate to
            TRUE for a non-zero-arg.
2016-07-07 14:50:41 +02:00
Bram Moolenaar
00efded106 patch 7.4.1991
Problem:    glob() does not add a symbolic link when there are no wildcards.
Solution:   Remove the call to mch_getperm().
2016-07-07 14:29:10 +02:00
Bram Moolenaar
80632db65e patch 7.4.1990
Problem:    Cscope items are not sorted.
Solution:   Put the new "a" command first. (Ken Takata)
2016-07-05 22:28:40 +02:00
Bram Moolenaar
b33c7eb5b8 patch 7.4.1989
Problem:    filter() and map() only accept a string argument.
Solution:   Implement using a Funcref argument (Yasuhiro Matsumoto, Ken
            Takata)
2016-07-04 22:29:49 +02:00
Bram Moolenaar
ab9c89b68d patch 7.4.1988
Problem:    When updating viminfo with file marks there is no time order.
Solution:   Remember the time when a buffer was last used, store marks for
            the most recently used buffers.
2016-07-03 17:47:26 +02:00
Bram Moolenaar
dec85cf750 patch 7.4.1987
Problem:    When copying unrecognized lines for viminfo, end up with useless
            continuation lines.
Solution:   Skip continuation lines.
2016-07-02 22:33:46 +02:00
Bram Moolenaar
fef524bbff patch 7.4.1986
Problem:    Compiler warns for loss of data.
Solution:   Use size_t instead of int. (Christian Brabandt)
2016-07-02 22:07:22 +02:00
Bram Moolenaar
3b98b83001 patch 7.4.1985
Problem:    Missing changes in VMS build file.
Solution:   Use the right file name.
2016-07-02 21:45:17 +02:00
Bram Moolenaar
e18dbe865d Updated runtime files. 2016-07-02 21:42:23 +02:00
Bram Moolenaar
0fcc7c6dd1 patch 7.4.1984
Problem:    Not all quickfix features are tested.
Solution:   Add a few more tests. (Yegappan Lakshmanan)
2016-07-02 21:22:52 +02:00
Bram Moolenaar
75464dc434 patch 7.4.1983
Problem:    farsi.c and arabic.c are included in a strange way.
Solution:   Build them like other files.
2016-07-02 20:27:50 +02:00
Bram Moolenaar
951fa1819a patch 7.4.1982
Problem:    Viminfo file contains duplicate change marks.
Solution:   Drop duplicate marks.
2016-07-02 19:20:06 +02:00
Bram Moolenaar
ee2615af64 patch 7.4.1981
Problem:    No testing for Farsi code.
Solution:   Add a minimal test.  Clean up Farsi code.
2016-07-02 18:25:34 +02:00
Bram Moolenaar
361c8f0e51 patch 7.4.1980
Problem:    'errorformat' is parsed for every call to ":caddexpr".  Can't add
            to two location lists asynchronously.
Solution:   Keep the previously parsed data when appropriate. (mostly by
            Yegappan Lakshmanan)
2016-07-02 15:41:47 +02:00
Bram Moolenaar
2acfbed9db patch 7.4.1979
Problem:    Getting value of binary option is wrong. (Kent Sibilev)
Solution:   Fix type cast.  Add a test.
2016-07-01 23:14:02 +02:00
Bram Moolenaar
c5af40ae64 patch 7.4.1978
Problem:    Large file test does not delete its output.
Solution:   Delete the output. Check size properly when possible. (Ken Takata)
2016-07-01 21:49:06 +02:00
Bram Moolenaar
bde9810d61 patch 7.4.1977
Problem:    With 64 bit changes don't need three calls to sprintf().
Solution:   Simplify the code, use vim_snprintf(). (Ken Takata)
2016-07-01 20:03:42 +02:00
Bram Moolenaar
22fcfad292 patch 7.4.1976
Problem:    Number variables are not 64 bits while they could be.
Solution:   Add the num64 feature. (Ken Takata)
2016-07-01 18:17:26 +02:00
Bram Moolenaar
8767f52fbf patch 7.4.1975
Problem:    On MS-Windows large files (> 2Gbyte) cause problems.
Solution:   Use "off_T" instead of "off_t".  Use "stat_T" instead of "struct
            stat".  Use 64 bit system functions if available.  (Ken Takata)
2016-07-01 17:17:39 +02:00
Bram Moolenaar
4a6c670b84 patch 7.4.1974
Problem:    GUI has a problem with some termcodes.
Solution:   Handle negative numbers. (Kazunobu Kuriyama)
2016-07-01 15:48:05 +02:00
Bram Moolenaar
4c5717ed8a patch 7.4.1973
Problem:    On MS-Windows the package directory may be added at the end
            because of forward/backward slash differences. (Matthew
            Desjardins)
Solution:   Ignore slash differences.
2016-07-01 15:39:40 +02:00
Bram Moolenaar
40de45664c patch 7.4.1972
Problem:    On Solaris select() does not work as expected when there is
            typeahead.
Solution:   Add ICANON when sleeping. (Ozaki Kiichi)
2016-07-01 15:03:46 +02:00
Bram Moolenaar
e8fea0728a patch 7.4.1971
Problem:    It is not easy to see unrecognized error lines below the current
            error position.
Solution:   Add ":clist +count".
2016-07-01 14:48:27 +02:00
Bram Moolenaar
70e136e1d8 patch 7.4.1970
Problem:    Using ":insert" in an empty buffer sets the jump mark. (Ingo
            Karkat)
Solution:   Don't adjust marks when replacing the empty line in an empty
            buffer. (closes #892)
2016-07-01 14:04:51 +02:00
Bram Moolenaar
24cf233ef9 patch 7.4.1969
Problem:    When the netbeans channel is closed consuming the buffer may cause
            a crash.
Solution:   Check for nb_channel not to be NULL. (Xavier de Gaye)
2016-07-01 12:50:54 +02:00
Bram Moolenaar
1d90a5a5af patch 7.4.1968
Problem:    Invalid memory access with "\<C-">.
Solution:   Do not recognize this as a special character. (Dominique Pelle)
2016-07-01 11:59:47 +02:00
Bram Moolenaar
6747fabc73 patch 7.4.1967
Problem:    Falling back from NFA to old regexp engine does not work properly.
            (fritzophrenic)
Solution:   Do not restore nfa_match. (Christian Brabandt, closes #867)
2016-06-28 22:39:16 +02:00
Bram Moolenaar
bcf7772a23 patch 7.4.1966
Problem:    Coverity reports a resource leak.
Solution:   Close "fd" also when bailing out.
2016-06-28 21:11:32 +02:00
Bram Moolenaar
adb78a77eb patch 7.4.1965
Problem:    When using a job in raw mode to append to a buffer garbage
            characters are added.
Solution:   Do not replace the trailing NUL with a NL. (Ozaki Kiichi)
2016-06-27 21:10:31 +02:00
Bram Moolenaar
688e3d1fd9 patch 7.4.1964
Problem:    The quickfix init function is too big.
Solution:   Factor out parsing 'errorformat' to a separate function. (Yegappan
            Lakshmanan)
2016-06-26 22:05:54 +02:00
Bram Moolenaar
97ff9b9cff patch 7.4.1963
Problem:    Running Win32 Vim in mintty does not work.
Solution:   Detect mintty and give a helpful error message. (Ken Takata)
2016-06-26 20:37:46 +02:00
Bram Moolenaar
52df117df7 patch 7.4.1962
Problem:    Two test files for increment/decrement.
Solution:   Move the old style test into the new style test. (Hirohito
            Higashi, closes #881)
2016-06-26 19:38:19 +02:00
Bram Moolenaar
00672e1d3f patch 7.4.1961
Problem:    When 'insertmode' is reset while doing completion the popup menu
            remains even though Vim is in Normal mode.
Solution:   Ignore stop_insert_mode when the popup menu is visible.  Don't set
            stop_insert_mode when 'insertmode' was already off. (Christian
            Brabandt)
2016-06-26 18:38:13 +02:00
Bram Moolenaar
04e2b4b0c4 patch 7.4.1960
Problem:    Unicode standard 9 was released.
Solution:   Update the character property tables. (Christian Brabandt)
2016-06-26 17:53:07 +02:00
Bram Moolenaar
aad30bbcde patch 7.4.1959
Problem:    Crash when running test_channel.vim on Windows.
Solution:   Check for NULL pointer result from FormatMessage(). (Christian
            Brabandt)
2016-06-26 17:31:03 +02:00
Bram Moolenaar
eeb50ab522 patch 7.4.1958
Problem:    Perl interface preprocessor statements not nicely indented.
Solution:   Improve the indenting. (Ken Takata)
2016-06-26 17:19:46 +02:00
Bram Moolenaar
7b61bf187a patch 7.4.1957
Problem:    Perl interface has obsolete workaround.
Solution:   Remove the workaround added by 7.3.623. (Ken Takata)
2016-06-26 17:16:51 +02:00
Bram Moolenaar
5d2ca04029 patch 7.4.1956
Problem:    When using CTRL-W f and pressing "q" at the ATTENTION dialog the
            newly opened window is not closed.
Solution:   Close the window and go back to the original one. (Norio Takagi,
            Hirohito Higashi)
2016-06-26 17:11:21 +02:00
Bram Moolenaar
f4fba6dcd5 patch 7.4.1955
Problem:    Using 32-bit Perl with 64-bit time_t causes memory corruption.
            (Christian Brabandt)
Solution:   Use time_T instead of time_t for global variables. (Ken Takata)
2016-06-26 16:44:24 +02:00
Bram Moolenaar
d388d2ac8b patch 7.4.1954
Problem:    No test for what 7.4.1948 fixes.
Solution:   Add a test. (Hirohito Higashi, closes #880)
2016-06-26 16:24:20 +02:00
Bram Moolenaar
802a0d902f Updated runtime files. 2016-06-26 16:17:58 +02:00
Bram Moolenaar
049cba9e97 patch 7.4.1953
Problem:    Not all parts of the quickfix code are tested.
Solution:   Add more tests. (Yegappan Lakshmanan)
2016-06-26 14:38:04 +02:00
Bram Moolenaar
b12e7ef956 patch 7.4.1952
Problem:    Cscope interface does not support finding assignments.
Solution:   Add the "a" command. (ppettina, closes #882)
2016-06-21 23:42:20 +02:00
Bram Moolenaar
85babd6db6 patch 7.4.1951
Problem:    Ruby test is old style.
Solution:   Convert to a new style test. (Ken Takata)
2016-06-21 22:59:28 +02:00
Bram Moolenaar
f50df3925b patch 7.4.1950
Problem:    Quickfix long lines test not executed for buffer.
Solution:   Call the function to test long lines. (Yegappan Lakshmanan)
2016-06-21 21:33:34 +02:00
Bram Moolenaar
38df43bd13 patch 7.4.1949
Problem:    Minor problems with the quickfix code.
Solution:   Fix the problems. (Yegappan Lakshmanan)
2016-06-20 21:41:12 +02:00
Bram Moolenaar
ad5ca9bc1e patch 7.4.1948
Problem:    Using Ctrl-A with double-byte encoding may result in garbled text.
Solution:   Skip to the start of a character. (Hirohito Higashi)
2016-06-20 21:26:08 +02:00
Bram Moolenaar
ecefe71704 patch 7.4.1947
Problem:    Viminfo continuation line with wrong length isn't skipped. (Marius
            Gedminas)
Solution:   Skip a line when encountering an error, but not two lines.
2016-06-20 12:50:17 +02:00
Bram Moolenaar
cf2d77987c patch 7.4.1946
Problem:    File list does not include new XPM libraries.
Solution:   Add the file list entries.
2016-06-20 11:28:18 +02:00
Bram Moolenaar
ddf8d1c746 patch 7.4.1945
Problem:    The Man plugin doesn't work that well.
Solution:   Use "g:ft_man_open_mode" to be able open man pages in vert split
            or separate tab. Set nomodifiable for buffer with man content. Add
            a test. (Andrey Starodubtsev, closes #873)
2016-06-20 11:22:54 +02:00
Bram Moolenaar
b5b95750a6 patch 7.4.1944
Problem:    Win32: Cannot compile with XPM feature using VC2015
Solution:   Add XPM libraries compiled with VC2015, and enable to build
            gvim.exe which supports XPM using VC2015. (Ken Takata)
2016-06-18 21:59:36 +02:00
Bram Moolenaar
678e480529 patch 7.4.1943
Problem:    Coverity warns for unreachable code.
Solution:   Remove the code that won't do anything.
2016-06-17 22:38:46 +02:00
Bram Moolenaar
d18f672fc9 patch 7.4.1942
Problem:    Background is not drawn properly when 'termguicolors' is set.
Solution:   Check cterm_normal_bg_color. (Jacob Niehus, closes #805)
2016-06-17 13:18:49 +02:00
Bram Moolenaar
a02a551e18 Updated runtime files. 2016-06-17 12:48:11 +02:00
Bram Moolenaar
3ef5bf7d45 patch 7.4.1941
Problem:    Not all quickfix tests are also done  with the location lists.
Solution:   Test more quickfix code.  Use user commands instead of "exe".
            (Yegappan Lakshmanan)
2016-06-15 22:41:31 +02:00
Bram Moolenaar
23c60f21b0 patch 7.4.1940
Problem:    "gd" hangs in some situations. (Eric Biggers)
Solution:   Remove the SEARCH_START flag when looping.  Add a test.
2016-06-15 22:03:48 +02:00
Bram Moolenaar
28607ba2b8 patch 7.4.1939
Problem:    Memory access error when reading viminfo. (Dominique Pelle)
Solution:   Correct index in jumplist when at the end.
2016-06-15 21:44:51 +02:00
Bram Moolenaar
36f0f0686c patch 7.4.1938
Problem:    When writing viminfo numbered marks were duplicated.
Solution:   Check for duplicates between current numbered marks and the ones
            read from viminfo.
2016-06-14 23:02:46 +02:00
Bram Moolenaar
ab47c61f46 patch 7.4.1937
Problem:    No test for directory stack in quickfix.
Solution:   Add a test. (Yegappan Lakshmanan)
2016-06-14 22:02:26 +02:00
Bram Moolenaar
67e3720a9d patch 7.4.1936
Problem:    Off-by-one error in bounds check. (Coverity)
Solution:   Check register number properly.
2016-06-14 21:32:28 +02:00
Bram Moolenaar
bee666f239 patch 7.4.1935
Problem:    When using the GUI search/replace a second match right after the
            replacement is skipped.
Solution:   Add the SEARCH_START flag. (Mleddy)
2016-06-14 20:39:42 +02:00
Bram Moolenaar
9bd3186052 patch 7.4.1934
Problem:    New style tests not executed with MinGW compiler.
Solution:   Add new style test support. (Yegappan Lakshmanan)
2016-06-13 22:58:39 +02:00
Bram Moolenaar
72e697d189 patch 7.4.1933
Problem:    Compiler warning about uninitialzed variable. (Yegappan)
Solution:   Give it a dummy value.
2016-06-13 22:48:01 +02:00
Bram Moolenaar
ece74ab103 patch 7.4.1932
Problem:    When writing viminfo the jumplist is not merged with the one in
            the viminfo file.
Solution:   Merge based on timestamp.
2016-06-13 22:22:15 +02:00
Bram Moolenaar
a641e1d4da patch 7.4.1931
Problem:    Using both old and new style file mark lines from viminfo.
Solution:   Skip the old style lines if the viminfo file was written with a
            Vim version that supports the new style.
2016-06-13 21:16:03 +02:00
Bram Moolenaar
bf2c0ee0b2 patch 7.4.1930
Problem:    Can't build without +spell but with +quickfix. (Charles)
Solution:   Add better #ifdef around ml_append_buf(). (closes #864)
2016-06-13 20:23:53 +02:00
Bram Moolenaar
2016ae586b patch 7.4.1929
Problem:    Inconsistent indenting and weird name.
Solution:   Fix indent, make name all upper case. (Ken Takata)
2016-06-13 20:08:43 +02:00
Bram Moolenaar
76ae22fef3 patch 7.4.1928
Problem:    Overwriting pointer argument.
Solution:   Assign to what it points to. (Dominique Pelle)
2016-06-13 20:00:29 +02:00
Bram Moolenaar
5b7d177e89 patch 7.4.1927
Problem:    Compiler warning for signed/unsigned.
Solution:   Add type cast.
2016-06-13 19:54:22 +02:00
Bram Moolenaar
a890f5e348 patch 7.4.1926
Problem:    Possible crash with many history items.
Solution:   Avoid the index going past the last item.
2016-06-12 23:03:19 +02:00
Bram Moolenaar
c95a302a4c Updated runtime files. 2016-06-12 23:01:46 +02:00
Bram Moolenaar
2d35899721 patch 7.4.1925
Problem:    Viminfo does not merge file marks properly.
Solution:   Use a timestamp.  Add the :clearjumps command.
2016-06-12 21:20:54 +02:00
Bram Moolenaar
cf08946349 patch 7.4.1924
Problem:    Missing "void" for functions without argument.
Solution:   Add "void". (Hirohito Higashi)
2016-06-12 21:18:43 +02:00
Bram Moolenaar
ae3150ec8d patch 7.4.1923
Problem:    Command line editing is not tested much.
Solution:   Add tests for expanding the file name and 'wildmenu'.
2016-06-11 23:22:36 +02:00
Bram Moolenaar
06469e979f patch 7.4.1922
Problem:    Ruby 2.4.0 unifies Fixnum and Bignum into Integer.
Solution:   Use rb_cInteger. (Weiong Mao)
2016-06-11 22:26:53 +02:00
Bram Moolenaar
724f2edf75 patch 7.4.1921
Problem:    vim_time() not included when needed.
Solution:   Adjust #ifdef.
2016-06-11 22:21:17 +02:00
Bram Moolenaar
e80ff7448d patch 7.4.1920
Problem:    Missing test changes.
Solution:   Update viminfo test.
2016-06-11 21:14:18 +02:00
Bram Moolenaar
46bbb0c4ba patch 7.4.1919
Problem:    Register contents is not merged when writing viminfo.
Solution:   Use timestamps for register contents.
2016-06-11 21:04:39 +02:00
Bram Moolenaar
62f8b4e180 patch 7.4.1918
Problem:    Not enough testing for parsing viminfo lines.
Solution:   Add test with viminfo lines in bad syntax.  Fix memory leak.
2016-06-11 15:31:47 +02:00
Bram Moolenaar
012270936c patch 7.4.1917
Problem:    History lines read from viminfo in different encoding than when
            writing are not converted.
Solution:   Convert the history lines.
2016-06-11 14:47:40 +02:00
Bram Moolenaar
b8aefa46ad patch 7.4.1916
Problem:    No proper test for what 7.4.1906 fixes.
Solution:   Add a test for reading many lines.
2016-06-10 23:02:56 +02:00
Bram Moolenaar
2a67ed83a8 patch 7.4.1915
Problem:    The effect of the PopupMenu autocommand isn't directly visible.
Solution:   Call gui_update_menus() before displaying the popup menu. (Shane
            Harper, closs #855)
2016-06-10 21:52:42 +02:00
Bram Moolenaar
e429e70f05 patch 7.4.1914
Problem:    Executing autocommands while using the signal stack has a high
            chance of crashing Vim.
Solution:   Don't invoke autocommands when on the signal stack.
2016-06-10 19:49:14 +02:00
Bram Moolenaar
1610d05241 patch 7.4.1913
Problem:    When ":doautocmd" is used modelines are used even when no
            autocommands were executed. (Daniel Hahler)
Solution:   Skip processing modelines. (closes #854)
2016-06-09 22:53:01 +02:00
Bram Moolenaar
1cee693b31 patch 7.4.1912
Problem:    No test for using setqflist() on an older quickfix list.
Solution:   Add a couple of tests.
2016-06-09 22:17:22 +02:00
Bram Moolenaar
1fd99c1ca8 patch 7.4.1911
Problem:    Recent history lines may be lost when exiting Vim.
Solution:   Merge history using the timestamp.
2016-06-09 20:24:28 +02:00
Bram Moolenaar
abc70bbf36 patch 7.4.1910
Problem:    Tests using external command to delete directory.
Solution:   Use delete().
2016-06-08 21:48:50 +02:00
Bram Moolenaar
945ec093cd patch 7.4.1909
Problem:    Doubled semicolons.
Solution:   Reduce to one. (Dominique Pelle)
2016-06-08 21:17:43 +02:00
Bram Moolenaar
5ce4a0b96a patch 7.4.1908
Problem:    Netbeans uses uninitialzed pointer and freed memory.
Solution:   Set "buffer" at the right place (hint by Ken Takata)
2016-06-08 20:17:23 +02:00
Bram Moolenaar
1d5f1d07ae patch 7.4.1907
Problem:    Warnings from 64 bit compiler.
Solution:   Change type to size_t. (Mike Williams)
2016-06-07 22:50:01 +02:00
Bram Moolenaar
5f1032d2a5 patch 7.4.1906
Problem:    Collapsing channel buffers and searching for NL does not work
            properly. (Xavier de Gary, Ramel Eshed)
Solution:   Do not assume the buffer contains a NUL or not.  Change NUL bytes
            to NL to avoid the string is truncated.
2016-06-07 22:16:36 +02:00
Bram Moolenaar
fdd82fe365 patch 7.4.1905
Problem:    Some compilers can't handle a double semicolon.
Solution:   Remove one semicolon.
2016-06-06 21:38:44 +02:00
Bram Moolenaar
c60954b48e patch 7.4.1904
Problem:    Build fails.
Solution:   Add missing changes.
2016-06-06 21:20:10 +02:00
Bram Moolenaar
45d2eeaad6 patch 7.4.1903
Problem:    When writing viminfo merging current history with history in
            viminfo may drop recent history entries.
Solution:   Add new format for viminfo lines, use it for history entries.  Use
            a timestamp for ordering the entries. Add test_settime().
            Add the viminfo version.  Does not do merging on timestamp yet.
2016-06-06 21:07:52 +02:00
Bram Moolenaar
bbe8d91e69 patch 7.4.1902
Problem:    No test for collapsing buffers for a channel.  Some text is lost.
Solution:   Add a simple test.  Set rq_buflen correctly.
2016-06-05 16:10:57 +02:00
Bram Moolenaar
762f175437 patch 7.4.1901
Problem:    Win32: the "Disabled" menu items would appear enabled.
Solution:   Use submenu_id if there is a parent. (Shane Harper, closes #834)
2016-06-04 22:36:17 +02:00
Bram Moolenaar
28b942a064 patch 7.4.1900
Problem:    Using CTRL-] in the help on "{address}." doesn't work.
Solution:   Recognize an item in {}. (Hirohito Higashi, closes #814)
2016-06-04 22:31:27 +02:00
Bram Moolenaar
8e31fd52ec patch 7.4.1899
Problem:    GTK 3: cursor blinking doesn't work well.
Solution:   Instead of gui_gtk_window_clear() use gui_mch_clear_block().
            (Kazunobu Kuriyama)
2016-06-04 22:18:13 +02:00
Bram Moolenaar
63a60ded3f patch 7.4.1898
Problem:    User commands don't support modifiers.
Solution:   Add the <mods> item. (Yegappan Lakshmanan, closes #829)
2016-06-04 22:08:55 +02:00
Bram Moolenaar
fd89d7ea81 patch 7.4.1897
Problem:    Various typos, long lines and style mistakes.
Solution:   Fix the typos, wrap lines, improve style.
2016-06-04 20:25:05 +02:00
Bram Moolenaar
82af8710bf Updated runtime files. 2016-06-04 20:20:29 +02:00
Bram Moolenaar
82faa259cc patch 7.4.1896
Problem:    Invoking mark_adjust() when adding a new line below the last line
            is pointless.
Solution:   Skip calling mark_adjust() when appending below the last line.
2016-06-04 20:14:07 +02:00
Bram Moolenaar
888ccac890 patch 7.4.1895
Problem:    Cannot use a window ID where a window number is expected.
Solution:   Add LOWEST_WIN_ID, so that the window ID can be used where a
            number is expected.
2016-06-04 18:49:36 +02:00
Bram Moolenaar
511972d810 patch 7.4.1894
Problem:    Cannot get the window ID for a mouse click.
Solution:   Add v:mouse_winid.
2016-06-04 18:09:59 +02:00
Bram Moolenaar
b3619a90ea patch 7.4.1893
Problem:    Cannot easily get the window ID for a buffer.
Solution:   Add bufwinid().
2016-06-04 17:58:52 +02:00
Bram Moolenaar
c9721bdc63 patch 7.4.1892
Problem:    balloon eval only gets the window number, not the ID.
Solution:   Add v:beval_winid.
2016-06-04 17:41:03 +02:00
Bram Moolenaar
9ed96efb3d patch 7.4.1891
Problem:    Channel reading very long lines is slow.
Solution:   Collapse multiple buffers until a NL is found.
2016-06-04 17:17:11 +02:00
Bram Moolenaar
703a8044b5 patch 7.4.1890
Problem:    GUI: When channel data is received the cursor blinking is
            interrupted.  (Ramel Eshed)
Solution:   Don't update the cursor when it is blinking.
2016-06-04 16:24:32 +02:00
Bram Moolenaar
35d88f4e2f patch 7.4.1889
Problem:    When umask is set to 0177 Vim can't create temp files. (Lcd)
Solution:   Also correct umask when using mkdtemp().
2016-06-04 14:52:00 +02:00
Bram Moolenaar
76b6dfe54b patch 7.4.1888
Problem:    Wrong computation of remaining wait time in RealWaitForChar()
Solution:   Remember the original waiting time.
2016-06-04 14:37:22 +02:00
Bram Moolenaar
e30a3d01dc patch 7.4.1887
Problem:    When receiving channel data 'updatetime' is not respected.
Solution:   Recompute the waiting time after being interrupted.
2016-06-04 14:11:20 +02:00
295 changed files with 55678 additions and 31464 deletions

1
.gitignore vendored
View File

@@ -79,3 +79,4 @@ src/testdir/messages
src/testdir/viminfo
src/memfile_test
src/json_test
src/message_test

View File

@@ -1,19 +1,53 @@
language: c
os:
- osx
- linux
compiler:
- clang
- gcc
env:
- COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src
- BUILD=yes TEST=scripttests COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
"CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-python3interp --enable-rubyinterp --enable-luainterp'"
CHECK_AUTOCONF=yes
- COVERAGE=no FEATURES=normal CONFOPT= SHADOWOPT="-C src/shadow" SRCDIR=./src/shadow CHECK_AUTOCONF=no
- COVERAGE=no FEATURES=small CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
- COVERAGE=no FEATURES=tiny CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
- BUILD=no TEST=unittests COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=yes
- BUILD=yes TEST=test COVERAGE=no FEATURES=normal CONFOPT= SHADOWOPT="-C src/shadow" SRCDIR=./src/shadow CHECK_AUTOCONF=no
- BUILD=yes TEST=test COVERAGE=no FEATURES=small CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
- BUILD=yes TEST=test COVERAGE=no FEATURES=tiny CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
# Mac OSX build
- BUILD=yes TEST=test COVERAGE=no FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
"CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-rubyinterp --enable-luainterp'"
sudo: false
git:
depth: 1
# instead of a 6*2*2 matrix (2*os + 2*compiler + 6*env),
# exclude some builds on mac os x and linux
# linux: 2*compiler + 5*env + mac: 2*compiler + 2*env
matrix:
exclude:
- os: osx
env: BUILD=yes TEST=test COVERAGE=no FEATURES=normal CONFOPT= SHADOWOPT="-C src/shadow" SRCDIR=./src/shadow CHECK_AUTOCONF=no
- os: osx
env: BUILD=no TEST=unittests COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=yes
- os: osx
env: BUILD=yes TEST=test COVERAGE=no FEATURES=small CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
- os: osx
env: BUILD=yes TEST=scripttests COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
"CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-python3interp --enable-rubyinterp --enable-luainterp'"
- os: linux
compiler: clang
env: BUILD=no TEST=unittests COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=yes
- os: linux
compiler: clang
env: BUILD=yes TEST=test COVERAGE=no FEATURES=small CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
- os: linux
env: BUILD=yes TEST=test COVERAGE=no FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
"CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-rubyinterp --enable-luainterp'"
branches:
except:
- /^v[0-9]/
@@ -31,15 +65,18 @@ addons:
before_install:
- pip install --user cpp-coveralls
# Lua is not installed on Travis OSX
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew install lua; export LUA_PREFIX=/usr/local; fi
script:
- NPROC=$(getconf _NPROCESSORS_ONLN)
- if [ "$CHECK_AUTOCONF" = "yes" -a "$CC" = "gcc" ]; then make -C src autoconf; fi
- if [ "x$SHADOWOPT" != x ]; then make -C src shadow; fi && (cd ${SRCDIR} && ./configure --with-features=$FEATURES $CONFOPT --enable-fail-if-missing && make -j$NPROC)
- ${SRCDIR}/vim --version
- make $SHADOWOPT test
- if [ "x$SHADOWOPT" != x ]; then make -C src shadow; fi
- (cd ${SRCDIR} && ./configure --with-features=$FEATURES $CONFOPT --enable-fail-if-missing && if [ "$BUILD" = "yes" ]; then make -j$NPROC; fi)
- if [ "$BUILD" = "yes" ]; then ${SRCDIR}/vim --version; fi
- make $SHADOWOPT $TEST
after_success:
- if [ x"$COVERAGE" = "xyes" ]; then ~/.local/bin/coveralls -b $SRCDIR -x .xs -e ${SRCDIR}/xxd -e ${SRCDIR}/if_perl.c --encodings utf-8 latin-1 EUC-KR; fi
- if [ "$COVERAGE" = "yes" ]; then ~/.local/bin/coveralls -b $SRCDIR -x .xs -e ${SRCDIR}/xxd -e ${SRCDIR}/if_perl.c --encodings utf-8 latin-1 EUC-KR; fi
# vim:set sts=2 sw=2 tw=0 et:

View File

@@ -18,10 +18,12 @@ SRC_ALL = \
src/charset.c \
src/crypt.c \
src/crypt_zip.c \
src/dict.c \
src/diff.c \
src/digraph.c \
src/edit.c \
src/eval.c \
src/evalfunc.c \
src/ex_cmds.c \
src/ex_cmds.h \
src/ex_cmds2.c \
@@ -43,6 +45,7 @@ SRC_ALL = \
src/hashtab.c \
src/json.c \
src/json_test.c \
src/list.c \
src/keymap.h \
src/macros.h \
src/main.c \
@@ -53,6 +56,7 @@ SRC_ALL = \
src/memline.c \
src/menu.c \
src/message.c \
src/message_test.c \
src/misc1.c \
src/misc2.c \
src/move.c \
@@ -74,6 +78,8 @@ SRC_ALL = \
src/sha256.c \
src/structs.h \
src/spell.c \
src/spell.h \
src/spellfile.c \
src/syntax.c \
src/tag.c \
src/term.c \
@@ -81,6 +87,7 @@ SRC_ALL = \
src/termlib.c \
src/ui.c \
src/undo.c \
src/userfunc.c \
src/version.c \
src/version.h \
src/vim.h \
@@ -95,6 +102,8 @@ SRC_ALL = \
src/testdir/*.py \
src/testdir/sautest/autoload/*.vim \
src/testdir/runtest.vim \
src/testdir/shared.vim \
src/testdir/setup.vim \
src/testdir/test[0-9]*.ok \
src/testdir/test[0-9]*a.ok \
src/testdir/test_[a-z]*.ok \
@@ -116,21 +125,25 @@ SRC_ALL = \
src/testdir/bench*.vim \
src/testdir/samples/*.txt \
src/proto.h \
src/proto/arabic.pro \
src/proto/blowfish.pro \
src/proto/buffer.pro \
src/proto/channel.pro \
src/proto/charset.pro \
src/proto/crypt.pro \
src/proto/crypt_zip.pro \
src/proto/dict.pro \
src/proto/diff.pro \
src/proto/digraph.pro \
src/proto/edit.pro \
src/proto/eval.pro \
src/proto/evalfunc.pro \
src/proto/ex_cmds.pro \
src/proto/ex_cmds2.pro \
src/proto/ex_docmd.pro \
src/proto/ex_eval.pro \
src/proto/ex_getln.pro \
src/proto/farsi.pro \
src/proto/fileio.pro \
src/proto/fold.pro \
src/proto/getchar.pro \
@@ -139,6 +152,7 @@ SRC_ALL = \
src/proto/hardcopy.pro \
src/proto/hashtab.pro \
src/proto/json.pro \
src/proto/list.pro \
src/proto/main.pro \
src/proto/mark.pro \
src/proto/mbyte.pro \
@@ -160,12 +174,14 @@ SRC_ALL = \
src/proto/search.pro \
src/proto/sha256.pro \
src/proto/spell.pro \
src/proto/spellfile.pro \
src/proto/syntax.pro \
src/proto/tag.pro \
src/proto/term.pro \
src/proto/termlib.pro \
src/proto/ui.pro \
src/proto/undo.pro \
src/proto/userfunc.pro \
src/proto/version.pro \
src/proto/winclip.pro \
src/proto/window.pro \
@@ -317,6 +333,8 @@ SRC_DOS = \
src/if_ole.h \
src/if_ole.idl \
src/if_perl_msvc/stdbool.h \
src/iscygpty.c \
src/iscygpty.h \
src/iid_ole.c \
src/os_dos.h \
src/os_w32dll.c \
@@ -379,8 +397,10 @@ SRC_DOS_BIN = \
src/xpm/include/*.h \
src/xpm/x64/lib/libXpm.a \
src/xpm/x64/lib/libXpm.lib \
src/xpm/x64/lib-vc14/libXpm.lib \
src/xpm/x86/lib/libXpm.a \
src/xpm/x86/lib/libXpm.lib \
src/xpm/x86/lib-vc14/libXpm.lib \
nsis/icons/*.bmp \
nsis/icons/*.ico \
@@ -506,8 +526,9 @@ RT_ALL = \
runtime/macros/urm/examples \
runtime/macros/urm/urm \
runtime/macros/urm/urm.vim \
runtime/mswin.vim \
runtime/defaults.vim \
runtime/evim.vim \
runtime/mswin.vim \
runtime/optwin.vim \
runtime/ftplugin.vim \
runtime/ftplugof.vim \

View File

@@ -32,7 +32,7 @@ first:
# Some make programs use the last target for the $@ default; put the other
# targets separately to always let $@ expand to "first" by default.
all install uninstall tools config configure reconfig proto depend lint tags types test testclean clean distclean:
all install uninstall tools config configure reconfig proto depend lint tags types test scripttests unittests testclean clean distclean:
@if test ! -f src/auto/config.mk; then \
cp src/config.mk.dist src/auto/config.mk; \
fi

File diff suppressed because one or more lines are too long

112
runtime/defaults.vim Normal file
View File

@@ -0,0 +1,112 @@
" The default vimrc file.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last change: 2016 Jul 29
"
" This is loaded if no vimrc file was found.
" Except when Vim is run with "-u NONE" or "-C".
" Individual settings can be reverted with ":set option&".
" Other commands can be reverted as mentioned below.
" When started as "evim", evim.vim will already have done these settings.
if v:progname =~? "evim"
finish
endif
" Use Vim settings, rather than Vi settings (much better!).
" This must be first, because it changes other options as a side effect.
set nocompatible
" Allow backspacing over everything in insert mode.
set backspace=indent,eol,start
set history=200 " keep 200 lines of command line history
set ruler " show the cursor position all the time
set showcmd " display incomplete commands
set wildmenu " display completion matches in a status line
" Show @@@ in the last line if it is truncated.
set display=truncate
" Do incremental searching when it's possible to timeout.
if has('reltime')
set incsearch
endif
" Do not recognize octal numbers for Ctrl-A and Ctrl-X, most users find it
" confusing.
set nrformats-=octal
" For Win32 GUI: remove 't' flag from 'guioptions': no tearoff menu entries.
if has('win32')
set guioptions-=t
endif
" Don't use Ex mode, use Q for formatting.
" Revert with ":unmap Q".
map Q gq
" CTRL-U in insert mode deletes a lot. Use CTRL-G u to first break undo,
" so that you can undo CTRL-U after inserting a line break.
" Revert with ":iunmap <C-U>".
inoremap <C-U> <C-G>u<C-U>
" In many terminal emulators the mouse works just fine. By enabling it you
" can position the cursor, Visually select and scroll with the mouse.
if has('mouse')
set mouse=a
endif
" Switch syntax highlighting on when the terminal has colors or when using the
" GUI (which always has colors).
if &t_Co > 2 || has("gui_running")
" Revert with ":syntax off".
syntax on
" I like highlighting strings inside C comments.
" Revert with ":unlet c_comment_strings".
let c_comment_strings=1
endif
" Only do this part when compiled with support for autocommands.
if has("autocmd")
" Enable file type detection.
" Use the default filetype settings, so that mail gets 'tw' set to 72,
" 'cindent' is on in C files, etc.
" Also load indent files, to automatically do language-dependent indenting.
" Revert with ":filetype off".
filetype plugin indent on
" Put these in an autocmd group, so that you can revert them with:
" ":augroup vimStartup | au! | augroup END"
augroup vimStartup
au!
" When editing a file, always jump to the last known cursor position.
" Don't do it when the position is invalid or when inside an event handler
" (happens when dropping a file on gvim).
autocmd BufReadPost *
\ if line("'\"") >= 1 && line("'\"") <= line("$") |
\ exe "normal! g`\"" |
\ endif
augroup END
endif " has("autocmd")
" Convenient command to see the difference between the current buffer and the
" file it was loaded from, thus the changes you made.
" Only define it when not defined already.
" Revert with: ":delcommand DiffOrig".
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

@@ -1,4 +1,4 @@
*autocmd.txt* For Vim version 7.4. Last change: 2016 Apr 20
*autocmd.txt* For Vim version 7.4. Last change: 2016 Jul 19
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -52,9 +52,6 @@ effects. Be careful not to destroy your text.
==============================================================================
2. Defining autocommands *autocmd-define*
Note: The ":autocmd" command cannot be followed by another command, since any
'|' is considered part of the command.
*:au* *:autocmd*
:au[tocmd] [group] {event} {pat} [nested] {cmd}
Add {cmd} to the list of commands that Vim will
@@ -67,6 +64,12 @@ Note: The ":autocmd" command cannot be followed by another command, since any
The special pattern <buffer> or <buffer=N> defines a buffer-local autocommand.
See |autocmd-buflocal|.
Note: The ":autocmd" command can only be followed by another command when the
'|' appears before {cmd}. This works: >
:augroup mine | au! BufRead | augroup END
But this sees "augroup" as part of the defined command: >
:augroup mine | au BufRead * set tw=70 | augroup END
Note that special characters (e.g., "%", "<cword>") in the ":autocmd"
arguments are not expanded when the autocommand is defined. These will be
expanded when the Event is recognized, and the {cmd} is executed. The only
@@ -293,6 +296,9 @@ Name triggered by ~
|CursorMoved| the cursor was moved in Normal mode
|CursorMovedI| the cursor was moved in Insert mode
|WinNew| after creating a new window
|TabNew| after creating a new tab page
|TabClosed| after closing a tab page
|WinEnter| after entering another window
|WinLeave| before leaving a window
|TabEnter| after entering another tab page
@@ -874,6 +880,8 @@ Syntax When the 'syntax' option has been set. The
where this option was set, and <amatch> for
the new value of 'syntax'.
See |:syn-on|.
*TabClosed*
TabClosed After closing a tab page.
*TabEnter*
TabEnter Just after entering a tab page. |tab-page|
After triggering the WinEnter and before
@@ -882,6 +890,10 @@ TabEnter Just after entering a tab page. |tab-page|
TabLeave Just before leaving a tab page. |tab-page|
A WinLeave event will have been triggered
first.
*TabNew*
TabNew When a tab page was created. |tab-page|
A WinEnter event will have been triggered
first, TabEnter follows.
*TermChanged*
TermChanged After the value of 'term' has changed. Useful
for re-loading the syntax file to update the
@@ -967,6 +979,11 @@ WinLeave Before leaving a window. If the window to be
WinLeave autocommands (but not for ":new").
Not used for ":qa" or ":q" when exiting Vim.
*WinNew*
WinNew When a new window was created. Not done for
the fist window, when Vim has just started.
Before a WinEnter event.
==============================================================================
6. Patterns *autocmd-patterns* *{pat}*
@@ -1204,6 +1221,8 @@ option will not cause any commands to be executed.
argument is present. You probably want to use
<nomodeline> for events that are not used when loading
a buffer, such as |User|.
Processing modelines is also skipped when no
matching autocommands were executed.
*:doautoa* *:doautoall*
:doautoa[ll] [<nomodeline>] [group] {event} [fname]

View File

@@ -1,4 +1,4 @@
*channel.txt* For Vim version 7.4. Last change: 2016 May 29
*channel.txt* For Vim version 7.4. Last change: 2016 Jul 15
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -6,13 +6,9 @@
Inter-process communication *channel*
DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT
Vim uses channels to communicate with other processes.
A channel uses a socket or pipes *socket-interface*
A channel uses a socket or pipes. *socket-interface*
Jobs can be used to start processes and communicate with them.
Vim current supports up to 10 simultaneous channels.
The Netbeans interface also uses a channel. |netbeans|
1. Overview |job-channel-overview|
@@ -495,6 +491,9 @@ time a line is added to the buffer, the last-but-one line will be send to the
job stdin. This allows for editing the last line and sending it when pressing
Enter.
NUL bytes in the text will be passed to the job (internally Vim stores these
as NL bytes).
Reading job output in the close callback ~
*read-in-close-cb*
@@ -566,14 +565,16 @@ See |job_setoptions()| and |ch_setoptions()|.
"out_cb": handler Callback for when there is something to read on
stdout. Only for when the channel uses pipes. When
"out_cb" wasn't set the channel callback is used.
The two arguments are the channel and the message.
*job-err_cb* *err_cb*
"err_cb": handler Callback for when there is something to read on
stderr. Only for when the channel uses pipes. When
"err_cb" wasn't set the channel callback is used.
The two arguments are the channel and the message.
*job-close_cb*
"close_cb": handler Callback for when the channel is closed. Same as
"close_cb" on ch_open().
"close_cb" on |ch_open()|, see |close_cb|.
*job-exit_cb*
"exit_cb": handler Callback for when the job ends. The arguments are the
job and the exit status.
@@ -659,10 +660,14 @@ When using JS or JSON mode with "buffer", only messages with zero or negative
ID will be added to the buffer, after decoding + encoding. Messages with a
positive number will be handled by a callback, commands are handled as usual.
The name of the buffer is compared the full name of existing buffers. If
there is a match that buffer is used. Otherwise a new buffer is created.
Use an empty name to always create a new buffer. |ch_getbufnr()| can then be
used to get the buffer number.
The name of the buffer from "out_name" or "err_name" is compared the full name
of existing buffers, also after expanding the name for the current directory.
E.g., when a buffer was created with ":edit somename" and the buffer name is
"somename" it will use that buffer.
If there is no matching buffer a new buffer is created. Use an empty name to
always create a new buffer. |ch_getbufnr()| can then be used to get the
buffer number.
For a new buffer 'buftype' is set to "nofile" and 'bufhidden' to "hide". If
you prefer other settings, create the buffer first and pass the buffer number.
@@ -680,7 +685,8 @@ When the buffer written to is displayed in a window and the cursor is in the
first column of the last line, the cursor will be moved to the newly added
line and the window is scrolled up to show the cursor if needed.
Undo is synced for every added line.
Undo is synced for every added line. NUL bytes are accepted (internally Vim
stores these as NL bytes).
Writing to a file ~

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
*filetype.txt* For Vim version 7.4. Last change: 2016 May 24
*filetype.txt* For Vim version 7.4. Last change: 2016 Jun 20
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -579,6 +579,11 @@ CTRL-] Jump to the manual page for the word under the cursor.
CTRL-T Jump back to the previous manual page.
q Same as ":quit"
To use a vertical split instead of horizontal: >
let g:ft_man_open_mode = 'vert'
To use a new tab: >
let g:ft_man_open_mode = 'tab'
To enable folding use this: >
let g:ft_man_folding_enable = 1
If you do not like the default folding, use an autocommand to add your desired

View File

@@ -129,6 +129,7 @@ The available subcommands are:
6 or e: Find this egrep pattern
7 or f: Find this file
8 or i: Find files #including this file
9 or a: Find places where this symbol is assigned a value
For all types, except 4 and 6, leading white space for {name} is
removed. For 4 and 6 there is exactly one space between {querytype}
@@ -255,13 +256,13 @@ started will have no effect!
{not available when compiled without the |+quickfix| feature}
'cscopequickfix' specifies whether to use quickfix window to show cscope
results. This is a list of comma-separated values. Each item consists of
|cscope-find| command (s, g, d, c, t, e, f or i) and flag (+, - or 0).
|cscope-find| command (s, g, d, c, t, e, f, i or a) and flag (+, - or 0).
'+' indicates that results must be appended to quickfix window,
'-' implies previous results clearance, '0' or command absence - don't use
quickfix. Search is performed from start until first command occurrence.
The default value is "" (don't use quickfix anyway). The following value
seems to be useful: >
:set cscopequickfix=s-,c-,d-,i-,t-,e-
:set cscopequickfix=s-,c-,d-,i-,t-,e-,a-
<
*cscopetag* *cst*
If 'cscopetag' is set, the commands ":tag" and CTRL-] as well as "vim -t"
@@ -422,6 +423,7 @@ Cscope Home Page (http://cscope.sourceforge.net/): >
nmap <C-_>f :cs find f <C-R>=expand("<cfile>")<CR><CR>
nmap <C-_>i :cs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
nmap <C-_>d :cs find d <C-R>=expand("<cword>")<CR><CR>
nmap <C-_>a :cs find a <C-R>=expand("<cword>")<CR><CR>
" Using 'CTRL-spacebar' then a search type makes the vim window
" split horizontally, with search result displayed in
@@ -435,6 +437,7 @@ Cscope Home Page (http://cscope.sourceforge.net/): >
nmap <C-Space>f :scs find f <C-R>=expand("<cfile>")<CR><CR>
nmap <C-Space>i :scs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
nmap <C-Space>d :scs find d <C-R>=expand("<cword>")<CR><CR>
nmap <C-Space>a :scs find a <C-R>=expand("<cword>")<CR><CR>
" Hitting CTRL-space *twice* before the search type does a vertical
" split instead of a horizontal one
@@ -453,6 +456,8 @@ Cscope Home Page (http://cscope.sourceforge.net/): >
\:vert scs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
nmap <C-Space><C-Space>d
\:vert scs find d <C-R>=expand("<cword>")<CR><CR>
nmap <C-Space><C-Space>a
\:vert scs find a <C-R>=expand("<cword>")<CR><CR>
==============================================================================
7. Cscope availability and information *cscope-info*

View File

@@ -813,7 +813,7 @@ PHP indenting can be altered in several ways by modifying the values of some
global variables:
*php-comment* *PHP_autoformatcomment*
To not enable auto-formating of comments by default (if you want to use your
To not enable auto-formatting of comments by default (if you want to use your
own 'formatoptions'): >
:let g:PHP_autoformatcomment = 0

View File

@@ -1,4 +1,4 @@
*index.txt* For Vim version 7.4. Last change: 2016 Apr 12
*index.txt* For Vim version 7.4. Last change: 2016 Jul 16
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1139,6 +1139,7 @@ tag command action ~
|:caddfile| :caddf[ile] add error message to current quickfix list
|:call| :cal[l] call a function
|:catch| :cat[ch] part of a :try command
|:cbottom| :cbo[ttom] scroll to the bottom of the quickfix window
|:cbuffer| :cb[uffer] parse error messages and jump to first error
|:cc| :cc go to specific error
|:cclose| :ccl[ose] close quickfix window
@@ -1156,8 +1157,10 @@ tag command action ~
|:chdir| :chd[ir] change directory
|:checkpath| :che[ckpath] list included files
|:checktime| :checkt[ime] check timestamp of loaded buffers
|:clist| :cl[ist] list all errors
|:chistory| :chi[story] list the error lists
|:clast| :cla[st] go to the specified error, default last one
|:clearjumps| :cle[arjumps] clear the jump list
|:clist| :cl[ist] list all errors
|:close| :clo[se] close current window
|:cmap| :cm[ap] like ":map" but for Command-line mode
|:cmapclear| :cmapc[lear] clear all mappings for Command-line mode
@@ -1298,6 +1301,7 @@ tag command action ~
|:last| :la[st] go to the last file in the argument list
|:language| :lan[guage] set the language (locale)
|:later| :lat[er] go to newer change, redo
|:lbottom| :lbo[ttom] scroll to the bottom of the location window
|:lbuffer| :lb[uffer] parse locations and jump to first location
|:lcd| :lc[d] change directory locally
|:lchdir| :lch[dir] change directory locally
@@ -1317,6 +1321,7 @@ tag command action ~
|:lgrep| :lgr[ep] run 'grepprg' and jump to first match
|:lgrepadd| :lgrepa[dd] like :grep, but append to current list
|:lhelpgrep| :lh[elpgrep] like ":helpgrep" but uses location list
|:lhistory| :lhi[story] list the location lists
|:ll| :ll go to specific location
|:llast| :lla[st] go to the specified location, default last one
|:llist| :lli[st] list all locations

View File

@@ -1,4 +1,4 @@
*map.txt* For Vim version 7.4. Last change: 2016 Jan 10
*map.txt* For Vim version 7.4. Last change: 2016 Jul 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1274,6 +1274,7 @@ completion can be enabled:
-complete=mapping mapping name
-complete=menu menus
-complete=option options
-complete=packadd optional package |pack-add| names
-complete=shellcmd Shell command
-complete=sign |:sign| suboptions
-complete=syntax syntax file names |'syntax'|
@@ -1411,6 +1412,27 @@ The valid escape sequences are
<bang> (See the '-bang' attribute) Expands to a ! if the
command was executed with a ! modifier, otherwise
expands to nothing.
*<mods>*
<mods> The command modifiers, if specified. Otherwise, expands to
nothing. Supported modifiers are |:aboveleft|, |:belowright|,
|:botright|, |:browse|, |:confirm|, |:hide|, |:keepalt|,
|:keepjumps|, |:keepmarks|, |:keeppatterns|, |:lockmarks|,
|:noswapfile|, |:silent|, |:tab|, |:topleft|, |:verbose|, and
|:vertical|.
Examples: >
command! -nargs=+ -complete=file MyEdit
\ for f in expand(<q-args>, 0, 1) |
\ exe '<mods> split ' . f |
\ endfor
function! SpecialEdit(files, mods)
for f in expand(a:files, 0, 1)
exe a:mods . ' split ' . f
endfor
endfunction
command! -nargs=+ -complete=file Sedit
\ call SpecialEdit(<q-args>, <q-mods>)
<
*<reg>* *<register>*
<reg> (See the '-register' attribute) The optional register,
if specified. Otherwise, expands to nothing. <register>

View File

@@ -1,4 +1,4 @@
*mbyte.txt* For Vim version 7.4. Last change: 2013 May 18
*mbyte.txt* For Vim version 7.4. Last change: 2016 Jul 21
VIM REFERENCE MANUAL by Bram Moolenaar et al.
@@ -1010,6 +1010,7 @@ text, you can use the 'keymap' option. This will translate one or more
(English) characters to another (non-English) character. This only happens
when typing text, not when typing Vim commands. This avoids having to switch
between two keyboard settings.
{only available when compiled with the |+keymap| feature}
The value of the 'keymap' option specifies a keymap file to use. The name of
this file is one of these two:

View File

@@ -1,4 +1,4 @@
*message.txt* For Vim version 7.4. Last change: 2016 Apr 14
*message.txt* For Vim version 7.4. Last change: 2016 Jul 16
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -673,6 +673,12 @@ You must be using an awful lot of buffers. It's now possible that two buffers
have the same number, which causes various problems. You might want to exit
Vim and restart it.
*E931* >
Buffer cannot be registered
Out of memory or a duplicate buffer number. May happen after W14. Looking up
a buffer will not always work, better restart Vim.
*E296* *E297* >
Seek error in swap file write
Write error in swap file

View File

@@ -1,4 +1,4 @@
*motion.txt* For Vim version 7.4. Last change: 2015 Jun 06
*motion.txt* For Vim version 7.4. Last change: 2016 Jul 12
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -586,7 +586,7 @@ i[ "inner [] block", select [count] '[' ']' blocks. This
When used in Visual mode it is made characterwise.
a) *v_a)* *a)* *a(*
a( *v_ab* *v_a(* *ab*
a( *vab* *v_ab* *v_a(* *ab*
ab "a block", select [count] blocks, from "[count] [(" to
the matching ')', including the '(' and ')' (see
|[(|). Does not include white space outside of the
@@ -594,7 +594,7 @@ ab "a block", select [count] blocks, from "[count] [(" to
When used in Visual mode it is made characterwise.
i) *v_i)* *i)* *i(*
i( *v_ib* *v_i(* *ib*
i( *vib* *v_ib* *v_i(* *ib*
ib "inner block", select [count] blocks, from "[count] [("
to the matching ')', excluding the '(' and ')' (see
|[(|).
@@ -1027,7 +1027,8 @@ unless the line containing that position was changed or deleted.
*CTRL-O*
CTRL-O Go to [count] Older cursor position in jump list
(not a motion command). {not in Vi}
(not a motion command).
{not in Vi}
{not available without the |+jumplist| feature}
<Tab> or *CTRL-I* *<Tab>*
@@ -1037,8 +1038,14 @@ CTRL-I Go to [count] newer cursor position in jump list
{not available without the |+jumplist| feature}
*:ju* *:jumps*
:ju[mps] Print the jump list (not a motion command). {not in
Vi} {not available without the |+jumplist| feature}
:ju[mps] Print the jump list (not a motion command).
{not in Vi}
{not available without the |+jumplist| feature}
*:cle* *:clearjumps*
:cle[arjumps] Clear the jump list of the current window.
{not in Vi}
{not available without the |+jumplist| feature}
*jumplist*
Jumps are remembered in a jump list. With the CTRL-O and CTRL-I command you

View File

@@ -1,4 +1,4 @@
*netbeans.txt* For Vim version 7.4. Last change: 2016 Feb 18
*netbeans.txt* For Vim version 7.4. Last change: 2016 Jul 15
VIM REFERENCE MANUAL by Gordon Prieur et al.
@@ -59,6 +59,8 @@ Current projects using the NetBeans protocol of Vim are:
Check the specific project pages to see how to use Vim with these projects.
An alternative is to use a channel, see |channel|.
In the rest of this help page, we will use the term "Vim Controller" to
describe the program controlling Vim through the NetBeans socket interface.

View File

@@ -1,4 +1,4 @@
*options.txt* For Vim version 7.4. Last change: 2016 May 24
*options.txt* For Vim version 7.4. Last change: 2016 Jul 28
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -887,7 +887,8 @@ A jump table for the options with a short description can be found at |Q_op|.
done with ":syntax on".
*'backspace'* *'bs'*
'backspace' 'bs' string (default "")
'backspace' 'bs' string (default "", set to "indent,eol,start"
in |defaults.vim|)
global
{not in Vi}
Influences the working of <BS>, <Del>, CTRL-W and CTRL-U in Insert
@@ -1103,6 +1104,7 @@ A jump table for the options with a short description can be found at |Q_op|.
v:beval_bufnr number of the buffer in which balloon is going to show
v:beval_winnr number of the window
v:beval_winid ID of the window
v:beval_lnum line number
v:beval_col column number (byte index)
v:beval_text word under or after the mouse pointer
@@ -1426,8 +1428,8 @@ A jump table for the options with a short description can be found at |Q_op|.
Only non-printable keys are allowed.
The key can be specified as a single character, but it is difficult to
type. The preferred way is to use the <> notation. Examples: >
:set cedit=<C-Y>
:set cedit=<Esc>
:exe "set cedit=\<C-Y>"
:exe "set cedit=\<Esc>"
< |Nvi| also has this option, but it only uses the first character.
See |cmdwin|.
@@ -1695,7 +1697,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'compatible'* *'cp'* *'nocompatible'* *'nocp'*
'compatible' 'cp' boolean (default on, off when a |vimrc| or |gvimrc|
file is found)
file is found, reset in |defaults.vim|)
global
{not in Vi}
This option has the effect of making Vim either more Vi-compatible, or
@@ -2622,11 +2624,17 @@ A jump table for the options with a short description can be found at |Q_op|.
Change the way text is displayed. This is comma separated list of
flags:
lastline When included, as much as possible of the last line
in a window will be displayed. When not included, a
last line that doesn't fit is replaced with "@" lines.
in a window will be displayed. "@@@" is put in the
last columns of the last screen line to indicate the
rest of the line is not displayed.
truncate Like "lastline", but "@@@" is displayed in the first
column of the last screen line. Overrules "lastline".
uhex Show unprintable characters hexadecimal as <xx>
instead of using ^C and ~C.
When neither "lastline" or "truncate" is included, a last line that
doesn't fit is replaced with "@" lines.
*'eadirection'* *'ead'*
'eadirection' 'ead' string (default "both")
global
@@ -3336,6 +3344,41 @@ A jump table for the options with a short description can be found at |Q_op|.
It is not allowed to change text or jump to another window while
evaluating 'foldtext' |textlock|.
*'formatexpr'* *'fex'*
'formatexpr' 'fex' string (default "")
local to buffer
{not in Vi}
{not available when compiled without the |+eval|
feature}
Expression which is evaluated to format a range of lines for the |gq|
operator or automatic formatting (see 'formatoptions'). When this
option is empty 'formatprg' is used.
The |v:lnum| variable holds the first line to be formatted.
The |v:count| variable holds the number of lines to be formatted.
The |v:char| variable holds the character that is going to be
inserted if the expression is being evaluated due to
automatic formatting. This can be empty. Don't insert
it yet!
Example: >
:set formatexpr=mylang#Format()
< This will invoke the mylang#Format() function in the
autoload/mylang.vim file in 'runtimepath'. |autoload|
The expression is also evaluated when 'textwidth' is set and adding
text beyond that limit. This happens under the same conditions as
when internal formatting is used. Make sure the cursor is kept in the
same spot relative to the text then! The |mode()| function will
return "i" or "R" in this situation.
When the expression evaluates to non-zero Vim will fall back to using
the internal format mechanism.
The expression will be evaluated in the |sandbox| when set from a
modeline, see |sandbox-option|. That stops the option from working,
since changing the buffer text is not allowed.
*'formatoptions'* *'fo'*
'formatoptions' 'fo' string (Vim default: "tcq", Vi default: "vt")
local to buffer
@@ -3379,41 +3422,6 @@ A jump table for the options with a short description can be found at |Q_op|.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
*'formatexpr'* *'fex'*
'formatexpr' 'fex' string (default "")
local to buffer
{not in Vi}
{not available when compiled without the |+eval|
feature}
Expression which is evaluated to format a range of lines for the |gq|
operator or automatic formatting (see 'formatoptions'). When this
option is empty 'formatprg' is used.
The |v:lnum| variable holds the first line to be formatted.
The |v:count| variable holds the number of lines to be formatted.
The |v:char| variable holds the character that is going to be
inserted if the expression is being evaluated due to
automatic formatting. This can be empty. Don't insert
it yet!
Example: >
:set formatexpr=mylang#Format()
< This will invoke the mylang#Format() function in the
autoload/mylang.vim file in 'runtimepath'. |autoload|
The expression is also evaluated when 'textwidth' is set and adding
text beyond that limit. This happens under the same conditions as
when internal formatting is used. Make sure the cursor is kept in the
same spot relative to the text then! The |mode()| function will
return "i" or "R" in this situation.
When the expression evaluates to non-zero Vim will fall back to using
the internal format mechanism.
The expression will be evaluated in the |sandbox| when set from a
modeline, see |sandbox-option|. That stops the option from working,
since changing the buffer text is not allowed.
*'fsync'* *'fs'* *'nofsync'* *'nofs'*
'fsync' 'fs' boolean (default on)
global
@@ -3718,8 +3726,10 @@ A jump table for the options with a short description can be found at |Q_op|.
screen.
*'guioptions'* *'go'*
'guioptions' 'go' string (default "egmrLtT" (MS-Windows),
"aegimrLtT" (GTK, Motif and Athena))
'guioptions' 'go' string (default "egmrLtT" (MS-Windows, "t" is
removed in |defaults.vim|),
"aegimrLtT" (GTK, Motif and Athena),
)
global
{not in Vi}
{only available when compiled with GUI enabled}
@@ -4041,7 +4051,8 @@ A jump table for the options with a short description can be found at |Q_op|.
NOTE: This option is reset when 'compatible' is set.
*'history'* *'hi'*
'history' 'hi' number (Vim default: 50, Vi default: 0)
'history' 'hi' number (Vim default: 50, Vi default: 0,
set to 200 in |defaults.vim|)
global
{not in Vi}
A history of ":" commands, and a history of previous search patterns
@@ -4293,7 +4304,8 @@ A jump table for the options with a short description can be found at |Q_op|.
evaluating 'includeexpr' |textlock|.
*'incsearch'* *'is'* *'noincsearch'* *'nois'*
'incsearch' 'is' boolean (default off)
'incsearch' 'is' boolean (default off, set in |defaults.vim| if the
+reltime feature is supported)
global
{not in Vi}
{not available when compiled without the
@@ -4677,7 +4689,7 @@ A jump table for the options with a short description can be found at |Q_op|.
< Warning: This deletes all menus that you defined yourself!
*'langnoremap'* *'lnr'* *'nolangnoremap'* *'nolnr'*
'langnoremap' 'lnr' boolean (default off)
'langnoremap' 'lnr' boolean (default off, set in |defaults.vim|)
global
{not in Vi}
{only available when compiled with the |+langmap|
@@ -5143,7 +5155,8 @@ A jump table for the options with a short description can be found at |Q_op|.
set and to the Vim default value when 'compatible' is reset.
*'mouse'* *E538*
'mouse' string (default "", "a" for GUI, MS-DOS and Win32)
'mouse' string (default "", "a" for GUI, MS-DOS and Win32,
set to "a" in |defaults.vim|)
global
{not in Vi}
Enable the use of the mouse. Only works for certain terminals
@@ -5309,7 +5322,8 @@ A jump table for the options with a short description can be found at |Q_op|.
Negative or zero value means no thread scheduling.
*'nrformats'* *'nf'*
'nrformats' 'nf' string (default "bin,octal,hex")
'nrformats' 'nf' string (default "bin,octal,hex",
set to "bin,hex" in |defaults.vim|)
local to buffer
{not in Vi}
This defines what bases Vim will consider for numbers when using the
@@ -5979,7 +5993,7 @@ A jump table for the options with a short description can be found at |Q_op|.
security reasons.
*'ruler'* *'ru'* *'noruler'* *'noru'*
'ruler' 'ru' boolean (default off)
'ruler' 'ru' boolean (default off, set in |defaults.vim|)
global
{not in Vi}
{not available when compiled without the
@@ -6454,6 +6468,8 @@ A jump table for the options with a short description can be found at |Q_op|.
The |FilterReadPre|, |FilterReadPost| and |FilterWritePre|,
|FilterWritePost| autocommands event are not triggered when
'shelltemp' is off.
The `system()` function does not respect this option and always uses
temp files.
*'shelltype'* *'st'*
'shelltype' 'st' number (default 0)
@@ -6610,8 +6626,8 @@ A jump table for the options with a short description can be found at |Q_op|.
"n" flag to 'cpoptions'.
*'showcmd'* *'sc'* *'noshowcmd'* *'nosc'*
'showcmd' 'sc' boolean (Vim default: on, off for Unix, Vi default:
off)
'showcmd' 'sc' boolean (Vim default: on, off for Unix,
Vi default: off, set in |defaults.vim|)
global
{not in Vi}
{not available when compiled without the
@@ -8179,10 +8195,10 @@ A jump table for the options with a short description can be found at |Q_op|.
has been used since the last search command.
*viminfo-n*
n Name of the viminfo file. The name must immediately follow
the 'n'. Must be the last one! If the "-i" argument was
given when starting Vim, that file name overrides the one
given here with 'viminfo'. Environment variables are expanded
when opening the file, not when setting the option.
the 'n'. Must be at the end of the option! If the "-i"
argument was given when starting Vim, that file name overrides
the one given here with 'viminfo'. Environment variables are
expanded when opening the file, not when setting the option.
*viminfo-r*
r Removable media. The argument is a string (up to the next
','). This parameter can be given several times. Each
@@ -8368,7 +8384,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'wildmenu'* *'wmnu'* *'nowildmenu'* *'nowmnu'*
'wildmenu' 'wmnu' boolean (default off)
'wildmenu' 'wmnu' boolean (default off, set in |defaults.vim|)
global
{not in Vi}
{not available if compiled without the |+wildmenu|
@@ -8667,7 +8683,7 @@ A jump table for the options with a short description can be found at |Q_op|.
'writedelay' 'wd' number (default 0)
global
{not in Vi}
The number of microseconds to wait for each character sent to the
The number of milliseconds to wait for each character sent to the
screen. When non-zero, characters are sent to the terminal one by
one. For MS-DOS pcterm this does not work. For debugging purposes.

View File

@@ -1,4 +1,4 @@
*pattern.txt* For Vim version 7.4. Last change: 2016 Apr 26
*pattern.txt* For Vim version 7.4. Last change: 2016 Jun 08
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -954,14 +954,18 @@ $ At end of pattern or in front of "\|", "\)" or "\n" ('magic' on):
< When 'hlsearch' is set and you move the cursor around and make changes
this will clearly show when the match is updated or not.
To match the text up to column 17: >
/.*\%17v
< Column 17 is included, because that's where the "\%17v" matches,
even though this is a |/zero-width| match. Adding a dot to match the
next character has the same result: >
/.*\%17v.
/^.*\%17v
< Column 17 is not included, because this is a |/zero-width| match. To
include the column use: >
/^.*\%17v.
< This command does the same thing, but also matches when there is no
character in column 17: >
/.*\%<18v.
/^.*\%<18v.
< Note that without the "^" to anchor the match in the first column,
this will also highlight column 17: >
/.*\%17v
< Column 17 is highlighted by 'hlsearch' because there is another match
where ".*" matches zero characters.
<
Character classes: {not in Vi}

View File

@@ -1,4 +1,4 @@
*quickfix.txt* For Vim version 7.4. Last change: 2016 Mar 23
*quickfix.txt* For Vim version 7.4. Last change: 2016 Jul 17
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -35,11 +35,13 @@ positions in files. For example, |:vimgrep| finds pattern matches. You can
use the positions in a script with the |getqflist()| function. Thus you can
do a lot more than the edit/compile/fix cycle!
If you are using Manx's Aztec C compiler on the Amiga look here for how to use
it with Vim: |quickfix-manx|. If you are using another compiler you should
save the error messages in a file and start Vim with "vim -q filename". An
easy way to do this is with the |:make| command (see below). The
'errorformat' option should be set to match the error messages from your
If you have the error messages in a file you can start Vim with: >
vim -q filename
From inside Vim an easy way to run a command and handle the output is with the
|:make| command (see below).
The 'errorformat' option should be set to match the error messages from your
compiler (see |errorformat| below).
*location-list* *E776*
@@ -49,8 +51,8 @@ have a separate location list. A location list can be associated with only
one window. The location list is independent of the quickfix list.
When a window with a location list is split, the new window gets a copy of the
location list. When there are no references to a location list, the location
list is destroyed.
location list. When there are no longer any references to a location list,
the location list is destroyed.
The following quickfix commands can be used. The location list commands are
similar to the quickfix commands, replacing the 'c' prefix in the quickfix
@@ -270,11 +272,24 @@ processing a quickfix or location list command, it will be aborted.
The 'switchbuf' settings are respected when jumping
to a buffer.
:cl[ist] +{count} List the current and next {count} valid errors. This
is similar to ":clist from from+count", where "from"
is the current error position.
:cl[ist]! [from] [, [to]]
List all errors.
*:lli* *:llist*
:lli[st] [from] [, [to]]
:cl[ist]! +{count} List the current and next {count} error lines. This
is useful to see unrecognized lines after the current
one. For example, if ":clist" shows:
8384 testje.java:252: error: cannot find symbol ~
Then using ":cl! +3" shows the reason:
8384 testje.java:252: error: cannot find symbol ~
8385: ZexitCode = Fmainx(); ~
8386: ^ ~
8387: symbol: method Fmainx() ~
:lli[st] [from] [, [to]] *:lli* *:llist*
Same as ":clist", except the location list for the
current window is used instead of the quickfix list.
@@ -318,7 +333,7 @@ EXECUTE A COMMAND IN ALL THE BUFFERS IN QUICKFIX OR LOCATION LIST:
etc.
< When the current file can't be |abandon|ed and the [!]
is not present, the command fails.
When an error is detected excecution stops.
When an error is detected execution stops.
The last buffer (or where an error occurred) becomes
the current buffer.
{cmd} can contain '|' to concatenate several commands.
@@ -420,6 +435,17 @@ EXECUTE A COMMAND IN ALL THE BUFFERS IN QUICKFIX OR LOCATION LIST:
*:lw* *:lwindow*
:lw[indow] [height] Same as ":cwindow", except use the window showing the
location list for the current window.
*:cbo* *:cbottom*
:cbo[ttom] Put the cursor in the last line of the quickfix window
and scroll to make it visible. This is useful for
when errors are added by an asynchronous callback.
Only call it once in a while if there are many
updates to avoid a lot of redrawing.
*:lbo* *:lbottom*
:lbo[ttom] Same as ":cbottom", except use the window showing the
location list for the current window.
Normally the quickfix window is at the bottom of the screen. If there are
@@ -457,6 +483,9 @@ expression.
The BufWinEnter event is also triggered, again using "quickfix" for the buffer
name.
Note: When adding to an existing quickfix list the autocommand are not
triggered.
Note: Making changes in the quickfix window has no effect on the list of
errors. 'modifiable' is off to avoid making changes. If you delete or insert
lines anyway, the relation between the text and the error number is messed up.
@@ -501,7 +530,7 @@ lists. They set one of the existing error lists as the current one.
list, an error message is given.
*:lolder* *:lol*
:lol[der] [count] Same as ":colder", except use the location list for
:lol[der] [count] Same as `:colder`, except use the location list for
the current window instead of the quickfix list.
*:cnewer* *:cnew* *E381*
@@ -510,9 +539,20 @@ lists. They set one of the existing error lists as the current one.
list, an error message is given.
*:lnewer* *:lnew*
:lnew[er] [count] Same as ":cnewer", except use the location list for
:lnew[er] [count] Same as `:cnewer`, except use the location list for
the current window instead of the quickfix list.
*:chistory* *:chi*
:chi[story] Show the list of error lists. The current list is
marked with ">". The output looks like:
error list 1 of 3; 43 errors ~
> error list 2 of 3; 0 errors ~
error list 3 of 3; 15 errors ~
*:lhistory* *:lhi*
:lhi[story] Show the list of location lists, otherwise like
`:chistory`.
When adding a new error list, it becomes the current list.
When ":colder" has been used and ":make" or ":grep" is used to add a new error

View File

@@ -1,4 +1,4 @@
*quickref.txt* For Vim version 7.4. Last change: 2016 Apr 29
*quickref.txt* For Vim version 7.4. Last change: 2016 Jun 14
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -831,6 +831,7 @@ Short explanation of each option: *option-list*
'printmbcharset' 'pmbcs' CJK character set to be used for :hardcopy
'printmbfont' 'pmbfn' font names to be used for CJK output of :hardcopy
'printoptions' 'popt' controls the format of :hardcopy output
'prompt' 'prompt' enable prompt in Ex mode
'pumheight' 'ph' maximum height of the popup menu
'pythondll' name of the Python 2 dynamic library
'pythonthreedll' name of the Python 3 dynamic library

View File

@@ -1,4 +1,4 @@
*repeat.txt* For Vim version 7.4. Last change: 2016 May 24
*repeat.txt* For Vim version 7.4. Last change: 2016 Jul 21
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -295,7 +295,9 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
... not converted ...
< When conversion isn't supported by the system, there
is no error message and no conversion is done.
is no error message and no conversion is done. When a
line can't be converted there is no error and the
original line is kept.
Don't use "ucs-2" or "ucs-4", scripts cannot be in
these encodings (they would contain NUL bytes).
@@ -541,7 +543,7 @@ whether Vim supports a feature or a dependency is missing.
You can also load an optional plugin at startup, by putting this command in
your |.vimrc|: >
:packadd! foodebug
The extra "!" is so that the plugin isn't loaded with Vim was started with
The extra "!" is so that the plugin isn't loaded if Vim was started with
|--noplugin|.
It is perfectly normal for a package to only have files in the "opt"
@@ -620,7 +622,7 @@ the command after changing the plugin help: >
Dependencies between plugins ~
*packload-two-steps*
Suppose you have a two plugins that depend on the same functionality. You can
Suppose you have two plugins that depend on the same functionality. You can
put the common functionality in an autoload directory, so that it will be
found automatically. Your package would have these files:

View File

@@ -1,4 +1,4 @@
*starting.txt* For Vim version 7.4. Last change: 2016 Apr 22
*starting.txt* For Vim version 7.4. Last change: 2016 Jul 28
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -806,13 +806,13 @@ accordingly. Vim proceeds in this order:
For the Macintosh the $VIMRUNTIME/macmap.vim is read.
*VIMINIT* *.vimrc* *_vimrc* *EXINIT* *.exrc* *_exrc* *$MYVIMRC*
c. Four places are searched for initializations. The first that exists
c. Five places are searched for initializations. The first that exists
is used, the others are ignored. The $MYVIMRC environment variable is
set to the file that was first found, unless $MYVIMRC was already set
and when using VIMINIT.
- The environment variable VIMINIT (see also |compatible-default|) (*)
The value of $VIMINIT is used as an Ex command line.
- The user vimrc file(s):
I The environment variable VIMINIT (see also |compatible-default|) (*)
The value of $VIMINIT is used as an Ex command line.
II The user vimrc file(s):
"$HOME/.vimrc" (for Unix and OS/2) (*)
"$HOME/.vim/vimrc" (for Unix and OS/2) (*)
"s:.vimrc" (for Amiga) (*)
@@ -829,13 +829,14 @@ accordingly. Vim proceeds in this order:
Note: For MS-DOS and Win32, "$HOME" is checked first. If no
"_vimrc" or ".vimrc" is found there, "$VIM" is tried.
See |$VIM| for when $VIM is not set.
- The environment variable EXINIT.
The value of $EXINIT is used as an Ex command line.
- The user exrc file(s). Same as for the user vimrc file, but with
"vimrc" replaced by "exrc". But only one of ".exrc" and "_exrc" is
used, depending on the system. And without the (*)!
- You would usually have "syntax on" and/or "filetype on" commands,
which trigger initializing filetype detection, see |syntax-loading|.
III The environment variable EXINIT.
The value of $EXINIT is used as an Ex command line.
IV The user exrc file(s). Same as for the user vimrc file, but with
"vimrc" replaced by "exrc". But only one of ".exrc" and "_exrc" is
used, depending on the system. And without the (*)!
V The default vimrc file, $VIMRUNTIME/defaults.vim. This sets up
options values and has "syntax on" and "filetype on" commands,
which is what most new users will want. See |defaults.vim|.
d. If the 'exrc' option is on (which is not the default), the current
directory is searched for three files. The first that exists is used,
@@ -912,6 +913,9 @@ accordingly. Vim proceeds in this order:
The |v:vim_did_enter| variable is set to 1.
The |VimEnter| autocommands are executed.
The $MYVIMRC or $MYGVIMRC file will be set to the first found vimrc and/or
gvimrc file.
Some hints on using initializations:
Standard setup:
@@ -958,16 +962,29 @@ problems if you have a file with only <NL>s and have a line like
*compatible-default*
When Vim starts, the 'compatible' option is on. This will be used when Vim
starts its initializations. But as soon as a user vimrc file is found, or a
vimrc file in the current directory, or the "VIMINIT" environment variable is
set, it will be set to 'nocompatible'. This has the side effect of setting or
resetting other options (see 'compatible'). But only the options that have
not been set or reset will be changed. This has the same effect like the
value of 'compatible' had this value when starting Vim. Note that this
doesn't happen for the system-wide vimrc file nor when Vim was started with
the |-u| command line argument. It does also happen for gvimrc files. The
$MYVIMRC or $MYGVIMRC file will be set to the first found vimrc and/or gvimrc
file.
starts its initializations. But as soon as:
- a user vimrc file is found, or
- a vimrc file in the current directory, or
- the "VIMINIT" environment variable is set, or
- the "-N" command line argument is given, or
even when no vimrc file exists.
- the |defaults.vim| script is loaded, or
- gvimrc file was found,
then it will be set to 'nocompatible'.
Note that this does NOT happen when a system-wide vimrc file was found.
This has the side effect of setting or resetting other options (see
'compatible'). But only the options that have not been set or reset will be
changed. This has the same effect like the value of 'compatible' had this
value when starting Vim.
'compatible is NOT reset, and |defaults.vim| is not loaded:
- when Vim was started with the |-u| command line argument, especially with
"-u NONE", or
- when started with the |-C| command line argument, or
- when the name of the executable ends in "ex". (This has been done to make
Vim behave like "ex", when it is started as "ex")
But there is a side effect of setting or resetting 'compatible' at the moment
a .vimrc file is found: Mappings are interpreted the moment they are
@@ -975,16 +992,24 @@ encountered. This makes a difference when using things like "<CR>". If the
mappings depend on a certain value of 'compatible', set or reset it before
giving the mapping.
The above behavior can be overridden in these ways:
- If the "-N" command line argument is given, 'nocompatible' will be used,
even when no vimrc file exists.
- If the "-C" command line argument is given, 'compatible' will be used, even
when a vimrc file exists.
- If the "-u {vimrc}" argument is used, 'compatible' will be used.
- When the name of the executable ends in "ex", then this works like the "-C"
argument was given: 'compatible' will be used, even when a vimrc file
exists. This has been done to make Vim behave like "ex", when it is started
as "ex".
*defaults.vim*
If Vim is started normally and no user vimrc file is found, the
$VIMRUTIME/defaults.vim script is loaded. This will set 'compatible' off,
switch on syntax highlighting and a few more things. See the script for
details. NOTE: this is done since Vim 8.0, not in Vim 7.4. (it was added in
patch 7.4.2111 to be exact).
This should work well for new Vim users. If you create your own .vimrc, it is
recommended to add this line somewhere near the top: >
source $VIMRUNTIME/defaults.vim
Then Vim works like before you had a .vimrc. Copying $VIMRUNTIME/vimrc_example
is way to do this. Alternatively, you can copy defaults.vim to your .vimrc
and modify it.
If you don't like some of the defaults, you can still source defaults.vim and
revert individual settings. See the defaults.vim file for hints on how to
revert each item.
Avoiding trojan horses: *trojan-horse*
While reading the "vimrc" or the "exrc" file in the current directory, some
@@ -1413,6 +1438,34 @@ file (it's actually merged with the existing one, if one exists). The
'viminfo' option is a string containing information about what info should be
stored, and contains limits on how much should be stored (see 'viminfo').
Merging happens in two ways. Most items that have been changed or set in the
current Vim session are stored, and what was not changed is filled from what
is currently in the viminfo file. For example:
- Vim session A reads the viminfo, which contains variable START.
- Vim session B does the same
- Vim session A sets the variables AAA and BOTH and exits
- Vim session B sets the variables BBB and BOTH and exits
Now the viminfo will have:
START - it was in the viminfo and wasn't changed in session A or B
AAA - value from session A, session B kept it
BBB - value from session B
BOTH - value from session B, value from session A is lost
*viminfo-timestamp*
For some items a timestamp is used to keep the last changed version. Here it
doesn't matter in which sequence Vim sessions exit, the newest item(s) are
always kept. This is used for:
- The command line history.
- The search string history.
- The input-line history.
- Contents of non-empty registers.
- The jump list
- File marks
The timestamp feature was added before Vim 8.0. Older versions of Vim,
starting with 7.4.1131, will keep the items with timestamp, but not use them.
Thus when using both an older and a newer version of Vim the most recent data
will be kept.
Notes for Unix:
- The file protection for the viminfo file will be set to prevent other users
from being able to read it, because it may contain any text or commands that
@@ -1535,14 +1588,14 @@ most of the information will be restored).
already set (registers, marks, |v:oldfiles|, etc.)
will be overwritten {not in Vi}
*:wv* *:wviminfo* *E137* *E138* *E574* *E886*
*:wv* *:wviminfo* *E137* *E138* *E574* *E886* *E929*
:wv[iminfo][!] [file] Write to viminfo file [file] (default: see above).
The information in the file is first read in to make
a merge between old and new info. When [!] is used,
the old information is not read first, only the
internal info is written. If 'viminfo' is empty, marks
for up to 100 files will be written.
When you get error "E138: Can't write viminfo file"
When you get error "E929: Too many viminfo temp files"
check that no old temp files were left behind (e.g.
~/.viminf*) and that you can write in the directory of
the .viminfo file.

View File

@@ -1,4 +1,4 @@
*syntax.txt* For Vim version 7.4. Last change: 2016 Apr 10
*syntax.txt* For Vim version 7.4. Last change: 2016 May 28
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1043,6 +1043,21 @@ This works immediately.
CLOJURE *ft-clojure-syntax*
The default syntax groups can be augmented through the
*g:clojure_syntax_keywords* and *b:clojure_syntax_keywords* variables. The
value should be a |Dictionary| of syntax group names to a |List| of custom
identifiers:
>
let g:clojure_syntax_keywords = {
\ 'clojureMacro': ["defproject", "defcustom"],
\ 'clojureFunc': ["string/join", "string/replace"]
\ }
<
Refer to the Clojure syntax script for valid syntax group names.
If the |buffer-variable| *b:clojure_syntax_without_core_keywords* is set, only
language constants and special forms are matched.
Setting *g:clojure_fold* enables folding Clojure code via the syntax engine.
Any list, vector, or map that extends over more than one line can be folded
using the standard Vim |fold-commands|.
@@ -4779,6 +4794,10 @@ font={font-name} *highlight-font*
All fonts used, except for Menu and Tooltip, should be of the same
character size as the default font! Otherwise redrawing problems will
occur.
To use a font name with an embedded space or other special character,
put it in single quotes. The single quote cannot be used then.
Example: >
:hi comment font='Monospace 10'
guifg={color-name} *highlight-guifg*
guibg={color-name} *highlight-guibg*

View File

@@ -1260,6 +1260,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
+mzscheme various.txt /*+mzscheme*
+mzscheme/dyn various.txt /*+mzscheme\/dyn*
+netbeans_intg various.txt /*+netbeans_intg*
+num64 various.txt /*+num64*
+ole various.txt /*+ole*
+packages various.txt /*+packages*
+path_extra various.txt /*+path_extra*
@@ -2040,6 +2041,8 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:cat eval.txt /*:cat*
:catch eval.txt /*:catch*
:cb quickfix.txt /*:cb*
:cbo quickfix.txt /*:cbo*
:cbottom quickfix.txt /*:cbottom*
:cbuffer quickfix.txt /*:cbuffer*
:cc quickfix.txt /*:cc*
:ccl quickfix.txt /*:ccl*
@@ -2071,9 +2074,13 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:checkpath tagsrch.txt /*:checkpath*
:checkt editing.txt /*:checkt*
:checktime editing.txt /*:checktime*
:chi quickfix.txt /*:chi*
:chistory quickfix.txt /*:chistory*
:cl quickfix.txt /*:cl*
:cla quickfix.txt /*:cla*
:clast quickfix.txt /*:clast*
:cle motion.txt /*:cle*
:clearjumps motion.txt /*:clearjumps*
:clist quickfix.txt /*:clist*
:clo windows.txt /*:clo*
:close windows.txt /*:close*
@@ -2390,6 +2397,8 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:lat undo.txt /*:lat*
:later undo.txt /*:later*
:lb quickfix.txt /*:lb*
:lbo quickfix.txt /*:lbo*
:lbottom quickfix.txt /*:lbottom*
:lbuffer quickfix.txt /*:lbuffer*
:lc editing.txt /*:lc*
:lcd editing.txt /*:lcd*
@@ -2434,6 +2443,8 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:lgrepadd quickfix.txt /*:lgrepadd*
:lh helphelp.txt /*:lh*
:lhelpgrep helphelp.txt /*:lhelpgrep*
:lhi quickfix.txt /*:lhi*
:lhistory quickfix.txt /*:lhistory*
:list various.txt /*:list*
:ll quickfix.txt /*:ll*
:lla quickfix.txt /*:lla*
@@ -3360,6 +3371,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
<line1> map.txt /*<line1>*
<line2> map.txt /*<line2>*
<lt> intro.txt /*<lt>*
<mods> map.txt /*<mods>*
<nomodeline> autocmd.txt /*<nomodeline>*
<q-args> map.txt /*<q-args>*
<reg> map.txt /*<reg>*
@@ -4451,7 +4463,10 @@ E925 quickfix.txt /*E925*
E926 quickfix.txt /*E926*
E927 eval.txt /*E927*
E928 eval.txt /*E928*
E929 starting.txt /*E929*
E93 windows.txt /*E93*
E930 eval.txt /*E930*
E931 message.txt /*E931*
E94 windows.txt /*E94*
E95 message.txt /*E95*
E96 diff.txt /*E96*
@@ -4467,6 +4482,7 @@ Ex intro.txt /*Ex*
Ex-mode intro.txt /*Ex-mode*
Exuberant_ctags tagsrch.txt /*Exuberant_ctags*
F motion.txt /*F*
FALSE eval.txt /*FALSE*
FAQ intro.txt /*FAQ*
Farsi farsi.txt /*Farsi*
FileAppendCmd autocmd.txt /*FileAppendCmd*
@@ -4681,11 +4697,14 @@ TOhtml-encoding-detect syntax.txt /*TOhtml-encoding-detect*
TOhtml-performance syntax.txt /*TOhtml-performance*
TOhtml-uncopyable-text syntax.txt /*TOhtml-uncopyable-text*
TOhtml-wrap-text syntax.txt /*TOhtml-wrap-text*
TRUE eval.txt /*TRUE*
TSQL ft_sql.txt /*TSQL*
TTpro-telnet syntax.txt /*TTpro-telnet*
Tab intro.txt /*Tab*
TabClosed autocmd.txt /*TabClosed*
TabEnter autocmd.txt /*TabEnter*
TabLeave autocmd.txt /*TabLeave*
TabNew autocmd.txt /*TabNew*
Tcl if_tcl.txt /*Tcl*
TermChanged autocmd.txt /*TermChanged*
TermResponse autocmd.txt /*TermResponse*
@@ -4731,6 +4750,7 @@ WWW intro.txt /*WWW*
Win32 os_win32.txt /*Win32*
WinEnter autocmd.txt /*WinEnter*
WinLeave autocmd.txt /*WinLeave*
WinNew autocmd.txt /*WinNew*
X change.txt /*X*
X11 options.txt /*X11*
X11-icon gui_x11.txt /*X11-icon*
@@ -4916,7 +4936,6 @@ added-win32-GUI version5.txt /*added-win32-GUI*
aff-dic-format spell.txt /*aff-dic-format*
after-directory options.txt /*after-directory*
aleph options.txt /*aleph*
alloc_fail() eval.txt /*alloc_fail()*
alt intro.txt /*alt*
alt-input debugger.txt /*alt-input*
alternate-file editing.txt /*alternate-file*
@@ -4949,6 +4968,7 @@ assert_equal() eval.txt /*assert_equal()*
assert_exception() eval.txt /*assert_exception()*
assert_fails() eval.txt /*assert_fails()*
assert_false() eval.txt /*assert_false()*
assert_inrange() eval.txt /*assert_inrange()*
assert_match() eval.txt /*assert_match()*
assert_notequal() eval.txt /*assert_notequal()*
assert_notmatch() eval.txt /*assert_notmatch()*
@@ -4996,6 +5016,8 @@ b motion.txt /*b*
b: eval.txt /*b:*
b:changedtick eval.txt /*b:changedtick*
b:changelog_name filetype.txt /*b:changelog_name*
b:clojure_syntax_keywords syntax.txt /*b:clojure_syntax_keywords*
b:clojure_syntax_without_core_keywords syntax.txt /*b:clojure_syntax_without_core_keywords*
b:current_syntax-variable syntax.txt /*b:current_syntax-variable*
b:netrw_lastfile pi_netrw.txt /*b:netrw_lastfile*
b:tex_stylish syntax.txt /*b:tex_stylish*
@@ -5037,6 +5059,7 @@ beval_bufnr-variable eval.txt /*beval_bufnr-variable*
beval_col-variable eval.txt /*beval_col-variable*
beval_lnum-variable eval.txt /*beval_lnum-variable*
beval_text-variable eval.txt /*beval_text-variable*
beval_winid-variable eval.txt /*beval_winid-variable*
beval_winnr-variable eval.txt /*beval_winnr-variable*
bitwise-function usr_41.txt /*bitwise-function*
blockwise-examples visual.txt /*blockwise-examples*
@@ -5069,6 +5092,7 @@ buflisted() eval.txt /*buflisted()*
bufloaded() eval.txt /*bufloaded()*
bufname() eval.txt /*bufname()*
bufnr() eval.txt /*bufnr()*
bufwinid() eval.txt /*bufwinid()*
bufwinnr() eval.txt /*bufwinnr()*
bug-fixes-5 version5.txt /*bug-fixes-5*
bug-fixes-6 version6.txt /*bug-fixes-6*
@@ -5243,6 +5267,7 @@ channel-callback channel.txt /*channel-callback*
channel-close channel.txt /*channel-close*
channel-commands channel.txt /*channel-commands*
channel-demo channel.txt /*channel-demo*
channel-functions usr_41.txt /*channel-functions*
channel-mode channel.txt /*channel-mode*
channel-more channel.txt /*channel-more*
channel-open channel.txt /*channel-open*
@@ -5619,7 +5644,6 @@ dip motion.txt /*dip*
dircolors.vim syntax.txt /*dircolors.vim*
dis motion.txt /*dis*
disable-menus gui.txt /*disable-menus*
disable_char_avail_for_testing() eval.txt /*disable_char_avail_for_testing()*
discard editing.txt /*discard*
distribute-script usr_41.txt /*distribute-script*
distribution intro.txt /*distribution*
@@ -5740,6 +5764,7 @@ exception-variable eval.txt /*exception-variable*
exclusive motion.txt /*exclusive*
exclusive-linewise motion.txt /*exclusive-linewise*
executable() eval.txt /*executable()*
execute() eval.txt /*execute()*
execute-menus gui.txt /*execute-menus*
exepath() eval.txt /*exepath()*
exim starting.txt /*exim*
@@ -5795,6 +5820,7 @@ expr-is? eval.txt /*expr-is?*
expr-isnot eval.txt /*expr-isnot*
expr-isnot# eval.txt /*expr-isnot#*
expr-isnot? eval.txt /*expr-isnot?*
expr-lambda eval.txt /*expr-lambda*
expr-nesting eval.txt /*expr-nesting*
expr-number eval.txt /*expr-number*
expr-option eval.txt /*expr-option*
@@ -6142,6 +6168,7 @@ g:clojure_fuzzy_indent_blacklist indent.txt /*g:clojure_fuzzy_indent_blacklist*
g:clojure_fuzzy_indent_patterns indent.txt /*g:clojure_fuzzy_indent_patterns*
g:clojure_maxlines indent.txt /*g:clojure_maxlines*
g:clojure_special_indent_words indent.txt /*g:clojure_special_indent_words*
g:clojure_syntax_keywords syntax.txt /*g:clojure_syntax_keywords*
g:colors_name options.txt /*g:colors_name*
g:decada ft_ada.txt /*g:decada*
g:decada.Error_Format ft_ada.txt /*g:decada.Error_Format*
@@ -6367,6 +6394,7 @@ getcmdline() eval.txt /*getcmdline()*
getcmdpos() eval.txt /*getcmdpos()*
getcmdtype() eval.txt /*getcmdtype()*
getcmdwintype() eval.txt /*getcmdwintype()*
getcompletion() eval.txt /*getcompletion()*
getcurpos() eval.txt /*getcurpos()*
getcwd() eval.txt /*getcwd()*
getfontname() eval.txt /*getfontname()*
@@ -6894,6 +6922,7 @@ job-control channel.txt /*job-control*
job-err_cb channel.txt /*job-err_cb*
job-err_io channel.txt /*job-err_io*
job-exit_cb channel.txt /*job-exit_cb*
job-functions usr_41.txt /*job-functions*
job-in_io channel.txt /*job-in_io*
job-options channel.txt /*job-options*
job-out_cb channel.txt /*job-out_cb*
@@ -6952,6 +6981,7 @@ l: eval.txt /*l:*
l:var eval.txt /*l:var*
lCursor mbyte.txt /*lCursor*
lace.vim syntax.txt /*lace.vim*
lambda eval.txt /*lambda*
lang-variable eval.txt /*lang-variable*
language-mapping map.txt /*language-mapping*
last-pattern pattern.txt /*last-pattern*
@@ -7187,6 +7217,7 @@ mouse-using term.txt /*mouse-using*
mouse_col-variable eval.txt /*mouse_col-variable*
mouse_lnum-variable eval.txt /*mouse_lnum-variable*
mouse_win-variable eval.txt /*mouse_win-variable*
mouse_winid-variable eval.txt /*mouse_winid-variable*
movement intro.txt /*movement*
ms-dos os_msdos.txt /*ms-dos*
msdos os_msdos.txt /*msdos*
@@ -8401,9 +8432,11 @@ t_ZH term.txt /*t_ZH*
t_ZR term.txt /*t_ZR*
t_al term.txt /*t_al*
t_bc term.txt /*t_bc*
t_bool-varialble eval.txt /*t_bool-varialble*
t_cd term.txt /*t_cd*
t_cdl version4.txt /*t_cdl*
t_ce term.txt /*t_ce*
t_channel-varialble eval.txt /*t_channel-varialble*
t_ci version4.txt /*t_ci*
t_cil version4.txt /*t_cil*
t_cl term.txt /*t_cl*
@@ -8415,6 +8448,7 @@ t_cv version4.txt /*t_cv*
t_cvv version4.txt /*t_cvv*
t_da term.txt /*t_da*
t_db term.txt /*t_db*
t_dict-varialble eval.txt /*t_dict-varialble*
t_dl term.txt /*t_dl*
t_ed version4.txt /*t_ed*
t_el version4.txt /*t_el*
@@ -8428,9 +8462,12 @@ t_f6 version4.txt /*t_f6*
t_f7 version4.txt /*t_f7*
t_f8 version4.txt /*t_f8*
t_f9 version4.txt /*t_f9*
t_float-varialble eval.txt /*t_float-varialble*
t_fs term.txt /*t_fs*
t_func-varialble eval.txt /*t_func-varialble*
t_help version4.txt /*t_help*
t_il version4.txt /*t_il*
t_job-varialble eval.txt /*t_job-varialble*
t_k1 term.txt /*t_k1*
t_k2 term.txt /*t_k2*
t_k3 term.txt /*t_k3*
@@ -8455,12 +8492,15 @@ t_kr term.txt /*t_kr*
t_ks term.txt /*t_ks*
t_ku term.txt /*t_ku*
t_le term.txt /*t_le*
t_list-varialble eval.txt /*t_list-varialble*
t_mb term.txt /*t_mb*
t_md term.txt /*t_md*
t_me term.txt /*t_me*
t_mr term.txt /*t_mr*
t_ms term.txt /*t_ms*
t_nd term.txt /*t_nd*
t_none-varialble eval.txt /*t_none-varialble*
t_number-varialble eval.txt /*t_number-varialble*
t_op term.txt /*t_op*
t_se term.txt /*t_se*
t_sf1 version4.txt /*t_sf1*
@@ -8480,6 +8520,7 @@ t_sku version4.txt /*t_sku*
t_so term.txt /*t_so*
t_sr term.txt /*t_sr*
t_star7 term.txt /*t_star7*
t_string-varialble eval.txt /*t_string-varialble*
t_tb version4.txt /*t_tb*
t_te term.txt /*t_te*
t_ti term.txt /*t_ti*
@@ -8612,6 +8653,9 @@ terminal-options term.txt /*terminal-options*
terminfo term.txt /*terminfo*
termresponse-variable eval.txt /*termresponse-variable*
test-functions usr_41.txt /*test-functions*
test_alloc_fail() eval.txt /*test_alloc_fail()*
test_autochdir() eval.txt /*test_autochdir()*
test_disable_char_avail() eval.txt /*test_disable_char_avail()*
test_garbagecollect_now() eval.txt /*test_garbagecollect_now()*
test_null_channel() eval.txt /*test_null_channel()*
test_null_dict() eval.txt /*test_null_dict()*
@@ -8619,6 +8663,7 @@ test_null_job() eval.txt /*test_null_job()*
test_null_list() eval.txt /*test_null_list()*
test_null_partial() eval.txt /*test_null_partial()*
test_null_string() eval.txt /*test_null_string()*
test_settime() eval.txt /*test_settime()*
testing-variable eval.txt /*testing-variable*
tex-cchar syntax.txt /*tex-cchar*
tex-cole syntax.txt /*tex-cole*
@@ -8649,6 +8694,7 @@ throw-from-catch eval.txt /*throw-from-catch*
throw-variables eval.txt /*throw-variables*
throwpoint-variable eval.txt /*throwpoint-variable*
time-functions usr_41.txt /*time-functions*
timer-functions usr_41.txt /*timer-functions*
timer_start() eval.txt /*timer_start()*
timer_stop() eval.txt /*timer_stop()*
timestamp editing.txt /*timestamp*
@@ -8761,6 +8807,7 @@ v:beval_bufnr eval.txt /*v:beval_bufnr*
v:beval_col eval.txt /*v:beval_col*
v:beval_lnum eval.txt /*v:beval_lnum*
v:beval_text eval.txt /*v:beval_text*
v:beval_winid eval.txt /*v:beval_winid*
v:beval_winnr eval.txt /*v:beval_winnr*
v:char eval.txt /*v:char*
v:charconvert_from eval.txt /*v:charconvert_from*
@@ -8795,6 +8842,7 @@ v:lnum eval.txt /*v:lnum*
v:mouse_col eval.txt /*v:mouse_col*
v:mouse_lnum eval.txt /*v:mouse_lnum*
v:mouse_win eval.txt /*v:mouse_win*
v:mouse_winid eval.txt /*v:mouse_winid*
v:none eval.txt /*v:none*
v:null eval.txt /*v:null*
v:oldfiles eval.txt /*v:oldfiles*
@@ -8815,6 +8863,17 @@ v:statusmsg eval.txt /*v:statusmsg*
v:swapchoice eval.txt /*v:swapchoice*
v:swapcommand eval.txt /*v:swapcommand*
v:swapname eval.txt /*v:swapname*
v:t_TYPE eval.txt /*v:t_TYPE*
v:t_bool eval.txt /*v:t_bool*
v:t_channel eval.txt /*v:t_channel*
v:t_dict eval.txt /*v:t_dict*
v:t_float eval.txt /*v:t_float*
v:t_func eval.txt /*v:t_func*
v:t_job eval.txt /*v:t_job*
v:t_list eval.txt /*v:t_list*
v:t_none eval.txt /*v:t_none*
v:t_number eval.txt /*v:t_number*
v:t_string eval.txt /*v:t_string*
v:termresponse eval.txt /*v:termresponse*
v:testing eval.txt /*v:testing*
v:this_session eval.txt /*v:this_session*
@@ -8935,6 +8994,7 @@ v_v visual.txt /*v_v*
v_x change.txt /*v_x*
v_y change.txt /*v_y*
v_~ change.txt /*v_~*
vab motion.txt /*vab*
val-variable eval.txt /*val-variable*
valgrind debug.txt /*valgrind*
values() eval.txt /*values()*
@@ -8982,6 +9042,7 @@ vi intro.txt /*vi*
vi-differences vi_diff.txt /*vi-differences*
vi: options.txt /*vi:*
vi_diff.txt vi_diff.txt /*vi_diff.txt*
vib motion.txt /*vib*
view starting.txt /*view*
view-diffs diff.txt /*view-diffs*
view-file starting.txt /*view-file*
@@ -9037,6 +9098,7 @@ viminfo-r options.txt /*viminfo-r*
viminfo-read starting.txt /*viminfo-read*
viminfo-read-write starting.txt /*viminfo-read-write*
viminfo-s options.txt /*viminfo-s*
viminfo-timestamp starting.txt /*viminfo-timestamp*
viminfo-write starting.txt /*viminfo-write*
vimrc starting.txt /*vimrc*
vimrc-filetype usr_05.txt /*vimrc-filetype*

View File

@@ -1,4 +1,4 @@
*todo.txt* For Vim version 7.4. Last change: 2016 May 24
*todo.txt* For Vim version 7.4. Last change: 2016 Jul 23
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -34,49 +34,12 @@ not be repeated below, unless there is extra information.
*known-bugs*
-------------------- Known bugs and current work -----------------------
Close_cb crash. (Luc Hermitte, 2016 May 10)
Stack trace by Dominique, May 10.
Reference count in partial dict wrong?
Any other callbacks that could be invoked at the wrong moment?
If removing buffer that's being read from, close channel?
Problem with "Ignore" after adding 'guicolors'. (Charles Campbell, 2016 Apr
27)
In test_partial when start_job() has a non-existing command memory (a dict
item) leaks.
Memory leak in test49
Memory leak in test_alot, with matchstrpos()
Packages:
- Add the "after" directory to 'runtimepath', only if it exists.
(Greg Hurrell, May 1)
- Also keep a list of loaded plugins, skip when encountered again?
Vim.org: when a user already has a homepage, do show the field so that it can
be deleted.
Comparing partials doesn't work well. (Nikolai Pavlov, 2016 May 17, #813)
Examples in the form of a test (May 19)
+channel:
- Feedback from Ramel Eshed, May 7. Occasional crashes.
- Close_cb isn't invoked when output goes to a buffer. (Luc Hermitte)
- close_cb and exit_cb not invoked when using jo_stop() on Windows.
(Linwei, 2016 May 18, #817)
Similar problem, related to keeping reference to job. (Skywind, May 18)
- Recursive callback call? (Luc Hermitte, 2016 May 17)
- GUI:cursor blinking is irregular when invoking callbacks. (Ramel Eshed, 2016
Apr 16) somehow remember the previous state?
- Channel test fails with Motif. Sometimes kills the X11 server.
- When a message in the queue but there is no callback, drop it after a while?
Add timestamp to queued messages and callbacks with ID, remove after a
minute. Option to set the droptime.
- Inefficiency in ch_read() with very long lines. Reallocating buffer with
small increments in channel_collapse(). Avoid calling strlen() too often.
Add an option to drop text of very long lines? Default to 1 Mbyte.
- Add an option to drop text of very long lines? Default to 1 Mbyte.
- Add remark about undo sync, is there a way to force it?
- When starting a job, have an option to open the server socket, so we know
the port, and pass it to the command with --socket-fd {nr}. (Olaf Dabrunz,
@@ -87,8 +50,6 @@ Later
- job_start(): run job in a newly opened terminal.
With xterm could use -S{pty}.
Make it so that the window ID can be used where currently a window nr is used
Regexp problems:
- Since 7.4.704 the old regex engine fails to match [[:print:]] in 0xf6.
(Manuel Ortega, 2016 Apr 24)
@@ -135,65 +96,93 @@ Regexp problems:
- The pattern "\1" with the old engine gives E65, with the new engine it
matches the empty string. (Dominique Pelle, 2015 Oct 2, Nov 24)
- Search for \\~ causes error E874.
- Search for /\%d0\+ causes error E363 in a file with consecutive NUL
characters. (Christian Brabandt, 2016 Jun 7)
Using freed memory in quickfix code. (Dominique, 2016 Mar 21)
User commands: add a <> item to pass on command modifiers, such as ":tab".
jsonencode(): should convert to utf-8. (Nikolai Pavlov, 2016 Jan 23)
json_encode(): should convert to utf-8. (Nikolai Pavlov, 2016 Jan 23)
What if there is an invalid character?
Should json_encode()/json_decode() restrict recursiveness?
Or avoid recursiveness.
Patch to test popupmenu. Fails, possibly due to a bug.
(Christian Brabandt, 2016 Jul 23)
7 In "-- INSERT (lang) --" show the name of the keymap used instead of
"lang". (Ilya Dogolazky)
Patch: Show keymap name in mode indicator (Dmitri Vereshchagin, 2016 Jul 19,
#933)
Patch to fix the Problem using cgn to change a search hit when
replacement includes hit. Reported by John Beckett, fix by Christian Brabandt,
2016 Jan 11.
Once .exe with updated installer is available: Add remark to download page
about /S and /D options (Ken Takata, 2016 Apr 13)
Or point to nightly builds: https://github.com/vim/vim-win32-installer/releases
Patch to make cursor blinking work better with GTK3. (Kazunobu Kuriyama, 2016
Apr 19) Need to check this works on Linux.
Alternative:
- add gui_restart_blink flag, set when key typed.
- in gui_mch_start_blink(): continue if possible.
- in gui_mch_stop_blink(): remember last state.
Problem with completion on "**/" in $path. (issue #932)
Happens in uniquefy_paths() ? More info Jul 22.
Fix for this (Harm te Hennepe, 2016 Jul 21, #939)
Cursor positioned in the wrong place when editing src/testdir/test_viml.vim.
Javascript indent wrong after /* in single quoted string:
var SRC = 'src/*.js';
function log(tag) {
a = b;
}
Use ADDR_OTHER instead of ADDR_LINES for many more commands.
Add tests for using number larger than number of lines in buffer.
Patch to fix escaping special characters for delete(). (tc-0, 2016 Mar 20,
#700) Test fails on MS-Windows.
Updating marks in quickfix list is broken. (Yegappan, 2016 Jul 18)
Invalid behavior with NULL list. (Nikolai Pavlov, #768)
Patch to fix using CTRL-] on "{address}." in help. (Hirohito Higashi, 2016 May
18, #814)
Patch to reduce number of memory allocations for quickfix lines.
(Yegappan Lakshmanan, 2016 May 22, #831)
Patch to fix greying popup menu items. (Shane Harper, 2016 May 23, #834)
&t_ut not used with 'termguicolors' is set. (Jacob Niehus, 2016 May 14, #804)
Patch to fix this, Jacob Niehus, 2016 May 14, #805)
For current Windows build .pdb file is missing. (Gabriele Fava, 2016 May 11)
5)
Support closure for lambda? Ken Takata is working on it.
Patch Jul 19. Still need test updates.
Problem with whitespace in errorformat. (Gerd Wachsmuth, 2016 May 15, #807)
When 'autochdir' is set, writing new file does not change the current dir.
(Dan Church, issue #777)
Patch to fix this. (mister fish (Allen Haim), 2016 May 14, #803)
Undo problem: "g-" doesn't go back, gets stuck. (Björn Linse, 2016 Jul 18)
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)
Second one. Update May 22.
Update by Daniel Hahler, 2014 Jul 4, Aug 14, Oct 14, Oct 15.
Rethink this: can we add an argument to setqflist() and getqflist() for these
extra items?
Patch to add filtering of the quickfix list. (Yegappan Lakshmanan, 2016 Mar
13, last version) Update June 26, #830.
Instead use a Vim script implementation, invoked from a Vim command.
ml_get errors when reloading file. (Chris Desjardins, 2016 Apr 19)
Also with latest version.
Patch to load rgb.txt once. (Christian Brabandt, 2016 Apr 29)
Still problems with 'emoji'. See issue #721. Patch 7.4.1697 half-fixes it.
Avoid PLAN_WRITE in windgoto() ?
Should already never use utf-8 chars to position the cursor.
Cannot delete a file with square brackets with delete(). (#696)
Patch to add TabNew, TabNewEntered and TabClosed autocommand events.
(Felipe Morales, 2015 Feb 1)
No autocommand for when changing directory. Patch from allen haim, 2016 Jun
27, #888
Justin M Keyes: use "global" or "window" for the pattern. Can add "tab"
later.
MS-Windows: use WS_HIDE instead of SW_SHOWMINNOACTIVE in os_win32.c?
Otherwise task flickers in taskbar.
Should make ":@r" handle line continuation. (Cesar Romani, 2016 Jun 26)
Also for ":@.".
Repeating 'opfunc' in a function only works once. (Tarmean, 2016 Jul 15, #925)
Patch on issue #728 by Christian Brabandt, 2016 Apr 7. Update with test: Apr 8.
Explanation Apr 12.
@@ -208,34 +197,34 @@ Patch for C syntax HL. (Bradley Garagan, 2016 Apr 17) #763
Patch to make matchit work better, respect 'matchpairs'. (Ken Takata, 2016 Mar
25)
This does not work: :set cscopequickfix=a-
(Linewi, 2015 Jul 12, #914)
Possibly wrong value for seq_cur. (Florent Fayolle, 2016 May 15, #806)
Patch to improve map documentation. Issue #799.
Patch for restoring wide characters in the console buffer.
(Ken Takata, 2016 Jun 7)
We can use '. to go to the last change in the current buffer, but how about
the last change in any buffer? Can we use ', (, is next to .)?
Patch for Python: #622. (Roland Puntaier, 2016 Feb 2)
What does it change?
When generating the Unicode tables with runtime/tools/unicode.vim the
emoji_width table has only one entry.
It's possible to add ",," to 'wildignore', an empty entry. Causes problems.
Reject the value? #710.
Patch to support strikethrough next to bold and italic. (Christian Brabandt,
2013 Jul 30) Update from Ken Takata, 2013 Oct 12.
Update mentioned by Christian, 2016 Apr 25.
Update from Ken Takata, 2016 Apr 26.
Update from Ken Takata, 2016 Jul 17.
Win32: patch to use 64 bit stat() if possible. (Ken Takata, 2014 May 12)
More tests May 14. Update May 29. Update Aug 10.
Now part of large file patches. (Ken Takata, 2016 Feb 1)
Win64: Seek error in swap file for a very big file (3 Gbyte). Check storing
pointer in long and seek offset in 64 bit var.
Patches from Ken Takata might help (2014 Apr 17)
Update 2016 Mar 28. Can include all parts into one dist patch.
Patch to support 64 bit ints for Number. (Ken Takata, 2016 Jan 21)
Update 2016 Apr 24.
Patch to improve cscope. (Adrian Kocis, #843)
Patch for groovy multi-line comment highlighting. (Justin M. Keyes, 2016 May
20 #644)
@@ -244,7 +233,9 @@ When doing "vi buf.md" a BufNew autocommand for *.md is not triggered.
Because of using the initial buffer? (Dun Peal, 2016 May 12)
Patch to add the :bvimgrep command. (Christian Brabandt, 2014 Nov 12)
Updated 2016 Feb 10
Updated 2016 Jun 10, #858
Add redrawtabline command. (Naruhiko Nishino, 2016 Jun 11)
Neovim patch for utfc_ptr2char_len() https://github.com/neovim/neovim/pull/4574
No test, needs some work to include.
@@ -284,14 +275,6 @@ Patch to make tests pass with EBCDIC. (Owen Leibman, 2016 Apr 10)
When repeating the 'confirm' dialog one needs to press Enter. (ds26gte, 2016
Apr 17) #762
Patch to support expression argument to sort() instead of a function name.
Yasuhiro Matsumoto, 2013 May 31.
Or should we add a more general mechanism, like a lambda() function?
Patch by Yasuhiro Matsumoto, 2014 Sep 16, update 2016 Apr 17.
Should jsonencode()/jsondecode() restrict recursiveness?
Or avoid recursiveness.
Use vim.vim syntax highlighting for help file examples, but without ":" in
'iskeyword' for syntax.
@@ -300,6 +283,10 @@ Patch to make "%:h:h" return "." instead of the full path.
Remove SPACE_IN_FILENAME ? What could possibly go wrong?
When command names are very long :command output is difficult to read. Use a
maximum for the column width? (#871)
Patcy by varmanishant, 2016 Jun 18, #876
Patch to change GUI behavior: instead of changing the window size change the
lines/columns when menu/toolbar/etc. is added/removed. (Ychin, 2016 Mar 20,
#703)
@@ -311,6 +298,9 @@ Should use /usr/local/share/applications or /usr/share/applications.
Or use $XDG_DATA_DIRS.
Also need to run update-desktop-database (Kuriyama Kazunobu, 2015 Nov 4)
Patch to add getbufinfo(), gettabinfo() and getwininfo(). (Yegappan
Lakshmanan, 2016 Apr 2016) Update Jun 8.
Access to uninitialized memory in match_backref() regexp_nda.c:4882
(Dominique Pelle, 2015 Nov 6)
@@ -321,7 +311,7 @@ directory exists. (Sergio Gallelli, 2013 Dec 29)
when evaluating to non-zero. Add the "watchadd expr" command, stop when
the value of the expression changes. ":watchdel" deletes an item,
":watchlist" lists the items. (Charles Campbell)
Patch by Christian Brabandt, 2016 Feb 1.
Patch by Christian Brabandt, 2016 Jun 10, #859
If ":bd" also closes a Tab page then the " mark is not set. (Harm te Hennepe,
2016 Apr 25, #780)
@@ -330,6 +320,7 @@ Patch to avoid redrawing tabline when the popup menu is visible.
(Christian Brabandt, 2016 Jan 28)
Patch to add {skip} argument to search(). (Christian Brabandt, 2016 Feb 24)
Update 2016 Jun 10, #861
Add value "smart" to 'tagcase': ignore case when tag is all lower case.
Patch from Christian Brabandt, 2016 Mar 30, #712.
@@ -337,6 +328,8 @@ Patch from Christian Brabandt, 2016 Mar 30, #712.
Patch to be able to use hex numbers with :digraph. (Lcd, 2015 Sep 6)
Update Sep 7. Update by Christian Brabandt, 2015 Sep 8, 2016 Feb 1.
Patch to show search statistics. (Christian Brabandt, 2016 Jul 22)
When the CursorMovedI event triggers, and CTRL-X was typed, a script cannot
restore the mode properly. (Andrew Stewart, 2016 Apr 20)
Do not trigger the event?
@@ -401,19 +394,12 @@ wrong name. (Aram, 2014 Nov 7) Vim 7.4.
Can't recognize the $ProgramFiles(x86) environment variable. Recognize it
specifically? First try with the parens, then without.
Half-finished patch to fix the Problem using cgn to change a search hit when
replacement includes hit. Reported by John Beckett, fix by Christian Brabandt,
2016 Jan 11.
Patch to add :mapgroup, put mappings in a group like augroup.
(Yasuhiro Matsumoto, 2016 Feb 19)
Value returned by virtcol() changes depending on how lines wrap. This is
inconsistent with the documentation.
Patch to add filtering of the quickfix list. (Yegappan Lakshmanan, 2016 Mar
13, last version) Update May 22, #830.
Can we cache the syntax attributes, so that updates for 'relativenumber' and
'cursorline'/'cursorcolumn' are a lot faster?
@@ -425,7 +411,7 @@ Use v:none. var == v:none
Patch to add arguments to argc() and argv(). (Yegappan Lakshmanan, 2016 Jan
24) Also need a way to get the global arg list? Update later on Jan 24
Update Mar 5. Update Apr 7.
Update Mar 5. Update Apr 7. Update Jun 5.
To support Thai (and other languages) word boundaries, include the ICU
library: http://userguide.icu-project.org/boundaryanalysis
@@ -459,8 +445,6 @@ wildcards. Add a ":nowild" command modifier? (ZyX, 2015 March 4)
Proposal to make options.txt easier to read. (Arnaud Decara, 2015 Aug 5)
Update Aug 14.
Crash in :cnext on MS-Windows. (Ben Fritz, 2015 Oct 27)
When using --remote-tab on MS-Windows 'encoding' hasn't been initialized yet,
the file name ends up encoded wrong. (Raul Coronado, 2015 Dec 21)
@@ -512,9 +496,6 @@ Breaks test_eval. Inefficient, can we only compute y_width when needed?
Patch to use different terminal mode settings for system(). (Hayaki Saito)
Does this work for everybody?
Patch to fix that wide characters do not work properly after exiting.
(Yasuhiro Matsumoto, 2015 May 24) Better patch to come.
Patch to add wordcount(). Same info as g CTRL-G. (Christian Brabandt, 2015
Nov 17)
@@ -573,12 +554,6 @@ Is this a good solution?
Patch to add /pattern/ to :oldfiles. Pull #575.
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)
Second one. Update May 22.
Update by Daniel Hahler, 2014 Jul 4, Aug 14, Oct 14, Oct 15.
Patch: Let rare word highlighting overrule good word highlighting.
(Jakson A. Aquino, 2010 Jul 30, again 2011 Jul 2)
@@ -594,7 +569,7 @@ Patch for ordered dict. (Ozaki Kiichi, 2015 May 7)
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, 2016 Jan 4.
Updated patch from Charles, 2016 Jul 2
Patch to open folds for 'incsearch'. (Christian Brabandt, 2015 Jan 6)
@@ -607,7 +582,7 @@ Patch: On MS-Windows shellescape() may have to triple double quotes.
(Ingo Karkat, 2015 Jan 16)
Patch for variable tabstops. On github (Christian Brabandt, 2014 May 15)
Update 2016 Jan 31 (email).
Update 2016 Jun 10, # 857
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
@@ -776,11 +751,6 @@ Patch by Thomas Tuegel, also for GTK, 2013 Nov 24
:help gives example for z?, but it does not work. m? and t? do work.
Python: Extended funcrefs: use func_T* structure in place of char_u* function
names.
(ZyX, 2013 Jul 15, update Sep 22, 24, 28; Update 2013 Dec 15, 2014 Jan 6)
Also fixes Bug: E685 error for func_unref(). (ZyX, 2010 Aug 5)
Patch to add funcref to Lua. (Luis Carvalho, 2013 Sep 4)
With tests: Sep 5.
@@ -858,9 +828,6 @@ May 17: with winlist() and tabpagelist().
May 19: with local variables.
May 28: with options
Patch to add getbufinfo(), gettabinfo() and getwininfo(). (Yegappan
Lakshmanan, 2016 Apr 2016)
Patch to support 'u' in interactive substitute. (Christian Brabandt, 2012 Sep
28) With tests: Oct 9.
@@ -1174,7 +1141,7 @@ Build problem with small features on Mac OS X 10.6. (Rainer, 2011 Jan 24)
"0g@$" puts '] on last byte of multi-byte. (ZyX, 2011 Jan 22)
Patch to addd TextDeletePost and TextYankPost events. (Philippe Vaucher, 2011
Patch to add TextDeletePost and TextYankPost events. (Philippe Vaucher, 2011
May 24) Update May 26.
Patch for :tabrecently. (Hirokazu Yoshida, 2012 Jan 30)
@@ -1346,12 +1313,6 @@ Gui menu edit/paste in block mode insert only inserts in one line (Bjorn
Winckler, 2011 May 11)
Requires a map mode for Insert mode started from blockwise Visual mode.
Use json format for new items in .viminfo:
|["info","any info"]
|["text","text text text"
|"continuation line"]
|["hist",242342342,{"arg":"value"}]
Writing nested List and Dict in viminfo gives error message and can't be read
back. (Yukihiro Nakadaira, 2010 Nov 13)
@@ -3595,8 +3556,6 @@ Multi-byte characters:
convert_input() for Mac GUI.
- Add mnemonics from RFC1345 longer than two characters.
Support CTRL-K _{mnemonic}_
7 In "-- INSERT (lang) --" show the name of the keymap used instead of
"lang". (Ilya Dogolazky)
- Make 'breakat' accept multi-byte characters. Problem: can't use a lookup
table anymore (breakat_flags[]).
Simplistic solution: when 'formatoptions' contains "m" also break a line
@@ -3875,7 +3834,7 @@ Vim script language:
8 Pass the command line arguments to Vim scripts in some way. As v:args
List? Or extra parameter to argv()?
8 Add command arguments with three dashes, passed on to Vim scripts.
7 Add optional arguments to user functions:
9 Add optional arguments to user functions:
:func myFunc(arg1, arg2, arg3 = "blah", arg4 = 17)
6 User functions: Functions local to buffer "b:func()"?
8 For Strings add ":let var[{expr}] = {expr}". When past the end of "var"

View File

@@ -1,4 +1,4 @@
*usr_41.txt* For Vim version 7.4. Last change: 2016 Apr 12
*usr_41.txt* For Vim version 7.4. Last change: 2016 Jul 24
VIM USER MANUAL - by Bram Moolenaar
@@ -592,7 +592,7 @@ String manipulation: *string-functions*
match() position where a pattern matches in a string
matchend() position where a pattern match ends in a string
matchstr() match of a pattern in a string
matchstrpos() match and postions of a pattern in a string
matchstrpos() match and positions of a pattern in a string
matchlist() like matchstr() and also return submatches
stridx() first index of a short string in a long string
strridx() last index of a short string in a long string
@@ -602,13 +602,16 @@ String manipulation: *string-functions*
strdisplaywidth() size of string when displayed, deals with tabs
substitute() substitute a pattern match with a string
submatch() get a specific match in ":s" and substitute()
strpart() get part of a string
strpart() get part of a string using byte index
strcharpart() get part of a string using char index
strgetchar() get character from a string using char index
expand() expand special keywords
iconv() convert text from one encoding to another
byteidx() byte index of a character in a string
byteidxcomp() like byteidx() but count composing characters
repeat() repeat a string multiple times
eval() evaluate a string expression
execute() execute an Ex command and get the output
List manipulation: *list-functions*
get() get an item without error for wrong index
@@ -678,6 +681,7 @@ Floating point computation: *float-functions*
sinh() hyperbolic sine
cosh() hyperbolic cosine
tanh() hyperbolic tangent
isnan() check for not a number
Other computation: *bitwise-function*
and() bitwise AND
@@ -732,11 +736,14 @@ Working with text in the current buffer: *text-functions*
searchpair() find the other end of a start/skip/end
searchpairpos() find the other end of a start/skip/end
searchdecl() search for the declaration of a name
getcharsearch() return character search information
setcharsearch() set character search information
*system-functions* *file-functions*
System functions and manipulation of files:
glob() expand wildcards
globpath() expand wildcards in a number of directories
glob2regpat() convert a glob pattern into a search pattern
findfile() find a file in a list of directories
finddir() find a directory in a list of directories
resolve() find out where a shortcut points to
@@ -748,6 +755,7 @@ System functions and manipulation of files:
filereadable() check if a file can be read
filewritable() check if a file can be written to
getfperm() get the permissions of a file
setfperm() set the permissions of a file
getftype() get the kind of a file
isdirectory() check if a directory exists
getfsize() get the size of a file
@@ -786,9 +794,15 @@ Buffers, windows and the argument list:
tabpagenr() get the number of a tab page
tabpagewinnr() like winnr() for a specified tab page
winnr() get the window number for the current window
bufwinid() get the window ID of a specific buffer
bufwinnr() get the window number of a specific buffer
winbufnr() get the buffer number of a specific window
getbufline() get a list of lines from the specified buffer
win_findbuf() find windows containing a buffer
win_getid() get window ID of a window
win_gotoid() go to window with ID
win_id2tabwin() get tab and window nr from window ID
win_id2win() get window nr from window ID
Command line: *command-line-functions*
getcmdline() get the current command line
@@ -796,6 +810,7 @@ Command line: *command-line-functions*
setcmdpos() set position of the cursor in the command line
getcmdtype() return the current command-line type
getcmdwintype() return the current command-line window type
getcompletion() list of command-line completion matches
Quickfix and location lists: *quickfix-functions*
getqflist() list of quickfix errors
@@ -893,20 +908,56 @@ Mappings: *mapping-functions*
Testing: *test-functions*
assert_equal() assert that two expressions values are equal
assert_notequal() assert that two expressions values are not equal
assert_inrange() assert that an expression is inside a range
assert_match() assert that a pattern matches the value
assert_notmatch() assert that a pattern does not match the value
assert_false() assert that an expression is false
assert_true() assert that an expression is true
assert_exception() assert that a command throws an exception
assert_fails() assert that a function call fails
test_alloc_fail() make memory allocation fail
test_autochdir() enable 'autochdir' during startup
test_disable_char_avail() test without typeahead
test_garbagecollect_now() free memory right now
test_null_channel() return a null Channel
test_null_dict() return a null Dict
test_null_job() return a null Job
test_null_list() return a null List
test_null_partial() return a null Partial function
test_null_string() return a null String
Inter-process communication:
Inter-process communication: *channel-functions*
ch_open() open a channel
ch_close() close a channel
ch_read() read a message from a channel
ch_readraw() read a raw message from a channel
ch_sendexpr() send a JSON message over a channel
ch_sendraw() send a raw message over a channel
jsonencode() encode an expression to a JSON string
jsondecode() decode a JSON string to Vim types
ch_evalexpr() evaluates an expression over channel
ch_evalraw() evaluates a raw string over channel
ch_status() get status of a channel
ch_getbufnr() get the buffer number of a channel
ch_getjob() get the job associated with a channel
ch_info() get channel information
ch_log() write a message in the channel log file
ch_logfile() set the channel log file
ch_setoptions() set the options for a channel
json_encode() encode an expression to a JSON string
json_decode() decode a JSON string to Vim types
js_encode() encode an expression to a JSON string
js_decode() decode a JSON string to Vim types
Jobs: *job-functions*
job_start() start a job
job_stop() stop a job
job_status() get the status of a job
job_getchannel() get the channel used by a job
job_info() get information about a job
job_setoptions() set options for a job
Timers: *timer-functions*
timer_start() create a timer
timer_stop() stop a timer
Various: *various-functions*
mode() get current editing mode
@@ -931,6 +982,8 @@ Various: *various-functions*
shiftwidth() effective value of 'shiftwidth'
wordcount() get byte/word/char count of buffer
taglist() get list of matching tags
tagfiles() get a list of tags files
@@ -939,7 +992,6 @@ Various: *various-functions*
perleval() evaluate Perl expression (|+perl|)
py3eval() evaluate Python expression (|+python3|)
pyeval() evaluate Python expression (|+python|)
wordcount() get byte/word/char count of buffer
==============================================================================
*41.7* Defining a function
@@ -1407,9 +1459,9 @@ Now we can instantiate a Dutch translation object: >
And a German translator: >
:let uk2de = copy(transdict)
:let uk2de.words = {'one': 'ein', 'two': 'zwei', 'three': 'drei'}
:let uk2de.words = {'one': 'eins', 'two': 'zwei', 'three': 'drei'}
:echo uk2de.translate('three one')
< drei ein ~
< drei eins ~
You see that the copy() function is used to make a copy of the "transdict"
Dictionary and then the copy is changed to add the words. The original

View File

@@ -1,4 +1,4 @@
*various.txt* For Vim version 7.4. Last change: 2016 May 24
*various.txt* For Vim version 7.4. Last change: 2016 Jul 09
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -390,6 +390,7 @@ N *+multi_lang* non-English language support |multi-lang|
m *+mzscheme* Mzscheme interface |mzscheme|
m *+mzscheme/dyn* Mzscheme interface |mzscheme-dynamic| |/dyn|
m *+netbeans_intg* |netbeans|
*+num64* 64-bit Number support |Number|
m *+ole* Win32 GUI only: |ole-interface|
N *+packages* Loading |packages|
N *+path_extra* Up/downwards search in 'path' and 'tags'
@@ -469,9 +470,12 @@ N *+X11* Unix only: can restore window title |X11|
shown on the screen. When [!] is included, an
existing file is overwritten. When [!] is omitted,
and {file} exists, this command fails.
Only one ":redir" can be active at a time. Calls to
":redir" will close any active redirection before
starting redirection to the new target.
starting redirection to the new target. For recursive
use check out |execute()|.
To stop the messages and commands from being echoed to
the screen, put the commands in a function and call it
with ":silent call Function()".
@@ -511,6 +515,8 @@ N *+X11* Unix only: can restore window title |X11|
redirection starts, if the variable is removed or
locked or the variable type is changed, then further
command output messages will cause errors. {not in Vi}
To get the output of one command the |execute()|
function can be used.
:redi[r] =>> {var} Append messages to an existing variable. Only string
variables can be used. {not in Vi}

View File

@@ -1,4 +1,4 @@
*version7.txt* For Vim version 7.4. Last change: 2016 Apr 03
*version7.txt* For Vim version 7.4. Last change: 2016 Jul 17
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -18308,4 +18308,5 @@ Solution: Subtract the unsigned numbers and cast to int. (Ken Takata)
Files: src/os_win32.c
vim:tw=78:ts=8:ft=help:norl:

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
*windows.txt* For Vim version 7.4. Last change: 2016 Feb 01
*windows.txt* For Vim version 7.4. Last change: 2016 Jun 10
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -76,6 +76,16 @@ places where a Normal mode command can't be used or is inconvenient.
The main Vim window can hold several split windows. There are also tab pages
|tab-page|, each of which can hold multiple windows.
Each window has a unique identifier called the window ID. This identifier
will not change within a Vim session. The |win_getid()| and |win_id2tabwin()|
functions can be used to convert between the window/tab number and the
identifier. There is also the window number, which may change whenever
windows are opened or closed, see |winnr()|.
Each buffer has a unique number and the number will not change within a Vim
session. The |bufnr()| and |bufname()| functions can be used to convert
between a buffer name and the buffer number.
==============================================================================
2. Starting Vim *windows-starting*

View File

@@ -1,6 +1,6 @@
" Vim script for Evim key bindings
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2006 Mar 29
" Last Change: 2016 Jul 24
" Don't use Vi-compatible mode.
set nocompatible
@@ -63,4 +63,12 @@ if has("autocmd")
endif " has("autocmd")
" Add optional packages.
"
" The matchit plugin makes the % command work better, but it is not backwards
" compatible.
if has('syntax') && has('eval')
packadd matchit
endif
" vim: set sw=2 :

View File

@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2016 Apr 29
" Last Change: 2016 Jul 21
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@@ -534,7 +534,7 @@ au BufNewFile,BufRead configure.in,configure.ac setf config
au BufNewFile,BufRead *.cu setf cuda
" Dockerfile
au BufNewFile,BufRead Dockerfile setf dockerfile
au BufNewFile,BufRead Dockerfile,*.Dockerfile setf dockerfile
" WildPackets EtherPeek Decoder
au BufNewFile,BufRead *.dcd setf dcd
@@ -1019,7 +1019,7 @@ au BufNewFile,BufRead *.jgr setf jgraph
au BufNewFile,BufRead *.jov,*.j73,*.jovial setf jovial
" JSON
au BufNewFile,BufRead *.json,*.jsonp setf json
au BufNewFile,BufRead *.json,*.jsonp,*.webmanifest setf json
" Kixtart
au BufNewFile,BufRead *.kix setf kix
@@ -1621,11 +1621,9 @@ au BufNewFile,BufRead */etc/protocols setf protocols
" Pyrex
au BufNewFile,BufRead *.pyx,*.pxd setf pyrex
" Python
au BufNewFile,BufRead *.py,*.pyw setf python
" Python, Python Shell Startup Files
" Quixote (Python-based web framework)
au BufNewFile,BufRead *.ptl setf python
au BufNewFile,BufRead *.py,*.pyw,.pythonstartup,.pythonrc,*.ptl setf python
" Radiance
au BufNewFile,BufRead *.rad,*.mat setf radiance
@@ -2645,6 +2643,8 @@ au BufNewFile,BufRead [rR]akefile* call s:StarSetf('ruby')
" Mail (also matches muttrc.vim, so this is below the other checks)
au BufNewFile,BufRead mutt[[:alnum:]._-]\\\{6\} setf mail
au BufNewFile,BufRead reportbug-* call s:StarSetf('mail')
" Modconf
au BufNewFile,BufRead */etc/modutils/*
\ if executable(expand("<afile>")) != 1

View File

@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2012 Jul 10
" Last Change: 2016 Jun 12
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
@@ -37,7 +37,7 @@ endif
" When the matchit plugin is loaded, this makes the % command skip parens and
" braces in comments.
let b:match_words = &matchpairs . ',^\s*#\s*if\(\|def\|ndef\)\>:^\s*#\s*elif\>:^\s*#\s*else\>:^\s*#\s*endif\>'
let b:match_skip = 's:comment\|string\|character'
let b:match_skip = 's:comment\|string\|character\|special'
" Win32 can filter files in the browse dialog
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")

View File

@@ -1,11 +1,11 @@
" Vim filetype plugin file
" Language: Clojure
" Author: Meikel Brandmeyer <mb@kotka.de>
" Language: Clojure
" Author: Meikel Brandmeyer <mb@kotka.de>
"
" Maintainer: Sung Pae <self@sungpae.com>
" URL: https://github.com/guns/vim-clojure-static
" License: Same as Vim
" Last Change: 27 March 2014
" Maintainer: Sung Pae <self@sungpae.com>
" URL: https://github.com/guns/vim-clojure-static
" License: Same as Vim
" Last Change: 18 July 2016
if exists("b:did_ftplugin")
finish
@@ -43,7 +43,7 @@ setlocal commentstring=;\ %s
" specially and hence are not indented specially.
"
" -*- LISPWORDS -*-
" Generated from https://github.com/guns/vim-clojure-static/blob/vim-release-010/clj/src/vim_clojure_static/generate.clj
" Generated from https://github.com/guns/vim-clojure-static/blob/vim-release-011/clj/src/vim_clojure_static/generate.clj
setlocal lispwords=as->,binding,bound-fn,case,catch,cond->,cond->>,condp,def,definline,definterface,defmacro,defmethod,defmulti,defn,defn-,defonce,defprotocol,defrecord,defstruct,deftest,deftest-,deftype,doseq,dotimes,doto,extend,extend-protocol,extend-type,fn,for,if,if-let,if-not,if-some,let,letfn,locking,loop,ns,proxy,reify,set-test,testing,when,when-first,when-let,when-not,when-some,while,with-bindings,with-in-str,with-local-vars,with-open,with-precision,with-redefs,with-redefs-fn,with-test
" Provide insert mode completions for special forms and clojure.core. As
@@ -82,9 +82,9 @@ endif
" Win32 can filter files in the browse dialog
if has("gui_win32") && !exists("b:browsefilter")
let b:browsefilter = "Clojure Source Files (*.clj)\t*.clj\n" .
\ "ClojureScript Source Files (*.cljs)\t*.cljs\n" .
\ "Java Source Files (*.java)\t*.java\n" .
\ "All Files (*.*)\t*.*\n"
\ "ClojureScript Source Files (*.cljs)\t*.cljs\n" .
\ "Java Source Files (*.java)\t*.java\n" .
\ "All Files (*.*)\t*.*\n"
let b:undo_ftplugin .= ' | unlet! b:browsefilter'
endif

View File

@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: man
" Maintainer: SungHyun Nam <goweol@gmail.com>
" Last Change: 2016 Feb 04
" Last Change: 2016 Jun 20
" To make the ":Man" command available before editing a manual page, source
" this script from your startup vimrc file.
@@ -150,7 +150,17 @@ func <SID>GetPage(...)
endwhile
endif
if &filetype != "man"
new
if exists("g:ft_man_open_mode")
if g:ft_man_open_mode == "vert"
vnew
elseif g:ft_man_open_mode == "tab"
tabnew
else
new
endif
else
new
endif
setl nonu fdc=0
endif
endif
@@ -160,10 +170,15 @@ func <SID>GetPage(...)
setl ma nonu nornu nofen
silent exec "norm 1GdG"
let unsetwidth = 0
if empty($MANWIDTH)
let $MANWIDTH = winwidth(0)
let unsetwidth = 1
endif
silent exec "r!/usr/bin/man ".s:GetCmdArg(sect, page)." | col -b"
if unsetwidth
let $MANWIDTH = ''
endif
" Remove blank lines from top and bottom.
while getline(1) =~ '^\s*$'
silent keepj norm ggdd
@@ -175,6 +190,7 @@ func <SID>GetPage(...)
setl ft=man nomod
setl bufhidden=hide
setl nobuflisted
setl noma
endfunc
func <SID>PopPage()
@@ -195,4 +211,4 @@ endfunc
endif
" vim: set sw=2:
" vim: set sw=2 ts=8 noet:

View File

@@ -1,8 +1,9 @@
" Vim filetype plugin file
" Language: python
" Maintainer: Johannes Zellner <johannes@zellner.org>
" Last Change: 2014 Feb 09
" Last Change By Johannes: Wed, 21 Apr 2004 13:13:08 CEST
" Maintainer: James Sully <sullyj3@gmail.com>
" Previous Maintainer: Johannes Zellner <johannes@zellner.org>
" Last Change: Wed, 29 June 2016
" https://github.com/sullyj3/vim-ftplugin-python
if exists("b:did_ftplugin") | finish | endif
let b:did_ftplugin = 1
@@ -21,28 +22,38 @@ setlocal omnifunc=pythoncomplete#Complete
set wildignore+=*.pyc
nnoremap <silent> <buffer> ]] :call <SID>Python_jump('/^\(class\\|def\)')<cr>
nnoremap <silent> <buffer> [[ :call <SID>Python_jump('?^\(class\\|def\)')<cr>
nnoremap <silent> <buffer> ]m :call <SID>Python_jump('/^\s*\(class\\|def\)')<cr>
nnoremap <silent> <buffer> [m :call <SID>Python_jump('?^\s*\(class\\|def\)')<cr>
nnoremap <silent> <buffer> ]] :call <SID>Python_jump('n', '\v%$\|^(class\|def)>', 'W')<cr>
nnoremap <silent> <buffer> [[ :call <SID>Python_jump('n', '\v^(class\|def)>', 'Wb')<cr>
nnoremap <silent> <buffer> ]m :call <SID>Python_jump('n', '\v%$\|^\s*(class\|def)>', 'W')<cr>
nnoremap <silent> <buffer> [m :call <SID>Python_jump('n', '\v^\s*(class\|def)>', 'Wb')<cr>
xnoremap <silent> <buffer> ]] :call <SID>Python_jump('x', '\v%$\|^(class\|def)>', 'W')<cr>
xnoremap <silent> <buffer> [[ :call <SID>Python_jump('x', '\v^(class\|def)>', 'Wb')<cr>
xnoremap <silent> <buffer> ]m :call <SID>Python_jump('x', '\v%$\|^\s*(class\|def)>', 'W')<cr>
xnoremap <silent> <buffer> [m :call <SID>Python_jump('x', '\v^\s*(class\|def)>', 'Wb')<cr>
if !exists('*<SID>Python_jump')
fun! <SID>Python_jump(motion) range
fun! <SID>Python_jump(mode, motion, flags) range
if a:mode == 'x'
normal! gv
endif
normal! 0
let cnt = v:count1
let save = @/ " save last search pattern
mark '
while cnt > 0
silent! exe a:motion
let cnt = cnt - 1
call search(a:motion, a:flags)
let cnt = cnt - 1
endwhile
call histdel('/', -1)
let @/ = save " restore last search pattern
normal! ^
endfun
endif
if has("browsefilter") && !exists("b:browsefilter")
let b:browsefilter = "Python Files (*.py)\t*.py\n" .
\ "All Files (*.*)\t*.*\n"
\ "All Files (*.*)\t*.*\n"
endif
" As suggested by PEP8.

View File

@@ -36,10 +36,11 @@ except ImportError:
else:
specfile = vim.current.buffer.name
if specfile:
rpm.delMacro("dist")
spec = rpm.spec(specfile)
headers = spec.packages[0].header
version = headers['Version']
release = ".".join(headers['Release'].split(".")[:-1])
headers = spec.sourceHeader
version = headers["Version"]
release = headers["Release"]
vim.command("let ver = " + version)
vim.command("let rel = " + release)
PYEND
@@ -113,7 +114,10 @@ if !exists("*s:SpecChangelog")
endif
endif
if (chgline != -1)
let tmptime = v:lc_time
language time C
let parsed_format = "* ".strftime(format)." - ".ver."-".rel
execute "language time" tmptime
let release_info = "+ ".name."-".ver."-".rel
let wrong_format = 0
let wrong_release = 0
@@ -179,12 +183,8 @@ if !exists("*s:ParseRpmVars")
endif
let varname = strpart(a:str, start+2, end-(start+2))
execute a:strline
let definestr = "^[ \t]*%define[ \t]\\+" . varname . "[ \t]\\+\\(.*\\)$"
let definestr = "^[ \t]*%(?:global|define)[ \t]\\+" . varname . "[ \t]\\+\\(.*\\)$"
let linenum = search(definestr, "bW")
if (linenum == 0)
let definestr = substitute(definestr, "%define", "%global", "")
let linenum = search(definestr, "bW")
endif
if (linenum != -1)
let ret = ret . substitute(getline(linenum), definestr, "\\1", "")
else
@@ -201,7 +201,7 @@ endif
let b:match_ignorecase = 0
let b:match_words =
\ '^Name:^%description:^%clean:^%setup:^%build:^%install:^%files:' .
\ '^Name:^%description:^%clean:^%(?:auto)?setup:^%build:^%install:^%files:' .
\ '^%package:^%preun:^%postun:^%changelog'
let &cpo = s:cpo_save

View File

@@ -1,17 +1,12 @@
" Vim indent file
" Language: Clojure
" Author: Meikel Brandmeyer <mb@kotka.de>
" URL: http://kotka.de/projects/clojure/vimclojure.html
" Language: Clojure
" Author: Meikel Brandmeyer <mb@kotka.de>
" URL: http://kotka.de/projects/clojure/vimclojure.html
"
" Maintainer: Sung Pae <self@sungpae.com>
" URL: https://github.com/guns/vim-clojure-static
" License: Same as Vim
" Last Change: 27 March 2014
" TODO: Indenting after multibyte characters is broken:
" (let [Δ (if foo
" bar ; Indent error
" baz)])
" Maintainer: Sung Pae <self@sungpae.com>
" URL: https://github.com/guns/vim-clojure-static
" License: Same as Vim
" Last Change: 18 July 2016
if exists("b:did_indent")
finish
@@ -57,36 +52,39 @@ if exists("*searchpairpos")
let g:clojure_align_subforms = 0
endif
function! s:SynIdName()
function! s:syn_id_name()
return synIDattr(synID(line("."), col("."), 0), "name")
endfunction
function! s:CurrentChar()
function! s:ignored_region()
return s:syn_id_name() =~? '\vstring|regex|comment|character'
endfunction
function! s:current_char()
return getline('.')[col('.')-1]
endfunction
function! s:CurrentWord()
function! s:current_word()
return getline('.')[col('.')-1 : searchpos('\v>', 'n', line('.'))[1]-2]
endfunction
function! s:IsParen()
return s:CurrentChar() =~# '\v[\(\)\[\]\{\}]' &&
\ s:SynIdName() !~? '\vstring|regex|comment|character'
function! s:is_paren()
return s:current_char() =~# '\v[\(\)\[\]\{\}]' && !s:ignored_region()
endfunction
" Returns 1 if string matches a pattern in 'patterns', which may be a
" list of patterns, or a comma-delimited string of implicitly anchored
" patterns.
function! s:MatchesOne(patterns, string)
function! s:match_one(patterns, string)
let list = type(a:patterns) == type([])
\ ? a:patterns
\ : map(split(a:patterns, ','), '"^" . v:val . "$"')
\ ? a:patterns
\ : map(split(a:patterns, ','), '"^" . v:val . "$"')
for pat in list
if a:string =~# pat | return 1 | endif
endfor
endfunction
function! s:MatchPairs(open, close, stopat)
function! s:match_pairs(open, close, stopat)
" Stop only on vector and map [ resp. {. Ignore the ones in strings and
" comments.
if a:stopat == 0
@@ -95,11 +93,11 @@ if exists("*searchpairpos")
let stopat = a:stopat
endif
let pos = searchpairpos(a:open, '', a:close, 'bWn', "!s:IsParen()", stopat)
return [pos[0], virtcol(pos)]
let pos = searchpairpos(a:open, '', a:close, 'bWn', "!s:is_paren()", stopat)
return [pos[0], col(pos)]
endfunction
function! s:ClojureCheckForStringWorker()
function! s:clojure_check_for_string_worker()
" Check whether there is the last character of the previous line is
" highlighted as a string. If so, we check whether it's a ". In this
" case we have to check also the previous character. The " might be the
@@ -113,17 +111,17 @@ if exists("*searchpairpos")
call cursor(nb, 0)
call cursor(0, col("$") - 1)
if s:SynIdName() !~? "string"
if s:syn_id_name() !~? "string"
return -1
endif
" This will not work for a " in the first column...
if s:CurrentChar() == '"'
if s:current_char() == '"'
call cursor(0, col("$") - 2)
if s:SynIdName() !~? "string"
if s:syn_id_name() !~? "string"
return -1
endif
if s:CurrentChar() != '\\'
if s:current_char() != '\\'
return -1
endif
call cursor(0, col("$") - 1)
@@ -138,40 +136,40 @@ if exists("*searchpairpos")
return indent(".")
endfunction
function! s:CheckForString()
function! s:check_for_string()
let pos = getpos('.')
try
let val = s:ClojureCheckForStringWorker()
let val = s:clojure_check_for_string_worker()
finally
call setpos('.', pos)
endtry
return val
endfunction
function! s:StripNamespaceAndMacroChars(word)
function! s:strip_namespace_and_macro_chars(word)
return substitute(a:word, "\\v%(.*/|[#'`~@^,]*)(.*)", '\1', '')
endfunction
function! s:ClojureIsMethodSpecialCaseWorker(position)
function! s:clojure_is_method_special_case_worker(position)
" Find the next enclosing form.
call search('\S', 'Wb')
" Special case: we are at a '(('.
if s:CurrentChar() == '('
if s:current_char() == '('
return 0
endif
call cursor(a:position)
let nextParen = s:MatchPairs('(', ')', 0)
let next_paren = s:match_pairs('(', ')', 0)
" Special case: we are now at toplevel.
if nextParen == [0, 0]
if next_paren == [0, 0]
return 0
endif
call cursor(nextParen)
call cursor(next_paren)
call search('\S', 'W')
let w = s:StripNamespaceAndMacroChars(s:CurrentWord())
let w = s:strip_namespace_and_macro_chars(s:current_word())
if g:clojure_special_indent_words =~# '\V\<' . w . '\>'
return 1
endif
@@ -179,27 +177,43 @@ if exists("*searchpairpos")
return 0
endfunction
function! s:IsMethodSpecialCase(position)
function! s:is_method_special_case(position)
let pos = getpos('.')
try
let val = s:ClojureIsMethodSpecialCaseWorker(a:position)
let val = s:clojure_is_method_special_case_worker(a:position)
finally
call setpos('.', pos)
endtry
return val
endfunction
function! GetClojureIndent()
" Check if form is a reader conditional, that is, it is prefixed by #?
" or @#?
function! s:is_reader_conditional_special_case(position)
if getline(a:position[0])[a:position[1] - 3 : a:position[1] - 2] == "#?"
return 1
endif
return 0
endfunction
" Returns 1 for opening brackets, -1 for _anything else_.
function! s:bracket_type(char)
return stridx('([{', a:char) > -1 ? 1 : -1
endfunction
" Returns: [opening-bracket-lnum, indent]
function! s:clojure_indent_pos()
" Get rid of special case.
if line(".") == 1
return 0
return [0, 0]
endif
" We have to apply some heuristics here to figure out, whether to use
" normal lisp indenting or not.
let i = s:CheckForString()
let i = s:check_for_string()
if i > -1
return i + !!g:clojure_align_multiline_strings
return [0, i + !!g:clojure_align_multiline_strings]
endif
call cursor(0, 1)
@@ -207,28 +221,28 @@ if exists("*searchpairpos")
" Find the next enclosing [ or {. We can limit the second search
" to the line, where the [ was found. If no [ was there this is
" zero and we search for an enclosing {.
let paren = s:MatchPairs('(', ')', 0)
let bracket = s:MatchPairs('\[', '\]', paren[0])
let curly = s:MatchPairs('{', '}', bracket[0])
let paren = s:match_pairs('(', ')', 0)
let bracket = s:match_pairs('\[', '\]', paren[0])
let curly = s:match_pairs('{', '}', bracket[0])
" In case the curly brace is on a line later then the [ or - in
" case they are on the same line - in a higher column, we take the
" curly indent.
if curly[0] > bracket[0] || curly[1] > bracket[1]
if curly[0] > paren[0] || curly[1] > paren[1]
return curly[1]
return curly
endif
endif
" If the curly was not chosen, we take the bracket indent - if
" there was one.
if bracket[0] > paren[0] || bracket[1] > paren[1]
return bracket[1]
return bracket
endif
" There are neither { nor [ nor (, ie. we are at the toplevel.
if paren == [0, 0]
return 0
return paren
endif
" Now we have to reimplement lispindent. This is surprisingly easy, as
@@ -246,58 +260,120 @@ if exists("*searchpairpos")
" - In any other case we use the column of the end of the word + 2.
call cursor(paren)
if s:IsMethodSpecialCase(paren)
return paren[1] + &shiftwidth - 1
if s:is_method_special_case(paren)
return [paren[0], paren[1] + &shiftwidth - 1]
endif
if s:is_reader_conditional_special_case(paren)
return paren
endif
" In case we are at the last character, we use the paren position.
if col("$") - 1 == paren[1]
return paren[1]
return paren
endif
" In case after the paren is a whitespace, we search for the next word.
call cursor(0, col('.') + 1)
if s:CurrentChar() == ' '
if s:current_char() == ' '
call search('\v\S', 'W')
endif
" If we moved to another line, there is no word after the (. We
" use the ( position for indent.
if line(".") > paren[0]
return paren[1]
return paren
endif
" We still have to check, whether the keyword starts with a (, [ or {.
" In that case we use the ( position for indent.
let w = s:CurrentWord()
if stridx('([{', w[0]) > -1
return paren[1]
let w = s:current_word()
if s:bracket_type(w[0]) == 1
return paren
endif
" Test words without namespace qualifiers and leading reader macro
" metacharacters.
"
" e.g. clojure.core/defn and #'defn should both indent like defn.
let ww = s:StripNamespaceAndMacroChars(w)
let ww = s:strip_namespace_and_macro_chars(w)
if &lispwords =~# '\V\<' . ww . '\>'
return paren[1] + &shiftwidth - 1
return [paren[0], paren[1] + &shiftwidth - 1]
endif
if g:clojure_fuzzy_indent
\ && !s:MatchesOne(g:clojure_fuzzy_indent_blacklist, ww)
\ && s:MatchesOne(g:clojure_fuzzy_indent_patterns, ww)
return paren[1] + &shiftwidth - 1
\ && !s:match_one(g:clojure_fuzzy_indent_blacklist, ww)
\ && s:match_one(g:clojure_fuzzy_indent_patterns, ww)
return [paren[0], paren[1] + &shiftwidth - 1]
endif
call search('\v\_s', 'cW')
call search('\v\S', 'W')
if paren[0] < line(".")
return paren[1] + (g:clojure_align_subforms ? 0 : &shiftwidth - 1)
return [paren[0], paren[1] + (g:clojure_align_subforms ? 0 : &shiftwidth - 1)]
endif
call search('\v\S', 'bW')
return virtcol(".") + 1
return [line('.'), col('.') + 1]
endfunction
function! GetClojureIndent()
let lnum = line('.')
let orig_lnum = lnum
let orig_col = col('.')
let [opening_lnum, indent] = s:clojure_indent_pos()
" Account for multibyte characters
if opening_lnum > 0
let indent -= indent - virtcol([opening_lnum, indent])
endif
" Return if there are no previous lines to inherit from
if opening_lnum < 1 || opening_lnum >= lnum - 1
call cursor(orig_lnum, orig_col)
return indent
endif
let bracket_count = 0
" Take the indent of the first previous non-white line that is
" at the same sexp level. cf. src/misc1.c:get_lisp_indent()
while 1
let lnum = prevnonblank(lnum - 1)
let col = 1
if lnum <= opening_lnum
break
endif
call cursor(lnum, col)
" Handle bracket counting edge case
if s:is_paren()
let bracket_count += s:bracket_type(s:current_char())
endif
while 1
if search('\v[(\[{}\])]', '', lnum) < 1
break
elseif !s:ignored_region()
let bracket_count += s:bracket_type(s:current_char())
endif
endwhile
if bracket_count == 0
" Check if this is part of a multiline string
call cursor(lnum, 1)
if s:syn_id_name() !~? '\vstring|regex'
call cursor(orig_lnum, orig_col)
return indent(lnum)
endif
endif
endwhile
call cursor(orig_lnum, orig_col)
return indent
endfunction
setlocal indentexpr=GetClojureIndent()

View File

@@ -3,9 +3,15 @@
" Maintainer: Christian Brabandt <cb@256bit.org>
" Previous Maintainer: Peter Aronoff <telemachus@arpinum.org>
" Original Author: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2016-02-15
" Latest Revision: 2016-06-27
" License: Vim (see :h license)
" Repository: https://github.com/chrisbra/vim-sh-indent
" Changelog:
" 20160627: - detect heredocs correctly
" 20160213: - detect function definition correctly
" 20160202: - use shiftwidth() function
" 20151215: - set b:undo_indent variable
" 20150728: - add foreach detection for zsh
if exists("b:did_indent")
finish
@@ -102,6 +108,8 @@ function! GetShIndent()
endif
elseif s:is_case_break(line)
let ind -= s:indent_value('case-breaks')
elseif s:is_here_doc(line)
let ind = 0
endif
return ind
@@ -160,6 +168,14 @@ function! s:is_case_break(line)
return a:line =~ '^\s*;[;&]'
endfunction
function! s:is_here_doc(line)
if a:line =~ '^\w\+$'
let here_pat = '<<-\?'. s:escape(a:line). '\$'
return search(here_pat, 'bnW') > 0
endif
return 0
endfunction
function! s:is_case_ended(line)
return s:is_case_break(a:line) || a:line =~ ';[;&]\s*\%(#.*\)\=$'
endfunction
@@ -172,5 +188,9 @@ function! s:is_case_empty(line)
endif
endfunction
function! s:escape(pattern)
return '\V'. escape(a:pattern, '\\')
endfunction
let &cpo = s:cpo_save
unlet s:cpo_save

View File

@@ -1,8 +1,8 @@
" VHDL indent ('93 syntax)
" Language: VHDL
" Maintainer: Gerald Lai <laigera+vim?gmail.com>
" Version: 1.58
" Last Change: 2011 Sep 27
" Version: 1.60
" Last Change: 2016 Feb 26
" URL: http://www.vim.org/scripts/script.php?script_id=1450
" only load this indent file when no other was loaded
@@ -104,7 +104,7 @@ function GetVHDLindent()
let pn = prevnonblank(pn - 1)
let ps = getline(pn)
endwhile
if (curs =~ '^\s*)' || curs =~? '^\s*\%(\<\%(procedure\|generic\|map\|port\)\>.*\)\@<!\w\+\s*\w*\s*\%(=>\s*\S\+\|:[^=]\@=\s*\%(\%(in\|out\|inout\|buffer\|linkage\)\>\|\w\+\s\+:=\)\)') && (prevs =~? s:NC.'\<\%(procedure\s\+\S\+\|generic\|map\|port\)\s*(\%(\s*\w\)\=' || (ps =~? s:NC.'\<\%(procedure\|generic\|map\|port\)'.s:ES && prevs =~ '^\s*('))
if (curs =~ '^\s*)' || curs =~? '^\s*\%(\<\%(procedure\|generic\|map\|port\)\>.*\)\@<!\w\+\s*\w*\s*\((.*)\)*\s*\%(=>\s*\S\+\|:[^=]\@=\s*\%(\%(in\|out\|inout\|buffer\|linkage\)\>\|\s\+\)\)') && (prevs =~? s:NC.'\<\%(procedure\s\+\S\+\|generic\|map\|port\)\s*(\%(\s*\w\)\=' || (ps =~? s:NC.'\<\%(procedure\|generic\|map\|port\)'.s:ES && prevs =~ '^\s*('))
" align closing ")" with opening "("
if curs =~ '^\s*)'
return ind2 + stridx(prevs_noi, '(')
@@ -412,11 +412,22 @@ function GetVHDLindent()
" ****************************************************************************************
" indent: maintain indent of previous opening statement
" keywords: without "procedure", "generic", "map", "port" + ":" but not ":=" + "in", "out", "inout", "buffer", "linkage", variable & ":="
" keywords: without "procedure", "generic", "map", "port" + ":" but not ":=" + eventually ;$
" where: start of current line
if curs =~? '^\s*\%(\<\%(procedure\|generic\|map\|port\)\>.*\)\@<!\w\+\s*\w*\s*:[^=]\@=\s*\%(\%(in\|out\|inout\|buffer\|linkage\)\>\|\w\+\s\+:=\)'
if curs =~? '^\s*\%(\<\%(procedure\|generic\|map\|port\)\>.*\)\@<!\w\+\s*\w*\s*:[^=].*;.*$'
return ind2
endif
" ****************************************************************************************
" indent: maintain indent of previous opening statement, corner case which
" does not end in ;, but is part of a mapping
" keywords: without "procedure", "generic", "map", "port" + ":" but not ":=", never + ;$ and
" prevline without "procedure", "generic", "map", "port" + ":" but not ":=" + eventually ;$
" where: start of current line
if curs =~? '^\s*\%(\<\%(procedure\|generic\|map\|port\)\>.*\)\@<!\w\+\s*\w*\s*:[^=].*[^;].*$'
if prevs =~? '^\s*\%(\<\%(procedure\|generic\|map\|port\)\>.*\)\@<!\w\+\s*\w*\s*:[^=].*;.*$'
return ind2
endif
endif
" return leftover filtered indent
return ind

View File

@@ -1,7 +1,7 @@
" Vim indent file
" Language: Vim script
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2016 Apr 19
" Last Change: 2016 Jun 27
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
@@ -60,7 +60,7 @@ function GetVimIndentIntern()
else
let ind = ind + shiftwidth() * 3
endif
elseif prev_text =~ '^\s*aug\%[roup]' && prev_text !~ '^\s*aug\%[roup]\s*!\=\s\+[eE][nN][dD]'
elseif prev_text =~ '^\s*aug\%[roup]\s\+' && prev_text !~ '^\s*aug\%[roup]\s\+[eE][nN][dD]\>'
let ind = ind + shiftwidth()
else
" A line starting with :au does not increment/decrement 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\+[eE][nN][dD]\)'
if cur_text =~ '^\s*\(ene\@!\|cat\|fina\|el\|aug\%[roup]\s\+[eE][nN][dD]\)'
let ind = ind - shiftwidth()
endif

View File

@@ -0,0 +1,108 @@
" Maintainer: Benjamin Linskey <vim@benlinskey.com>
" Last Changed: 2016 July 20
" URL: https://github.com/blinskey/vim-armenian-keymaps
let b:keymap_name = "hy"
loadkeymap
" Capital letters
A Ա
B Բ
C Գ
D Դ
Y Ե
Z Զ
E Է
U Ը
: Թ
+ Ժ
I Ի
L Լ
Q Խ
? Ծ
K Կ
H Հ
@ Ձ
> Ղ
J Ճ
M Մ
# Յ
N Ն
< Շ
O Ո
{ Չ
P Պ
} Ջ
_ Ռ
S Ս
V Վ
T Տ
R Ր
X Ց
W Ւ
\" Փ
G Ք
) Օ
F Ֆ
" Lowercase letters
a ա
b բ
c գ
d դ
y ե
z զ
e է
u ը
; թ
= ժ
i ի
l լ
q խ
/ ծ
k կ
h հ
2 ձ
. ղ
j ճ
m մ
3 յ
n ն
, շ
o ո
[ չ
p պ
] ջ
- ռ
s ս
v վ
t տ
r ր
x ց
w ւ
' փ
g ք
0 օ
f ֆ
& և
" Punctuation
` ՝
~ ՜
1 ։
4 ՛
5 ,
6 -
7 .
8 «
9 »
\\ '
| ՞
" Numbers
! 1
$ 3
% 4
^ 9

View File

@@ -0,0 +1,108 @@
" Maintainer: Benjamin Linskey <vim@benlinskey.com>
" Last Changed: 2016 July 20
" URL: https://github.com/blinskey/vim-armenian-keymaps
let b:keymap_name = "hy"
loadkeymap
" Capital letters
A Ա
P Բ
C Գ
T Դ
Y Ե
Z Զ
E Է
U Ը
: Թ
+ Ժ
I Ի
L Լ
Q Խ
? Ծ
G Կ
H Հ
@ Ձ
> Ղ
J Ճ
M Մ
# Յ
N Ն
< Շ
O Ո
{ Չ
B Պ
} Ջ
_ Ռ
S Ս
W Վ
D Տ
R Ր
X Ց
V Ւ
\" Փ
K Ք
) Օ
F Ֆ
" Lowercase letters
a ա
p բ
c գ
t դ
y ե
z զ
e է
u ը
; թ
= ժ
i ի
l լ
q խ
/ ծ
g կ
h հ
2 ձ
. ղ
j ճ
m մ
3 յ
n ն
, շ
o ո
[ չ
b պ
] ջ
- ռ
s ս
w վ
d տ
r ր
x ց
v ւ
' փ
k ք
0 օ
f ֆ
& և
" Punctuation
` ՝
~ ՜
1 ։
4 ՛
5 ,
6 -
7 .
8 «
9 »
\\ '
| ՞
" Numbers
! 1
$ 3
% 4
^ 9

View File

@@ -0,0 +1,196 @@
" Vim Keymap file for Vietnamese through Telex method
" Maintainer: Raphael McSinyx <vn.mcsinyx@gmail.com>
" Last Change: 2016-06-13
scriptencoding utf-8
let b:keymap_name = "vi"
loadkeymap
A\\ A
AF À
AS Á
AR
AX Ã
AJ
AW Ă
AW\\ Ă
AWF
AWS
AWR
AWX
AWJ
AA Â
AA\\ Â
AAF
AAS
AAR
AAX
AAJ
D\\ D
DD Đ
E E
E\\ E
EF È
ES É
ER
EX
EJ
EE Ê
EE\\ Ê
EEF
EES
EER
EEX
EEJ
I\\ I
IF Ì
IS Í
IR
IX Ĩ
IJ
O\\ O
OF Ò
OS Ó
OR
OX Õ
OJ
OO Ô
OO\\ Ô
OOF
OOS
OOR
OOX
OOJ
OW Ơ
OW\\ Ơ
OWF
OWS
OWR
OWX
OWJ
U\\ U
UF Ù
US Ú
UR
UX Ũ
UJ
UW Ư
UW\\ Ư
UWF
UWS
UWR
UWX
UWJ
Y\\ Y
YF
YS Ý
YR
YX
YJ
a\\ a
af à
as á
ar
ax ã
aj
aw ă
aw\\ ă
awf
aws
awr
awx
awj
aa â
aa\\ â
aaf
aas
aar
aax
aaj
d\\ d
dd đ
e\\ e
ef è
es é
er
ex
ej
ee ê
ee\\ ê
eef
ees ế
eer
eex
eej
i\\ i
if ì
is í
ir
ix ĩ
ij
o\\ o
of ò
os ó
or
ox õ
oj
oo ô
oo\\ ô
oof
oos
oor
oox
ooj
ow ơ
ow\\ ơ
owf
ows
owr
owx
owj
u\\ u
uf ù
us ú
ur
ux ũ
uj
uw ư
uw\\ ư
uwf
uws
uwr
uwx
uwj
y\\ y
yf
ys ý
yr
yx
yj

View File

@@ -0,0 +1,196 @@
" Vim Keymap file for Vietnamese through VNI method
" Maintainer: Raphael McSinyx <vn.mcsinyx@gmail.com>
" Last Change: 2016-06-13
scriptencoding utf-8
let b:keymap_name = "vi"
loadkeymap
A\\ A
A1 Á
A2 À
A3
A4 Ã
A5
A8 Ă
A8\\ Ă
A81
A82
A83
A84
A85
A6 Â
A6\\ Â
A61
A62
A63
A64
A65
D D
D\\ D
D9 Đ
E\\ E
E1 É
E2 È
E3
E4
E5
E6 Ê
E6\\ Ê
E61
E62
E63
E64
E65
I\\ I
I1 Í
I2 Ì
I3
I4 Ĩ
I5
O\\ O
O1 Ó
O2 Ò
O3
O4 Õ
O5
O6 Ô
O6\\ Ô
O61
O62
O63
O64
O65
O7 Ơ
O7\\ Ơ
O71
O72
O73
O74
O75
U\\ U
U1 Ú
U2 Ù
U3
U4 Ũ
U5
U7 Ư
U7\\ Ư
U71
U72
U73
U74
U75
Y\\ Y
Y1 Ý
Y2
Y3
Y4
Y5
a\\ a
a1 á
a2 à
a3
a4 ã
a5
a8 ă
a8\\ ă
a81
a82
a83
a84
a85
a6 â
a6\\ â
a61
a62
a63
a64
a65
d\\ d
d9 đ
e\\ e
e1 é
e2 è
e3
e4
e5
e6 ê
e6\\ ê
e61 ế
e62
e63
e64
e65
i\\ i
i1 í
i2 ì
i3
i4 ĩ
i5
o\\ o
o1 ó
o2 ò
o3
o4 õ
o5
o6 ô
o6\\ ô
o61
o62
o63
o64
o65
o7 ơ
o7\\ ơ
o71
o72
o73
o74
o75
u\\ u
u1 ú
u2 ù
u3
u4 ũ
u5
u7 ư
u7\\ ư
u71
u72
u73
u74
u75
y\\ y
y1 ý
y2
y3
y4
y5

View File

@@ -2,7 +2,7 @@
" Translated By: Martin Lacko <lacko@host.sk>
" Last Change: 2002 May 27
if has("win32") || has("win16") || has("dos16") || has("dos32")
if has("win32")
source <sfile>:p:h/menu_sk_sk.1250.vim
else
source <sfile>:p:h/menu_sk_sk.iso_8859-2.vim

View File

@@ -2,7 +2,7 @@
" You can also use this as a start for your own set of menus.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2014 May 22
" Last Change: 2016 Jul 27
" Note that ":an" (short for ":anoremenu") is often used to make a menu work
" in all modes and avoid side effects from mappings defined by the user.
@@ -188,7 +188,7 @@ an 20.435 &Edit.Startup\ &Settings :call <SID>EditVimrc()<CR>
fun! s:EditVimrc()
if $MYVIMRC != ''
let fname = $MYVIMRC
elseif has("win32") || has("dos32") || has("dos16") || has("os2")
elseif has("win32")
if $HOME != ''
let fname = $HOME . "/_vimrc"
else
@@ -566,7 +566,7 @@ endfun
func! s:XxdFind()
if !exists("g:xxdprogram")
" On the PC xxd may not be in the path but in the install directory
if (has("win32") || has("dos32")) && !executable("xxd")
if has("win32") && !executable("xxd")
let g:xxdprogram = $VIMRUNTIME . (&shellslash ? '/' : '\') . "xxd.exe"
else
let g:xxdprogram = "xxd"

View File

@@ -540,7 +540,7 @@ call append("$", "scrolljump\tminimal number of lines to scroll at a time")
call append("$", " \tset sj=" . &sj)
call append("$", "ttyscroll\tmaximum number of lines to use scrolling instead of redrawing")
call append("$", " \tset tsl=" . &tsl)
if has("gui") || has("msdos") || has("win32")
if has("gui") || has("win32")
call append("$", "guicursor\tspecifies what the cursor looks like in different modes")
call <SID>OptionG("gcr", &gcr)
endif
@@ -1016,11 +1016,9 @@ call append("$", "patchmode\tkeep oldest version of a file; specifies file name
call <SID>OptionG("pm", &pm)
call append("$", "fsync\tforcibly sync the file to disk after writing it")
call <SID>BinOptionG("fs", &fs)
if !has("msdos")
call append("$", "shortname\tuse 8.3 file names")
call append("$", "\t(local to buffer)")
call <SID>BinOptionL("sn")
endif
call append("$", "shortname\tuse 8.3 file names")
call append("$", "\t(local to buffer)")
call <SID>BinOptionL("sn")
call append("$", "cryptmethod\tencryption method for file writing: zip or blowfish")
call append("$", "\t(local to buffer)")
call <SID>OptionL("cm")
@@ -1136,20 +1134,14 @@ if has("quickfix")
endif
if has("msdos") || has("os2") || has("win16") || has("win32") || has("osfiletype")
if has("win32") || has("osfiletype")
call <SID>Header("system specific")
if has("msdos")
call append("$", "bioskey\tcall the BIOS to get a keyoard character")
call <SID>BinOptionG("biosk", &biosk)
call append("$", "conskey\tuse direct console I/O to get a keyboard character")
call <SID>BinOptionG("consk", &consk)
endif
if has("osfiletype")
call append("$", "osfiletype\tOS-specific information about the type of file")
call append("$", "\t(local to buffer)")
call <SID>OptionL("oft")
endif
if has("msdos") || has("os2") || has("win16") || has("win32")
if has("win32")
call append("$", "shellslash\tuse forward slashes in file names; for Unix-like shells")
call <SID>BinOptionG("ssl", &ssl)
endif

View File

@@ -1,4 +1,3 @@
! $XConsortium: rgb.txt,v 10.41 94/02/20 18:39:36 rws Exp $
255 250 250 snow
248 248 255 ghost white
248 248 255 GhostWhite
@@ -58,6 +57,14 @@
119 136 153 LightSlateGrey
190 190 190 gray
190 190 190 grey
190 190 190 x11 gray
190 190 190 X11Gray
190 190 190 x11 grey
190 190 190 X11Grey
128 128 128 web gray
128 128 128 WebGray
128 128 128 web grey
128 128 128 WebGrey
211 211 211 light grey
211 211 211 LightGrey
211 211 211 light gray
@@ -106,6 +113,7 @@
72 209 204 MediumTurquoise
64 224 208 turquoise
0 255 255 cyan
0 255 255 aqua
224 255 255 light cyan
224 255 255 LightCyan
95 158 160 cadet blue
@@ -132,6 +140,11 @@
124 252 0 lawn green
124 252 0 LawnGreen
0 255 0 green
0 255 0 lime
0 255 0 x11 green
0 255 0 X11Green
0 128 0 web green
0 128 0 WebGreen
127 255 0 chartreuse
0 250 154 medium spring green
0 250 154 MediumSpringGreen
@@ -203,11 +216,16 @@
219 112 147 pale violet red
219 112 147 PaleVioletRed
176 48 96 maroon
176 48 96 x11 maroon
176 48 96 X11Maroon
128 0 0 web maroon
128 0 0 WebMaroon
199 21 133 medium violet red
199 21 133 MediumVioletRed
208 32 144 violet red
208 32 144 VioletRed
255 0 255 magenta
255 0 255 fuchsia
238 130 238 violet
221 160 221 plum
218 112 214 orchid
@@ -220,6 +238,10 @@
138 43 226 blue violet
138 43 226 BlueViolet
160 32 240 purple
160 32 240 x11 purple
160 32 240 X11Purple
128 0 128 web purple
128 0 128 WebPurple
147 112 219 medium purple
147 112 219 MediumPurple
216 191 216 thistle
@@ -751,3 +773,10 @@
139 0 0 DarkRed
144 238 144 light green
144 238 144 LightGreen
220 20 60 crimson
75 0 130 indigo
128 128 0 olive
102 51 153 rebecca purple
102 51 153 RebeccaPurple
192 192 192 silver
0 128 128 teal

View File

@@ -1,15 +1,15 @@
" Vim syntax file
" Language: awk, nawk, gawk, mawk
" Maintainer: Antonio Colombo <azc100@gmail.com>
" Last Change: 2014 Oct 21
" Last Change: 2016 Jul 15
" AWK ref. is: Alfred V. Aho, Brian W. Kernighan, Peter J. Weinberger
" 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)
" (also available and updated 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)
@@ -19,11 +19,8 @@
" TODO:
" Dig into the commented out syntax expressions below.
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syn clear
elseif exists("b:current_syntax")
" Quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
@@ -35,13 +32,13 @@ set cpo&vim
syn keyword awkStatement break continue delete exit
syn keyword awkStatement function getline next
syn keyword awkStatement print printf return
" GAWK ref. Chapter 7
syn keyword awkStatement nextfile
" GAWK ref. Chapter 7-9
syn keyword awkStatement switch nextfile
syn keyword awkStatement func
"
" GAWK ref. Chapter 9, Functions
"
" Numeric Functions
syn keyword awkFunction atan2 cos div exp int log rand sin sqrt srand
syn keyword awkFunction atan2 cos exp int intdiv 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
@@ -52,17 +49,17 @@ syn keyword awkFunction close fflush system
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
" Getting Type Functions
syn keyword awkFunction isarray typeof
" String-Translation Functions
syn keyword awkFunction bindtextdomain dcgettext dcngetext
syn keyword awkConditional if else
syn keyword awkRepeat while for
syn keyword awkRepeat while for do
syn keyword awkTodo contained TODO
syn keyword awkTodo contained TODO
syn keyword awkPatterns BEGIN END
syn keyword awkPatterns BEGIN END BEGINFILE ENDFILE
" GAWK ref. Chapter 7
" Built-in Variables That Control awk
@@ -74,20 +71,18 @@ 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
" Octal format character.
syn match awkSpecialCharacter display contained "\\[0-7]\{1,3\}"
syn keyword awkStatement func nextfile
" Hex format character.
syn match awkSpecialCharacter display contained "\\x[0-9A-Fa-f]\+"
syn match awkFieldVars "\$\d\+"
"catch errors caused by wrong parenthesis
syn region awkParen transparent start="(" end=")" contains=ALLBUT,awkParenError,awkSpecialCharacter,awkArrayElement,awkArrayArray,awkTodo,awkRegExp,awkBrktRegExp,awkBrackets,awkCharClass
" catch errors caused by wrong parenthesis
syn region awkParen transparent start="(" end=")" contains=ALLBUT,awkParenError,awkSpecialCharacter,awkArrayElement,awkArrayArray,awkTodo,awkRegExp,awkBrktRegExp,awkBrackets,awkCharClass,awkComment
syn match awkParenError display ")"
syn match awkInParen display contained "[{}]"
"syn match awkInParen display contained "[{}]"
" 64 lines for complex &&'s, and ||'s in a big "if"
syn sync ccomment awkParen maxlines=64
@@ -141,7 +136,7 @@ syn match awkExpression "?\|:"
syn keyword awkExpression in
" Boolean Logic (OR, AND, NOT)
"syn match awkBoolLogic "||\|&&\|\!"
syn match awkBoolLogic "||\|&&\|\!"
" This is overridden by less-than & greater-than.
" Put this above those to override them.
@@ -171,63 +166,42 @@ syn region awkArray transparent start="\[" end="\]" contains=awkArray,awkArrayE
" (for the few instances where it would be more than "oneline")
syn sync ccomment awkArray maxlines=10
" 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_awk_syn_inits")
if version < 508
let did_awk_syn_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink awkConditional Conditional
HiLink awkFunction Function
HiLink awkRepeat Repeat
HiLink awkStatement Statement
HiLink awkString String
HiLink awkSpecialPrintf Special
HiLink awkSpecialCharacter Special
HiLink awkSearch String
HiLink awkBrackets awkRegExp
HiLink awkBrktRegExp awkNestRegExp
HiLink awkCharClass awkNestRegExp
HiLink awkNestRegExp Keyword
HiLink awkRegExp Special
HiLink awkNumber Number
HiLink awkFloat Float
HiLink awkFileIO Special
HiLink awkOperator Special
HiLink awkExpression Special
HiLink awkBoolLogic Special
HiLink awkPatterns Special
HiLink awkVariables Special
HiLink awkFieldVars Special
HiLink awkLineSkip Special
HiLink awkSemicolon Special
HiLink awkComma Special
"HiLink awkIdentifier Identifier
HiLink awkComment Comment
HiLink awkTodo Todo
" Change this if you want nested array names to be highlighted.
HiLink awkArrayArray awkArray
HiLink awkArrayElement Special
HiLink awkParenError awkError
HiLink awkInParen awkError
HiLink awkError Error
delcommand HiLink
endif
" Define the default highlighting.
" Only used when an item doesn't have highlighting yet
hi def link awkConditional Conditional
hi def link awkFunction Function
hi def link awkRepeat Repeat
hi def link awkStatement Statement
hi def link awkString String
hi def link awkSpecialPrintf Special
hi def link awkSpecialCharacter Special
hi def link awkSearch String
hi def link awkBrackets awkRegExp
hi def link awkBrktRegExp awkNestRegExp
hi def link awkCharClass awkNestRegExp
hi def link awkNestRegExp Keyword
hi def link awkRegExp Special
hi def link awkNumber Number
hi def link awkFloat Float
hi def link awkFileIO Special
hi def link awkOperator Special
hi def link awkExpression Special
hi def link awkBoolLogic Special
hi def link awkPatterns Special
hi def link awkVariables Special
hi def link awkFieldVars Special
hi def link awkLineSkip Special
hi def link awkSemicolon Special
hi def link awkComma Special
hi def link awkIdentifier Identifier
hi def link awkComment Comment
hi def link awkTodo Todo
" Change this if you want nested array names to be highlighted.
hi def link awkArrayArray awkArray
hi def link awkArrayElement Special
hi def link awkParenError awkError
hi def link awkInParen awkError
hi def link awkError Error
let b:current_syntax = "awk"

View File

@@ -2,7 +2,7 @@
" Language: BibTeX (bibliographic database format for (La)TeX)
" Maintainer: Bernd Feige <Bernd.Feige@gmx.net>
" Filenames: *.bib
" Last Change: 2014 Mar 26
" Last Change: 2016 May 31
" Thanks to those who pointed out problems with this file or supplied fixes!
@@ -35,8 +35,40 @@ syn keyword bibEntryKw contained crossref edition editor howpublished
syn keyword bibEntryKw contained institution journal key month note
syn keyword bibEntryKw contained number organization pages publisher
syn keyword bibEntryKw contained school series title type volume year
" biblatex keywords, cf. http://mirrors.ctan.org/macros/latex/contrib/biblatex/doc/biblatex.pdf
syn keyword bibType contained mvbook bookinbook suppbook collection mvcollection suppcollection
syn keyword bibType contained online patent periodical suppperiodical mvproceedings reference
syn keyword bibType contained mvreference inreference report set thesis xdata customa customb
syn keyword bibType contained customc customd custome customf electronic www artwork audio bibnote
syn keyword bibType contained commentary image jurisdiction legislation legal letter movie music
syn keyword bibType contained performance review software standard video
syn keyword bibEntryKw contained abstract isbn issn keywords url
syn keyword bibEntryKw contained addendum afterwordannotation annotation annotator authortype
syn keyword bibEntryKw contained bookauthor bookpagination booksubtitle booktitleaddon
syn keyword bibEntryKw contained commentator date doi editora editorb editorc editortype
syn keyword bibEntryKw contained editoratype editorbtype editorctype eid entrysubtype
syn keyword bibEntryKw contained eprint eprintclass eprinttype eventdate eventtitle
syn keyword bibEntryKw contained eventtitleaddon file foreword holder indextitle
syn keyword bibEntryKw contained introduction isan ismn isrn issue issuesubtitle
syn keyword bibEntryKw contained issuetitle iswc journalsubtitle journaltitle label
syn keyword bibEntryKw contained language library location mainsubtitle maintitle
syn keyword bibEntryKw contained maintitleaddon nameaddon origdate origlanguage
syn keyword bibEntryKw contained origlocation origpublisher origtitle pagetotal
syn keyword bibEntryKw contained pagination part pubstate reprinttitle shortauthor
syn keyword bibEntryKw contained shorteditor shorthand shorthandintro shortjournal
syn keyword bibEntryKw contained shortseries shorttitle subtitle titleaddon translator
syn keyword bibEntryKw contained urldate venue version volumes entryset execute gender
syn keyword bibEntryKw contained langid langidopts ids indexsorttitle options presort
syn keyword bibEntryKw contained related relatedoptions relatedtype relatedstring
syn keyword bibEntryKw contained sortkey sortname sortshorthand sorttitle sortyear xdata
syn keyword bibEntryKw contained xref namea nameb namec nameatype namebtype namectype
syn keyword bibEntryKw contained lista listb listc listd liste listf usera userb userc
syn keyword bibEntryKw contained userd usere userf verba verbb verbc archiveprefix pdf
syn keyword bibEntryKw contained primaryclass
" Non-standard:
syn keyword bibNSEntryKw contained abstract isbn issn keywords url
" AMS mref http://www.ams.org/mref
syn keyword bibNSEntryKw contained mrclass mrnumber mrreviewer fjournal coden

View File

@@ -1,7 +1,7 @@
" Vim syntax file
" Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2016 Apr 10
" Last Change: 2016 Jul 07
" Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax")
@@ -295,7 +295,7 @@ if !exists("c_no_ansi") || exists("c_ansi_constants") || exists("c_gnu")
syn keyword cConstant SCHAR_MIN SINT_MIN SLONG_MIN SSHRT_MIN
syn keyword cConstant SCHAR_MAX SINT_MAX SLONG_MAX SSHRT_MAX
if !exists("c_no_c99")
syn keyword cConstant __func__
syn keyword cConstant __func__ __VA_ARGS__
syn keyword cConstant LLONG_MIN LLONG_MAX ULLONG_MAX
syn keyword cConstant INT8_MIN INT16_MIN INT32_MIN INT64_MIN
syn keyword cConstant INT8_MAX INT16_MAX INT32_MAX INT64_MAX

File diff suppressed because one or more lines are too long

View File

@@ -2,7 +2,7 @@
" Language: C++
" Current Maintainer: vim-jp (https://github.com/vim-jp/vim-cpp)
" Previous Maintainer: Ken Shan <ccshan@post.harvard.edu>
" Last Change: 2015 Nov 10
" Last Change: 2016 Jul 07
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
@@ -80,6 +80,7 @@ if version >= 508 || !exists("did_cpp_syntax_inits")
HiLink cppConstant Constant
HiLink cppRawStringDelimiter Delimiter
HiLink cppRawString String
HiLink cppNumber Number
delcommand HiLink
endif

View File

@@ -2,30 +2,22 @@
" Language: OpenBSD packet filter configuration (pf.conf)
" Original Author: Camiel Dobbelaar <cd@sentia.nl>
" Maintainer: Lauri Tirkkonen <lotheac@iki.fi>
" Last Change: 2013 Apr 02
" Last Change: 2016 Jul 06
" 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
setlocal foldmethod=syntax
syn iskeyword @,48-57,_,-,+
syn sync fromstart
syn cluster pfNotLS contains=pfTodo,pfVarAssign
syn keyword pfCmd altq anchor antispoof binat nat pass
syn keyword pfCmd queue rdr scrub table set
syn keyword pfService auth bgp domain finger ftp http https ident
syn keyword pfService imap irc isakmp kerberos mail nameserver nfs
syn keyword pfService nntp ntp pop3 portmap pptp rpcbind rsync smtp
syn keyword pfService snmp snmptrap socks ssh sunrpc syslog telnet
syn keyword pfService tftp www
syn keyword pfCmd anchor antispoof block include match pass queue
syn keyword pfCmd queue set table
syn match pfCmd /^\s*load\sanchor\>/
syn keyword pfTodo TODO XXX contained
syn keyword pfWildAddr all any
syn match pfCmd /block\s/
syn match pfComment /#.*$/ contains=pfTodo
syn match pfCont /\\$/
syn match pfErrClose /}/
@@ -34,43 +26,81 @@ syn match pfIPv6 /[a-fA-F0-9:]*::[a-fA-F0-9:.]*/
syn match pfIPv6 /[a-fA-F0-9:]\+:[a-fA-F0-9:]\+:[a-fA-F0-9:.]\+/
syn match pfNetmask /\/\d\+/
syn match pfNum /[a-zA-Z0-9_:.]\@<!\d\+[a-zA-Z0-9_:.]\@!/
syn match pfTable /<\s*[a-zA-Z][a-zA-Z0-9_]*\s*>/
syn match pfTable /<\s*[a-zA-Z0-9_:][a-zA-Z0-9_:.-]*\s*>/
syn match pfVar /$[a-zA-Z][a-zA-Z0-9_]*/
syn match pfVarAssign /^\s*[a-zA-Z][a-zA-Z0-9_]*\s*=/me=e-1
syn region pfFold1 start=/^#\{1}>/ end=/^#\{1,3}>/me=s-1 transparent fold
syn region pfFold2 start=/^#\{2}>/ end=/^#\{2,3}>/me=s-1 transparent fold
syn region pfFold3 start=/^#\{3}>/ end=/^#\{3}>/me=s-1 transparent fold
syn region pfList start=/{/ end=/}/ transparent contains=ALLBUT,pfErrClose,@pfNotLS
syn region pfString start=/"/ end=/"/ transparent contains=ALLBUT,pfString,@pfNotLS
syn region pfString start=/'/ end=/'/ transparent contains=ALLBUT,pfString,@pfNotLS
syn region pfString start=/"/ skip=/\\"/ end=/"/ contains=pfIPv4,pfIPv6,pfNetmask,pfTable,pfVar
syn region pfString start=/'/ skip=/\\'/ end=/'/ contains=pfIPv4,pfIPv6,pfNetmask,pfTable,pfVar
" 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_c_syn_inits")
if version < 508
let did_c_syn_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
syn keyword pfService 802-11-iapp Microsoft-SQL-Monitor
syn keyword pfService Microsoft-SQL-Server NeXTStep NextStep
syn keyword pfService afpovertcp afs3-bos afs3-callback afs3-errors
syn keyword pfService afs3-fileserver afs3-kaserver afs3-prserver
syn keyword pfService afs3-rmtsys afs3-update afs3-vlserver
syn keyword pfService afs3-volser amt-redir-tcp amt-redir-tls
syn keyword pfService amt-soap-http amt-soap-https asf-rmcp at-echo
syn keyword pfService at-nbp at-rtmp at-zis auth authentication
syn keyword pfService bfd-control bfd-echo bftp bgp bgpd biff bootpc
syn keyword pfService bootps canna cddb cddbp chargen chat cmd
syn keyword pfService cmip-agent cmip-man comsat conference
syn keyword pfService conserver courier csnet-ns cso-ns cvspserver
syn keyword pfService daap datametrics daytime dhcpd-sync
syn keyword pfService dhcpv6-client dhcpv6-server discard domain
syn keyword pfService echo efs eklogin ekshell ekshell2 epmap eppc
syn keyword pfService exec finger ftp ftp-data git gopher hostname
syn keyword pfService hostnames hprop http https hunt hylafax iapp
syn keyword pfService icb ident imap imap2 imap3 imaps ingreslock
syn keyword pfService ipp iprop ipsec-msft ipsec-nat-t ipx irc
syn keyword pfService isakmp iscsi isisd iso-tsap kauth kdc kerberos
syn keyword pfService kerberos-adm kerberos-iv kerberos-sec
syn keyword pfService kerberos_master kf kip klogin kpasswd kpop
syn keyword pfService krb524 krb_prop krbupdate krcmd kreg kshell kx
syn keyword pfService l2tp ldap ldaps ldp link login mail mdns
syn keyword pfService mdnsresponder microsoft-ds ms-sql-m ms-sql-s
syn keyword pfService msa msp mtp mysql name nameserver netbios-dgm
syn keyword pfService netbios-ns netbios-ssn netnews netplan netrjs
syn keyword pfService netstat netwall newdate nextstep nfs nfsd
syn keyword pfService nicname nnsp nntp ntalk ntp null openwebnet
syn keyword pfService ospf6d ospfapi ospfd photuris pop2 pop3 pop3pw
syn keyword pfService pop3s poppassd portmap postgresql postoffice
syn keyword pfService pptp presence printer prospero prospero-np
syn keyword pfService puppet pwdgen qotd quote radacct radius
syn keyword pfService radius-acct rdp readnews remotefs resource rfb
syn keyword pfService rfe rfs rfs_server ripd ripng rje rkinit rlp
syn keyword pfService routed router rpc rpcbind rsync rtelnet rtsp
syn keyword pfService sa-msg-port sane-port sftp shell sieve silc
syn keyword pfService sink sip smtp smtps smux snmp snmp-trap
syn keyword pfService snmptrap snpp socks source spamd spamd-cfg
syn keyword pfService spamd-sync spooler spop3 ssdp ssh submission
syn keyword pfService sunrpc supdup supfiledbg supfilesrv support
syn keyword pfService svn svrloc swat syslog syslog-tls systat
syn keyword pfService tacacs tacas+ talk tap tcpmux telnet tempo
syn keyword pfService tftp time timed timeserver timserver tsap
syn keyword pfService ttylink ttytst ub-dns-control ulistserv untp
syn keyword pfService usenet users uucp uucp-path uucpd vnc vxlan
syn keyword pfService wais webster who whod whois www x400 x400-snd
syn keyword pfService xcept xdmcp xmpp-bosh xmpp-client xmpp-server
syn keyword pfService z3950 zabbix-agent zabbix-trapper zebra
syn keyword pfService zebrasrv
HiLink pfCmd Statement
HiLink pfComment Comment
HiLink pfCont Statement
HiLink pfErrClose Error
HiLink pfIPv4 Type
HiLink pfIPv6 Type
HiLink pfNetmask Constant
HiLink pfNum Constant
HiLink pfService Constant
HiLink pfTable Identifier
HiLink pfTodo Todo
HiLink pfVar Identifier
HiLink pfVarAssign Identifier
HiLink pfWildAddr Type
delcommand HiLink
endif
hi def link pfCmd Statement
hi def link pfComment Comment
hi def link pfCont Statement
hi def link pfErrClose Error
hi def link pfIPv4 Type
hi def link pfIPv6 Type
hi def link pfNetmask Constant
hi def link pfNum Constant
hi def link pfService Constant
hi def link pfString String
hi def link pfTable Identifier
hi def link pfTodo Todo
hi def link pfVar Identifier
hi def link pfVarAssign Identifier
hi def link pfWildAddr Type
let b:current_syntax = "pf"

View File

@@ -1,7 +1,7 @@
" Vim syntax file
" Language: Python
" Maintainer: Zvezdan Petkovic <zpetkovic@acm.org>
" Last Change: 2016 Feb 20
" Last Change: 2016 Jul 21
" Credits: Neil Schemenauer <nas@python.ca>
" Dmitry Vasiliev
"
@@ -72,7 +72,7 @@ set cpo&vim
" built-in below (use 'from __future__ import print_function' in 2)
" - async and await were added in Python 3.5 and are soft keywords.
"
syn keyword pythonStatement False, None, True
syn keyword pythonStatement False None True
syn keyword pythonStatement as assert break continue del exec global
syn keyword pythonStatement lambda nonlocal pass print return with yield
syn keyword pythonStatement class def nextgroup=pythonFunction skipwhite

View File

@@ -2,7 +2,7 @@
" Language: reStructuredText documentation format
" Maintainer: Marshall Ward <marshall.ward@gmail.com>
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2016-01-05
" Latest Revision: 2016-06-17
if exists("b:current_syntax")
finish
@@ -137,7 +137,7 @@ syn match rstStandaloneHyperlink contains=@NoSpell
\ "\<\%(\%(\%(https\=\|file\|ftp\|gopher\)://\|\%(mailto\|news\):\)[^[:space:]'\"<>]\+\|www[[:alnum:]_-]*\.[[:alnum:]_-]\+\.[^[:space:]'\"<>]\+\)[[:alnum:]/]"
syn region rstCodeBlock contained matchgroup=rstDirective
\ start=+\%(sourcecode\|code\%(-block\)\=\)::\_s*\n\ze\z(\s\+\)+
\ start=+\%(sourcecode\|code\%(-block\)\=\)::\s\+\w*\_s*\n\ze\z(\s\+\)+
\ skip=+^$+
\ end=+^\z1\@!+
\ contains=@NoSpell
@@ -153,10 +153,11 @@ for code in g:rst_syntax_code_list
" guard against setting 'isk' option which might cause problems (issue #108)
let prior_isk = &l:iskeyword
exe 'syn include @rst'.code.' syntax/'.code.'.vim'
exe 'syn region rstDirective'.code.' matchgroup=rstDirective fold '
\.'start=#\%(sourcecode\|code\%(-block\)\=\)::\s\+'.code.'\_s*\n\ze\z(\s\+\)# '
\.'skip=#^$# '
\.'end=#^\z1\@!# contains=@NoSpell,@rst'.code
exe 'syn region rstDirective'.code.' matchgroup=rstDirective fold'
\.' start=#\%(sourcecode\|code\%(-block\)\=\)::\s\+'.code.'\_s*\n\ze\z(\s\+\)#'
\.' skip=#^$#'
\.' end=#^\z1\@!#'
\.' contains=@NoSpell,@rst'.code
exe 'syn cluster rstDirectives add=rstDirective'.code
" reset 'isk' setting, if it has been changed
if &l:iskeyword !=# prior_isk
@@ -185,10 +186,11 @@ hi def link rstHyperlinkTarget String
hi def link rstExDirective String
hi def link rstSubstitutionDefinition rstDirective
hi def link rstDelimiter Delimiter
" TODO: I dunno...
hi def rstEmphasis term=italic cterm=italic gui=italic
hi def link rstEmphasis Underlined
hi def link rstStrongEmphasis Special
"term=bold cterm=bold gui=bold
" TODO Append these atttributes somehow
"hi def rstEmphasis term=italic cterm=italic gui=italic
"hi def rstStrongEmphasis term=bold cterm=bold gui=bold
hi def link rstInterpretedTextOrHyperlinkReference Identifier
hi def link rstInlineLiteral String
hi def link rstSubstitutionReference PreProc

View File

@@ -2,15 +2,15 @@
" 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: May 02, 2016
" Version: 151
" Last Change: Jun 10, 2016
" Version: 152
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH
" For options and settings, please use: :help ft-sh-syntax
" This file includes many ideas from Eric Brunet (eric.brunet@ens.fr)
" For version 5.x: Clear all syntax items {{{1
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
if v:version < 600
syntax clear
elseif exists("b:current_syntax")
finish
@@ -173,7 +173,7 @@ if exists("b:is_kornshell") || exists("b:is_bash")
" Touch: {{{1
" =====
syn match shTouch '\<touch\>[^;#]*' skipwhite nextgroup=shTouchList contains=shTouchCmd
syn match shTouch '\<touch\>[^;#]*' skipwhite nextgroup=shComment contains=shTouchCmd
syn match shTouchCmd '\<touch\>' contained
endif
@@ -333,9 +333,10 @@ endif
"================================
syn match shNumber "\<\d\+\>#\="
syn match shNumber "-\=\.\=\d\+\>#\="
syn match shCtrlSeq "\\\d\d\d\|\\[abcfnrtv0]" contained
syn match shCtrlSeq "\\\d\d\d\|\\[abcfnrtv0]" contained
if exists("b:is_bash")
syn match shSpecial "\\\o\o\o\|\\x\x\x\|\\c[^"]\|\\[abefnrtv]" contained
syn match shSpecial "[^\\]\(\\\\\)*\zs\\\o\o\o\|\\x\x\x\|\\c[^"]\|\\[abefnrtv]" contained
syn match shSpecial "^\(\\\\\)*\zs\\\o\o\o\|\\x\x\x\|\\c[^"]\|\\[abefnrtv]" contained
endif
if exists("b:is_bash")
syn region shExSingleQuote matchgroup=shQuote start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial,shSpecial
@@ -346,11 +347,13 @@ 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 match shStringSpecial "[^[:print:] \t]" contained
syn match shStringSpecial "\%(\\\\\)*\\[\\"'`$()#]"
syn match shSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]"
syn match shStringSpecial "[^[:print:] \t]" contained
syn match shStringSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]"
syn match shSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shBkslshSnglQuote,shBkslshDblQuote
syn match shSpecial "^\%(\\\\\)*\\[\\"'`$()#]"
syn match shMoreSpecial "\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shMoreSpecial contained
syn match shMoreSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shMoreSpecial contained
syn region shBkslshSnglQuote contained matchgroup=shQuote start=+'+ end=+'+ contains=@Spell
syn region shBkslshDblQuote contained matchgroup=shQuote start=+"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell
" Comments: {{{1
"==========
@@ -363,31 +366,21 @@ syn match shQuickComment contained "#.*$"
" Here Documents: {{{1
" =========================================
if version < 600
syn region shHereDoc matchgroup=shHereDoc01 start="<<\s*\**END[a-zA-Z_0-9]*\**" matchgroup=shHereDoc01 end="^END[a-zA-Z_0-9]*$" contains=@shDblQuoteList
syn region shHereDoc matchgroup=shHereDoc02 start="<<-\s*\**END[a-zA-Z_0-9]*\**" matchgroup=shHereDoc02 end="^\s*END[a-zA-Z_0-9]*$" contains=@shDblQuoteList
syn region shHereDoc matchgroup=shHereDoc03 start="<<\s*\**EOF\**" matchgroup=shHereDoc03 end="^EOF$" contains=@shDblQuoteList
syn region shHereDoc matchgroup=shHereDoc04 start="<<-\s*\**EOF\**" matchgroup=shHereDoc04 end="^\s*EOF$" contains=@shDblQuoteList
syn region shHereDoc matchgroup=shHereDoc05 start="<<\s*\**\.\**" matchgroup=shHereDoc05 end="^\.$" contains=@shDblQuoteList
syn region shHereDoc matchgroup=shHereDoc06 start="<<-\s*\**\.\**" matchgroup=shHereDoc06 end="^\s*\.$" contains=@shDblQuoteList
else
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc07 start="<<\s*\\\=\z([^ \t|]\+\)" matchgroup=shHereDoc07 end="^\z1\s*$" contains=@shDblQuoteList
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc08 start="<<\s*\"\z([^ \t|]\+\)\"" matchgroup=shHereDoc08 end="^\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc09 start="<<-\s*\z([^ \t|]\+\)" matchgroup=shHereDoc09 end="^\s*\z1\s*$" contains=@shDblQuoteList
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc10 start="<<-\s*'\z([^ \t|]\+\)'" matchgroup=shHereDoc10 end="^\s*\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc11 start="<<\s*'\z([^ \t|]\+\)'" matchgroup=shHereDoc11 end="^\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc12 start="<<-\s*\"\z([^ \t|]\+\)\"" matchgroup=shHereDoc12 end="^\s*\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc13 start="<<\s*\\\_$\_s*\z([^ \t|]\+\)" matchgroup=shHereDoc13 end="^\z1\s*$" contains=@shDblQuoteList
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc14 start="<<\s*\\\_$\_s*'\z([^ \t|]\+\)'" matchgroup=shHereDoc14 end="^\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc15 start="<<\s*\\\_$\_s*\"\z([^ \t|]\+\)\"" matchgroup=shHereDoc15 end="^\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc16 start="<<-\s*\\\_$\_s*\z([^ \t|]\+\)" matchgroup=shHereDoc16 end="^\s*\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc17 start="<<-\s*\\\_$\_s*\\\z([^ \t|]\+\)" matchgroup=shHereDoc17 end="^\s*\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc18 start="<<-\s*\\\_$\_s*'\z([^ \t|]\+\)'" matchgroup=shHereDoc18 end="^\s*\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc19 start="<<-\s*\\\_$\_s*\"\z([^ \t|]\+\)\"" matchgroup=shHereDoc19 end="^\s*\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc20 start="<<\\\z([^ \t|]\+\)" matchgroup=shHereDoc20 end="^\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc21 start="<<-\s*\\\z([^ \t|]\+\)" matchgroup=shHereDoc21 end="^\s*\z1\s*$"
endif
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc01 start="<<\s*\\\=\z([^ \t|]\+\)" matchgroup=shHereDoc01 end="^\z1\s*$" contains=@shDblQuoteList
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc02 start="<<\s*\"\z([^ \t|]\+\)\"" matchgroup=shHereDoc02 end="^\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc03 start="<<-\s*\z([^ \t|]\+\)" matchgroup=shHereDoc03 end="^\s*\z1\s*$" contains=@shDblQuoteList
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc04 start="<<-\s*'\z([^ \t|]\+\)'" matchgroup=shHereDoc04 end="^\s*\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc05 start="<<\s*'\z([^ \t|]\+\)'" matchgroup=shHereDoc05 end="^\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc06 start="<<-\s*\"\z([^ \t|]\+\)\"" matchgroup=shHereDoc06 end="^\s*\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc07 start="<<\s*\\\_$\_s*\z([^ \t|]\+\)" matchgroup=shHereDoc07 end="^\z1\s*$" contains=@shDblQuoteList
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc08 start="<<\s*\\\_$\_s*'\z([^ \t|]\+\)'" matchgroup=shHereDoc08 end="^\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc09 start="<<\s*\\\_$\_s*\"\z([^ \t|]\+\)\"" matchgroup=shHereDoc09 end="^\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc10 start="<<-\s*\\\_$\_s*\z([^ \t|]\+\)" matchgroup=shHereDoc10 end="^\s*\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc11 start="<<-\s*\\\_$\_s*\\\z([^ \t|]\+\)" matchgroup=shHereDoc11 end="^\s*\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc12 start="<<-\s*\\\_$\_s*'\z([^ \t|]\+\)'" matchgroup=shHereDoc12 end="^\s*\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc13 start="<<-\s*\\\_$\_s*\"\z([^ \t|]\+\)\"" matchgroup=shHereDoc13 end="^\s*\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc14 start="<<\\\z([^ \t|]\+\)" matchgroup=shHereDoc14 end="^\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc15 start="<<-\s*\\\z([^ \t|]\+\)" matchgroup=shHereDoc15 end="^\s*\z1\s*$"
" Here Strings: {{{1
" =============
@@ -702,12 +695,6 @@ hi def link shHereDoc12 shRedir
hi def link shHereDoc13 shRedir
hi def link shHereDoc14 shRedir
hi def link shHereDoc15 shRedir
hi def link shHereDoc16 shRedir
hi def link shHereDoc17 shRedir
hi def link shHereDoc18 shRedir
hi def link shHereDoc19 shRedir
hi def link shHereDoc20 shRedir
hi def link shHereDoc21 shRedir
" Delete shell folding commands {{{1
" =============================

View File

@@ -3,7 +3,7 @@
" Language: SPEC: Build/install scripts for Linux RPM packages
" Maintainer: Igor Gnatenko i.gnatenko.brain@gmail.com
" Former Maintainer: Donovan Rebbechi elflord@panix.com (until March 2014)
" Last Change: Sun Mar 2 10:33 MSK 2014 Igor Gnatenko
" Last Change: Sat Apr 9 15:30 2016 Filip Szymański
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
@@ -83,8 +83,8 @@ syn keyword specMacroNameLocal contained _arch _binary_payload _bindir _build _b
"One line macros - valid in all ScriptAreas
"tip: remember do include new items on specScriptArea's skip section
syn region specSectionMacroArea oneline matchgroup=specSectionMacro start='^%\(define\|global\|patch\d*\|setup\|configure\|GNUconfigure\|find_lang\|makeinstall\|make_install\|include\)\>' end='$' contains=specCommandOpts,specMacroIdentifier
syn region specSectionMacroBracketArea oneline matchgroup=specSectionMacro start='^%{\(configure\|GNUconfigure\|find_lang\|makeinstall\|make_install\)}' end='$' contains=specCommandOpts,specMacroIdentifier
syn region specSectionMacroArea oneline matchgroup=specSectionMacro start='^%\(define\|global\|patch\d*\|setup\|autosetup\|autopatch\|configure\|GNUconfigure\|find_lang\|make_build\|makeinstall\|make_install\|include\)\>' end='$' contains=specCommandOpts,specMacroIdentifier
syn region specSectionMacroBracketArea oneline matchgroup=specSectionMacro start='^%{\(configure\|GNUconfigure\|find_lang\|make_build\|makeinstall\|make_install\)}' end='$' contains=specCommandOpts,specMacroIdentifier
"%% Files Section %%
"TODO %config valid parameters: missingok\|noreplace
@@ -105,7 +105,7 @@ syn case ignore
"%% PreAmble Section %%
"Copyright and Serial were deprecated by License and Epoch
syn region specPreAmbleDeprecated oneline matchgroup=specError start='^\(Copyright\|Serial\)' end='$' contains=specEmail,specURL,specURLMacro,specLicense,specColon,specVariables,specSpecialChar,specMacroIdentifier
syn region specPreAmble oneline matchgroup=specCommand start='^\(Prereq\|Summary\|Name\|Version\|Packager\|Requires\|Icon\|URL\|Source\d*\|Patch\d*\|Prefix\|Packager\|Group\|License\|Release\|BuildRoot\|Distribution\|Vendor\|Provides\|ExclusiveArch\|ExcludeArch\|ExclusiveOS\|Obsoletes\|BuildArch\|BuildArchitectures\|BuildRequires\|BuildConflicts\|BuildPreReq\|Conflicts\|AutoRequires\|AutoReq\|AutoReqProv\|AutoProv\|Epoch\)' end='$' contains=specEmail,specURL,specURLMacro,specLicense,specColon,specVariables,specSpecialChar,specMacroIdentifier
syn region specPreAmble oneline matchgroup=specCommand start='^\(Prereq\|Summary\|Name\|Version\|Packager\|Requires\|Recommends\|Suggests\|Supplements\|Enhances\|Icon\|URL\|Source\d*\|Patch\d*\|Prefix\|Packager\|Group\|License\|Release\|BuildRoot\|Distribution\|Vendor\|Provides\|ExclusiveArch\|ExcludeArch\|ExclusiveOS\|Obsoletes\|BuildArch\|BuildArchitectures\|BuildRequires\|BuildConflicts\|BuildPreReq\|Conflicts\|AutoRequires\|AutoReq\|AutoReqProv\|AutoProv\|Epoch\)' end='$' contains=specEmail,specURL,specURLMacro,specLicense,specColon,specVariables,specSpecialChar,specMacroIdentifier
"%% Description Section %%
syn region specDescriptionArea matchgroup=specSection start='^%description' end='^%'me=e-1 contains=specDescriptionOpts,specEmail,specURL,specNumber,specMacroIdentifier,specComment
@@ -114,7 +114,7 @@ syn region specDescriptionArea matchgroup=specSection start='^%description' end=
syn region specPackageArea matchgroup=specSection start='^%package' end='^%'me=e-1 contains=specPackageOpts,specPreAmble,specComment
"%% Scripts Section %%
syn region specScriptArea matchgroup=specSection start='^%\(prep\|build\|install\|clean\|pre\|postun\|preun\|post\|posttrans\)\>' skip='^%{\|^%\(define\|patch\d*\|configure\|GNUconfigure\|setup\|find_lang\|makeinstall\|make_install\)\>' end='^%'me=e-1 contains=specSpecialVariables,specVariables,@specCommands,specVariables,shDo,shFor,shCaseEsac,specNoNumberHilite,specCommandOpts,shComment,shIf,specSpecialChar,specMacroIdentifier,specSectionMacroArea,specSectionMacroBracketArea,shOperator,shQuote1,shQuote2
syn region specScriptArea matchgroup=specSection start='^%\(prep\|build\|install\|clean\|pre\|postun\|preun\|post\|posttrans\)\>' skip='^%{\|^%\(define\|patch\d*\|configure\|GNUconfigure\|setup\|autosetup\|autopatch\|find_lang\|make_build\|makeinstall\|make_install\)\>' end='^%'me=e-1 contains=specSpecialVariables,specVariables,@specCommands,specVariables,shDo,shFor,shCaseEsac,specNoNumberHilite,specCommandOpts,shComment,shIf,specSpecialChar,specMacroIdentifier,specSectionMacroArea,specSectionMacroBracketArea,shOperator,shQuote1,shQuote2
"%% Changelog Section %%
syn region specChangelogArea matchgroup=specSection start='^%changelog' end='^%'me=e-1 contains=specEmail,specURL,specWeekday,specMonth,specNumber,specComment,specLicense

View File

@@ -4,7 +4,12 @@
" Repository: https://github.com/chrisbra/vim-sqloracle-syntax
" License: Vim
" Previous Maintainer: Paul Moore
" Last Change: 2015 Nov 24
" Last Change: 2016 Jul 22
" Changes:
" 02.04.2016: Support for when keyword
" 03.04.2016: Support for join related keywords
" 22.07.2016: Support Oracle Q-Quote-Syntax
if exists("b:current_syntax")
finish
@@ -24,10 +29,11 @@ syn keyword sqlKeyword index initial initrans into is level link logging loop
syn keyword sqlKeyword maxextents maxtrans mode modify monitoring
syn keyword sqlKeyword nocache nocompress nologging noparallel nowait of offline on online start
syn keyword sqlKeyword parallel successful synonym table tablespace then to trigger uid
syn keyword sqlKeyword unique user validate values view whenever
syn keyword sqlKeyword unique user validate values view when whenever
syn keyword sqlKeyword where with option order pctfree pctused privileges procedure
syn keyword sqlKeyword public resource return row rowlabel rownum rows
syn keyword sqlKeyword session share size smallint type using
syn keyword sqlKeyword join cross inner outer left right
syn keyword sqlOperator not and or
syn keyword sqlOperator in any some all between exists
@@ -47,8 +53,13 @@ syn keyword sqlType boolean char character date float integer long
syn keyword sqlType mlslabel number raw rowid varchar varchar2 varray
" Strings:
syn region sqlString start=+"+ skip=+\\\\\|\\"+ end=+"+
syn region sqlString start=+'+ skip=+\\\\\|\\'+ end=+'+
syn region sqlString matchgroup=Quote start=+"+ skip=+\\\\\|\\"+ end=+"+
syn region sqlString matchgroup=Quote start=+'+ skip=+\\\\\|\\'+ end=+'+
syn region sqlString matchgroup=Quote start=+n\?q'\z([^[(<{]\)+ end=+\z1'+
syn region sqlString matchgroup=Quote start=+n\?q'<+ end=+>'+
syn region sqlString matchgroup=Quote start=+n\?q'{+ end=+}'+
syn region sqlString matchgroup=Quote start=+n\?q'(+ end=+)'+
syn region sqlString matchgroup=Quote start=+n\?q'\[+ end=+]'+
" Numbers:
syn match sqlNumber "-\=\<\d*\.\=[0-9_]\>"
@@ -118,6 +129,7 @@ syn keyword sqlTodo TODO FIXME XXX DEBUG NOTE contained
" Define the default highlighting.
command -nargs=+ HiLink hi def link <args>
HiLink Quote Special
HiLink sqlComment Comment
HiLink sqlFunction Function
HiLink sqlKeyword sqlSpecial

View File

@@ -1,8 +1,8 @@
" Vim syntax file
" Language: TeX
" Maintainer: Charles E. Campbell <NdrchipO@ScampbellPfamily.AbizM>
" Last Change: May 02, 2016
" Version: 95
" Last Change: Jun 17, 2016
" Version: 97
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX
"
" Notes: {{{1
@@ -83,12 +83,12 @@ else
let s:tex_conceal= g:tex_conceal
endif
if !exists("g:tex_superscripts")
let s:tex_superscripts= "[0-9a-zA-W.,:;+-<>/()=]"
let s:tex_superscripts= '[0-9a-zA-W.,:;+-<>/()=]'
else
let s:tex_superscripts= g:tex_superscripts
endif
if !exists("g:tex_subscripts")
let s:tex_subscripts= "[0-9aehijklmnoprstuvx,+-/().]"
let s:tex_subscripts= '[0-9aehijklmnoprstuvx,+-/().]'
else
let s:tex_subscripts= g:tex_subscripts
endif
@@ -206,16 +206,16 @@ endif
" Try to flag {} and () mismatches: {{{1
if s:tex_fast =~# 'm'
if !s:tex_no_error
syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchGroup,texError
syn region texMatcher matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchGroup,texError,@NoSpell
syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchGroup,texError
syn region texMatcher matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchGroup,texError,@NoSpell
else
syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchGroup
syn region texMatcher matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchGroup
syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchGroup
syn region texMatcher matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchGroup
endif
if !s:tex_nospell
syn region texParen start="(" end=")" transparent contains=@texMatchGroup,@Spell
syn region texParen start="(" end=")" transparent contains=@texMatchGroup,@Spell
else
syn region texParen start="(" end=")" transparent contains=@texMatchGroup
syn region texParen start="(" end=")" transparent contains=@texMatchGroup
endif
endif
if !s:tex_no_error
@@ -266,7 +266,7 @@ syn match texLigature "\\\([ijolL]\|ae\|oe\|ss\|AA\|AE\|OE\)$"
syn match texBeginEnd "\\begin\>\|\\end\>" nextgroup=texBeginEndName
if s:tex_fast =~# 'm'
syn region texBeginEndName matchgroup=Delimiter start="{" end="}" contained nextgroup=texBeginEndModifier contains=texComment
syn region texBeginEndModifier matchgroup=Delimiter start="\[" end="]" contained contains=texComment,@NoSpell
syn region texBeginEndModifier matchgroup=Delimiter start="\[" end="]" contained contains=texComment,@texMathZones,@NoSpell
endif
" \documentclass, \documentstyle, \usepackage: {{{1
@@ -1136,9 +1136,21 @@ if has("conceal") && &enc == 'utf-8'
call s:SuperSub('texSubscript','_','9','₉')
call s:SuperSub('texSubscript','_','a','ₐ')
call s:SuperSub('texSubscript','_','e','ₑ')
call s:SuperSub('texSubscript','_','h','ₕ')
call s:SuperSub('texSubscript','_','i','ᵢ')
call s:SuperSub('texSubscript','_','j','ⱼ')
call s:SuperSub('texSubscript','_','k','ₖ')
call s:SuperSub('texSubscript','_','l','ₗ')
call s:SuperSub('texSubscript','_','m','ₘ')
call s:SuperSub('texSubscript','_','n','ₙ')
call s:SuperSub('texSubscript','_','o','ₒ')
call s:SuperSub('texSubscript','_','p','ₚ')
call s:SuperSub('texSubscript','_','r','ᵣ')
call s:SuperSub('texSubscript','_','s','ₛ')
call s:SuperSub('texSubscript','_','t','ₜ')
call s:SuperSub('texSubscript','_','u','ᵤ')
call s:SuperSub('texSubscript','_','v','ᵥ')
call s:SuperSub('texSubscript','_','x','ₓ')
call s:SuperSub('texSubscript','_',',','︐')
call s:SuperSub('texSubscript','_','+','₊')
call s:SuperSub('texSubscript','_','-','₋')
@@ -1154,6 +1166,7 @@ if has("conceal") && &enc == 'utf-8'
call s:SuperSub('texSubscript','_','\\phi\>' ,'ᵩ')
call s:SuperSub('texSubscript','_','\\gamma\>','ᵧ')
call s:SuperSub('texSubscript','_','\\chi\>' ,'ᵪ')
delfun s:SuperSub
endif

View File

@@ -1,7 +1,7 @@
" Vim syntax file
" Language: Vim .viminfo file
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2012 Feb 03
" Last Change: 2016 Jun 05
" Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax")
@@ -30,11 +30,15 @@ syn match viminfoOptionName "\*\a*"ms=s+1 contained
" Comments
syn match viminfoComment "^#.*"
" New style lines. TODO: highlight numbers and strings.
syn match viminfoNew "^|.*"
" Define the default highlighting.
" Only used when an item doesn't have highlighting yet
hi def link viminfoComment Comment
hi def link viminfoError Error
hi def link viminfoStatement Statement
hi def link viminfoNew String
let b:current_syntax = "viminfo"

View File

@@ -6,9 +6,10 @@
*/
#include <stdio.h>
#include <unistd.h>
int
main()
main(void)
{
while (1)
{

1037
runtime/tutor/tutor.bg.utf-8 Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -160,7 +160,7 @@ RIMARKO: Trairante la instruilon, ne provu memori, lernu per la uzo.
4. Konservu la dosieron kun <20>an<61>oj kaj eliru el Vim per: :wq <Enenklavo>
5. Se vi eliris la instruilon vimtutor en pa<70>o 1, restartigu la intruilon
5. Se vi eliris el la instruilo vimtutor en pa<70>o 1, restartigu la instruilon
vimtutor kaj movi<76>u suben al la sekvanta resumo.
6. Post kiam vi legis la suprajn pa<70>ojn, kaj komprenis ilin: faru ilin.
@@ -229,7 +229,7 @@ Nun da
3. Movu la kursoron <20>e la fino de la <20>usta linio (POST la unua . ).
4. Tajpu d$ por foriv<69>i <20>is la fino de la linio.
4. Tajpu d$ por forivi<EFBFBD>i <20>is la fino de la linio.
---> Iu tajpis la finon de <20>i tiu linio dufoje. fino de <20>i tiu linio dufoje.
@@ -670,7 +670,7 @@ RIMARKO: Se vi volus eliri el Vim kaj restartigi
3. Premu la : signon. <20>e la fino de la ekrano :'<,'> aperos.
4. Tajpu w TESTO , kie TESTO estas dosiernomo, kiu ankora<72> ne ekzistas.
Kontrolu, ke vi vidas :'<,'>w TESTO anta<74> premi <Enenklavo>.
Kontrolu, ke vi vidas :'<,'>w TESTO anta<74> ol premi <Enenklavo>.
5. Vim konservos la apartigitajn liniojn al la dosiero TESTO. Uzu :dir
a<> :!ls por vidigi <20>in. Ne forvi<76>u <20>in. Ni uzos <20>in en la sekvanta
@@ -688,7 +688,7 @@ RIMARKO: Premo de v komencas Viduman apartigon. Vi povas movi la kursoron
** Por enmeti la enhavon de dosiero, tajpu :r DOSIERNOMON **
1. Movu la kursoron <EFBFBD>us super <20>i tiu linio.
1. Movu la kursoron tuj super <20>i tiu linio.
RIMARKO: Post plenumo de pa<70>o 2, vi vidos tekston el la leciono 5.3. Tiam
movi<76>u SUBEN por vidi tiun lecionon denove.
@@ -741,7 +741,7 @@ RIMARKO: Vi nun povas legi la eliron de ekstera komando. Ekzemple,
2. Tajpu la minusklan literon o por malfermi linion SUB la kursoro kaj
eniri la Enmetan re<72>imon.
3. Nun tajpu tekston kaj premu <ESK> por eliri la Enmetan re<72>imon.
3. Nun tajpu tekston kaj premu <ESK> por eliri el la Enmeta re<72>imo.
---> Post tajpo de o la kursoro movi<76>as al la malfermata linio en
Enmeta re<72>imo.
@@ -765,7 +765,7 @@ RIMARKO: Vi nun povas legi la eliron de ekstera komando. Ekzemple,
3. Tajpu a (minuskle) por aldoni tekston POST la kursoro.
4. Kompletigu la vorton same kiel la linio sub <20>i. Premu <ESK> por
eliri la Enmetan re<72>imon.
eliri el la Enmeta re<72>imo.
5. Uzu e por movi<76>i al la sekvanta nekompleta vorto kaj ripetu
pa<70>ojn 3 kaj 4.
@@ -789,7 +789,7 @@ RIMARKO:
2. Nun premu R kaj tajpu la nombron sub <20>i en la dua linio, por ke <20>i
anstata<74>igu la xxx .
3. Premu <ESK> por foriri la Anstata<74>igan re<72>imon. Rimarku, ke la cetera
3. Premu <ESK> por foriri el la Anstata<74>iga re<72>imo. Rimarku, ke la cetera
parto de la linio restas ne<6E>an<61>ata.
4. Ripetu la pa<70>ojn por anstata<74>igi la restantajn xxx.
@@ -810,7 +810,7 @@ RIMARKO: Anstata
1. Iru al la linio markita per ---> sube kaj poziciu la kursoron post "a)".
2. Komencu la Viduman re<72>imon per v kaj movu la kursoron <EFBFBD>us anta<74> "unua".
2. Komencu la Viduman re<72>imon per v kaj movu la kursoron tuj anta<74> "unua".
3. Tajpu y por kopii la emfazitan tekston.
@@ -986,6 +986,6 @@ RIMARKO: Kompletigo funkcias por multaj komandoj. Nur provu premi CTRL-D kaj
Esperantigita fare de Dominique Pell<6C>, 2008-04-01
Retpo<70>to: dominique.pelle@gmail.com
Lasta <20>an<61>o: 2011-11-27
Lasta <20>an<61>o: 2016-07-02
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@@ -160,7 +160,7 @@ RIMARKO: Trairante la instruilon, ne provu memori, lernu per la uzo.
4. Konservu la dosieron kun ŝanĝoj kaj eliru el Vim per: :wq <Enenklavo>
5. Se vi eliris la instruilon vimtutor en paŝo 1, restartigu la intruilon
5. Se vi eliris el la instruilo vimtutor en paŝo 1, restartigu la instruilon
vimtutor kaj moviĝu suben al la sekvanta resumo.
6. Post kiam vi legis la suprajn paŝojn, kaj komprenis ilin: faru ilin.
@@ -229,7 +229,7 @@ Nun daŭrigu al la leciono 2.
3. Movu la kursoron ĉe la fino de la ĝusta linio (POST la unua . ).
4. Tajpu d$ por forivŝi ĝis la fino de la linio.
4. Tajpu d$ por foriviŝi ĝis la fino de la linio.
---> Iu tajpis la finon de ĉi tiu linio dufoje. fino de ĉi tiu linio dufoje.
@@ -670,7 +670,7 @@ RIMARKO: Se vi volus eliri el Vim kaj restartigi ĝin denove per vim TESTO,
3. Premu la : signon. Ĉe la fino de la ekrano :'<,'> aperos.
4. Tajpu w TESTO , kie TESTO estas dosiernomo, kiu ankoraŭ ne ekzistas.
Kontrolu, ke vi vidas :'<,'>w TESTO antaŭ premi <Enenklavo>.
Kontrolu, ke vi vidas :'<,'>w TESTO antaŭ ol premi <Enenklavo>.
5. Vim konservos la apartigitajn liniojn al la dosiero TESTO. Uzu :dir
aŭ :!ls por vidigi ĝin. Ne forviŝu ĝin. Ni uzos ĝin en la sekvanta
@@ -688,7 +688,7 @@ RIMARKO: Premo de v komencas Viduman apartigon. Vi povas movi la kursoron
** Por enmeti la enhavon de dosiero, tajpu :r DOSIERNOMON **
1. Movu la kursoron ĵus super ĉi tiu linio.
1. Movu la kursoron tuj super ĉi tiu linio.
RIMARKO: Post plenumo de paŝo 2, vi vidos tekston el la leciono 5.3. Tiam
moviĝu SUBEN por vidi tiun lecionon denove.
@@ -741,7 +741,7 @@ RIMARKO: Vi nun povas legi la eliron de ekstera komando. Ekzemple,
2. Tajpu la minusklan literon o por malfermi linion SUB la kursoro kaj
eniri la Enmetan reĝimon.
3. Nun tajpu tekston kaj premu <ESK> por eliri la Enmetan reĝimon.
3. Nun tajpu tekston kaj premu <ESK> por eliri el la Enmeta reĝimo.
---> Post tajpo de o la kursoro moviĝas al la malfermata linio en
Enmeta reĝimo.
@@ -765,7 +765,7 @@ RIMARKO: Vi nun povas legi la eliron de ekstera komando. Ekzemple,
3. Tajpu a (minuskle) por aldoni tekston POST la kursoro.
4. Kompletigu la vorton same kiel la linio sub ĝi. Premu <ESK> por
eliri la Enmetan reĝimon.
eliri el la Enmeta reĝimo.
5. Uzu e por moviĝi al la sekvanta nekompleta vorto kaj ripetu
paŝojn 3 kaj 4.
@@ -789,7 +789,7 @@ RIMARKO: Ĉiu a, i kaj A iras al la sama Enmeta reĝimo, la nura malsamo
2. Nun premu R kaj tajpu la nombron sub ĝi en la dua linio, por ke ĝi
anstataŭigu la xxx .
3. Premu <ESK> por foriri la Anstataŭigan reĝimon. Rimarku, ke la cetera
3. Premu <ESK> por foriri el la Anstataŭiga reĝimo. Rimarku, ke la cetera
parto de la linio restas neŝanĝata.
4. Ripetu la paŝojn por anstataŭigi la restantajn xxx.
@@ -810,7 +810,7 @@ RIMARKO: Anstataŭiga reĝimo estas same kiel Enmeta reĝimo, sed ĉiu signo
1. Iru al la linio markita per ---> sube kaj poziciu la kursoron post "a)".
2. Komencu la Viduman reĝimon per v kaj movu la kursoron ĵus antaŭ "unua".
2. Komencu la Viduman reĝimon per v kaj movu la kursoron tuj antaŭ "unua".
3. Tajpu y por kopii la emfazitan tekston.
@@ -986,6 +986,6 @@ RIMARKO: Kompletigo funkcias por multaj komandoj. Nur provu premi CTRL-D kaj
Esperantigita fare de Dominique Pellé, 2008-04-01
Retpoŝto: dominique.pelle@gmail.com
Lasta ŝanĝo: 2011-11-27
Lasta ŝanĝo: 2016-07-02
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@@ -190,7 +190,7 @@ NOTE : En avan
5. Pour ins<6E>rer ou ajouter du texte tapez :
i tapez le texte <20> ins<6E>rer avant le curseur <<3C>chap>
A tapez le texte <20> ajouter apr<EFBFBD>s le curseur <<3C>chap>
A tapez le texte <20> ajouter en fin de ligne <<3C>chap>
NOTE : Appuyer <<3C>chap> vous place en mode Normal ou annule une commande
partiellement tap<61>e dont vous ne voulez plus.
@@ -1034,5 +1034,5 @@ NOTE : Le compl
Derni<6E>res mises <20> jour par Dominique Pell<6C>.
E-mail : dominique.pelle@gmail.com
Last Change : 2014 Aug 18
Last Change : 2016 Jul 02
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@@ -190,7 +190,7 @@ NOTE : En avançant dans ce cours, n'essayez pas de mémoriser, apprenez par
5. Pour insérer ou ajouter du texte tapez :
i tapez le texte à insérer avant le curseur <Échap>
A tapez le texte à ajouter après le curseur <Échap>
A tapez le texte à ajouter en fin de ligne <Échap>
NOTE : Appuyer <Échap> vous place en mode Normal ou annule une commande
partiellement tapée dont vous ne voulez plus.
@@ -1034,5 +1034,5 @@ NOTE : Le complètement fonctionne pour de nombreuses commandes. Essayez
Dernières mises à jour par Dominique Pellé.
E-mail : dominique.pelle@gmail.com
Last Change : 2014 Aug 18
Last Change : 2016 Jul 02
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@@ -1,7 +1,7 @@
" Vim tutor support file
" Author: Eduardo F. Amatria <eferna1@platea.pntic.mec.es>
" Maintainer: Bram Moolenaar
" Last Change: 2014 Jun 25
" Last Change: 2016 Jul 16
" This Vim script is used for detecting if a translation of the
" tutor file exist, i.e., a tutor.xx file, where xx is the language.
@@ -42,6 +42,8 @@ else
let s:ext = ".cs"
elseif s:lang =~ "Dutch"
let s:ext = ".nl"
elseif s:lang =~ "Bulgarian"
let s:ext = ".bg"
else
let s:ext = "." . strpart(s:lang, 0, 2)
endif

View File

@@ -1,7 +1,7 @@
" An example for a vimrc file.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last change: 2016 Apr 05
" Last change: 2016 Jul 28
"
" To use it, copy it to
" for Unix and OS/2: ~/.vimrc
@@ -14,60 +14,26 @@ if v:progname =~? "evim"
finish
endif
" Use Vim settings, rather than Vi settings (much better!).
" This must be first, because it changes other options as a side effect.
set nocompatible
" allow backspacing over everything in insert mode
set backspace=indent,eol,start
" Get the defaults that most users want.
source $VIMRUNTIME/defaults.vim
if has("vms")
set nobackup " do not keep a backup file, use versions instead
else
set backup " keep a backup file (restore to previous version)
set undofile " keep an undo file (undo changes after closing)
endif
set history=50 " keep 50 lines of command line history
set ruler " show the cursor position all the time
set showcmd " display incomplete commands
set incsearch " do incremental searching
" For Win32 GUI: remove 't' flag from 'guioptions': no tearoff menu entries
" let &guioptions = substitute(&guioptions, "t", "", "g")
" Don't use Ex mode, use Q for formatting
map Q gq
" CTRL-U in insert mode deletes a lot. Use CTRL-G u to first break undo,
" so that you can undo CTRL-U after inserting a line break.
inoremap <C-U> <C-G>u<C-U>
" In many terminal emulators the mouse works just fine, thus enable it.
if has('mouse')
set mouse=a
if has('persistent_undo')
set undofile " keep an undo file (undo changes after closing)
endif
endif
" Switch syntax highlighting on when the terminal has colors or when using the
" GUI (which always has colors).
if &t_Co > 2 || has("gui_running")
syntax on
" Also switch on highlighting the last used search pattern.
" Switch on highlighting the last used search pattern.
set hlsearch
" I like highlighting strings inside C comments.
let c_comment_strings=1
endif
" Only do this part when compiled with support for autocommands.
if has("autocmd")
" Enable file type detection.
" Use the default filetype settings, so that mail gets 'tw' set to 72,
" 'cindent' is on in C files, etc.
" Also load indent files, to automatically do language-dependent indenting.
filetype plugin indent on
" Put these in an autocmd group, so that we can delete them easily.
augroup vimrcEx
au!
@@ -75,14 +41,6 @@ if has("autocmd")
" For all text files set 'textwidth' to 78 characters.
autocmd FileType text setlocal textwidth=78
" When editing a file, always jump to the last known cursor position.
" Don't do it when the position is invalid or when inside an event handler
" (happens when dropping a file on gvim).
autocmd BufReadPost *
\ if line("'\"") >= 1 && line("'\"") <= line("$") |
\ exe "normal! g`\"" |
\ endif
augroup END
else
@@ -91,24 +49,10 @@ else
endif " has("autocmd")
" Convenient command to see the difference between the current buffer and the
" file it was loaded from, thus the changes you made.
" Only define it when not defined already.
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
" Add optional packages.
"
" The matchit plugin makes the % command work better, but it is not backwards
" compatible.
packadd matchit
if has('syntax') && has('eval')
packadd matchit
endif

View File

@@ -11,7 +11,7 @@ Contents:
See INSTALLami.txt for Amiga
See INSTALLmac.txt for Macintosh
See INSTALLpc.txt for PC (MS-DOS, Windows 95/98/NT/XP)
See INSTALLpc.txt for PC (Windows 95/98/NT/XP/Vista/7/8/10)
See INSTALLvms.txt for VMS
See INSTALLx.txt for cross-compiling on Unix
See ../README_390.txt for OS/390 Unix

View File

@@ -49,7 +49,7 @@ Building with Visual Studio (VS 98, VS .NET, VS .NET 2003, VS 2005, VS 2008,
VS2010, VS2012, VS2013 and VS2015) is straightforward. (These instructions
should also work for VS 4 and VS 5.)
Using VS C++ 2008 Express is recommended, the binaries build with that run on
Using VS C++ 2008 Express is recommended, the binaries built with that run on
nearly all platforms. Binaries from later versions may not run on Windows 95
or XP.

View File

@@ -1,7 +1,7 @@
#
# Makefile for Vim.
# Compiler: Borland C++ 5.0 and later 32-bit compiler
# Targets: Dos16 or Win32 (Windows NT and Windows 95) (with/without GUI)
# Targets: Win32 (Windows NT and Windows 95) (with/without GUI)
#
# NOTE: THIS IS OLD AND PROBABLY NO LONGER WORKS.
#
@@ -537,26 +537,31 @@ vimwinmain = \
!endif
vimobj = \
$(OBJDIR)\arabic.obj \
$(OBJDIR)\blowfish.obj \
$(OBJDIR)\buffer.obj \
$(OBJDIR)\charset.obj \
$(OBJDIR)\crypt.obj \
$(OBJDIR)\crypt_zip.obj \
$(OBJDIR)\dict.obj \
$(OBJDIR)\diff.obj \
$(OBJDIR)\digraph.obj \
$(OBJDIR)\edit.obj \
$(OBJDIR)\eval.obj \
$(OBJDIR)\evalfunc.obj \
$(OBJDIR)\ex_cmds.obj \
$(OBJDIR)\ex_cmds2.obj \
$(OBJDIR)\ex_docmd.obj \
$(OBJDIR)\ex_eval.obj \
$(OBJDIR)\ex_getln.obj \
$(OBJDIR)\farsi.obj \
$(OBJDIR)\fileio.obj \
$(OBJDIR)\fold.obj \
$(OBJDIR)\getchar.obj \
$(OBJDIR)\hardcopy.obj \
$(OBJDIR)\hashtab.obj \
$(OBJDIR)\json.obj \
$(OBJDIR)\list.obj \
$(OBJDIR)\main.obj \
$(OBJDIR)\mark.obj \
$(OBJDIR)\memfile.obj \
@@ -577,11 +582,13 @@ vimobj = \
$(OBJDIR)\search.obj \
$(OBJDIR)\sha256.obj \
$(OBJDIR)\spell.obj \
$(OBJDIR)\spellfile.obj \
$(OBJDIR)\syntax.obj \
$(OBJDIR)\tag.obj \
$(OBJDIR)\term.obj \
$(OBJDIR)\ui.obj \
$(OBJDIR)\undo.obj \
$(OBJDIR)\userfunc.obj \
$(OBJDIR)\version.obj \
$(OBJDIR)\window.obj \
$(OBJDIR)\pathdef.obj

View File

@@ -42,7 +42,8 @@ DIRECTX=no
FEATURES=HUGE
# Set to one of i386, i486, i586, i686 as the minimum target processor.
# For amd64/x64 architecture set ARCH=x86-64 .
ARCH=i686
# If not set, it will be automatically detected. (Normally i686 or x86-64.)
#ARCH=i686
# 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'.
@@ -112,6 +113,46 @@ INTLLIB=gnu_gettext
#INTLPATH=$(GETTEXT)/lib
#INTLLIB=intl
# Command definitions (depends on cross-compiling and shell)
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)
# Get the default ARCH.
ifndef ARCH
ARCH := $(shell $(CC) -dumpmachine | sed -e 's/-.*//' -e 's/_/-/' -e 's/^mingw32$$/i686/')
endif
# 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)
@@ -379,41 +420,10 @@ endif # RUBY
# 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)
-DHAVE_PATHDEF -DFEAT_$(FEATURES) -DHAVE_STDINT_H
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
###########################################################################
@@ -592,27 +602,33 @@ 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
CUIOBJ = $(OUTDIR)/iscygpty.o
OBJ = \
$(OUTDIR)/arabic.o \
$(OUTDIR)/blowfish.o \
$(OUTDIR)/buffer.o \
$(OUTDIR)/charset.o \
$(OUTDIR)/crypt.o \
$(OUTDIR)/crypt_zip.o \
$(OUTDIR)/dict.o \
$(OUTDIR)/diff.o \
$(OUTDIR)/digraph.o \
$(OUTDIR)/edit.o \
$(OUTDIR)/eval.o \
$(OUTDIR)/evalfunc.o \
$(OUTDIR)/ex_cmds.o \
$(OUTDIR)/ex_cmds2.o \
$(OUTDIR)/ex_docmd.o \
$(OUTDIR)/ex_eval.o \
$(OUTDIR)/ex_getln.o \
$(OUTDIR)/farsi.o \
$(OUTDIR)/fileio.o \
$(OUTDIR)/fold.o \
$(OUTDIR)/getchar.o \
$(OUTDIR)/hardcopy.o \
$(OUTDIR)/hashtab.o \
$(OUTDIR)/json.o \
$(OUTDIR)/list.o \
$(OUTDIR)/main.o \
$(OUTDIR)/mark.o \
$(OUTDIR)/memfile.o \
@@ -637,11 +653,13 @@ OBJ = \
$(OUTDIR)/search.o \
$(OUTDIR)/sha256.o \
$(OUTDIR)/spell.o \
$(OUTDIR)/spellfile.o \
$(OUTDIR)/syntax.o \
$(OUTDIR)/tag.o \
$(OUTDIR)/term.o \
$(OUTDIR)/ui.o \
$(OUTDIR)/undo.o \
$(OUTDIR)/userfunc.o \
$(OUTDIR)/version.o \
$(OUTDIR)/vimrc.o \
$(OUTDIR)/window.o
@@ -727,6 +745,7 @@ OBJ += $(GUIOBJ)
LFLAGS += -mwindows
OUTDIR = gobj$(DEBUG_SUFFIX)$(MZSCHEME_SUFFIX)$(ARCH)
else
OBJ += $(CUIOBJ)
TARGET := vim$(DEBUG_SUFFIX).exe
OUTDIR = obj$(DEBUG_SUFFIX)$(MZSCHEME_SUFFIX)$(ARCH)
endif
@@ -842,6 +861,7 @@ endif
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
CUI_INCL = iscygpty.h
$(OUTDIR)/if_python.o : if_python.c if_py_both.h $(INCL)
$(CC) -c $(CFLAGS) $(PYTHONINC) $(PYTHON_HOME_DEF) $< -o $@
@@ -887,6 +907,12 @@ if_perl.c: if_perl.xs typemap
$(XSUBPP) -prototypes -typemap \
$(PERLTYPEMAP) if_perl.xs > $@
$(OUTDIR)/iscygpty.o: iscygpty.c $(CUI_INCL)
$(CC) -c $(CFLAGS) iscygpty.c -o $(OUTDIR)/iscygpty.o -U_WIN32_WINNT -D_WIN32_WINNT=0x0600 -DUSE_DYNFILEID -DENABLE_STUB_IMPL
$(OUTDIR)/main.o: main.c $(INCL) $(CUI_INCL)
$(CC) -c $(CFLAGS) main.c -o $(OUTDIR)/main.o
$(OUTDIR)/netbeans.o: netbeans.c $(INCL) $(NBDEBUG_INCL) $(NBDEBUG_SRC)
$(CC) -c $(CFLAGS) netbeans.c -o $(OUTDIR)/netbeans.o

View File

@@ -26,26 +26,31 @@ LD = dcc
${CC} ${PRE} ${CFLAGS} $< -o $@
SRC = \
arabic.c \
blowfish.c \
buffer.c \
charset.c \
crypt.c \
crypt_zip.c \
dict.c \
diff.c \
digraph.c \
edit.c \
eval.c \
evalfunc.c \
ex_cmds.c \
ex_cmds2.c \
ex_docmd.c \
ex_eval.c \
ex_getln.c \
farsi.c \
fileio.c \
fold.c \
getchar.c \
hardcopy.c \
hashtab.c \
json.c \
list.c \
main.c \
mark.c \
memfile.c \
@@ -67,34 +72,41 @@ SRC = \
search.c \
sha256.c \
spell.c \
spellfile.c \
syntax.c \
tag.c \
term.c \
ui.c \
undo.c \
userfunc.c \
window.c \
version.c
OBJ = o/blowfish.o \
OBJ = o/arabic.o \
o/blowfish.o \
o/buffer.o \
o/charset.o \
o/crypt.o \
o/crypt_zip.o \
o/dict.o \
o/diff.o \
o/digraph.o \
o/edit.o \
o/eval.o \
o/evalfunc.o \
o/ex_cmds.o \
o/ex_cmds2.o \
o/ex_docmd.o \
o/ex_eval.o \
o/ex_getln.o \
o/farsi.o \
o/fileio.o \
o/fold.o \
o/getchar.o \
o/hardcopy.o \
o/hashtab.o \
o/json.o \
o/list.o \
o/main.o \
o/mark.o \
o/memfile.o \
@@ -116,11 +128,13 @@ OBJ = o/blowfish.o \
o/search.o \
o/sha256.o \
o/spell.o \
o/spellfile.o \
o/syntax.o \
o/tag.o \
o/term.o \
o/ui.o \
o/undo.o \
o/userfunc.o \
o/window.o \
$(TERMLIB)
@@ -143,6 +157,8 @@ $(SYMS) : vim.h globals.h keymap.h macros.h ascii.h term.h os_amiga.h structs.h
###########################################################################
o/arabic.o: arabic.c $(SYMS)
o/blowfish.o: blowfish.c $(SYMS)
o/buffer.o: buffer.c $(SYMS)
@@ -153,6 +169,8 @@ o/crypt.o: crypt.c $(SYMS)
o/crypt_zip.o: crypt_zip.c $(SYMS)
o/dict.o: dict.c $(SYMS)
o/diff.o: diff.c $(SYMS)
o/digraph.o: digraph.c $(SYMS)
@@ -161,6 +179,8 @@ o/edit.o: edit.c $(SYMS)
o/eval.o: eval.c $(SYMS)
o/evalfunc.o: evalfunc.c $(SYMS)
o/ex_cmds.o: ex_cmds.c $(SYMS)
o/ex_cmds2.o: ex_cmds2.c $(SYMS)
@@ -171,6 +191,8 @@ o/ex_eval.o: ex_eval.c $(SYMS) ex_cmds.h
o/ex_getln.o: ex_getln.c $(SYMS)
o/farsi.o: farsi.c $(SYMS)
o/fileio.o: fileio.c $(SYMS)
o/fold.o: fold.c $(SYMS)
@@ -183,6 +205,8 @@ o/hashtab.o: hashtab.c $(SYMS)
o/json.o: json.c $(SYMS)
o/list.o: list.c $(SYMS)
o/main.o: main.c $(SYMS)
o/mark.o: mark.c $(SYMS)
@@ -228,7 +252,9 @@ o/search.o: search.c $(SYMS) regexp.h
o/sha256.o: sha256.c $(SYMS)
o/spell.o: spell.c $(SYMS)
o/spell.o: spell.c $(SYMS) spell.h
o/spellfile.o: spellfile.c $(SYMS) spell.h
o/syntax.o: syntax.c $(SYMS)
@@ -238,8 +264,10 @@ o/term.o: term.c $(SYMS) term.h
o/termlib.o: termlib.c $(SYMS)
o/ui.o: ui.c $(SYMS)
o/ui.o: ui.c $(SYMS)
o/undo.o: undo.c $(SYMS)
o/undo.o: undo.c $(SYMS)
o/window.o: window.c $(SYMS)
o/userfunc.o: userfunc.c $(SYMS)
o/window.o: window.c $(SYMS)

View File

@@ -210,26 +210,31 @@ ALL : .\$(VIM).exe vimrun.exe install.exe uninstal.exe xxd/xxd.exe GvimExt/gvime
LINK32_OBJS= \
$(EXTRAS) \
"$(INTDIR)/arabic.obj" \
"$(INTDIR)/blowfish.obj" \
"$(INTDIR)/buffer.obj" \
"$(INTDIR)/charset.obj" \
"$(INTDIR)/crypt.obj" \
"$(INTDIR)/crypt_zip.obj" \
"$(INTDIR)/dict.obj" \
"$(INTDIR)/diff.obj" \
"$(INTDIR)/digraph.obj" \
"$(INTDIR)/edit.obj" \
"$(INTDIR)/eval.obj" \
"$(INTDIR)/evalfunc.obj" \
"$(INTDIR)/ex_cmds.obj" \
"$(INTDIR)/ex_cmds2.obj" \
"$(INTDIR)/ex_docmd.obj" \
"$(INTDIR)/ex_eval.obj" \
"$(INTDIR)/ex_getln.obj" \
"$(INTDIR)/farsi.obj" \
"$(INTDIR)/fileio.obj" \
"$(INTDIR)/fold.obj" \
"$(INTDIR)/getchar.obj" \
"$(INTDIR)/hardcopy.obj" \
"$(INTDIR)/hashtab.obj" \
"$(INTDIR)/json.obj" \
"$(INTDIR)/list.obj" \
"$(INTDIR)/main.obj" \
"$(INTDIR)/mark.obj" \
"$(INTDIR)/mbyte.obj" \
@@ -253,11 +258,13 @@ LINK32_OBJS= \
"$(INTDIR)/search.obj" \
"$(INTDIR)/sha256.obj" \
"$(INTDIR)/spell.obj" \
"$(INTDIR)/spellfile.obj" \
"$(INTDIR)/syntax.obj" \
"$(INTDIR)/tag.obj" \
"$(INTDIR)/term.obj" \
"$(INTDIR)/ui.obj" \
"$(INTDIR)/undo.obj" \
"$(INTDIR)/userfunc.obj" \
"$(INTDIR)/version.obj" \
"$(INTDIR)/window.obj"
@@ -330,6 +337,10 @@ GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h
# Begin Source File
SOURCE=.\arabic.c
# End Source File
# Begin Source File
SOURCE=.\blowfish.c
# End Source File
# Begin Source File
@@ -350,6 +361,10 @@ SOURCE=.\crypt_zip.c
# End Source File
# Begin Source File
SOURCE=.\dict.c
# End Source File
# Begin Source File
SOURCE=.\diff.c
# End Source File
# Begin Source File
@@ -366,6 +381,10 @@ SOURCE=.\eval.c
# End Source File
# Begin Source File
SOURCE=.\evalfunc.c
# End Source File
# Begin Source File
SOURCE=.\ex_cmds.c
# End Source File
# Begin Source File
@@ -386,6 +405,10 @@ SOURCE=.\ex_getln.c
# End Source File
# Begin Source File
SOURCE=.\farsi.c
# End Source File
# Begin Source File
SOURCE=.\fileio.c
# End Source File
# Begin Source File
@@ -560,6 +583,10 @@ SOURCE=.\json.c
# End Source File
# Begin Source File
SOURCE=.\list.c
# End Source File
# Begin Source File
SOURCE=.\main.c
# End Source File
# Begin Source File
@@ -652,6 +679,10 @@ SOURCE=.\spell.c
# End Source File
# Begin Source File
SOURCE=.\spellfile.c
# End Source File
# Begin Source File
SOURCE=.\syntax.c
# End Source File
# Begin Source File
@@ -672,6 +703,10 @@ SOURCE=.\undo.c
# End Source File
# Begin Source File
SOURCE=.\userfunc.c
# End Source File
# Begin Source File
SOURCE=.\version.c
# End Source File
# Begin Source File

View File

@@ -36,26 +36,31 @@ SHELL = csh
REN = $(SHELL) -c mv -f
DEL = $(SHELL) -c rm -f
SRC = blowfish.c \
SRC = arabic.c \
blowfish.c \
buffer.c \
charset.c \
crypt.c \
crypt_zip.c \
dict.c \
diff.c \
digraph.c \
edit.c \
eval.c \
evalfunc.c \
ex_cmds.c \
ex_cmds2.c \
ex_docmd.c \
ex_eval.c \
ex_getln.c \
farsi.c \
fileio.c \
fold.c \
getchar.c \
hardcopy.c \
hashtab.c \
json.c \
list.c \
main.c \
mark.c \
memfile.c \
@@ -77,36 +82,43 @@ SRC = blowfish.c \
search.c \
sha256.c \
spell.c \
spellfile.c \
syntax.c \
tag.c \
term.c \
ui.c \
undo.c \
userfunc.c \
window.c \
version.c
INCL = vim.h feature.h keymap.h macros.h ascii.h term.h structs.h os_amiga.h
OBJ = obj/blowfish.o \
OBJ = obj/arabic.o \
obj/blowfish.o \
obj/buffer.o \
obj/charset.o \
obj/crypt.o \
obj/crypt_zip.o \
obj/dict.o \
obj/diff.o \
obj/digraph.o \
obj/edit.o \
obj/eval.o \
obj/evalfunc.o \
obj/ex_cmds.o \
obj/ex_cmds2.o \
obj/ex_docmd.o \
obj/ex_eval.o \
obj/ex_getln.o \
obj/farsi.o \
obj/fileio.o \
obj/fold.o \
obj/getchar.o \
obj/hardcopy.o \
obj/hashtab.o \
obj/json.o \
obj/list.o \
obj/main.o \
obj/mark.o \
obj/memfile.o \
@@ -128,34 +140,41 @@ OBJ = obj/blowfish.o \
obj/search.o \
obj/sha256.o \
obj/spell.o \
obj/spellfile.o \
obj/syntax.o \
obj/tag.o \
obj/term.o \
obj/ui.o \
obj/undo.o \
obj/userfunc.o \
obj/window.o \
$(TERMLIB)
PRO = proto/blowfish.pro \
PRO = proto/arabic.pro \
proto/blowfish.pro \
proto/buffer.pro \
proto/charset.pro \
proto/crypt.pro \
proto/crypt_zip.pro \
proto/dict.pro \
proto/diff.pro \
proto/digraph.pro \
proto/edit.pro \
proto/eval.pro \
proto/evalfunc.pro \
proto/ex_cmds.pro \
proto/ex_cmds2.pro \
proto/ex_docmd.pro \
proto/ex_eval.pro \
proto/ex_getln.pro \
proto/farsi.pro \
proto/fileio.pro \
proto/fold.pro \
proto/getchar.pro \
proto/hardcopy.pro \
proto/hashtab.pro \
proto/json.pro \
proto/list.pro \
proto/main.pro \
proto/mark.pro \
proto/memfile.pro \
@@ -177,12 +196,14 @@ PRO = proto/blowfish.pro \
proto/search.pro \
proto/sha256.pro \
proto/spell.pro \
proto/spellfile.pro \
proto/syntax.pro \
proto/tag.pro \
proto/term.pro \
proto/termlib.pro \
proto/ui.pro \
proto/undo.pro \
proto/userfunc.pro \
proto/window.pro
all: Vim xxd/Xxd
@@ -229,6 +250,9 @@ CCNOSYM = $(CC) $(CFLAGS) -o
$(OBJ): $(SYMS)
obj/arabic.o: arabic.c
$(CCSYM) $@ arabic.c
obj/blowfish.o: blowfish.c
$(CCSYM) $@ blowfish.c
@@ -244,6 +268,9 @@ obj/crypt.o: crypt.c
obj/crypt_zip.o: crypt_zip.c
$(CCSYM) $@ crypt_zip.c
obj/dict.o: dict.c
$(CCSYM) $@ dict.c
obj/diff.o: diff.c
$(CCSYM) $@ diff.c
@@ -256,6 +283,9 @@ obj/edit.o: edit.c
obj/eval.o: eval.c
$(CCSYM) $@ eval.c
obj/evalfunc.o: evalfunc.c
$(CCSYM) $@ evalfunc.c
obj/ex_cmds.o: ex_cmds.c
$(CCSYM) $@ ex_cmds.c
@@ -272,6 +302,9 @@ obj/ex_eval.o: ex_eval.c ex_cmds.h
obj/ex_getln.o: ex_getln.c
$(CCSYM) $@ ex_getln.c
obj/farsi.o: farsi.c
$(CCSYM) $@ farsi.c
obj/fileio.o: fileio.c
$(CCSYM) $@ fileio.c
@@ -290,6 +323,9 @@ obj/hashtab.o: hashtab.c
obj/json.o: json.c
$(CCSYM) $@ json.c
obj/list.o: list.c
$(CCSYM) $@ list.c
# Don't use $(SYMS) here, because main.c defines EXTERN
obj/main.o: main.c option.h globals.h
$(CCNOSYM) $@ main.c
@@ -356,6 +392,9 @@ obj/sha256.o: sha256.c
obj/spell.o: spell.c
$(CCSYM) $@ spell.c
obj/spellfile.o: spellfile.c
$(CCSYM) $@ spellfile.c
obj/syntax.o: syntax.c
$(CCSYM) $@ syntax.c
@@ -374,5 +413,8 @@ obj/ui.o: ui.c
obj/undo.o: undo.c
$(CCSYM) $@ undo.c
obj/userfunc.o: userfunc.c
$(CCSYM) $@ userfunc.c
obj/window.o: window.c
$(CCSYM) $@ window.c

View File

@@ -24,26 +24,31 @@ RM = rm
.c.o:
${CC} ${CFLAGS} $< -o $@
SRC = blowfish.c \
SRC = arabic.c \
blowfish.c \
buffer.c \
charset.c \
crypt.c \
crypt_zip.c \
dict.c \
diff.c \
digraph.c \
edit.c \
eval.c \
evalfunc.c \
ex_cmds.c \
ex_cmds2.c \
ex_docmd.c \
ex_eval.c \
ex_getln.c \
farsi.c \
fileio.c \
fold.c \
getchar.c \
hardcopy.c \
hashtab.c \
json.c \
list.c \
main.c \
mark.c \
mbyte.c \
@@ -65,11 +70,13 @@ SRC = blowfish.c \
search.c \
sha256.c \
spell.c \
spellfile.c \
syntax.c \
tag.c \
term.c \
ui.c \
undo.c \
userfunc.c \
version.c \
window.c \

View File

@@ -255,6 +255,45 @@ MAKEFLAGS_GVIMEXT = DEBUG=yes
!endif
# Check VC version.
!if [echo MSVCVER=_MSC_VER> msvcver.c && $(CC) /EP msvcver.c > msvcver.~ 2> nul]
!message *** ERROR
!message Cannot run Visual C to determine its version. Make sure cl.exe is in your PATH.
!message This can usually be done by running "vcvarsall.bat", located in the bin directory where Visual Studio was installed.
!error Make aborted.
!else
!include msvcver.~
!if [del msvcver.c msvcver.~]
!endif
!endif
!if $(MSVCVER) < 1900
MSVC_MAJOR = ($(MSVCVER) / 100 - 6)
MSVCRT_VER = ($(MSVCVER) / 10 - 60)
!else
MSVC_MAJOR = ($(MSVCVER) / 100 - 5)
MSVCRT_VER = ($(MSVCVER) / 10 - 50)
!endif
# Calculate MSVCRT_VER
!if [(set /a MSVCRT_VER="$(MSVCRT_VER)" > nul) && set MSVCRT_VER > msvcrtver.~] == 0
!include msvcrtver.~
!if [del msvcrtver.~]
!endif
!endif
# Base name of the msvcrXX.dll
!if $(MSVCRT_VER) <= 60
MSVCRT_NAME = msvcrt
!else
MSVCRT_NAME = msvcr$(MSVCRT_VER)
!endif
!if $(MSVC_MAJOR) == 6
CPU = ix86
!endif
# Flag to turn on Win64 compatibility warnings for VC7.x and VC8.
WP64CHECK = /Wp64
@@ -294,8 +333,9 @@ CHANNEL = $(GUI)
!endif
!endif
# Only allow NETBEANS and XPM for a GUI build and CHANNEL.
# GUI sepcific features.
!if "$(GUI)" == "yes"
# Only allow NETBEANS for a GUI build and CHANNEL.
!if "$(NETBEANS)" == "yes" && "$(CHANNEL)" == "yes"
# NETBEANS - Include support for Netbeans integration
NETBEANS_PRO = proto/netbeans.pro
@@ -317,8 +357,11 @@ DIRECTX_INCL = gui_dwrite.h
DIRECTX_OBJ = $(OUTDIR)\gui_dwrite.obj
!endif
# Only allow XPM for a GUI build.
!ifndef XPM
# XPM is not set, use the included xpm files, depending on the architecture.
!ifndef USE_MSVCRT
# Both XPM and USE_MSVCRT are not set, use the included xpm files, depending
# on the architecture.
!if "$(CPU)" == "AMD64"
XPM = xpm\x64
!elseif "$(CPU)" == "i386"
@@ -326,13 +369,22 @@ XPM = xpm\x86
!else
XPM = no
!endif
!endif
!else # USE_MSVCRT
XPM = no
!endif # USE_MSVCRT
!endif # XPM
!if "$(XPM)" != "no"
# XPM - Include support for XPM signs
# See the xpm directory for more information.
XPM_OBJ = $(OBJDIR)/xpm_w32.obj
XPM_DEFS = -DFEAT_XPM_W32
!if $(MSVC_MAJOR) >= 14
# VC14 cannot use a library built by VC12 or eariler, because VC14 uses
# Universal CRT.
XPM_LIB = $(XPM)\lib-vc14\libXpm.lib
!else
XPM_LIB = $(XPM)\lib\libXpm.lib
!endif
XPM_INC = -I $(XPM)\include -I $(XPM)\..\include
!endif
!endif
@@ -395,43 +447,6 @@ DEL_TREE = deltree /y
INTDIR=$(OBJDIR)
OUTDIR=$(OBJDIR)
!if [echo MSVCVER=_MSC_VER> msvcver.c && $(CC) /EP msvcver.c > msvcver.~ 2> nul]
!message *** ERROR
!message Cannot run Visual C to determine its version. Make sure cl.exe is in your PATH.
!message This can usually be done by running "vcvarsall.bat", located in the bin directory where Visual Studio was installed.
!error Make aborted.
!else
!include msvcver.~
!if [del msvcver.c msvcver.~]
!endif
!endif
!if $(MSVCVER) < 1900
MSVC_MAJOR = ($(MSVCVER) / 100 - 6)
MSVCRT_VER = ($(MSVCVER) / 10 - 60)
!else
MSVC_MAJOR = ($(MSVCVER) / 100 - 5)
MSVCRT_VER = ($(MSVCVER) / 10 - 50)
!endif
# Calculate MSVCRT_VER
!if [(set /a MSVCRT_VER="$(MSVCRT_VER)" > nul) && set MSVCRT_VER > msvcrtver.~] == 0
!include msvcrtver.~
!if [del msvcrtver.~]
!endif
!endif
# Base name of the msvcrXX.dll
!if $(MSVCRT_VER) <= 60
MSVCRT_NAME = msvcrt
!else
MSVCRT_NAME = msvcr$(MSVCRT_VER)
!endif
!if $(MSVC_MAJOR) == 6
CPU = ix86
!endif
# Convert processor ID to MVC-compatible number
!if $(MSVC_MAJOR) < 8
!if "$(CPUNR)" == "i386"
@@ -486,6 +501,11 @@ OPTFLAG = $(OPTFLAG) /GL
CFLAGS=$(CFLAGS) $(WP64CHECK)
!endif
# VC10 or later has stdint.h.
!if $(MSVC_MAJOR) >= 10
CFLAGS = $(CFLAGS) -DHAVE_STDINT_H
!endif
# Static code analysis generally available starting with VS2012 (VC11) or
# Windows SDK 7.1 (VC10)
!if ("$(ANALYZE)" == "yes") && ($(MSVC_MAJOR) >= 10)
@@ -528,26 +548,31 @@ INCL = vim.h os_win32.h ascii.h feature.h globals.h keymap.h macros.h \
$(NBDEBUG_INCL)
OBJ = \
$(OUTDIR)\arabic.obj \
$(OUTDIR)\blowfish.obj \
$(OUTDIR)\buffer.obj \
$(OUTDIR)\charset.obj \
$(OUTDIR)\crypt.obj \
$(OUTDIR)\crypt_zip.obj \
$(OUTDIR)\dict.obj \
$(OUTDIR)\diff.obj \
$(OUTDIR)\digraph.obj \
$(OUTDIR)\edit.obj \
$(OUTDIR)\eval.obj \
$(OUTDIR)\evalfunc.obj \
$(OUTDIR)\ex_cmds.obj \
$(OUTDIR)\ex_cmds2.obj \
$(OUTDIR)\ex_docmd.obj \
$(OUTDIR)\ex_eval.obj \
$(OUTDIR)\ex_getln.obj \
$(OUTDIR)\farsi.obj \
$(OUTDIR)\fileio.obj \
$(OUTDIR)\fold.obj \
$(OUTDIR)\getchar.obj \
$(OUTDIR)\hardcopy.obj \
$(OUTDIR)\hashtab.obj \
$(OUTDIR)\json.obj \
$(OUTDIR)\list.obj \
$(OUTDIR)\main.obj \
$(OUTDIR)\mark.obj \
$(OUTDIR)\mbyte.obj \
@@ -572,11 +597,13 @@ OBJ = \
$(OUTDIR)\search.obj \
$(OUTDIR)\sha256.obj \
$(OUTDIR)\spell.obj \
$(OUTDIR)\spellfile.obj \
$(OUTDIR)\syntax.obj \
$(OUTDIR)\tag.obj \
$(OUTDIR)\term.obj \
$(OUTDIR)\ui.obj \
$(OUTDIR)\undo.obj \
$(OUTDIR)\userfunc.obj \
$(OUTDIR)\window.obj \
$(OUTDIR)\vim.res
@@ -640,6 +667,8 @@ GUI_LIB = \
/machine:$(CPU)
!else
SUBSYSTEM = console
CUI_INCL = iscygpty.h
CUI_OBJ = $(OUTDIR)\iscygpty.obj
!endif
!if "$(SUBSYSTEM_VER)" != ""
@@ -1011,12 +1040,12 @@ all: $(VIM).exe \
tee/tee.exe \
GvimExt/gvimext.dll
$(VIM).exe: $(OUTDIR) $(OBJ) $(GUI_OBJ) $(OLE_OBJ) $(OLE_IDL) $(MZSCHEME_OBJ) \
$(VIM).exe: $(OUTDIR) $(OBJ) $(GUI_OBJ) $(CUI_OBJ) $(OLE_OBJ) $(OLE_IDL) $(MZSCHEME_OBJ) \
$(LUA_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(PYTHON3_OBJ) $(RUBY_OBJ) $(TCL_OBJ) \
$(CSCOPE_OBJ) $(NETBEANS_OBJ) $(CHANNEL_OBJ) $(XPM_OBJ) \
version.c version.h
$(CC) $(CFLAGS) version.c
$(link) $(LINKARGS1) -out:$(VIM).exe $(OBJ) $(GUI_OBJ) $(OLE_OBJ) \
$(link) $(LINKARGS1) -out:$(VIM).exe $(OBJ) $(GUI_OBJ) $(CUI_OBJ) $(OLE_OBJ) \
$(LUA_OBJ) $(MZSCHEME_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(PYTHON3_OBJ) $(RUBY_OBJ) \
$(TCL_OBJ) $(CSCOPE_OBJ) $(NETBEANS_OBJ) $(CHANNEL_OBJ) \
$(XPM_OBJ) $(OUTDIR)\version.obj $(LINKARGS2)
@@ -1126,6 +1155,8 @@ testclean:
!ENDIF
$(CC) $(CFLAGS) $<
$(OUTDIR)/arabic.obj: $(OUTDIR) arabic.c $(INCL)
$(OUTDIR)/blowfish.obj: $(OUTDIR) blowfish.c $(INCL)
$(OUTDIR)/buffer.obj: $(OUTDIR) buffer.c $(INCL)
@@ -1136,6 +1167,8 @@ $(OUTDIR)/crypt.obj: $(OUTDIR) crypt.c $(INCL)
$(OUTDIR)/crypt_zip.obj: $(OUTDIR) crypt_zip.c $(INCL)
$(OUTDIR)/dict.obj: $(OUTDIR) dict.c $(INCL)
$(OUTDIR)/diff.obj: $(OUTDIR) diff.c $(INCL)
$(OUTDIR)/digraph.obj: $(OUTDIR) digraph.c $(INCL)
@@ -1144,6 +1177,8 @@ $(OUTDIR)/edit.obj: $(OUTDIR) edit.c $(INCL)
$(OUTDIR)/eval.obj: $(OUTDIR) eval.c $(INCL)
$(OUTDIR)/evalfunc.obj: $(OUTDIR) evalfunc.c $(INCL)
$(OUTDIR)/ex_cmds.obj: $(OUTDIR) ex_cmds.c $(INCL)
$(OUTDIR)/ex_cmds2.obj: $(OUTDIR) ex_cmds2.c $(INCL)
@@ -1154,6 +1189,8 @@ $(OUTDIR)/ex_eval.obj: $(OUTDIR) ex_eval.c $(INCL) ex_cmds.h
$(OUTDIR)/ex_getln.obj: $(OUTDIR) ex_getln.c $(INCL)
$(OUTDIR)/farsi.obj: $(OUTDIR) farsi.c $(INCL)
$(OUTDIR)/fileio.obj: $(OUTDIR) fileio.c $(INCL)
$(OUTDIR)/fold.obj: $(OUTDIR) fold.c $(INCL)
@@ -1208,9 +1245,14 @@ $(OUTDIR)/if_ruby.obj: $(OUTDIR) if_ruby.c $(INCL)
$(OUTDIR)/if_tcl.obj: $(OUTDIR) if_tcl.c $(INCL)
$(CC) $(CFLAGS) $(TCL_INC) if_tcl.c
$(OUTDIR)/iscygpty.obj: $(OUTDIR) iscygpty.c $(CUI_INCL)
$(CC) $(CFLAGS) iscygpty.c -D_WIN32_WINNT=0x0600 -DUSE_DYNFILEID -DENABLE_STUB_IMPL
$(OUTDIR)/json.obj: $(OUTDIR) json.c $(INCL)
$(OUTDIR)/main.obj: $(OUTDIR) main.c $(INCL)
$(OUTDIR)/list.obj: $(OUTDIR) list.c $(INCL)
$(OUTDIR)/main.obj: $(OUTDIR) main.c $(INCL) $(CUI_INCL)
$(OUTDIR)/mark.obj: $(OUTDIR) mark.c $(INCL)
@@ -1265,6 +1307,8 @@ $(OUTDIR)/sha256.obj: $(OUTDIR) sha256.c $(INCL)
$(OUTDIR)/spell.obj: $(OUTDIR) spell.c $(INCL)
$(OUTDIR)/spellfile.obj: $(OUTDIR) spellfile.c $(INCL)
$(OUTDIR)/syntax.obj: $(OUTDIR) syntax.c $(INCL)
$(OUTDIR)/tag.obj: $(OUTDIR) tag.c $(INCL)
@@ -1275,6 +1319,8 @@ $(OUTDIR)/ui.obj: $(OUTDIR) ui.c $(INCL)
$(OUTDIR)/undo.obj: $(OUTDIR) undo.c $(INCL)
$(OUTDIR)/userfunc.obj: $(OUTDIR) userfunc.c $(INCL)
$(OUTDIR)/window.obj: $(OUTDIR) window.c $(INCL)
$(OUTDIR)/xpm_w32.obj: $(OUTDIR) xpm_w32.c
@@ -1321,25 +1367,30 @@ auto:
# End Custom Build
proto.h: \
proto/arabic.pro \
proto/blowfish.pro \
proto/buffer.pro \
proto/charset.pro \
proto/crypt.pro \
proto/crypt_zip.pro \
proto/dict.pro \
proto/diff.pro \
proto/digraph.pro \
proto/edit.pro \
proto/eval.pro \
proto/evalfunc.pro \
proto/ex_cmds.pro \
proto/ex_cmds2.pro \
proto/ex_docmd.pro \
proto/ex_eval.pro \
proto/ex_getln.pro \
proto/farsi.pro \
proto/fileio.pro \
proto/getchar.pro \
proto/hardcopy.pro \
proto/hashtab.pro \
proto/json.pro \
proto/list.pro \
proto/main.pro \
proto/mark.pro \
proto/memfile.pro \
@@ -1363,11 +1414,13 @@ proto.h: \
proto/search.pro \
proto/sha256.pro \
proto/spell.pro \
proto/spellfile.pro \
proto/syntax.pro \
proto/tag.pro \
proto/term.pro \
proto/ui.pro \
proto/undo.pro \
proto/userfunc.pro \
proto/window.pro \
$(NETBEANS_PRO) \
$(CHANNEL_PRO)

View File

@@ -89,26 +89,31 @@ CFLAGS4 = $(DEFINES) DATAMEMORY=$(MEMORYTYPE)
PROPT = DEF=PROTO GPROTO GPPARM MAXIMUMERRORS=999 GENPROTOSTATICS GENPROTOPARAMETERS
SRC = \
arabic.c \
blowfish.c \
buffer.c \
charset.c \
crypt.c \
crypt_zip.c \
dict.c \
diff.c \
digraph.c \
edit.c \
eval.c \
evalfunc.c \
ex_cmds.c \
ex_cmds2.c \
ex_docmd.c \
ex_eval.c \
ex_getln.c \
farsi.c \
fileio.c \
fold.c \
getchar.c \
hardcopy.c \
hashtab.c \
json.c \
list.c \
main.c \
mark.c \
memfile.c \
@@ -130,35 +135,42 @@ SRC = \
search.c \
sha256.c \
spell.c \
spellfile.c \
syntax.c \
tag.c \
term.c \
ui.c \
undo.c \
userfunc.c \
window.c \
version.c
OBJ = \
arabic.o \
blowfish.o \
buffer.o \
charset.o \
crypt.o \
crypt_zip.o \
dict.o \
diff.o \
digraph.o \
edit.o \
eval.o \
evalfunc.o \
ex_cmds.o \
ex_cmds2.o \
ex_docmd.o \
ex_eval.o \
ex_getln.o \
farsi.o \
fileio.o \
fold.o \
getchar.o \
hardcopy.o \
hashtab.o \
json.o \
list.o \
main.o \
mark.o \
memfile.o \
@@ -180,35 +192,42 @@ OBJ = \
search.o \
sha256.o \
spell.o \
spellfile.o \
syntax.o \
tag.o \
term.o \
ui.o \
undo.o \
userfunc.o \
window.o \
$(TERMLIB)
PRO = \
proto/arabic.pro \
proto/blowfish.pro \
proto/buffer.pro \
proto/charset.pro \
proto/crypt.pro \
proto/crypt_zip.pro \
proto/dict.pro \
proto/diff.pro \
proto/digraph.pro \
proto/edit.pro \
proto/eval.pro \
proto/evalfunc.pro \
proto/ex_cmds.pro \
proto/ex_cmds2.pro \
proto/ex_docmd.pro \
proto/ex_eval.pro \
proto/ex_getln.pro \
proto/farsi.pro \
proto/fileio.pro \
proto/fold.pro \
proto/getchar.pro \
proto/hardcopy.pro \
proto/hashtab.pro \
proto/json.pro \
proto/list.pro \
proto/main.pro \
proto/mark.pro \
proto/memfile.pro \
@@ -230,12 +249,14 @@ PRO = \
proto/search.pro \
proto/sha256.pro \
proto/spell.pro \
proto/spellfile.pro \
proto/syntax.pro \
proto/tag.pro \
proto/term.pro \
proto/termlib.pro \
proto/ui.pro \
proto/undo.pro \
proto/userfunc.pro \
proto/window.pro
all: proto Vim
@@ -293,6 +314,8 @@ $(PRO): $(GST) vim.h
$(CC) $(CFLAGS) GPFILE=proto/$*.pro $(PROPT) $*.c
# dependencies
arabic.o: arabic.c
proto/arabic.pro: arabic.c
blowfish.o: blowfish.c
proto/blowfish.pro: blowfish.c
buffer.o: buffer.c
@@ -303,6 +326,8 @@ crypt.o: crypt.c
proto/crypt.pro: crypt.c
crypt_zip.o: crypt_zip.c
proto/crypt_zip.pro: crypt_zip.c
dict.o: dict.c
proto/dict.pro: dict.c
diff.o: diff.c
proto/diff.pro: diff.c
digraph.o: digraph.c
@@ -311,6 +336,8 @@ edit.o: edit.c
proto/edit.pro: edit.c
eval.o: eval.c
proto/eval.pro: eval.c
evalfunc.o: evalfunc.c
proto/evalfunc.pro: evalfunc.c
ex_cmds.o: ex_cmds.c
proto/ex_cmds.pro: ex_cmds.c
ex_cmds2.o: ex_cmds2.c
@@ -321,6 +348,8 @@ ex_eval.o: ex_eval.c ex_cmds.h
proto/ex_eval.pro: ex_eval.c ex_cmds.h
ex_getln.o: ex_getln.c
proto/ex_getln.pro: ex_getln.c
farsi.o: farsi.c
proto/farsi.pro: farsi.c
fileio.o: fileio.c
proto/fileio.pro: fileio.c
fold.o: fold.c
@@ -333,6 +362,8 @@ hashtab.o: hashtab.c
proto/hashtab.pro: hashtab.c
json.o: json.c
proto/json.pro: json.c
list.o: list.c
proto/list.pro: list.c
main.o: main.c
proto/main.pro: main.c
mark.o: mark.c
@@ -375,6 +406,8 @@ sha256.o: sha256.c
proto/sha256.pro: sha256.c
spell.o: spell.c
proto/spell.pro: spell.c
spellfile.o: spellfile.c
proto/spellfile.pro: spellfile.c
syntax.o: syntax.c
proto/syntax.pro: syntax.c
tag.o: tag.c
@@ -387,4 +420,6 @@ ui.o: ui.c
proto/ui.pro: ui.c
undo.o: undo.c
proto/undo.pro: undo.c
userfunc.o: userfunc.c
proto/userfunc.pro: userfunc.c
window.o: window.c

View File

@@ -2,7 +2,7 @@
# Makefile for Vim on OpenVMS
#
# Maintainer: Zoltan Arpadffy <arpadffy@polarhome.com>
# Last change: 2016 Feb 27
# Last change: 2016 Jul 02
#
# This has script been tested on VMS 6.2 to 8.2 on DEC Alpha, VAX and IA64
# with MMS and MMK
@@ -299,8 +299,8 @@ 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) $(RUBY_LIB)
SRC = blowfish.c buffer.c charset.c crypt.c, crypt_zip.c diff.c digraph.c edit.c eval.c ex_cmds.c ex_cmds2.c \
ex_docmd.c ex_eval.c ex_getln.c if_xcmdsrv.c fileio.c fold.c getchar.c \
SRC = arabic.c 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 farsi.c fileio.c fold.c getchar.c \
hardcopy.c hashtab.c json.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\
spell.c syntax.c tag.c term.c termlib.c ui.c undo.c version.c screen.c \
@@ -308,9 +308,9 @@ SRC = blowfish.c buffer.c charset.c crypt.c, crypt_zip.c diff.c digraph.c edit.c
$(GUI_SRC) $(PERL_SRC) $(PYTHON_SRC) $(TCL_SRC) \
$(RUBY_SRC) $(HANGULIN_SRC) $(MZSCH_SRC)
OBJ = blowfish.obj buffer.obj charset.obj crypt.obj, crypt_zip.obj diff.obj digraph.obj edit.obj eval.obj \
OBJ = arabic.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 json.obj main.obj mark.obj \
if_xcmdsrv.obj farsi.obj fileio.obj fold.obj getchar.obj hardcopy.obj hashtab.obj json.obj main.obj mark.obj \
menu.obj memfile.obj memline.obj message.obj misc1.obj misc2.obj \
move.obj mbyte.obj normal.obj ops.obj option.obj popupmnu.obj quickfix.obj \
regexp.obj search.obj sha256.obj spell.obj syntax.obj tag.obj term.obj termlib.obj \
@@ -486,6 +486,8 @@ ruby_env :
-@ !
.ENDIF
arabic.obj : arabic.c vim.h
blowfish.obj : blowfish.c vim.h
buffer.obj : buffer.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h term.h macros.h structs.h regexp.h \
gui.h gui_beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
@@ -530,6 +532,7 @@ ex_getln.obj : ex_getln.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h term.h macros.h structs.h regexp.h \
gui.h gui_beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
globals.h farsi.h arabic.h
farsi.obj : farsi.c vim.h
fileio.obj : fileio.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h term.h macros.h structs.h regexp.h \
gui.h gui_beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \

View File

@@ -368,6 +368,9 @@ CClink = $(CC)
# Carbon GUI for Mac OS X
#CONF_OPT_GUI = --enable-gui=carbon
# Uncomment this line to run an indivisual test with gvim.
#GUI_TESTARG = GUI_FLAG=-g
# DARWIN - detecting Mac OS X
# Uncomment this line when you want to compile a Unix version of Vim on
# Darwin. None of the Mac specific options or files will be used.
@@ -602,6 +605,10 @@ AUTOCONF = autoconf
# PURIFY - remove the # to use the "purify" program (hoi Nia++!)
#PURIFY = purify
# VALGRIND - remove the # to use valgrind for memory leaks and access errors.
# Used for the unittest targets.
# VALGRIND = valgrind --tool=memcheck --leak-check=yes --num-callers=25 --log-file=valgrind.$@
# NBDEBUG - debugging the netbeans interface.
#EXTRA_DEFS = -DNBDEBUG
@@ -1064,7 +1071,8 @@ SCRIPTLOC = $(VIMRTLOC)
### the runtime directory is not below it.
#VIMRUNTIMEDIR = $(VIMRTLOC)
### Name of the evim file target.
### Name of the defaults/evim/mswin file target.
VIM_DEFAULTS_FILE = $(DESTDIR)$(SCRIPTLOC)/defaults.vim
EVIM_FILE = $(DESTDIR)$(SCRIPTLOC)/evim.vim
MSWIN_FILE = $(DESTDIR)$(SCRIPTLOC)/mswin.vim
@@ -1478,20 +1486,24 @@ DEST_MAN_RU_U = $(DEST_MAN_TOP)/ru.UTF-8$(MAN1DIR)
TAGS_INCL = *.h
BASIC_SRC = \
arabic.c \
blowfish.c \
buffer.c \
charset.c \
crypt.c \
crypt_zip.c \
dict.c \
diff.c \
digraph.c \
edit.c \
eval.c \
evalfunc.c \
ex_cmds.c \
ex_cmds2.c \
ex_docmd.c \
ex_eval.c \
ex_getln.c \
farsi.c \
fileio.c \
fold.c \
getchar.c \
@@ -1500,6 +1512,7 @@ BASIC_SRC = \
if_cscope.c \
if_xcmdsrv.c \
json.c \
list.c \
main.c \
mark.c \
memfile.c \
@@ -1522,11 +1535,13 @@ BASIC_SRC = \
search.c \
sha256.c \
spell.c \
spellfile.c \
syntax.c \
tag.c \
term.c \
ui.c \
undo.c \
userfunc.c \
version.c \
window.c \
$(OS_EXTRA_SRC)
@@ -1556,9 +1571,12 @@ JSON_TEST_SRC = json_test.c
JSON_TEST_TARGET = json_test$(EXEEXT)
MEMFILE_TEST_SRC = memfile_test.c
MEMFILE_TEST_TARGET = memfile_test$(EXEEXT)
MESSAGE_TEST_SRC = message_test.c
MESSAGE_TEST_TARGET = message_test$(EXEEXT)
UNITTEST_SRC = $(JSON_TEST_SRC) $(MEMFILE_TEST_SRC)
UNITTEST_TARGETS = $(JSON_TEST_TARGET) $(MEMFILE_TEST_TARGET)
UNITTEST_SRC = $(JSON_TEST_SRC) $(MEMFILE_TEST_SRC) $(MESSAGE_TEST_SRC)
UNITTEST_TARGETS = $(JSON_TEST_TARGET) $(MEMFILE_TEST_TARGET) $(MESSAGE_TEST_TARGET)
RUN_UNITTESTS = run_json_test run_memfile_test run_message_test
# All sources, also the ones that are not configured
ALL_SRC = $(BASIC_SRC) $(ALL_GUI_SRC) $(UNITTEST_SRC) $(EXTRA_SRC)
@@ -1575,20 +1593,24 @@ LINT_SRC = $(BASIC_SRC) $(GUI_SRC) $(HANGULIN_SRC) \
#LINT_SRC = $(BASIC_SRC)
OBJ_COMMON = \
objects/arabic.o \
objects/buffer.o \
objects/blowfish.o \
objects/charset.o \
objects/crypt.o \
objects/crypt_zip.o \
objects/dict.o \
objects/diff.o \
objects/digraph.o \
objects/edit.o \
objects/eval.o \
objects/evalfunc.o \
objects/ex_cmds.o \
objects/ex_cmds2.o \
objects/ex_docmd.o \
objects/ex_eval.o \
objects/ex_getln.o \
objects/farsi.o \
objects/fileio.o \
objects/fold.o \
objects/getchar.o \
@@ -1597,10 +1619,10 @@ OBJ_COMMON = \
$(HANGULIN_OBJ) \
objects/if_cscope.o \
objects/if_xcmdsrv.o \
objects/list.o \
objects/mark.o \
objects/memline.o \
objects/menu.o \
objects/message.o \
objects/misc1.o \
objects/misc2.o \
objects/move.o \
@@ -1617,11 +1639,13 @@ OBJ_COMMON = \
objects/search.o \
objects/sha256.o \
objects/spell.o \
objects/spellfile.o \
objects/syntax.o \
objects/tag.o \
objects/term.o \
objects/ui.o \
objects/undo.o \
objects/userfunc.o \
objects/version.o \
objects/window.o \
$(GUI_OBJ) \
@@ -1638,34 +1662,47 @@ OBJ_COMMON = \
$(CHANNEL_OBJ) \
$(WSDEBUG_OBJ)
# The files included by tests are not in OBJ_COMMON.
OBJ = $(OBJ_COMMON) \
objects/json.o \
objects/main.o \
objects/memfile.o
objects/memfile.o \
objects/message.o
JSON_TEST_OBJ = $(OBJ_COMMON) \
objects/json_test.o \
objects/memfile.o
objects/memfile.o \
objects/message.o \
objects/json_test.o
MEMFILE_TEST_OBJ = $(OBJ_COMMON) \
objects/json.o \
objects/message.o \
objects/memfile_test.o
MESSAGE_TEST_OBJ = $(OBJ_COMMON) \
objects/json.o \
objects/memfile.o \
objects/message_test.o
PRO_AUTO = \
arabic.pro \
blowfish.pro \
buffer.pro \
charset.pro \
crypt.pro \
crypt_zip.pro \
dict.pro \
diff.pro \
digraph.pro \
edit.pro \
eval.pro \
evalfunc.pro \
ex_cmds.pro \
ex_cmds2.pro \
ex_docmd.pro \
ex_eval.pro \
ex_getln.pro \
farsi.pro \
fileio.pro \
fold.pro \
getchar.pro \
@@ -1680,6 +1717,7 @@ PRO_AUTO = \
if_ruby.pro \
if_xcmdsrv.pro \
json.pro \
list.pro \
main.pro \
mark.pro \
mbyte.pro \
@@ -1703,12 +1741,14 @@ PRO_AUTO = \
search.pro \
sha256.pro \
spell.pro \
spellfile.pro \
syntax.pro \
tag.pro \
term.pro \
termlib.pro \
ui.pro \
undo.pro \
userfunc.pro \
version.pro \
window.pro \
gui_beval.pro \
@@ -1921,6 +1961,11 @@ types.vim: $(TAGS_SRC) $(TAGS_INCL)
{printf("%s ", $$1)}END{print ""}' > $@
echo "syn keyword Constant OK FAIL TRUE FALSE MAYBE" >> $@
# TESTING
#
# Execute the test scripts and the unittests.
test check: scripttests unittests
# Execute the test scripts. Run these after compiling Vim, before installing.
# This doesn't depend on $(VIMTARGET), because that won't work when configure
# wasn't run yet. Restart make to build it instead.
@@ -1932,7 +1977,7 @@ types.vim: $(TAGS_SRC) $(TAGS_INCL)
# If everything is alright, the final message will be "ALL DONE". If not you
# get "TEST FAILURE".
#
test check:
scripttests:
$(MAKE) -f Makefile $(VIMTARGET)
if test -n "$(MAKEMO)" -a -f $(PODIR)/Makefile; then \
cd $(PODIR); $(MAKE) -f Makefile check VIM=../$(VIMTARGET); \
@@ -1941,7 +1986,7 @@ test check:
ln -s $(VIMTARGET) vim; \
fi
cd testdir; $(MAKE) -f Makefile $(GUI_TESTTARGET) VIMPROG=../$(VIMTARGET) $(GUI_TESTARG) SCRIPTSOURCE=../$(SCRIPTSOURCE)
$(MAKE) -f Makefile unittest
# Run the tests with the GUI. Assumes vim/gvim was already built
testgui:
@@ -1953,16 +1998,17 @@ benchmark:
unittesttargets:
$(MAKE) -f Makefile $(UNITTEST_TARGETS)
unittest unittests: $(UNITTEST_TARGETS)
@for t in $(UNITTEST_TARGETS); do \
./$$t || exit 1; echo $$t passed; \
done
# Execute the unittests one by one.
unittest unittests: $(RUN_UNITTESTS)
run_json_test: $(JSON_TEST_TARGET)
./$(JSON_TEST_TARGET)
$(VALGRIND) ./$(JSON_TEST_TARGET) || exit 1; echo $* passed;
run_memfile_test: $(MEMFILE_TEST_TARGET)
./$(MEMFILE_TEST_TARGET)
$(VALGRIND) ./$(MEMFILE_TEST_TARGET) || exit 1; echo $* passed;
run_message_test: $(MESSAGE_TEST_TARGET)
$(VALGRIND) ./$(MESSAGE_TEST_TARGET) || exit 1; echo $* passed;
# Run individual OLD style test, assuming that Vim was already compiled.
test1 \
@@ -1986,21 +2032,19 @@ test1 \
test_marks \
test_nested_function \
test_options \
test_ruby \
test_search_mbyte \
test_signs \
test_tagcase \
test_textobjects \
test_utf8 \
test_wordcount \
test_writefile \
test2 test3 test4 test5 test6 test7 test8 test9 \
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 \
test40 test41 test42 test43 test44 test45 test46 test47 test48 test49 \
test30 test31 test32 test33 test34 test36 test37 test38 test39 \
test40 test41 test42 test43 test44 test45 test46 test48 test49 \
test50 test51 test52 test53 test54 test55 test56 test57 test58 test59 \
test60 test61 test62 test63 test64 test65 test66 test67 test68 test69 \
test60 test62 test63 test64 test65 test66 test67 test68 test69 \
test70 test71 test72 test73 test74 test75 test76 test77 test78 test79 \
test80 test81 test82 test83 test84 test85 test86 test87 test88 test89 \
test90 test91 test92 test93 test94 test95 test97 test98 test99 \
@@ -2011,53 +2055,75 @@ test1 \
test_arglist \
test_assert \
test_assign \
test_autochdir \
test_autocmd \
test_backspace_opt \
test_cdo \
test_channel \
test_cmdline \
test_cscope \
test_cursor_func \
test_delete \
test_diffmode \
test_digraph \
test_ex_undo \
test_execute_func \
test_expand \
test_expand_dllpath \
test_expr \
test_expr_utf8 \
test_farsi \
test_feedkeys \
test_file_perm \
test_filter_map \
test_fnamemodify \
test_glob2regpat \
test_gn \
test_goto \
test_hardcopy \
test_help_tagjump \
test_history \
test_increment \
test_increment_dbcs \
test_join \
test_json \
test_jumps \
test_lambda \
test_langmap \
test_largefile \
test_lispwords \
test_man \
test_matchadd_conceal \
test_matchadd_conceal_utf8 \
test_matchstrpos \
test_menu \
test_messages \
test_netbeans \
test_packadd \
test_partial \
test_perl \
test_popup \
test_quickfix \
test_regexp_latin \
test_regexp_utf8 \
test_reltime \
test_ruby \
test_startup \
test_searchpos \
test_set \
test_sort \
test_stat \
test_statusline \
test_syn_attr \
test_syntax \
test_tabline \
test_tagjump \
test_textobjects \
test_timers \
test_undolevels \
test_true_false \
test_undo \
test_unlet \
test_usercommands \
test_viminfo \
test_viml \
test_visual \
@@ -2101,6 +2167,13 @@ $(MEMFILE_TEST_TARGET): auto/config.mk objects $(MEMFILE_TEST_OBJ)
MAKE="$(MAKE)" LINK_AS_NEEDED=$(LINK_AS_NEEDED) \
sh $(srcdir)/link.sh
$(MESSAGE_TEST_TARGET): auto/config.mk objects $(MESSAGE_TEST_OBJ)
$(CCC) version.c -o objects/version.o
@LINK="$(PURIFY) $(SHRPENV) $(CClink) $(ALL_LIB_DIRS) $(LDFLAGS) \
-o $(MESSAGE_TEST_TARGET) $(MESSAGE_TEST_OBJ) $(ALL_LIBS)" \
MAKE="$(MAKE)" LINK_AS_NEEDED=$(LINK_AS_NEEDED) \
sh $(srcdir)/link.sh
# install targets
install: $(GUI_INSTALL)
@@ -2170,11 +2243,13 @@ installrtbase: $(HELPSOURCE)/vim.1 $(DEST_VIM) $(DEST_RT) \
chmod $(VIMSCRIPTMOD) $(SYS_SYNMENU_FILE)
$(INSTALL_DATA) $(SCRIPTSOURCE)/delmenu.vim $(SYS_DELMENU_FILE)
chmod $(VIMSCRIPTMOD) $(SYS_DELMENU_FILE)
# install the evim file
$(INSTALL_DATA) $(SCRIPTSOURCE)/mswin.vim $(MSWIN_FILE)
chmod $(VIMSCRIPTMOD) $(MSWIN_FILE)
# install the defaults/evim/mswin file
$(INSTALL_DATA) $(SCRIPTSOURCE)/defaults.vim $(VIM_DEFAULTS_FILE)
chmod $(VIMSCRIPTMOD) $(VIM_DEFAULTS_FILE)
$(INSTALL_DATA) $(SCRIPTSOURCE)/evim.vim $(EVIM_FILE)
chmod $(VIMSCRIPTMOD) $(EVIM_FILE)
$(INSTALL_DATA) $(SCRIPTSOURCE)/mswin.vim $(MSWIN_FILE)
chmod $(VIMSCRIPTMOD) $(MSWIN_FILE)
# install the rgb.txt file
$(INSTALL_DATA) $(SCRIPTSOURCE)/rgb.txt $(SYS_RGB_FILE)
chmod $(VIMSCRIPTMOD) $(SYS_RGB_FILE)
@@ -2542,7 +2617,7 @@ uninstall_runtime:
-rm -f $(DEST_HELP)/*.??x $(DEST_HELP)/tags-??
-rm -f $(SYS_RGB_FILE)
-rm -f $(SYS_MENU_FILE) $(SYS_SYNMENU_FILE) $(SYS_DELMENU_FILE)
-rm -f $(SYS_BUGR_FILE) $(EVIM_FILE) $(MSWIN_FILE)
-rm -f $(SYS_BUGR_FILE) $(VIM_DEFAULTS_FILE) $(EVIM_FILE) $(MSWIN_FILE)
-rm -f $(DEST_SCRIPT)/gvimrc_example.vim $(DEST_SCRIPT)/vimrc_example.vim
-rm -f $(SYS_FILETYPE_FILE) $(SYS_FTOFF_FILE) $(SYS_SCRIPTS_FILE)
-rm -f $(SYS_INDOFF_FILE) $(SYS_INDENT_FILE)
@@ -2740,6 +2815,9 @@ auto/gui_gtk_gresources.h: gui_gtk_res.xml $(GUI_GTK_RES_INPUTS)
objects:
mkdir objects
objects/arabic.o: arabic.c
$(CCC) -o $@ arabic.c
objects/blowfish.o: blowfish.c
$(CCC) -o $@ blowfish.c
@@ -2755,6 +2833,9 @@ objects/crypt.o: crypt.c
objects/crypt_zip.o: crypt_zip.c
$(CCC) -o $@ crypt_zip.c
objects/dict.o: dict.c
$(CCC) -o $@ dict.c
objects/diff.o: diff.c
$(CCC) -o $@ diff.c
@@ -2767,6 +2848,9 @@ objects/edit.o: edit.c
objects/eval.o: eval.c
$(CCC) -o $@ eval.c
objects/evalfunc.o: evalfunc.c
$(CCC) -o $@ evalfunc.c
objects/ex_cmds.o: ex_cmds.c
$(CCC) -o $@ ex_cmds.c
@@ -2782,6 +2866,9 @@ objects/ex_eval.o: ex_eval.c
objects/ex_getln.o: ex_getln.c
$(CCC) -o $@ ex_getln.c
objects/farsi.o: farsi.c
$(CCC) -o $@ farsi.c
objects/fileio.o: fileio.c
$(CCC) -o $@ fileio.c
@@ -2892,6 +2979,9 @@ objects/json.o: json.c
objects/json_test.o: json_test.c
$(CCC) -o $@ json_test.c
objects/list.o: list.c
$(CCC) -o $@ list.c
objects/main.o: main.c
$(CCC) -o $@ main.c
@@ -2913,6 +3003,9 @@ objects/menu.o: menu.c
objects/message.o: message.c
$(CCC) -o $@ message.c
objects/message_test.o: message_test.c
$(CCC) -o $@ message_test.c
objects/misc1.o: misc1.c
$(CCC) -o $@ misc1.c
@@ -2982,6 +3075,9 @@ objects/sha256.o: sha256.c
objects/spell.o: spell.c
$(CCC) -o $@ spell.c
objects/spellfile.o: spellfile.c
$(CCC) -o $@ spellfile.c
objects/syntax.o: syntax.c
$(CCC) -o $@ syntax.c
@@ -2997,6 +3093,9 @@ objects/ui.o: ui.c
objects/undo.o: undo.c
$(CCC) -o $@ undo.c
objects/userfunc.o: userfunc.c
$(CCC) -o $@ userfunc.c
objects/window.o: window.c
$(CCC) -o $@ window.c
@@ -3101,222 +3200,254 @@ $(APPDIR)/Contents:
###############################################################################
### (automatically generated by 'make depend')
### Dependencies:
objects/arabic.o: arabic.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
globals.h farsi.h arabic.h
objects/blowfish.o: blowfish.c vim.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
globals.h farsi.h arabic.h
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
proto.h globals.h farsi.h arabic.h
objects/buffer.o: buffer.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
farsi.h arabic.h version.h
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
globals.h farsi.h arabic.h version.h
objects/charset.o: charset.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
farsi.h arabic.h
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
globals.h farsi.h arabic.h
objects/crypt.o: crypt.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
farsi.h arabic.h
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
globals.h farsi.h arabic.h
objects/crypt_zip.o: crypt_zip.c vim.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
proto.h globals.h farsi.h arabic.h
objects/dict.o: dict.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
globals.h farsi.h arabic.h
objects/diff.o: diff.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
farsi.h arabic.h
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
globals.h farsi.h arabic.h
objects/digraph.o: digraph.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
farsi.h arabic.h
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
globals.h farsi.h arabic.h
objects/edit.o: edit.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
farsi.h arabic.h
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
globals.h farsi.h arabic.h
objects/eval.o: eval.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
farsi.h arabic.h version.h
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
globals.h farsi.h arabic.h version.h
objects/evalfunc.o: evalfunc.c vim.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
proto.h globals.h farsi.h arabic.h version.h
objects/ex_cmds.o: ex_cmds.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
farsi.h arabic.h version.h
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
globals.h farsi.h arabic.h version.h
objects/ex_cmds2.o: ex_cmds2.c vim.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
globals.h farsi.h arabic.h version.h
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
proto.h globals.h farsi.h arabic.h version.h
objects/ex_docmd.o: ex_docmd.c vim.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
globals.h farsi.h arabic.h
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
proto.h globals.h farsi.h arabic.h
objects/ex_eval.o: ex_eval.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
farsi.h arabic.h
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
globals.h farsi.h arabic.h
objects/ex_getln.o: ex_getln.c vim.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
proto.h globals.h farsi.h arabic.h
objects/farsi.o: farsi.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
globals.h farsi.h arabic.h
objects/fileio.o: fileio.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
farsi.h arabic.h
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
globals.h farsi.h arabic.h
objects/fold.o: fold.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
farsi.h arabic.h
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
globals.h farsi.h arabic.h
objects/getchar.o: getchar.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
farsi.h arabic.h
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
globals.h farsi.h arabic.h
objects/hardcopy.o: hardcopy.c vim.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
globals.h farsi.h arabic.h version.h
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
proto.h globals.h farsi.h arabic.h version.h
objects/hashtab.o: hashtab.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
farsi.h arabic.h
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
globals.h farsi.h arabic.h
objects/if_cscope.o: if_cscope.c vim.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
globals.h farsi.h arabic.h if_cscope.h
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
proto.h globals.h farsi.h arabic.h if_cscope.h
objects/if_xcmdsrv.o: if_xcmdsrv.c vim.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
globals.h farsi.h arabic.h version.h
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
proto.h globals.h farsi.h arabic.h version.h
objects/json.o: json.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
farsi.h arabic.h
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
globals.h farsi.h arabic.h
objects/list.o: list.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
globals.h farsi.h arabic.h
objects/main.o: main.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
farsi.h arabic.h farsi.c arabic.c
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
globals.h farsi.h arabic.h
objects/mark.o: mark.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
farsi.h arabic.h
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
globals.h farsi.h arabic.h
objects/memfile.o: memfile.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
farsi.h arabic.h
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
globals.h farsi.h arabic.h
objects/memline.o: memline.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
farsi.h arabic.h
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
globals.h farsi.h arabic.h
objects/menu.o: menu.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
farsi.h arabic.h
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
globals.h farsi.h arabic.h
objects/message.o: message.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
farsi.h arabic.h
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
globals.h farsi.h arabic.h
objects/misc1.o: misc1.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
farsi.h arabic.h version.h
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
globals.h farsi.h arabic.h version.h
objects/misc2.o: misc2.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
farsi.h arabic.h
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
globals.h farsi.h arabic.h
objects/move.o: move.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
farsi.h arabic.h
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
globals.h farsi.h arabic.h
objects/mbyte.o: mbyte.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
farsi.h arabic.h
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
globals.h farsi.h arabic.h
objects/normal.o: normal.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
farsi.h arabic.h
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
globals.h farsi.h arabic.h
objects/ops.o: ops.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h ascii.h \
keymap.h term.h macros.h option.h structs.h regexp.h gui.h gui_beval.h \
proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h farsi.h arabic.h
proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h globals.h farsi.h \
arabic.h
objects/option.o: option.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
farsi.h arabic.h
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
globals.h farsi.h arabic.h
objects/os_unix.o: os_unix.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
farsi.h arabic.h os_unixx.h
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
globals.h farsi.h arabic.h os_unixx.h
objects/pathdef.o: auto/pathdef.c vim.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
globals.h farsi.h arabic.h
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
proto.h globals.h farsi.h arabic.h
objects/popupmnu.o: popupmnu.c vim.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
globals.h farsi.h arabic.h
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
proto.h globals.h farsi.h arabic.h
objects/quickfix.o: quickfix.c vim.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
globals.h farsi.h arabic.h
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
proto.h globals.h farsi.h arabic.h
objects/regexp.o: regexp.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
farsi.h arabic.h regexp_nfa.c
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
globals.h farsi.h arabic.h regexp_nfa.c
objects/screen.o: screen.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
farsi.h arabic.h
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
globals.h farsi.h arabic.h
objects/search.o: search.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
farsi.h arabic.h
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
globals.h farsi.h arabic.h
objects/sha256.o: sha256.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
farsi.h arabic.h
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
globals.h farsi.h arabic.h
objects/spell.o: spell.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
farsi.h arabic.h
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
globals.h farsi.h arabic.h
objects/spellfile.o: spellfile.c vim.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
proto.h globals.h farsi.h arabic.h
objects/syntax.o: syntax.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
farsi.h arabic.h
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
globals.h farsi.h arabic.h
objects/tag.o: tag.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h ascii.h \
keymap.h term.h macros.h option.h structs.h regexp.h gui.h gui_beval.h \
proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h farsi.h arabic.h
proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h globals.h farsi.h \
arabic.h
objects/term.o: term.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
farsi.h arabic.h
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
globals.h farsi.h arabic.h
objects/ui.o: ui.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h ascii.h \
keymap.h term.h macros.h option.h structs.h regexp.h gui.h gui_beval.h \
proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h farsi.h arabic.h
proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h globals.h farsi.h \
arabic.h
objects/undo.o: undo.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
farsi.h arabic.h
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
globals.h farsi.h arabic.h
objects/userfunc.o: userfunc.c vim.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
proto.h globals.h farsi.h arabic.h
objects/version.o: version.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
farsi.h arabic.h version.h
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
globals.h farsi.h arabic.h version.h
objects/window.o: window.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
farsi.h arabic.h
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
globals.h farsi.h arabic.h
objects/gui.o: gui.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h ascii.h \
keymap.h term.h macros.h option.h structs.h regexp.h gui.h gui_beval.h \
proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h farsi.h arabic.h
objects/gui_gtk.o: gui_gtk.c gui_gtk_f.h vim.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
globals.h farsi.h arabic.h
proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h globals.h farsi.h \
arabic.h
objects/gui_gtk.o: gui_gtk.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
globals.h farsi.h arabic.h gui_gtk_f.h
objects/gui_gtk_f.o: gui_gtk_f.c vim.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
globals.h farsi.h arabic.h gui_gtk_f.h
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
proto.h globals.h farsi.h arabic.h gui_gtk_f.h
objects/gui_motif.o: gui_motif.c vim.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
globals.h farsi.h arabic.h gui_xmebw.h ../pixmaps/alert.xpm \
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
proto.h globals.h farsi.h arabic.h gui_xmebw.h ../pixmaps/alert.xpm \
../pixmaps/error.xpm ../pixmaps/generic.xpm ../pixmaps/info.xpm \
../pixmaps/quest.xpm gui_x11_pm.h ../pixmaps/tb_new.xpm \
../pixmaps/tb_open.xpm ../pixmaps/tb_close.xpm ../pixmaps/tb_save.xpm \
@@ -3336,16 +3467,16 @@ objects/gui_motif.o: gui_motif.c vim.h auto/config.h feature.h os_unix.h \
../pixmaps/tb_minwidth.xpm
objects/gui_xmdlg.o: gui_xmdlg.c vim.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
globals.h farsi.h arabic.h
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
proto.h globals.h farsi.h arabic.h
objects/gui_xmebw.o: gui_xmebw.c vim.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
globals.h farsi.h arabic.h gui_xmebwp.h gui_xmebw.h
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
proto.h globals.h farsi.h arabic.h gui_xmebwp.h gui_xmebw.h
objects/gui_athena.o: gui_athena.c vim.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
globals.h farsi.h arabic.h gui_at_sb.h gui_x11_pm.h \
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
proto.h globals.h farsi.h arabic.h gui_at_sb.h gui_x11_pm.h \
../pixmaps/tb_new.xpm ../pixmaps/tb_open.xpm ../pixmaps/tb_close.xpm \
../pixmaps/tb_save.xpm ../pixmaps/tb_print.xpm ../pixmaps/tb_cut.xpm \
../pixmaps/tb_copy.xpm ../pixmaps/tb_paste.xpm ../pixmaps/tb_find.xpm \
@@ -3363,88 +3494,94 @@ objects/gui_athena.o: gui_athena.c vim.h auto/config.h feature.h os_unix.h \
../pixmaps/tb_minwidth.xpm
objects/gui_gtk_x11.o: gui_gtk_x11.c vim.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
globals.h farsi.h arabic.h auto/gui_gtk_gresources.h gui_gtk_f.h \
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
proto.h globals.h farsi.h arabic.h auto/gui_gtk_gresources.h gui_gtk_f.h \
../runtime/vim32x32.xpm ../runtime/vim16x16.xpm ../runtime/vim48x48.xpm
objects/gui_x11.o: gui_x11.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
farsi.h arabic.h ../runtime/vim32x32.xpm ../runtime/vim16x16.xpm \
../runtime/vim48x48.xpm
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
globals.h farsi.h arabic.h ../runtime/vim32x32.xpm \
../runtime/vim16x16.xpm ../runtime/vim48x48.xpm
objects/gui_at_sb.o: gui_at_sb.c vim.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
globals.h farsi.h arabic.h gui_at_sb.h
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
proto.h globals.h farsi.h arabic.h gui_at_sb.h
objects/gui_at_fs.o: gui_at_fs.c vim.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
globals.h farsi.h arabic.h gui_at_sb.h
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
proto.h globals.h farsi.h arabic.h gui_at_sb.h
objects/pty.o: pty.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h ascii.h \
keymap.h term.h macros.h option.h structs.h regexp.h gui.h gui_beval.h \
proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h farsi.h arabic.h
proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h globals.h farsi.h \
arabic.h
objects/json_test.o: json_test.c main.c vim.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
globals.h farsi.h arabic.h farsi.c arabic.c json.c
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
proto.h globals.h farsi.h arabic.h json.c
objects/memfile_test.o: memfile_test.c main.c vim.h auto/config.h feature.h \
os_unix.h auto/osdef.h ascii.h keymap.h term.h macros.h option.h \
structs.h regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h \
ex_cmds.h proto.h globals.h farsi.h arabic.h farsi.c arabic.c memfile.c
ex_cmds.h spell.h proto.h globals.h farsi.h arabic.h memfile.c
objects/message_test.o: message_test.c main.c vim.h auto/config.h feature.h \
os_unix.h auto/osdef.h ascii.h keymap.h term.h macros.h option.h \
structs.h regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h \
ex_cmds.h spell.h proto.h globals.h farsi.h arabic.h message.c
objects/hangulin.o: hangulin.c vim.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
globals.h farsi.h arabic.h
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
proto.h globals.h farsi.h arabic.h
objects/if_lua.o: if_lua.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
farsi.h arabic.h
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
globals.h farsi.h arabic.h
objects/if_mzsch.o: if_mzsch.c vim.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
globals.h farsi.h arabic.h if_mzsch.h
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
proto.h globals.h farsi.h arabic.h if_mzsch.h
objects/if_perl.o: auto/if_perl.c vim.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
globals.h farsi.h arabic.h
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
proto.h globals.h farsi.h arabic.h
objects/if_perlsfio.o: if_perlsfio.c vim.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
globals.h farsi.h arabic.h
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
proto.h globals.h farsi.h arabic.h
objects/if_python.o: if_python.c vim.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
globals.h farsi.h arabic.h if_py_both.h
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
proto.h globals.h farsi.h arabic.h if_py_both.h
objects/if_python3.o: if_python3.c vim.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
globals.h farsi.h arabic.h if_py_both.h
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
proto.h globals.h farsi.h arabic.h if_py_both.h
objects/if_tcl.o: if_tcl.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
farsi.h arabic.h
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
globals.h farsi.h arabic.h
objects/if_ruby.o: if_ruby.c auto/config.h vim.h feature.h os_unix.h auto/osdef.h \
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
farsi.h arabic.h version.h
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
globals.h farsi.h arabic.h version.h
objects/gui_beval.o: gui_beval.c vim.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
globals.h farsi.h arabic.h
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
proto.h globals.h farsi.h arabic.h
objects/workshop.o: workshop.c auto/config.h integration.h vim.h feature.h \
os_unix.h auto/osdef.h ascii.h keymap.h term.h macros.h option.h \
structs.h regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h \
ex_cmds.h proto.h globals.h farsi.h arabic.h version.h workshop.h
ex_cmds.h spell.h proto.h globals.h farsi.h arabic.h version.h \
workshop.h
objects/wsdebug.o: wsdebug.c
objects/integration.o: integration.c vim.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
globals.h farsi.h arabic.h integration.h
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
proto.h globals.h farsi.h arabic.h integration.h
objects/netbeans.o: netbeans.c vim.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h \
globals.h farsi.h arabic.h version.h
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
proto.h globals.h farsi.h arabic.h version.h
objects/channel.o: channel.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h proto.h globals.h \
farsi.h arabic.h
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
globals.h farsi.h arabic.h
objects/gui_gtk_gresources.o: auto/gui_gtk_gresources.c

View File

@@ -10,14 +10,13 @@
/*
* arabic.c: functions for Arabic language
*
* Included by main.c, when FEAT_ARABIC & FEAT_GUI is defined.
*
* --
*
* Author: Nadim Shaikli & Isam Bayazidi
*
*/
#include "vim.h"
#if defined(FEAT_ARABIC) || defined(PROTO)
static int A_is_a(int cur_c);
static int A_is_s(int cur_c);
static int A_is_f(int cur_c);
@@ -1148,3 +1147,5 @@ A_is_special(int c)
{
return (c == a_HAMZA || c == a_s_HAMZA);
}
#endif /* FEAT_ARABIC */

16
src/auto/configure vendored
View File

@@ -757,6 +757,7 @@ infodir
docdir
oldincludedir
includedir
runstatedir
localstatedir
sharedstatedir
sysconfdir
@@ -888,6 +889,7 @@ datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE}'
@@ -1140,6 +1142,15 @@ do
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
-runstatedir | --runstatedir | --runstatedi | --runstated \
| --runstate | --runstat | --runsta | --runst | --runs \
| --run | --ru | --r)
ac_prev=runstatedir ;;
-runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
| --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
| --run=* | --ru=* | --r=*)
runstatedir=$ac_optarg ;;
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1277,7 +1288,7 @@ fi
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
libdir localedir mandir
libdir localedir mandir runstatedir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
@@ -1430,6 +1441,7 @@ Fine tuning of the installation directories:
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
@@ -1512,7 +1524,7 @@ Optional Packages:
--with-view-name=NAME what to call the View executable
--with-global-runtime=DIR global runtime directory in 'runtimepath'
--with-modified-by=NAME name of who modified a release version
--with-features=TYPE tiny, small, normal, big or huge (default: normal)
--with-features=TYPE tiny, small, normal, big or huge (default: huge)
--with-compiledby=NAME name to show in :version message
--with-lua-prefix=PFX Prefix where Lua is installed.
--with-luajit Link with LuaJIT instead of Lua.

View File

@@ -35,9 +35,9 @@ static char_u *fname_match(regmatch_T *rmp, char_u *name, int ignore_case);
static void buflist_setfpos(buf_T *buf, win_T *win, linenr_T lnum, colnr_T col, int copy_options);
static wininfo_T *find_wininfo(buf_T *buf, int skip_diff_buffer);
#ifdef UNIX
static buf_T *buflist_findname_stat(char_u *ffname, struct stat *st);
static int otherfile_buf(buf_T *buf, char_u *ffname, struct stat *stp);
static int buf_same_ino(buf_T *buf, struct stat *stp);
static buf_T *buflist_findname_stat(char_u *ffname, stat_T *st);
static int otherfile_buf(buf_T *buf, char_u *ffname, stat_T *stp);
static int buf_same_ino(buf_T *buf, stat_T *stp);
#else
static int otherfile_buf(buf_T *buf, char_u *ffname);
#endif
@@ -67,6 +67,9 @@ static char *msg_qflist = N_("[Quickfix List]");
static char *e_auabort = N_("E855: Autocommands caused command to abort");
#endif
/* Number of times free_buffer() was called. */
static int buf_free_count = 0;
/*
* Open current buffer, that is: open the memfile and read the file into
* memory.
@@ -80,7 +83,7 @@ open_buffer(
{
int retval = OK;
#ifdef FEAT_AUTOCMD
buf_T *old_curbuf;
bufref_T old_curbuf;
#endif
#ifdef FEAT_SYN_HL
long old_tw = curbuf->b_p_tw;
@@ -102,7 +105,7 @@ open_buffer(
* If we can't create one for the current buffer, take another buffer
*/
close_buffer(NULL, curbuf, 0, FALSE);
for (curbuf = firstbuf; curbuf != NULL; curbuf = curbuf->b_next)
FOR_ALL_BUFFERS(curbuf)
if (curbuf->b_ml.ml_mfp != NULL)
break;
/*
@@ -126,7 +129,7 @@ open_buffer(
#ifdef FEAT_AUTOCMD
/* The autocommands in readfile() may change the buffer, but only AFTER
* reading the file. */
old_curbuf = curbuf;
set_bufref(&old_curbuf, curbuf);
modified_was_set = FALSE;
#endif
@@ -281,12 +284,12 @@ open_buffer(
* The autocommands may have changed the current buffer. Apply the
* modelines to the correct buffer, if it still exists and is loaded.
*/
if (buf_valid(old_curbuf) && old_curbuf->b_ml.ml_mfp != NULL)
if (bufref_valid(&old_curbuf) && old_curbuf.br_buf->b_ml.ml_mfp != NULL)
{
aco_save_T aco;
/* Go to the buffer that was opened. */
aucmd_prepbuf(&aco, old_curbuf);
aucmd_prepbuf(&aco, old_curbuf.br_buf);
#endif
do_modelines(0);
curbuf->b_flags &= ~(BF_CHECK_RO | BF_NEVERLOADED);
@@ -308,20 +311,66 @@ open_buffer(
return retval;
}
/*
* Store "buf" in "bufref" and set the free count.
*/
void
set_bufref(bufref_T *bufref, buf_T *buf)
{
bufref->br_buf = buf;
bufref->br_buf_free_count = buf_free_count;
}
/*
* Return TRUE if "bufref->br_buf" points to a valid buffer.
* Only goes through the buffer list if buf_free_count changed.
*/
int
bufref_valid(bufref_T *bufref)
{
return bufref->br_buf_free_count == buf_free_count
? TRUE : buf_valid(bufref->br_buf);
}
/*
* Return TRUE if "buf" points to a valid buffer (in the buffer list).
* This can be slow if there are many buffers, prefer using bufref_valid().
*/
int
buf_valid(buf_T *buf)
{
buf_T *bp;
for (bp = firstbuf; bp != NULL; bp = bp->b_next)
/* Assume that we more often have a recent buffer, start with the last
* one. */
for (bp = lastbuf; bp != NULL; bp = bp->b_prev)
if (bp == buf)
return TRUE;
return FALSE;
}
/*
* A hash table used to quickly lookup a buffer by its number.
*/
static hashtab_T buf_hashtab;
static void
buf_hashtab_add(buf_T *buf)
{
sprintf((char *)buf->b_key, "%x", buf->b_fnum);
if (hash_add(&buf_hashtab, buf->b_key) == FAIL)
EMSG(_("E931: Buffer cannot be registered"));
}
static void
buf_hashtab_remove(buf_T *buf)
{
hashitem_T *hi = hash_find(&buf_hashtab, buf->b_key);
if (!HASHITEM_EMPTY(hi))
hash_remove(&buf_hashtab, hi);
}
/*
* Close the link to a buffer.
* "action" is used when there is no longer a window for the buffer.
@@ -349,6 +398,7 @@ close_buffer(
#ifdef FEAT_AUTOCMD
int is_curbuf;
int nwindows;
bufref_T bufref;
#endif
int unload_buf = (action != 0);
int del_buf = (action == DOBUF_DEL || action == DOBUF_WIPE);
@@ -393,13 +443,15 @@ close_buffer(
}
#ifdef FEAT_AUTOCMD
set_bufref(&bufref, buf);
/* When the buffer is no longer in a window, trigger BufWinLeave */
if (buf->b_nwindows == 1)
{
buf->b_closing = TRUE;
apply_autocmds(EVENT_BUFWINLEAVE, buf->b_fname, buf->b_fname,
FALSE, buf);
if (!buf_valid(buf))
if (apply_autocmds(EVENT_BUFWINLEAVE, buf->b_fname, buf->b_fname,
FALSE, buf)
&& !bufref_valid(&bufref))
{
/* Autocommands deleted the buffer. */
aucmd_abort:
@@ -416,9 +468,9 @@ aucmd_abort:
if (!unload_buf)
{
buf->b_closing = TRUE;
apply_autocmds(EVENT_BUFHIDDEN, buf->b_fname, buf->b_fname,
FALSE, buf);
if (!buf_valid(buf))
if (apply_autocmds(EVENT_BUFHIDDEN, buf->b_fname, buf->b_fname,
FALSE, buf)
&& !bufref_valid(&bufref))
/* Autocommands deleted the buffer. */
goto aucmd_abort;
buf->b_closing = FALSE;
@@ -459,29 +511,16 @@ aucmd_abort:
#endif
buf_freeall(buf, (del_buf ? BFA_DEL : 0) + (wipe_buf ? BFA_WIPE : 0));
if (
#ifdef FEAT_WINDOWS
win_valid(win) &&
#else
win != NULL &&
#endif
win->w_buffer == buf)
win->w_buffer = NULL; /* make sure we don't use the buffer now */
#ifdef FEAT_AUTOCMD
/* Autocommands may have deleted the buffer. */
if (!buf_valid(buf))
if (!bufref_valid(&bufref))
return;
# ifdef FEAT_EVAL
if (aborting()) /* autocmds may abort script processing */
return;
# endif
/* Autocommands may have opened or closed windows for this buffer.
* Decrement the count for the close we do here. */
if (buf->b_nwindows > 0)
--buf->b_nwindows;
/*
* It's possible that autocommands change curbuf to the one being deleted.
* This might cause the previous curbuf to be deleted unexpectedly. But
@@ -491,6 +530,20 @@ aucmd_abort:
*/
if (buf == curbuf && !is_curbuf)
return;
if (
#ifdef FEAT_WINDOWS
win_valid(win) &&
#else
win != NULL &&
#endif
win->w_buffer == buf)
win->w_buffer = NULL; /* make sure we don't use the buffer now */
/* Autocommands may have opened or closed windows for this buffer.
* Decrement the count for the close we do here. */
if (buf->b_nwindows > 0)
--buf->b_nwindows;
#endif
/* Change directories when the 'acd' option is set. */
@@ -572,25 +625,32 @@ buf_freeall(buf_T *buf, int flags)
{
#ifdef FEAT_AUTOCMD
int is_curbuf = (buf == curbuf);
bufref_T bufref;
buf->b_closing = TRUE;
set_bufref(&bufref, buf);
if (buf->b_ml.ml_mfp != NULL)
{
apply_autocmds(EVENT_BUFUNLOAD, buf->b_fname, buf->b_fname, FALSE, buf);
if (!buf_valid(buf)) /* autocommands may delete the buffer */
if (apply_autocmds(EVENT_BUFUNLOAD, buf->b_fname, buf->b_fname,
FALSE, buf)
&& !bufref_valid(&bufref))
/* autocommands deleted the buffer */
return;
}
if ((flags & BFA_DEL) && buf->b_p_bl)
{
apply_autocmds(EVENT_BUFDELETE, buf->b_fname, buf->b_fname, FALSE, buf);
if (!buf_valid(buf)) /* autocommands may delete the buffer */
if (apply_autocmds(EVENT_BUFDELETE, buf->b_fname, buf->b_fname,
FALSE, buf)
&& !bufref_valid(&bufref))
/* autocommands deleted the buffer */
return;
}
if (flags & BFA_WIPE)
{
apply_autocmds(EVENT_BUFWIPEOUT, buf->b_fname, buf->b_fname,
FALSE, buf);
if (!buf_valid(buf)) /* autocommands may delete the buffer */
if (apply_autocmds(EVENT_BUFWIPEOUT, buf->b_fname, buf->b_fname,
FALSE, buf)
&& !bufref_valid(&bufref))
/* autocommands deleted the buffer */
return;
}
buf->b_closing = FALSE;
@@ -657,6 +717,7 @@ buf_freeall(buf_T *buf, int flags)
static void
free_buffer(buf_T *buf)
{
++buf_free_count;
free_buffer_stuff(buf, TRUE);
#ifdef FEAT_EVAL
unref_var_dict(buf->b_vars);
@@ -682,8 +743,12 @@ free_buffer(buf_T *buf)
#ifdef FEAT_JOB_CHANNEL
channel_buffer_free(buf);
#endif
buf_hashtab_remove(buf);
#ifdef FEAT_AUTOCMD
aubuflocal_remove(buf);
if (autocmd_busy)
{
/* Do not free the buffer structure while autocommands are executing,
@@ -770,7 +835,9 @@ goto_buffer(
int count)
{
# if defined(FEAT_WINDOWS) && defined(HAS_SWAP_EXISTS_ACTION)
buf_T *old_curbuf = curbuf;
bufref_T old_curbuf;
set_bufref(&old_curbuf, curbuf);
swap_exists_action = SEA_DIALOG;
# endif
@@ -799,7 +866,7 @@ goto_buffer(
# endif
}
else
handle_swap_exists(old_curbuf);
handle_swap_exists(&old_curbuf);
# endif
}
#endif
@@ -810,7 +877,7 @@ goto_buffer(
* It is allowed for "old_curbuf" to be NULL or invalid.
*/
void
handle_swap_exists(buf_T *old_curbuf)
handle_swap_exists(bufref_T *old_curbuf)
{
# if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL)
cleanup_T cs;
@@ -818,6 +885,7 @@ handle_swap_exists(buf_T *old_curbuf)
#ifdef FEAT_SYN_HL
long old_tw = curbuf->b_p_tw;
#endif
buf_T *buf;
if (swap_exists_action == SEA_QUIT)
{
@@ -833,11 +901,14 @@ handle_swap_exists(buf_T *old_curbuf)
swap_exists_action = SEA_NONE; /* don't want it again */
swap_exists_did_quit = TRUE;
close_buffer(curwin, curbuf, DOBUF_UNLOAD, FALSE);
if (!buf_valid(old_curbuf) || old_curbuf == curbuf)
old_curbuf = buflist_new(NULL, NULL, 1L, BLN_CURBUF | BLN_LISTED);
if (old_curbuf != NULL)
if (old_curbuf == NULL || !bufref_valid(old_curbuf)
|| old_curbuf->br_buf == curbuf)
buf = buflist_new(NULL, NULL, 1L, BLN_CURBUF | BLN_LISTED);
else
buf = old_curbuf->br_buf;
if (buf != NULL)
{
enter_buffer(old_curbuf);
enter_buffer(buf);
#ifdef FEAT_SYN_HL
if (old_tw != curbuf->b_p_tw)
check_colorcolumn(curwin);
@@ -1022,6 +1093,7 @@ empty_curbuf(
{
int retval;
buf_T *buf = curbuf;
bufref_T bufref;
if (action == DOBUF_UNLOAD)
{
@@ -1029,13 +1101,12 @@ empty_curbuf(
return FAIL;
}
if (close_others)
{
/* Close any other windows on this buffer, then make it empty. */
set_bufref(&bufref, buf);
#ifdef FEAT_WINDOWS
if (close_others)
/* Close any other windows on this buffer, then make it empty. */
close_windows(buf, TRUE);
#endif
}
setpcmark();
retval = do_ecmd(0, NULL, NULL, NULL, ECMD_ONE,
@@ -1046,7 +1117,7 @@ empty_curbuf(
* the old one. But do_ecmd() may have done that already, check
* if the buffer still exists.
*/
if (buf != curbuf && buf_valid(buf) && buf->b_nwindows == 0)
if (buf != curbuf && bufref_valid(&bufref) && buf->b_nwindows == 0)
close_buffer(NULL, buf, action, FALSE);
if (!close_others)
need_fileinfo = FALSE;
@@ -1172,6 +1243,11 @@ do_buffer(
if (unload)
{
int forward;
# if defined(FEAT_AUTOCMD) || defined(FEAT_WINDOWS)
bufref_T bufref;
set_bufref(&bufref, buf);
# endif
/* When unloading or deleting a buffer that's already unloaded and
* unlisted: fail silently. */
@@ -1185,7 +1261,7 @@ do_buffer(
{
dialog_changed(buf, FALSE);
# ifdef FEAT_AUTOCMD
if (!buf_valid(buf))
if (!bufref_valid(&bufref))
/* Autocommand deleted buffer, oops! It's not changed
* now. */
return FAIL;
@@ -1208,7 +1284,7 @@ do_buffer(
* If deleting the last (listed) buffer, make it empty.
* The last (listed) buffer cannot be unloaded.
*/
for (bp = firstbuf; bp != NULL; bp = bp->b_next)
FOR_ALL_BUFFERS(bp)
if (bp->b_p_bl && bp != buf)
break;
if (bp == NULL && buf == curbuf)
@@ -1238,9 +1314,10 @@ do_buffer(
{
#ifdef FEAT_WINDOWS
close_windows(buf, FALSE);
if (buf != curbuf && bufref_valid(&bufref))
#endif
if (buf != curbuf && buf_valid(buf) && buf->b_nwindows <= 0)
close_buffer(NULL, buf, action, FALSE);
if (buf->b_nwindows <= 0)
close_buffer(NULL, buf, action, FALSE);
return OK;
}
@@ -1248,7 +1325,7 @@ do_buffer(
* Deleting the current buffer: Need to find another buffer to go to.
* There should be another, otherwise it would have been handled
* above. However, autocommands may have deleted all buffers.
* First use au_new_curbuf, if it is valid.
* First use au_new_curbuf.br_buf, if it is valid.
* Then prefer the buffer we most recently visited.
* Else try to find one that is loaded, after the current buffer,
* then before the current buffer.
@@ -1257,8 +1334,8 @@ do_buffer(
buf = NULL; /* selected buffer */
bp = NULL; /* used when no loaded buffer found */
#ifdef FEAT_AUTOCMD
if (au_new_curbuf != NULL && buf_valid(au_new_curbuf))
buf = au_new_curbuf;
if (au_new_curbuf.br_buf != NULL && bufref_valid(&au_new_curbuf))
buf = au_new_curbuf.br_buf;
# ifdef FEAT_JUMPLIST
else
# endif
@@ -1333,7 +1410,7 @@ do_buffer(
buf = bp;
if (buf == NULL) /* No loaded buffer, find listed one */
{
for (buf = firstbuf; buf != NULL; buf = buf->b_next)
FOR_ALL_BUFFERS(buf)
if (buf->b_p_bl && buf != curbuf)
break;
}
@@ -1385,9 +1462,14 @@ do_buffer(
#if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
if ((p_confirm || cmdmod.confirm) && p_write)
{
# ifdef FEAT_AUTOCMD
bufref_T bufref;
set_bufref(&bufref, buf);
# endif
dialog_changed(curbuf, FALSE);
# ifdef FEAT_AUTOCMD
if (!buf_valid(buf))
if (!bufref_valid(&bufref))
/* Autocommand deleted buffer, oops! */
return FAIL;
# endif
@@ -1438,6 +1520,7 @@ set_curbuf(buf_T *buf, int action)
#ifdef FEAT_SYN_HL
long old_tw = curbuf->b_p_tw;
#endif
bufref_T bufref;
setpcmark();
if (!cmdmod.keepalt)
@@ -1449,13 +1532,14 @@ set_curbuf(buf_T *buf, int action)
/* close_windows() or apply_autocmds() may change curbuf */
prevbuf = curbuf;
set_bufref(&bufref, prevbuf);
#ifdef FEAT_AUTOCMD
apply_autocmds(EVENT_BUFLEAVE, NULL, NULL, FALSE, curbuf);
if (!apply_autocmds(EVENT_BUFLEAVE, NULL, NULL, FALSE, curbuf)
# ifdef FEAT_EVAL
if (buf_valid(prevbuf) && !aborting())
|| (bufref_valid(&bufref) && !aborting()))
# else
if (buf_valid(prevbuf))
|| bufref_valid(&bufref))
# endif
#endif
{
@@ -1468,9 +1552,9 @@ set_curbuf(buf_T *buf, int action)
close_windows(prevbuf, FALSE);
#endif
#if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL)
if (buf_valid(prevbuf) && !aborting())
if (bufref_valid(&bufref) && !aborting())
#else
if (buf_valid(prevbuf))
if (bufref_valid(&bufref))
#endif
{
#ifdef FEAT_WINDOWS
@@ -1491,7 +1575,7 @@ set_curbuf(buf_T *buf, int action)
}
#ifdef FEAT_AUTOCMD
/* An autocommand may have deleted "buf", already entered it (e.g., when
* it did ":bunload") or aborted the script processing!
* it did ":bunload") or aborted the script processing.
* If curwin->w_buffer is null, enter_buffer() will make it valid again */
if ((buf_valid(buf) && buf != curbuf
# ifdef FEAT_EVAL
@@ -1619,6 +1703,9 @@ enter_buffer(buf_T *buf)
if (!curbuf->b_help && curwin->w_p_spell && *curwin->w_s->b_p_spl != NUL)
(void)did_set_spelllang(curwin);
#endif
#ifdef FEAT_VIMINFO
curbuf->b_last_used = vim_time();
#endif
redraw_later(NOT_VALID);
}
@@ -1631,7 +1718,7 @@ enter_buffer(buf_T *buf)
void
do_autochdir(void)
{
if (starting == 0
if ((starting == 0 || test_autochdir)
&& curbuf->b_ffname != NULL
&& vim_chdirfile(curbuf->b_ffname) == OK)
shorten_fnames(TRUE);
@@ -1642,6 +1729,8 @@ do_autochdir(void)
* functions for dealing with the buffer list
*/
static int top_file_num = 1; /* highest file number */
/*
* Add a file name to the buffer list. Return a pointer to the buffer.
* If the same file name already exists return a pointer to that buffer.
@@ -1650,10 +1739,10 @@ do_autochdir(void)
* If (flags & BLN_LISTED) is TRUE, add new buffer to buffer list.
* If (flags & BLN_DUMMY) is TRUE, don't count it as a real buffer.
* If (flags & BLN_NEW) is TRUE, don't use an existing buffer.
* If (flags & BLN_NOOPT) is TRUE, don't copy options from the current buffer
* if the buffer already exists.
* This is the ONLY way to create a new buffer.
*/
static int top_file_num = 1; /* highest file number */
buf_T *
buflist_new(
char_u *ffname, /* full path of fname or relative */
@@ -1663,9 +1752,12 @@ buflist_new(
{
buf_T *buf;
#ifdef UNIX
struct stat st;
stat_T st;
#endif
if (top_file_num == 1)
hash_init(&buf_hashtab);
fname_expand(curbuf, &ffname, &sfname); /* will allocate ffname */
/*
@@ -1688,17 +1780,24 @@ buflist_new(
vim_free(ffname);
if (lnum != 0)
buflist_setfpos(buf, curwin, lnum, (colnr_T)0, FALSE);
/* copy the options now, if 'cpo' doesn't have 's' and not done
* already */
buf_copy_options(buf, 0);
if ((flags & BLN_NOOPT) == 0)
/* copy the options now, if 'cpo' doesn't have 's' and not done
* already */
buf_copy_options(buf, 0);
if ((flags & BLN_LISTED) && !buf->b_p_bl)
{
#ifdef FEAT_AUTOCMD
bufref_T bufref;
#endif
buf->b_p_bl = TRUE;
#ifdef FEAT_AUTOCMD
set_bufref(&bufref, buf);
if (!(flags & BLN_DUMMY))
{
apply_autocmds(EVENT_BUFADD, NULL, NULL, FALSE, buf);
if (!buf_valid(buf))
if (apply_autocmds(EVENT_BUFADD, NULL, NULL, FALSE, buf)
&& !bufref_valid(&bufref))
return NULL;
}
#endif
@@ -1837,6 +1936,7 @@ buflist_new(
}
top_file_num = 1;
}
buf_hashtab_add(buf);
/*
* Always copy the options from the current buffer.
@@ -1874,16 +1974,19 @@ buflist_new(
#ifdef FEAT_AUTOCMD
if (!(flags & BLN_DUMMY))
{
bufref_T bufref;
/* Tricky: these autocommands may change the buffer list. They could
* also split the window with re-using the one empty buffer. This may
* result in unexpectedly losing the empty buffer. */
apply_autocmds(EVENT_BUFNEW, NULL, NULL, FALSE, buf);
if (!buf_valid(buf))
set_bufref(&bufref, buf);
if (apply_autocmds(EVENT_BUFNEW, NULL, NULL, FALSE, buf)
&& !bufref_valid(&bufref))
return NULL;
if (flags & BLN_LISTED)
{
apply_autocmds(EVENT_BUFADD, NULL, NULL, FALSE, buf);
if (!buf_valid(buf))
if (apply_autocmds(EVENT_BUFADD, NULL, NULL, FALSE, buf)
&& !bufref_valid(&bufref))
return NULL;
}
# ifdef FEAT_EVAL
@@ -2183,7 +2286,7 @@ buflist_findname_exp(char_u *fname)
buflist_findname(char_u *ffname)
{
#ifdef UNIX
struct stat st;
stat_T st;
if (mch_stat((char *)ffname, &st) < 0)
st.st_dev = (dev_T)-1;
@@ -2198,12 +2301,13 @@ buflist_findname(char_u *ffname)
static buf_T *
buflist_findname_stat(
char_u *ffname,
struct stat *stp)
stat_T *stp)
{
#endif
buf_T *buf;
for (buf = firstbuf; buf != NULL; buf = buf->b_next)
/* Start at the last buffer, expect to find a match sooner. */
for (buf = lastbuf; buf != NULL; buf = buf->b_prev)
if ((buf->b_flags & BF_DUMMY) == 0 && !otherfile_buf(buf, ffname
#ifdef UNIX
, stp
@@ -2288,7 +2392,7 @@ buflist_findpat(
return -1;
}
for (buf = firstbuf; buf != NULL; buf = buf->b_next)
for (buf = lastbuf; buf != NULL; buf = buf->b_prev)
if (buf->b_p_bl == find_listed
#ifdef FEAT_DIFF
&& (!diffmode || diff_mode_buf(buf))
@@ -2302,7 +2406,7 @@ buflist_findpat(
#ifdef FEAT_WINDOWS
win_T *wp;
for (wp = firstwin; wp != NULL; wp = wp->w_next)
FOR_ALL_WINDOWS(wp)
if (wp->w_buffer == buf)
break;
if (wp == NULL)
@@ -2404,7 +2508,7 @@ ExpandBufnames(
for (round = 1; round <= 2; ++round)
{
count = 0;
for (buf = firstbuf; buf != NULL; buf = buf->b_next)
FOR_ALL_BUFFERS(buf)
{
if (!buf->b_p_bl) /* skip unlisted buffers */
continue;
@@ -2505,18 +2609,22 @@ fname_match(
#endif
/*
* find file in buffer list by number
* Find a file in the buffer list by buffer number.
*/
buf_T *
buflist_findnr(int nr)
{
buf_T *buf;
char_u key[VIM_SIZEOF_INT * 2 + 1];
hashitem_T *hi;
if (nr == 0)
nr = curwin->w_alt_fnum;
for (buf = firstbuf; buf != NULL; buf = buf->b_next)
if (buf->b_fnum == nr)
return (buf);
sprintf((char *)key, "%x", nr);
hi = hash_find(&buf_hashtab, key);
if (!HASHITEM_EMPTY(hi))
return (buf_T *)(hi->hi_key
- ((unsigned)(curbuf->b_key - (char_u *)curbuf)));
return NULL;
}
@@ -2626,7 +2734,7 @@ wininfo_other_tab_diff(wininfo_T *wip)
if (wip->wi_opt.wo_diff)
{
for (wp = firstwin; wp != NULL; wp = wp->w_next)
FOR_ALL_WINDOWS(wp)
/* return FALSE when it's a window in the current tab page, thus
* the buffer was in diff mode here */
if (wip->wi_win == wp)
@@ -2847,7 +2955,7 @@ setfname(
{
buf_T *obuf = NULL;
#ifdef UNIX
struct stat st;
stat_T st;
#endif
if (ffname == NULL || *ffname == NUL)
@@ -3045,7 +3153,7 @@ buflist_slash_adjust(void)
{
buf_T *bp;
for (bp = firstbuf; bp != NULL; bp = bp->b_next)
FOR_ALL_BUFFERS(bp)
{
if (bp->b_ffname != NULL)
slash_adjust(bp->b_ffname);
@@ -3084,7 +3192,7 @@ otherfile_buf(
buf_T *buf,
char_u *ffname
#ifdef UNIX
, struct stat *stp
, stat_T *stp
#endif
)
{
@@ -3095,9 +3203,9 @@ otherfile_buf(
return FALSE;
#ifdef UNIX
{
struct stat st;
stat_T st;
/* If no struct stat given, get it now */
/* If no stat_T given, get it now */
if (stp == NULL)
{
if (!buf->b_dev_valid || mch_stat((char *)ffname, &st) < 0)
@@ -3132,7 +3240,7 @@ otherfile_buf(
void
buf_setino(buf_T *buf)
{
struct stat st;
stat_T st;
if (buf->b_fname != NULL && mch_stat((char *)buf->b_fname, &st) >= 0)
{
@@ -3150,7 +3258,7 @@ buf_setino(buf_T *buf)
static int
buf_same_ino(
buf_T *buf,
struct stat *stp)
stat_T *stp)
{
return (buf->b_dev_valid
&& stp->st_dev == buf->b_dev
@@ -4006,7 +4114,7 @@ build_stl_str_hl(
case STL_KEYMAP:
fillable = FALSE;
if (get_keymap_str(wp, tmp, TMPLEN))
if (get_keymap_str(wp, (char_u *)"<%s>", tmp, TMPLEN))
str = tmp;
break;
case STL_PAGENUM:
@@ -4695,10 +4803,15 @@ do_arg_all(
if (!P_HID(buf) && buf->b_nwindows <= 1
&& bufIsChanged(buf))
{
#ifdef FEAT_AUTOCMD
bufref_T bufref;
set_bufref(&bufref, buf);
#endif
(void)autowrite(buf, FALSE);
#ifdef FEAT_AUTOCMD
/* check if autocommands removed the window */
if (!win_valid(wp) || !buf_valid(buf))
if (!win_valid(wp) || !bufref_valid(&bufref))
{
wpnext = firstwin; /* start all over... */
continue;
@@ -4970,7 +5083,7 @@ ex_buffer_all(exarg_T *eap)
#endif
{
/* Check if this buffer already has a window */
for (wp = firstwin; wp != NULL; wp = wp->w_next)
FOR_ALL_WINDOWS(wp)
if (wp->w_buffer == buf)
break;
/* If the buffer already has a window, move it */
@@ -4980,6 +5093,11 @@ ex_buffer_all(exarg_T *eap)
if (wp == NULL && split_ret == OK)
{
#ifdef FEAT_AUTOCMD
bufref_T bufref;
set_bufref(&bufref, buf);
#endif
/* Split the window and put the buffer in it */
p_ea_save = p_ea;
p_ea = TRUE; /* use space from all windows */
@@ -4995,8 +5113,9 @@ ex_buffer_all(exarg_T *eap)
#endif
set_curbuf(buf, DOBUF_GOTO);
#ifdef FEAT_AUTOCMD
if (!buf_valid(buf)) /* autocommands deleted the buffer!!! */
if (!bufref_valid(&bufref))
{
/* autocommands deleted the buffer!!! */
#if defined(HAS_SWAP_EXISTS_ACTION)
swap_exists_action = SEA_NONE;
# endif
@@ -5342,7 +5461,7 @@ write_viminfo_bufferlist(FILE *fp)
#endif
fputs(_("\n# Buffer list:\n"), fp);
for (buf = firstbuf; buf != NULL ; buf = buf->b_next)
FOR_ALL_BUFFERS(buf)
{
if (buf->b_fname == NULL
|| !buf->b_p_bl
@@ -5728,7 +5847,7 @@ buf_delete_all_signs(void)
{
buf_T *buf; /* buffer we are checking for signs */
for (buf = firstbuf; buf != NULL; buf = buf->b_next)
FOR_ALL_BUFFERS(buf)
if (buf->b_signlist != NULL)
buf_delete_signs(buf);
}

View File

@@ -132,7 +132,7 @@ ch_logfile(char_u *fname, char_u *opt)
}
int
ch_log_active()
ch_log_active(void)
{
return log_fd != NULL;
}
@@ -261,7 +261,10 @@ strerror_win32(int eno)
char_u *ptr;
if (msgbuf)
{
LocalFree(msgbuf);
msgbuf = NULL;
}
FormatMessage(
FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM |
@@ -272,21 +275,22 @@ strerror_win32(int eno)
(LPTSTR) &msgbuf,
0,
NULL);
/* chomp \r or \n */
for (ptr = (char_u *)msgbuf; *ptr; ptr++)
switch (*ptr)
{
case '\r':
STRMOVE(ptr, ptr + 1);
ptr--;
break;
case '\n':
if (*(ptr + 1) == '\0')
*ptr = '\0';
else
*ptr = ' ';
break;
}
if (msgbuf != NULL)
/* chomp \r or \n */
for (ptr = (char_u *)msgbuf; *ptr; ptr++)
switch (*ptr)
{
case '\r':
STRMOVE(ptr, ptr + 1);
ptr--;
break;
case '\n':
if (*(ptr + 1) == '\0')
*ptr = '\0';
else
*ptr = ' ';
break;
}
return msgbuf;
}
#endif
@@ -358,7 +362,7 @@ channel_still_useful(channel_T *channel)
return TRUE;
/* If reading from or a buffer it's still useful. */
if (channel->ch_part[PART_IN].ch_buffer != NULL)
if (channel->ch_part[PART_IN].ch_bufref.br_buf != NULL)
return TRUE;
/* If there is no callback then nobody can get readahead. If the fd is
@@ -375,9 +379,11 @@ channel_still_useful(channel_T *channel)
return (channel->ch_callback != NULL && (has_sock_msg
|| has_out_msg || has_err_msg))
|| ((channel->ch_part[PART_OUT].ch_callback != NULL
|| channel->ch_part[PART_OUT].ch_buffer) && has_out_msg)
|| channel->ch_part[PART_OUT].ch_bufref.br_buf != NULL)
&& has_out_msg)
|| ((channel->ch_part[PART_ERR].ch_callback != NULL
|| channel->ch_part[PART_ERR].ch_buffer) && has_err_msg);
|| channel->ch_part[PART_ERR].ch_bufref.br_buf != NULL)
&& has_err_msg);
}
/*
@@ -1042,19 +1048,19 @@ channel_set_job(channel_T *channel, job_T *job, jobopt_T *options)
{
chanpart_T *in_part = &channel->ch_part[PART_IN];
in_part->ch_buffer = job->jv_in_buf;
set_bufref(&in_part->ch_bufref, job->jv_in_buf);
ch_logs(channel, "reading from buffer '%s'",
(char *)in_part->ch_buffer->b_ffname);
(char *)in_part->ch_bufref.br_buf->b_ffname);
if (options->jo_set & JO_IN_TOP)
{
if (options->jo_in_top == 0 && !(options->jo_set & JO_IN_BOT))
{
/* Special mode: send last-but-one line when appending a line
* to the buffer. */
in_part->ch_buffer->b_write_to_channel = TRUE;
in_part->ch_bufref.br_buf->b_write_to_channel = TRUE;
in_part->ch_buf_append = TRUE;
in_part->ch_buf_top =
in_part->ch_buffer->b_ml.ml_line_count + 1;
in_part->ch_bufref.br_buf->b_ml.ml_line_count + 1;
}
else
in_part->ch_buf_top = options->jo_in_top;
@@ -1064,7 +1070,7 @@ channel_set_job(channel_T *channel, job_T *job, jobopt_T *options)
if (options->jo_set & JO_IN_BOT)
in_part->ch_buf_bot = options->jo_in_bot;
else
in_part->ch_buf_bot = in_part->ch_buffer->b_ml.ml_line_count;
in_part->ch_buf_bot = in_part->ch_bufref.br_buf->b_ml.ml_line_count;
}
}
@@ -1107,6 +1113,31 @@ find_buffer(char_u *name, int err)
return buf;
}
static void
set_callback(
char_u **cbp,
partial_T **pp,
char_u *callback,
partial_T *partial)
{
free_callback(*cbp, *pp);
if (callback != NULL && *callback != NUL)
{
if (partial != NULL)
*cbp = partial_name(partial);
else
{
*cbp = vim_strsave(callback);
func_ref(*cbp);
}
}
else
*cbp = NULL;
*pp = partial;
if (partial != NULL)
++partial->pt_refcount;
}
/*
* Set various properties from an "opt" argument.
*/
@@ -1114,8 +1145,6 @@ find_buffer(char_u *name, int err)
channel_set_options(channel_T *channel, jobopt_T *opt)
{
int part;
char_u **cbp;
partial_T **pp;
if (opt->jo_set & JO_MODE)
for (part = PART_SOCK; part <= PART_IN; ++part)
@@ -1138,61 +1167,19 @@ channel_set_options(channel_T *channel, jobopt_T *opt)
channel->ch_part[PART_IN].ch_block_write = 1;
if (opt->jo_set & JO_CALLBACK)
{
cbp = &channel->ch_callback;
pp = &channel->ch_partial;
vim_free(*cbp);
partial_unref(*pp);
if (opt->jo_callback != NULL && *opt->jo_callback != NUL)
*cbp = vim_strsave(opt->jo_callback);
else
*cbp = NULL;
*pp = opt->jo_partial;
if (*pp != NULL)
++(*pp)->pt_refcount;
}
set_callback(&channel->ch_callback, &channel->ch_partial,
opt->jo_callback, opt->jo_partial);
if (opt->jo_set & JO_OUT_CALLBACK)
{
cbp = &channel->ch_part[PART_OUT].ch_callback;
pp = &channel->ch_part[PART_OUT].ch_partial;
vim_free(*cbp);
partial_unref(*pp);
if (opt->jo_out_cb != NULL && *opt->jo_out_cb != NUL)
*cbp = vim_strsave(opt->jo_out_cb);
else
*cbp = NULL;
*pp = opt->jo_out_partial;
if (*pp != NULL)
++(*pp)->pt_refcount;
}
set_callback(&channel->ch_part[PART_OUT].ch_callback,
&channel->ch_part[PART_OUT].ch_partial,
opt->jo_out_cb, opt->jo_out_partial);
if (opt->jo_set & JO_ERR_CALLBACK)
{
cbp = &channel->ch_part[PART_ERR].ch_callback;
pp = &channel->ch_part[PART_ERR].ch_partial;
vim_free(*cbp);
partial_unref(*pp);
if (opt->jo_err_cb != NULL && *opt->jo_err_cb != NUL)
*cbp = vim_strsave(opt->jo_err_cb);
else
*cbp = NULL;
*pp = opt->jo_err_partial;
if (*pp != NULL)
++(*pp)->pt_refcount;
}
set_callback(&channel->ch_part[PART_ERR].ch_callback,
&channel->ch_part[PART_ERR].ch_partial,
opt->jo_err_cb, opt->jo_err_partial);
if (opt->jo_set & JO_CLOSE_CALLBACK)
{
cbp = &channel->ch_close_cb;
pp = &channel->ch_close_partial;
vim_free(*cbp);
partial_unref(*pp);
if (opt->jo_close_cb != NULL && *opt->jo_close_cb != NUL)
*cbp = vim_strsave(opt->jo_close_cb);
else
*cbp = NULL;
*pp = opt->jo_close_partial;
if (*pp != NULL)
++(*pp)->pt_refcount;
}
set_callback(&channel->ch_close_cb, &channel->ch_close_partial,
opt->jo_close_cb, opt->jo_close_partial);
if ((opt->jo_set & JO_OUT_IO) && opt->jo_io[PART_OUT] == JIO_BUFFER)
{
@@ -1225,7 +1212,7 @@ channel_set_options(channel_T *channel, jobopt_T *opt)
{
ch_logs(channel, "writing out to buffer '%s'",
(char *)buf->b_ffname);
channel->ch_part[PART_OUT].ch_buffer = buf;
set_bufref(&channel->ch_part[PART_OUT].ch_bufref, buf);
}
}
}
@@ -1240,7 +1227,7 @@ channel_set_options(channel_T *channel, jobopt_T *opt)
if (!(opt->jo_set & JO_ERR_MODE))
channel->ch_part[PART_ERR].ch_mode = MODE_NL;
if (opt->jo_io[PART_ERR] == JIO_OUT)
buf = channel->ch_part[PART_OUT].ch_buffer;
buf = channel->ch_part[PART_OUT].ch_bufref.br_buf;
else if (opt->jo_set & JO_ERR_BUF)
{
buf = buflist_findnr(opt->jo_io_buf[PART_ERR]);
@@ -1262,7 +1249,7 @@ channel_set_options(channel_T *channel, jobopt_T *opt)
{
ch_logs(channel, "writing err to buffer '%s'",
(char *)buf->b_ffname);
channel->ch_part[PART_ERR].ch_buffer = buf;
set_bufref(&channel->ch_part[PART_ERR].ch_bufref, buf);
}
}
}
@@ -1288,10 +1275,17 @@ channel_set_req_callback(
if (item != NULL)
{
item->cq_callback = vim_strsave(callback);
item->cq_partial = partial;
if (partial != NULL)
{
++partial->pt_refcount;
item->cq_callback = callback;
}
else
{
item->cq_callback = vim_strsave(callback);
func_ref(item->cq_callback);
}
item->cq_seq_nr = id;
item->cq_prev = head->cq_prev;
head->cq_prev = item;
@@ -1309,14 +1303,20 @@ write_buf_line(buf_T *buf, linenr_T lnum, channel_T *channel)
char_u *line = ml_get_buf(buf, lnum, FALSE);
int len = (int)STRLEN(line);
char_u *p;
int i;
/* Need to make a copy to be able to append a NL. */
if ((p = alloc(len + 2)) == NULL)
return;
STRCPY(p, line);
memcpy((char *)p, (char *)line, len);
for (i = 0; i < len; ++i)
if (p[i] == NL)
p[i] = NUL;
p[len] = NL;
p[len + 1] = NUL;
channel_send(channel, PART_IN, p, "write_buf_line()");
channel_send(channel, PART_IN, p, len + 1, "write_buf_line()");
vim_free(p);
}
@@ -1397,15 +1397,15 @@ channel_write_in(channel_T *channel)
{
chanpart_T *in_part = &channel->ch_part[PART_IN];
linenr_T lnum;
buf_T *buf = in_part->ch_buffer;
buf_T *buf = in_part->ch_bufref.br_buf;
int written = 0;
if (buf == NULL || in_part->ch_buf_append)
return; /* no buffer or using appending */
if (!buf_valid(buf) || buf->b_ml.ml_mfp == NULL)
if (!bufref_valid(&in_part->ch_bufref) || buf->b_ml.ml_mfp == NULL)
{
/* buffer was wiped out or unloaded */
in_part->ch_buffer = NULL;
in_part->ch_bufref.br_buf = NULL;
return;
}
@@ -1427,7 +1427,7 @@ channel_write_in(channel_T *channel)
if (lnum > buf->b_ml.ml_line_count)
{
/* Writing is done, no longer need the buffer. */
in_part->ch_buffer = NULL;
in_part->ch_bufref.br_buf = NULL;
ch_log(channel, "Finished writing all lines to channel");
}
else
@@ -1436,7 +1436,7 @@ channel_write_in(channel_T *channel)
}
/*
* Handle buffer "buf" beeing freed, remove it from any channels.
* Handle buffer "buf" being freed, remove it from any channels.
*/
void
channel_buffer_free(buf_T *buf)
@@ -1449,11 +1449,11 @@ channel_buffer_free(buf_T *buf)
{
chanpart_T *ch_part = &channel->ch_part[part];
if (ch_part->ch_buffer == buf)
if (ch_part->ch_bufref.br_buf == buf)
{
ch_logs(channel, "%s buffer has been wiped out",
part_names[part]);
ch_part->ch_buffer = NULL;
ch_part->ch_bufref.br_buf = NULL;
}
}
}
@@ -1462,7 +1462,7 @@ channel_buffer_free(buf_T *buf)
* Write any lines waiting to be written to a channel.
*/
void
channel_write_any_lines()
channel_write_any_lines(void)
{
channel_T *channel;
@@ -1470,10 +1470,10 @@ channel_write_any_lines()
{
chanpart_T *in_part = &channel->ch_part[PART_IN];
if (in_part->ch_buffer != NULL)
if (in_part->ch_bufref.br_buf != NULL)
{
if (in_part->ch_buf_append)
channel_write_new_lines(in_part->ch_buffer);
channel_write_new_lines(in_part->ch_bufref.br_buf);
else
channel_write_in(channel);
}
@@ -1497,7 +1497,7 @@ channel_write_new_lines(buf_T *buf)
linenr_T lnum;
int written = 0;
if (in_part->ch_buffer == buf && in_part->ch_buf_append)
if (in_part->ch_bufref.br_buf == buf && in_part->ch_buf_append)
{
if (in_part->ch_fd == INVALID_FD)
continue; /* pipe was closed */
@@ -1543,12 +1543,41 @@ invoke_callback(channel_T *channel, char_u *callback, partial_T *partial,
argv[0].v_type = VAR_CHANNEL;
argv[0].vval.v_channel = channel;
call_func(callback, (int)STRLEN(callback),
&rettv, 2, argv, 0L, 0L, &dummy, TRUE, partial, NULL);
call_func(callback, (int)STRLEN(callback), &rettv, 2, argv, NULL,
0L, 0L, &dummy, TRUE, partial, NULL);
clear_tv(&rettv);
channel_need_redraw = TRUE;
}
/*
* Return the first node from "channel"/"part" without removing it.
* Returns NULL if there is nothing.
*/
readq_T *
channel_peek(channel_T *channel, int part)
{
readq_T *head = &channel->ch_part[part].ch_head;
return head->rq_next;
}
/*
* Return a pointer to the first NL in "node".
* Skips over NUL characters.
* Returns NULL if there is no NL.
*/
char_u *
channel_first_nl(readq_T *node)
{
char_u *buffer = node->rq_buffer;
long_u i;
for (i = 0; i < node->rq_buflen; ++i)
if (buffer[i] == NL)
return buffer + i;
return NULL;
}
/*
* Return the first buffer from channel "channel"/"part" and remove it.
* The caller must free it.
@@ -1576,13 +1605,14 @@ channel_get(channel_T *channel, int part)
/*
* Returns the whole buffer contents concatenated for "channel"/"part".
* Replaces NUL bytes with NL.
*/
static char_u *
channel_get_all(channel_T *channel, int part)
{
readq_T *head = &channel->ch_part[part].ch_head;
readq_T *node = head->rq_next;
long_u len = 1;
long_u len = 0;
char_u *res;
char_u *p;
@@ -1592,13 +1622,17 @@ channel_get_all(channel_T *channel, int part)
/* Concatenate everything into one buffer. */
for (node = head->rq_next; node != NULL; node = node->rq_next)
len += (long_u)STRLEN(node->rq_buffer);
res = lalloc(len, TRUE);
len += node->rq_buflen;
res = lalloc(len + 1, TRUE);
if (res == NULL)
return NULL;
*res = NUL;
p = res;
for (node = head->rq_next; node != NULL; node = node->rq_next)
STRCAT(res, node->rq_buffer);
{
mch_memmove(p, node->rq_buffer, node->rq_buflen);
p += node->rq_buflen;
}
*p = NUL;
/* Free all buffers */
do
@@ -1607,37 +1641,89 @@ channel_get_all(channel_T *channel, int part)
vim_free(p);
} while (p != NULL);
/* turn all NUL into NL */
while (len > 0)
{
--len;
if (res[len] == NUL)
res[len] = NL;
}
return res;
}
/*
* Consume "len" bytes from the head of "node".
* Caller must check these bytes are available.
*/
void
channel_consume(channel_T *channel, int part, int len)
{
readq_T *head = &channel->ch_part[part].ch_head;
readq_T *node = head->rq_next;
char_u *buf = node->rq_buffer;
mch_memmove(buf, buf + len, node->rq_buflen - len);
node->rq_buflen -= len;
}
/*
* Collapses the first and second buffer for "channel"/"part".
* Returns FAIL if that is not possible.
* When "want_nl" is TRUE collapse more buffers until a NL is found.
*/
int
channel_collapse(channel_T *channel, int part)
channel_collapse(channel_T *channel, int part, int want_nl)
{
readq_T *head = &channel->ch_part[part].ch_head;
readq_T *node = head->rq_next;
readq_T *last_node;
readq_T *n;
char_u *newbuf;
char_u *p;
long_u len;
if (node == NULL || node->rq_next == NULL)
return FAIL;
p = alloc((unsigned)(STRLEN(node->rq_buffer)
+ STRLEN(node->rq_next->rq_buffer) + 1));
if (p == NULL)
return FAIL; /* out of memory */
STRCPY(p, node->rq_buffer);
STRCAT(p, node->rq_next->rq_buffer);
vim_free(node->rq_next->rq_buffer);
node->rq_next->rq_buffer = p;
last_node = node->rq_next;
len = node->rq_buflen + last_node->rq_buflen + 1;
if (want_nl)
while (last_node->rq_next != NULL
&& channel_first_nl(last_node) == NULL)
{
last_node = last_node->rq_next;
len += last_node->rq_buflen;
}
/* dispose of the node and its buffer */
head->rq_next = node->rq_next;
head->rq_next->rq_prev = NULL;
p = newbuf = alloc(len);
if (newbuf == NULL)
return FAIL; /* out of memory */
mch_memmove(p, node->rq_buffer, node->rq_buflen);
p += node->rq_buflen;
vim_free(node->rq_buffer);
vim_free(node);
node->rq_buffer = newbuf;
for (n = node; n != last_node; )
{
n = n->rq_next;
mch_memmove(p, n->rq_buffer, n->rq_buflen);
p += n->rq_buflen;
vim_free(n->rq_buffer);
}
node->rq_buflen = (long_u)(p - newbuf);
/* dispose of the collapsed nodes and their buffers */
for (n = node->rq_next; n != last_node; )
{
n = n->rq_next;
vim_free(n->rq_prev);
}
node->rq_next = last_node->rq_next;
if (last_node->rq_next == NULL)
head->rq_prev = node;
else
last_node->rq_next->rq_prev = node;
vim_free(last_node);
return OK;
}
@@ -1658,6 +1744,8 @@ channel_save(channel_T *channel, int part, char_u *buf, int len,
node = (readq_T *)alloc(sizeof(readq_T));
if (node == NULL)
return FAIL; /* out of memory */
/* A NUL is added at the end, because netbeans code expects that.
* Otherwise a NUL may appear inside the text. */
node->rq_buffer = alloc(len + 1);
if (node->rq_buffer == NULL)
{
@@ -1673,11 +1761,13 @@ channel_save(channel_T *channel, int part, char_u *buf, int len,
if (buf[i] != CAR || i + 1 >= len || buf[i + 1] != NL)
*p++ = buf[i];
*p = NUL;
node->rq_buflen = (long_u)(p - node->rq_buffer);
}
else
{
mch_memmove(node->rq_buffer, buf, len);
node->rq_buffer[len] = NUL;
node->rq_buflen = (long_u)len;
}
if (prepend)
@@ -2024,7 +2114,7 @@ channel_exe_cmd(channel_T *channel, int part, typval_T *argv)
#ifdef FEAT_GUI
if (gui.in_use)
{
gui_update_cursor(FALSE, FALSE);
gui_update_cursor(TRUE, FALSE);
gui_mch_flush();
}
#endif
@@ -2091,7 +2181,7 @@ channel_exe_cmd(channel_T *channel, int part, typval_T *argv)
{
channel_send(channel,
part == PART_SOCK ? PART_SOCK : PART_IN,
json, (char *)cmd);
json, (int)STRLEN(json), (char *)cmd);
vim_free(json);
}
}
@@ -2104,7 +2194,7 @@ channel_exe_cmd(channel_T *channel, int part, typval_T *argv)
}
else if (p_verbose > 2)
{
ch_errors(channel, "Receved unknown command: %s", (char *)cmd);
ch_errors(channel, "Received unknown command: %s", (char *)cmd);
EMSG2("E905: received unknown command: %s", cmd);
}
}
@@ -2126,8 +2216,7 @@ invoke_one_time_callback(
* invokes ch_close() the list will be cleared. */
remove_cb_node(cbhead, item);
invoke_callback(channel, item->cq_callback, item->cq_partial, argv);
vim_free(item->cq_callback);
partial_unref(item->cq_partial);
free_callback(item->cq_callback, item->cq_partial);
vim_free(item);
}
@@ -2212,7 +2301,7 @@ append_to_buffer(buf_T *buffer, char_u *msg, channel_T *channel, int part)
{
chanpart_T *in_part = &ch->ch_part[PART_IN];
if (in_part->ch_buffer == buffer)
if (in_part->ch_bufref.br_buf == buffer)
in_part->ch_buf_bot = buffer->b_ml.ml_line_count;
}
}
@@ -2248,6 +2337,7 @@ may_invoke_callback(channel_T *channel, int part)
char_u *callback = NULL;
partial_T *partial = NULL;
buf_T *buffer = NULL;
char_u *p;
if (channel->ch_nb_close_cb != NULL)
/* this channel is handled elsewhere (netbeans) */
@@ -2273,11 +2363,11 @@ may_invoke_callback(channel_T *channel, int part)
partial = channel->ch_partial;
}
buffer = channel->ch_part[part].ch_buffer;
if (buffer != NULL && !buf_valid(buffer))
buffer = channel->ch_part[part].ch_bufref.br_buf;
if (buffer != NULL && !bufref_valid(&channel->ch_part[part].ch_bufref))
{
/* buffer was wiped out */
channel->ch_part[part].ch_buffer = NULL;
channel->ch_part[part].ch_bufref.br_buf = NULL;
buffer = NULL;
}
@@ -2340,19 +2430,27 @@ may_invoke_callback(channel_T *channel, int part)
{
char_u *nl;
char_u *buf;
readq_T *node;
/* See if we have a message ending in NL in the first buffer. If
* not try to concatenate the first and the second buffer. */
while (TRUE)
{
buf = channel_peek(channel, part);
nl = vim_strchr(buf, NL);
node = channel_peek(channel, part);
nl = channel_first_nl(node);
if (nl != NULL)
break;
if (channel_collapse(channel, part) == FAIL)
if (channel_collapse(channel, part, TRUE) == FAIL)
return FALSE; /* incomplete message */
}
if (nl[1] == NUL)
buf = node->rq_buffer;
/* Convert NUL to NL, the internal representation. */
for (p = buf; p < nl && p < buf + node->rq_buflen; ++p)
if (*p == NUL)
*p = NL;
if (nl + 1 == buf + node->rq_buflen)
{
/* get the whole buffer, drop the NL */
msg = channel_get(channel, part);
@@ -2360,16 +2458,19 @@ may_invoke_callback(channel_T *channel, int part)
}
else
{
/* Copy the message into allocated memory and remove it from
* the buffer. */
/* Copy the message into allocated memory (excluding the NL)
* and remove it from the buffer (including the NL). */
msg = vim_strnsave(buf, (int)(nl - buf));
mch_memmove(buf, nl + 1, STRLEN(nl + 1) + 1);
channel_consume(channel, part, (int)(nl - buf) + 1);
}
}
else
{
/* For a raw channel we don't know where the message ends, just
* get everything we have. */
* get everything we have.
* Convert NUL to NL, the internal representation. */
msg = channel_get_all(channel, part);
}
if (msg == NULL)
return FALSE; /* out of memory (and avoids Coverity warning) */
@@ -2604,16 +2705,15 @@ channel_close(channel_T *channel, int invoke_close_cb)
argv[0].v_type = VAR_CHANNEL;
argv[0].vval.v_channel = channel;
call_func(channel->ch_close_cb, (int)STRLEN(channel->ch_close_cb),
&rettv, 1, argv, 0L, 0L, &dummy, TRUE,
&rettv, 1, argv, NULL, 0L, 0L, &dummy, TRUE,
channel->ch_close_partial, NULL);
clear_tv(&rettv);
channel_need_redraw = TRUE;
}
/* the callback is only called once */
vim_free(channel->ch_close_cb);
free_callback(channel->ch_close_cb, channel->ch_close_partial);
channel->ch_close_cb = NULL;
partial_unref(channel->ch_close_partial);
channel->ch_close_partial = NULL;
--channel->ch_refcount;
@@ -2632,20 +2732,6 @@ channel_close(channel_T *channel, int invoke_close_cb)
channel->ch_nb_close_cb = NULL;
}
/*
* Return the first buffer from "channel"/"part" without removing it.
* Returns NULL if there is nothing.
*/
char_u *
channel_peek(channel_T *channel, int part)
{
readq_T *head = &channel->ch_part[part].ch_head;
if (head->rq_next == NULL)
return NULL;
return head->rq_next->rq_buffer;
}
/*
* Clear the read buffer on "channel"/"part".
*/
@@ -2663,8 +2749,7 @@ channel_clear_one(channel_T *channel, int part)
cbq_T *node = cb_head->cq_next;
remove_cb_node(cb_head, node);
vim_free(node->cq_callback);
partial_unref(node->cq_partial);
free_callback(node->cq_callback, node->cq_partial);
vim_free(node);
}
@@ -2674,9 +2759,9 @@ channel_clear_one(channel_T *channel, int part)
remove_json_node(json_head, json_head->jq_next);
}
vim_free(channel->ch_part[part].ch_callback);
free_callback(channel->ch_part[part].ch_callback,
channel->ch_part[part].ch_partial);
channel->ch_part[part].ch_callback = NULL;
partial_unref(channel->ch_part[part].ch_partial);
channel->ch_part[part].ch_partial = NULL;
}
@@ -2693,13 +2778,11 @@ channel_clear(channel_T *channel)
channel_clear_one(channel, PART_OUT);
channel_clear_one(channel, PART_ERR);
/* there is no callback or queue for PART_IN */
vim_free(channel->ch_callback);
free_callback(channel->ch_callback, channel->ch_partial);
channel->ch_callback = NULL;
partial_unref(channel->ch_partial);
channel->ch_partial = NULL;
vim_free(channel->ch_close_cb);
free_callback(channel->ch_close_cb, channel->ch_close_partial);
channel->ch_close_cb = NULL;
partial_unref(channel->ch_close_partial);
channel->ch_close_partial = NULL;
}
@@ -2736,7 +2819,7 @@ channel_fill_wfds(int maxfd_arg, fd_set *wfds)
{
chanpart_T *in_part = &ch->ch_part[PART_IN];
if (in_part->ch_fd != INVALID_FD && in_part->ch_buffer != NULL)
if (in_part->ch_fd != INVALID_FD && in_part->ch_bufref.br_buf != NULL)
{
FD_SET((int)in_part->ch_fd, wfds);
if ((int)in_part->ch_fd >= maxfd)
@@ -2759,7 +2842,7 @@ channel_fill_poll_write(int nfd_in, struct pollfd *fds)
{
chanpart_T *in_part = &ch->ch_part[PART_IN];
if (in_part->ch_fd != INVALID_FD && in_part->ch_buffer != NULL)
if (in_part->ch_fd != INVALID_FD && in_part->ch_bufref.br_buf != NULL)
{
in_part->ch_poll_idx = nfd;
fds[nfd].fd = in_part->ch_fd;
@@ -3008,18 +3091,23 @@ channel_read_block(channel_T *channel, int part, int timeout)
ch_mode_T mode = channel->ch_part[part].ch_mode;
sock_T fd = channel->ch_part[part].ch_fd;
char_u *nl;
readq_T *node;
ch_logsn(channel, "Blocking %s read, timeout: %d msec",
mode == MODE_RAW ? "RAW" : "NL", timeout);
while (TRUE)
{
buf = channel_peek(channel, part);
if (buf != NULL && (mode == MODE_RAW
|| (mode == MODE_NL && vim_strchr(buf, NL) != NULL)))
break;
if (buf != NULL && channel_collapse(channel, part) == OK)
continue;
node = channel_peek(channel, part);
if (node != NULL)
{
if (mode == MODE_RAW || (mode == MODE_NL
&& channel_first_nl(node) != NULL))
/* got a complete message */
break;
if (channel_collapse(channel, part, mode == MODE_NL) == OK)
continue;
}
/* Wait for up to the channel timeout. */
if (fd == INVALID_FD)
@@ -3038,8 +3126,17 @@ channel_read_block(channel_T *channel, int part, int timeout)
}
else
{
nl = vim_strchr(buf, NL);
if (nl[1] == NUL)
char_u *p;
buf = node->rq_buffer;
nl = channel_first_nl(node);
/* Convert NUL to NL, the internal representation. */
for (p = buf; p < nl && p < buf + node->rq_buflen; ++p)
if (*p == NUL)
*p = NL;
if (nl + 1 == buf + node->rq_buflen)
{
/* get the whole buffer */
msg = channel_get(channel, part);
@@ -3050,7 +3147,7 @@ channel_read_block(channel_T *channel, int part, int timeout)
/* Copy the message into allocated memory and remove it from the
* buffer. */
msg = vim_strnsave(buf, (int)(nl - buf));
mch_memmove(buf, nl + 1, STRLEN(nl + 1) + 1);
channel_consume(channel, part, (int)(nl - buf) + 1);
}
}
if (log_fd != NULL)
@@ -3084,7 +3181,7 @@ channel_read_json_block(
{
more = channel_parse_json(channel, part);
/* search for messsage "id" */
/* search for message "id" */
if (channel_get_json(channel, part, id, rettv) == OK)
{
chanpart->ch_block_id = 0;
@@ -3274,9 +3371,8 @@ channel_handle_events(void)
* Return FAIL or OK.
*/
int
channel_send(channel_T *channel, int part, char_u *buf, char *fun)
channel_send(channel_T *channel, int part, char_u *buf, int len, char *fun)
{
int len = (int)STRLEN(buf);
int res;
sock_T fd;
@@ -3324,7 +3420,7 @@ channel_send(channel_T *channel, int part, char_u *buf, char *fun)
/*
* Common for "ch_sendexpr()" and "ch_sendraw()".
* Returns the channel if the caller should read the response.
* Sets "part_read" to the the read fd.
* Sets "part_read" to the read fd.
* Otherwise returns NULL.
*/
channel_T *
@@ -3364,7 +3460,7 @@ send_common(
opt->jo_callback, opt->jo_partial, id);
}
if (channel_send(channel, part_send, text, fun) == OK
if (channel_send(channel, part_send, text, (int)STRLEN(text), fun) == OK
&& opt->jo_callback == NULL)
return channel;
return NULL;
@@ -3532,8 +3628,8 @@ channel_poll_check(int ret_in, void *fds_in)
{
if (in_part->ch_buf_append)
{
if (in_part->ch_buffer != NULL)
channel_write_new_lines(in_part->ch_buffer);
if (in_part->ch_bufref.br_buf != NULL)
channel_write_new_lines(in_part->ch_bufref.br_buf);
}
else
channel_write_in(channel);
@@ -3610,8 +3706,8 @@ channel_select_check(int ret_in, void *rfds_in, void *wfds_in)
{
if (in_part->ch_buf_append)
{
if (in_part->ch_buffer != NULL)
channel_write_new_lines(in_part->ch_buffer);
if (in_part->ch_bufref.br_buf != NULL)
channel_write_new_lines(in_part->ch_bufref.br_buf);
}
else
channel_write_in(channel);
@@ -3833,14 +3929,24 @@ free_job_options(jobopt_T *opt)
{
if (opt->jo_partial != NULL)
partial_unref(opt->jo_partial);
else if (opt->jo_callback != NULL)
func_unref(opt->jo_callback);
if (opt->jo_out_partial != NULL)
partial_unref(opt->jo_out_partial);
else if (opt->jo_out_cb != NULL)
func_unref(opt->jo_out_cb);
if (opt->jo_err_partial != NULL)
partial_unref(opt->jo_err_partial);
else if (opt->jo_err_cb != NULL)
func_unref(opt->jo_err_cb);
if (opt->jo_close_partial != NULL)
partial_unref(opt->jo_close_partial);
else if (opt->jo_close_cb != NULL)
func_unref(opt->jo_close_cb);
if (opt->jo_exit_partial != NULL)
partial_unref(opt->jo_exit_partial);
else if (opt->jo_exit_cb != NULL)
func_unref(opt->jo_exit_cb);
}
/*
@@ -4197,7 +4303,7 @@ job_free_contents(job_T *job)
{
/* The link from the channel to the job doesn't count as a reference,
* thus don't decrement the refcount of the job. The reference from
* the job to the channel does count the refrence, decrement it and
* the job to the channel does count the reference, decrement it and
* NULL the reference. We don't set ch_job_killed, unreferencing the
* job doesn't mean it stops running. */
job->jv_channel->ch_job = NULL;
@@ -4206,8 +4312,7 @@ job_free_contents(job_T *job)
mch_clear_job(job);
vim_free(job->jv_stoponexit);
vim_free(job->jv_exit_cb);
partial_unref(job->jv_exit_partial);
free_callback(job->jv_exit_cb, job->jv_exit_partial);
}
static void
@@ -4372,8 +4477,7 @@ job_set_options(job_T *job, jobopt_T *opt)
}
if (opt->jo_set & JO_EXIT_CB)
{
vim_free(job->jv_exit_cb);
partial_unref(job->jv_exit_partial);
free_callback(job->jv_exit_cb, job->jv_exit_partial);
if (opt->jo_exit_cb == NULL || *opt->jo_exit_cb == NUL)
{
job->jv_exit_cb = NULL;
@@ -4381,10 +4485,17 @@ job_set_options(job_T *job, jobopt_T *opt)
}
else
{
job->jv_exit_cb = vim_strsave(opt->jo_exit_cb);
job->jv_exit_partial = opt->jo_exit_partial;
if (job->jv_exit_partial != NULL)
{
job->jv_exit_cb = opt->jo_exit_cb;
++job->jv_exit_partial->pt_refcount;
}
else
{
job->jv_exit_cb = vim_strsave(opt->jo_exit_cb);
func_ref(job->jv_exit_cb);
}
}
}
}
@@ -4393,7 +4504,7 @@ job_set_options(job_T *job, jobopt_T *opt)
* Called when Vim is exiting: kill all jobs that have the "stoponexit" flag.
*/
void
job_stop_on_exit()
job_stop_on_exit(void)
{
job_T *job;
@@ -4407,7 +4518,7 @@ job_stop_on_exit()
* job_check_ended() should be called once in a while.
*/
int
has_pending_job()
has_pending_job(void)
{
job_T *job;
@@ -4674,7 +4785,7 @@ job_status(job_T *job)
argv[1].v_type = VAR_NUMBER;
argv[1].vval.v_number = job->jv_exitval;
call_func(job->jv_exit_cb, (int)STRLEN(job->jv_exit_cb),
&rettv, 2, argv, 0L, 0L, &dummy, TRUE,
&rettv, 2, argv, NULL, 0L, 0L, &dummy, TRUE,
job->jv_exit_partial, NULL);
clear_tv(&rettv);
--job->jv_refcount;

View File

@@ -571,7 +571,7 @@ transchar(int c)
(c >= ' ' && c <= '~')
#endif
#ifdef FEAT_FKMAP
|| F_ischar(c)
|| (p_altkeymap && F_ischar(c))
#endif
)) || (c < 256 && vim_isprintc_strict(c)))
{
@@ -1836,14 +1836,14 @@ vim_str2nr(
is bin */
int *len, /* return: detected length of number */
int what, /* what numbers to recognize */
long *nptr, /* return: signed result */
unsigned long *unptr, /* return: unsigned result */
varnumber_T *nptr, /* return: signed result */
uvarnumber_T *unptr, /* return: unsigned result */
int maxlen) /* max length of string to check */
{
char_u *ptr = start;
int pre = 0; /* default is decimal */
int negative = FALSE;
unsigned long un = 0;
uvarnumber_T un = 0;
int n;
if (ptr[0] == '-')
@@ -1912,7 +1912,7 @@ vim_str2nr(
/* octal */
while ('0' <= *ptr && *ptr <= '7')
{
un = 8 * un + (unsigned long)(*ptr - '0');
un = 8 * un + (uvarnumber_T)(*ptr - '0');
++ptr;
if (n++ == maxlen)
break;
@@ -1925,7 +1925,7 @@ vim_str2nr(
n += 2; /* skip over "0x" */
while (vim_isxdigit(*ptr))
{
un = 16 * un + (unsigned long)hex2nr(*ptr);
un = 16 * un + (uvarnumber_T)hex2nr(*ptr);
++ptr;
if (n++ == maxlen)
break;
@@ -1936,7 +1936,7 @@ vim_str2nr(
/* decimal */
while (VIM_ISDIGIT(*ptr))
{
un = 10 * un + (unsigned long)(*ptr - '0');
un = 10 * un + (uvarnumber_T)(*ptr - '0');
++ptr;
if (n++ == maxlen)
break;
@@ -1950,9 +1950,9 @@ vim_str2nr(
if (nptr != NULL)
{
if (negative) /* account for leading '-' for decimal numbers */
*nptr = -(long)un;
*nptr = -(varnumber_T)un;
else
*nptr = (long)un;
*nptr = (varnumber_T)un;
}
if (unptr != NULL)
*unptr = un;

View File

@@ -75,9 +75,6 @@ RUBY_PRO = @RUBY_PRO@
RUBY_CFLAGS = @RUBY_CFLAGS@
RUBY_LIBS = @RUBY_LIBS@
SNIFF_SRC = @SNIFF_SRC@
SNIFF_OBJ = @SNIFF_OBJ@
AWK = @AWK@
STRIP = @STRIP@

View File

@@ -437,7 +437,7 @@ fi
dnl Check user requested features.
AC_MSG_CHECKING(--with-features argument)
AC_ARG_WITH(features, [ --with-features=TYPE tiny, small, normal, big or huge (default: normal)],
AC_ARG_WITH(features, [ --with-features=TYPE tiny, small, normal, big or huge (default: huge)],
features="$withval"; AC_MSG_RESULT($features),
features="huge"; AC_MSG_RESULT(Defaulting to huge))

819
src/dict.c Normal file
View File

@@ -0,0 +1,819 @@
/* vi:set ts=8 sts=4 sw=4:
*
* VIM - Vi IMproved by Bram Moolenaar
*
* Do ":help uganda" in Vim to read copying and usage conditions.
* Do ":help credits" in Vim to see a list of people who contributed.
* See README.txt for an overview of the Vim source code.
*/
/*
* dict.c: Dictionary support
*/
#include "vim.h"
#if defined(FEAT_EVAL) || defined(PROTO)
/* List head for garbage collection. Although there can be a reference loop
* from partial to dict to partial, we don't need to keep track of the partial,
* since it will get freed when the dict is unused and gets freed. */
static dict_T *first_dict = NULL; /* list of all dicts */
/*
* Allocate an empty header for a dictionary.
*/
dict_T *
dict_alloc(void)
{
dict_T *d;
d = (dict_T *)alloc(sizeof(dict_T));
if (d != NULL)
{
/* Add the dict to the list of dicts for garbage collection. */
if (first_dict != NULL)
first_dict->dv_used_prev = d;
d->dv_used_next = first_dict;
d->dv_used_prev = NULL;
first_dict = d;
hash_init(&d->dv_hashtab);
d->dv_lock = 0;
d->dv_scope = 0;
d->dv_refcount = 0;
d->dv_copyID = 0;
}
return d;
}
/*
* Allocate an empty dict for a return value.
* Returns OK or FAIL.
*/
int
rettv_dict_alloc(typval_T *rettv)
{
dict_T *d = dict_alloc();
if (d == NULL)
return FAIL;
rettv->vval.v_dict = d;
rettv->v_type = VAR_DICT;
rettv->v_lock = 0;
++d->dv_refcount;
return OK;
}
/*
* Free a Dictionary, including all non-container items it contains.
* Ignores the reference count.
*/
static void
dict_free_contents(dict_T *d)
{
int todo;
hashitem_T *hi;
dictitem_T *di;
/* Lock the hashtab, we don't want it to resize while freeing items. */
hash_lock(&d->dv_hashtab);
todo = (int)d->dv_hashtab.ht_used;
for (hi = d->dv_hashtab.ht_array; todo > 0; ++hi)
{
if (!HASHITEM_EMPTY(hi))
{
/* Remove the item before deleting it, just in case there is
* something recursive causing trouble. */
di = HI2DI(hi);
hash_remove(&d->dv_hashtab, hi);
clear_tv(&di->di_tv);
vim_free(di);
--todo;
}
}
hash_clear(&d->dv_hashtab);
}
static void
dict_free_dict(dict_T *d)
{
/* Remove the dict from the list of dicts for garbage collection. */
if (d->dv_used_prev == NULL)
first_dict = d->dv_used_next;
else
d->dv_used_prev->dv_used_next = d->dv_used_next;
if (d->dv_used_next != NULL)
d->dv_used_next->dv_used_prev = d->dv_used_prev;
vim_free(d);
}
static void
dict_free(dict_T *d)
{
if (!in_free_unref_items)
{
dict_free_contents(d);
dict_free_dict(d);
}
}
/*
* Unreference a Dictionary: decrement the reference count and free it when it
* becomes zero.
*/
void
dict_unref(dict_T *d)
{
if (d != NULL && --d->dv_refcount <= 0)
dict_free(d);
}
/*
* Go through the list of dicts and free items without the copyID.
* Returns TRUE if something was freed.
*/
int
dict_free_nonref(int copyID)
{
dict_T *dd;
int did_free = FALSE;
for (dd = first_dict; dd != NULL; dd = dd->dv_used_next)
if ((dd->dv_copyID & COPYID_MASK) != (copyID & COPYID_MASK))
{
/* Free the Dictionary and ordinary items it contains, but don't
* recurse into Lists and Dictionaries, they will be in the list
* of dicts or list of lists. */
dict_free_contents(dd);
did_free = TRUE;
}
return did_free;
}
void
dict_free_items(int copyID)
{
dict_T *dd, *dd_next;
for (dd = first_dict; dd != NULL; dd = dd_next)
{
dd_next = dd->dv_used_next;
if ((dd->dv_copyID & COPYID_MASK) != (copyID & COPYID_MASK))
dict_free_dict(dd);
}
}
/*
* Allocate a Dictionary item.
* The "key" is copied to the new item.
* Note that the value of the item "di_tv" still needs to be initialized!
* Returns NULL when out of memory.
*/
dictitem_T *
dictitem_alloc(char_u *key)
{
dictitem_T *di;
di = (dictitem_T *)alloc((unsigned)(sizeof(dictitem_T) + STRLEN(key)));
if (di != NULL)
{
STRCPY(di->di_key, key);
di->di_flags = DI_FLAGS_ALLOC;
}
return di;
}
/*
* Make a copy of a Dictionary item.
*/
static dictitem_T *
dictitem_copy(dictitem_T *org)
{
dictitem_T *di;
di = (dictitem_T *)alloc((unsigned)(sizeof(dictitem_T)
+ STRLEN(org->di_key)));
if (di != NULL)
{
STRCPY(di->di_key, org->di_key);
di->di_flags = DI_FLAGS_ALLOC;
copy_tv(&org->di_tv, &di->di_tv);
}
return di;
}
/*
* Remove item "item" from Dictionary "dict" and free it.
*/
void
dictitem_remove(dict_T *dict, dictitem_T *item)
{
hashitem_T *hi;
hi = hash_find(&dict->dv_hashtab, item->di_key);
if (HASHITEM_EMPTY(hi))
EMSG2(_(e_intern2), "dictitem_remove()");
else
hash_remove(&dict->dv_hashtab, hi);
dictitem_free(item);
}
/*
* Free a dict item. Also clears the value.
*/
void
dictitem_free(dictitem_T *item)
{
clear_tv(&item->di_tv);
if (item->di_flags & DI_FLAGS_ALLOC)
vim_free(item);
}
/*
* Make a copy of dict "d". Shallow if "deep" is FALSE.
* The refcount of the new dict is set to 1.
* See item_copy() for "copyID".
* Returns NULL when out of memory.
*/
dict_T *
dict_copy(dict_T *orig, int deep, int copyID)
{
dict_T *copy;
dictitem_T *di;
int todo;
hashitem_T *hi;
if (orig == NULL)
return NULL;
copy = dict_alloc();
if (copy != NULL)
{
if (copyID != 0)
{
orig->dv_copyID = copyID;
orig->dv_copydict = copy;
}
todo = (int)orig->dv_hashtab.ht_used;
for (hi = orig->dv_hashtab.ht_array; todo > 0 && !got_int; ++hi)
{
if (!HASHITEM_EMPTY(hi))
{
--todo;
di = dictitem_alloc(hi->hi_key);
if (di == NULL)
break;
if (deep)
{
if (item_copy(&HI2DI(hi)->di_tv, &di->di_tv, deep,
copyID) == FAIL)
{
vim_free(di);
break;
}
}
else
copy_tv(&HI2DI(hi)->di_tv, &di->di_tv);
if (dict_add(copy, di) == FAIL)
{
dictitem_free(di);
break;
}
}
}
++copy->dv_refcount;
if (todo > 0)
{
dict_unref(copy);
copy = NULL;
}
}
return copy;
}
/*
* Add item "item" to Dictionary "d".
* Returns FAIL when out of memory and when key already exists.
*/
int
dict_add(dict_T *d, dictitem_T *item)
{
return hash_add(&d->dv_hashtab, item->di_key);
}
/*
* Add a number or string entry to dictionary "d".
* When "str" is NULL use number "nr", otherwise use "str".
* Returns FAIL when out of memory and when key already exists.
*/
int
dict_add_nr_str(
dict_T *d,
char *key,
varnumber_T nr,
char_u *str)
{
dictitem_T *item;
item = dictitem_alloc((char_u *)key);
if (item == NULL)
return FAIL;
item->di_tv.v_lock = 0;
if (str == NULL)
{
item->di_tv.v_type = VAR_NUMBER;
item->di_tv.vval.v_number = nr;
}
else
{
item->di_tv.v_type = VAR_STRING;
item->di_tv.vval.v_string = vim_strsave(str);
}
if (dict_add(d, item) == FAIL)
{
dictitem_free(item);
return FAIL;
}
return OK;
}
/*
* Add a list entry to dictionary "d".
* Returns FAIL when out of memory and when key already exists.
*/
int
dict_add_list(dict_T *d, char *key, list_T *list)
{
dictitem_T *item;
item = dictitem_alloc((char_u *)key);
if (item == NULL)
return FAIL;
item->di_tv.v_lock = 0;
item->di_tv.v_type = VAR_LIST;
item->di_tv.vval.v_list = list;
if (dict_add(d, item) == FAIL)
{
dictitem_free(item);
return FAIL;
}
++list->lv_refcount;
return OK;
}
/*
* Get the number of items in a Dictionary.
*/
long
dict_len(dict_T *d)
{
if (d == NULL)
return 0L;
return (long)d->dv_hashtab.ht_used;
}
/*
* Find item "key[len]" in Dictionary "d".
* If "len" is negative use strlen(key).
* Returns NULL when not found.
*/
dictitem_T *
dict_find(dict_T *d, char_u *key, int len)
{
#define AKEYLEN 200
char_u buf[AKEYLEN];
char_u *akey;
char_u *tofree = NULL;
hashitem_T *hi;
if (d == NULL)
return NULL;
if (len < 0)
akey = key;
else if (len >= AKEYLEN)
{
tofree = akey = vim_strnsave(key, len);
if (akey == NULL)
return NULL;
}
else
{
/* Avoid a malloc/free by using buf[]. */
vim_strncpy(buf, key, len);
akey = buf;
}
hi = hash_find(&d->dv_hashtab, akey);
vim_free(tofree);
if (HASHITEM_EMPTY(hi))
return NULL;
return HI2DI(hi);
}
/*
* Get a string item from a dictionary.
* When "save" is TRUE allocate memory for it.
* Returns NULL if the entry doesn't exist or out of memory.
*/
char_u *
get_dict_string(dict_T *d, char_u *key, int save)
{
dictitem_T *di;
char_u *s;
di = dict_find(d, key, -1);
if (di == NULL)
return NULL;
s = get_tv_string(&di->di_tv);
if (save && s != NULL)
s = vim_strsave(s);
return s;
}
/*
* Get a number item from a dictionary.
* Returns 0 if the entry doesn't exist.
*/
varnumber_T
get_dict_number(dict_T *d, char_u *key)
{
dictitem_T *di;
di = dict_find(d, key, -1);
if (di == NULL)
return 0;
return get_tv_number(&di->di_tv);
}
/*
* Return an allocated string with the string representation of a Dictionary.
* May return NULL.
*/
char_u *
dict2string(typval_T *tv, int copyID, int restore_copyID)
{
garray_T ga;
int first = TRUE;
char_u *tofree;
char_u numbuf[NUMBUFLEN];
hashitem_T *hi;
char_u *s;
dict_T *d;
int todo;
if ((d = tv->vval.v_dict) == NULL)
return NULL;
ga_init2(&ga, (int)sizeof(char), 80);
ga_append(&ga, '{');
todo = (int)d->dv_hashtab.ht_used;
for (hi = d->dv_hashtab.ht_array; todo > 0 && !got_int; ++hi)
{
if (!HASHITEM_EMPTY(hi))
{
--todo;
if (first)
first = FALSE;
else
ga_concat(&ga, (char_u *)", ");
tofree = string_quote(hi->hi_key, FALSE);
if (tofree != NULL)
{
ga_concat(&ga, tofree);
vim_free(tofree);
}
ga_concat(&ga, (char_u *)": ");
s = echo_string_core(&HI2DI(hi)->di_tv, &tofree, numbuf, copyID,
FALSE, restore_copyID, TRUE);
if (s != NULL)
ga_concat(&ga, s);
vim_free(tofree);
if (s == NULL || did_echo_string_emsg)
break;
line_breakcheck();
}
}
if (todo > 0)
{
vim_free(ga.ga_data);
return NULL;
}
ga_append(&ga, '}');
ga_append(&ga, NUL);
return (char_u *)ga.ga_data;
}
/*
* Allocate a variable for a Dictionary and fill it from "*arg".
* Return OK or FAIL. Returns NOTDONE for {expr}.
*/
int
get_dict_tv(char_u **arg, typval_T *rettv, int evaluate)
{
dict_T *d = NULL;
typval_T tvkey;
typval_T tv;
char_u *key = NULL;
dictitem_T *item;
char_u *start = skipwhite(*arg + 1);
char_u buf[NUMBUFLEN];
/*
* First check if it's not a curly-braces thing: {expr}.
* Must do this without evaluating, otherwise a function may be called
* twice. Unfortunately this means we need to call eval1() twice for the
* first item.
* But {} is an empty Dictionary.
*/
if (*start != '}')
{
if (eval1(&start, &tv, FALSE) == FAIL) /* recursive! */
return FAIL;
if (*start == '}')
return NOTDONE;
}
if (evaluate)
{
d = dict_alloc();
if (d == NULL)
return FAIL;
}
tvkey.v_type = VAR_UNKNOWN;
tv.v_type = VAR_UNKNOWN;
*arg = skipwhite(*arg + 1);
while (**arg != '}' && **arg != NUL)
{
if (eval1(arg, &tvkey, evaluate) == FAIL) /* recursive! */
goto failret;
if (**arg != ':')
{
EMSG2(_("E720: Missing colon in Dictionary: %s"), *arg);
clear_tv(&tvkey);
goto failret;
}
if (evaluate)
{
key = get_tv_string_buf_chk(&tvkey, buf);
if (key == NULL)
{
/* "key" is NULL when get_tv_string_buf_chk() gave an errmsg */
clear_tv(&tvkey);
goto failret;
}
}
*arg = skipwhite(*arg + 1);
if (eval1(arg, &tv, evaluate) == FAIL) /* recursive! */
{
if (evaluate)
clear_tv(&tvkey);
goto failret;
}
if (evaluate)
{
item = dict_find(d, key, -1);
if (item != NULL)
{
EMSG2(_("E721: Duplicate key in Dictionary: \"%s\""), key);
clear_tv(&tvkey);
clear_tv(&tv);
goto failret;
}
item = dictitem_alloc(key);
clear_tv(&tvkey);
if (item != NULL)
{
item->di_tv = tv;
item->di_tv.v_lock = 0;
if (dict_add(d, item) == FAIL)
dictitem_free(item);
}
}
if (**arg == '}')
break;
if (**arg != ',')
{
EMSG2(_("E722: Missing comma in Dictionary: %s"), *arg);
goto failret;
}
*arg = skipwhite(*arg + 1);
}
if (**arg != '}')
{
EMSG2(_("E723: Missing end of Dictionary '}': %s"), *arg);
failret:
if (evaluate)
dict_free(d);
return FAIL;
}
*arg = skipwhite(*arg + 1);
if (evaluate)
{
rettv->v_type = VAR_DICT;
rettv->vval.v_dict = d;
++d->dv_refcount;
}
return OK;
}
/*
* Go over all entries in "d2" and add them to "d1".
* When "action" is "error" then a duplicate key is an error.
* When "action" is "force" then a duplicate key is overwritten.
* Otherwise duplicate keys are ignored ("action" is "keep").
*/
void
dict_extend(dict_T *d1, dict_T *d2, char_u *action)
{
dictitem_T *di1;
hashitem_T *hi2;
int todo;
char_u *arg_errmsg = (char_u *)N_("extend() argument");
todo = (int)d2->dv_hashtab.ht_used;
for (hi2 = d2->dv_hashtab.ht_array; todo > 0; ++hi2)
{
if (!HASHITEM_EMPTY(hi2))
{
--todo;
di1 = dict_find(d1, hi2->hi_key, -1);
if (d1->dv_scope != 0)
{
/* Disallow replacing a builtin function in l: and g:.
* Check the key to be valid when adding to any scope. */
if (d1->dv_scope == VAR_DEF_SCOPE
&& HI2DI(hi2)->di_tv.v_type == VAR_FUNC
&& var_check_func_name(hi2->hi_key, di1 == NULL))
break;
if (!valid_varname(hi2->hi_key))
break;
}
if (di1 == NULL)
{
di1 = dictitem_copy(HI2DI(hi2));
if (di1 != NULL && dict_add(d1, di1) == FAIL)
dictitem_free(di1);
}
else if (*action == 'e')
{
EMSG2(_("E737: Key already exists: %s"), hi2->hi_key);
break;
}
else if (*action == 'f' && HI2DI(hi2) != di1)
{
if (tv_check_lock(di1->di_tv.v_lock, arg_errmsg, TRUE)
|| var_check_ro(di1->di_flags, arg_errmsg, TRUE))
break;
clear_tv(&di1->di_tv);
copy_tv(&HI2DI(hi2)->di_tv, &di1->di_tv);
}
}
}
}
/*
* Return the dictitem that an entry in a hashtable points to.
*/
dictitem_T *
dict_lookup(hashitem_T *hi)
{
return HI2DI(hi);
}
/*
* Return TRUE when two dictionaries have exactly the same key/values.
*/
int
dict_equal(
dict_T *d1,
dict_T *d2,
int ic, /* ignore case for strings */
int recursive) /* TRUE when used recursively */
{
hashitem_T *hi;
dictitem_T *item2;
int todo;
if (d1 == NULL && d2 == NULL)
return TRUE;
if (d1 == NULL || d2 == NULL)
return FALSE;
if (d1 == d2)
return TRUE;
if (dict_len(d1) != dict_len(d2))
return FALSE;
todo = (int)d1->dv_hashtab.ht_used;
for (hi = d1->dv_hashtab.ht_array; todo > 0; ++hi)
{
if (!HASHITEM_EMPTY(hi))
{
item2 = dict_find(d2, hi->hi_key, -1);
if (item2 == NULL)
return FALSE;
if (!tv_equal(&HI2DI(hi)->di_tv, &item2->di_tv, ic, recursive))
return FALSE;
--todo;
}
}
return TRUE;
}
/*
* Turn a dict into a list:
* "what" == 0: list of keys
* "what" == 1: list of values
* "what" == 2: list of items
*/
void
dict_list(typval_T *argvars, typval_T *rettv, int what)
{
list_T *l2;
dictitem_T *di;
hashitem_T *hi;
listitem_T *li;
listitem_T *li2;
dict_T *d;
int todo;
if (argvars[0].v_type != VAR_DICT)
{
EMSG(_(e_dictreq));
return;
}
if ((d = argvars[0].vval.v_dict) == NULL)
return;
if (rettv_list_alloc(rettv) == FAIL)
return;
todo = (int)d->dv_hashtab.ht_used;
for (hi = d->dv_hashtab.ht_array; todo > 0; ++hi)
{
if (!HASHITEM_EMPTY(hi))
{
--todo;
di = HI2DI(hi);
li = listitem_alloc();
if (li == NULL)
break;
list_append(rettv->vval.v_list, li);
if (what == 0)
{
/* keys() */
li->li_tv.v_type = VAR_STRING;
li->li_tv.v_lock = 0;
li->li_tv.vval.v_string = vim_strsave(di->di_key);
}
else if (what == 1)
{
/* values() */
copy_tv(&di->di_tv, &li->li_tv);
}
else
{
/* items() */
l2 = list_alloc();
li->li_tv.v_type = VAR_LIST;
li->li_tv.v_lock = 0;
li->li_tv.vval.v_list = l2;
if (l2 == NULL)
break;
++l2->lv_refcount;
li2 = listitem_alloc();
if (li2 == NULL)
break;
list_append(l2, li2);
li2->li_tv.v_type = VAR_STRING;
li2->li_tv.v_lock = 0;
li2->li_tv.vval.v_string = vim_strsave(di->di_key);
li2 = listitem_alloc();
if (li2 == NULL)
break;
list_append(l2, li2);
copy_tv(&di->di_tv, &li2->li_tv);
}
}
}
}
#endif /* defined(FEAT_EVAL) */

View File

@@ -65,7 +65,7 @@ diff_buf_delete(buf_T *buf)
int i;
tabpage_T *tp;
for (tp = first_tabpage; tp != NULL; tp = tp->tp_next)
FOR_ALL_TABPAGES(tp)
{
i = diff_buf_idx_tp(buf, tp);
if (i != DB_COUNT)
@@ -92,7 +92,7 @@ diff_buf_adjust(win_T *win)
{
/* When there is no window showing a diff for this buffer, remove
* it from the diffs. */
for (wp = firstwin; wp != NULL; wp = wp->w_next)
FOR_ALL_WINDOWS(wp)
if (wp->w_buffer == win->w_buffer && wp->w_p_diff)
break;
if (wp == NULL)
@@ -135,7 +135,7 @@ diff_buf_add(buf_T *buf)
return;
}
EMSGN(_("E96: Can not diff more than %ld buffers"), DB_COUNT);
EMSGN(_("E96: Cannot diff more than %ld buffers"), DB_COUNT);
}
/*
@@ -178,7 +178,7 @@ diff_invalidate(buf_T *buf)
tabpage_T *tp;
int i;
for (tp = first_tabpage; tp != NULL; tp = tp->tp_next)
FOR_ALL_TABPAGES(tp)
{
i = diff_buf_idx_tp(buf, tp);
if (i != DB_COUNT)
@@ -204,7 +204,7 @@ diff_mark_adjust(
tabpage_T *tp;
/* Handle all tab pages that use the current buffer in a diff. */
for (tp = first_tabpage; tp != NULL; tp = tp->tp_next)
FOR_ALL_TABPAGES(tp)
{
idx = diff_buf_idx_tp(curbuf, tp);
if (idx != DB_COUNT)
@@ -591,7 +591,7 @@ diff_redraw(
win_T *wp;
int n;
for (wp = firstwin; wp != NULL; wp = wp->w_next)
FOR_ALL_WINDOWS(wp)
if (wp->w_p_diff)
{
redraw_win_later(wp, SOME_VALID);
@@ -888,7 +888,7 @@ ex_diffpatch(exarg_T *eap)
char_u *browseFile = NULL;
int browse_flag = cmdmod.browse;
#endif
struct stat st;
stat_T st;
#ifdef FEAT_BROWSE
if (cmdmod.browse)
@@ -1069,8 +1069,9 @@ theend:
ex_diffsplit(exarg_T *eap)
{
win_T *old_curwin = curwin;
buf_T *old_curbuf = curbuf;
bufref_T old_curbuf;
set_bufref(&old_curbuf, curbuf);
#ifdef FEAT_GUI
need_mouse_correct = TRUE;
#endif
@@ -1092,10 +1093,10 @@ ex_diffsplit(exarg_T *eap)
{
diff_win_options(old_curwin, TRUE);
if (buf_valid(old_curbuf))
if (bufref_valid(&old_curbuf))
/* Move the cursor position to that of the old window. */
curwin->w_cursor.lnum = diff_get_corresponding_line(
old_curbuf,
old_curbuf.br_buf,
old_curwin->w_cursor.lnum,
curbuf,
curwin->w_cursor.lnum);
@@ -1197,7 +1198,7 @@ ex_diffoff(exarg_T *eap)
int diffwin = FALSE;
#endif
for (wp = firstwin; wp != NULL; wp = wp->w_next)
FOR_ALL_WINDOWS(wp)
{
if (eap->forceit ? wp->w_p_diff : wp == curwin)
{
@@ -1557,7 +1558,8 @@ diff_check(win_T *wp, linenr_T lnum)
/* Compare all lines. If they are equal the lines were inserted
* in some buffers, deleted in others, but not changed. */
for (i = 0; i < DB_COUNT; ++i)
if (i != idx && curtab->tp_diffbuf[i] != NULL && dp->df_count[i] != 0)
if (i != idx && curtab->tp_diffbuf[i] != NULL
&& dp->df_count[i] != 0)
if (!diff_equal_entry(dp, idx, i))
return -1;
}
@@ -1877,7 +1879,7 @@ diffopt_changed(void)
/* If "icase" or "iwhite" was added or removed, need to update the diff. */
if (diff_flags != diff_flags_new)
for (tp = first_tabpage; tp != NULL; tp = tp->tp_next)
FOR_ALL_TABPAGES(tp)
tp->tp_diff_invalid = TRUE;
diff_flags = diff_flags_new;
@@ -2432,7 +2434,7 @@ diff_fold_update(diff_T *dp, int skip_idx)
int i;
win_T *wp;
for (wp = firstwin; wp != NULL; wp = wp->w_next)
FOR_ALL_WINDOWS(wp)
for (i = 0; i < DB_COUNT; ++i)
if (curtab->tp_diffbuf[i] == wp->w_buffer && i != skip_idx)
foldUpdate(wp, dp->df_lnum[i],
@@ -2448,7 +2450,7 @@ diff_mode_buf(buf_T *buf)
{
tabpage_T *tp;
for (tp = first_tabpage; tp != NULL; tp = tp->tp_next)
FOR_ALL_TABPAGES(tp)
if (diff_buf_idx_tp(buf, tp) != DB_COUNT)
return TRUE;
return FALSE;

View File

@@ -2460,4 +2460,3 @@ keymap_unload(void)
}
#endif /* FEAT_KEYMAP */

View File

@@ -1153,10 +1153,9 @@ install_vimrc(int idx)
fprintf(fd, "set compatible\n");
break;
case compat_some_enhancements:
fprintf(fd, "set nocompatible\n");
fprintf(fd, "source $VIMRUNTIME/defaults.vim\n");
break;
case compat_all_enhancements:
fprintf(fd, "set nocompatible\n");
fprintf(fd, "source $VIMRUNTIME/vimrc_example.vim\n");
break;
}
@@ -1313,14 +1312,14 @@ init_vimrc_choices(void)
/* Whether to remap keys */
alloc_text(choice_count, remap_text , remap_choices[remap_choice]);
choices[choice_count].changefunc = change_remap_choice;
choices[choice_count].installfunc = NULL;;
choices[choice_count].installfunc = NULL;
choices[choice_count].active = (*oldvimrc == NUL);
++choice_count;
/* default way to use the mouse */
alloc_text(choice_count, mouse_text, mouse_choices[mouse_choice]);
choices[choice_count].changefunc = change_mouse_choice;
choices[choice_count].installfunc = NULL;;
choices[choice_count].installfunc = NULL;
choices[choice_count].active = (*oldvimrc == NUL);
++choice_count;
}

View File

@@ -649,7 +649,11 @@ edit(
if (update_Insstart_orig)
Insstart_orig = Insstart;
if (stop_insert_mode)
if (stop_insert_mode
#ifdef FEAT_INS_EXPAND
&& !pum_visible()
#endif
)
{
/* ":stopinsert" used or 'insertmode' reset */
count = 0;
@@ -2770,7 +2774,7 @@ ins_compl_make_cyclic(void)
* 'completeopt' value.
*/
void
completeopt_was_set()
completeopt_was_set(void)
{
compl_no_insert = FALSE;
compl_no_select = FALSE;
@@ -2827,6 +2831,7 @@ set_completion(colnr_T startcol, list_T *list)
}
else
ins_complete(Ctrl_N, FALSE);
compl_enter_selects = compl_no_insert;
/* Lazily show the popup menu, unless we got interrupted. */
if (!compl_interrupted)
@@ -4234,7 +4239,7 @@ ins_compl_get_exp(pos_T *ini)
if (!compl_started)
{
for (ins_buf = firstbuf; ins_buf != NULL; ins_buf = ins_buf->b_next)
FOR_ALL_BUFFERS(ins_buf)
ins_buf->b_scanned = 0;
found_all = FALSE;
ins_buf = curbuf;
@@ -4676,6 +4681,7 @@ ins_compl_insert(void)
EMPTY_IF_NULL(compl_shown_match->cp_text[CPT_INFO]));
}
set_vim_var_dict(VV_COMPLETED_ITEM, dict);
compl_curr_match = compl_shown_match;
}
/*

19150
src/eval.c

File diff suppressed because it is too large Load Diff

12619
src/evalfunc.c Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -289,10 +289,10 @@ typedef struct
union {
struct
{
long start_col_nr; /* starting column number */
long end_col_nr; /* ending column number */
varnumber_T start_col_nr; /* starting column number */
varnumber_T end_col_nr; /* ending column number */
} line;
long value; /* value if sorting by integer */
varnumber_T value; /* value if sorting by integer */
#ifdef FEAT_FLOAT
float_T value_flt; /* value if sorting by float */
#endif
@@ -1497,7 +1497,7 @@ do_shell(
&& !autocmd_busy
#endif
&& msg_silent == 0)
for (buf = firstbuf; buf; buf = buf->b_next)
FOR_ALL_BUFFERS(buf)
if (bufIsChanged(buf))
{
#ifdef FEAT_GUI_MSWIN
@@ -1750,6 +1750,8 @@ append_redir(
#if defined(FEAT_VIMINFO) || defined(PROTO)
static int no_viminfo(void);
static int read_viminfo_barline(vir_T *virp, int got_encoding, int force, int writing);
static void write_viminfo_version(FILE *fp_out);
static void write_viminfo_barlines(vir_T *virp, FILE *fp_out);
static int viminfo_errcnt;
@@ -1838,14 +1840,14 @@ write_viminfo(char_u *file, int forceit)
FILE *fp_in = NULL; /* input viminfo file, if any */
FILE *fp_out = NULL; /* output viminfo file */
char_u *tempname = NULL; /* name of temp viminfo file */
struct stat st_new; /* mch_stat() of potential new file */
stat_T st_new; /* mch_stat() of potential new file */
char_u *wp;
#if defined(UNIX) || defined(VMS)
mode_t umask_save;
#endif
#ifdef UNIX
int shortname = FALSE; /* use 8.3 file name */
struct stat st_old; /* mch_stat() of existing viminfo file */
stat_T st_old; /* mch_stat() of existing viminfo file */
#endif
#ifdef WIN3264
int hidden = FALSE;
@@ -1981,6 +1983,8 @@ write_viminfo(char_u *file, int forceit)
*/
if (*wp == 'a')
{
EMSG2(_("E929: Too many viminfo temp files, like %s!"),
tempname);
vim_free(tempname);
tempname = NULL;
break;
@@ -2144,10 +2148,11 @@ viminfo_filename(char_u *file)
static void
do_viminfo(FILE *fp_in, FILE *fp_out, int flags)
{
int count = 0;
int eof = FALSE;
vir_T vir;
int merge = FALSE;
int do_copy_marks = FALSE;
garray_T buflist;
if ((vir.vir_line = alloc(LSIZE)) == NULL)
return;
@@ -2156,11 +2161,20 @@ do_viminfo(FILE *fp_in, FILE *fp_out, int flags)
vir.vir_conv.vc_type = CONV_NONE;
#endif
ga_init2(&vir.vir_barlines, (int)sizeof(char_u *), 100);
vir.vir_version = -1;
if (fp_in != NULL)
{
if (flags & VIF_WANT_INFO)
{
if (fp_out != NULL)
{
/* Registers and marks are read and kept separate from what
* this Vim is using. They are merged when writing. */
prepare_viminfo_registers();
prepare_viminfo_marks();
}
eof = read_viminfo_up_to_marks(&vir,
flags & VIF_FORCEIT, fp_out != NULL);
merge = TRUE;
@@ -2170,13 +2184,18 @@ do_viminfo(FILE *fp_in, FILE *fp_out, int flags)
while (!(eof = viminfo_readline(&vir))
&& vir.vir_line[0] != '>')
;
do_copy_marks = (flags &
(VIF_WANT_MARKS | VIF_GET_OLDFILES | VIF_FORCEIT));
}
if (fp_out != NULL)
{
/* Write the info: */
fprintf(fp_out, _("# This viminfo file was generated by Vim %s.\n"),
VIM_VERSION_MEDIUM);
fputs(_("# You may edit it if you're careful!\n\n"), fp_out);
write_viminfo_version(fp_out);
#ifdef FEAT_MBYTE
fputs(_("# Value of 'encoding' when this file was written\n"), fp_out);
fprintf(fp_out, "*encoding=%s\n\n", p_enc);
@@ -2187,17 +2206,26 @@ do_viminfo(FILE *fp_in, FILE *fp_out, int flags)
write_viminfo_history(fp_out, merge);
#endif
write_viminfo_registers(fp_out);
finish_viminfo_registers();
#ifdef FEAT_EVAL
write_viminfo_varlist(fp_out);
#endif
write_viminfo_filemarks(fp_out);
finish_viminfo_marks();
write_viminfo_bufferlist(fp_out);
write_viminfo_barlines(&vir, fp_out);
count = write_viminfo_marks(fp_out);
if (do_copy_marks)
ga_init2(&buflist, sizeof(buf_T *), 50);
write_viminfo_marks(fp_out, do_copy_marks ? &buflist : NULL);
}
if (do_copy_marks)
{
copy_viminfo_marks(&vir, fp_out, &buflist, eof, flags);
if (fp_out != NULL)
ga_clear(&buflist);
}
if (fp_in != NULL
&& (flags & (VIF_WANT_MARKS | VIF_GET_OLDFILES | VIF_FORCEIT)))
copy_viminfo_marks(&vir, fp_out, count, eof, flags);
vim_free(vir.vir_line);
#ifdef FEAT_MBYTE
@@ -2220,10 +2248,12 @@ read_viminfo_up_to_marks(
{
int eof;
buf_T *buf;
int got_encoding = FALSE;
#ifdef FEAT_CMDHIST
prepare_viminfo_history(forceit ? 9999 : 0, writing);
#endif
eof = viminfo_readline(virp);
while (!eof && virp->vir_line[0] != '>')
{
@@ -2240,12 +2270,12 @@ read_viminfo_up_to_marks(
case '#':
eof = viminfo_readline(virp);
break;
case '|': /* copy line (for future use) */
if (writing)
ga_add_string(&virp->vir_barlines, virp->vir_line);
eof = viminfo_readline(virp);
case '|':
eof = read_viminfo_barline(virp, got_encoding,
forceit, writing);
break;
case '*': /* "*encoding=value" */
got_encoding = TRUE;
eof = viminfo_encoding(virp);
break;
case '!': /* global variable */
@@ -2259,7 +2289,15 @@ read_viminfo_up_to_marks(
eof = read_viminfo_bufferlist(virp, writing);
break;
case '"':
eof = read_viminfo_register(virp, forceit);
/* When registers are in bar lines skip the old style register
* lines. */
if (virp->vir_version < VIMINFO_VERSION_WITH_REGISTERS)
eof = read_viminfo_register(virp, forceit);
else
do {
eof = viminfo_readline(virp);
} while (!eof && (virp->vir_line[0] == TAB
|| virp->vir_line[0] == '<'));
break;
case '/': /* Search string */
case '&': /* Substitute search string */
@@ -2274,14 +2312,21 @@ read_viminfo_up_to_marks(
case '=':
case '@':
#ifdef FEAT_CMDHIST
eof = read_viminfo_history(virp, writing);
#else
eof = viminfo_readline(virp);
/* When history is in bar lines skip the old style history
* lines. */
if (virp->vir_version < VIMINFO_VERSION_WITH_HISTORY)
eof = read_viminfo_history(virp, writing);
else
#endif
eof = viminfo_readline(virp);
break;
case '-':
case '\'':
eof = read_viminfo_filemark(virp, forceit);
/* When file marks are in bar lines skip the old style lines. */
if (virp->vir_version < VIMINFO_VERSION_WITH_MARKS)
eof = read_viminfo_filemark(virp, forceit);
else
eof = viminfo_readline(virp);
break;
default:
if (viminfo_error("E575: ", _("Illegal starting char"),
@@ -2296,11 +2341,11 @@ read_viminfo_up_to_marks(
#ifdef FEAT_CMDHIST
/* Finish reading history items. */
if (!writing)
finish_viminfo_history();
finish_viminfo_history(virp);
#endif
/* Change file names to buffer numbers for fmarks. */
for (buf = firstbuf; buf != NULL; buf = buf->b_next)
FOR_ALL_BUFFERS(buf)
fmarks_check_names(buf);
return eof;
@@ -2347,8 +2392,8 @@ viminfo_readline(vir_T *virp)
}
/*
* check string read from viminfo file
* remove '\n' at the end of the line
* Check string read from viminfo file.
* Remove '\n' at the end of the line.
* - replace CTRL-V CTRL-V with CTRL-V
* - replace CTRL-V 'n' with '\n'
*
@@ -2463,22 +2508,379 @@ viminfo_writestring(FILE *fd, char_u *p)
putc('\n', fd);
}
/*
* Write a string in quotes that barline_parse() can read back.
* Breaks the line in less than LSIZE pieces when needed.
* Returns remaining characters in the line.
*/
int
barline_writestring(FILE *fd, char_u *s, int remaining_start)
{
char_u *p;
int remaining = remaining_start;
int len = 2;
/* Count the number of characters produced, including quotes. */
for (p = s; *p != NUL; ++p)
{
if (*p == NL)
len += 2;
else if (*p == '"' || *p == '\\')
len += 2;
else
++len;
}
if (len > remaining)
{
fprintf(fd, ">%d\n|<", len);
remaining = LSIZE - 20;
}
putc('"', fd);
for (p = s; *p != NUL; ++p)
{
if (*p == NL)
{
putc('\\', fd);
putc('n', fd);
--remaining;
}
else if (*p == '"' || *p == '\\')
{
putc('\\', fd);
putc(*p, fd);
--remaining;
}
else
putc(*p, fd);
--remaining;
if (remaining < 3)
{
putc('\n', fd);
putc('|', fd);
putc('<', fd);
/* Leave enough space for another continuation. */
remaining = LSIZE - 20;
}
}
putc('"', fd);
return remaining - 2;
}
/*
* Parse a viminfo line starting with '|'.
* Add each decoded value to "values".
* Returns TRUE if the next line is to be read after using the parsed values.
*/
static int
barline_parse(vir_T *virp, char_u *text, garray_T *values)
{
char_u *p = text;
char_u *nextp = NULL;
char_u *buf = NULL;
bval_T *value;
int i;
int allocated = FALSE;
int eof;
#ifdef FEAT_MBYTE
char_u *sconv;
int converted;
#endif
while (*p == ',')
{
++p;
if (ga_grow(values, 1) == FAIL)
break;
value = (bval_T *)(values->ga_data) + values->ga_len;
if (*p == '>')
{
/* Need to read a continuation line. Put strings in allocated
* memory, because virp->vir_line is overwritten. */
if (!allocated)
{
for (i = 0; i < values->ga_len; ++i)
{
bval_T *vp = (bval_T *)(values->ga_data) + i;
if (vp->bv_type == BVAL_STRING && !vp->bv_allocated)
{
vp->bv_string = vim_strnsave(vp->bv_string, vp->bv_len);
vp->bv_allocated = TRUE;
}
}
allocated = TRUE;
}
if (vim_isdigit(p[1]))
{
size_t len;
size_t todo;
size_t n;
/* String value was split into lines that are each shorter
* than LSIZE:
* |{bartype},>{length of "{text}{text2}"}
* |<"{text1}
* |<{text2}",{value}
* Length includes the quotes.
*/
++p;
len = getdigits(&p);
buf = alloc((int)(len + 1));
if (buf == NULL)
return TRUE;
p = buf;
for (todo = len; todo > 0; todo -= n)
{
eof = viminfo_readline(virp);
if (eof || virp->vir_line[0] != '|'
|| virp->vir_line[1] != '<')
{
/* File was truncated or garbled. Read another line if
* this one starts with '|'. */
vim_free(buf);
return eof || virp->vir_line[0] == '|';
}
/* Get length of text, excluding |< and NL chars. */
n = STRLEN(virp->vir_line);
while (n > 0 && (virp->vir_line[n - 1] == NL
|| virp->vir_line[n - 1] == CAR))
--n;
n -= 2;
if (n > todo)
{
/* more values follow after the string */
nextp = virp->vir_line + 2 + todo;
n = todo;
}
mch_memmove(p, virp->vir_line + 2, n);
p += n;
}
*p = NUL;
p = buf;
}
else
{
/* Line ending in ">" continues in the next line:
* |{bartype},{lots of values},>
* |<{value},{value}
*/
eof = viminfo_readline(virp);
if (eof || virp->vir_line[0] != '|'
|| virp->vir_line[1] != '<')
/* File was truncated or garbled. Read another line if
* this one starts with '|'. */
return eof || virp->vir_line[0] == '|';
p = virp->vir_line + 2;
}
}
if (isdigit(*p))
{
value->bv_type = BVAL_NR;
value->bv_nr = getdigits(&p);
++values->ga_len;
}
else if (*p == '"')
{
int len = 0;
char_u *s = p;
/* Unescape special characters in-place. */
++p;
while (*p != '"')
{
if (*p == NL || *p == NUL)
return TRUE; /* syntax error, drop the value */
if (*p == '\\')
{
++p;
if (*p == 'n')
s[len++] = '\n';
else
s[len++] = *p;
++p;
}
else
s[len++] = *p++;
}
++p;
s[len] = NUL;
#ifdef FEAT_MBYTE
converted = FALSE;
if (virp->vir_conv.vc_type != CONV_NONE && *s != NUL)
{
sconv = string_convert(&virp->vir_conv, s, NULL);
if (sconv != NULL)
{
if (s == buf)
vim_free(s);
s = sconv;
buf = s;
converted = TRUE;
}
}
#endif
/* Need to copy in allocated memory if the string wasn't allocated
* above and we did allocate before, thus vir_line may change. */
if (s != buf && allocated)
s = vim_strsave(s);
value->bv_string = s;
value->bv_type = BVAL_STRING;
value->bv_len = len;
value->bv_allocated = allocated
#ifdef FEAT_MBYTE
|| converted
#endif
;
++values->ga_len;
if (nextp != NULL)
{
/* values following a long string */
p = nextp;
nextp = NULL;
}
}
else if (*p == ',')
{
value->bv_type = BVAL_EMPTY;
++values->ga_len;
}
else
break;
}
return TRUE;
}
static int
read_viminfo_barline(vir_T *virp, int got_encoding, int force, int writing)
{
char_u *p = virp->vir_line + 1;
int bartype;
garray_T values;
bval_T *vp;
int i;
int read_next = TRUE;
/* The format is: |{bartype},{value},...
* For a very long string:
* |{bartype},>{length of "{text}{text2}"}
* |<{text1}
* |<{text2},{value}
* For a long line not using a string
* |{bartype},{lots of values},>
* |<{value},{value}
*/
if (*p == '<')
{
/* Continuation line of an unrecognized item. */
if (writing)
ga_add_string(&virp->vir_barlines, virp->vir_line);
}
else
{
ga_init2(&values, sizeof(bval_T), 20);
bartype = getdigits(&p);
switch (bartype)
{
case BARTYPE_VERSION:
/* Only use the version when it comes before the encoding.
* If it comes later it was copied by a Vim version that
* doesn't understand the version. */
if (!got_encoding)
{
read_next = barline_parse(virp, p, &values);
vp = (bval_T *)values.ga_data;
if (values.ga_len > 0 && vp->bv_type == BVAL_NR)
virp->vir_version = vp->bv_nr;
}
break;
case BARTYPE_HISTORY:
read_next = barline_parse(virp, p, &values);
handle_viminfo_history(&values, writing);
break;
case BARTYPE_REGISTER:
read_next = barline_parse(virp, p, &values);
handle_viminfo_register(&values, force);
break;
case BARTYPE_MARK:
read_next = barline_parse(virp, p, &values);
handle_viminfo_mark(&values, force);
break;
default:
/* copy unrecognized line (for future use) */
if (writing)
ga_add_string(&virp->vir_barlines, virp->vir_line);
}
for (i = 0; i < values.ga_len; ++i)
{
vp = (bval_T *)values.ga_data + i;
if (vp->bv_type == BVAL_STRING && vp->bv_allocated)
vim_free(vp->bv_string);
}
ga_clear(&values);
}
if (read_next)
return viminfo_readline(virp);
return FALSE;
}
static void
write_viminfo_version(FILE *fp_out)
{
fprintf(fp_out, "# Viminfo version\n|%d,%d\n\n",
BARTYPE_VERSION, VIMINFO_VERSION);
}
static void
write_viminfo_barlines(vir_T *virp, FILE *fp_out)
{
int i;
garray_T *gap = &virp->vir_barlines;
int seen_useful = FALSE;
char *line;
if (gap->ga_len > 0)
{
fputs(_("\n# Bar lines, copied verbatim:\n"), fp_out);
/* Skip over continuation lines until seeing a useful line. */
for (i = 0; i < gap->ga_len; ++i)
fputs(((char **)(gap->ga_data))[i], fp_out);
{
line = ((char **)(gap->ga_data))[i];
if (seen_useful || line[1] != '<')
{
fputs(line, fp_out);
seen_useful = TRUE;
}
}
}
}
#endif /* FEAT_VIMINFO */
/*
* Return the current time in seconds. Calls time(), unless test_settime()
* was used.
*/
time_T
vim_time(void)
{
# ifdef FEAT_EVAL
return time_for_testing == 0 ? time(NULL) : time_for_testing;
# else
return time(NULL);
# endif
}
/*
* Implementation of ":fixdel", also used by get_stty().
* <BS> resulting <Del>
@@ -2655,6 +3057,7 @@ do_write(exarg_T *eap)
char_u *browse_file = NULL;
#endif
buf_T *alt_buf = NULL;
int name_was_missing;
if (not_writing()) /* check 'write' option */
return FAIL;
@@ -2812,7 +3215,7 @@ do_write(exarg_T *eap)
{
if (au_has_group((char_u *)"filetypedetect"))
(void)do_doautocmd((char_u *)"filetypedetect BufRead",
TRUE);
TRUE, NULL);
do_modelines(0);
}
@@ -2822,6 +3225,8 @@ do_write(exarg_T *eap)
#endif
}
name_was_missing = curbuf->b_ffname == NULL;
retval = buf_write(curbuf, ffname, fname, eap->line1, eap->line2,
eap, eap->append, eap->forceit, TRUE, FALSE);
@@ -2835,7 +3240,12 @@ do_write(exarg_T *eap)
redraw_tabline = TRUE;
#endif
}
/* Change directories when the 'acd' option is set. */
}
/* Change directories when the 'acd' option is set and the file name
* got changed or set. */
if (eap->cmdidx == CMD_saveas || name_was_missing)
{
DO_AUTOCHDIR
}
}
@@ -3001,7 +3411,7 @@ do_wqall(exarg_T *eap)
if (eap->cmdidx == CMD_xall || eap->cmdidx == CMD_wqall)
exiting = TRUE;
for (buf = firstbuf; buf != NULL; buf = buf->b_next)
FOR_ALL_BUFFERS(buf)
{
if (bufIsChanged(buf))
{
@@ -3035,11 +3445,16 @@ do_wqall(exarg_T *eap)
}
else
{
#ifdef FEAT_AUTOCMD
bufref_T bufref;
set_bufref(&bufref, buf);
#endif
if (buf_write_all(buf, eap->forceit) == FAIL)
++error;
#ifdef FEAT_AUTOCMD
/* an autocommand may have deleted the buffer */
if (!buf_valid(buf))
if (!bufref_valid(&bufref))
buf = firstbuf;
#endif
}
@@ -3075,7 +3490,7 @@ not_writing(void)
static int
check_readonly(int *forceit, buf_T *buf)
{
struct stat st;
stat_T st;
/* Handle a file being readonly when the 'readonly' option is set or when
* the file exists and permissions are read-only.
@@ -3247,8 +3662,9 @@ do_ecmd(
int did_set_swapcommand = FALSE;
#endif
buf_T *buf;
bufref_T bufref;
#if defined(FEAT_AUTOCMD) || defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
buf_T *old_curbuf = curbuf;
bufref_T old_curbuf;
#endif
char_u *free_fname = NULL;
#ifdef FEAT_BROWSE
@@ -3273,6 +3689,9 @@ do_ecmd(
if (eap != NULL)
command = eap->do_ecmd_cmd;
#if defined(FEAT_AUTOCMD) || defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
set_bufref(&old_curbuf, curbuf);
#endif
if (fnum != 0)
{
@@ -3439,7 +3858,7 @@ do_ecmd(
/* autocommands may change curwin and curbuf */
if (oldwin != NULL)
oldwin = curwin;
old_curbuf = curbuf;
set_bufref(&old_curbuf, curbuf);
#endif
}
if (buf == NULL)
@@ -3451,12 +3870,13 @@ do_ecmd(
else /* existing memfile */
{
oldbuf = TRUE;
set_bufref(&bufref, buf);
(void)buf_check_timestamp(buf, FALSE);
/* Check if autocommands made buffer invalid or changed the current
* buffer. */
if (!buf_valid(buf)
if (!bufref_valid(&bufref)
#ifdef FEAT_AUTOCMD
|| curbuf != old_curbuf
|| curbuf != old_curbuf.br_buf
#endif
)
goto theend;
@@ -3496,10 +3916,11 @@ do_ecmd(
*/
if (buf->b_fname != NULL)
new_name = vim_strsave(buf->b_fname);
au_new_curbuf = buf;
set_bufref(&au_new_curbuf, buf);
apply_autocmds(EVENT_BUFLEAVE, NULL, NULL, FALSE, curbuf);
if (!buf_valid(buf)) /* new buffer has been deleted */
if (!bufref_valid(&au_new_curbuf))
{
/* new buffer has been deleted */
delbuf_msg(new_name); /* frees new_name */
goto theend;
}
@@ -3514,7 +3935,7 @@ do_ecmd(
auto_buf = TRUE;
else
{
if (curbuf == old_curbuf)
if (curbuf == old_curbuf.br_buf)
#endif
buf_copy_options(buf, BCO_ENTER);
@@ -3539,8 +3960,9 @@ do_ecmd(
}
# endif
/* Be careful again, like above. */
if (!buf_valid(buf)) /* new buffer has been deleted */
if (!bufref_valid(&au_new_curbuf))
{
/* new buffer has been deleted */
delbuf_msg(new_name); /* frees new_name */
goto theend;
}
@@ -3583,7 +4005,8 @@ do_ecmd(
#ifdef FEAT_AUTOCMD
}
vim_free(new_name);
au_new_curbuf = NULL;
au_new_curbuf.br_buf = NULL;
au_new_curbuf.br_buf_free_count = 0;
#endif
}
@@ -3659,6 +4082,7 @@ do_ecmd(
new_name = vim_strsave(buf->b_fname);
else
new_name = NULL;
set_bufref(&bufref, buf);
#endif
if (p_ur < 0 || curbuf->b_ml.ml_line_count <= p_ur)
{
@@ -3667,7 +4091,12 @@ do_ecmd(
u_sync(FALSE);
if (u_savecommon(0, curbuf->b_ml.ml_line_count + 1, 0, TRUE)
== FAIL)
{
#ifdef FEAT_AUTOCMD
vim_free(new_name);
#endif
goto theend;
}
u_unchanged(curbuf);
buf_freeall(curbuf, BFA_KEEP_UNDO);
@@ -3679,7 +4108,7 @@ do_ecmd(
#ifdef FEAT_AUTOCMD
/* If autocommands deleted the buffer we were going to re-edit, give
* up and jump to the end. */
if (!buf_valid(buf))
if (!bufref_valid(&bufref))
{
delbuf_msg(new_name); /* frees new_name */
goto theend;
@@ -3774,7 +4203,7 @@ do_ecmd(
#if defined(HAS_SWAP_EXISTS_ACTION)
if (swap_exists_action == SEA_QUIT)
retval = FAIL;
handle_swap_exists(old_curbuf);
handle_swap_exists(&old_curbuf);
#endif
}
#ifdef FEAT_AUTOCMD
@@ -3895,6 +4324,10 @@ do_ecmd(
msg_scrolled_ign = FALSE;
}
#ifdef FEAT_VIMINFO
curbuf->b_last_used = vim_time();
#endif
if (command != NULL)
do_cmdline(command, NULL, NULL, DOCMD_VERBOSE);
@@ -3959,7 +4392,8 @@ delbuf_msg(char_u *name)
EMSG2(_("E143: Autocommands unexpectedly deleted new buffer %s"),
name == NULL ? (char_u *)"" : name);
vim_free(name);
au_new_curbuf = NULL;
au_new_curbuf.br_buf = NULL;
au_new_curbuf.br_buf_free_count = 0;
}
#endif
@@ -3990,7 +4424,7 @@ ex_append(exarg_T *eap)
if (eap->cmdidx != CMD_append)
--lnum;
/* when the buffer is empty append to line 0 and delete the dummy line */
/* when the buffer is empty need to delete the dummy line */
if (empty && lnum == 1)
lnum = 0;
@@ -4074,7 +4508,7 @@ ex_append(exarg_T *eap)
did_undo = TRUE;
ml_append(lnum, theline, (colnr_T)0, FALSE);
appended_lines_mark(lnum, 1L);
appended_lines_mark(lnum + (empty ? 1 : 0), 1L);
vim_free(theline);
++lnum;
@@ -5686,7 +6120,7 @@ prepare_tagpreview(
*/
if (!curwin->w_p_pvw)
{
for (wp = firstwin; wp != NULL; wp = wp->w_next)
FOR_ALL_WINDOWS(wp)
if (wp->w_p_pvw)
break;
if (wp != NULL)
@@ -5843,7 +6277,7 @@ ex_help(exarg_T *eap)
if (cmdmod.tab != 0)
wp = NULL;
else
for (wp = firstwin; wp != NULL; wp = wp->w_next)
FOR_ALL_WINDOWS(wp)
if (wp->w_buffer != NULL && wp->w_buffer->b_help)
break;
if (wp != NULL && wp->w_buffer->b_nwindows > 0)
@@ -6216,6 +6650,9 @@ find_help_tags(
*/
if (*s == '\'' && s > arg && *arg == '\'')
break;
/* Also '{' and '}'. */
if (*s == '}' && s > arg && *arg == '{')
break;
}
*d = NUL;
@@ -7313,7 +7750,7 @@ ex_sign(exarg_T *eap)
if (idx == SIGNCMD_UNPLACE && *arg == NUL)
{
/* ":sign unplace {id}": remove placed sign by number */
for (buf = firstbuf; buf != NULL; buf = buf->b_next)
FOR_ALL_BUFFERS(buf)
if ((lnum = buf_delsign(buf, id)) != 0)
update_debug_sign(buf, lnum);
return;

View File

@@ -259,6 +259,9 @@ EX(CMD_catch, "catch", ex_catch,
EX(CMD_cbuffer, "cbuffer", ex_cbuffer,
BANG|RANGE|NOTADR|WORD1|TRLBAR,
ADDR_LINES),
EX(CMD_cbottom, "cbottom", ex_cbottom,
TRLBAR,
ADDR_LINES),
EX(CMD_cc, "cc", ex_cc,
RANGE|NOTADR|COUNT|TRLBAR|BANG,
ADDR_LINES),
@@ -307,6 +310,9 @@ EX(CMD_checkpath, "checkpath", ex_checkpath,
EX(CMD_checktime, "checktime", ex_checktime,
RANGE|NOTADR|BUFNAME|COUNT|EXTRA|TRLBAR,
ADDR_LINES),
EX(CMD_chistory, "chistory", qf_history,
TRLBAR,
ADDR_LINES),
EX(CMD_clist, "clist", qf_list,
BANG|EXTRA|TRLBAR|CMDWIN,
ADDR_LINES),
@@ -316,6 +322,9 @@ EX(CMD_clast, "clast", ex_cc,
EX(CMD_close, "close", ex_close,
BANG|RANGE|NOTADR|COUNT|TRLBAR|CMDWIN,
ADDR_WINDOWS),
EX(CMD_clearjumps, "clearjumps", ex_clearjumps,
TRLBAR|CMDWIN,
ADDR_LINES),
EX(CMD_cmap, "cmap", ex_map,
EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN,
ADDR_LINES),
@@ -718,6 +727,9 @@ EX(CMD_laddfile, "laddfile", ex_cfile,
EX(CMD_later, "later", ex_later,
TRLBAR|EXTRA|NOSPC|CMDWIN,
ADDR_LINES),
EX(CMD_lbottom, "lbottom", ex_cbottom,
TRLBAR,
ADDR_LINES),
EX(CMD_lbuffer, "lbuffer", ex_cbuffer,
BANG|RANGE|NOTADR|WORD1|TRLBAR,
ADDR_LINES),
@@ -775,6 +787,9 @@ EX(CMD_lgrepadd, "lgrepadd", ex_make,
EX(CMD_lhelpgrep, "lhelpgrep", ex_helpgrep,
EXTRA|NOTRLCOM|NEEDARG,
ADDR_LINES),
EX(CMD_lhistory, "lhistory", qf_history,
TRLBAR,
ADDR_LINES),
EX(CMD_ll, "ll", ex_cc,
RANGE|NOTADR|COUNT|TRLBAR|BANG,
ADDR_LINES),

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