Compare commits

...

374 Commits

Author SHA1 Message Date
cea2a15687 patch 8.1.1696: MSVC: link command line is too long
Problem:    MSVC: link command line is too long.
Solution:   Use the @<< mechanism to pass the arguments via a file. (Christian
            Brabandt)
2019-07-15 20:44:57 +02:00
f49a692259 patch 8.1.1695: Windows 10: crash when cursor is at bottom of terminal
Problem:    Windows 10: crash when cursor is at bottom of terminal.
Solution:   Position the cursor before resizing. (Yasuhiro Matsumoto,
            closes #4679)
2019-07-15 20:37:05 +02:00
41a8260445 patch 8.1.1694: the RUN_VIM variable is longer than needed
Problem:    The RUN_VIM variable is longer than needed.
Solution:   Shorten RUN_VIM. (Daniel Hahler, closes #4643)
2019-07-14 21:54:26 +02:00
f9cc9f209e patch 8.1.1693: syntax coloring and highlighting is in one big file
Problem:    Syntax coloring and highlighting is in one big file.
Solution:   Move the highlighting to a separate file. (Yegappan Lakshmanan,
            closes #4674)
2019-07-14 21:29:22 +02:00
b8be54dcc5 patch 8.1.1692: using *{} for literal dict is not backwards compatible
Problem:    Using *{} for literal dict is not backwards compatible. (Yasuhiro
            Matsumoto)
Solution:   Use ~{} instead.
2019-07-14 18:22:59 +02:00
37d9f175a4 patch 8.1.1691: diff test fails on some systems
Problem:    Diff test fails on some systems. (Elimar Riesebieter)
Solution:   Add a term_wait() call.
2019-07-14 17:26:46 +02:00
0346413c24 patch 8.1.1690: default padding for popup window menu is too much
Problem:    Default padding for popup window menu is too much.
Solution:   Only add padding left and right.
2019-07-14 16:28:13 +02:00
660a10ad41 patch 8.1.1689: profiling code is spread out
Problem:    Profiling code is spread out.
Solution:   Move more profiling code to profiler.c. (Yegappan Lakshmanan,
            closes #4668)
2019-07-14 15:48:38 +02:00
1850b14c0d patch 8.1.1688: old makefiles are no longer useful
Problem:    Old makefiles are no longer useful.
Solution:   Delete the makefiles, they most likely don't work anyway.
2019-07-14 15:09:59 +02:00
ecaa70ea29 patch 8.1.1687: the evalfunc.c file is too big
Problem:    The evalfunc.c file is too big.
Solution:   Move testing support to a separate file.
2019-07-14 14:55:39 +02:00
2898ebb44c patch 8.1.1686: "*" of "*{" is recognized as multipy operator
Problem:    "*" of "*{" is recognized as multipy operator. (Yasuhiro Matsumoto)
Solution:   Check for the "{".
2019-07-14 13:41:34 +02:00
a099da3572 patch 8.1.1685: missing file in distributed file list
Problem:    Missing file in distributed file list.
Solution:   Add profiling.pro
2019-07-13 23:06:26 +02:00
396e829fa3 Update runtime files 2019-07-13 23:04:31 +02:00
fa55cfc69d patch 8.1.1684: profiling functionality is spread out
Problem:    Profiling functionality is spread out.
Solution:   Put profiling functionality in profiling.c. (Yegappan Lakshmanan,
            closes #4666)
2019-07-13 22:59:32 +02:00
d5abb4c877 patch 8.1.1683: dictionary with string keys is longer than needed
Problem:    Dictionary with string keys is longer than needed.
Solution:   Use *{key: val} for literaly keys.
2019-07-13 22:46:10 +02:00
809ce4d317 patch 8.1.1682: placing a larger number of signs is slow
Problem:    Placing a larger number of signs is slow.
Solution:   Add functions for dealing with a list of signs. (Yegappan
            Lakshmanan, closes #4636)
2019-07-13 21:21:40 +02:00
0fb286e82d patch 8.1.1681: insert stray "{" when listener gets buffer line
Problem:    Insert stray "{" when listener gets buffer line. (Paul Jolly)
Solution:   Flush the cached line after invoking listeners. (closes #4455)
2019-07-13 20:14:45 +02:00
63d0dad874 patch 8.1.1680: the command table is not well aligned
Problem:    The command table is not well aligned.
Solution:   Adjust indent.
2019-07-13 18:17:23 +02:00
eaa49e40d7 patch 8.1.1679: test using SwapExists autocommand file may fail
Problem:    Test using SwapExists autocommand file may fail.
Solution:   Remove the SwapExists autocommand.
2019-07-13 18:08:59 +02:00
a901a37bae patch 8.1.1678: using popup_menu() does not scroll to show the selected line
Problem:    When using popup_menu() does not scroll to show the selected line.
Solution:   Scroll the text. (Naruhiko Nishino, closes #4651)
2019-07-13 16:38:50 +02:00
b073da8929 patch 8.1.1677: tests get stuck when running into an existing swapfile
Problem:    Tests get stuck when running into an existing swapfile.
Solution:   Set v:swapchoice to "q" and report an error. (Daniel Hahler,
            closes #4644)
2019-07-13 14:47:26 +02:00
017c269938 patch 8.1.1676: "maxwidth" of popup window does not always work properly
Problem:    "maxwidth" of popup window does not always work properly.
Solution:   Adjust the computation. (Naruhiko Nishino, closes #4653)
2019-07-13 14:17:51 +02:00
7b73f914c4 patch 8.1.1675: listener list not correctly updated on listener_remove()
Problem:    Listener list not correctly updated on listener_remove().
Solution:   Only set "prev" when not removing a listener.  Return one if the
            listener was found and removed.
2019-07-13 13:03:02 +02:00
4e63f9425e patch 8.1.1674: script to check a colorscheme can be improved
Problem:    Script to check a colorscheme can be improved.
Solution:   Match the whole group name. Don't warn for what is usually omitted.
2019-07-12 22:46:47 +02:00
b4f0628fc5 patch 8.1.1673: cannot easily find the popup window at a certain position
Problem:    Cannot easily find the popup window at a certain position.
Solution:   Add popup_locate().
2019-07-12 21:07:54 +02:00
d94ac0caca patch 8.1.1672: "make cmdidxs" doesn't work
Problem:    "make cmdidxs" doesn't work.
Solution:   Update macro names. (Naruhiko Nishino, closes #4660)
2019-07-12 20:24:59 +02:00
b7b9efbccf patch 8.1.1671: copying a blob may result in it being locked
Problem:    Copying a blob may result in it being locked.
Solution:   Reset v_lock. (Ken Takata, closes #4648)
2019-07-12 20:17:03 +02:00
0231f8312b patch 8.1.1670: sign column not always properly aligned
Problem:    Sign column not always properly aligned.
Solution:   Use "col" only after it was calculated. (Yee Cheng Chin,
            closes #4649)
2019-07-12 19:22:22 +02:00
efef9fea72 patch 8.1.1669: Travis: test results section is closed even when failed
Problem:    Travis: test results section is closed even when some tests
            failed.
Solution:   Only close the section on success. (Daniel Hahler, closes #4659)
2019-07-12 18:45:40 +02:00
8ccabf624e patch 8.1.1668: popup window test is a bit flaky on some systems
Problem:    Popup window test is a bit flaky on some systems.
Solution:   Clear the command line. (Naruhiko Nishino, closes #4656)
2019-07-12 18:12:51 +02:00
8071cb2c64 patch 8.1.1667: flags for Ex commands may clash with other symbols
Problem:    Flags for Ex commands may clash with other symbols.
Solution:   Prepend with EX_.
2019-07-12 17:58:01 +02:00
bd42b31780 patch 8.1.1666: click in popup window scrollbar with border doesn't scroll
Problem:    Click in popup window scrollbar with border doesn't scroll.
Solution:   Correct column for the border. (Naruhiko Nishino, closes #4650)
2019-07-12 16:35:34 +02:00
b420747478 patch 8.1.1665: crash when popup window with mask is below the screen
Problem:    Crash when popup window with mask is below the screen.
Solution:   Correct boundary check.
2019-07-12 16:05:45 +02:00
847a5d69a8 patch 8.1.1664: GUI resize may cause changing Rows at a bad time
Problem:    GUI resize may cause changing Rows at a bad time. (Dominique
            Pelle)
Solution:   Postpone resizing while updating the screen.
2019-07-12 15:37:13 +02:00
1072768b91 patch 8.1.1663: compiler warning for using size_t
Problem:    Compiler warning for using size_t.
Solution:   Add type cast. (Mike Williams)
2019-07-12 13:59:20 +02:00
e28cfb2812 patch 8.1.1662: cannot build uninstal.exe with some version of MinGW
Problem:    Cannot build uninstal.exe with some version of MinGW.
Solution:   Add -lole32. (Rene Nyffenegger, closes #4646)
2019-07-11 22:04:21 +02:00
247bf0de46 patch 8.1.1661: cannot build with +textprop but without +balloon_eval
Problem:    Cannot build with +textprop but without +balloon_eval.
Solution:   Adjust #ifdefs. (closes #4645)
2019-07-10 22:21:48 +02:00
7780e5c1c5 patch 8.1.1660: assert_fails() does not fail inside try/catch
Problem:    Assert_fails() does not fail inside try/catch.
Solution:   Set trylevel to zero. (Ozaki Kiichi, closes #4639)
2019-07-10 22:04:48 +02:00
b05caa782d patch 8.1.1659: popup window "mousemoved" values not correct
Problem:    Popup window "mousemoved" values not correct.
Solution:   Convert text column to mouse column.
2019-07-10 21:55:54 +02:00
3b849af90a patch 8.1.1658: debug statements included in patch
Problem:    Debug statements included in patch.
Solution:   Remove the debug statements.
2019-07-10 16:15:04 +02:00
7ba343e634 patch 8.1.1657: Terminal: screen updates from 'balloonexpr' are not displayed
Problem:    Terminal: screen updates from 'balloonexpr' are not displayed.
Solution:   Update the screen if needed.  Fix the word position for
            "mousemoved".
2019-07-09 23:22:15 +02:00
e089c3fd69 patch 8.1.1656: popup window width is wrong when using Tabs
Problem:    Popup window width is wrong when using Tabs. (Paul Jolly)
Solution:   Count tabs correctly. (closes #4637)
2019-07-09 20:25:25 +02:00
3dabd718f4 patch 8.1.1655: popup window border drawn wrong with multi-byte char
Problem:    Popup window border drawn wrong with multi-byte char. (Marcin
            Szamotulski)
Solution:   Correct check in mb_fix_col(). (closes #4635)
2019-07-08 23:30:22 +02:00
8a7383b6d2 patch 8.1.1654: GUI: screen updates from 'balloonexpr' are not displayed
Problem:    GUI: screen updates from 'balloonexpr' are not displayed.
Solution:   Update the screen if needed.  Also avoid the cursor being
            displayed in the wrong position.
2019-07-08 22:23:33 +02:00
0d07155c8b patch 8.1.1653: ubsan warns for possibly passing NULL pointer
Problem:    Ubsan warns for possibly passing NULL pointer.
Solution:   Skip code when length is zero. (Dominique Pelle, closes #4631)
2019-07-08 22:04:03 +02:00
49fe95f225 patch 8.1.1652: GUI: popup window doesn't close on mouse movement
Problem:    GUI: popup window doesn't close on mouse movement. (Paul Jolly)
Solution:   Generate mouse-move events when a popup window is visible.
2019-07-08 21:57:30 +02:00
9992244226 patch 8.1.1651: suspend test is flaky on some systems
Problem:    Suspend test is flaky on some systems.
Solution:   Wait for the shell prompt to show. (Yee Cheng Chin, closes #4632)
2019-07-08 20:58:25 +02:00
ee9e604124 patch 8.1.1650: warning for using uninitialized variable
Problem:    Warning for using uninitialized variable. (Tony Mechelynck)
Solution:   Simplify the code by always using the mouse coordinates.
2019-07-08 20:08:44 +02:00
3e35d05b1f patch 8.1.1649: Illegal memory access when closing popup window
Problem:    Illegal memory access when closing popup window.
Solution:   Get w_next before closing the window.
2019-07-07 20:43:34 +02:00
3f3e954d96 patch 8.1.1648: MS-Windows: build error with normal feaures
Problem:    MS-Windows: build error with normal feaures.
Solution:   Adjust #ifdef for find_word_under_cursor().
2019-07-07 20:30:48 +02:00
d84b2c3d88 patch 8.1.1647: build error with GTK and hangulinput feature
Problem:    Build error with GTK and hangulinput feature, im_get_status()
            defined twice. (Dominique Pelle)
Solution:   Adjust im_get_status(). (closes #4628)
2019-07-07 19:16:58 +02:00
56a6312099 patch 8.1.1646: build failure
Problem:    build failure
Solution:   Add changes to structure.
2019-07-07 18:38:34 +02:00
b3d17a20d2 patch 8.1.1645: cannot use a popup window for a balloon
Problem:    Cannot use a popup window for a balloon.
Solution:   Add popup_beval().  Add the "mousemoved" property.  Add the
            screenpos() function.
2019-07-07 18:28:14 +02:00
5b19e5b919 patch 8.1.1644: sound test does not work on Travis
Problem:    Sound test does not work on Travis.
Solution:   Use "sg" command to enable audio. (Ozaki Kiichi, closes #4624)
2019-07-07 15:12:12 +02:00
899f20deae patch 8.1.1643: sign placement is wrong when 'foldcolumn' is set
Problem:    Sign placement is wrong when 'foldcolumn' is set.
Solution:   Adjust the column computation. (Yee Cheng Chin, closes #4627)
2019-07-07 14:56:25 +02:00
ec572ad6a6 patch 8.1.1642: may use uninitialized variable
Problem:    May use uninitialized variable. (Patrick Palka)
Solution:   Initialize variables earlier. (closes #4623)
2019-07-07 14:26:59 +02:00
6cc7e21412 patch 8.1.1641: garbage collection may run at a wrong moment
Problem:    Garbage collection may run at a wrong moment. (Trygve Aaberge)
Solution:   Postpone garbage collection while parsing messages. (closes #4620)
2019-07-07 14:05:24 +02:00
c2f5054be9 patch 8.1.1640: the CursorHold autocommand takes down a balloon
Problem:    The CursorHold autocommand takes down a balloon. (Paul Jolly)
Solution:   Ignore the CursorHold pseudo-key.
2019-07-05 23:24:56 +02:00
28fc247f8d patch 8.1.1639: changing an autoload name into a file name is inefficient
Problem:    Changing an autoload name into a script file name is inefficient.
Solution:   Remember the last replaced #. (Ozaki Kiichi, closes #4618)
2019-07-05 22:14:16 +02:00
3940ec6d41 patch 8.1.1638: running tests leaves some files behind
Problem:    Running tests leaves some files behind.
Solution:   Delete the files. (Ozaki Kiichi, closes #4617)
2019-07-05 21:53:24 +02:00
4f5b0e5355 patch 8.1.1637: after running tests and clean the XfakeHOME directory remains
Problem:    After running tests and clean the XfakeHOME directory remains.
Solution:   Use "rm -rf". (Hirohito Higashi)
2019-07-05 20:43:52 +02:00
437a746b4c patch 8.1.1636: crash when popup has fitting scrollbar
Problem:    Crash when popup has fitting scrollbar. (Trygve Aaberge)
Solution:   Don't divide by zero if the scrollbar just fits. (closes #4615)
2019-07-05 20:17:22 +02:00
b4d9b893d3 patch 8.1.1635: warnings for unused variables in small version
Problem:    Warnings for unused variables in small version. (John Marriott)
Solution:   Adjust #ifdefs.
2019-07-04 22:59:06 +02:00
981d9dc8f3 patch 8.1.1634: terminal test fails when term_getansicolors() is missing
Problem:    Terminal test fails when term_getansicolors() is missing.
            Diff test fails without +rightleft.  (Dominique Pelle)
Solution:   Check if term_getansicolors() is supported. (closes #4597)
2019-07-04 22:32:39 +02:00
b7ed839976 patch 8.1.1633: cannot generate prototypes with X11 but without GUI
Problem:    Cannot generate prototypes with X11 but without GUI.
Solution:   Include X11/Intrinsic.h.
2019-07-04 21:24:34 +02:00
48ac671fe5 patch 8.1.1632: build with EXITFREE but without +arabic fails
Problem:    Build with EXITFREE but without +arabic fails.
Solution:   Rename the function and adjust #ifdefs. (closes #4613)
2019-07-04 20:26:21 +02:00
4e038571aa patch 8.1.1631: displaying signs is inefficient
Problem:    Displaying signs is inefficient.
Solution:   Avoid making multiple calls to get information about a placed
            sign. (Yegappan Lakshmanan, closes #4586)
2019-07-04 18:28:35 +02:00
e809a4ed30 patch 8.1.1630: various small problems
Problem:    Various small problems.
Solution:   Various small improvements.
2019-07-04 17:35:05 +02:00
790c18bfa5 Update runtime files 2019-07-04 17:22:06 +02:00
6bf2c6264b patch 8.1.1629: terminal function help is in the wrong file
Problem:    Terminal function help is in the wrong file.
Solution:   Move the function details to terminal.txt.
2019-07-04 17:12:09 +02:00
931a277145 patch 8.1.1628: popup window functions not in list of functions
Problem:    Popup window functions not in list of functions.
Solution:   Add popup window functins to the list of functions.  Reorganise
            the popup window help.
2019-07-04 16:54:54 +02:00
6cb39f924a patch 8.1.1627: header file contains mixed comment style
Problem:    Header file contains mixed comment style.
Solution:   Use // style comments.
2019-07-04 16:05:14 +02:00
5ca1ac373a patch 8.1.1626: no test for closing a popup window with a modified buffer
Problem:    No test for closing a popup window with a modified buffer.
Solution:   Add a test.  Add "popups" to getbufinfo().
2019-07-04 15:39:28 +02:00
bc2cfe4672 patch 8.1.1625: script line numbers are not exactly right
Problem:    Script line numbers are not exactly right.
Solution:   Handle heredoc and continuation lines better. (Ozaki Kiichi,
            closes #4611, closes #4511)
2019-07-04 14:57:12 +02:00
0d702028fe patch 8.1.1624: when testing in the GUI may try to run gvim in a terminal
Problem:    When testing in the GUI may try to run gvim in a terminal.
Solution:   Add the -v argument. (Yee Cheng Chin, closes #4605)  Don't skip
            tests that work now.
2019-07-04 14:20:41 +02:00
e4b407f536 patch 8.1.1623: display wrong with signs in narrow number column
Problem:    Display wrong with signs in narrow number column.
Solution:   Increase the numbercolumn width if needed. (Yegappan Lakshmanan,
            closes #4606)
2019-07-04 11:59:28 +02:00
e296e3177b patch 8.1.1622: wrong width if displaying a lot of lines in a popup window
Problem:    Wrong width if displaying a lot of lines in a popup window.
Solution:   Accurately compute the line overflow.
2019-07-03 23:20:18 +02:00
80edda1cf5 patch 8.1.1621: Amiga: time.h included twice
Problem:    Amiga: time.h included twice.
Solution:   Remove include from evalfunc.c, move outside of #ifdef in
            os_amiga.h. (Ola Söder, closes #4607)
2019-07-03 22:53:06 +02:00
ba45f1f4fb patch 8.1.1620: no test for popup window with border and mask
Problem:    No test for popup window with border and mask.
Solution:   Add this popup window, fix problems.
2019-07-03 22:50:41 +02:00
435f9f06ca patch 8.1.1619: tests are not run with GUI on Travis
Problem:    Tests are not run with GUI on Travis.
Solution:   Add a testgui job. (Ozaki Kiichi, closes #4609)
2019-07-03 21:40:16 +02:00
9ee3d161f7 patch 8.1.1618: Amiga-like systems quickly run out of stack
Problem:    Amiga-like systems quickly run out of stack.
Solution:   Reserve a Megabyte stack. (Ola Söder, closes #4608)
2019-07-02 23:22:43 +02:00
d529ba58dc patch 8.1.1617: no test for popup window with mask and position fixed
Problem:    No test for popup window with mask and position fixed.
Solution:   Add a couple of screenshots.  Fix deteced problems.
2019-07-02 23:13:53 +02:00
8531dc66e8 patch 8.1.1616: build failure with gcc on Amiga
Problem:    Build failure with gcc on Amiga.
Solution:   Add missing header includes. (Ola Söder, closes #4603)
2019-07-01 22:28:20 +02:00
7866b87958 patch 8.1.1615: crash when passing buffer number to popup_create()
Problem:    Crash when passing buffer number to popup_create(). (Yasuhiro
            Matsumoto)
Solution:   Initialze the window properly.
2019-07-01 22:21:01 +02:00
f8a0712655 patch 8.1.1614: 'numberwidth' can only go up to 10
Problem:    'numberwidth' can only go up to 10.
Solution:   Allow up to 20. (Charlie Stanton, closes #4584)
2019-07-01 22:06:07 +02:00
a83e70000f patch 8.1.1613: popup window test fails with Athena and Motif
Problem:    Popup window test fails with Athena and Motif.
Solution:   Compute the highlight attribut when the GUI is not active.
2019-07-01 21:47:35 +02:00
5b8cfedfbd patch 8.1.1612: cannot show an existing buffer in a popup window
Problem:    Cannot show an existing buffer in a popup window.
Solution:   Support buffer number argument in popup_create().
2019-06-30 22:16:10 +02:00
892ae723ab patch 8.1.1611: bufadd() reuses existing buffer without a name
Problem:    Bufadd() reuses existing buffer without a name.
Solution:   When the name is empty always create a new buffer.
2019-06-30 20:33:01 +02:00
15e248e37f patch 8.1.1610: there is no way to add or load a buffer without side effects
Problem:    There is no way to add or load a buffer without side effects.
Solution:   Add the bufadd() and bufload() functions.
2019-06-30 20:21:37 +02:00
2e62b568e9 patch 8.1.1609: the user cannot easily close a popup window
Problem:    The user cannot easily close a popup window.
Solution:   Add the "close" property. (mostly by Masato Nishihata,
            closes #4601)
2019-06-30 18:07:00 +02:00
b60d8514b8 patch 8.1.1608: the evalfunc.c file is too big
Problem:    The evalfunc.c file is too big.
Solution:   Move sign functionality to sign.c.
2019-06-29 07:59:04 +02:00
f9c85f580b patch 8.1.1608: the evalfunc.c file is too big
Problem:    The evalfunc.c file is too big.
Solution:   Move sign functionality to sign.c.
2019-06-29 07:41:35 +02:00
548be7f126 patch 8.1.1606: on a narrow screen ":hi" output is confusing
Problem:    On a narrow screen ":hi" output is confusing.
Solution:   Insert a space between highlight group name and "xxx". (Masato
            Nishihaga, closes #4599)
2019-06-29 03:42:42 +02:00
4340fc95d5 patch 8.1.1605: Vim may delay processing messages on a json channel
Problem:    Vim may delay processing messages on a json channel. (Pontus
            Leitzler)
Solution:   Try parsing json when checking if there is readahead.
2019-06-28 22:06:49 +02:00
13b47c37a6 patch 8.1.1604: popup window scroll test is flaky
Problem:    Popup window scroll test is flaky.
Solution:   Add a delay between scroll events.
2019-06-28 21:55:48 +02:00
d74af4227b patch 8.1.1603: crash when using unknown highlighting in text property
Problem:    Crash when using unknown highlighting in text property.
Solution:   Check for zero highlight ID.
2019-06-28 21:38:00 +02:00
711d02c96d patch 8.1.1602: popup window cannot overflow on the left or right
Problem:    Popup window cannot overflow on the left or right.
Solution:   Only set the "fixed" option when it is in the dict. Set w_leftcol
            to allow for the popup overflowing on the left and use it when
            applying the mask.
2019-06-28 04:06:50 +02:00
8da4181631 patch 8.1.1601: missing changes to popup window test file
Problem:    Missing changes to popup window test file.
Solution:   Add those changes.
2019-06-26 18:04:54 +02:00
4cd583c6da patch 8.1.1600: cannot specify highlighting for popup window scrollbar
Problem:    Cannot specify highlighting for popup window scrollbar.
Solution:   Add "scrollbarhighlight" and "thumbhighlight" options.
2019-06-26 05:13:57 +02:00
6efd76ae4a patch 8.1.1599: compiler warning for uninitialized variable
Problem:    Compiler warning for uninitialized variable. (Tony Mechelynck)
Solution:   Add a dummy assignment.
2019-06-26 04:06:57 +02:00
53a95d6584 patch 8.1.1598: update to test file missing
Problem:    Update to test file missing.
Solution:   Update the popup window test file.
2019-06-26 03:54:08 +02:00
68acb41f99 patch 8.1.1597: cannot scroll a popup window with the mouse
Problem:    Cannot scroll a popup window with the mouse.
Solution:   If the popup window has a scrollbar let the mouse scroll wheel
            scroll the window.
2019-06-26 03:40:36 +02:00
c2a4316500 patch 8.1.1596: when resizing the screen may draw popup in wrong position
Problem:    When resizing the screen may draw popup in wrong position. (Masato
            Nishihata)
Solution:   Check the popup is not outside of the screen. (fixes #4592)
2019-06-26 01:03:53 +02:00
88c47aa692 patch 8.1.1595: MS-Windows with VIMDLL: colors wrong in console
Problem:    MS-Windows with VIMDLL: colors wrong in console.
Solution:   Do not set the GUI colors when not using the GUI. (Ken Takata,
            closes #4588)
2019-06-26 00:34:15 +02:00
2eed9bafa0 patch 8.1.1594: may still start file dialog while exiting
Problem:    May still start file dialog while exiting.
Solution:   Ignore the "browse" modifier in another place when exiiting.
            (Ozaki Kiichi, closes #4582)
2019-06-25 23:40:29 +02:00
6a7af8e2db patch 8.1.1593: filetype not detected for C++ header files without extension
Problem:    Filetype not detected for C++ header files without extension.
Solution:   Recognize the file by the Emacs file mode. (Dmitry Ilyin,
            closes #4593)
2019-06-25 21:34:26 +02:00
5c381eb9e7 patch 8.1.1592: may start file dialog while exiting
Problem:    May start file dialog while exiting.
Solution:   Ignore the "browse" modifier when exiting. (Ozaki Kiichi,
            closes #4582
2019-06-25 06:50:31 +02:00
7d491c4253 patch 8.1.1591: on error garbage collection may free memory in use
Problem:    On error garbage collection may free memory in use.
Solution:   Reset may_garbage_collect when evaluating expression mapping.
            Add tests. (Ozaki Kiichi, closes #4579)
2019-06-25 06:28:02 +02:00
6c6a603cd2 patch 8.1.1590: popup window test fails
Problem:    Popup window test fails.
Solution:   Add "scrollbar" to expected result.
2019-06-25 05:33:36 +02:00
75fb0854e9 patch 8.1.1589: popup window does not indicate scroll position
Problem:    Popup window does not indicate scroll position.
Solution:   Add a scrollbar.
2019-06-25 05:15:58 +02:00
e96a2498f9 patch 8.1.1588: in :let-heredoc line continuation is recognized
Problem:    In :let-heredoc line continuation is recognized.
Solution:   Do not consume line continuation. (Ozaki Kiichi, closes #4580)
2019-06-25 04:12:16 +02:00
2b044ffb5a patch 8.1.1587: redraw problem when sign icons in the number column
Problem:    Redraw problem when sign icons in the number column.
Solution:   Clear and redraw when changing related options.  Right aligh the
            sign icon in the GUI. (Yegappan Lakshmanan, closes #4578)
2019-06-24 05:45:14 +02:00
b2cda0dd1d patch 8.1.1586: error number used in two places
Problem:    Error number used in two places.
Solution:   Renumber one. (Ken Takata)
2019-06-24 05:06:36 +02:00
e7eb92708e patch 8.1.1585: :let-heredoc does not trim enough
Problem:    :let-heredoc does not trim enough.
Solution:   Trim indent from the contents based on the indent of the first
            line.  Use let-heredoc in more tests.
2019-06-24 00:58:07 +02:00
0a1f56fcfe patch 8.1.1584: the evalfunc.c file is getting too big
Problem:    The evalfunc.c file is getting too big.
Solution:   Move channel and job related functions to channel.c.
2019-06-24 00:43:35 +02:00
7be3ab2589 patch 8.1.1583: set_ref_in_list() only sets ref in items
Problem:    Set_ref_in_list() only sets ref in items.
Solution:   Rename to set_ref_in_list_items() to avoid confusion.
2019-06-23 01:46:15 +02:00
0fcf26ba4f patch 8.1.1582: cannot build with +textprop but without +timers
Problem:    Cannot build with +textprop but without +timers.
Solution:   Add #ifdef. (Ola Söder, closes #4574)
2019-06-23 01:03:51 +02:00
7a39dd7f00 patch 8.1.1581: shared functions for testing are disorganised
Problem:    Shared functions for testing are disorganised.
Solution:   Group finctions in script files. (Ozaki Kiichi, closes #4573)
2019-06-23 00:50:15 +02:00
c662ec9978 patch 8.1.1580: cannot make part of a popup transparent
Problem:    Cannot make part of a popup transparent.
Solution:   Add the "mask" option.
2019-06-23 00:15:57 +02:00
6c1e1570b1 Update runtime files 2019-06-22 02:13:00 +02:00
adc6714aac patch 8.1.1579: dict and list could be GC'ed while displaying error
Problem:    Dict and list could be GC'ed while displaying error in a timer.
            (Yasuhiro Matsumoto)
Solution:   Block garbage collection when executing a timer.  Add
            test_garbagecollect_soon(). Add "no_wait_return" to
            test_override(). (closes #4571)
2019-06-22 01:40:42 +02:00
dfc1455728 patch 8.1.1578: MS-Windows: pathdef.c should depend on build options
Problem:    MS-Windows: pathdef.c should depend on build options.
Solution:   Generate pathdef.c in the object directory.  Fix dependencies.
            (Ken Takata, closes #4565)
2019-06-21 17:36:10 +02:00
693f7dc818 patch 8.1.1577: command line redrawn for +arabic without Arabic characters
Problem:    Command line redrawn for +arabic without Arabic characters.
            (Dominique Pelle)
Solution:   Check if there actually are any Arabic characters.  Do redraw
            after displaying incsearch. (closes #4569)
2019-06-21 02:30:38 +02:00
405bb42734 patch 8.1.1576: compiler warning for unused argument
Problem:    Compiler warning for unused argument.
Solution:   Add "UNUSED" annotation. (Dominique Pelle, closes #4570)
2019-06-21 00:12:29 +02:00
75a1a9415b patch 8.1.1575: callbacks may be garbage collected
Problem:    Callbacks may be garbage collected.
Solution:   Set reference in callbacks. (Ozaki Kiichi, closes #4564)
2019-06-20 03:45:36 +02:00
a3fce62c91 patch 8.1.1574: tabpage option not yet implemented for popup window
Problem:    Tabpage option not yet implemented for popup window.
Solution:   Implement tabpage option, also for popup_getoptions().
2019-06-20 02:31:49 +02:00
37e66cf0f6 patch 8.1.1573: textprop test fails if screenhots do not work
Problem:    Textprop test fails if screenhots do not work.
Solution:   Add check for screenhots working.
2019-06-19 18:16:10 +02:00
e9726e31fe patch 8.1.1572: compiler warnings with tiny build
Problem:    Compiler warnings with tiny build. (Tony Mechelynck)
Solution:   Add #ifdef.
2019-06-19 18:01:21 +02:00
a956bf6ca3 patch 8.1.1571: textprop highlight starts too early if just after a tab
Problem:    textprop highlight starts too early if just after a tab.
Solution:   Check if still drawing a previous character. (closes #4558)
2019-06-19 17:34:24 +02:00
4dff4aed09 patch 8.1.1570: icon signs not displayed properly in the number column
Problem:    Icon signs not displayed properly in the number column.
Solution:   Display them properly. (Yegappan Lakshmanan, closes #4559)
2019-06-19 16:31:28 +02:00
bf8c3adef2 patch 8.1.1569: cannot build with signs but without diff feature
Problem:    Cannot build with signs but without diff feature.
Solution:   Move #ifdef. (Tom Ryder)
2019-06-19 14:28:43 +02:00
87652a7e3b patch 8.1.1568: strftime() test fails on MS-Windows
Problem:    Strftime() test fails on MS-Windows.
Solution:   Skip the check for using the $TZ environment variable.
2019-06-18 23:07:37 +02:00
db51730df1 patch 8.1.1567: localtime_r() does not respond to $TZ changes
Problem:    Localtime_r() does not respond to $TZ changes.
Solution:   If $TZ changes then call tzset(). (Tom Ryder)
2019-06-18 22:53:24 +02:00
517f71ab17 patch 8.1.1566: error message when terminal closes in another tab
Problem:    Error message when terminal closes while it is not in the current
            tab.
Solution:   Also set "do_set_w_closing" when using the special autocommand
            window. (closes #4552)
2019-06-17 22:40:41 +02:00
9b283523f2 patch 8.1.1565: MS-Windows: no sound support
Problem:    MS-Windows: no sound support.
Solution:   Add sound support for MS-Windows. (Yasuhiro Matsumoto, Ken Takata,
            closes #4522)
2019-06-17 22:19:33 +02:00
394c5d8870 patch 8.1.1564: sign column takes up space
Problem:    Sign column takes up space.  (Adam Stankiewicz)
Solution:   Optionally put signs in the number column. (Yegappan Lakshmanan,
            closes #4555, closes #4515)
2019-06-17 21:48:05 +02:00
6e5000d493 patch 8.1.1563: crash when using closures
Problem:    Crash when using closures.
Solution:   Set reference in varlist of funccal when running the garbage
            collector. (Ozaki Kiichi, closes #4554, closes #4547)
2019-06-17 21:18:41 +02:00
ad24a71e22 patch 8.1.1562: popup window not always redrawn after popup_setoptions()
Problem:    Popup window not always redrawn after popup_setoptions().
Solution:   Force a redraw.
2019-06-17 20:05:45 +02:00
ae943150d3 patch 8.1.1561: popup_setoptions() is not implemented yet
Problem:    Popup_setoptions() is not implemented yet.
Solution:   Implement popup_setoptions().  Also add more fields to
            popup_getoptions().
2019-06-16 22:54:14 +02:00
6313c4f41d patch 8.1.1560: popup window hidden option not implemented yet
Problem:    Popup window hidden option not implemented yet.
Solution:   Implement the hidden option.
2019-06-16 20:39:13 +02:00
eb2310d47d patch 8.1.1559: popup window title property not implemented yet
Problem:    Popup window title property not implemented yet.
Solution:   Implement the title property.
2019-06-16 20:09:10 +02:00
a730e55cc2 patch 8.1.1558: popup_menu() and popup_filter_menu() are not implemented yet
Problem:    Popup_menu() and popup_filter_menu() are not implemented yet.
Solution:   Implement the functions. Fix that centering didn't take the border
            and padding into account.
2019-06-16 19:05:31 +02:00
983f2f1403 patch 8.1.1557: compiler warning for unused variables in tiny version
Problem:    Compiler warning for unused variables in tiny version. (Tony
            Mechelynck)
Solution:   Add #ifdef.
2019-06-16 16:41:41 +02:00
8a5c7ef9bb patch 8.1.1556: command for failing screenshot does not include directory
Problem:    The command displayed to show a failing screenshot does not include
            the "testdir" directory.
Solution:   Prefix the directory name so that it can be copy-pasted.
2019-06-16 16:14:20 +02:00
8cdbd5b3c4 patch 8.1.1555: NOT_IN_POPUP_WINDOW is confusing
Problem:    NOT_IN_POPUP_WINDOW is confusing. (Andy Massimino)
Solution:   Rename to ERROR_IF_POPUP_WINDOW().
2019-06-16 15:50:45 +02:00
1c196e7b17 patch 8.1.1554: docs and tests for :const can be improved
Problem:    Docs and tests for :const can be improved.
Solution:   Improve documentation, add a few more tests. (Ryuichi Hayashida,
            closes #4551)
2019-06-16 15:41:58 +02:00
dc2ce58b5a patch 8.1.1553: not easy to change the text in a popup window
Problem:    Not easy to change the text in a popup window.
Solution:   Add popup_settext(). (Ben Jackson, closes #4549)
            Also display a space for an empty popup.
2019-06-16 15:32:14 +02:00
f85e40afc2 patch 8.1.1552: cursor position is wrong after sign column changes
Problem:    Cursor position is wrong after sign column appears or disappears.
            (Yegappan Lakshmanan)
Solution:   Call changed_line_abv_curs() instead of changed_cline_bef_curs().
2019-06-16 13:55:40 +02:00
6c17543b56 patch 8.1.1551: warning for shadowing popup_dragwin
Problem:    Warning for shadowing popup_dragwin. (Dominique Pelle)
Solution:   Add missing change.
2019-06-15 23:10:30 +02:00
51c3131040 patch 8.1.1550: when a popup has left padding text may be cut off
Problem:    When a popup has left padding text may be cut off.
Solution:   Add the border and padding when computing the size.
2019-06-15 22:27:23 +02:00
61eeeea8e6 patch 8.1.1549: quickfix test fails
Problem:    Quickfix test fails.
Solution:   Negate result of bt_quickfix().
2019-06-15 21:56:17 +02:00
a42d945efc patch 8.1.1548: popup_dialog() is not implemented
Problem:    Popup_dialog() is not implemented.
Solution:   Implement popup_dialog() and popup_filter_yesno().
2019-06-15 21:46:30 +02:00
26910de8b0 patch 8.1.1547: functionality of bt_nofile() is confusing
Problem:    Functionality of bt_nofile() is confusing.
Solution:   Split into bt_nofile() and bt_nofilename().
2019-06-15 19:37:15 +02:00
0331faf712 patch 8.1.1546: in some tests 'tags' is set but not restored
Problem:    In some tests 'tags' is set but not restored. (Daniel Hahler)
Solution:   Restore 'tags'. (closes #4535)
2019-06-15 18:40:37 +02:00
45aa07d3c1 patch 8.1.1545: when the screen is to small there is no message about that
Problem:    When the screen is to small there is no message about that.
            (Daniel Hahler)
Solution:   Do not use :cquit. (closes #4534)
2019-06-15 18:20:38 +02:00
b46fecd345 patch 8.1.1544: some balloon tests don't run when they can
Problem:    Some balloon tests don't run when they can.
Solution:   Split GUI balloon tests off into a separate file. (Ozaki Kiichi,
            closes #4538)  Change the feature check into a command for
            consistency.
2019-06-15 17:58:09 +02:00
b6e3b88ec8 patch 8.1.1543: const test fails with small features
Problem:    Const test fails with small features.
Solution:   Don't unlet non-existing variables.
2019-06-15 17:50:57 +02:00
d7c9687947 patch 8.1.1542: an OptionSet autocommand does not get enough info
Problem:    An OptionSet autocommand does not get enough info.
Solution:   Add v:option_command, v:option_oldlocal and v:option_oldglobal.
            (Latrice Wilgus, closes #4118)
2019-06-15 17:12:48 +02:00
bffc50494d patch 8.1.1541: check for ASAN is not reliable
Problem:    Check for ASAN is not reliable.
Solution:   Check the version output. (Dominique Pelle, closes #4543)
2019-06-15 16:34:21 +02:00
0abb4273f6 patch 8.1.1540: cannot build without the +eval feature
Problem:    Cannot build without the +eval feature.
Solution:   Define ex_const if needed.
2019-06-15 16:06:00 +02:00
9937a05543 patch 8.1.1539: not easy to define a variable and lock it
Problem:    Not easy to define a variable and lock it.
Solution:   Add ":const".
2019-06-15 15:45:06 +02:00
dfa97f2aed patch 8.1.1538: cannot specify highlighting for notifications
Problem:    Cannot specify highlighting for notifications.
Solution:   Use the PopupNotification group if it exists. Add a minimal width
            to notifications.
2019-06-15 14:31:55 +02:00
fc06cbbf86 patch 8.1.1537: using "tab" for popup window can be confusing
Problem:    Using "tab" for popup window can be confusing.
Solution:   Use "tabpage". (Hirohito Higashi, closes #4532)
2019-06-15 14:14:31 +02:00
1755ec4278 patch 8.1.1536: popup select test still fails on Mac
Problem:    Popup select test still fails on Mac.
Solution:   Set 'clipboard' to "autoselect"
2019-06-15 13:13:54 +02:00
650a63748c patch 8.1.1535: popup select test fails on Mac
Problem:    Popup select test fails on Mac.
Solution:   Skip test if clipboard feature not available.
2019-06-15 00:29:33 +02:00
bd75b5333d patch 8.1.1534: modeless selection in popup window selects too much
Problem:    Modeless selection in popup window selects too much.
Solution:   Restrict the selection to insde of the popup window.
2019-06-14 23:41:55 +02:00
2fc39aeeb5 patch 8.1.1533: GUI build fails on Mac
Problem:    GUI build fails on Mac.
Solution:   Change VimClipboard type in non-C file.
2019-06-14 23:27:29 +02:00
d2cea96f6c patch 8.1.1532: build fails
Problem:    Build fails.
Solution:   Add missing changes.
2019-06-14 23:14:45 +02:00
0554fa478d patch 8.1.1531: clipboard type name is inconsistent
Problem:    Clipboard type name is inconsistent.
Solution:   Rename VimClipboard to Clipboard_T.
2019-06-14 21:36:54 +02:00
f42397c395 patch 8.1.1530: Travis config is not optimal
Problem:    Travis config is not optimal.
Solution:   Remove system conditions.  Do not use excluding matrix. Cache OSX
            results. (Ozaki Kiichi, closes #4521)
2019-06-14 20:47:49 +02:00
21606676d9 patch 8.1.1529: libcanberra is linked with even when not used
Problem:    Libcanberra is linked with even when not used.
Solution:   Have configure check for libcanberra only when wanted.
            (suggestions by Libor Bukata)
2019-06-14 20:40:58 +02:00
b4086ffa32 patch 8.1.1528: popup_any_visible() is unused
Problem:    Popup_any_visible() is unused.
Solution:   Remove it.
2019-06-14 20:00:48 +02:00
a540f8aa3b patch 8.1.1527: when moving popup window over the cmdline it is not redrawn
Problem:    When moving a popup window over the command line it is not
            redrawn.
Solution:   Redraw the command line. Move popup redrawing code to the popupwin
            file.
2019-06-14 19:23:57 +02:00
37df9a4401 patch 8.1.1526: no numerical value for the patchlevel
Problem:    No numerical value for the patchlevel.
Solution:   Add v:versionlong.
2019-06-14 14:39:51 +02:00
b53fb31a1e patch 8.1.1525: cannot move a popup window with the mouse
Problem:    Cannot move a popup window with the mouse.
Solution:   Add the "drag" property and make it possible to drag a popup
            window by its border.
2019-06-13 23:59:52 +02:00
b0f94c1ff3 patch 8.1.1524: tests are silently skipped
Problem:    Tests are silently skipped.
Solution:   Throw an exception for skipped tests in more places.
2019-06-13 22:19:53 +02:00
8d24104031 patch 8.1.1523: cannot show range of buffer lines in popup window
Problem:    Cannot show range of buffer lines in popup window.
Solution:   Add the "firstline" property. (closes #4523)
2019-06-12 23:40:01 +02:00
68d48f40a4 patch 8.1.1522: poup_notification() not implemented yet
Problem:    Popup_notification() not implemented yet.
Solution:   Implement it.
2019-06-12 22:42:41 +02:00
7c7f01e2b2 patch 8.1.1521: when a popup window is closed the buffer remains
Problem:    When a popup window is closed the buffer remains.
Solution:   Wipe out the buffer.
2019-06-12 21:06:32 +02:00
451d4b5b7c patch 8.1.1520: popup windows are ignored when dealing with mouse position
Problem:    Popup windows are ignored when dealing with mouse position
Solution:   Find the mouse position inside a popup window.  Allow for modeless
            selection.
2019-06-12 20:22:27 +02:00
06e2c81f6d patch 8.1.1519: 'backupskip' may contain duplicates
Problem:    'backupskip' may contain duplicates.
Solution:   Add the P_NODUP flag. (Tom Ryder)
2019-06-12 19:05:48 +02:00
202d982b36 patch 8.1.1518: crash when setting 'columns' while a popup is visible
Problem:    Crash when setting 'columns' while a popup is visible.
Solution:   Recompute all positions when clearing the screen. (closes #4467)
2019-06-11 21:56:30 +02:00
12ee7ff00b Update runtime files 2019-06-10 22:47:40 +02:00
4c063a0dab patch 8.1.1517: when a popup changes all windows are redrawn
Problem:    When a popup changes all windows are redrawn.
Solution:   Only update the lines that were affected.  Add a file for
            profiling popup windows efficiency.
2019-06-10 21:24:12 +02:00
640d4f0c97 patch 8.1.1516: time reported for a test measured wrong
Problem:    Time reported for a test measured wrong.
Solution:   Move the computation to the end of RunTheTest(). (Ozaki Kiichi,
            closes #4520)
2019-06-10 17:43:46 +02:00
82febc16e4 patch 8.1.1515: memory leak reported for sound when build with EXITFREE
Problem:    Memory leak reported for sound when build with EXITFREE.
Solution:   Free sound stuff when exiting.
2019-06-10 14:48:59 +02:00
01257a7a8e patch 8.1.1514: MS-Windows: wrong shell command with ! in 'guioptions'
Problem:    MS-Windows: wrong shell command with ! in 'guioptions'.
Solution:   Do not check for ! in 'guioptions' when applying 'shellxquote'.
            (Yasuhiro Matsumoto, closes #4519)
2019-06-10 14:46:04 +02:00
3ff5f0f05d patch 8.1.1513: all popup functionality is in functions, except :popupclear
Problem:    All popup functionality is in functions, except :popupclear.
Solution:   Add popup_clear() for consistency.  Also rename sound_stopall() to
            sound_clear().
2019-06-10 13:11:22 +02:00
38ea784fec patch 8.1.1512: ch_evalexpr() hangs when used recursively
Problem:    ch_evalexpr() hangs when used recursively. (Paul Jolly)
Solution:   Change ch_block_id from a single number to a list of IDs to wait
            on.
2019-06-09 19:51:58 +02:00
ac2450a9a8 patch 8.1.1511: matches in a popup window are not displayed properly
Problem:    Matches in a popup window are not displayed properly.
Solution:   Do display matches in a popup window. (closes #4517)
2019-06-09 18:04:28 +02:00
80dad48c50 patch 8.1.1510: a plugin cannot easily expand a command like done internally
Problem:    A plugin cannot easily expand a command like done internally.
Solution:   Add the expandcmd() function. (Yegappan Lakshmanan, closes #4514)
2019-06-09 17:22:31 +02:00
954bb06363 patch 8.1.1509: cmdline_row can become negative, causing a crash
Problem:    Cmdline_row can become negative, causing a crash.
Solution:   Make sure cmdline_row does not become negagive. (closes #4102)
2019-06-09 16:40:46 +02:00
541faf7a73 patch 8.1.1508: sound keeps failing on Travis
Problem:    Sound keeps failing on Travis.
Solution:   Throw a skipped exception in the test.
2019-06-09 15:35:41 +02:00
a90998d93a patch 8.1.1507: sound test still fails on Travis
Problem:    Sound test still fails on Travis.
Solution:   Try another dummy sound approach.
2019-06-09 15:21:27 +02:00
b29cfb8c28 patch 8.1.1506: syntax error in Travis config
Problem:    Syntax error in Travis config.
Solution:   Set AUDIODEV in another section.
2019-06-09 14:51:30 +02:00
8ed75cb0b4 patch 8.1.1505: running "make clean" twice gives errors
Problem:    Running "make clean" twice gives errors.
Solution:   Add "-f" to "rm". (closes #4516)
2019-06-09 14:39:13 +02:00
ef23c527bd patch 8.1.1504: sound test still fails on Travis
Problem:    Sound test still fails on Travis.
Solution:   Add more lines to the install section.
2019-06-09 14:15:29 +02:00
ffa60dda0a patch 8.1.1503: sound test fails on Travis
Problem:    Sound test fails on Travis.
Solution:   Set AUDIODEV to "null".
2019-06-09 13:56:27 +02:00
427f5b66ce patch 8.1.1502: cannot play any sound
Problem:    Cannot play any sound.
Solution:   Use libcanberra if available.  Add sound functions.
2019-06-09 13:43:51 +02:00
260addf795 patch 8.1.1501: new behavior of b:changedtick not tested
Problem:    New behavior of b:changedtick not tested.
Solution:   Add a few test cases. (Daniel Hahler)
2019-06-08 20:48:36 +02:00
21f8d93c71 patch 8.1.1500: wrong shell command when building with VIMDLL and "!" in 'go'
Problem:    Wrong shell command when building with VIMDLL and "!" in
            'guioptions'.
Solution:   Add check for GUI in use. (Ken Takata)
2019-06-08 20:17:18 +02:00
24a5ac5d4d patch 8.1.1499: ruler not updated after popup window was removed
Problem:    Ruler not updated after popup window was removed.
Solution:   use popup_mask in screen_puts().
2019-06-08 19:01:18 +02:00
c024b46678 patch 8.1.1498: ":write" increments b:changedtick even though nothing changed
Problem:    ":write" increments b:changedtick even though nothing changed.
            (Daniel Hahler)
Solution:   Only increment b:changedtick if the modified flag is reset.
2019-06-08 18:07:21 +02:00
aef5c62a6f patch 8.1.1497: accessing memory beyond allocated space
Problem:    Accessing memory beyond allocated space.
Solution:   Check column before accessing popup mask.
2019-06-08 17:25:33 +02:00
acc682bd7c patch 8.1.1496: popup window height is not recomputed
Problem:    Popup window height is not recomputed.
Solution:   Recompute the height when needed.
2019-06-08 17:15:51 +02:00
1748c7f77e patch 8.1.1495: memory access error
Problem:    Memory access error.
Solution:   Use the correct size for clearing the popup mask.
2019-06-08 16:55:15 +02:00
6c009a3974 patch 8.1.1494: build failure
Problem:    Build failure.
Solution:   Add missing changes.
2019-06-08 16:06:28 +02:00
33796b39b9 patch 8.1.1493: redrawing with popups is slow and causes flicker
Problem:    Redrawing with popups is slow and causes flicker.
Solution:   Avoid clearing and redrawing using a zindex mask.
2019-06-08 16:01:13 +02:00
7c348bb5ad patch 8.1.1492: MS-Windows: when "!" is in 'guioptions' ":!start" fails
Problem:    MS-Windows: when "!" is in 'guioptions' ":!start" fails.
Solution:   Do not use a terminal window when the shell command begins with
            "!start". (Yasuhiro Matsumoto, closes #4504)
2019-06-08 12:05:22 +02:00
6064073841 patch 8.1.1491: when skipping over code a function call may cause trouble
Problem:    When skipping over code after an exception was thrown expression
            evaluation is aborted after a function call. (Ingo Karkat)
Solution:   Do not fail if not executing the expression. (closes #4507)
2019-06-07 23:15:22 +02:00
4e0bf84627 patch 8.1.1490: when a single test fails the exit code is not set
Problem:    When a single test fails the exit code is not set. (Daniel Hahler)
Solution:   Add an exit command. (closes #4506)
2019-06-07 22:40:25 +02:00
64416127fc patch 8.1.1489: sign order wrong when priority was changed
Problem:    Sign order wrong when priority was changed.
Solution:   Reorder signs when priority is changed. (Yegappan Lakshmanan,
            closes #4502)
2019-06-07 21:37:13 +02:00
150f0550f4 patch 8.1.1488: summary of tests has incorrect failed count
Problem:    Summary of tests has incorrect failed count.
Solution:   Add to the failed count instead of setting it. (Christian Brabandt)
2019-06-07 21:29:50 +02:00
62a88f498a patch 8.1.1487: older msgfmt cannot generate proper .desktop file
Problem:    Older msgfmt cannot generate proper .desktop file.
Solution:   Add a configure check to not use this msgfmt version. (Ken Takata)
2019-06-07 20:44:40 +02:00
1253704591 patch 8.1.1486: a listener change is merged even when it adds a line
Problem:    A listener change is merged even when it adds a line. (Paul Jolly)
Solution:   Do not merge a change that adds or removes a line. (closes #4490)
2019-06-06 22:50:35 +02:00
773a97c254 Update runtime files - Add typescript syntax and indent. 2019-06-06 20:39:55 +02:00
c07f67ad0e patch 8.1.1485: double free when garbage_collect() is used in autocommand
Problem:    Double free when garbage_collect() is used in autocommand.
Solution:   Have garbage collection also set the copyID in funccal_stack.
2019-06-06 19:03:17 +02:00
75ee544f99 patch 8.1.1484: some tests are slow
Problem:    Some tests are slow.
Solution:   Add timing to the test messages.  Fix double free when quitting in
            VimLeavePre autocmd.
2019-06-06 18:05:25 +02:00
5d30ff1964 patch 8.1.1483: skipped tests are not properly listed
Problem:    Skipped tests are not properly listed.
Solution:   Throw a "Skipped" exception instead of using ":finish" or ":return".
2019-06-06 16:12:12 +02:00
f6d50f1da8 patch 8.1.1482: no test for wincol() depending on the 'number' option
Problem:    No test for wincol() depending on the 'number' option.
Solution:   Add a couple of tests. (Christian Brabandt, closes #4500)
2019-06-06 15:40:08 +02:00
12e71eb8a8 patch 8.1.1481: length for two-digit rgb termresponse is off by one
Problem:    Length for two-digit rgb termresponse is off by one.
Solution:   Adjust the length. (closes #4494)
2019-06-06 15:19:31 +02:00
8e228e21cc patch 8.1.1480: desktop file check doesn't run on CI
Problem:    Desktop file check doesn't run on CI.
Solution:   Install the desktip-file-utils packages. (Christian Brabandt,
            closes #4498)
2019-06-06 15:13:19 +02:00
133c737357 patch 8.1.1479: change included for debugging only
Problem:    Change included for debugging only.
Solution:   Restore the REDIR_TEST_TO_NULL line.
2019-06-06 14:38:06 +02:00
18250e291a patch 8.1.1478: still an error when running tests with the tiny version
Problem:    Still an error when running tests with the tiny version.
Solution:   Do not try reading test.log
2019-06-06 14:28:54 +02:00
c7500f9cb5 patch 8.1.1477: test summary fails in the tiny version
Problem:    Test summary fails in the tiny version.
Solution:   set 'nocompatible'.
2019-06-06 14:08:50 +02:00
9c0cec65f8 patch 8.1.1476: no statistics displayed after running tests
Problem:    No statistics displayed after running tests.
Solution:   Summarize the test results. (Christian Brabandt, closes #4391)
            Also make it possible to report a skipped file.
2019-06-06 13:38:15 +02:00
db294adc65 patch 8.1.1475: search string not displayed when 'rightleft' is set
Problem:    Search string not displayed when 'rightleft' is set.
Solution:   Clear the right part of the old text. (closes #4488, closes #4489)
2019-06-06 12:49:29 +02:00
9aeb33639f patch 8.1.1474: 'ttybuiltin' is not tested
Problem:    'ttybuiltin' is not tested.
Solution:   At least test that it doesn't break things.
2019-06-06 12:36:15 +02:00
4a792c87b9 patch 8.1.1473: new resolve() implementation causes problem for plugins
Problem:    New resolve() implementation causes problem for plugins.
Solution:   Only resolve a resparse point after checking it is needed. (Ken
            Takata, closes #4492)
2019-06-06 12:22:41 +02:00
61da1bfa6c Update runtime files. 2019-06-06 12:14:49 +02:00
de6dbb452a patch 8.1.1472: add_termcap_entry() is not tested
Problem:    Add_termcap_entry() is not tested.
Solution:   Add a simple test.
2019-06-06 11:59:18 +02:00
32e1977012 patch 8.1.1471: 'background' not correctly set for 2-digit rgb termresponse
Problem:    'background' not correctly set for 2-digit rgb termresponse.
Solution:   Adjust what digit to use. (closes #4495)
2019-06-05 22:57:04 +02:00
6d718c4c38 patch 8.1.1470: new Unicode character U32FF missing from double-width table
Problem:    New Unicode character U32FF missing from double-width table.
Solution:   Add the character.
2019-06-05 22:46:13 +02:00
66761db11d patch 8.1.1469: no test for checking the cursor style response
Problem:    No test for checking the cursor style response.
Solution:   Add a simple test.  Also include the missing part of 8.1.1464.
2019-06-05 22:07:51 +02:00
d0380dc782 patch 8.1.1468: the generated desktop files may be invalid
Problem:    The generated desktop files may be invalid.
Solution:   Check validity with desktop-file-validate. (Christian Brabandt,
            Will Thompson, closes #4480)
2019-06-05 21:25:34 +02:00
d6ec1730ba patch 8.1.1467: cscope test fails
Problem:    Cscope test fails.
Solution:   Update expected text.
2019-06-04 23:20:23 +02:00
58a7f87c86 patch 8.1.1466: not updating priority on existing sign
Problem:    Not updating priority on existing sign.
Solution:   Set the sign priority.  Add a test. (Yegappan Lakshmanan)
2019-06-04 22:48:15 +02:00
a37833dbd7 patch 8.1.1465: allocating wrong amount of memory
Problem:    Allocating wrong amount of memory. (Yegappan Lakshmanan)
Solution:   Use sizeof() for right type of struct.
2019-06-04 22:29:10 +02:00
cea254f5a7 patch 8.1.1464: only 4-digit rgb termresponse is recognized
Problem:    Only 4-digit rgb termresponse is recognized.
Solution:   Also recognize 2-digit rgb response. (closes #4486)
2019-06-04 21:41:28 +02:00
277e79adc4 patch 8.1.1463: gcc warns for uninitialized variable
Problem:    Gcc warns for uninitialized variable.
Solution:   Put usage inside "if".  (Ken Takata)
2019-06-04 19:16:29 +02:00
c974022c31 patch 8.1.1462: MS-Windows: using special character requires quoting
Problem:    MS-Windows: using special character requires quoting.
Solution:   Add quotes. (Ken Takata)
2019-06-04 08:22:53 +02:00
ddd3308782 patch 8.1.1461: tests do not run or are not reliable on some systems
Problem:    Tests do not run or are not reliable on some systems.
Solution:   Use "findstr" instead of "grep" on MS-Windows. Clear
            PROMPT_COMMAND in the terminal test. Delete temp file. Wait for
            output after executing a debug command. (Yegappan Lakshmanan,
            closes #4479)
2019-06-03 23:07:25 +02:00
02e15072be patch 8.1.1460: popup window border characters may be wrong
Problem:    Popup window border characters may be wrong.
Solution:   Reset the border characters for each popup.  Correct use of
            'ambiwidth'.
2019-06-03 22:53:30 +02:00
3f6aeba18b patch 8.1.1459: popup window border looks bad when 'ambiwidth' is "double"
Problem:    Popup window border looks bad when 'ambiwidth' is "double".
            (Yasuhiro Matsumoto)
Solution:   Only use line drawing characters when 'ambiwidth' is "single".
            (Ken Takata, closes #4477)
2019-06-03 22:21:27 +02:00
0b4c9eddb5 patch 8.1.1458: crash when using gtags
Problem:    Crash when using gtags. (issue #4102)
Solution:   Check for negative row or col in screen_puts_len(). (Christian
            Brabandt)
2019-06-03 22:04:23 +02:00
87abab92f5 patch 8.1.1457: cannot reuse a buffer when loading a screen dump
Problem:    Cannot reuse a buffer when loading a screen dump.
Solution:   Add the "bufnr" option.
2019-06-03 21:14:59 +02:00
98fb65cb05 patch 8.1.1456: WinBar not redrawn after scrolling one line
Problem:    WinBar not redrawn after scrolling one line.
Solution:   Exclude the winbar height when deciding what to redraw.
            (closes #4473)
2019-06-02 20:33:32 +02:00
1762731f20 patch 8.1.1455: popup_atcursor() not completely implemented
Problem:    Popup_atcursor() not completely implemented.
Solution:   Add the default for the "moved" property.
2019-06-02 19:53:44 +02:00
6116b6abb1 patch 8.1.1454: build failure without the conceal feature
Problem:    Build failure without the conceal feature.
Solution:   Remove #ifdef.
2019-06-02 19:02:27 +02:00
3397f74ac2 patch 8.1.1453: popup window "moved" property not implemented yet
Problem:    Popup window "moved" property not implemented yet.
Solution:   Implement it.
2019-06-02 18:40:06 +02:00
b0ebbda06c patch 8.1.1452: line and col property of popup windows not properly checked
Problem:    Line and col property of popup windows not properly checked.
Solution:   Check for "+" or "-" sign.
2019-06-02 16:51:21 +02:00
ca2f7037c1 patch 8.1.1451: CTRL-L does not clear screen with a popup window
Problem:    CTRL-L does not clear screen with a popup window.
Solution:   Do not change the type to NOT_VALID.  Redraw all windows.
            (closes #4471)
2019-06-02 15:56:15 +02:00
399d898ac1 patch 8.1.1450: popup window positioning wrong when using padding or borders
Problem:    Popup window positioning wrong when using padding or borders.
Solution:   Fix computing the position.
2019-06-02 15:34:29 +02:00
042fb4b449 patch 8.1.1449: popup text truncated at end of screen
Problem:    Popup text truncated at end of screen.
Solution:   Move popup left if needed.  Add the "fixed" property to disable
            that. (Ben Jackson , closes #4466)
2019-06-02 14:49:56 +02:00
988c43310a patch 8.1.1448: statusline is sometimes drawn on top of popup
Problem:    Statusline is sometimes drawn on top of popup.
Solution:   Redraw popups after the statusline. (Naruhiko Nishino,
            closes #4468)
2019-06-02 14:12:11 +02:00
7b29dd8507 patch 8.1.1447: not allowed to create an empty popup
Problem:    Not allowed to create an empty popup.
Solution:   Remove restriction that there is some text. (closes #4470)
2019-06-02 13:22:11 +02:00
9eaac89650 patch 8.1.1446: popup window callback not implemented yet
Problem:    Popup window callback not implemented yet.
Solution:   Implement the callback.
2019-06-01 22:49:29 +02:00
790498b509 patch 8.1.1445: popup window border highlight not implemented yet
Problem:    Popup window border highlight not implemented yet.
Solution:   Implement the "borderhighlight" option.
2019-06-01 22:15:29 +02:00
3bfd04e672 patch 8.1.1444: not using double line characters for popup border
Problem:    Not using double line characters for popup border.
Solution:   Use double line characters if using utf-8.
2019-06-01 20:45:21 +02:00
2fd8e35e16 patch 8.1.1443: popup window padding and border not implemented yet
Problem:    Popup window padding and border not implemented yet.
Solution:   Implement padding and border.  Add core position and size to
            popup_getpos().
2019-06-01 20:16:48 +02:00
8caaf82569 patch 8.1.1442: popup windows not considered when the Vim window is resized
Problem:    Popup windows not considered when the Vim window is resized.
            (Ben Jackson)
Solution:   Reallocate the w_lines structure. (closes #4467)
2019-06-01 18:11:22 +02:00
bf0eff0b72 patch 8.1.1441: popup window filter not yet implemented
Problem:    Popup window filter not yet implemented.
Solution:   Implement the popup filter.
2019-06-01 17:13:36 +02:00
2d247849ce patch 8.1.1440: win_execute() test fails
Problem:    Win_execute() test fails.
Solution:   Adjust the expected error number.  Move to popup test.
2019-06-01 17:06:25 +02:00
c47ed44be7 patch 8.1.1439: json_encode() is very slow for large results
Problem:    Json_encode() is very slow for large results.
Solution:   In the growarray use a growth of at least 50%. (Ken Takata,
            closes #4461)
2019-06-01 14:36:26 +02:00
815b76bff6 patch 8.1.1438: some commands cause trouble in a popup window
Problem:    Some commands cause trouble in a popup window.
Solution:   Add NOT_IN_POPUP_WINDOW.
2019-06-01 14:15:52 +02:00
3a97bb3f0f patch 8.1.1437: code to handle callbacks is duplicated
Problem:    Code to handle callbacks is duplicated.
Solution:   Add callback_T and functions to deal with it.
2019-06-01 13:28:35 +02:00
7dd64a3e57 Update runtime files. 2019-05-31 21:41:05 +02:00
c28cb5b16d patch 8.1.1436: writefile test fails when run under /tmp
Problem:    Writefile test fails when run under /tmp.
Solution:   Adjust 'backupskip. (Kenta Sato, closes #4462)
2019-05-31 20:42:09 +02:00
5d508dd39e patch 8.1.1435: memory usage test is a bit too flaky
Problem:    Memory usage test is a bit too flaky.
Solution:   Adjust the tolerances a bit. (Christian Brabandt)
2019-05-31 20:23:25 +02:00
1ab74a5af3 patch 8.1.1434: test 3 is old style
Problem:    Test 3 is old style.
Solution:   Turn into a new style test. (Yegappan Lakshmanan, closes #4460)
2019-05-31 20:02:53 +02:00
eea1699836 patch 8.1.1433: win_execute() may leave popup window focused
Problem:    Win_execute() may leave popup window focused, eventually leading
            to a crash. (Bjorn Linse)
Solution:   When previous window was closed, go to the first window.
2019-05-31 17:34:48 +02:00
ccd6e3471d patch 8.1.1432: can't build with eval feature
Problem:    Can't build with eval feature.
Solution:   Add missing rename.
2019-05-30 22:35:18 +02:00
c6896e20f8 patch 8.1.1431: popup window listed as "Scratch"
Problem:    Popup window listed as "Scratch".
Solution:   List them as "Popup".
2019-05-30 22:32:34 +02:00
402502d0e4 patch 8.1.1430: popup window option "wrap" not supported
Problem:    Popup window option "wrap" not supported.
Solution:   Implement it.
2019-05-30 22:07:36 +02:00
ac1f1bc222 patch 8.1.1429: "pos" option of popup window not supported yet
Problem:    "pos" option of popup window not supported yet.
Solution:   Implement the option. Rename popup_getposition() to
            popup_getpos().
2019-05-30 21:24:26 +02:00
cc31ad9f9b patch 8.1.1428: popup_atcursor() not implemented yet
Problem:    Popup_atcursor() not implemented yet.
Solution:   Implement it. (Yasuhiro Matsumoto, closes #4456)
2019-05-30 19:25:06 +02:00
54fabd4b5e patch 8.1.1427: popup window screenshot test fails
Problem:    Popup window screenshot test fails.
Solution:   Add missing change to popup window code.
2019-05-30 19:03:22 +02:00
b42301247d patch 8.1.1426: no test for syntax highlight in popup window
Problem:    No test for syntax highlight in popup window.
Solution:   Add a screenshot test.  Update associated documentation. Avoid
            'buftype' being reset by setbufvar().
2019-05-30 18:40:53 +02:00
89adc3a137 patch 8.1.1425: win_execute() does not set window pointers properly
Problem:    Win_execute() does not set window pointers properly.
Solution:   Use switch_win_noblock().  Also execute autocommands in a popup
            window.
2019-05-30 17:29:40 +02:00
5c3fb04623 patch 8.1.1424: crash when popup menu is deleted while waiting for char
Problem:    Crash when popup menu is deleted while waiting for char.
Solution:   Bail out when pum_array was cleared.
2019-05-30 15:53:29 +02:00
cacc6a5c98 patch 8.1.1423: popup windows use options from current window and buffer
Problem:    Popup windows use options from current window and buffer.
Solution:   Clear all local options when creating a popup window.
2019-05-30 15:22:43 +02:00
8c2a600f72 patch 8.1.1422: popup_getoptions() not implemented yet
Problem:    Popup_getoptions() not implemented yet.
Solution:   Implement it. (closes #4452)
2019-05-30 14:29:45 +02:00
1714696600 patch 8.1.1421: drawing "~" line in popup window
Problem:    Drawing "~" line in popup window.
Solution:   Just draw text in the last line of the popup window.
2019-05-30 00:12:11 +02:00
88c4e1f069 patch 8.1.1420: popup window size only uses first line length
Problem:    Popup window size only uses first line length.
Solution:   Use the longest line. (Ben Jackson, closes #4451)  Also deal with
            wrapping lines.
2019-05-29 23:14:28 +02:00
68a4b04a8d patch 8.1.1419: listener callbacks may be called recursively
Problem:    Listener callbacks may be called recursively.
Solution:   Set "updating_screen" while listener callbacks are invoked.
2019-05-29 22:28:29 +02:00
868b7b6712 patch 8.1.1418: win_execute() is not implemented yet
Problem:    Win_execute() is not implemented yet.
Solution:   Implement it.
2019-05-29 21:44:40 +02:00
1bbebab525 patch 8.1.1417: MS-Windows: resolve() does not resolve all components of path
Problem:    MS-Windows: resolve() does not resolve all components of the path.
            (David Briscoe)
Solution:   Do not bail out for a reparse point. (Yasuhiro Matsumoto,
            closes #4211, closes #4447)
2019-05-29 20:36:54 +02:00
bc133543b8 patch 8.1.1416: popup_getposition() not implemented yet
Problem:    Popup_getposition() not implemented yet.
Solution:   Implement it. (Yasuhiro Matsumoto, closes #4449)
2019-05-29 20:26:46 +02:00
59edb00e22 patch 8.1.1415: build error in MS-Windows GUI
Problem:    Build error in MS-Windows GUI.
Solution:   Fix the LALLOC_MULT() argument.
2019-05-28 23:32:47 +02:00
c799fe206e patch 8.1.1414: alloc() returning "char_u *" causes a lot of type casts
Problem:    Alloc() returning "char_u *" causes a lot of type casts.
Solution:   Have it return "void *". (Mike Williams)  Define ALLOC_ONE() to
            check the simple allocations.
2019-05-28 23:08:19 +02:00
b58a4b938c patch 8.1.1413: error when the drive of the swap file was disconnected
Problem:    Error when the drive of the swap file was disconnected.
Solution:   Try closing and re-opening the swap file. (closes #4378)
2019-05-27 23:36:21 +02:00
72fcf07b06 patch 8.1.1412: test 30 is old style
Problem:    Test 30 is old style.
Solution:   Turn it into a new style test. (Yegappan Lakshmanan, closes #4440)
2019-05-27 22:21:44 +02:00
7833dab73c patch 8.1.1411: Coverity warns for divide by zero
Problem:    Coverity warns for divide by zero.
Solution:   Make sure width is larger than zero.
2019-05-27 22:01:40 +02:00
60cdb3004a patch 8.1.1410: popup_move() is not implemented yet
Problem:    Popup_move() is not implemented yet.
Solution:   Implement it. (Yasuhiro Matsumoto, closes #4441)  Improve the
            positioning and resizing.
2019-05-27 21:54:10 +02:00
b43683729b patch 8.1.1409: Coverity warns for using uninitialized memory
Problem:    Coverity warns for using uninitialized memory.
Solution:   Add a condition to clearing the growarray.
2019-05-27 20:01:41 +02:00
bf0ecb2cb6 patch 8.1.1408: PFL_HIDDEN conflicts with system header file
Problem:    PFL_HIDDEN conflicts with system header file.
Solution:   Rename to POPF_HIDDEN.
2019-05-27 10:04:40 +02:00
7a8d0278bd patch 8.1.1407: popup_create() does not support text properties
Problem:    Popup_create() does not support text properties.
Solution:   Support the third form of the text argument.
2019-05-26 23:32:06 +02:00
2cd0dce898 patch 8.1.1406: popup_hide() and popup_show() not implemented yet
Problem:    popup_hide() and popup_show() not implemented yet.
Solution:   Implement the functions.
2019-05-26 22:17:52 +02:00
68e6560b84 Update runtime files. 2019-05-26 21:33:31 +02:00
20c023aee0 patch 8.1.1405: "highlight" option of popup windows not supported
Problem:    "highlight" option of popup windows not supported.
Solution:   Implement the "highlight" option.
2019-05-26 21:03:24 +02:00
9d591525a5 patch 8.1.1404: cannot change the patch level when building with NSIS
Problem:    Cannot change the patch level when building with NSIS.
Solution:   Use $PATCHLEVEL if defined. (Christian Brabandt)
2019-05-26 20:49:42 +02:00
35d5af6c0b patch 8.1.1403: cannot build without the timer feature
Problem:    Cannot build without the timer feature.
Solution:   Add #ifdef.
2019-05-26 20:44:10 +02:00
51fe3b14f6 patch 8.1.1402: "timer" option of popup windows not supported
Problem:    "timer" option of popup windows not supported.
Solution:   Implement the "timer" option. (Yasuhiro Matsumoto, closes #4439)
2019-05-26 20:10:06 +02:00
076073950c patch 8.1.1401: misspelled mkspellmem as makespellmem
Problem:    Misspelled mkspellmem as makespellmem.
Solution:   Drop duplicate help entry, fix test. (Naruhiko Nishino, Ken
            Takata, closes #4437)
2019-05-26 19:20:43 +02:00
9c27b1c6d1 patch 8.1.1400: using global pointer for tab-local popups is clumsy
Problem:    Using global pointer for tab-local popups is clumsy.
Solution:   Use the pointer in tabpage_T.
2019-05-26 18:48:13 +02:00
ec58384afa patch 8.1.1399: popup windows not adjusted when switching tabs
Problem:    Popup windows not adjusted when switching tabs.
Solution:   Save and restore first_tab_popupwin. Fix closing a tabpage.
2019-05-26 14:11:23 +02:00
a8c99fb78e patch 8.1.1398: duplicate line in MSVC build file
Problem:    Duplicate line in MSVC build file.
Solution:   Remove the line. (Ken Takata, closes #4436)
2019-05-26 13:14:02 +02:00
80f95425cf patch 8.1.1397: build fails in tiny version
Problem:    Build fails in tiny version.
Solution:   Always define hl_combine_attr().
2019-05-25 23:42:13 +02:00
193ffd1d9f patch 8.1.1396: 'wincolor' does not apply to lines below the buffer
Problem:    'wincolor' does not apply to lines below the buffer.
Solution:   Also apply 'wincolor' to the "~" lines and the number column.
2019-05-25 22:57:30 +02:00
adfde115d5 patch 8.1.1395: saving for undo may access invalid memory
Problem:    Saving for undo may access invalid memory. (Dominique Pelle)
Solution:   Set ml_line_len also when returning a constant string.
2019-05-25 22:11:45 +02:00
a5e44600eb patch 8.1.1394: not restoring t_F2 in registers test
Problem:    Not restoring t_F2 in registers test.
Solution:   Assign to &t_F2 instead of t_F2. (Andy Massimino, closes #4434)
2019-05-25 21:52:30 +02:00
51e14387f1 patch 8.1.1393: unnecessary type casts
Problem:    Unnecessary type casts.
Solution:   Remove type casts from alloc() and lalloc() calls. (Mike Williams)
2019-05-25 20:21:28 +02:00
682725c141 patch 8.1.1392: build failure in tiny version
Problem:    Build failure in tiny version.
Solution:   Define ex_popupclear to ex_ni if not implemented.  Add UNUSED.
2019-05-25 20:10:37 +02:00
4d784b21d1 patch 8.1.1391: no popup window support
Problem:    No popup window support.
Solution:   Add initial code for popup windows.  Add the 'wincolor' option.
2019-05-25 19:51:39 +02:00
8f46e4c4bd patch 8.1.1390: search stats are off when using count or offset
Problem:    Search stats are off when using count or offset.
Solution:   Recompute the stats when needed. (Masato Nishihata, closes #4410)
2019-05-24 22:08:15 +02:00
7b31a181c8 patch 8.1.1389: changes are not flushed when end and start overlap
Problem:    Changes are not flushed when end and start overlap. (Paul Jolly)
Solution:   When end of a previous changes overlaps with start of a new
            change, first flush listeners.
2019-05-24 21:39:27 +02:00
f0884c5f3f patch 8.1.1388: errors when calling prop_remove() for an unloaded buffer
Problem:    Errors when calling prop_remove() for an unloaded buffer.
Solution:   Bail out when the buffer is not loaded.  Add a few more tests for
            failing when the buffer number is invalid.
2019-05-24 21:22:29 +02:00
d79eef2eb1 patch 8.1.1387: calling prop_add() in an empty buffer doesn't work
Problem:    Calling prop_add() in an empty buffer doesn't work. (Dominique
            Pelle)
Solution:   Open the memline before adding a text property. (closes #4412)
2019-05-24 20:41:55 +02:00
18a4ba29ae patch 8.1.1386: unessesary type casts for lalloc()
Problem:    Unessesary type casts for lalloc().
Solution:   Remove type casts.  Change lalloc(size, TRUE) to alloc(size).
2019-05-24 19:39:03 +02:00
71de720c2c patch 8.1.1385: signed/unsigned compiler warning
Problem:    Signed/unsigned compiler warning.
Solution:   Use STRLEN() instead of strlen().
2019-05-24 19:04:29 +02:00
964b3746b9 patch 8.1.1384: using "int" for alloc() often results in compiler warnings
Problem:    Using "int" for alloc() often results in compiler warnings.
Solution:   Use "size_t" and remove type casts.  Remove alloc_check(), Vim
            only works with 32 bit ints anyway.
2019-05-24 18:54:09 +02:00
d33a764123 patch 8.1.1383: warning for size_t/int mixup
Problem:    Warning for size_t/int mixup.
Solution:   Change type. (Mike Williams)
2019-05-24 17:56:14 +02:00
3020a87cb1 patch 8.1.1382: error when editing test file
Problem:    Error when editing test file.
Solution:   Remove part of modeline.
2019-05-24 17:33:01 +02:00
d22a6f8aaf patch 8.1.1381: MS-Windows: missing build dependency
Problem:    MS-Windows: missing build dependency.
Solution:   Make gui_dwrite.cpp depend on gui_dwrite.h. (Ken Takata,
            closes #4423
2019-05-24 17:17:54 +02:00
fa8f861957 patch 8.1.1380: MS-Windows building VIMDLL with MSVC: SUBSYSTEM is not set
Problem:    MS-Windows building VIMDLL with MSVC: SUBSYSTEM is not set.
Solution:   Invert condition. (closes #4422)
2019-05-24 17:05:44 +02:00
8239c62067 patch 8.1.1379: filechanged test hangs
Problem:    Filechanged test hangs.
Solution:   Do not check 'autoread'.
2019-05-24 16:46:01 +02:00
701ff0a3e5 patch 8.1.1378: delete() can not handle a file name that looks like a pattern
Problem:    Delete() can not handle a file name that looks like a pattern.
Solution:   Use readdir() instead of appending "/*" and expanding wildcards.
            (Ken Takata, closes #4424, closes #696)
2019-05-24 14:14:14 +02:00
fcc4d921d6 patch 8.1.1377: MS-Windows GUI uses wrong shell command for bash
Problem:    MS-Windows GUI uses wrong shell command for bash. (Robert Bogomip)
Solution:   Check that 'shellcmdflag' is "/c". (Ken Takata, closes #4418)
2019-05-24 13:32:36 +02:00
e2ad826f43 patch 8.1.1376: warnings for size_t/int mixups
Problem:    Warnings for size_t/int mixups.
Solution:   Change types, add type casts. (Mike Williams)
2019-05-24 13:22:22 +02:00
984f031fb0 patch 8.1.1375: without "TS" in 'shortmess' get a hit-enter prompt often
Problem:    Without "TS" in 'shortmess' get a hit-enter prompt often.
Solution:   Always truncate the search message.  Also avoid putting it in the
            message history. (closes #4413)
2019-05-24 13:11:47 +02:00
c97582b029 patch 8.1.1374: check for file changed triggers too often
Problem:    Check for file changed triggers too often.
Solution:   Don't use "b_p_ar" when it is negative.
2019-05-24 11:45:22 +02:00
0ab190c057 patch 8.1.1373: "[p" in Visual mode puts in wrong line
Problem:    "[p" in Visual mode puts in wrong line.
Solution:   Call nv_put() instead of duplicating the functionality.
            (closes #4408)
2019-05-23 23:27:36 +02:00
1c6fd1e100 patch 8.1.1372: when evaluating 'statusline' the current window is unknown
Problem:    When evaluating 'statusline' the current window is unknown.
            (Daniel Hahler)
Solution:   Set "g:actual_curwin" for %{} items.  Set "g:statusline_winid"
            when evaluationg %!. (closes #4406, closes #3299)
2019-05-23 22:11:59 +02:00
99499b1c05 patch 8.1.1371: cannot recover from a swap file
Problem:    Cannot recover from a swap file.
Solution:   Do not expand environment variables in the swap file name.
            Do not check the extension when we already know a file is a swap
            file.  (Ken Takata, closes 4415, closes #4369)
2019-05-23 21:35:48 +02:00
05b8b07e27 patch 8.1.1370: not using the new github feature for donations
Problem:    Not using the new github feature for donations.
Solution:   Add a Sponsor button. (closes #4417)
2019-05-23 20:42:10 +02:00
294d9bf966 patch 8.1.1369: get E484 when using system() during GUI startup
Problem:    Get E484 when using system() during GUI startup.
Solution:   Check "gui.starting". (Ken Takata)
2019-05-23 20:12:46 +02:00
e09244ee35 patch 8.1.1368: modeline test fails with python but without pythonhome
Problem:    Modeline test fails with python but without pythonhome.
Solution:   Correct test argument.
2019-05-23 17:35:55 +02:00
7e800c6047 patch 8.1.1367: can set 'modelineexpr' in modeline
Problem:    can set 'modelineexpr' in modeline.
Solution:   Add P_SECURE flag.
2019-05-23 17:08:49 +02:00
110289e781 patch 8.1.1366: using expressions in a modeline is unsafe
Problem:    Using expressions in a modeline is unsafe.
Solution:   Disallow using expressions in a modeline, unless the
            'modelineexpr' option is set.  Update help, add more tests.
2019-05-23 15:38:06 +02:00
5357552140 patch 8.1.1365: source command doesn't check for the sandbox
Problem:    Source command doesn't check for the sandbox. (Armin Razmjou)
Solution:   Check for the sandbox when sourcing a file.
2019-05-22 22:38:25 +02:00
5c017b2de2 patch 8.1.1364: design for popup window support needs more details
Problem:    Design for popup window support needs more details.
Solution:   Add details about using a window and buffer.  Rename popup_show()
            to popup_create() and add popup_show() and popup_hide().
2019-05-21 23:09:01 +02:00
e0b5949a3b patch 8.1.1363: ":vert options" does not make a vertical split
Problem:    ":vert options" does not make a vertical split.
Solution:   Pass the right modifiers in $OPTWIN_CMD. (Ken Takata,
            closes #4401)
2019-05-21 20:54:45 +02:00
c79745a82f patch 8.1.1362: code and data in tests can be hard to read
Problem:    Code and data in tests can be hard to read.
Solution:   Use the new heredoc style. (Yegappan Lakshmanan, closes #4400)
2019-05-20 22:12:34 +02:00
0b0ad35c33 patch 8.1.1361: Python setuptools don't work with Python 3
Problem:    Python setuptools don't work with Python 3.
Solution:   Add dummy implementation for find_module. (Joel Frederico,
            closes #4402, closes #3984
2019-05-20 21:52:45 +02:00
80341bcd89 patch 8.1.1360: buffer left 'nomodifiable' after :substitute
Problem:    Buffer left 'nomodifiable' after :substitute. (Ingo Karkat)
Solution:   Save the value of 'modifiable' earlier' (Christian Brabandt,
            closes #4403)
2019-05-20 20:34:51 +02:00
f3333b02f3 patch 8.1.1359: text property wrong after :substitute with backslash
Problem:    Text property wrong after :substitute with backslash.
Solution:   Adjust text property columns when removing backslashes.
            (closes #4397)
2019-05-19 22:53:40 +02:00
386b43e594 patch 8.1.1358: cannot enter character with a CSI byte
Problem:    Cannot enter character with a CSI byte.
Solution:   Only check "gui.in_use" when VIMDLL is defined. (Ken Takata,
            closes #4396)
2019-05-19 21:57:11 +02:00
999dc14644 patch 8.1.1357: test 37 is old style
Problem:    Test 37 is old style.
Solution:   Turn it into a new style test. (Yegappan Lakshmanan, closes #4398)
2019-05-19 21:44:08 +02:00
8471e57026 patch 8.1.1356: some text in heredoc assignment ends the text
Problem:    Some text in heredoc assignment ends the text. (Ozaki Kiichi)
Solution:   Recognize "let v =<<" and skip until the end.
2019-05-19 21:37:18 +02:00
16e9b85113 patch 8.1.1355: obvious mistakes are accepted as valid expressions
Problem:    Obvious mistakes are accepted as valid expressions.
Solution:   Be more strict about parsing numbers. (Yasuhiro Matsumoto,
            closes #3981)
2019-05-19 19:59:35 +02:00
f5842c5a53 patch 8.1.1354: getting a list of text lines is clumsy
Problem:    Getting a list of text lines is clumsy.
Solution:   Add the =<< assignment. (Yegappan Lakshmanan, closes #4386)
2019-05-19 18:41:26 +02:00
2b39d806f0 patch 8.1.1353: undo test fails on Mac
Problem:    Undo test fails on Mac.
Solution:   Expect "private" on the Mac.
2019-05-19 16:38:56 +02:00
e9ebc9a91c patch 8.1.1352: undofile() reports wrong name
Problem:    Undofile() reports wrong name. (Francisco Giordano)
Solution:   Clean up the name before changing path separators. (closes #4392,
            closes #4394)
2019-05-19 15:27:14 +02:00
338dfdad38 patch 8.1.1351: text property wrong after :substitute
Problem:    Text property wrong after :substitute.
Solution:   Save for undo before changing any text properties.
2019-05-19 15:19:57 +02:00
dc6855af97 patch 8.1.1350: "W" for wrapping not shown when more than 99 matches
Problem:    "W" for wrapping not shown when more than 99 matches.
Solution:   Adjust check for length. (Masato Nishihata, closes #4388)
2019-05-18 19:26:29 +02:00
cf0bfd9ade patch 8.1.1349: if writing runs into conversion error backup file is deleted
Problem:    If writing runs into a conversion error the backup file is
            deleted. (Arseny Nasokin)
Solution:   Don't delete the backup file is the file was overwritten and a
            conversion error occurred. (Christian Brabandt, closes #4387)
2019-05-18 18:52:04 +02:00
f8191c5f07 patch 8.1.1348: running tests may cause the window to move
Problem:    Running tests may cause the window to move.
Solution:   Correct the reported window position for the offset with the
            position after ":winpos".  Works around an xterm bug.
2019-05-18 17:22:54 +02:00
bd2d68c2f4 patch 8.1.1347: fractional scroll position not restored after closing window
Problem:    Fractional scroll position not restored after closing window.
Solution:   Do restore fraction if topline is not one.
2019-05-18 15:36:11 +02:00
7f3a28490a patch 8.1.1346: error for Python exception does not show useful info
Problem:    Error for Python exception does not show useful info.
Solution:   Show the last line instead of the first one. (Ben Jackson,
            closes #4381)
2019-05-18 15:02:25 +02:00
6349e9411f patch 8.1.1345: stuck in sandbox with ":s/../\=Function/gn"
Problem:    Stuck in sandbox with ":s/../\=Function/gn".
Solution:   Don't skip over code to restore sandbox. (Christian Brabandt)
2019-05-18 13:41:22 +02:00
0d3cb73012 patch 8.1.1344: Coverity complains about possibly using a NULL pointer
Problem:    Coverity complains about possibly using a NULL pointer and copying
            a string into a fixed size buffer.
Solution:   Check for NULL, even though it should not happen.  Use
            vim_strncpy() instead of strcpy().
2019-05-18 13:05:18 +02:00
8055d17388 patch 8.1.1343: text properties not adjusted for Visual block mode delete
Problem:    Text properties not adjusted for Visual block mode delete.
Solution:   Call adjust_prop_columns(). (closes #4384)
2019-05-17 22:57:26 +02:00
787880a86d patch 8.1.1342: using freed memory when joining line with text property
Problem:    Using freed memory when joining line with text property.
Solution:   Use already computed length.
2019-05-17 20:17:40 +02:00
80e737cc6a patch 8.1.1341: text properties are lost when joining lines
Problem:    Text properties are lost when joining lines.
Solution:   Move the text properties to the joined line.
2019-05-17 19:56:34 +02:00
bfd451283f patch 8.1.1340: attributes from 'cursorline' overwrite textprop
Problem:    Attributes from 'cursorline' overwrite textprop.
Solution:   Combine the attributes. (closes #3912)
2019-05-17 13:05:07 +02:00
dabfde04fe patch 8.1.1339: installer needs to product name et al.
Problem:    Installer needs to product name et al.
Solution:   Add a few lines to the NSIS installer script. (Christian Brabandt)
2019-05-17 12:37:27 +02:00
0ebe12be86 patch 8.1.1338: hang when concealing the '>' shown for half of wide char
Problem:    Hang when concealing the '>' shown for a wide char that doesn't
            fit in the last cell.
Solution:   Put back the pointer when the '>' is not going to be displayed.
            (closes #4377)
2019-05-17 12:31:44 +02:00
5c65e6a062 patch 8.1.1337: get empty text prop when splitting line just after text prop
Problem:    Get empty text prop when splitting line just after text prop.
Solution:   Do not create an empty text prop at the start of the line.
2019-05-17 11:08:56 +02:00
17aca707f9 patch 8.1.1336: some eval functionality is not covered by tests
Problem:    Some eval functionality is not covered by tests.
Solution:   Add a few more test cases. (Masato Nishihata, closes #4374)
2019-05-16 22:24:55 +02:00
dda4144d39 patch 8.1.1335: listener callback is called after inserting text
Problem:    Listener callback is called after inserting text.
Solution:   Flush the changes before inserting or deleting a line.  Store
            changes per buffer.
2019-05-16 22:11:47 +02:00
eda652215a patch 8.1.1334: when buffer is hidden "F" in 'shortmess' is not used
Problem:    When buffer is hidden "F" in 'shortmess' is not used.
Solution:   Check the "F" flag in 'shortmess' when the buffer is already
            loaded. (Jason Franklin)  Add test_getvalue() to be able to test
            this.
2019-05-16 20:29:44 +02:00
45dd07f10a patch 8.1.1333: text properties don't always move after changes
Problem:    Text properties don't always move after changes.
Solution:   Update properties before reporting changes to listeners. Move text
            property when splitting a line.
2019-05-15 22:45:37 +02:00
fe1ade0a78 patch 8.1.1332: cannot flush listeners without redrawing, mix of changes
Problem:    Cannot flush change listeners without also redrawing.  The line
            numbers in the list of changes may become invalid.
Solution:   Add listener_flush().  Invoke listeners before adding a change
            that makes line numbers invalid.
2019-05-14 21:20:36 +02:00
fb222df28d patch 8.1.1331: test 29 is old style
Problem:    Test 29 is old style.
Solution:   Turn it into a new style test. (Yegappan Lakshmanan, closes #4370)
2019-05-14 17:57:19 +02:00
468 changed files with 49834 additions and 22641 deletions

1
.github/FUNDING.yml vendored Normal file
View File

@ -0,0 +1 @@
custom: https://www.vim.org/sponsor/index.php

4
.gitignore vendored
View File

@ -35,7 +35,9 @@ src/auto/pathdef.c
*.RES *.RES
vim*.dll vim*.dll
vim*.lib vim*.lib
src/pathdef.c src/dobj*/pathdef.c
src/gobj*/pathdef.c
src/obj*/pathdef.c
src/Obj*/pathdef.c src/Obj*/pathdef.c
gvimext.dll gvimext.dll
gvimext.lib gvimext.lib

View File

@ -37,7 +37,9 @@ src/auto/pathdef.c
*.RES *.RES
vim*.dll vim*.dll
vim*.lib vim*.lib
src/pathdef.c src/dobj*/pathdef.c
src/gobj*/pathdef.c
src/obj*/pathdef.c
src/Obj*/pathdef.c src/Obj*/pathdef.c
gvimext.dll gvimext.dll
gvimext.lib gvimext.lib

View File

@ -1,133 +1,116 @@
language: c language: c
dist: trusty
os: anchors:
- osx envs:
- linux - &tiny-nogui
BUILD=yes TEST=test COVERAGE=no FEATURES=tiny "CONFOPT='--disable-gui'" SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
- &tiny
BUILD=yes TEST=test COVERAGE=no FEATURES=tiny CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
- &small
BUILD=yes TEST=test COVERAGE=no FEATURES=small CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
- &normal
BUILD=yes TEST=test COVERAGE=no FEATURES=normal CONFOPT= SHADOWOPT="-C src/shadow" SRCDIR=./src/shadow CHECK_AUTOCONF=no
- &linux-huge
BUILD=yes TEST="scripttests test_libvterm" 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 --enable-tclinterp'"
- &osx-huge # macOS build
BUILD=yes TEST=test COVERAGE=no FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
"CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-rubyinterp --enable-luainterp --enable-tclinterp'"
- &unittests
BUILD=no TEST=unittests COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=yes
- &asan # ASAN build
SANITIZER_CFLAGS="-g -O1 -DABORT_ON_INTERNAL_ERROR -DEXITFREE -fsanitize=address -fno-omit-frame-pointer"
ASAN_OPTIONS="print_stacktrace=1 log_path=asan" LSAN_OPTIONS="suppressions=$TRAVIS_BUILD_DIR/src/testdir/lsan-suppress.txt"
compiler: linux: &linux
- clang os: linux
- gcc dist: trusty
addons:
apt:
sources:
# Need msgfmt 0.19.8 to be able to generate .desktop files
- sourceline: 'ppa:ricotz/toolchain'
packages:
- autoconf
- clang
- lcov
- gettext
- libcanberra-dev
- libperl-dev
- python-dev
- python3-dev
- liblua5.2-dev
- lua5.2
- ruby-dev
- tcl-dev
- cscope
- libgtk2.0-dev
- desktop-file-utils
before_install:
- rvm reset
# Remove /opt/python/3.x.x/bin from $PATH for using system python3.
# ("pyenv global system" doesn't seem to work.)
- |
if [[ "$(which python3)" =~ ^/opt/python/ ]]; then
export PATH=$(py3=$(which python3); echo ${PATH//${py3%/python3}:/})
fi
- |
if [[ "${COVERAGE}" = "yes" ]]; then
pip install --user cpp-coveralls
fi
# needed for https support for coveralls
# building cffi only works with gcc, not with clang
- |
if [[ "${COVERAGE}" = "yes" ]]; then
CC=gcc pip install --user pyopenssl ndg-httpsclient pyasn1
fi
# Use llvm-cov instead of gcov when compiler is clang.
- |
if [[ "${CC}" = "clang" ]]; then
ln -sf "$(which llvm-cov)" /home/travis/bin/gcov
fi
before_script:
# Start virtual framebuffer to be able to test the GUI. Does not work on OS X.
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start && sleep 3
- sudo modprobe snd-dummy
- sudo usermod -a -G audio $USER
- do_test() { sg audio "sg $(id -gn) '$*'"; }
env: osx: &osx
- &tiny-nogui os: osx
BUILD=yes TEST=test COVERAGE=no FEATURES=tiny "CONFOPT='--disable-gui'" SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no addons:
- &tiny homebrew:
BUILD=yes TEST=test COVERAGE=no FEATURES=tiny CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no packages:
- &asan # ASAN build - lua
BUILD=yes TEST=test SANITIZER_CFLAGS="-g -O1 -DABORT_ON_INTERNAL_ERROR -DEXITFREE -fsanitize=address -fno-omit-frame-pointer" update: true
FEATURES=huge SRCDIR=./src CHECK_AUTOCONF=no ASAN_OPTIONS="print_stacktrace=1 log_path=asan" LSAN_OPTIONS="suppressions=$TRAVIS_BUILD_DIR/src/testdir/lsan-suppress.txt" cache:
"CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-rubyinterp --enable-luainterp --enable-tclinterp'" directories:
- &linux-huge - /usr/local/Homebrew/Library/Homebrew/vendor/
BUILD=yes TEST="scripttests test_libvterm" COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no - /usr/local/Homebrew/Library/Taps/
"CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-python3interp --enable-rubyinterp --enable-luainterp --enable-tclinterp'" before_install:
- &unittests - rvm reset
BUILD=no TEST=unittests COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=yes # Lua is not installed on Travis OSX
- &normal - export LUA_PREFIX=/usr/local
BUILD=yes TEST=test COVERAGE=no FEATURES=normal CONFOPT= SHADOWOPT="-C src/shadow" SRCDIR=./src/shadow CHECK_AUTOCONF=no before_script:
- &small - do_test() { "$@"; }
BUILD=yes TEST=test COVERAGE=no FEATURES=small CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
- &osx-huge # Mac OSX build coverage: &coverage
BUILD=yes TEST=test COVERAGE=no FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no - ~/.local/bin/coveralls -b "${SRCDIR}" -x .xs -e "${SRCDIR}"/if_perl.c -e "${SRCDIR}"/xxd -e "${SRCDIR}"/libvterm --encodings utf-8 latin-1 EUC-KR
"CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-rubyinterp --enable-luainterp --enable-tclinterp'" - (cd "${SRCDIR}" && bash <(curl -s https://codecov.io/bash))
asan_symbolize: &asan_symbolize
- |
while read log; do
asan_symbolize < "${log}"
done < <(find . -type f -name 'asan.*' -size +0)
sudo: false sudo: false
# instead of a 2*2*8 matrix (2*os + 2*compiler + 8*env),
# exclude some builds on mac os x and linux
# on mac os x "tiny" is always without GUI
# linux: 2*compiler + 5*env + mac: 2*compiler + 2*env
matrix:
exclude:
- os: osx
env: *tiny
- os: osx
env: *normal
- os: osx
env: *unittests
- os: osx
env: *small
- os: osx
env: *linux-huge
- os: osx
env: *asan
- os: linux
compiler: clang
env: *asan
- os: linux
compiler: clang
env: *unittests
- os: linux
compiler: clang
env: *small
- os: linux
env: *osx-huge
branches: branches:
except: except:
- /^v[0-9]/ - /^v[0-9]/
addons:
apt:
sources:
# Need msgfmt 0.19.8 to be able to generate .desktop files
- sourceline: 'ppa:ricotz/toolchain'
packages:
- autoconf
- clang
- lcov
- gettext
- libperl-dev
- python-dev
- python3-dev
- liblua5.2-dev
- lua5.2
- ruby-dev
- tcl-dev
- cscope
- libgtk2.0-dev
homebrew:
packages:
- lua
update: true
before_install:
- rvm reset
# Remove /opt/python/3.x.x/bin from $PATH for using system python3.
# ("pyenv global system" doesn't seem to work.)
- |
if [[ "${TRAVIS_OS_NAME}" = "linux" ]] && [[ "$(which python3)" =~ ^/opt/python/ ]]; then
export PATH=$(py3=$(which python3); echo ${PATH//${py3%/python3}:/})
fi
- |
if [[ "${COVERAGE}" = "yes" ]]; then
pip install --user cpp-coveralls
fi
# needed for https support for coveralls
# building cffi only works with gcc, not with clang
- |
if [[ "${COVERAGE}" = "yes" ]]; then
CC=gcc pip install --user pyopenssl ndg-httpsclient pyasn1
fi
# Lua is not installed on Travis OSX
- |
if [[ "${TRAVIS_OS_NAME}" = "osx" ]]; then
export LUA_PREFIX=/usr/local
fi
# Use llvm-cov instead of gcov when compiler is clang.
- |
if [[ "${TRAVIS_OS_NAME}" = "linux" ]] && [[ "${CC}" = "clang" ]]; then
ln -sf "$(which llvm-cov)" /home/travis/bin/gcov
fi
before_script:
# Start virtual framebuffer to be able to test the GUI. Does not work on OS X.
- |
if [[ "${TRAVIS_OS_NAME}" = "linux" ]]; then
export DISPLAY=:99.0
sh -e /etc/init.d/xvfb start && sleep 3
fi
script: script:
- NPROC=$(getconf _NPROCESSORS_ONLN) - NPROC=$(getconf _NPROCESSORS_ONLN)
- set -o errexit - set -o errexit
@ -159,24 +142,90 @@ script:
"${SRCDIR}"/vim --not-a-term -u NONE -S "${SRCDIR}"/testdir/if_ver-2.vim -c quit > /dev/null "${SRCDIR}"/vim --not-a-term -u NONE -S "${SRCDIR}"/testdir/if_ver-2.vim -c quit > /dev/null
cat if_ver.txt cat if_ver.txt
fi fi
- make ${SHADOWOPT} ${TEST}
- echo -en "travis_fold:end:test\\r\\033[0K"
- | - |
if [[ -n "${ASAN_OPTIONS}" ]]; then if do_test make ${SHADOWOPT} ${TEST}; then
while read log; do echo -en "travis_fold:end:test\\r\\033[0K"
asan_symbolize < "${log}"
false # exit 1 if there are ASAN logs
done < <(find . -type f -name 'asan.*' -size +0)
fi fi
after_success:
- | # instead of a 2*2*8 matrix (2*os + 2*compiler + 8*env),
if [[ "${COVERAGE}" = "yes" ]]; then # exclude some builds on mac os x and linux
~/.local/bin/coveralls -b "${SRCDIR}" -x .xs -e "${SRCDIR}"/if_perl.c -e "${SRCDIR}"/xxd -e "${SRCDIR}"/libvterm --encodings utf-8 latin-1 EUC-KR # on mac os x "tiny" is always without GUI
fi # linux: 2*compiler + 5*env + mac: 2*compiler + 2*env
- | matrix:
if [[ "${COVERAGE}" = "yes" ]]; then include:
(cd "${SRCDIR}" && bash <(curl -s https://codecov.io/bash)) - <<: *osx
fi name: tiny-nogui/clang
compiler: clang
env: *tiny-nogui
- <<: *osx
name: tiny-nogui/gcc
compiler: gcc
env: *tiny-nogui
- <<: *osx
name: huge/clang
compiler: clang
env: *osx-huge
- <<: *osx
name: huge/gcc
compiler: gcc
env: *osx-huge
- <<: *linux
name: tiny-nogui/clang
compiler: clang
env: *tiny-nogui
- <<: *linux
name: tiny-nogui/gcc
compiler: gcc
env: *tiny-nogui
- <<: *linux
name: tiny/clang
compiler: clang
env: *tiny
- <<: *linux
name: tiny/gcc
compiler: gcc
env: *tiny
- <<: *linux
name: small/gcc
compiler: gcc
env: *small
- <<: *linux
name: normal/clang
compiler: clang
env: *normal
- <<: *linux
name: normal/gcc
compiler: gcc
env: *normal
- <<: *linux
name: huge+coverage/clang
compiler: clang
env: *linux-huge
after_success: *coverage
- <<: *linux
name: huge+coverage/gcc
compiler: gcc
env: *linux-huge
after_success: *coverage
- <<: *linux
name: unittests+coverage/gcc
compiler: gcc
env: *unittests
after_success: *coverage
- <<: *linux # ASAN
name: huge+asan/gcc
compiler: gcc
env:
- *linux-huge
- *asan
after_failure: *asan_symbolize
- <<: *linux
name: huge-testgui+coverage/gcc
compiler: gcc
env:
- *linux-huge
- TEST="-C src testgui"
after_success: *coverage
# vim:set sts=2 sw=2 tw=0 et: # vim:set sts=2 sw=2 tw=0 et:

View File

@ -50,6 +50,7 @@ SRC_ALL = \
src/gui_beval.c \ src/gui_beval.c \
src/hardcopy.c \ src/hardcopy.c \
src/hashtab.c \ src/hashtab.c \
src/highlight.c \
src/indent.c \ src/indent.c \
src/insexpand.c \ src/insexpand.c \
src/json.c \ src/json.c \
@ -79,6 +80,8 @@ SRC_ALL = \
src/option.c \ src/option.c \
src/option.h \ src/option.h \
src/popupmnu.c \ src/popupmnu.c \
src/popupwin.c \
src/profiler.c \
src/quickfix.c \ src/quickfix.c \
src/regexp.c \ src/regexp.c \
src/regexp_nfa.c \ src/regexp_nfa.c \
@ -87,6 +90,7 @@ SRC_ALL = \
src/search.c \ src/search.c \
src/sha256.c \ src/sha256.c \
src/sign.c \ src/sign.c \
src/sound.c \
src/spell.c \ src/spell.c \
src/spell.h \ src/spell.h \
src/spellfile.c \ src/spellfile.c \
@ -97,6 +101,7 @@ SRC_ALL = \
src/terminal.c \ src/terminal.c \
src/term.h \ src/term.h \
src/termlib.c \ src/termlib.c \
src/testing.c \
src/textprop.c \ src/textprop.c \
src/ui.c \ src/ui.c \
src/undo.c \ src/undo.c \
@ -117,9 +122,12 @@ SRC_ALL = \
src/testdir/lsan-suppress.txt \ src/testdir/lsan-suppress.txt \
src/testdir/sautest/autoload/*.vim \ src/testdir/sautest/autoload/*.vim \
src/testdir/runtest.vim \ src/testdir/runtest.vim \
src/testdir/summarize.vim \
src/testdir/check.vim \
src/testdir/shared.vim \ src/testdir/shared.vim \
src/testdir/screendump.vim \ src/testdir/screendump.vim \
src/testdir/view_util.vim \ src/testdir/view_util.vim \
src/testdir/term_util.vim \
src/testdir/setup.vim \ src/testdir/setup.vim \
src/testdir/gui_init.vim \ src/testdir/gui_init.vim \
src/testdir/setup_gui.vim \ src/testdir/setup_gui.vim \
@ -148,6 +156,8 @@ SRC_ALL = \
src/testdir/samples/test000 \ src/testdir/samples/test000 \
src/testdir/if_ver*.vim \ src/testdir/if_ver*.vim \
src/testdir/color_ramp.vim \ src/testdir/color_ramp.vim \
src/testdir/silent.wav \
src/testdir/popupbounce.vim \
src/proto.h \ src/proto.h \
src/protodef.h \ src/protodef.h \
src/proto/arabic.pro \ src/proto/arabic.pro \
@ -181,6 +191,7 @@ SRC_ALL = \
src/proto/gui_beval.pro \ src/proto/gui_beval.pro \
src/proto/hardcopy.pro \ src/proto/hardcopy.pro \
src/proto/hashtab.pro \ src/proto/hashtab.pro \
src/proto/highlight.pro \
src/proto/indent.pro \ src/proto/indent.pro \
src/proto/insexpand.pro \ src/proto/insexpand.pro \
src/proto/json.pro \ src/proto/json.pro \
@ -200,12 +211,15 @@ SRC_ALL = \
src/proto/ops.pro \ src/proto/ops.pro \
src/proto/option.pro \ src/proto/option.pro \
src/proto/popupmnu.pro \ src/proto/popupmnu.pro \
src/proto/popupwin.pro \
src/proto/profiler.pro \
src/proto/quickfix.pro \ src/proto/quickfix.pro \
src/proto/regexp.pro \ src/proto/regexp.pro \
src/proto/screen.pro \ src/proto/screen.pro \
src/proto/search.pro \ src/proto/search.pro \
src/proto/sha256.pro \ src/proto/sha256.pro \
src/proto/sign.pro \ src/proto/sign.pro \
src/proto/sound.pro \
src/proto/spell.pro \ src/proto/spell.pro \
src/proto/spellfile.pro \ src/proto/spellfile.pro \
src/proto/syntax.pro \ src/proto/syntax.pro \
@ -213,6 +227,7 @@ SRC_ALL = \
src/proto/term.pro \ src/proto/term.pro \
src/proto/terminal.pro \ src/proto/terminal.pro \
src/proto/termlib.pro \ src/proto/termlib.pro \
src/proto/testing.pro \
src/proto/textprop.pro \ src/proto/textprop.pro \
src/proto/ui.pro \ src/proto/ui.pro \
src/proto/undo.pro \ src/proto/undo.pro \
@ -531,10 +546,7 @@ SRC_AMI = \
README_amisrc.txt.info \ README_amisrc.txt.info \
src.info \ src.info \
src/INSTALLami.txt \ src/INSTALLami.txt \
src/Make_dice.mak \
src/Make_manx.mak \
src/Make_morph.mak \ src/Make_morph.mak \
src/Make_sas.mak \
src/os_amiga.c \ src/os_amiga.c \
src/os_amiga.h \ src/os_amiga.h \
src/proto/os_amiga.pro \ src/proto/os_amiga.pro \

View File

@ -47,6 +47,11 @@ Unicode true
!include gvim_version.nsh # for version number !include gvim_version.nsh # for version number
# Definition of Patch for Vim
!ifndef PATCHLEVEL
!define PATCHLEVEL 0
!endif
# ----------- No configurable settings below this line ----------- # ----------- No configurable settings below this line -----------
!include "Library.nsh" # For DLL install !include "Library.nsh" # For DLL install
@ -173,6 +178,16 @@ Page custom SetCustom ValidateCustom
!include "lang\tradchinese.nsi" !include "lang\tradchinese.nsi"
!endif !endif
##########################################################
# Version resources
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "Vim"
VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "Vim Developers"
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalTrademarks" "Vim"
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "Copyright (C) 1996"
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "Vi Improved - A Text Editor"
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "${VER_MAJOR}.${VER_MINOR}.${PATCHLEVEL}.0"
VIProductVersion "${VER_MAJOR}.${VER_MINOR}.${PATCHLEVEL}.0"
# Global variables # Global variables
Var vim_dialog Var vim_dialog

View File

@ -45,37 +45,37 @@ LangString str_type_full ${LANG_SIMPCHINESE} \
LangString str_section_old_ver ${LANG_SIMPCHINESE} \ LangString str_section_old_ver ${LANG_SIMPCHINESE} \
"卸载旧版本" "卸载旧版本"
LangString str_desc_old_ver ${LANG_SIMPCHINESE} \ LangString str_desc_old_ver ${LANG_SIMPCHINESE} \
"卸载系统上旧版本的 Vim" "卸载系统上已存在的 Vim 版本"
LangString str_section_exe ${LANG_SIMPCHINESE} \ LangString str_section_exe ${LANG_SIMPCHINESE} \
"安装 Vim 图形界面" "安装 Vim 图形界面"
LangString str_desc_exe ${LANG_SIMPCHINESE} \ LangString str_desc_exe ${LANG_SIMPCHINESE} \
"安装 Vim 图形界面及脚本。此为必选安装" "安装 Vim 图形界面及运行时文件。此为必选。"
LangString str_section_console ${LANG_SIMPCHINESE} \ LangString str_section_console ${LANG_SIMPCHINESE} \
"安装 Vim 命令行程序" "安装 Vim 控制台版本"
LangString str_desc_console ${LANG_SIMPCHINESE} \ LangString str_desc_console ${LANG_SIMPCHINESE} \
"安装 Vim 命令行程序 (vim.exe)。该程序在命令行窗口中运行" "安装 Vim 的控制台版本vim.exe"
LangString str_section_batch ${LANG_SIMPCHINESE} \ LangString str_section_batch ${LANG_SIMPCHINESE} \
"安装批处理文件" "安装批处理文件"
LangString str_desc_batch ${LANG_SIMPCHINESE} \ LangString str_desc_batch ${LANG_SIMPCHINESE} \
"为 Vim 的各种变体创建批处理程序,以便在命令行下运行 Vim。" "为 Vim 的各种变体创建批处理文件,以便在命令行下运行 Vim。"
LangString str_group_icons ${LANG_SIMPCHINESE} \ LangString str_group_icons ${LANG_SIMPCHINESE} \
"创建 Vim 图标" "创建图标"
LangString str_desc_icons ${LANG_SIMPCHINESE} \ LangString str_desc_icons ${LANG_SIMPCHINESE} \
"为 Vim 创建若干图标,以方便使用 Vim。" "为 Vim 创建若干图标,以方便使用 Vim。"
LangString str_section_desktop ${LANG_SIMPCHINESE} \ LangString str_section_desktop ${LANG_SIMPCHINESE} \
"桌面" "桌面图标"
LangString str_desc_desktop ${LANG_SIMPCHINESE} \ LangString str_desc_desktop ${LANG_SIMPCHINESE} \
"在桌面上为 Vim 创建若干图标,以方便启动 Vim" "创建 Vim 的桌面快捷方式图标"
LangString str_section_start_menu ${LANG_SIMPCHINESE} \ LangString str_section_start_menu ${LANG_SIMPCHINESE} \
"在启动菜单程序菜单下" "「开始」菜单程序"
LangString str_desc_start_menu ${LANG_SIMPCHINESE} \ LangString str_desc_start_menu ${LANG_SIMPCHINESE} \
"启动菜单的程序菜单下添加 Vim 组。适用于 Windows 95 及以上版本" "开始菜单中添加 Vim 程序组(适用于 Windows 95 及以上版本"
#LangString str_section_quick_launch ${LANG_SIMPCHINESE} \ #LangString str_section_quick_launch ${LANG_SIMPCHINESE} \
# "在快速启动启动栏中" # "在快速启动启动栏中"
@ -83,9 +83,9 @@ LangString str_desc_start_menu ${LANG_SIMPCHINESE} \
# "在快速启动栏中添加 Vim 图标。" # "在快速启动栏中添加 Vim 图标。"
LangString str_section_edit_with ${LANG_SIMPCHINESE} \ LangString str_section_edit_with ${LANG_SIMPCHINESE} \
"安装快捷菜单" "添加到快捷菜单"
LangString str_desc_edit_with ${LANG_SIMPCHINESE} \ LangString str_desc_edit_with ${LANG_SIMPCHINESE} \
"将 Vim 添加到“打开方式”快捷菜单中。" "“用 Vim 编辑”添加到快捷菜单中。"
#LangString str_section_edit_with32 ${LANG_SIMPCHINESE} \ #LangString str_section_edit_with32 ${LANG_SIMPCHINESE} \
# "32 位版本" # "32 位版本"
@ -98,10 +98,10 @@ LangString str_desc_edit_with ${LANG_SIMPCHINESE} \
# "将 Vim 添加到 64 位程序的“打开方式”快捷菜单中。" # "将 Vim 添加到 64 位程序的“打开方式”快捷菜单中。"
LangString str_section_vim_rc ${LANG_SIMPCHINESE} \ LangString str_section_vim_rc ${LANG_SIMPCHINESE} \
"创建缺省配置文件" "创建默认配置文件"
LangString str_desc_vim_rc ${LANG_SIMPCHINESE} \ LangString str_desc_vim_rc ${LANG_SIMPCHINESE} \
"在安装目录下生成缺省的 Vim 配置文件(_vimrc)。\ "在安装目录下生成默认的 Vim 配置文件(_vimrc)。\
如果该文件已经存在,则略过此项。" 如果该文件已经存在,则跳过该项。"
LangString str_group_plugin ${LANG_SIMPCHINESE} \ LangString str_group_plugin ${LANG_SIMPCHINESE} \
"创建插件目录" "创建插件目录"
@ -121,9 +121,9 @@ LangString str_desc_plugin_vim ${LANG_SIMPCHINESE} \
该目录下的扩展插件。" 该目录下的扩展插件。"
LangString str_section_vis_vim ${LANG_SIMPCHINESE} \ LangString str_section_vis_vim ${LANG_SIMPCHINESE} \
"安装 VisVim 插件" "VisVim 插件"
LangString str_desc_vis_vim ${LANG_SIMPCHINESE} \ LangString str_desc_vis_vim ${LANG_SIMPCHINESE} \
"安装用于与微软 Microsoft Visual Studio 进行集成的 VisVim 插件。" "安装 Visual Studio 集成的 VisVim 插件。"
LangString str_section_nls ${LANG_SIMPCHINESE} \ LangString str_section_nls ${LANG_SIMPCHINESE} \
"安装多语言支持" "安装多语言支持"
@ -153,12 +153,12 @@ LangString str_desc_rm_plugin_home ${LANG_SIMPCHINESE} \
LangString str_unsection_plugin_vim ${LANG_SIMPCHINESE} \ LangString str_unsection_plugin_vim ${LANG_SIMPCHINESE} \
"公共插件目录" "公共插件目录"
LangString str_desc_rm_plugin_vim ${LANG_SIMPCHINESE} \ LangString str_desc_rm_plugin_vim ${LANG_SIMPCHINESE} \
"Remove the plugin directories from Vim install directory." "从 Vim 安装目录下移除插件目录。"
LangString str_unsection_rootdir ${LANG_SIMPCHINESE} \ LangString str_unsection_rootdir ${LANG_SIMPCHINESE} \
"Remove the Vim root directory" "移除 Vim 主目录"
LangString str_desc_rm_rootdir ${LANG_SIMPCHINESE} \ LangString str_desc_rm_rootdir ${LANG_SIMPCHINESE} \
"Remove the Vim root directory. It contains your Vim configuration files!" "移除 Vim 的主目录,该目录包含您的配置文件!"
############################################################################## ##############################################################################
@ -225,13 +225,13 @@ LangString str_msg_rm_exe_fail ${LANG_SIMPCHINESE} \
# 该目录下仍有其他文件。" # 该目录下仍有其他文件。"
LangString str_msg_uninstalling ${LANG_SIMPCHINESE} \ LangString str_msg_uninstalling ${LANG_SIMPCHINESE} \
"Uninstalling the old version..." "正在卸载旧版本..."
LangString str_msg_registering ${LANG_SIMPCHINESE} \ LangString str_msg_registering ${LANG_SIMPCHINESE} \
"Registering..." "正在注册..."
LangString str_msg_unregistering ${LANG_SIMPCHINESE} \ LangString str_msg_unregistering ${LANG_SIMPCHINESE} \
"Unregistering..." "正在取消注册..."
############################################################################## ##############################################################################
@ -239,12 +239,12 @@ LangString str_msg_unregistering ${LANG_SIMPCHINESE} \
############################################################################## ##############################################################################
LangString str_vimrc_page_title ${LANG_SIMPCHINESE} \ LangString str_vimrc_page_title ${LANG_SIMPCHINESE} \
"Choose _vimrc settings" "设置 _vimrc"
LangString str_vimrc_page_subtitle ${LANG_SIMPCHINESE} \ LangString str_vimrc_page_subtitle ${LANG_SIMPCHINESE} \
"Choose the settings for enhancement, keyboard and mouse." "选择键盘、鼠标和增强选项。"
LangString str_msg_compat_title ${LANG_SIMPCHINESE} \ LangString str_msg_compat_title ${LANG_SIMPCHINESE} \
" Vi / Vim behavior " "Vi / Vim 行为"
LangString str_msg_compat_desc ${LANG_SIMPCHINESE} \ LangString str_msg_compat_desc ${LANG_SIMPCHINESE} \
"&Compatibility and enhancements" "&Compatibility and enhancements"
LangString str_msg_compat_vi ${LANG_SIMPCHINESE} \ LangString str_msg_compat_vi ${LANG_SIMPCHINESE} \
@ -257,7 +257,7 @@ LangString str_msg_compat_all ${LANG_SIMPCHINESE} \
"Vim with all enhancements (load vimrc_example.vim) (Default)" "Vim with all enhancements (load vimrc_example.vim) (Default)"
LangString str_msg_keymap_title ${LANG_SIMPCHINESE} \ LangString str_msg_keymap_title ${LANG_SIMPCHINESE} \
" Mappings " "键盘映射"
LangString str_msg_keymap_desc ${LANG_SIMPCHINESE} \ LangString str_msg_keymap_desc ${LANG_SIMPCHINESE} \
"&Remap a few keys for Windows (Ctrl-V, Ctrl-C, Ctrl-A, Ctrl-S, Ctrl-F, etc)" "&Remap a few keys for Windows (Ctrl-V, Ctrl-C, Ctrl-A, Ctrl-S, Ctrl-F, etc)"
LangString str_msg_keymap_default ${LANG_SIMPCHINESE} \ LangString str_msg_keymap_default ${LANG_SIMPCHINESE} \
@ -266,7 +266,7 @@ LangString str_msg_keymap_windows ${LANG_SIMPCHINESE} \
"Remap a few keys" "Remap a few keys"
LangString str_msg_mouse_title ${LANG_SIMPCHINESE} \ LangString str_msg_mouse_title ${LANG_SIMPCHINESE} \
" Mouse " "鼠标"
LangString str_msg_mouse_desc ${LANG_SIMPCHINESE} \ LangString str_msg_mouse_desc ${LANG_SIMPCHINESE} \
"&Behavior of right and left buttons" "&Behavior of right and left buttons"
LangString str_msg_mouse_default ${LANG_SIMPCHINESE} \ LangString str_msg_mouse_default ${LANG_SIMPCHINESE} \

View File

@ -1,13 +1,14 @@
" This script tests a color scheme for some errors. Load the scheme and source " This script tests a color scheme for some errors and lists potential errors.
" this script. e.g. :e colors/desert.vim | :so check_colors.vim " Load the scheme and source this script, like this:
" Will output possible errors. " :edit colors/desert.vim | :so colors/tools/check_colors.vim
let s:save_cpo= &cpo let s:save_cpo= &cpo
set cpo&vim set cpo&vim
func! Test_check_colors() func! Test_check_colors()
let l:savedview = winsaveview()
call cursor(1,1) call cursor(1,1)
let err={} let err = {}
" 1) Check g:colors_name is existing " 1) Check g:colors_name is existing
if !search('\<\%(g:\)\?colors_name\>', 'cnW') if !search('\<\%(g:\)\?colors_name\>', 'cnW')
@ -17,48 +18,115 @@ func! Test_check_colors()
endif endif
" 2) Check for some well-defined highlighting groups " 2) Check for some well-defined highlighting groups
" Some items, check several groups, e.g. Diff, Spell let hi_groups = [
let hi_groups = ['ColorColumn', 'Diff', 'ErrorMsg', 'Folded', \ 'ColorColumn',
\ 'FoldColumn', 'IncSearch', 'LineNr', 'ModeMsg', 'MoreMsg', 'NonText', \ 'Comment',
\ 'Normal', 'Pmenu', 'Todo', 'Search', 'Spell', 'StatusLine', 'TabLine', \ 'Conceal',
\ 'Title', 'Visual', 'WarningMsg', 'WildMenu'] \ 'Constant',
let groups={} \ 'Cursor',
\ 'CursorColumn',
\ 'CursorLine',
\ 'CursorLineNr',
\ 'DiffAdd',
\ 'DiffChange',
\ 'DiffDelete',
\ 'DiffText',
\ 'Directory',
\ 'EndOfBuffer',
\ 'Error',
\ 'ErrorMsg',
\ 'FoldColumn',
\ 'Folded',
\ 'Identifier',
\ 'Ignore',
\ 'IncSearch',
\ 'LineNr',
\ 'MatchParen',
\ 'ModeMsg',
\ 'MoreMsg',
\ 'NonText',
\ 'Normal',
\ 'Pmenu',
\ 'PmenuSbar',
\ 'PmenuSel',
\ 'PmenuThumb',
\ 'PreProc',
\ 'Question',
\ 'QuickFixLine',
\ 'Search',
\ 'SignColumn',
\ 'Special',
\ 'SpecialKey',
\ 'SpellBad',
\ 'SpellCap',
\ 'SpellLocal',
\ 'SpellRare',
\ 'Statement',
\ 'StatusLine',
\ 'StatusLineNC',
\ 'StatusLineTerm',
\ 'StatusLineTermNC',
\ 'TabLine',
\ 'TabLineFill',
\ 'TabLineSel',
\ 'Title',
\ 'Todo',
\ 'ToolbarButton',
\ 'ToolbarLine',
\ 'Type',
\ 'Underlined',
\ 'VertSplit',
\ 'Visual',
\ 'VisualNOS',
\ 'WarningMsg',
\ 'WildMenu',
\ ]
let groups = {}
for group in hi_groups for group in hi_groups
if search('\c@suppress\s\+'.group, 'cnW') if search('\c@suppress\s\+\<' .. group .. '\>', 'cnW')
" skip check, if the script contains a line like " skip check, if the script contains a line like
" @suppress Visual: " @suppress Visual:
let groups[group] = 'Ignoring '.group
continue continue
endif endif
if !search('hi\%[ghlight] \+'.group, 'cnW') if search('hi\%[ghlight]!\= \+link \+' .. group, 'cnW') " Linked group
let groups[group] = 'No highlight definition for '.group
continue continue
endif endif
if !search('hi\%[ghlight] \+'.group. '.*fg=', 'cnW') if !search('hi\%[ghlight] \+\<' .. group .. '\>', 'cnW')
let groups[group] = 'Missing foreground color for '.group let groups[group] = 'No highlight definition for ' .. group
continue continue
endif endif
if search('hi\%[ghlight] \+'.group. '.*guibg=', 'cnW') && if !search('hi\%[ghlight] \+\<' .. group .. '\>.*[bf]g=', 'cnW')
\ !search('hi\%[ghlight] \+'.group. '.*ctermbg=', 'cnW') let groups[group] = 'Missing foreground or background color for ' .. group
let groups[group] = 'Missing bg terminal color for '.group
continue continue
endif endif
call search('hi\%[ghlight] \+'.group, 'cW') if search('hi\%[ghlight] \+\<' .. group .. '\>.*guibg=', 'cnW') &&
" only check in the current line \ !search('hi\%[ghlight] \+\<' .. group .. '\>.*ctermbg=', 'cnW')
if !search('guifg', 'cnW', line('.')) || !search('ctermfg', 'cnW', line('.')) \ && group != 'Cursor'
" do not check for background colors, they could be intentionally left out let groups[group] = 'Missing bg terminal color for ' .. group
let groups[group] = 'Missing fg definition for '.group continue
endif endif
if !search('hi\%[ghlight] \+\<' .. group .. '\>.*guifg=', 'cnW')
\ && group !~ '^Diff'
let groups[group] = 'Missing guifg definition for ' .. group
continue
endif
if !search('hi\%[ghlight] \+\<' .. group .. '\>.*ctermfg=', 'cnW')
\ && group !~ '^Diff'
\ && group != 'Cursor'
let groups[group] = 'Missing ctermfg definition for ' .. group
continue
endif
" do not check for background colors, they could be intentionally left out
call cursor(1,1) call cursor(1,1)
endfor endfor
let err['highlight'] = groups let err['highlight'] = groups
" 3) Check, that it does not set background highlighting " 3) Check, that it does not set background highlighting
" Doesn't ':hi Normal ctermfg=253 ctermfg=233' also set the background sometimes? " Doesn't ':hi Normal ctermfg=253 ctermfg=233' also set the background sometimes?
let bg_set='\(set\?\|setl\(ocal\)\?\) .*\(background\|bg\)=\(dark\|light\)' let bg_set = '\(set\?\|setl\(ocal\)\?\) .*\(background\|bg\)=\(dark\|light\)'
let bg_let='let \%([&]\%([lg]:\)\?\)\%(background\|bg\)\s*=\s*\([''"]\?\)\w\+\1' let bg_let = 'let \%([&]\%([lg]:\)\?\)\%(background\|bg\)\s*=\s*\([''"]\?\)\w\+\1'
let bg_pat='\%('.bg_set. '\|'.bg_let.'\)' let bg_pat = '\%(' .. bg_set .. '\|' .. bg_let .. '\)'
let line=search(bg_pat, 'cnW') let line = search(bg_pat, 'cnW')
if search(bg_pat, 'cnW') if search(bg_pat, 'cnW')
exe line exe line
if search('hi \U\w\+\s\+\S', 'cbnW') if search('hi \U\w\+\s\+\S', 'cbnW')
@ -80,7 +148,7 @@ func! Test_check_colors()
" if exists("syntax_on") " if exists("syntax_on")
" syntax reset " syntax reset
" endif " endif
let pat='hi\%[ghlight]\s*clear\n\s*if\s*exists(\([''"]\)syntax_on\1)\n\s*syn\%[tax]\s*reset\n\s*endif' let pat = 'hi\%[ghlight]\s*clear\n\s*if\s*exists(\([''"]\)syntax_on\1)\n\s*syn\%[tax]\s*reset\n\s*endif'
if !search(pat, 'cnW') if !search(pat, 'cnW')
let err['init'] = 'No initialization' let err['init'] = 'No initialization'
endif endif
@ -91,15 +159,43 @@ func! Test_check_colors()
endif endif
" 7) Does not define filetype specific groups like vimCommand, htmlTag, " 7) Does not define filetype specific groups like vimCommand, htmlTag,
let hi_groups = ['vim', 'html', 'python', 'sh', 'ruby'] let hi_groups = filter(getcompletion('', 'filetype'), { _,v -> v !~# '\%[no]syn\%(color\|load\|tax\)' })
let ft_groups = []
" let group = '\%('.join(hi_groups, '\|').'\)' " More efficient than a for loop, but less informative
for group in hi_groups for group in hi_groups
let pat='\Chi\%[ghlight]\s*\zs'.group.'\w\+\>' let pat = '\Chi\%[ghlight]!\= *\%[link] \+\zs' .. group .. '\w\+\>\ze \+.' " Skips `hi clear`
if search(pat, 'cW')
call add(ft_groups, matchstr(getline('.'), pat))
endif
call cursor(1,1)
endfor
if !empty(ft_groups)
let err['filetype'] = get(err, 'filetype', 'Should not define: ') . join(uniq(sort(ft_groups)))
endif
" 8) Were debugPC and debugBreakpoint defined?
for group in ['debugPC', 'debugBreakpoint']
let pat = '\Chi\%[ghlight]!\= *\%[link] \+\zs' .. group .. '\>'
if search(pat, 'cnW') if search(pat, 'cnW')
let line = search(pat, 'cW') let line = search(pat, 'cW')
let err['filetype'] = get(err, 'filetype', 'Should not define: ') . matchstr(getline('.'), pat). ' ' let err['filetype'] = get(err, 'filetype', 'Should not define: ') . matchstr(getline('.'), pat). ' '
endif endif
call cursor(1,1) call cursor(1,1)
endfor endfor
" 9) Normal should be defined first, not use reverse, fg or bg
call cursor(1,1)
let pat = 'hi\%[light] \+\%(link\|clear\)\@!\w\+\>'
call search(pat, 'cW') " Look for the first hi def, skipping `hi link` and `hi clear`
if getline('.') !~# '\m\<Normal\>'
let err['highlight']['Normal'] = 'Should be defined first'
elseif getline('.') =~# '\m\%(=\%(fg\|bg\)\)'
let err['highlight']['Normal'] = "Should not use 'fg' or 'bg'"
elseif getline('.') =~# '\m=\%(inv\|rev\)erse'
let err['highlight']['Normal'] = 'Should not use reverse mode'
endif
call winrestview(l:savedview)
let g:err = err let g:err = err
" print Result " print Result
@ -107,11 +203,11 @@ func! Test_check_colors()
endfu endfu
fu! Result(err) fu! Result(err)
let do_roups = 0 let do_groups = 0
echohl Title|echomsg "---------------"|echohl Normal echohl Title|echomsg "---------------"|echohl Normal
for key in sort(keys(a:err)) for key in sort(keys(a:err))
if key is# 'highlight' if key is# 'highlight'
let do_groups = 1 let do_groups = !empty(a:err[key])
continue continue
else else
if a:err[key] !~ 'OK' if a:err[key] !~ 'OK'

View File

@ -2,6 +2,8 @@
" Compiler: GNU C Compiler " Compiler: GNU C Compiler
" Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2010-10-14 " Latest Revision: 2010-10-14
" changed pattern for entering/leaving directories
" by Daniel Hahler, 2019 Jul 12
" added line suggested by Anton Lindqvist 2016 Mar 31 " added line suggested by Anton Lindqvist 2016 Mar 31
if exists("current_compiler") if exists("current_compiler")
@ -27,10 +29,10 @@ CompilerSet errorformat=
\%f:%l:\ %m, \%f:%l:\ %m,
\%f:\\(%*[^\\)]\\):\ %m, \%f:\\(%*[^\\)]\\):\ %m,
\\"%f\"\\,\ line\ %l%*\\D%c%*[^\ ]\ %m, \\"%f\"\\,\ line\ %l%*\\D%c%*[^\ ]\ %m,
\%D%*\\a[%*\\d]:\ Entering\ directory\ [`']%f', \%D%*\\a[%*\\d]:\ Entering\ directory\ %*[`']%f',
\%X%*\\a[%*\\d]:\ Leaving\ directory\ [`']%f', \%X%*\\a[%*\\d]:\ Leaving\ directory\ %*[`']%f',
\%D%*\\a:\ Entering\ directory\ [`']%f', \%D%*\\a:\ Entering\ directory\ %*[`']%f',
\%X%*\\a:\ Leaving\ directory\ [`']%f', \%X%*\\a:\ Leaving\ directory\ %*[`']%f',
\%DMaking\ %*\\a\ in\ %f \%DMaking\ %*\\a\ in\ %f
if exists('g:compiler_gcc_ignore_unmatched_lines') if exists('g:compiler_gcc_ignore_unmatched_lines')

View File

@ -1,7 +1,11 @@
" Vim Compiler File " Vim Compiler File
" Compiler: ocaml " Compiler: ocaml
" Maintainer: See ftplugin/ocaml.vim (?) " Maintainer: Markus Mottl <markus.mottl@gmail.com>
" Last Change: June 2013 by Marc Weber " URL: https://github.com/rgrinberg/vim-ocaml
" Last Change:
" 2017 Nov 26 - Improved error format (Markus Mottl)
" 2013 Aug 27 - Added a new OCaml error format (Markus Mottl)
" 2013 Jun 30 - Initial version (Marc Weber)
" "
" Marc Weber's comments: " Marc Weber's comments:
" Setting makeprg doesn't make sense, because there is ocamlc, ocamlopt, " Setting makeprg doesn't make sense, because there is ocamlc, ocamlopt,
@ -17,7 +21,6 @@
" "
" So having it here makes people opt-in " So having it here makes people opt-in
if exists("current_compiler") if exists("current_compiler")
finish finish
endif endif
@ -28,6 +31,7 @@ set cpo&vim
CompilerSet errorformat = CompilerSet errorformat =
\%EFile\ \"%f\"\\,\ line\ %l\\,\ characters\ %c-%*\\d:, \%EFile\ \"%f\"\\,\ line\ %l\\,\ characters\ %c-%*\\d:,
\%EFile\ \"%f\"\\,\ line\ %l\\,\ characters\ %c-%*\\d\ %.%#,
\%EFile\ \"%f\"\\,\ line\ %l\\,\ character\ %c:%m, \%EFile\ \"%f\"\\,\ line\ %l\\,\ character\ %c:%m,
\%+EReference\ to\ unbound\ regexp\ name\ %m, \%+EReference\ to\ unbound\ regexp\ name\ %m,
\%Eocamlyacc:\ e\ -\ line\ %l\ of\ \"%f\"\\,\ %m, \%Eocamlyacc:\ e\ -\ line\ %l\ of\ \"%f\"\\,\ %m,
@ -38,6 +42,12 @@ CompilerSet errorformat =
\%X%*\\a[%*\\d]:\ Leaving\ directory\ `%f', \%X%*\\a[%*\\d]:\ Leaving\ directory\ `%f',
\%D%*\\a:\ Entering\ directory\ `%f', \%D%*\\a:\ Entering\ directory\ `%f',
\%X%*\\a:\ Leaving\ directory\ `%f', \%X%*\\a:\ Leaving\ directory\ `%f',
\%D%*\\a[%*\\d]:\ Entering\ directory\ '%f',
\%X%*\\a[%*\\d]:\ Leaving\ directory\ '%f',
\%D%*\\a:\ Entering\ directory\ '%f',
\%X%*\\a:\ Leaving\ directory\ '%f',
\%DEntering\ directory\ '%f',
\%XLeaving\ directory\ '%f',
\%DMaking\ %*\\a\ in\ %f \%DMaking\ %*\\a\ in\ %f
let &cpo = s:cpo_save let &cpo = s:cpo_save

View File

@ -1,4 +1,4 @@
*autocmd.txt* For Vim version 8.1. Last change: 2019 May 05 *autocmd.txt* For Vim version 8.1. Last change: 2019 Jun 26
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -407,8 +407,8 @@ BufFilePost After changing the name of the current buffer
BufFilePre Before changing the name of the current buffer BufFilePre Before changing the name of the current buffer
with the ":file" or ":saveas" command. with the ":file" or ":saveas" command.
*BufHidden* *BufHidden*
BufHidden Just after a buffer has become hidden. That BufHidden Just before a buffer becomes hidden. That is,
is, when there are no longer windows that show when there are no longer windows that show
the buffer, but the buffer is not unloaded or the buffer, but the buffer is not unloaded or
deleted. Not used for ":qa" or ":q" when deleted. Not used for ":qa" or ":q" when
exiting Vim. exiting Vim.
@ -873,15 +873,32 @@ MenuPopup Just before showing the popup menu (under the
*OptionSet* *OptionSet*
OptionSet After setting an option. The pattern is OptionSet After setting an option. The pattern is
matched against the long option name. matched against the long option name.
The |v:option_old| variable indicates the |<amatch>| indicates what option has been set.
old option value, |v:option_new| variable
indicates the newly set value, the
|v:option_type| variable indicates whether
it's global or local scoped and |<amatch>|
indicates what option has been set.
Is not triggered on startup and for the 'key' |v:option_type| indicates whether it's global
option for obvious reasons. or local scoped.
|v:option_command| indicates what type of
set/let command was used (follow the tag to
see the table).
|v:option_new| indicates the newly set value.
|v:option_oldlocal| has the old local value.
|v:option_oldglobal| has the old global value.
|v:option_old| indicates the old option value.
|v:option_oldlocal| is only set when |:set|
or |:setlocal| or a |modeline| was used to set
the option. Similarly |v:option_oldglobal| is
only set when |:set| or |:setglobal| was used.
Note that when setting a |global-local| string
option with |:set|, then |v:option_old| is the
old global value. However, for all other kinds
of options (local string options, global-local
number options, ...) it is the old local
value.
OptionSet is not triggered on startup and for
the 'key' option for obvious reasons.
Usage example: Check for the existence of the Usage example: Check for the existence of the
directory in the 'backupdir' and 'undodir' directory in the 'backupdir' and 'undodir'
@ -1365,7 +1382,7 @@ have changed autocommands, or when Vim has executed the wrong autocommands
Note that the 'eventignore' option applies here too. Events listed in this Note that the 'eventignore' option applies here too. Events listed in this
option will not cause any commands to be executed. option will not cause any commands to be executed.
*:do* *:doau* *:doautocmd* *E217* *:do* *:doau* *:doaut* *:doautocmd* *E217*
:do[autocmd] [<nomodeline>] [group] {event} [fname] :do[autocmd] [<nomodeline>] [group] {event} [fname]
Apply the autocommands matching [fname] (default: Apply the autocommands matching [fname] (default:
current file name) for {event} to the current buffer. current file name) for {event} to the current buffer.

View File

@ -1,4 +1,4 @@
*change.txt* For Vim version 8.1. Last change: 2019 May 07 *change.txt* For Vim version 8.1. Last change: 2019 Jul 04
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -1179,9 +1179,9 @@ There are ten types of registers: *registers* *E354*
2. 10 numbered registers "0 to "9 2. 10 numbered registers "0 to "9
3. The small delete register "- 3. The small delete register "-
4. 26 named registers "a to "z or "A to "Z 4. 26 named registers "a to "z or "A to "Z
5. three read-only registers ":, "., "% 5. Three read-only registers ":, "., "%
6. alternate buffer register "# 6. Alternate buffer register "#
7. the expression register "= 7. The expression register "=
8. The selection and drop registers "*, "+ and "~ 8. The selection and drop registers "*, "+ and "~
9. The black hole register "_ 9. The black hole register "_
10. Last search pattern register "/ 10. Last search pattern register "/

View File

@ -1,4 +1,4 @@
*channel.txt* For Vim version 8.1. Last change: 2019 May 05 *channel.txt* For Vim version 8.1. Last change: 2019 May 12
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -155,7 +155,10 @@ Use |ch_status()| to see if the channel could be opened.
func MyCloseHandler(channel) func MyCloseHandler(channel)
< Vim will invoke callbacks that handle data before invoking < Vim will invoke callbacks that handle data before invoking
close_cb, thus when this function is called no more data will close_cb, thus when this function is called no more data will
be passed to the callbacks. be passed to the callbacks. However, if a callback causes Vim
to check for messages, the close_cb may be invoked while still
in the callback. The plugin must handle this somehow, it can
be useful to know that no more data is coming.
*channel-drop* *channel-drop*
"drop" Specifies when to drop messages: "drop" Specifies when to drop messages:
"auto" When there is no callback to handle a message. "auto" When there is no callback to handle a message.

View File

@ -1,4 +1,4 @@
*debugger.txt* For Vim version 8.1. Last change: 2019 May 05 *debugger.txt* For Vim version 8.1. Last change: 2019 Jul 06
VIM REFERENCE MANUAL by Gordon Prieur VIM REFERENCE MANUAL by Gordon Prieur
@ -6,6 +6,10 @@
Debugger Support Features *debugger-support* Debugger Support Features *debugger-support*
These features are for integration with a debugger or an Integrated
Programming Environment (IPE) or Integrated Development Environment (IDE).
For the debugger running in a Vim terminal window see |terminal-debugger|.
1. Debugger Features |debugger-features| 1. Debugger Features |debugger-features|
2. Vim Compile Options |debugger-compilation| 2. Vim Compile Options |debugger-compilation|
3. Integrated Debuggers |debugger-integration| 3. Integrated Debuggers |debugger-integration|
@ -14,9 +18,7 @@ Debugger Support Features *debugger-support*
============================================================================== ==============================================================================
1. Debugger Features *debugger-features* 1. Debugger Features *debugger-features*
The following features are available for an integration with a debugger or The following features are available:
an Integrated Programming Environment (IPE) or Integrated Development
Environment (IDE):
Alternate Command Input |alt-input| Alternate Command Input |alt-input|
Debug Signs |debug-signs| Debug Signs |debug-signs|
@ -87,7 +89,11 @@ This feature allows a debugger, or other external tool, to display dynamic
information based on where the mouse is pointing. The purpose of this feature information based on where the mouse is pointing. The purpose of this feature
was to allow Sun's Visual WorkShop debugger to display expression evaluations. was to allow Sun's Visual WorkShop debugger to display expression evaluations.
However, the feature was implemented in as general a manner as possible and However, the feature was implemented in as general a manner as possible and
could be used for displaying other information as well. could be used for displaying other information as well. The functionality is
limited though, for advanced popups see |popup-window|.
Another way to use the balloon is with the 'balloonexpr' option. This is
completely user definable.
The Balloon Evaluation has some settable parameters too. For Motif the font The Balloon Evaluation has some settable parameters too. For Motif the font
list and colors can be set via X resources (XmNballoonEvalFontList, list and colors can be set via X resources (XmNballoonEvalFontList,
@ -105,9 +111,6 @@ The Balloon evaluation functions are also used to show a tooltip for the
toolbar. The 'ballooneval' option does not need to be set for this. But the toolbar. The 'ballooneval' option does not need to be set for this. But the
other settings apply. other settings apply.
Another way to use the balloon is with the 'balloonexpr' option. This is
completely user definable.
============================================================================== ==============================================================================
2. Vim Compile Options *debugger-compilation* 2. Vim Compile Options *debugger-compilation*

View File

@ -1,4 +1,4 @@
*diff.txt* For Vim version 8.1. Last change: 2019 May 04 *diff.txt* For Vim version 8.1. Last change: 2019 Jun 02
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -185,7 +185,7 @@ hidden buffers. You can use ":hide" to close a window without unloading the
buffer. If you don't want a buffer to remain used for the diff do ":set buffer. If you don't want a buffer to remain used for the diff do ":set
nodiff" before hiding it. nodiff" before hiding it.
*:dif* *:diffupdate* *:dif* *:diff* *:diffupdate*
:dif[fupdate][!] Update the diff highlighting and folds. :dif[fupdate][!] Update the diff highlighting and folds.
Vim attempts to keep the differences updated when you make changes to the Vim attempts to keep the differences updated when you make changes to the

View File

@ -1,7 +1,8 @@
/* vim:set ts=4 sw=4: /* vim:set ts=4 sw=4:
* this program makes a tags file for vim_ref.txt
* *
* Usage: doctags vim_ref.txt vim_win.txt ... >tags * This program makes a tags file for help text.
*
* Usage: doctags *.txt ... >tags
* *
* A tag in this context is an identifier between stars, e.g. *c_files* * A tag in this context is an identifier between stars, e.g. *c_files*
*/ */

View File

@ -1,4 +1,4 @@
*editing.txt* For Vim version 8.1. Last change: 2019 May 07 *editing.txt* For Vim version 8.1. Last change: 2019 Jun 10
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -593,7 +593,7 @@ You can use the argument list with the following commands, and with the
expression functions |argc()| and |argv()|. These all work on the argument expression functions |argc()| and |argv()|. These all work on the argument
list of the current window. list of the current window.
*:ar* *:args* *:ar* *:arg* *:args*
:ar[gs] Print the argument list, with the current file in :ar[gs] Print the argument list, with the current file in
square brackets. square brackets.

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
*fold.txt* For Vim version 8.1. Last change: 2019 May 05 *fold.txt* For Vim version 8.1. Last change: 2019 Jun 02
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -441,7 +441,7 @@ zk Move upwards to the end of the previous fold. A closed fold
EXECUTING COMMANDS ON FOLDS ~ EXECUTING COMMANDS ON FOLDS ~
:[range]foldd[oopen] {cmd} *:foldd* *:folddoopen* :[range]foldd[oopen] {cmd} *:foldd* *:folddo* *:folddoopen*
Execute {cmd} on all lines that are not in a closed fold. Execute {cmd} on all lines that are not in a closed fold.
When [range] is given, only these lines are used. When [range] is given, only these lines are used.
Each time {cmd} is executed the cursor is positioned on the Each time {cmd} is executed the cursor is positioned on the

View File

@ -1,4 +1,4 @@
*gui.txt* For Vim version 8.1. Last change: 2019 May 05 *gui.txt* For Vim version 8.1. Last change: 2019 May 20
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -1046,7 +1046,7 @@ GUIFONT *gui-font*
'guifont' is the option that tells Vim what font to use. In its simplest form 'guifont' is the option that tells Vim what font to use. In its simplest form
the value is just one font name. It can also be a list of font names the value is just one font name. It can also be a list of font names
separated with commas. The first valid font is used. When no valid font can separated with commas. The first valid font is used. When no valid font can
be found you will get an error message. be found you will get an error message.
On systems where 'guifontset' is supported (X11) and 'guifontset' is not On systems where 'guifontset' is supported (X11) and 'guifontset' is not
empty, then 'guifont' is not used. See |xfontset|. empty, then 'guifont' is not used. See |xfontset|.
@ -1112,10 +1112,9 @@ For the Win32 GUI *E244* *E245*
cXX - character set XX. Valid charsets are: ANSI, ARABIC, BALTIC, cXX - character set XX. Valid charsets are: ANSI, ARABIC, BALTIC,
CHINESEBIG5, DEFAULT, EASTEUROPE, GB2312, GREEK, HANGEUL, CHINESEBIG5, DEFAULT, EASTEUROPE, GB2312, GREEK, HANGEUL,
HEBREW, JOHAB, MAC, OEM, RUSSIAN, SHIFTJIS, SYMBOL, THAI, HEBREW, JOHAB, MAC, OEM, RUSSIAN, SHIFTJIS, SYMBOL, THAI,
TURKISH, VIETNAMESE ANSI and BALTIC. Normally you would use TURKISH and VIETNAMESE. Normally you would use "cDEFAULT".
"cDEFAULT".
qXX - quality XX. Valid quality names are: PROOF, DRAFT, ANTIALIASED, qXX - quality XX. Valid quality names are: PROOF, DRAFT, ANTIALIASED,
NONANTIALIASED, CLEARTYPE, DEFAULT. Normally you would use NONANTIALIASED, CLEARTYPE and DEFAULT. Normally you would use
"qDEFAULT". "qDEFAULT".
Some quality values are not supported in legacy OSs. Some quality values are not supported in legacy OSs.
- A '_' can be used in the place of a space, so you don't need to use - A '_' can be used in the place of a space, so you don't need to use
@ -1139,30 +1138,28 @@ substitution.
GUIFONTWIDE *gui-fontwide* GUIFONTWIDE *gui-fontwide*
When not empty, 'guifontwide' specifies a comma-separated list of fonts to be When not empty, 'guifontwide' specifies a comma-separated list of fonts to be
used for double-width characters. The first font that can be loaded is used for double-width characters. The first font that can be loaded is used.
used.
Note: The size of these fonts must be exactly twice as wide as the one Note: The size of these fonts must be exactly twice as wide as the one
specified with 'guifont' and the same height. If there is a mismatch then specified with 'guifont' and the same height. If there is a mismatch then the
the text will not be drawn correctly. text will not be drawn correctly.
All GUI versions but GTK+: All GUI versions but GTK+:
'guifontwide' is only used when 'encoding' is set to "utf-8" and 'guifontwide' is only used when 'encoding' is set to "utf-8" and 'guifontset'
'guifontset' is empty or invalid. is empty or invalid.
When 'guifont' is set and a valid font is found in it and When 'guifont' is set and a valid font is found in it and 'guifontwide' is
'guifontwide' is empty Vim will attempt to find a matching empty Vim will attempt to find a matching double-width font and set
double-width font and set 'guifontwide' to it. 'guifontwide' to it.
GTK+ GUI only: *guifontwide_gtk* GTK+ GUI only: *guifontwide_gtk*
If set and valid, 'guifontwide' is always used for double width If set and valid, 'guifontwide' is always used for double width characters,
characters, even if 'encoding' is not set to "utf-8". even if 'encoding' is not set to "utf-8".
Vim does not attempt to find an appropriate value for 'guifontwide' Vim does not attempt to find an appropriate value for 'guifontwide'
automatically. If 'guifontwide' is empty Pango/Xft will choose the automatically. If 'guifontwide' is empty Pango/Xft will choose the font for
font for characters not available in 'guifont'. Thus you do not need characters not available in 'guifont'. Thus you do not need to set
to set 'guifontwide' at all unless you want to override the choice 'guifontwide' at all unless you want to override the choice made by Pango/Xft.
made by Pango/Xft.
Windows +multibyte only: *guifontwide_win_mbyte* Windows +multibyte only: *guifontwide_win_mbyte*
@ -1181,7 +1178,8 @@ This section describes other features which are related to the GUI.
get "<Modifiers-Key>". get "<Modifiers-Key>".
- In the GUI, the modifiers SHIFT, CTRL, and ALT (or META) may be used within - In the GUI, the modifiers SHIFT, CTRL, and ALT (or META) may be used within
mappings of special keys and mouse events. E.g.: :map <M-LeftDrag> <LeftDrag> mappings of special keys and mouse events.
E.g.: :map <M-LeftDrag> <LeftDrag>
- In the GUI, several normal keys may have modifiers in mappings etc, these - In the GUI, several normal keys may have modifiers in mappings etc, these
are <Space>, <Tab>, <NL>, <CR>, <Esc>. are <Space>, <Tab>, <NL>, <CR>, <Esc>.
@ -1218,8 +1216,8 @@ http://www.lexikan.com/mincho.htm
For the X11 GUI the external commands are executed inside the gvim window. For the X11 GUI the external commands are executed inside the gvim window.
See |gui-pty|. See |gui-pty|.
WARNING: Executing an external command from the X11 GUI will not always WARNING: Executing an external command from the X11 GUI will not always work.
work. "normal" commands like "ls", "grep" and "make" mostly work fine. "normal" commands like "ls", "grep" and "make" mostly work fine.
Commands that require an intelligent terminal like "less" and "ispell" won't Commands that require an intelligent terminal like "less" and "ispell" won't
work. Some may even hang and need to be killed from another terminal. So be work. Some may even hang and need to be killed from another terminal. So be
careful! careful!

View File

@ -1,4 +1,4 @@
*help.txt* For Vim version 8.1. Last change: 2019 Jan 17 *help.txt* For Vim version 8.1. Last change: 2019 May 12
VIM - main help file VIM - main help file
k k

View File

@ -1,4 +1,4 @@
*index.txt* For Vim version 8.1. Last change: 2019 May 09 *index.txt* For Vim version 8.1. Last change: 2019 Jun 16
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -1241,6 +1241,7 @@ tag command action ~
|:compiler| :comp[iler] do settings for a specific compiler |:compiler| :comp[iler] do settings for a specific compiler
|:continue| :con[tinue] go back to :while |:continue| :con[tinue] go back to :while
|:confirm| :conf[irm] prompt user when confirmation required |:confirm| :conf[irm] prompt user when confirmation required
|:const| :cons[t] create a variable as a constant
|:copen| :cope[n] open quickfix window |:copen| :cope[n] open quickfix window
|:cprevious| :cp[revious] go to previous error |:cprevious| :cp[revious] go to previous error
|:cpfile| :cpf[ile] go to last error in previous file |:cpfile| :cpf[ile] go to last error in previous file

View File

@ -1,4 +1,4 @@
*intro.txt* For Vim version 8.1. Last change: 2019 May 07 *intro.txt* For Vim version 8.1. Last change: 2019 Jun 26
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -65,14 +65,21 @@ contain links to the most recent version of Vim. The FAQ is a list of
Frequently Asked Questions. Read this if you have problems. Frequently Asked Questions. Read this if you have problems.
Vim home page: https://www.vim.org/ Vim home page: https://www.vim.org/
Vim FAQ: https://vimhelp.appspot.com/vim_faq.txt.html Vim FAQ: https://vimhelp.org/vim_faq.txt.html
Downloading: https://www.vim.org/download.php Downloading: https://www.vim.org/download.php
Asking questions, finding answers: https://vi.stackexchange.com/
"Vi and Vim Stack Exchange is a question and answer site for people using the
vi and Vim families of text editors"
Usenet News group where Vim is discussed: *news* *usenet* Usenet News group where Vim is discussed: *news* *usenet*
comp.editors comp.editors
This group is also for other editors. If you write about Vim, don't forget to This group is also for other editors. If you write about Vim, don't forget to
mention that. mention that.
You can access it here:
https://groups.google.com/forum/#!topic/comp.editors
*mail-list* *maillist* *mail-list* *maillist*
There are several mailing lists for Vim: There are several mailing lists for Vim:

View File

@ -1,4 +1,4 @@
*map.txt* For Vim version 8.1. Last change: 2019 May 05 *map.txt* For Vim version 8.1. Last change: 2019 Jun 02
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -53,7 +53,7 @@ modes.
:om[ap] {lhs} {rhs} |mapmode-o| *:om* *:omap* :om[ap] {lhs} {rhs} |mapmode-o| *:om* *:omap*
:map! {lhs} {rhs} |mapmode-ic| *:map!* :map! {lhs} {rhs} |mapmode-ic| *:map!*
:im[ap] {lhs} {rhs} |mapmode-i| *:im* *:imap* :im[ap] {lhs} {rhs} |mapmode-i| *:im* *:imap*
:lm[ap] {lhs} {rhs} |mapmode-l| *:lm* *:lmap* :lm[ap] {lhs} {rhs} |mapmode-l| *:lm* *:lma* *:lmap*
:cm[ap] {lhs} {rhs} |mapmode-c| *:cm* *:cmap* :cm[ap] {lhs} {rhs} |mapmode-c| *:cm* *:cmap*
:tma[p] {lhs} {rhs} |mapmode-t| *:tma* *:tmap* :tma[p] {lhs} {rhs} |mapmode-t| *:tma* *:tmap*
Map the key sequence {lhs} to {rhs} for the modes Map the key sequence {lhs} to {rhs} for the modes
@ -66,12 +66,12 @@ modes.
:nn[oremap] {lhs} {rhs} |mapmode-n| *:nn* *:nnoremap* :nn[oremap] {lhs} {rhs} |mapmode-n| *:nn* *:nnoremap*
:vn[oremap] {lhs} {rhs} |mapmode-v| *:vn* *:vnoremap* :vn[oremap] {lhs} {rhs} |mapmode-v| *:vn* *:vnoremap*
:xn[oremap] {lhs} {rhs} |mapmode-x| *:xn* *:xnoremap* :xn[oremap] {lhs} {rhs} |mapmode-x| *:xn* *:xnoremap*
:snor[emap] {lhs} {rhs} |mapmode-s| *:snor* *:snoremap* :snor[emap] {lhs} {rhs} |mapmode-s| *:snor* *:snore* *:snoremap*
:ono[remap] {lhs} {rhs} |mapmode-o| *:ono* *:onoremap* :ono[remap] {lhs} {rhs} |mapmode-o| *:ono* *:onoremap*
:no[remap]! {lhs} {rhs} |mapmode-ic| *:no!* *:noremap!* :no[remap]! {lhs} {rhs} |mapmode-ic| *:no!* *:noremap!*
:ino[remap] {lhs} {rhs} |mapmode-i| *:ino* *:inoremap* :ino[remap] {lhs} {rhs} |mapmode-i| *:ino* *:inor* *:inoremap*
:ln[oremap] {lhs} {rhs} |mapmode-l| *:ln* *:lnoremap* :ln[oremap] {lhs} {rhs} |mapmode-l| *:ln* *:lnoremap*
:cno[remap] {lhs} {rhs} |mapmode-c| *:cno* *:cnoremap* :cno[remap] {lhs} {rhs} |mapmode-c| *:cno* *:cnor* *:cnoremap*
:tno[remap] {lhs} {rhs} |mapmode-t| *:tno* *:tnoremap* :tno[remap] {lhs} {rhs} |mapmode-t| *:tno* *:tnoremap*
Map the key sequence {lhs} to {rhs} for the modes Map the key sequence {lhs} to {rhs} for the modes
where the map command applies. Disallow mapping of where the map command applies. Disallow mapping of
@ -88,7 +88,7 @@ modes.
:unm[ap]! {lhs} |mapmode-ic| *:unm!* *:unmap!* :unm[ap]! {lhs} |mapmode-ic| *:unm!* *:unmap!*
:iu[nmap] {lhs} |mapmode-i| *:iu* *:iunmap* :iu[nmap] {lhs} |mapmode-i| *:iu* *:iunmap*
:lu[nmap] {lhs} |mapmode-l| *:lu* *:lunmap* :lu[nmap] {lhs} |mapmode-l| *:lu* *:lunmap*
:cu[nmap] {lhs} |mapmode-c| *:cu* *:cunmap* :cu[nmap] {lhs} |mapmode-c| *:cu* *:cun* *:cunmap*
:tunma[p] {lhs} |mapmode-t| *:tunma* *:tunmap* :tunma[p] {lhs} |mapmode-t| *:tunma* *:tunmap*
Remove the mapping of {lhs} for the modes where the Remove the mapping of {lhs} for the modes where the
map command applies. The mapping may remain defined map command applies. The mapping may remain defined
@ -1016,7 +1016,7 @@ See |:verbose-cmd| for more information.
:norea[bbrev] [<expr>] [<buffer>] [lhs] [rhs] :norea[bbrev] [<expr>] [<buffer>] [lhs] [rhs]
Same as ":ab", but no remapping for this {rhs}. Same as ":ab", but no remapping for this {rhs}.
*:ca* *:cabbrev* *:ca* *:cab* *:cabbrev*
:ca[bbrev] [<expr>] [<buffer>] [lhs] [rhs] :ca[bbrev] [<expr>] [<buffer>] [lhs] [rhs]
Same as ":ab", but for Command-line mode only. Same as ":ab", but for Command-line mode only.

View File

@ -1,4 +1,4 @@
*mbyte.txt* For Vim version 8.1. Last change: 2019 Apr 28 *mbyte.txt* For Vim version 8.1. Last change: 2019 Jul 04
VIM REFERENCE MANUAL by Bram Moolenaar et al. VIM REFERENCE MANUAL by Bram Moolenaar et al.
@ -943,11 +943,12 @@ To input multibyte characters on Windows, you can use an Input Method Editor
IME many many many times. Because IME with status on is hooking all of your IME many many many times. Because IME with status on is hooking all of your
key inputs, you cannot input 'j', 'k', or almost all of keys to Vim directly. key inputs, you cannot input 'j', 'k', or almost all of keys to Vim directly.
This |+multi_byte_ime| feature help this. It reduce times of switch status of The |+multi_byte_ime| feature helps for this. It reduces the number of times
IME manually. In normal mode, there are almost no need working IME, even the IME status has to be switched manually. In Normal mode, there is almost
editing multibyte text. So exiting insert mode with ESC, Vim memorize last no need to use IME, even when editing multibyte text. So when exiting Insert
status of IME and force turn off IME. When re-enter insert mode, Vim revert mode, Vim memorizes the last status of IME and turns off IME. When
IME status to that memorized automatically. re-entering Insert mode, Vim sets the IME status to that memorized status
automatically.
This works on not only insert-normal mode, but also search-command input and This works on not only insert-normal mode, but also search-command input and
replace mode. replace mode.

View File

@ -1,4 +1,4 @@
*message.txt* For Vim version 8.1. Last change: 2019 May 07 *message.txt* For Vim version 8.1. Last change: 2019 May 18
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -247,6 +247,9 @@ format of the file. The file will not be marked unmodified. If you care
about the loss of information, set the 'fileencoding' option to another value about the loss of information, set the 'fileencoding' option to another value
that can handle the characters in the buffer and write again. If you don't that can handle the characters in the buffer and write again. If you don't
care, you can abandon the buffer or reset the 'modified' option. care, you can abandon the buffer or reset the 'modified' option.
If there is a backup file, when 'writebackup' or 'backup' is set, it will not
be deleted, so you can move it back into place if you want to discard the
changes.
*E302* > *E302* >
Could not rename swap file Could not rename swap file

View File

@ -1,4 +1,4 @@
*motion.txt* For Vim version 8.1. Last change: 2019 May 07 *motion.txt* For Vim version 8.1. Last change: 2019 Jun 02
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -53,6 +53,7 @@ or change text. The following operators are available:
|!| ! filter through an external program |!| ! filter through an external program
|=| = filter through 'equalprg' or C-indenting if empty |=| = filter through 'equalprg' or C-indenting if empty
|gq| gq text formatting |gq| gq text formatting
|gw| gw text formatting with no cursor movement
|g?| g? ROT13 encoding |g?| g? ROT13 encoding
|>| > shift right |>| > shift right
|<| < shift left |<| < shift left
@ -943,7 +944,7 @@ These commands are not marks themselves, but jump to a mark:
[` [count] times to lowercase mark before the cursor. [` [count] times to lowercase mark before the cursor.
:loc[kmarks] {command} *:loc* *:lockmarks* :loc[kmarks] {command} *:loc* *:lock* *:lockmarks*
Execute {command} without adjusting marks. This is Execute {command} without adjusting marks. This is
useful when changing text in a way that the line count useful when changing text in a way that the line count
will be the same when the change has completed. will be the same when the change has completed.
@ -969,7 +970,7 @@ These commands are not marks themselves, but jump to a mark:
- folds - folds
- diffs - diffs
:kee[pmarks] {command} *:kee* *:keepmarks* :kee[pmarks] {command} *:kee* *:keep* *:keepmarks*
Currently only has effect for the filter command Currently only has effect for the filter command
|:range!|: |:range!|:
- When the number of lines after filtering is equal to - When the number of lines after filtering is equal to

View File

@ -1,4 +1,4 @@
*options.txt* For Vim version 8.1. Last change: 2019 May 08 *options.txt* For Vim version 8.1. Last change: 2019 Jul 06
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -578,14 +578,17 @@ backslash in front of the ':' will be removed. Example:
/* vi:set dir=c\:\tmp: */ ~ /* vi:set dir=c\:\tmp: */ ~
This sets the 'dir' option to "c:\tmp". Only a single backslash before the This sets the 'dir' option to "c:\tmp". Only a single backslash before the
':' is removed. Thus to include "\:" you have to specify "\\:". ':' is removed. Thus to include "\:" you have to specify "\\:".
*E992*
No other commands than "set" are supported, for security reasons (somebody No other commands than "set" are supported, for security reasons (somebody
might create a Trojan horse text file with modelines). And not all options might create a Trojan horse text file with modelines). And not all options
can be set. For some options a flag is set, so that when it's used the can be set. For some options a flag is set, so that when the value is used
|sandbox| is effective. Still, there is always a small risk that a modeline the |sandbox| is effective. Some options can only be set from the modeline
causes trouble. E.g., when some joker sets 'textwidth' to 5 all your lines when 'modelineexpr' is set (the default is off).
are wrapped unexpectedly. So disable modelines before editing untrusted text.
The mail ftplugin does this, for example. Still, there is always a small risk that a modeline causes trouble. E.g.,
when some joker sets 'textwidth' to 5 all your lines are wrapped unexpectedly.
So disable modelines before editing untrusted text. The mail ftplugin does
this, for example.
Hint: If you would like to do something else than setting an option, you could Hint: If you would like to do something else than setting an option, you could
define an autocommand that checks the file for a specific string. For define an autocommand that checks the file for a specific string. For
@ -1139,8 +1142,10 @@ A jump table for the options with a short description can be found at |Q_op|.
set bexpr=MyBalloonExpr() set bexpr=MyBalloonExpr()
set ballooneval set ballooneval
< <
Also see |balloon_show()|, can be used if the content of the balloon Also see |balloon_show()|, it can be used if the content of the balloon
is to be fetched asynchronously. is to be fetched asynchronously. In that case evaluating
'balloonexpr' should result in an empty string. If you get a balloon
with only "0" you probably didn't return anything from your function.
NOTE: The balloon is displayed only if the cursor is on a text NOTE: The balloon is displayed only if the cursor is on a text
character. If the result of evaluating 'balloonexpr' is not empty, character. If the result of evaluating 'balloonexpr' is not empty,
@ -1149,9 +1154,10 @@ A jump table for the options with a short description can be found at |Q_op|.
The expression will be evaluated in the |sandbox| when set from a The expression will be evaluated in the |sandbox| when set from a
modeline, see |sandbox-option|. modeline, see |sandbox-option|.
This option cannot be set in a modeline when 'modelineexpr' is off.
It is not allowed to change text or jump to another window while It is not allowed to change text or jump to another window while
evaluating 'balloonexpr' |textlock|. evaluating 'balloonexpr', see |textlock|.
To check whether line breaks in the balloon text work use this check: > To check whether line breaks in the balloon text work use this check: >
if has("balloon_multiline") if has("balloon_multiline")
@ -1357,6 +1363,8 @@ A jump table for the options with a short description can be found at |Q_op|.
prompt buffer where only the last line can be edited, meant prompt buffer where only the last line can be edited, meant
to be used by a plugin, see |prompt-buffer| to be used by a plugin, see |prompt-buffer|
{only when compiled with the |+channel| feature} {only when compiled with the |+channel| feature}
popup buffer used in a popup window, see |popup|.
{only when compiled with the |+textprop| feature}
This option is used together with 'bufhidden' and 'swapfile' to This option is used together with 'bufhidden' and 'swapfile' to
specify special kinds of buffers. See |special-buffers|. specify special kinds of buffers. See |special-buffers|.
@ -3226,7 +3234,7 @@ A jump table for the options with a short description can be found at |Q_op|.
The expression will be evaluated in the |sandbox| if set from a The expression will be evaluated in the |sandbox| if set from a
modeline, see |sandbox-option|. modeline, see |sandbox-option|.
This option can't be set from a |modeline| when the 'diff' option is This option can't be set from a |modeline| when the 'diff' option is
on. on or the 'modelineexpr' option is off.
It is not allowed to change text or jump to another window while It is not allowed to change text or jump to another window while
evaluating 'foldexpr' |textlock|. evaluating 'foldexpr' |textlock|.
@ -3359,6 +3367,7 @@ A jump table for the options with a short description can be found at |Q_op|.
The expression will be evaluated in the |sandbox| if set from a The expression will be evaluated in the |sandbox| if set from a
modeline, see |sandbox-option|. modeline, see |sandbox-option|.
This option cannot be set in a modeline when 'modelineexpr' is off.
It is not allowed to change text or jump to another window while It is not allowed to change text or jump to another window while
evaluating 'foldtext' |textlock|. evaluating 'foldtext' |textlock|.
@ -3396,6 +3405,7 @@ A jump table for the options with a short description can be found at |Q_op|.
The expression will be evaluated in the |sandbox| when set from a The expression will be evaluated in the |sandbox| when set from a
modeline, see |sandbox-option|. That stops the option from working, modeline, see |sandbox-option|. That stops the option from working,
since changing the buffer text is not allowed. since changing the buffer text is not allowed.
This option cannot be set in a modeline when 'modelineexpr' is off.
NOTE: This option is set to "" when 'compatible' is set. NOTE: This option is set to "" when 'compatible' is set.
*'formatlistpat'* *'flp'* *'formatlistpat'* *'flp'*
@ -3452,6 +3462,8 @@ A jump table for the options with a short description can be found at |Q_op|.
Also see 'swapsync' for controlling fsync() on swap files. Also see 'swapsync' for controlling fsync() on swap files.
'fsync' also applies to |writefile()|, unless a flag is used to 'fsync' also applies to |writefile()|, unless a flag is used to
overrule it. overrule it.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
*'gdefault'* *'gd'* *'nogdefault'* *'nogd'* *'gdefault'* *'gd'* *'nogdefault'* *'nogd'*
'gdefault' 'gd' boolean (default off) 'gdefault' 'gd' boolean (default off)
@ -3619,7 +3631,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'guiheadroom'* *'ghr'* *'guiheadroom'* *'ghr'*
'guiheadroom' 'ghr' number (default 50) 'guiheadroom' 'ghr' number (default 50)
global global
- {only for GTK and X11 GUI} {only for GTK and X11 GUI}
The number of pixels subtracted from the screen height when fitting The number of pixels subtracted from the screen height when fitting
the GUI window on the screen. Set this before the GUI is started, the GUI window on the screen. Set this before the GUI is started,
e.g., in your |gvimrc| file. When zero, the whole screen height will e.g., in your |gvimrc| file. When zero, the whole screen height will
@ -3777,6 +3789,7 @@ A jump table for the options with a short description can be found at |Q_op|.
'guitabtooltip' is used for the tooltip, see below. 'guitabtooltip' is used for the tooltip, see below.
The expression will be evaluated in the |sandbox| when set from a The expression will be evaluated in the |sandbox| when set from a
modeline, see |sandbox-option|. modeline, see |sandbox-option|.
This option cannot be set in a modeline when 'modelineexpr' is off.
Only used when the GUI tab pages line is displayed. 'e' must be Only used when the GUI tab pages line is displayed. 'e' must be
present in 'guioptions'. For the non-GUI tab pages line 'tabline' is present in 'guioptions'. For the non-GUI tab pages line 'tabline' is
@ -4027,6 +4040,7 @@ A jump table for the options with a short description can be found at |Q_op|.
When this option contains printf-style '%' items, they will be When this option contains printf-style '%' items, they will be
expanded according to the rules used for 'statusline'. See expanded according to the rules used for 'statusline'. See
'titlestring' for example settings. 'titlestring' for example settings.
This option cannot be set in a modeline when 'modelineexpr' is off.
{not available when compiled without the |+statusline| feature} {not available when compiled without the |+statusline| feature}
*'ignorecase'* *'ic'* *'noignorecase'* *'noic'* *'ignorecase'* *'ic'* *'noignorecase'* *'noic'*
@ -4044,6 +4058,8 @@ A jump table for the options with a short description can be found at |Q_op|.
This option specifies a function that will be called to This option specifies a function that will be called to
activate or deactivate the Input Method. activate or deactivate the Input Method.
It is not used in the GUI. It is not used in the GUI.
The expression will be evaluated in the |sandbox| when set from a
modeline, see |sandbox-option|.
Example: > Example: >
function ImActivateFunc(active) function ImActivateFunc(active)
@ -4160,6 +4176,8 @@ A jump table for the options with a short description can be found at |Q_op|.
set imstatusfunc=ImStatusFunc set imstatusfunc=ImStatusFunc
< <
NOTE: This function is invoked very often. Keep it fast. NOTE: This function is invoked very often. Keep it fast.
The expression will be evaluated in the |sandbox| when set from a
modeline, see |sandbox-option|.
*'imstyle'* *'imst'* *'imstyle'* *'imst'*
'imstyle' 'imst' number (default 1) 'imstyle' 'imst' number (default 1)
@ -4176,6 +4194,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|single-repeat|, etc. Therefore over-the-spot style becomes the |single-repeat|, etc. Therefore over-the-spot style becomes the
default now. This should work fine for most people, however if you default now. This should work fine for most people, however if you
have any problem with it, try using on-the-spot style. have any problem with it, try using on-the-spot style.
The expression will be evaluated in the |sandbox| when set from a
modeline, see |sandbox-option|.
*'include'* *'inc'* *'include'* *'inc'*
'include' 'inc' string (default "^\s*#\s*include") 'include' 'inc' string (default "^\s*#\s*include")
@ -4210,6 +4230,7 @@ A jump table for the options with a short description can be found at |Q_op|.
The expression will be evaluated in the |sandbox| when set from a The expression will be evaluated in the |sandbox| when set from a
modeline, see |sandbox-option|. modeline, see |sandbox-option|.
This option cannot be set in a modeline when 'modelineexpr' is off.
It is not allowed to change text or jump to another window while It is not allowed to change text or jump to another window while
evaluating 'includeexpr' |textlock|. evaluating 'includeexpr' |textlock|.
@ -4297,6 +4318,7 @@ A jump table for the options with a short description can be found at |Q_op|.
The expression will be evaluated in the |sandbox| when set from a The expression will be evaluated in the |sandbox| when set from a
modeline, see |sandbox-option|. modeline, see |sandbox-option|.
This option cannot be set in a modeline when 'modelineexpr' is off.
It is not allowed to change text or jump to another window while It is not allowed to change text or jump to another window while
evaluating 'indentexpr' |textlock|. evaluating 'indentexpr' |textlock|.
@ -4915,7 +4937,6 @@ A jump table for the options with a short description can be found at |Q_op|.
*'matchtime'* *'mat'* *'matchtime'* *'mat'*
'matchtime' 'mat' number (default 5) 'matchtime' 'mat' number (default 5)
global global
{in Nvi}
Tenths of a second to show the matching paren, when 'showmatch' is Tenths of a second to show the matching paren, when 'showmatch' is
set. Note that this is not in milliseconds, like other options that set. Note that this is not in milliseconds, like other options that
set a time. This is to be compatible with Nvi. set a time. This is to be compatible with Nvi.
@ -5045,10 +5066,25 @@ A jump table for the options with a short description can be found at |Q_op|.
< If you have less than 512 Mbyte |:mkspell| may fail for some < If you have less than 512 Mbyte |:mkspell| may fail for some
languages, no matter what you set 'mkspellmem' to. languages, no matter what you set 'mkspellmem' to.
This option cannot be set from a |modeline| or in the |sandbox|.
*'modeline'* *'ml'* *'nomodeline'* *'noml'* *'modeline'* *'ml'* *'nomodeline'* *'noml'*
'modeline' 'ml' boolean (Vim default: on (off for root), 'modeline' 'ml' boolean (Vim default: on (off for root),
Vi default: off) Vi default: off)
local to buffer local to buffer
If 'modeline' is on 'modelines' gives the number of lines that is
checked for set commands. If 'modeline' is off or 'modelines' is zero
no lines are checked. See |modeline|.
*'modelineexpr'* *'mle'* *'nomodelineexpr'* *'nomle'*
'modelineexpr' 'mle' boolean (default: off)
global
When on allow some options that are an expression to be set in the
modeline. Check the option for whether it is affected by
'modelineexpr'. Also see |modeline|.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
*'modelines'* *'mls'* *'modelines'* *'mls'*
'modelines' 'mls' number (default 5) 'modelines' 'mls' number (default 5)
global global
@ -5059,9 +5095,9 @@ 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. set and to the Vim default value when 'compatible' is reset.
*'modifiable'* *'ma'* *'nomodifiable'* *'noma'* *'modifiable'* *'ma'* *'nomodifiable'* *'noma'*
*E21*
'modifiable' 'ma' boolean (default on) 'modifiable' 'ma' boolean (default on)
local to buffer local to buffer
*E21*
When off the buffer contents cannot be changed. The 'fileformat' and When off the buffer contents cannot be changed. The 'fileformat' and
'fileencoding' options also can't be changed. 'fileencoding' options also can't be changed.
Can be reset on startup with the |-M| command line argument. Can be reset on startup with the |-M| command line argument.
@ -5351,7 +5387,7 @@ A jump table for the options with a short description can be found at |Q_op|.
rows in the window, depending on whether 'number' or 'relativenumber' rows in the window, depending on whether 'number' or 'relativenumber'
is set. Thus with the Vim default of 4 there is room for a line number is set. Thus with the Vim default of 4 there is room for a line number
up to 999. When the buffer has 1000 lines five columns will be used. up to 999. When the buffer has 1000 lines five columns will be used.
The minimum value is 1, the maximum value is 10. The minimum value is 1, the maximum value is 20.
NOTE: This option is set to the Vi default value when 'compatible' is NOTE: This option is set to the Vi default value when 'compatible' is
set and to the Vim default value when 'compatible' is reset. set and to the Vim default value when 'compatible' is reset.
@ -6058,6 +6094,8 @@ A jump table for the options with a short description can be found at |Q_op|.
When this option is not empty, it determines the content of the ruler When this option is not empty, it determines the content of the ruler
string, as displayed for the 'ruler' option. string, as displayed for the 'ruler' option.
The format of this option is like that of 'statusline'. The format of this option is like that of 'statusline'.
This option cannot be set in a modeline when 'modelineexpr' is off.
The default ruler width is 17 characters. To make the ruler 15 The default ruler width is 17 characters. To make the ruler 15
characters wide, put "%15(" at the start and "%)" at the end. characters wide, put "%15(" at the start and "%)" at the end.
Example: > Example: >
@ -6598,7 +6636,8 @@ A jump table for the options with a short description can be found at |Q_op|.
"Pattern not found", "Back at original", etc. "Pattern not found", "Back at original", etc.
q use "recording" instead of "recording @a" q use "recording" instead of "recording @a"
F don't give the file info when editing a file, like `:silent` F don't give the file info when editing a file, like `:silent`
was used for the command was used for the command; note that this also affects messages
from autocommands
S do not show search count message when searching, e.g. S do not show search count message when searching, e.g.
"[1/5]" "[1/5]"
@ -6766,6 +6805,8 @@ A jump table for the options with a short description can be found at |Q_op|.
"auto" only when there is a sign to display "auto" only when there is a sign to display
"no" never "no" never
"yes" always "yes" always
"number" display signs in the 'number' column. If the number
column is not present, then behaves like "auto".
*'smartcase'* *'scs'* *'nosmartcase'* *'noscs'* *'smartcase'* *'scs'* *'nosmartcase'* *'noscs'*
@ -7052,7 +7093,9 @@ A jump table for the options with a short description can be found at |Q_op|.
When the option starts with "%!" then it is used as an expression, When the option starts with "%!" then it is used as an expression,
evaluated and the result is used as the option value. Example: > evaluated and the result is used as the option value. Example: >
:set statusline=%!MyStatusLine() :set statusline=%!MyStatusLine()
< The result can contain %{} items that will be evaluated too. < The *g:statusline_winid* variable will be set to the |window-ID| of the
window that the status line belongs to.
The result can contain %{} items that will be evaluated too.
Note that the "%!" expression is evaluated in the context of the Note that the "%!" expression is evaluated in the context of the
current window and buffer, while %{} items are evaluated in the current window and buffer, while %{} items are evaluated in the
context of the window that the statusline belongs to. context of the window that the statusline belongs to.
@ -7155,16 +7198,19 @@ A jump table for the options with a short description can be found at |Q_op|.
become empty. This will make a group like the following disappear become empty. This will make a group like the following disappear
completely from the statusline when none of the flags are set. > completely from the statusline when none of the flags are set. >
:set statusline=...%(\ [%M%R%H]%)... :set statusline=...%(\ [%M%R%H]%)...
< *g:actual_curbuf* < Beware that an expression is evaluated each and every time the status
Beware that an expression is evaluated each and every time the status line is displayed.
line is displayed. The current buffer and current window will be set *g:actual_curbuf* *g:actual_curwin*
temporarily to that of the window (and buffer) whose statusline is The current buffer and current window will be set temporarily to that
currently being drawn. The expression will evaluate in this context. of the window (and buffer) whose statusline is currently being drawn.
The variable "g:actual_curbuf" is set to the `bufnr()` number of the The expression will evaluate in this context. The variable
real current buffer. "g:actual_curbuf" is set to the `bufnr()` number of the real current
buffer and "g:actual_curwin" to the |window-ID| of the real current
window. These values are strings.
The 'statusline' option will be evaluated in the |sandbox| if set from The 'statusline' option will be evaluated in the |sandbox| if set from
a modeline, see |sandbox-option|. a modeline, see |sandbox-option|.
This option cannot be set in a modeline when 'modelineexpr' is off.
It is not allowed to change text or jump to another window while It is not allowed to change text or jump to another window while
evaluating 'statusline' |textlock|. evaluating 'statusline' |textlock|.
@ -7345,6 +7391,7 @@ A jump table for the options with a short description can be found at |Q_op|.
When changing something that is used in 'tabline' that does not When changing something that is used in 'tabline' that does not
trigger it to be updated, use |:redrawtabline|. trigger it to be updated, use |:redrawtabline|.
This option cannot be set in a modeline when 'modelineexpr' is off.
Keep in mind that only one of the tab pages is the current one, others Keep in mind that only one of the tab pages is the current one, others
are invisible and you can't jump to their windows. are invisible and you can't jump to their windows.
@ -7873,8 +7920,11 @@ A jump table for the options with a short description can be found at |Q_op|.
non-empty 't_ts' option). non-empty 't_ts' option).
When Vim was compiled with HAVE_X11 defined, the original title will When Vim was compiled with HAVE_X11 defined, the original title will
be restored if possible, see |X11|. be restored if possible, see |X11|.
When this option contains printf-style '%' items, they will be When this option contains printf-style '%' items, they will be
expanded according to the rules used for 'statusline'. expanded according to the rules used for 'statusline'.
This option cannot be set in a modeline when 'modelineexpr' is off.
Example: > Example: >
:auto BufEnter * let &titlestring = hostname() . "/" . expand("%:p") :auto BufEnter * let &titlestring = hostname() . "/" . expand("%:p")
:set title titlestring=%<%F%=%l/%L-%P titlelen=70 :set title titlestring=%<%F%=%l/%L-%P titlelen=70
@ -8022,7 +8072,7 @@ A jump table for the options with a short description can be found at |Q_op|.
already. already.
Additionally, if vim is compiled with the |+termresponse| feature and Additionally, if vim is compiled with the |+termresponse| feature and
|t_RV| is set to the escape sequence to request the xterm version |t_RV| is set to the escape sequence to request the xterm version
number, more intelligent detection process runs. number, more intelligent detection is done.
The "xterm2" value will be set if the xterm version is reported to be The "xterm2" value will be set if the xterm version is reported to be
from 95 to 276. The "sgr" value will be set if Vim detects Mac from 95 to 276. The "sgr" value will be set if Vim detects Mac
Terminal.app, iTerm2 or mintty, and when the xterm version is 277 or Terminal.app, iTerm2 or mintty, and when the xterm version is 277 or
@ -8060,6 +8110,8 @@ A jump table for the options with a short description can be found at |Q_op|.
undo file that exists is used. When it cannot be read an error is undo file that exists is used. When it cannot be read an error is
given, no further entry is used. given, no further entry is used.
See |undo-persistence|. See |undo-persistence|.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
*'undofile'* *'noundofile'* *'udf'* *'noudf'* *'undofile'* *'noundofile'* *'udf'* *'noudf'*
'undofile' 'udf' boolean (default off) 'undofile' 'udf' boolean (default off)
@ -8369,6 +8421,8 @@ A jump table for the options with a short description can be found at |Q_op|.
When equal to "NONE" no viminfo file will be read or written. When equal to "NONE" no viminfo file will be read or written.
This option can be set with the |-i| command line flag. The |--clean| This option can be set with the |-i| command line flag. The |--clean|
command line flag sets it to "NONE". command line flag sets it to "NONE".
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
*'virtualedit'* *'ve'* *'virtualedit'* *'ve'*
'virtualedit' 've' string (default "") 'virtualedit' 've' string (default "")
@ -8635,6 +8689,12 @@ A jump table for the options with a short description can be found at |Q_op|.
This option is not used for <F10>; on Win32 and with GTK <F10> will This option is not used for <F10>; on Win32 and with GTK <F10> will
select the menu, unless it has been mapped. select the menu, unless it has been mapped.
*'wincolor'* *'wcr'*
'wincolor' 'wcr' string (default empty)
local to window
Highlight group name to use for this window instead of the Normal
color |hl-Normal|.
*'window'* *'wi'* *'window'* *'wi'*
'window' 'wi' number (default screen height - 1) 'window' 'wi' number (default screen height - 1)
global global

View File

@ -61,11 +61,11 @@ explanations are in chapter 27 |usr_27.txt|.
n Repeat the latest "/" or "?" [count] times. n Repeat the latest "/" or "?" [count] times.
If the cursor doesn't move the search is repeated with If the cursor doesn't move the search is repeated with
count + 1. count + 1.
|last-pattern| {Vi: no count} |last-pattern|
*N* *N*
N Repeat the latest "/" or "?" [count] times in N Repeat the latest "/" or "?" [count] times in
opposite direction. |last-pattern| {Vi: no count} opposite direction. |last-pattern|
*star* *E348* *E349* *star* *E348* *E349*
* Search forward for the [count]'th occurrence of the * Search forward for the [count]'th occurrence of the

View File

@ -1,203 +1,607 @@
*popup.txt* For Vim version 8.1. Last change: 2019 May 12 *popup.txt* For Vim version 8.1. Last change: 2019 Jul 14
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
Displaying text with properties attached. *popup* *popup-window* Displaying text in a floating window. *popup* *popup-window*
THIS IS UNDER DESIGN - ANYTHING MAY STILL CHANGE
1. Introduction |popup-intro| 1. Introduction |popup-intro|
Window position and size |popup-position|
Closing the popup window |popup-close|
Popup buffer and window |popup-buffer|
2. Functions |popup-functions| 2. Functions |popup-functions|
3. Examples |popup-examples| Details |popup-function-details|
3. Usage |popup-usage|
popup_create() arguments |popup_create-arguments|
Popup text properties |popup-props|
Popup filter |popup-filter|
Popup callback |popup-callback|
Popup scrollbar |popup-scrollbar|
Popup mask |popup-mask|
4. Examples |popup-examples|
{not able to use text properties when the |+textprop| feature was {not available if the |+textprop| feature was disabled at compile time}
disabled at compile time}
============================================================================== ==============================================================================
1. Introduction *popup-intro* 1. Introduction *popup-intro*
We are talking about popup windows here, text that goes on top of the buffer We are talking about popup windows here, text that goes on top of the regular
text and is under control of a plugin. Other popup functionality: windows and is under control of a plugin. You cannot edit the text in the
popup window like with regular windows.
A popup window can be used for such things as:
- briefly show a message without overwriting the command line
- prompt the user with a dialog
- display contextual information while typing
- give extra information for auto-completion
The text in the popup window can be colored with |text-properties|. It is
also possible to use syntax highlighting.
The default color used is "Pmenu". If you prefer something else use the
"highlight" argument or the 'wincolor' option, e.g.: >
hi MyPopupColor ctermbg=lightblue guibg=lightblue
call setwinvar(winid, '&wincolor', 'MyPopupColor')
'hlsearch' highlighting is not displayed in a popup window.
A popup window has a window-ID like other windows, but behaves differently.
The size can be up to the whole Vim window and it overlaps other windows.
Popup windows can also overlap each other. The "zindex" property specifies
what goes on top of what.
The popup window contains a buffer, and that buffer is always associated with
the popup window. The window cannot be in Normal, Visual or Insert mode, it
does not get keyboard focus. You can use functions like `setbufline()` to
change the text in the buffer. There are more differences from how this
window and buffer behave compared to regular windows and buffers, see
|popup-buffer|.
If this is not what you are looking for, check out other popup functionality:
- popup menu, see |popup-menu| - popup menu, see |popup-menu|
- balloon, see |balloon-eval| - balloon, see |balloon-eval|
TODO
WINDOW POSITION AND SIZE *popup-position*
The height of the window is normally equal to the number of, possibly
wrapping, lines in the buffer. It can be limited with the "maxheight"
property. You can use empty lines to increase the height or the "minheight"
property.
The width of the window is normally equal to the longest line in the buffer.
It can be limited with the "maxwidth" property. You can use spaces to
increase the width or use the "minwidth" property.
By default the 'wrap' option is set, so that no text disappears. Otherwise,
if there is not enough space then the window is shifted left in order to
display more text. When right-aligned the window is shifted right to display
more text. The shifting can be disabled with the "fixed" property.
Vim tries to show the popup in the location you specify. In some cases, e.g.
when the popup would go outside of the Vim window, it will show it somewhere
nearby. E.g. if you use `popup_atcursor()` the popup normally shows just above
the current cursor position, but if the cursor is close to the top of the Vim
window it will be placed below the cursor position.
When the screen scrolls up for output of an Ex command, popups move too, so
that they will not cover the output.
The current cursor position is displayed even when it is under a popup window.
That way you can still see where it is, even though you cannot see the text
that it is in.
CLOSING THE POPUP WINDOW *popup-close*
Normally the plugin that created the popup window is also in charge of closing
it. If somehow a popup hangs around, you can close all of them with: >
call popup_clear()
Some popups, such as notifications, close after a specified time. This can be
set with the "time" property on `popup_create()`.
Otherwise, a popup can be closed by clicking on the X in the top-right corner
or by clicking anywhere inside the popup. This must be enabled with the
"close" property. It is set by default for notifications.
POPUP BUFFER AND WINDOW *popup-buffer*
If a popup function is called to create a popup from text, a new buffer is
created to hold the text and text properties of the popup window. The buffer
is always associated with the popup window and manipulation is restricted:
- the buffer has no name
- 'buftype' is "popup"
- 'swapfile' is off
- 'bufhidden' is "hide"
- 'buflisted' is off
- 'undolevels' is -1: no undo at all
- all other buffer-local and window-local options are set to their Vim default
value.
It is possible to change the specifically mentioned options, but anything
might break then, so better leave them alone.
The window does have a cursor position, but the cursor is not displayed.
To execute a command in the context of the popup window and buffer use
`win_execute()`. Example: >
call win_execute(winid, 'syntax enable')
Options can be set on the window with `setwinvar()`, e.g.: >
call setwinvar(winid, '&wrap', 0)
And options can be set on the buffer with `setbufvar()`, e.g.: >
call setbufvar(winbufnr(winid), '&filetype', 'java')
Note that this does not trigger autocommands. Use `win_execute()` if you do
need them.
============================================================================== ==============================================================================
2. Functions *popup-functions* 2. Functions *popup-functions*
THIS IS UNDER DESIGN - ANYTHING MAY STILL CHANGE Creating a popup window:
|popup_create()| centered in the screen
|popup_atcursor()| just above the cursor position, closes when
the cursor moves away
|popup_beval()| at the position indicated by v:beval_
variables, closes when the mouse moves away
|popup_notification()| show a notification for three seconds
|popup_dialog()| centered with padding and border
|popup_menu()| prompt for selecting an item from a list
Proposal and discussion on issue #4063: https://github.com/vim/vim/issues/4063 Manipulating a popup window:
|popup_hide()| hide a popup temporarily
|popup_show()| show a previously hidden popup
|popup_move()| change the position and size of a popup
|popup_setoptions()| override options of a popup
|popup_settext()| replace the popup buffer contents
[to be moved to eval.txt later] Closing popup windows:
|popup_close()| close one popup
|popup_clear()| close all popups
popup_show({lines}, {options}) *popup_show()* Filter functions:
Open a popup window showing {lines}, which is a list of lines, |popup_filter_menu()| select from a list of items
where each line has text and text properties. |popup_filter_yesno()| blocks until 'y' or 'n' is pressed
Other:
|popup_getoptions()| get current options for a popup
|popup_getpos()| get actual position and size of a popup
|popup_locate()| find popup window at a screen position
DETAILS *popup-function-details*
popup_atcursor({what}, {options}) *popup_atcursor()*
Show the {what} above the cursor, and close it when the cursor
moves. This works like: >
call popup_create({what}, ~{
\ pos: 'botleft',
\ line: 'cursor-1',
\ col: 'cursor',
\ moved: 'WORD',
\ })
< Use {options} to change the properties.
popup_beval({what}, {options}) *popup_beval()*
Show the {what} above the position from 'ballooneval' and
close it when the mouse moves. This works like: >
let pos = screenpos(v:beval_winnr, v:beval_lnum, v:beval_col)
call popup_create({what}, ~{
\ pos: 'botleft',
\ line: pos.row - 1,
\ col: pos.col,
\ mousemoved: 'WORD',
\ })
< Use {options} to change the properties.
See |popup_beval_example| for an example use.
*popup_clear()*
popup_clear() Emergency solution to a misbehaving plugin: close all popup
windows for the current tab and global popups.
popup_close({id} [, {result}]) *popup_close()*
Close popup {id}. The window and the associated buffer will
be deleted.
If the popup has a callback it will be called just before the
popup window is deleted. If the optional {result} is present
it will be passed as the second argument of the callback.
Otherwise zero is passed to the callback.
popup_create({what}, {options}) *popup_create()*
Open a popup window showing {what}, which is either:
- a buffer number
- a string
- a list of strings
- a list of text lines with text properties
When {what} is not a buffer number, a buffer is created with
'buftype' set to "popup". That buffer will be wiped out once
the popup closes.
{options} is a dictionary with many possible entries. {options} is a dictionary with many possible entries.
See |popup_create-arguments| for details.
Returns a unique ID to be used with |popup_close()|. Returns a window-ID, which can be used with other popup
functions. Use `winbufnr()` to get the number of the buffer
See |popup_show-usage| for details. in the window: >
let winid = popup_create('hello', {})
let bufnr = winbufnr(winid)
call setbufline(bufnr, 2, 'second line')
< In case of failure zero is returned.
popup_dialog({lines}, {options}) *popup_dialog()* popup_dialog({what}, {options}) *popup_dialog()*
Just like |popup_show()| but with different default options: Just like |popup_create()| but with these default options: >
pos "center" call popup_create({what}, ~{
zindex 200 \ pos: 'center',
border [] \ zindex: 200,
\ drag: 1,
\ border: [],
popup_notification({text}, {options}) *popup_notification()* \ padding: [],
Show the string {text} for 3 seconds at the top of the Vim \})
window. This works like: > < Use {options} to change the properties. E.g. add a 'filter'
call popup_show([{'text': {text}}], { option with value 'popup_filter_yesno'. Example: >
\ 'line': 1, call popup_create('do you want to quit (Yes/no)?', ~{
\ 'col': 10, \ filter: 'popup_filter_yesno',
\ 'time': 3000, \ callback: 'QuitCallback',
\ 'zindex': 200,
\ 'highlight': 'WarningMsg',
\ 'border: [],
\ }) \ })
< Use {options} to change the properties.
popup_atcursor({text}, {options}) *popup_atcursor()* < By default the dialog can be dragged, so that text below it
Show the string {text} above the cursor, and close it when the can be read if needed.
cursor moves. This works like: >
call popup_show([{'text': {text}}], {
\ 'line': 'cursor-1',
\ 'col': 'cursor',
\ 'zindex': 50,
\ 'moved': 'WORD',
\ })
< Use {options} to change the properties.
popup_menu({lines}, {options}) *popup_atcursor()*
Show the {lines} near the cursor, handle selecting one of the
items with cursorkeys, and close it an item is selected with
Space or Enter. This works like: >
call popup_show({lines}, {
\ 'pos': 'center',
\ 'zindex': 200,
\ 'wrap': 0,
\ 'border': [],
\ 'filter': 'popup_filter_menu',
\ })
< Use {options} to change the properties. Should at least set
"callback" to a function that handles the selected item.
popup_move({id}, {options}) *popup_move()*
Move popup {id} to the position speficied with {options}.
{options} may contain the items from |popup_show()| that
specify the popup position: "line", "col", "pos", "maxheight",
"minheight", "maxwidth" and "minwidth".
popup_filter_menu({id}, {key}) *popup_filter_menu()* popup_filter_menu({id}, {key}) *popup_filter_menu()*
Filter that can be used for a popup. It handles the cursor Filter that can be used for a popup. These keys can be used:
keys to move the selected index in the popup. Space and Enter j <Down> select item below
can be used to select an item. Invokes the "callback" of the k <Up> select item above
popup menu with the index of the selected line as the second <Space> <Enter> accept current selection
argument. x Esc CTRL-C cancel the menu
Other keys are ignored.
A match is set on that line to highlight it, see
|popup_menu()|.
When the current selection is accepted the "callback" of the
popup menu is invoked with the index of the selected line as
the second argument. The first entry has index one.
Cancelling the menu invokes the callback with -1.
To add shortcut keys, see the example here:
|popup_menu-shortcut-example|
popup_filter_yesno({id}, {key}) *popup_filter_yesno()* popup_filter_yesno({id}, {key}) *popup_filter_yesno()*
Filter that can be used for a popup. It handles only the keys Filter that can be used for a popup. It handles only the keys
'y', 'Y' and 'n' or 'N'. Invokes the "callback" of the 'y', 'Y' and 'n' or 'N'. Invokes the "callback" of the
popup menu with the 1 for 'y' or 'Y' and zero for 'n' or 'N' popup menu with the 1 for 'y' or 'Y' and zero for 'n' or 'N'
as the second argument. Pressing Esc and CTRL-C works like as the second argument. Pressing Esc and 'x' works like
pressing 'n'. pressing 'n'. CTRL-C invokes the callback with -1. Other
keys are ignored.
See the example here: |popup_dialog-example|
popup_setlines({id}, {lnum}, {lines}) *popup_setlines()* popup_getoptions({id}) *popup_getoptions()*
In popup {id} set line {lnum} and following to {lines}. Return the {options} for popup {id} in a Dict.
A zero value means the option was not set. For "zindex" the
default value is returned, not zero.
{lnum} is one-based and must be either an existing line or The "moved" entry is a list with line number, minimum and
just one below the last line, in which case the line gets maximum column, [0, 0, 0] when not set.
appended.
{lines} has the same format as one item in {lines} of The "mousemoved" entry is a list with screen row, minimum and
|popup_show()|. Existing lines are replaced. When {lines} maximum screen column, [0, 0, 0] when not set.
extends below the last line of the popup lines are appended.
popup_getlines({id}) *popup_getlines()* "border" and "padding" are not included when all values are
Return the {lines} for popup {id}. zero. When all values are one then an empty list is included.
"borderhighlight" is not included when all values are empty.
"scrollbarhighlight" and "thumbhighlight" are onlu included
when set.
"tabpage" will be -1 for a global popup, zero for a popup on
the current tabpage and a positive number for a popup on
another tabpage.
If popup window {id} is not found an empty Dict is returned.
popup_getpos({id}) *popup_getpos()*
Return the position and size of popup {id}. Returns a Dict
with these entries:
col screen column of the popup, one-based
line screen line of the popup, one-based
width width of the whole popup in screen cells
height height of the whole popup in screen cells
core_col screen column of the text box
core_line screen line of the text box
core_width width of the text box in screen cells
core_height height of the text box in screen cells
firstline line of the buffer at top (1 unless scrolled)
scrollbar non-zero if a scrollbar is displayed
visible one if the popup is displayed, zero if hidden
Note that these are the actual screen positions. They differ
from the values in `popup_getoptions()` for the sizing and
positioning mechanism applied.
The "core_" values exclude the padding and border.
If popup window {id} is not found an empty Dict is returned.
popup_hide({id}) *popup_hide()*
If {id} is a displayed popup, hide it now. If the popup has a
filter it will not be invoked for so long as the popup is
hidden.
If window {id} does not exist nothing happens. If window {id}
exists but is not a popup window an error is given. *E993*
popup_locate({row}, {col}) *popup_locate()*
Return the |window-ID| of the popup at screen positoin {row}
and {col}. If there are multiple popups the one with the
highest zindex is returned. If there are no popups at this
position then zero is returned.
popup_menu({what}, {options}) *popup_menu()*
Show the {what} near the cursor, handle selecting one of the
items with cursorkeys, and close it an item is selected with
Space or Enter. {what} should have multiple lines to make this
useful. This works like: >
call popup_create({what}, ~{
\ pos: 'center',
\ zindex: 200,
\ drag: 1,
\ wrap: 0,
\ border: [],
\ padding: [0,1,0,1],
\ filter: 'popup_filter_menu',
\ })
< The current line is highlighted with a match using
"PopupSelected", or "PmenuSel" if that is not defined.
Use {options} to change the properties. Should at least set
"callback" to a function that handles the selected item.
popup_move({id}, {options}) *popup_move()*
Move popup {id} to the position specified with {options}.
{options} may contain the items from |popup_create()| that
specify the popup position:
line
col
pos
maxheight
minheight
maxwidth
minwidth
fixed
For {id} see `popup_hide()`.
For other options see |popup_setoptions()|.
popup_notification({what}, {options}) *popup_notification()*
Show the {what} for 3 seconds at the top of the Vim window.
This works like: >
call popup_create({what}, ~{
\ line: 1,
\ col: 10,
\ minwidth: 20,
\ time: 3000,
\ tabpage: -1,
\ zindex: 300,
\ drag: 1,
\ highlight: 'WarningMsg',
\ border: [],
\ close: 'click',
\ padding: [0,1,0,1],
\ })
< The PopupNotification highlight group is used instead of
WarningMsg if it is defined.
Without the |+timers| feature the poup will not disappear
automatically, the user has to click in it.
The position will be adjusted to avoid overlap with other
notifications.
Use {options} to change the properties.
popup_show({id}) *popup_show()*
If {id} is a hidden popup, show it now.
For {id} see `popup_hide()`.
popup_setoptions({id}, {options}) *popup_setoptions()* popup_setoptions({id}, {options}) *popup_setoptions()*
Override options in popup {id} with entries in {options}. Override options in popup {id} with entries in {options}.
These options can be set:
border
borderchars
borderhighlight
callback
close
drag
filter
firstline
flip
highlight
mask
moved
padding
scrollbar
scrollbarhighlight
thumbhighlight
time
title
wrap
zindex
The options from |popup_move()| can also be used.
For "hidden" use |popup_hide()| and |popup_show()|.
"tabpage" cannot be changed.
popup_settext({id}, {text}) *popup_settext()*
Set the text of the buffer in poup win {id}. {text} is the
same as supplied to |popup_create()|, except that a buffer
number is not allowed.
Does not change the window size or position, other than caused
by the different text.
popup_getoptions({id}) *popup_getoptions()* ==============================================================================
Return the {options} for popup {id}. 3. Usage *popup-usage*
POPUP_CREATE() ARGUMENTS *popup_create-arguments*
popup_close({id}) *popup_close()* The first argument of |popup_create()| (and the second argument to
Close popup {id}. |popup_settext()|) specifies the text to be displayed, and optionally text
properties. It is in one of four forms:
- a buffer number
POPUP_SHOW() ARGUMENTS *popup_show-usage* - a string
- a list of strings
The first argument of |popup_show()| is a list of text lines. Each item in - a list of dictionaries, where each dictionary has these entries:
the list is a dictionary with these entries: text String with the text to display.
text The text to display.
props A list of text properties. Optional. props A list of text properties. Optional.
Each entry is a dictionary, like the third argument of Each entry is a dictionary, like the third argument of
|prop_add()|, but specifying the column in the |prop_add()|, but specifying the column in the
dictionary with a "col" entry, see below: dictionary with a "col" entry, see below:
|popup-props|. |popup-props|.
The second argument of |popup_show()| is a dictionary with options: The second argument of |popup_create()| is a dictionary with options:
line screen line where to position the popup; can use line Screen line where to position the popup. Can use a
"cursor", "cursor+1" or "cursor-1" to use the line of number or "cursor", "cursor+1" or "cursor-1" to use
the cursor and add or subtract a number of lines; the line of the cursor and add or subtract a number of
default is "cursor-1". lines. If omitted the popup is vertically centered.
col screen column where to position the popup; can use The first line is 1.
"cursor" to use the column of the cursor, "cursor+99" col Screen column where to position the popup. Can use a
and "cursor-99" to add or subtract a number of number or "cursor" to use the column of the cursor,
columns; default is "cursor" "cursor+9" or "cursor-9" to add or subtract a number
of columns. If omitted the popup is horizontally
centered. The first column is 1.
pos "topleft", "topright", "botleft" or "botright": pos "topleft", "topright", "botleft" or "botright":
defines what corner of the popup "line" and "col" are defines what corner of the popup "line" and "col" are
used for. Default is "botleft". Alternatively used for. When not set "topleft" is used.
"center" can be used to position the popup somewhere Alternatively "center" can be used to position the
near the cursor. popup in the center of the Vim window, in which case
maxheight maximum height "line" and "col" are ignored.
minheight minimum height fixed When FALSE (the default), and:
maxwidth maximum width - "pos" is "botleft" or "topleft", and
minwidth minimum width - "wrap" is off, and
title text to be displayed above the first item in the - the popup would be truncated at the right edge of
popup, on top of any border the screen, then
wrap TRUE to make the lines wrap (default TRUE) the popup is moved to the left so as to fit the
highlight highlight group name to use for the text, defines the contents on the screen. Set to TRUE to disable this.
background and foreground color flip When TRUE (the default) and the position is relative
border list with numbers, defining the border thickness to the cursor, flip to below or above the cursor to
above/right/below/left of the popup; an empty list avoid overlap with the |popupmenu-completion| or
uses a border of 1 all around another popup with a higher "zindex". When there is
borderhighlight highlight group name to use for the border no space above/below the cursor then show the popup to
borderchars list with characters, defining the character to use the side of the popup or popup menu.
for the top/right/bottom/left border; optionally {not implemented yet}
maxheight Maximum height of the contents, excluding border and
padding.
minheight Minimum height of the contents, excluding border and
padding.
maxwidth Maximum width of the contents, excluding border and
padding.
minwidth Minimum width of the contents, excluding border and
padding.
firstline First buffer line to display. When larger than one it
looks like the text scrolled up. When out of range
the last buffer line will at the top of the window.
Also see "scrollbar".
hidden When TRUE the popup exists but is not displayed; use
`popup_show()` to unhide it.
tabpage When -1: display the popup on all tab pages.
When 0 (the default): display the popup on the current
tab page.
Otherwise the number of the tab page the popup is
displayed on; when invalid the popup is not created
and an error is given. *E997*
title Text to be displayed above the first item in the
popup, on top of any border. If there is no top
border one line of padding is added to put the title
on. You might want to add one or more spaces at the
start and end as padding.
wrap TRUE to make the lines wrap (default TRUE).
drag TRUE to allow the popup to be dragged with the mouse
by grabbing at at the border. Has no effect if the
popup does not have a border. As soon as dragging
starts and "pos" is "center" it is changed to
"topleft".
close When "button" an X is displayed in the top-right, on
top of any border, padding or text. When clicked on
the X the popup will close. Any callback is invoked
with the value -2.
When "click" any mouse click in the popup will close
it.
When "none" (the default) mouse clicks do not close
the popup window.
highlight Highlight group name to use for the text, stored in
the 'wincolor' option.
padding List with numbers, defining the padding
above/right/below/left of the popup (similar to CSS).
An empty list uses a padding of 1 all around. The
padding goes around the text, inside any border.
Padding uses the 'wincolor' highlight.
Example: [1, 2, 1, 3] has 1 line of padding above, 2
columns on the right, 1 line below and 3 columns on
the left.
border List with numbers, defining the border thickness
above/right/below/left of the popup (similar to CSS).
Only values of zero and non-zero are recognized.
An empty list uses a border all around.
borderhighlight List of highlight group names to use for the border.
When one entry it is used for all borders, otherwise
the highlight for the top/right/bottom/left border.
Example: ['TopColor', 'RightColor', 'BottomColor,
'LeftColor']
borderchars List with characters, defining the character to use
for the top/right/bottom/left border. Optionally
followed by the character to use for the followed by the character to use for the
topright/botright/botleft/topleft corner; an empty topleft/topright/botright/botleft corner.
list can be used to show a double line all around Example: ['-', '|', '-', '|', '┌', '┐', '┘', '└']
zindex priority for the popup, default 50 When the list has one character it is used for all.
time time in milliseconds after which the popup will close; When the list has two characters the first is used for
when omitted |popup_close()| must be used. the border lines, the second for the corners.
moved "cell": close the popup if the cursor moved at least By default a double line is used all around when
one screen cell; "word" allows for moving within 'encoding' is "utf-8" and 'ambiwidth' is "single",
|<cword>|, "WORD" allows for moving within |<cWORD>|, otherwise ASCII characters are used.
a list with two numbers specifies the start and end scrollbar non-zero: show a scrollbar when the text doesn't fit.
column zero: do not show a scrollbar. Default is non-zero.
filter a callback that can filter typed characters, see Also see |popup-scrollbar|.
|popup-filter| scrollbarhighlight Highlight group name for the scrollbar. The
callback a callback to be used when the popup closes, e.g. when background color is what matters. When not given then
using |popup_filter_menu()|, see |popup-callback|. PmenuSbar is used.
thumbhighlight Highlight group name for the scrollbar thumb. The
background color is what matters. When not given then
PmenuThumb is used.
zindex Priority for the popup, default 50. Minimum value is
1, maximum value is 32000.
mask A list of lists with coordinates, defining parts of
the popup that are transparent. See |popup-mask|.
time Time in milliseconds after which the popup will close.
When omitted |popup_close()| must be used.
moved Specifies to close the popup if the cursor moved:
- "any": if the cursor moved at all
- "word": if the cursor moved outside |<cword>|
- "WORD": if the cursor moved outside |<cWORD>|
- "expr": if the cursor moved outside |<cexpr>|
- [{start}, {end}]: if the cursor moved before column
{start} or after {end}
The popup also closes if the cursor moves to another
line or to another window.
filter A callback that can filter typed characters, see
|popup-filter|.
callback A callback that is called when the popup closes, e.g.
when using |popup_filter_menu()|, see |popup-callback|.
Depending on the "zindex" the popup goes under or above other popups. The Depending on the "zindex" the popup goes under or above other popups. The
completion menu (|popup-menu|) has zindex 100. For messages that occur for a completion menu (|popup-menu|) has zindex 100. For messages that occur for a
@ -210,11 +614,15 @@ outside of the Vim window will not be displayed, thus truncated.
POPUP TEXT PROPERTIES *popup-props* POPUP TEXT PROPERTIES *popup-props*
These are similar to the third argument of |prop_add()|, but not exactly the These are similar to the third argument of |prop_add()| except:
same, since they only apply to one line. - "lnum" is always the current line in the list
- "bufnr" is always the buffer of the popup
- "col" is in the Dict instead of a separate argument
So we get:
col starting column, counted in bytes, use one for the col starting column, counted in bytes, use one for the
first column. first column.
length length of text in bytes; can be zero length length of text in bytes; can be zero
end_lnum line number for the end of the text
end_col column just after the text; not used when "length" is end_col column just after the text; not used when "length" is
present; when {col} and "end_col" are equal, this is a present; when {col} and "end_col" are equal, this is a
zero-width text property zero-width text property
@ -222,41 +630,100 @@ same, since they only apply to one line.
used used
type name of the text property type, as added with type name of the text property type, as added with
|prop_type_add()| |prop_type_add()|
transparent do not show these characters, show the text under it;
if there is an border character to the right or below
it will be made transparent as well
POPUP FILTER *popup-filter* POPUP FILTER *popup-filter*
A callback that gets any typed keys while a popup is displayed. It can return A callback that gets any typed keys while a popup is displayed. The filter is
TRUE to indicate the key has been handled and is to be discarded, or FALSE to not invoked when the popup is hidden.
let Vim handle the key as usual in the current state.
The filter can return TRUE to indicate the key has been handled and is to be
discarded, or FALSE to let Vim handle the key as usual in the current state.
In case it returns FALSE and there is another popup window visible, that
filter is also called. The filter of the popup window with the highest zindex
is called first.
The filter function is called with two arguments: the ID of the popup and the The filter function is called with two arguments: the ID of the popup and the
key. key as a string, e.g.: >
func MyFilter(winid, key)
if a:key == "\<F2>"
" do something
return 1
endif
if a:key == 'x'
call popup_close(a:winid)
return 1
endif
return 0
endfunc
Currently the key is what results after any mapping. This may change...
Some common key actions: Some common key actions:
Esc close the popup x close the popup (see note below)
cursor keys select another entry cursor keys select another entry
Tab accept current suggestion Tab accept current suggestion
A mouse click arrives as <LeftMouse>. The coordinates are in
v:mouse_popup_col and v:mouse_popup_row. The top-left screen cell of the
popup is col 1, row 1 (not counting the border).
Vim provides standard filters |popup_filter_menu()| and Vim provides standard filters |popup_filter_menu()| and
|popup_filter_yesno()|. |popup_filter_yesno()|.
Note that "x" is the normal way to close a popup. You may want to use Esc,
but since many keys start with an Esc character, there may be a delay before
Vim recognizes the Esc key. If you do use Esc, it is recommended to set the
'ttimeoutlen' option to 100 and set 'timeout' and/or 'ttimeout'.
POPUP CALLBACK *popup-callback* POPUP CALLBACK *popup-callback*
A callback that is invoked when the popup closes. Used by A callback that is invoked when the popup closes.
|popup_filter_menu()|. Invoked with two arguments: the ID of the popup and
the result, which would usually be an index in the popup lines, or whatever The callback is invoked with two arguments: the ID of the popup window and the
the filter wants to pass. result, which could be an index in the popup lines, or whatever was passed as
the second argument of `popup_close()`.
If the popup is force-closed, e.g. because the cursor moved or CTRL-C was
pressed, the number -1 is passed to the callback.
POPUP SCROLLBAR *popup-scrollbar*
If the text does not fit in the popup a scrollbar is displayed on the right of
the window. This can be disabled by setting the "scrollbar" option to zero.
When the scrollbar is displayed mouse scroll events, while the mouse pointer
is on the popup, will cause the text to scroll up or down as you would expect.
A click in the upper halve of the scrollbar will scroll the text one line
down. A click in the lower halve wil scroll the text one line up. However,
this is limited so that the popup does not get smaller.
POPUP MASK *popup-mask*
To minimize the text that the popup covers, parts of it can be made
transparent. This is defined by a "mask" which is a list of lists, where each
list has four numbers:
col start column, positive for counting from the left, 1 for
leftmost, negative for counting from the right, -1 for
rightmost
endcol last column, like "col"
line start line, positive for conting from the top, 1 for top,
negative for counting from the bottom, -1 for bottom
endline end line, like "line"
For example, to make the last 10 columns of the last line transparent:
[[-10, -1, -1, -1]]
To make the four corners transparent:
[[1, 1, 1, 1], [-1, -1, 1, 1], [1, 1, -1, -1], [-1, -1, -1, -1]]
============================================================================== ==============================================================================
3. Examples *popup-examples* 4. Examples *popup-examples*
TODO
TODO: more interesting examples
*popup_dialog-example*
Prompt the user to press y/Y or n/N: > Prompt the user to press y/Y or n/N: >
func MyDialogHandler(id, result) func MyDialogHandler(id, result)
@ -265,10 +732,88 @@ Prompt the user to press y/Y or n/N: >
endif endif
endfunc endfunc
call popup_show([{'text': 'Continue? y/n'}], { call popup_dialog('Continue? y/n', ~{
\ 'filter': 'popup_filter_yesno', \ filter: 'popup_filter_yesno',
\ 'callback': 'MyDialogHandler', \ callback: 'MyDialogHandler',
\ }) \ })
< <
*popup_menu-shortcut-example*
Extend popup_filter_menu() with shortcut keys: >
call popup_menu(['Save', 'Cancel', 'Discard'], ~{
\ filter: 'MyMenuFilter',
\ callback: 'MyMenuHandler',
\ })
func MyMenuFilter(id, key)
" Handle shortcuts
if a:key == 'S'
call popup_close(a:id, 1)
return 1
endif
if a:key == 'C'
call popup_close(a:id, 2)
return 1
endif
if a:key == 'D'
call popup_close(a:id, 3)
return 1
endif
" No shortcut, pass to generic filter
return popup_filter_menu(a:id, a:key)
endfunc
<
*popup_beval_example*
Example for using a popup window for 'ballooneval': >
set ballooneval balloonevalterm
set balloonexpr=BalloonExpr()
let s:winid = 0
let s:last_text = ''
func BalloonExpr()
if s:winid && popup_getpos(s:winid) != {}
" previous popup window still shows
if v:beval_text == s:last_text
" Still the same text, keep the existing popup
return ''
endif
call popup_close(s:winid)
endif
let s:winid = popup_beval(v:beval_text, ~{mousemoved: 'word'})
let s:last_text = v:beval_text
return ''
endfunc
<
If the text has to be obtained asynchronously return an empty string from the
expression function and call popup_beval() once the text is available. In
this example simulated with a timer callback: >
set ballooneval balloonevalterm
set balloonexpr=BalloonExpr()
let s:winid = 0
let s:balloonText = ''
func BalloonExpr()
if s:winid && popup_getpos(s:winid) != {}
" previous popup window still shows
if v:beval_text == s:balloonText
" Still the same text, keep the existing popup
return ''
endif
call popup_close(s:winid)
let s:winid = 0
endif
" simulate an asynchronous loopup for the text to display
let s:balloonText = v:beval_text
call timer_start(100, 'ShowPopup')
return ''
endfunc
func ShowPopup(id)
let s:winid = popup_beval(s:balloonText, ~{mousemoved: 'word'})
endfunc
<
vim:tw=78:ts=8:noet:ft=help:norl: vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -1,4 +1,4 @@
*quickfix.txt* For Vim version 8.1. Last change: 2019 May 05 *quickfix.txt* For Vim version 8.1. Last change: 2019 Jun 02
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -102,7 +102,7 @@ processing a quickfix or location list command, it will be aborted.
:ll[!] [nr] Same as ":cc", except the location list for the :ll[!] [nr] Same as ":cc", except the location list for the
:[nr]ll[!] current window is used instead of the quickfix list. :[nr]ll[!] current window is used instead of the quickfix list.
*:cn* *:cnext* *E553* *:cn* *:cne* *:cnext* *E553*
:[count]cn[ext][!] Display the [count] next error in the list that :[count]cn[ext][!] Display the [count] next error in the list that
includes a file name. If there are no file names at includes a file name. If there are no file names at
all, go to the [count] next error. See |:cc| for all, go to the [count] next error. See |:cc| for
@ -246,7 +246,7 @@ processing a quickfix or location list command, it will be aborted.
'encoding' option, you can use the 'makeencoding' 'encoding' option, you can use the 'makeencoding'
option to specify the encoding. option to specify the encoding.
*:lf* *:lfile* *:lf* *:lfi* *:lfile*
:lf[ile][!] [errorfile] Same as ":cfile", except the location list for the :lf[ile][!] [errorfile] Same as ":cfile", except the location list for the
current window is used instead of the quickfix list. current window is used instead of the quickfix list.
You can not use the -q command-line option to set You can not use the -q command-line option to set
@ -261,7 +261,7 @@ processing a quickfix or location list command, it will be aborted.
option to specify the encoding. option to specify the encoding.
:lg[etfile] [errorfile] *:lg* *:lgetfile* :lg[etfile] [errorfile] *:lg* *:lge* *:lgetfile*
Same as ":cgetfile", except the location list for the Same as ":cgetfile", except the location list for the
current window is used instead of the quickfix list. current window is used instead of the quickfix list.
@ -299,7 +299,7 @@ processing a quickfix or location list command, it will be aborted.
the current window is used instead of the quickfix the current window is used instead of the quickfix
list. list.
*:cad* *:caddbuffer* *:cad* *:cadd* *:caddbuffer*
:cad[dbuffer] [bufnr] Read the error list from the current buffer and add :cad[dbuffer] [bufnr] Read the error list from the current buffer and add
the errors to the current quickfix list. If a the errors to the current quickfix list. If a
quickfix list is not present, then a new list is quickfix list is not present, then a new list is
@ -346,7 +346,7 @@ processing a quickfix or location list command, it will be aborted.
Example: > Example: >
:g/mypattern/caddexpr expand("%") . ":" . line(".") . ":" . getline(".") :g/mypattern/caddexpr expand("%") . ":" . line(".") . ":" . getline(".")
< <
*:lad* *:laddexpr* *:lad* *:addd* *:laddexpr*
:lad[dexpr] {expr} Same as ":caddexpr", except the location list for the :lad[dexpr] {expr} Same as ":caddexpr", except the location list for the
current window is used instead of the quickfix list. current window is used instead of the quickfix list.

View File

@ -1,4 +1,4 @@
*quickref.txt* For Vim version 8.1. Last change: 2019 Apr 28 *quickref.txt* For Vim version 8.1. Last change: 2019 May 31
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -798,6 +798,7 @@ Short explanation of each option: *option-list*
'menuitems' 'mis' maximum number of items in a menu 'menuitems' 'mis' maximum number of items in a menu
'mkspellmem' 'msm' memory used before |:mkspell| compresses the tree 'mkspellmem' 'msm' memory used before |:mkspell| compresses the tree
'modeline' 'ml' recognize modelines at start or end of file 'modeline' 'ml' recognize modelines at start or end of file
'modelineexpr' 'mle' allow setting expression options from a modeline
'modelines' 'mls' number of lines checked for modelines 'modelines' 'mls' number of lines checked for modelines
'modifiable' 'ma' changes to the text are not possible 'modifiable' 'ma' changes to the text are not possible
'modified' 'mod' buffer has been modified 'modified' 'mod' buffer has been modified
@ -981,6 +982,7 @@ Short explanation of each option: *option-list*
'wildmode' 'wim' mode for 'wildchar' command-line expansion 'wildmode' 'wim' mode for 'wildchar' command-line expansion
'wildoptions' 'wop' specifies how command line completion is done 'wildoptions' 'wop' specifies how command line completion is done
'winaltkeys' 'wak' when the windows system handles ALT keys 'winaltkeys' 'wak' when the windows system handles ALT keys
'wincolor' 'wcr' window-local highlighting
'window' 'wi' nr of lines to scroll for CTRL-F and CTRL-B 'window' 'wi' nr of lines to scroll for CTRL-F and CTRL-B
'winheight' 'wh' minimum number of lines for the current window 'winheight' 'wh' minimum number of lines for the current window
'winfixheight' 'wfh' keep window height when opening/closing windows 'winfixheight' 'wfh' keep window height when opening/closing windows

View File

@ -1,4 +1,4 @@
*repeat.txt* For Vim version 8.1. Last change: 2019 May 07 *repeat.txt* For Vim version 8.1. Last change: 2019 Jun 14
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -178,7 +178,7 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
:so[urce] {file} Read Ex commands from {file}. These are commands that :so[urce] {file} Read Ex commands from {file}. These are commands that
start with a ":". start with a ":".
Triggers the |SourcePre| autocommand. Triggers the |SourcePre| autocommand.
*:source!*
:so[urce]! {file} Read Vim commands from {file}. These are commands :so[urce]! {file} Read Vim commands from {file}. These are commands
that are executed from Normal mode, like you type that are executed from Normal mode, like you type
them. them.
@ -186,6 +186,7 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
|:bufdo|, in a loop or when another command follows |:bufdo|, in a loop or when another command follows
the display won't be updated while executing the the display won't be updated while executing the
commands. commands.
Cannot be used in the |sandbox|.
*:ru* *:runtime* *:ru* *:runtime*
:ru[ntime][!] [where] {file} .. :ru[ntime][!] [where] {file} ..
@ -279,9 +280,16 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
after loading your .vimrc file. With this command it after loading your .vimrc file. With this command it
can be done earlier. can be done earlier.
Packages will be loaded only once. After this command Packages will be loaded only once. Using
it won't happen again. When the optional ! is added `:packloadall` a second time will have no effect.
this command will load packages even when done before. When the optional ! is added this command will load
packages even when done before.
Note that when using `:packloadall` in the |vimrc|
file, the 'runtimepath' option is updated, and later
all plugins in 'runtimepath' will be loaded, which
means they are loaded again. Plugins are expected to
handle that.
An error only causes sourcing the script where it An error only causes sourcing the script where it
happens to be aborted, further plugins will be loaded. happens to be aborted, further plugins will be loaded.

View File

@ -1,4 +1,4 @@
*scroll.txt* For Vim version 8.1. Last change: 2019 May 05 *scroll.txt* For Vim version 8.1. Last change: 2019 May 13
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -82,9 +82,6 @@ CTRL-U Scroll window Upwards in the buffer. The number of
may be a difference). When the cursor is on the first may be a difference). When the cursor is on the first
line of the buffer nothing happens and a beep is line of the buffer nothing happens and a beep is
produced. See also 'startofline' option. produced. See also 'startofline' option.
{difference from vi: Vim scrolls 'scroll' screen
lines, instead of file lines; makes a difference when
lines wrap}
<S-Up> or *<S-Up>* *<kPageUp>* <S-Up> or *<S-Up>* *<kPageUp>*
<PageUp> or *<PageUp>* *CTRL-B* <PageUp> or *<PageUp>* *CTRL-B*

View File

@ -1,4 +1,4 @@
*sign.txt* For Vim version 8.1. Last change: 2019 May 05 *sign.txt* For Vim version 8.1. Last change: 2019 Jun 04
VIM REFERENCE MANUAL by Gordon Prieur VIM REFERENCE MANUAL by Gordon Prieur
@ -182,9 +182,9 @@ See |sign_place()| for the equivalent Vim script function.
By default, the sign is assigned a default priority of 10. To By default, the sign is assigned a default priority of 10. To
assign a different priority value, use "priority={prio}" to assign a different priority value, use "priority={prio}" to
specify a value. The priority is used to determine the specify a value. The priority is used to determine the sign
highlight group used when multiple signs are placed on the that is displayed when multiple signs are placed on the same
same line. line.
Examples: > Examples: >
:sign place 5 line=3 name=sign1 file=a.py :sign place 5 line=3 name=sign1 file=a.py
@ -204,7 +204,9 @@ See |sign_place()| for the equivalent Vim script function.
it (e.g., when the debugger has stopped at a breakpoint). it (e.g., when the debugger has stopped at a breakpoint).
The optional "group={group}" attribute can be used before The optional "group={group}" attribute can be used before
"file=" to select a sign in a particular group. "file=" to select a sign in a particular group. The optional
"priority={prio}" attribute can be used to change the priority
of an existing sign.
:sign place {id} name={name} [buffer={nr}] :sign place {id} name={name} [buffer={nr}]
Same, but use buffer {nr}. If the buffer argument is not Same, but use buffer {nr}. If the buffer argument is not

View File

@ -1,4 +1,4 @@
*starting.txt* For Vim version 8.1. Last change: 2019 May 05 *starting.txt* For Vim version 8.1. Last change: 2019 Jun 02
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -1252,7 +1252,7 @@ vimrc file.
options to [file] (default ".exrc" in the current options to [file] (default ".exrc" in the current
directory). directory).
*:mkv* *:mkvimrc* *:mkv* *:mkvi* *:mkvimrc*
:mkv[imrc][!] [file] Like ":mkexrc", but the default is ".vimrc" in the :mkv[imrc][!] [file] Like ":mkexrc", but the default is ".vimrc" in the
current directory. The ":version" command is also current directory. The ":version" command is also
written to the file. written to the file.

View File

@ -1,4 +1,4 @@
*syntax.txt* For Vim version 8.1. Last change: 2019 Mar 29 *syntax.txt* For Vim version 8.1. Last change: 2019 Jun 13
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -3140,7 +3140,7 @@ in your <.vimrc>, and :set fdm=syntax. I suggest doing the latter via a
modeline at the end of your LaTeX file: > modeline at the end of your LaTeX file: >
% vim: fdm=syntax % vim: fdm=syntax
If your system becomes too slow, then you might wish to look into > If your system becomes too slow, then you might wish to look into >
https://vimhelp.appspot.com/vim_faq.txt.html#faq-29.7 https://vimhelp.org/vim_faq.txt.html#faq-29.7
< <
*g:tex_nospell* *g:tex_nospell*
Tex: No Spell Checking Wanted~ Tex: No Spell Checking Wanted~
@ -4827,8 +4827,9 @@ cterm={attr-list} *highlight-cterm*
The "cterm" argument is likely to be different from "term", when The "cterm" argument is likely to be different from "term", when
colors are used. For example, in a normal terminal comments could colors are used. For example, in a normal terminal comments could
be underlined, in a color terminal they can be made Blue. be underlined, in a color terminal they can be made Blue.
Note: Many terminals (e.g., DOS console) can't mix these attributes Note: Some terminals (e.g., DOS console) can't mix these attributes
with coloring. Use only one of "cterm=" OR "ctermfg=" OR "ctermbg=". with coloring. To be portable, use only one of "cterm=" OR "ctermfg="
OR "ctermbg=".
ctermfg={color-nr} *highlight-ctermfg* *E421* ctermfg={color-nr} *highlight-ctermfg* *E421*
ctermbg={color-nr} *highlight-ctermbg* ctermbg={color-nr} *highlight-ctermbg*
@ -5209,6 +5210,15 @@ load the syntax file.
The command also deletes the "b:current_syntax" variable, since no syntax is The command also deletes the "b:current_syntax" variable, since no syntax is
loaded after this command. loaded after this command.
To clean up specific syntax groups for the current buffer: >
:syntax clear {group-name} ..
This removes all patterns and keywords for {group-name}.
To clean up specific syntax group lists for the current buffer: >
:syntax clear @{grouplist-name} ..
This sets {grouplist-name}'s contents to an empty list.
*:syntax-off* *:syn-off*
If you want to disable syntax highlighting for all buffers, you need to remove If you want to disable syntax highlighting for all buffers, you need to remove
the autocommands that load the syntax files: > the autocommands that load the syntax files: >
:syntax off :syntax off
@ -5218,14 +5228,6 @@ What this command actually does, is executing the command >
See the "nosyntax.vim" file for details. Note that for this to work See the "nosyntax.vim" file for details. Note that for this to work
$VIMRUNTIME must be valid. See |$VIMRUNTIME|. $VIMRUNTIME must be valid. See |$VIMRUNTIME|.
To clean up specific syntax groups for the current buffer: >
:syntax clear {group-name} ..
This removes all patterns and keywords for {group-name}.
To clean up specific syntax group lists for the current buffer: >
:syntax clear @{grouplist-name} ..
This sets {grouplist-name}'s contents to an empty list.
*:syntax-reset* *:syn-reset* *:syntax-reset* *:syn-reset*
If you have changed the colors and messed them up, use this command to get the If you have changed the colors and messed them up, use this command to get the
defaults back: > defaults back: >

View File

@ -455,6 +455,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
'mis' options.txt /*'mis'* 'mis' options.txt /*'mis'*
'mkspellmem' options.txt /*'mkspellmem'* 'mkspellmem' options.txt /*'mkspellmem'*
'ml' options.txt /*'ml'* 'ml' options.txt /*'ml'*
'mle' options.txt /*'mle'*
'mls' options.txt /*'mls'* 'mls' options.txt /*'mls'*
'mm' options.txt /*'mm'* 'mm' options.txt /*'mm'*
'mmd' options.txt /*'mmd'* 'mmd' options.txt /*'mmd'*
@ -462,6 +463,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
'mmt' options.txt /*'mmt'* 'mmt' options.txt /*'mmt'*
'mod' options.txt /*'mod'* 'mod' options.txt /*'mod'*
'modeline' options.txt /*'modeline'* 'modeline' options.txt /*'modeline'*
'modelineexpr' options.txt /*'modelineexpr'*
'modelines' options.txt /*'modelines'* 'modelines' options.txt /*'modelines'*
'modifiable' options.txt /*'modifiable'* 'modifiable' options.txt /*'modifiable'*
'modified' options.txt /*'modified'* 'modified' options.txt /*'modified'*
@ -617,8 +619,10 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
'nomagic' options.txt /*'nomagic'* 'nomagic' options.txt /*'nomagic'*
'nomh' options.txt /*'nomh'* 'nomh' options.txt /*'nomh'*
'noml' options.txt /*'noml'* 'noml' options.txt /*'noml'*
'nomle' options.txt /*'nomle'*
'nomod' options.txt /*'nomod'* 'nomod' options.txt /*'nomod'*
'nomodeline' options.txt /*'nomodeline'* 'nomodeline' options.txt /*'nomodeline'*
'nomodelineexpr' options.txt /*'nomodelineexpr'*
'nomodifiable' options.txt /*'nomodifiable'* 'nomodifiable' options.txt /*'nomodifiable'*
'nomodified' options.txt /*'nomodified'* 'nomodified' options.txt /*'nomodified'*
'nomore' options.txt /*'nomore'* 'nomore' options.txt /*'nomore'*
@ -1181,6 +1185,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
'wb' options.txt /*'wb'* 'wb' options.txt /*'wb'*
'wc' options.txt /*'wc'* 'wc' options.txt /*'wc'*
'wcm' options.txt /*'wcm'* 'wcm' options.txt /*'wcm'*
'wcr' options.txt /*'wcr'*
'wd' options.txt /*'wd'* 'wd' options.txt /*'wd'*
'weirdinvert' options.txt /*'weirdinvert'* 'weirdinvert' options.txt /*'weirdinvert'*
'wfh' options.txt /*'wfh'* 'wfh' options.txt /*'wfh'*
@ -1199,6 +1204,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
'wildoptions' options.txt /*'wildoptions'* 'wildoptions' options.txt /*'wildoptions'*
'wim' options.txt /*'wim'* 'wim' options.txt /*'wim'*
'winaltkeys' options.txt /*'winaltkeys'* 'winaltkeys' options.txt /*'winaltkeys'*
'wincolor' options.txt /*'wincolor'*
'window' options.txt /*'window'* 'window' options.txt /*'window'*
'winfixheight' options.txt /*'winfixheight'* 'winfixheight' options.txt /*'winfixheight'*
'winfixwidth' options.txt /*'winfixwidth'* 'winfixwidth' options.txt /*'winfixwidth'*
@ -1345,6 +1351,8 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
+scrollbind various.txt /*+scrollbind* +scrollbind various.txt /*+scrollbind*
+signs various.txt /*+signs* +signs various.txt /*+signs*
+smartindent various.txt /*+smartindent* +smartindent various.txt /*+smartindent*
+sound various.txt /*+sound*
+spell various.txt /*+spell*
+startuptime various.txt /*+startuptime* +startuptime various.txt /*+startuptime*
+statusline various.txt /*+statusline* +statusline various.txt /*+statusline*
+sun_workshop various.txt /*+sun_workshop* +sun_workshop various.txt /*+sun_workshop*
@ -2043,6 +2051,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:abclear map.txt /*:abclear* :abclear map.txt /*:abclear*
:abo windows.txt /*:abo* :abo windows.txt /*:abo*
:aboveleft windows.txt /*:aboveleft* :aboveleft windows.txt /*:aboveleft*
:addd quickfix.txt /*:addd*
:al windows.txt /*:al* :al windows.txt /*:al*
:all windows.txt /*:all* :all windows.txt /*:all*
:am gui.txt /*:am* :am gui.txt /*:am*
@ -2051,6 +2060,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:anoremenu gui.txt /*:anoremenu* :anoremenu gui.txt /*:anoremenu*
:append insert.txt /*:append* :append insert.txt /*:append*
:ar editing.txt /*:ar* :ar editing.txt /*:ar*
:arg editing.txt /*:arg*
:arga editing.txt /*:arga* :arga editing.txt /*:arga*
:argadd editing.txt /*:argadd* :argadd editing.txt /*:argadd*
:argd editing.txt /*:argd* :argd editing.txt /*:argd*
@ -2103,6 +2113,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:bp windows.txt /*:bp* :bp windows.txt /*:bp*
:bprevious windows.txt /*:bprevious* :bprevious windows.txt /*:bprevious*
:br windows.txt /*:br* :br windows.txt /*:br*
:bre windows.txt /*:bre*
:brea eval.txt /*:brea* :brea eval.txt /*:brea*
:break eval.txt /*:break* :break eval.txt /*:break*
:breaka repeat.txt /*:breaka* :breaka repeat.txt /*:breaka*
@ -2132,12 +2143,14 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:cNf quickfix.txt /*:cNf* :cNf quickfix.txt /*:cNf*
:cNfile quickfix.txt /*:cNfile* :cNfile quickfix.txt /*:cNfile*
:ca map.txt /*:ca* :ca map.txt /*:ca*
:cab map.txt /*:cab*
:cabbrev map.txt /*:cabbrev* :cabbrev map.txt /*:cabbrev*
:cabc map.txt /*:cabc* :cabc map.txt /*:cabc*
:cabclear map.txt /*:cabclear* :cabclear map.txt /*:cabclear*
:cabo quickfix.txt /*:cabo* :cabo quickfix.txt /*:cabo*
:cabove quickfix.txt /*:cabove* :cabove quickfix.txt /*:cabove*
:cad quickfix.txt /*:cad* :cad quickfix.txt /*:cad*
:cadd quickfix.txt /*:cadd*
:caddbuffer quickfix.txt /*:caddbuffer* :caddbuffer quickfix.txt /*:caddbuffer*
:cadde quickfix.txt /*:cadde* :cadde quickfix.txt /*:cadde*
:caddexpr quickfix.txt /*:caddexpr* :caddexpr quickfix.txt /*:caddexpr*
@ -2184,6 +2197,8 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:chd editing.txt /*:chd* :chd editing.txt /*:chd*
:chdir editing.txt /*:chdir* :chdir editing.txt /*:chdir*
:che tagsrch.txt /*:che* :che tagsrch.txt /*:che*
:chec tagsrch.txt /*:chec*
:check tagsrch.txt /*:check*
:checkpath tagsrch.txt /*:checkpath* :checkpath tagsrch.txt /*:checkpath*
:checkt editing.txt /*:checkt* :checkt editing.txt /*:checkt*
:checktime editing.txt /*:checktime* :checktime editing.txt /*:checktime*
@ -2205,12 +2220,14 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:cme gui.txt /*:cme* :cme gui.txt /*:cme*
:cmenu gui.txt /*:cmenu* :cmenu gui.txt /*:cmenu*
:cn quickfix.txt /*:cn* :cn quickfix.txt /*:cn*
:cne quickfix.txt /*:cne*
:cnew quickfix.txt /*:cnew* :cnew quickfix.txt /*:cnew*
:cnewer quickfix.txt /*:cnewer* :cnewer quickfix.txt /*:cnewer*
:cnext quickfix.txt /*:cnext* :cnext quickfix.txt /*:cnext*
:cnf quickfix.txt /*:cnf* :cnf quickfix.txt /*:cnf*
:cnfile quickfix.txt /*:cnfile* :cnfile quickfix.txt /*:cnfile*
:cno map.txt /*:cno* :cno map.txt /*:cno*
:cnor map.txt /*:cnor*
:cnorea map.txt /*:cnorea* :cnorea map.txt /*:cnorea*
:cnoreabbrev map.txt /*:cnoreabbrev* :cnoreabbrev map.txt /*:cnoreabbrev*
:cnoremap map.txt /*:cnoremap* :cnoremap map.txt /*:cnoremap*
@ -2244,6 +2261,8 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:con eval.txt /*:con* :con eval.txt /*:con*
:conf editing.txt /*:conf* :conf editing.txt /*:conf*
:confirm editing.txt /*:confirm* :confirm editing.txt /*:confirm*
:cons eval.txt /*:cons*
:const eval.txt /*:const*
:continue eval.txt /*:continue* :continue eval.txt /*:continue*
:cope quickfix.txt /*:cope* :cope quickfix.txt /*:cope*
:copen quickfix.txt /*:copen* :copen quickfix.txt /*:copen*
@ -2261,6 +2280,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:cscope if_cscop.txt /*:cscope* :cscope if_cscop.txt /*:cscope*
:cstag if_cscop.txt /*:cstag* :cstag if_cscop.txt /*:cstag*
:cu map.txt /*:cu* :cu map.txt /*:cu*
:cun map.txt /*:cun*
:cuna map.txt /*:cuna* :cuna map.txt /*:cuna*
:cunabbrev map.txt /*:cunabbrev* :cunabbrev map.txt /*:cunabbrev*
:cunmap map.txt /*:cunmap* :cunmap map.txt /*:cunmap*
@ -2285,6 +2305,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:delmarks motion.txt /*:delmarks* :delmarks motion.txt /*:delmarks*
:di change.txt /*:di* :di change.txt /*:di*
:dif diff.txt /*:dif* :dif diff.txt /*:dif*
:diff diff.txt /*:diff*
:diffg diff.txt /*:diffg* :diffg diff.txt /*:diffg*
:diffget diff.txt /*:diffget* :diffget diff.txt /*:diffget*
:diffo diff.txt /*:diffo* :diffo diff.txt /*:diffo*
@ -2308,6 +2329,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:dlist tagsrch.txt /*:dlist* :dlist tagsrch.txt /*:dlist*
:do autocmd.txt /*:do* :do autocmd.txt /*:do*
:doau autocmd.txt /*:doau* :doau autocmd.txt /*:doau*
:doaut autocmd.txt /*:doaut*
:doautoa autocmd.txt /*:doautoa* :doautoa autocmd.txt /*:doautoa*
:doautoall autocmd.txt /*:doautoall* :doautoall autocmd.txt /*:doautoall*
:doautocmd autocmd.txt /*:doautocmd* :doautocmd autocmd.txt /*:doautocmd*
@ -2342,6 +2364,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:em gui.txt /*:em* :em gui.txt /*:em*
:emenu gui.txt /*:emenu* :emenu gui.txt /*:emenu*
:en eval.txt /*:en* :en eval.txt /*:en*
:end eval.txt /*:end*
:endf eval.txt /*:endf* :endf eval.txt /*:endf*
:endfo eval.txt /*:endfo* :endfo eval.txt /*:endfo*
:endfor eval.txt /*:endfor* :endfor eval.txt /*:endfor*
@ -2394,6 +2417,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:foldc fold.txt /*:foldc* :foldc fold.txt /*:foldc*
:foldclose fold.txt /*:foldclose* :foldclose fold.txt /*:foldclose*
:foldd fold.txt /*:foldd* :foldd fold.txt /*:foldd*
:folddo fold.txt /*:folddo*
:folddoc fold.txt /*:folddoc* :folddoc fold.txt /*:folddoc*
:folddoclosed fold.txt /*:folddoclosed* :folddoclosed fold.txt /*:folddoclosed*
:folddoopen fold.txt /*:folddoopen* :folddoopen fold.txt /*:folddoopen*
@ -2465,6 +2489,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:in insert.txt /*:in* :in insert.txt /*:in*
:index index.txt /*:index* :index index.txt /*:index*
:ino map.txt /*:ino* :ino map.txt /*:ino*
:inor map.txt /*:inor*
:inorea map.txt /*:inorea* :inorea map.txt /*:inorea*
:inoreabbrev map.txt /*:inoreabbrev* :inoreabbrev map.txt /*:inoreabbrev*
:inoremap map.txt /*:inoremap* :inoremap map.txt /*:inoremap*
@ -2488,6 +2513,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:jumps motion.txt /*:jumps* :jumps motion.txt /*:jumps*
:k motion.txt /*:k* :k motion.txt /*:k*
:kee motion.txt /*:kee* :kee motion.txt /*:kee*
:keep motion.txt /*:keep*
:keepa editing.txt /*:keepa* :keepa editing.txt /*:keepa*
:keepalt editing.txt /*:keepalt* :keepalt editing.txt /*:keepalt*
:keepj motion.txt /*:keepj* :keepj motion.txt /*:keepj*
@ -2546,21 +2572,25 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:let-= eval.txt /*:let-=* :let-= eval.txt /*:let-=*
:let-@ eval.txt /*:let-@* :let-@ eval.txt /*:let-@*
:let-environment eval.txt /*:let-environment* :let-environment eval.txt /*:let-environment*
:let-heredoc eval.txt /*:let-heredoc*
:let-option eval.txt /*:let-option* :let-option eval.txt /*:let-option*
:let-register eval.txt /*:let-register* :let-register eval.txt /*:let-register*
:let-unpack eval.txt /*:let-unpack* :let-unpack eval.txt /*:let-unpack*
:let..= eval.txt /*:let..=* :let..= eval.txt /*:let..=*
:let.= eval.txt /*:let.=* :let.= eval.txt /*:let.=*
:let/= eval.txt /*:let\/=* :let/= eval.txt /*:let\/=*
:let=<< eval.txt /*:let=<<*
:letstar= eval.txt /*:letstar=* :letstar= eval.txt /*:letstar=*
:lex quickfix.txt /*:lex* :lex quickfix.txt /*:lex*
:lexpr quickfix.txt /*:lexpr* :lexpr quickfix.txt /*:lexpr*
:lf quickfix.txt /*:lf* :lf quickfix.txt /*:lf*
:lfdo quickfix.txt /*:lfdo* :lfdo quickfix.txt /*:lfdo*
:lfi quickfix.txt /*:lfi*
:lfile quickfix.txt /*:lfile* :lfile quickfix.txt /*:lfile*
:lfir quickfix.txt /*:lfir* :lfir quickfix.txt /*:lfir*
:lfirst quickfix.txt /*:lfirst* :lfirst quickfix.txt /*:lfirst*
:lg quickfix.txt /*:lg* :lg quickfix.txt /*:lg*
:lge quickfix.txt /*:lge*
:lgetb quickfix.txt /*:lgetb* :lgetb quickfix.txt /*:lgetb*
:lgetbuffer quickfix.txt /*:lgetbuffer* :lgetbuffer quickfix.txt /*:lgetbuffer*
:lgete quickfix.txt /*:lgete* :lgete quickfix.txt /*:lgete*
@ -2581,6 +2611,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:lli quickfix.txt /*:lli* :lli quickfix.txt /*:lli*
:llist quickfix.txt /*:llist* :llist quickfix.txt /*:llist*
:lm map.txt /*:lm* :lm map.txt /*:lm*
:lma map.txt /*:lma*
:lmak quickfix.txt /*:lmak* :lmak quickfix.txt /*:lmak*
:lmake quickfix.txt /*:lmake* :lmake quickfix.txt /*:lmake*
:lmap map.txt /*:lmap* :lmap map.txt /*:lmap*
@ -2600,6 +2631,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:loadkeymap mbyte.txt /*:loadkeymap* :loadkeymap mbyte.txt /*:loadkeymap*
:loadview starting.txt /*:loadview* :loadview starting.txt /*:loadview*
:loc motion.txt /*:loc* :loc motion.txt /*:loc*
:lock motion.txt /*:lock*
:lockmarks motion.txt /*:lockmarks* :lockmarks motion.txt /*:lockmarks*
:lockv eval.txt /*:lockv* :lockv eval.txt /*:lockv*
:lockvar eval.txt /*:lockvar* :lockvar eval.txt /*:lockvar*
@ -2689,6 +2721,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:mksp spell.txt /*:mksp* :mksp spell.txt /*:mksp*
:mkspell spell.txt /*:mkspell* :mkspell spell.txt /*:mkspell*
:mkv starting.txt /*:mkv* :mkv starting.txt /*:mkv*
:mkvi starting.txt /*:mkvi*
:mkvie starting.txt /*:mkvie* :mkvie starting.txt /*:mkvie*
:mkview starting.txt /*:mkview* :mkview starting.txt /*:mkview*
:mkvimrc starting.txt /*:mkvimrc* :mkvimrc starting.txt /*:mkvimrc*
@ -2983,6 +3016,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:setl options.txt /*:setl* :setl options.txt /*:setl*
:setlocal options.txt /*:setlocal* :setlocal options.txt /*:setlocal*
:sf windows.txt /*:sf* :sf windows.txt /*:sf*
:sfi windows.txt /*:sfi*
:sfind windows.txt /*:sfind* :sfind windows.txt /*:sfind*
:sfir windows.txt /*:sfir* :sfir windows.txt /*:sfir*
:sfirst windows.txt /*:sfirst* :sfirst windows.txt /*:sfirst*
@ -3036,6 +3070,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:sno change.txt /*:sno* :sno change.txt /*:sno*
:snomagic change.txt /*:snomagic* :snomagic change.txt /*:snomagic*
:snor map.txt /*:snor* :snor map.txt /*:snor*
:snore map.txt /*:snore*
:snoremap map.txt /*:snoremap* :snoremap map.txt /*:snoremap*
:snoreme gui.txt /*:snoreme* :snoreme gui.txt /*:snoreme*
:snoremenu gui.txt /*:snoremenu* :snoremenu gui.txt /*:snoremenu*
@ -3043,6 +3078,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:sor change.txt /*:sor* :sor change.txt /*:sor*
:sort change.txt /*:sort* :sort change.txt /*:sort*
:source repeat.txt /*:source* :source repeat.txt /*:source*
:source! repeat.txt /*:source!*
:source_crnl repeat.txt /*:source_crnl* :source_crnl repeat.txt /*:source_crnl*
:sp windows.txt /*:sp* :sp windows.txt /*:sp*
:spe spell.txt /*:spe* :spe spell.txt /*:spe*
@ -3137,7 +3173,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:syn-matchgroup syntax.txt /*:syn-matchgroup* :syn-matchgroup syntax.txt /*:syn-matchgroup*
:syn-multi-line syntax.txt /*:syn-multi-line* :syn-multi-line syntax.txt /*:syn-multi-line*
:syn-nextgroup syntax.txt /*:syn-nextgroup* :syn-nextgroup syntax.txt /*:syn-nextgroup*
:syn-off usr_06.txt /*:syn-off* :syn-off syntax.txt /*:syn-off*
:syn-on syntax.txt /*:syn-on* :syn-on syntax.txt /*:syn-on*
:syn-oneline syntax.txt /*:syn-oneline* :syn-oneline syntax.txt /*:syn-oneline*
:syn-pattern syntax.txt /*:syn-pattern* :syn-pattern syntax.txt /*:syn-pattern*
@ -3166,6 +3202,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:syncbind scroll.txt /*:syncbind* :syncbind scroll.txt /*:syncbind*
:syntax syntax.txt /*:syntax* :syntax syntax.txt /*:syntax*
:syntax-enable syntax.txt /*:syntax-enable* :syntax-enable syntax.txt /*:syntax-enable*
:syntax-off syntax.txt /*:syntax-off*
:syntax-on syntax.txt /*:syntax-on* :syntax-on syntax.txt /*:syntax-on*
:syntax-reset syntax.txt /*:syntax-reset* :syntax-reset syntax.txt /*:syntax-reset*
:syntime syntax.txt /*:syntime* :syntime syntax.txt /*:syntime*
@ -3282,6 +3319,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:update editing.txt /*:update* :update editing.txt /*:update*
:v repeat.txt /*:v* :v repeat.txt /*:v*
:ve various.txt /*:ve* :ve various.txt /*:ve*
:ver various.txt /*:ver*
:verb various.txt /*:verb* :verb various.txt /*:verb*
:verbose various.txt /*:verbose* :verbose various.txt /*:verbose*
:verbose-cmd various.txt /*:verbose-cmd* :verbose-cmd various.txt /*:verbose-cmd*
@ -4688,12 +4726,12 @@ E95 message.txt /*E95*
E950 message.txt /*E950* E950 message.txt /*E950*
E951 pattern.txt /*E951* E951 pattern.txt /*E951*
E952 autocmd.txt /*E952* E952 autocmd.txt /*E952*
E953 eval.txt /*E953* E953 terminal.txt /*E953*
E954 options.txt /*E954* E954 options.txt /*E954*
E955 eval.txt /*E955* E955 terminal.txt /*E955*
E956 pattern.txt /*E956* E956 pattern.txt /*E956*
E957 eval.txt /*E957* E957 eval.txt /*E957*
E958 eval.txt /*E958* E958 terminal.txt /*E958*
E96 diff.txt /*E96* E96 diff.txt /*E96*
E960 options.txt /*E960* E960 options.txt /*E960*
E961 cmdline.txt /*E961* E961 cmdline.txt /*E961*
@ -4726,7 +4764,16 @@ E985 eval.txt /*E985*
E986 tagsrch.txt /*E986* E986 tagsrch.txt /*E986*
E987 tagsrch.txt /*E987* E987 tagsrch.txt /*E987*
E988 gui_w32.txt /*E988* E988 gui_w32.txt /*E988*
E989 eval.txt /*E989*
E99 diff.txt /*E99* E99 diff.txt /*E99*
E990 eval.txt /*E990*
E991 eval.txt /*E991*
E992 options.txt /*E992*
E993 popup.txt /*E993*
E994 eval.txt /*E994*
E995 eval.txt /*E995*
E996 eval.txt /*E996*
E997 popup.txt /*E997*
E999 repeat.txt /*E999* E999 repeat.txt /*E999*
EX intro.txt /*EX* EX intro.txt /*EX*
EXINIT starting.txt /*EXINIT* EXINIT starting.txt /*EXINIT*
@ -5371,6 +5418,7 @@ break-finally eval.txt /*break-finally*
browse() eval.txt /*browse()* browse() eval.txt /*browse()*
browsedir() eval.txt /*browsedir()* browsedir() eval.txt /*browsedir()*
browsefilter editing.txt /*browsefilter* browsefilter editing.txt /*browsefilter*
bufadd() eval.txt /*bufadd()*
bufexists() eval.txt /*bufexists()* bufexists() eval.txt /*bufexists()*
buffer-functions usr_41.txt /*buffer-functions* buffer-functions usr_41.txt /*buffer-functions*
buffer-hidden windows.txt /*buffer-hidden* buffer-hidden windows.txt /*buffer-hidden*
@ -5383,6 +5431,7 @@ buffer_number() eval.txt /*buffer_number()*
buffers windows.txt /*buffers* buffers windows.txt /*buffers*
buffers-menu gui.txt /*buffers-menu* buffers-menu gui.txt /*buffers-menu*
buflisted() eval.txt /*buflisted()* buflisted() eval.txt /*buflisted()*
bufload() eval.txt /*bufload()*
bufloaded() eval.txt /*bufloaded()* bufloaded() eval.txt /*bufloaded()*
bufname() eval.txt /*bufname()* bufname() eval.txt /*bufname()*
bufnr() eval.txt /*bufnr()* bufnr() eval.txt /*bufnr()*
@ -6096,6 +6145,7 @@ exp() eval.txt /*exp()*
expand() eval.txt /*expand()* expand() eval.txt /*expand()*
expand-env options.txt /*expand-env* expand-env options.txt /*expand-env*
expand-environment-var options.txt /*expand-environment-var* expand-environment-var options.txt /*expand-environment-var*
expandcmd() eval.txt /*expandcmd()*
expr eval.txt /*expr* expr eval.txt /*expr*
expr-! eval.txt /*expr-!* expr-! eval.txt /*expr-!*
expr-!= eval.txt /*expr-!=* expr-!= eval.txt /*expr-!=*
@ -6477,6 +6527,7 @@ g:Netrw_UserMaps pi_netrw.txt /*g:Netrw_UserMaps*
g:Netrw_corehandler pi_netrw.txt /*g:Netrw_corehandler* g:Netrw_corehandler pi_netrw.txt /*g:Netrw_corehandler*
g:Netrw_funcref pi_netrw.txt /*g:Netrw_funcref* g:Netrw_funcref pi_netrw.txt /*g:Netrw_funcref*
g:actual_curbuf options.txt /*g:actual_curbuf* g:actual_curbuf options.txt /*g:actual_curbuf*
g:actual_curwin options.txt /*g:actual_curwin*
g:ada#Comment ft_ada.txt /*g:ada#Comment* g:ada#Comment ft_ada.txt /*g:ada#Comment*
g:ada#Ctags_Kinds ft_ada.txt /*g:ada#Ctags_Kinds* g:ada#Ctags_Kinds ft_ada.txt /*g:ada#Ctags_Kinds*
g:ada#DotWordRegex ft_ada.txt /*g:ada#DotWordRegex* g:ada#DotWordRegex ft_ada.txt /*g:ada#DotWordRegex*
@ -6667,6 +6718,7 @@ g:rustfmt_autosave ft_rust.txt /*g:rustfmt_autosave*
g:rustfmt_command ft_rust.txt /*g:rustfmt_command* g:rustfmt_command ft_rust.txt /*g:rustfmt_command*
g:rustfmt_fail_silently ft_rust.txt /*g:rustfmt_fail_silently* g:rustfmt_fail_silently ft_rust.txt /*g:rustfmt_fail_silently*
g:rustfmt_options ft_rust.txt /*g:rustfmt_options* g:rustfmt_options ft_rust.txt /*g:rustfmt_options*
g:statusline_winid options.txt /*g:statusline_winid*
g:syntax_on syntax.txt /*g:syntax_on* g:syntax_on syntax.txt /*g:syntax_on*
g:tar_browseoptions pi_tar.txt /*g:tar_browseoptions* g:tar_browseoptions pi_tar.txt /*g:tar_browseoptions*
g:tar_cmd pi_tar.txt /*g:tar_cmd* g:tar_cmd pi_tar.txt /*g:tar_cmd*
@ -7412,7 +7464,11 @@ list-index eval.txt /*list-index*
list-modification eval.txt /*list-modification* list-modification eval.txt /*list-modification*
list-repeat windows.txt /*list-repeat* list-repeat windows.txt /*list-repeat*
list2str() eval.txt /*list2str()* list2str() eval.txt /*list2str()*
listener_add() eval.txt /*listener_add()*
listener_flush() eval.txt /*listener_flush()*
listener_remove() eval.txt /*listener_remove()*
lite.vim syntax.txt /*lite.vim* lite.vim syntax.txt /*lite.vim*
literal-Dict eval.txt /*literal-Dict*
literal-string eval.txt /*literal-string* literal-string eval.txt /*literal-string*
lnum-variable eval.txt /*lnum-variable* lnum-variable eval.txt /*lnum-variable*
load-plugins starting.txt /*load-plugins* load-plugins starting.txt /*load-plugins*
@ -8049,6 +8105,7 @@ option-summary options.txt /*option-summary*
option-window options.txt /*option-window* option-window options.txt /*option-window*
option_restore() todo.txt /*option_restore()* option_restore() todo.txt /*option_restore()*
option_save() todo.txt /*option_save()* option_save() todo.txt /*option_save()*
optional-function-argument eval.txt /*optional-function-argument*
options options.txt /*options* options options.txt /*options*
options-changed version5.txt /*options-changed* options-changed version5.txt /*options-changed*
options-in-terminal terminal.txt /*options-in-terminal* options-in-terminal terminal.txt /*options-in-terminal*
@ -8095,6 +8152,7 @@ paragraph motion.txt /*paragraph*
pascal.vim syntax.txt /*pascal.vim* pascal.vim syntax.txt /*pascal.vim*
patches-8 version8.txt /*patches-8* patches-8 version8.txt /*patches-8*
patches-8.1 version8.txt /*patches-8.1* patches-8.1 version8.txt /*patches-8.1*
patches-8.2 version8.txt /*patches-8.2*
pathshorten() eval.txt /*pathshorten()* pathshorten() eval.txt /*pathshorten()*
pattern pattern.txt /*pattern* pattern pattern.txt /*pattern*
pattern-atoms pattern.txt /*pattern-atoms* pattern-atoms pattern.txt /*pattern-atoms*
@ -8164,8 +8222,47 @@ plugin-special usr_41.txt /*plugin-special*
pmbcs-option print.txt /*pmbcs-option* pmbcs-option print.txt /*pmbcs-option*
pmbfn-option print.txt /*pmbfn-option* pmbfn-option print.txt /*pmbfn-option*
popt-option print.txt /*popt-option* popt-option print.txt /*popt-option*
popup popup.txt /*popup*
popup-buffer popup.txt /*popup-buffer*
popup-callback popup.txt /*popup-callback*
popup-close popup.txt /*popup-close*
popup-examples popup.txt /*popup-examples*
popup-filter popup.txt /*popup-filter*
popup-function-details popup.txt /*popup-function-details*
popup-functions popup.txt /*popup-functions*
popup-intro popup.txt /*popup-intro*
popup-mask popup.txt /*popup-mask*
popup-menu gui.txt /*popup-menu* popup-menu gui.txt /*popup-menu*
popup-menu-added version5.txt /*popup-menu-added* popup-menu-added version5.txt /*popup-menu-added*
popup-position popup.txt /*popup-position*
popup-props popup.txt /*popup-props*
popup-scrollbar popup.txt /*popup-scrollbar*
popup-usage popup.txt /*popup-usage*
popup-window popup.txt /*popup-window*
popup-window-functions usr_41.txt /*popup-window-functions*
popup.txt popup.txt /*popup.txt*
popup_atcursor() popup.txt /*popup_atcursor()*
popup_beval() popup.txt /*popup_beval()*
popup_beval_example popup.txt /*popup_beval_example*
popup_clear() popup.txt /*popup_clear()*
popup_close() popup.txt /*popup_close()*
popup_create() popup.txt /*popup_create()*
popup_create-arguments popup.txt /*popup_create-arguments*
popup_dialog() popup.txt /*popup_dialog()*
popup_dialog-example popup.txt /*popup_dialog-example*
popup_filter_menu() popup.txt /*popup_filter_menu()*
popup_filter_yesno() popup.txt /*popup_filter_yesno()*
popup_getoptions() popup.txt /*popup_getoptions()*
popup_getpos() popup.txt /*popup_getpos()*
popup_hide() popup.txt /*popup_hide()*
popup_locate() popup.txt /*popup_locate()*
popup_menu() popup.txt /*popup_menu()*
popup_menu-shortcut-example popup.txt /*popup_menu-shortcut-example*
popup_move() popup.txt /*popup_move()*
popup_notification() popup.txt /*popup_notification()*
popup_setoptions() popup.txt /*popup_setoptions()*
popup_settext() popup.txt /*popup_settext()*
popup_show() popup.txt /*popup_show()*
popupmenu-completion insert.txt /*popupmenu-completion* popupmenu-completion insert.txt /*popupmenu-completion*
popupmenu-keys insert.txt /*popupmenu-keys* popupmenu-keys insert.txt /*popupmenu-keys*
ports-5.2 version5.txt /*ports-5.2* ports-5.2 version5.txt /*ports-5.2*
@ -8497,6 +8594,7 @@ screenattr() eval.txt /*screenattr()*
screenchar() eval.txt /*screenchar()* screenchar() eval.txt /*screenchar()*
screenchars() eval.txt /*screenchars()* screenchars() eval.txt /*screenchars()*
screencol() eval.txt /*screencol()* screencol() eval.txt /*screencol()*
screenpos() eval.txt /*screenpos()*
screenrow() eval.txt /*screenrow()* screenrow() eval.txt /*screenrow()*
screenstring() eval.txt /*screenstring()* screenstring() eval.txt /*screenstring()*
script usr_41.txt /*script* script usr_41.txt /*script*
@ -8506,6 +8604,9 @@ script-variable eval.txt /*script-variable*
scriptnames-dictionary eval.txt /*scriptnames-dictionary* scriptnames-dictionary eval.txt /*scriptnames-dictionary*
scriptout-changed version4.txt /*scriptout-changed* scriptout-changed version4.txt /*scriptout-changed*
scriptversion eval.txt /*scriptversion* scriptversion eval.txt /*scriptversion*
scriptversion-1 eval.txt /*scriptversion-1*
scriptversion-2 eval.txt /*scriptversion-2*
scriptversion-3 eval.txt /*scriptversion-3*
scroll-binding scroll.txt /*scroll-binding* scroll-binding scroll.txt /*scroll-binding*
scroll-cursor scroll.txt /*scroll-cursor* scroll-cursor scroll.txt /*scroll-cursor*
scroll-down scroll.txt /*scroll-down* scroll-down scroll.txt /*scroll-down*
@ -8597,8 +8698,10 @@ sign_getdefined() eval.txt /*sign_getdefined()*
sign_getplaced() eval.txt /*sign_getplaced()* sign_getplaced() eval.txt /*sign_getplaced()*
sign_jump() eval.txt /*sign_jump()* sign_jump() eval.txt /*sign_jump()*
sign_place() eval.txt /*sign_place()* sign_place() eval.txt /*sign_place()*
sign_placelist() eval.txt /*sign_placelist()*
sign_undefine() eval.txt /*sign_undefine()* sign_undefine() eval.txt /*sign_undefine()*
sign_unplace() eval.txt /*sign_unplace()* sign_unplace() eval.txt /*sign_unplace()*
sign_unplacelist() eval.txt /*sign_unplacelist()*
signs sign.txt /*signs* signs sign.txt /*signs*
simple-change change.txt /*simple-change* simple-change change.txt /*simple-change*
simplify() eval.txt /*simplify()* simplify() eval.txt /*simplify()*
@ -8615,6 +8718,10 @@ slow-terminal term.txt /*slow-terminal*
socket-interface channel.txt /*socket-interface* socket-interface channel.txt /*socket-interface*
sort() eval.txt /*sort()* sort() eval.txt /*sort()*
sorting change.txt /*sorting* sorting change.txt /*sorting*
sound_clear() eval.txt /*sound_clear()*
sound_playevent() eval.txt /*sound_playevent()*
sound_playfile() eval.txt /*sound_playfile()*
sound_stop() eval.txt /*sound_stop()*
soundfold() eval.txt /*soundfold()* soundfold() eval.txt /*soundfold()*
space intro.txt /*space* space intro.txt /*space*
spec-customizing pi_spec.txt /*spec-customizing* spec-customizing pi_spec.txt /*spec-customizing*
@ -9170,29 +9277,29 @@ term++open terminal.txt /*term++open*
term-dependent-settings term.txt /*term-dependent-settings* term-dependent-settings term.txt /*term-dependent-settings*
term-list syntax.txt /*term-list* term-list syntax.txt /*term-list*
term.txt term.txt /*term.txt* term.txt term.txt /*term.txt*
term_dumpdiff() eval.txt /*term_dumpdiff()* term_dumpdiff() terminal.txt /*term_dumpdiff()*
term_dumpload() eval.txt /*term_dumpload()* term_dumpload() terminal.txt /*term_dumpload()*
term_dumpwrite() eval.txt /*term_dumpwrite()* term_dumpwrite() terminal.txt /*term_dumpwrite()*
term_getaltscreen() eval.txt /*term_getaltscreen()* term_getaltscreen() terminal.txt /*term_getaltscreen()*
term_getansicolors() eval.txt /*term_getansicolors()* term_getansicolors() terminal.txt /*term_getansicolors()*
term_getattr() eval.txt /*term_getattr()* term_getattr() terminal.txt /*term_getattr()*
term_getcursor() eval.txt /*term_getcursor()* term_getcursor() terminal.txt /*term_getcursor()*
term_getjob() eval.txt /*term_getjob()* term_getjob() terminal.txt /*term_getjob()*
term_getline() eval.txt /*term_getline()* term_getline() terminal.txt /*term_getline()*
term_getscrolled() eval.txt /*term_getscrolled()* term_getscrolled() terminal.txt /*term_getscrolled()*
term_getsize() eval.txt /*term_getsize()* term_getsize() terminal.txt /*term_getsize()*
term_getstatus() eval.txt /*term_getstatus()* term_getstatus() terminal.txt /*term_getstatus()*
term_gettitle() eval.txt /*term_gettitle()* term_gettitle() terminal.txt /*term_gettitle()*
term_gettty() eval.txt /*term_gettty()* term_gettty() terminal.txt /*term_gettty()*
term_list() eval.txt /*term_list()* term_list() terminal.txt /*term_list()*
term_scrape() eval.txt /*term_scrape()* term_scrape() terminal.txt /*term_scrape()*
term_sendkeys() eval.txt /*term_sendkeys()* term_sendkeys() terminal.txt /*term_sendkeys()*
term_setansicolors() eval.txt /*term_setansicolors()* term_setansicolors() terminal.txt /*term_setansicolors()*
term_setkill() eval.txt /*term_setkill()* term_setkill() terminal.txt /*term_setkill()*
term_setrestore() eval.txt /*term_setrestore()* term_setrestore() terminal.txt /*term_setrestore()*
term_setsize() eval.txt /*term_setsize()* term_setsize() terminal.txt /*term_setsize()*
term_start() eval.txt /*term_start()* term_start() terminal.txt /*term_start()*
term_wait() eval.txt /*term_wait()* term_wait() terminal.txt /*term_wait()*
termcap term.txt /*termcap* termcap term.txt /*termcap*
termcap-changed version4.txt /*termcap-changed* termcap-changed version4.txt /*termcap-changed*
termcap-colors term.txt /*termcap-colors* termcap-colors term.txt /*termcap-colors*
@ -9223,6 +9330,7 @@ terminal-debugger terminal.txt /*terminal-debugger*
terminal-diff terminal.txt /*terminal-diff* terminal-diff terminal.txt /*terminal-diff*
terminal-diffscreendump terminal.txt /*terminal-diffscreendump* terminal-diffscreendump terminal.txt /*terminal-diffscreendump*
terminal-dumptest terminal.txt /*terminal-dumptest* terminal-dumptest terminal.txt /*terminal-dumptest*
terminal-function-details terminal.txt /*terminal-function-details*
terminal-functions usr_41.txt /*terminal-functions* terminal-functions usr_41.txt /*terminal-functions*
terminal-info term.txt /*terminal-info* terminal-info term.txt /*terminal-info*
terminal-job-index index.txt /*terminal-job-index* terminal-job-index index.txt /*terminal-job-index*
@ -9249,6 +9357,8 @@ test_alloc_fail() eval.txt /*test_alloc_fail()*
test_autochdir() eval.txt /*test_autochdir()* test_autochdir() eval.txt /*test_autochdir()*
test_feedinput() eval.txt /*test_feedinput()* test_feedinput() eval.txt /*test_feedinput()*
test_garbagecollect_now() eval.txt /*test_garbagecollect_now()* test_garbagecollect_now() eval.txt /*test_garbagecollect_now()*
test_garbagecollect_soon() eval.txt /*test_garbagecollect_soon()*
test_getvalue() eval.txt /*test_getvalue()*
test_ignore_error() eval.txt /*test_ignore_error()* test_ignore_error() eval.txt /*test_ignore_error()*
test_null_blob() eval.txt /*test_null_blob()* test_null_blob() eval.txt /*test_null_blob()*
test_null_channel() eval.txt /*test_null_channel()* test_null_channel() eval.txt /*test_null_channel()*
@ -9460,8 +9570,11 @@ v:none eval.txt /*v:none*
v:null eval.txt /*v:null* v:null eval.txt /*v:null*
v:oldfiles eval.txt /*v:oldfiles* v:oldfiles eval.txt /*v:oldfiles*
v:operator eval.txt /*v:operator* v:operator eval.txt /*v:operator*
v:option_command eval.txt /*v:option_command*
v:option_new eval.txt /*v:option_new* v:option_new eval.txt /*v:option_new*
v:option_old eval.txt /*v:option_old* v:option_old eval.txt /*v:option_old*
v:option_oldglobal eval.txt /*v:option_oldglobal*
v:option_oldlocal eval.txt /*v:option_oldlocal*
v:option_type eval.txt /*v:option_type* v:option_type eval.txt /*v:option_type*
v:prevcount eval.txt /*v:prevcount* v:prevcount eval.txt /*v:prevcount*
v:profiling eval.txt /*v:profiling* v:profiling eval.txt /*v:profiling*
@ -9501,6 +9614,7 @@ v:true eval.txt /*v:true*
v:val eval.txt /*v:val* v:val eval.txt /*v:val*
v:var eval.txt /*v:var* v:var eval.txt /*v:var*
v:version eval.txt /*v:version* v:version eval.txt /*v:version*
v:versionlong eval.txt /*v:versionlong*
v:vim_did_enter eval.txt /*v:vim_did_enter* v:vim_did_enter eval.txt /*v:vim_did_enter*
v:warningmsg eval.txt /*v:warningmsg* v:warningmsg eval.txt /*v:warningmsg*
v:windowid eval.txt /*v:windowid* v:windowid eval.txt /*v:windowid*
@ -9659,6 +9773,7 @@ version7.txt version7.txt /*version7.txt*
version8.0 version8.txt /*version8.0* version8.0 version8.txt /*version8.0*
version8.1 version8.txt /*version8.1* version8.1 version8.txt /*version8.1*
version8.txt version8.txt /*version8.txt* version8.txt version8.txt /*version8.txt*
versionlong-variable eval.txt /*versionlong-variable*
vi intro.txt /*vi* vi intro.txt /*vi*
vi-differences vi_diff.txt /*vi-differences* vi-differences vi_diff.txt /*vi-differences*
vi-features vi_diff.txt /*vi-features* vi-features vi_diff.txt /*vi-features*
@ -9804,6 +9919,7 @@ win32-vimrun gui_w32.txt /*win32-vimrun*
win32-win3.1 os_win32.txt /*win32-win3.1* win32-win3.1 os_win32.txt /*win32-win3.1*
win32-win95 os_win32.txt /*win32-win95* win32-win95 os_win32.txt /*win32-win95*
win32s os_win32.txt /*win32s* win32s os_win32.txt /*win32s*
win_execute() eval.txt /*win_execute()*
win_findbuf() eval.txt /*win_findbuf()* win_findbuf() eval.txt /*win_findbuf()*
win_getid() eval.txt /*win_getid()* win_getid() eval.txt /*win_getid()*
win_gotoid() eval.txt /*win_gotoid()* win_gotoid() eval.txt /*win_gotoid()*

View File

@ -1,4 +1,4 @@
*tagsrch.txt* For Vim version 8.1. Last change: 2019 May 07 *tagsrch.txt* For Vim version 8.1. Last change: 2019 Jun 10
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -85,18 +85,21 @@ changed, to avoid confusion when using ":tnext". It is changed when using
":tag {name}". ":tag {name}".
The ignore-case matches are not found for a ":tag" command when: The ignore-case matches are not found for a ":tag" command when:
- the 'ignorecase' option is off and 'tagcase' is "followic" - 'tagcase' is "followic" and the 'ignorecase' option is off
- 'tagcase' is "followscs" and the 'ignorecase' option is off and the
'smartcase' option is off or the pattern contains an upper case character.
- 'tagcase' is "match" - 'tagcase' is "match"
- 'tagcase' is "smart" and the pattern contains an upper case character. - 'tagcase' is "smart" and the pattern contains an upper case character.
- 'tagcase' is "followscs" and 'smartcase' option is on and the pattern
contains an upper case character.
The ignore-case matches are found when: The ignore-case matches are found when:
- a pattern is used (starting with a "/") - a pattern is used (starting with a "/")
- for ":tselect" - for ":tselect"
- when 'tagcase' is "followic" and 'ignorecase' is off - when 'tagcase' is "followic" and 'ignorecase' is on
- when 'tagcase' is "match" - when 'tagcase' is "followscs" and 'ignorecase' is on or the 'smartcase'
- when 'tagcase' is "followscs" and the 'smartcase' option is off option is on and the pattern does not contain an upper case character
- when 'tagcase' is "ignore"
- when 'tagcase' is "smart" and the patter does not contain an upper case
character
Note that using ignore-case tag searching disables binary searching in the Note that using ignore-case tag searching disables binary searching in the
tags file, which causes a slowdown. This can be avoided by fold-case sorting tags file, which causes a slowdown. This can be avoided by fold-case sorting
@ -503,7 +506,7 @@ Some programs that generate tags files:
ctags As found on most Unix systems. Only supports C. Only ctags As found on most Unix systems. Only supports C. Only
does the basic work. does the basic work.
*Exuberant_ctags* *Exuberant_ctags*
exuberant ctags This a very good one. It works for C, C++, Java, exuberant ctags This is a very good one. It works for C, C++, Java,
Fortran, Eiffel and others. It can generate tags for Fortran, Eiffel and others. It can generate tags for
many items. See http://ctags.sourceforge.net. many items. See http://ctags.sourceforge.net.
etags Connected to Emacs. Supports many languages. etags Connected to Emacs. Supports many languages.
@ -824,7 +827,7 @@ CTRL-W d Open a new window, with the cursor on the first
(default: whole file). (default: whole file).
See |:search-args| for [/] and [!]. See |:search-args| for [/] and [!].
*:che* *:checkpath* *:che* *:chec* *:check* *:checkpath*
:che[ckpath] List all the included files that could not be found. :che[ckpath] List all the included files that could not be found.
:che[ckpath]! List all the included files. :che[ckpath]! List all the included files.
@ -895,7 +898,7 @@ The following fields are optional:
If the function returns |v:null| instead of a List, a standard tag lookup will If the function returns |v:null| instead of a List, a standard tag lookup will
be performed instead. be performed instead.
It is not allowed to change the tagstack from inside 'tagfunc'. *E986* It is not allowed to change the tagstack from inside 'tagfunc'. *E986*
The following is a hypothetical example of a function used for 'tagfunc'. It The following is a hypothetical example of a function used for 'tagfunc'. It
uses the output of |taglist()| to generate the result: a list of tags in the uses the output of |taglist()| to generate the result: a list of tags in the

View File

@ -1,4 +1,4 @@
*terminal.txt* For Vim version 8.1. Last change: 2019 May 05 *terminal.txt* For Vim version 8.1. Last change: 2019 Jul 04
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -12,35 +12,36 @@ The terminal feature is optional, use this to check if your Vim has it: >
If the result is "1" you have it. If the result is "1" you have it.
1. Basic use |terminal-use| 1. Basic use |terminal-use|
Typing |terminal-typing| Typing |terminal-typing|
Size and color |terminal-size-color| Size and color |terminal-size-color|
Syntax |:terminal| Command syntax |:terminal|
Resizing |terminal-resizing| Resizing |terminal-resizing|
Terminal Modes |Terminal-mode| Terminal Modes |Terminal-mode|
Cursor style |terminal-cursor-style| Cursor style |terminal-cursor-style|
Session |terminal-session| Session |terminal-session|
Special keys |terminal-special-keys| Special keys |terminal-special-keys|
Unix |terminal-unix| Unix |terminal-unix|
MS-Windows |terminal-ms-windows| MS-Windows |terminal-ms-windows|
2. Terminal communication |terminal-communication| 2. Terminal functions |terminal-function-details|
Vim to job: term_sendkeys() |terminal-to-job| 3. Terminal communication |terminal-communication|
Job to Vim: JSON API |terminal-api| Vim to job: term_sendkeys() |terminal-to-job|
Using the client-server feature |terminal-client-server| Job to Vim: JSON API |terminal-api|
3. Remote testing |terminal-testing| Using the client-server feature |terminal-client-server|
4. Diffing screen dumps |terminal-diff| 4. Remote testing |terminal-testing|
Writing a screen dump test for Vim |terminal-dumptest| 5. Diffing screen dumps |terminal-diff|
Creating a screen dump |terminal-screendump| Writing a screen dump test for Vim |terminal-dumptest|
Comparing screen dumps |terminal-diffscreendump| Creating a screen dump |terminal-screendump|
5. Debugging |terminal-debug| Comparing screen dumps |terminal-diffscreendump|
Starting |termdebug-starting| 6. Debugging |terminal-debug|
Example session |termdebug-example| Starting |termdebug-starting|
Stepping through code |termdebug-stepping| Example session |termdebug-example|
Inspecting variables |termdebug-variables| Stepping through code |termdebug-stepping|
Other commands |termdebug-commands| Inspecting variables |termdebug-variables|
Prompt mode |termdebug-prompt| Other commands |termdebug-commands|
Communication |termdebug-communication| Prompt mode |termdebug-prompt|
Customizing |termdebug-customizing| Communication |termdebug-communication|
Customizing |termdebug-customizing|
{only available when compiled with the |+terminal| feature} {only available when compiled with the |+terminal| feature}
The terminal feature requires the |+job| and |+channel| features. The terminal feature requires the |+job| and |+channel| features.
@ -159,7 +160,7 @@ The |term_setansicolors()| function can be used to change the colors, and
|term_getansicolors()| to get the currently used colors. |term_getansicolors()| to get the currently used colors.
Syntax ~ Command syntax ~
:[range]ter[minal] [options] [command] *:ter* *:terminal* :[range]ter[minal] [options] [command] *:ter* *:terminal*
Open a new terminal window. Open a new terminal window.
@ -426,8 +427,371 @@ ConPTY problems have been fixed "winpty" will be preferred.
Environment variables are used to pass information to the running job: Environment variables are used to pass information to the running job:
VIM_SERVERNAME v:servername VIM_SERVERNAME v:servername
============================================================================== ==============================================================================
2. Terminal communication *terminal-communication* 2. Terminal functions *terminal-function-details*
*term_dumpdiff()*
term_dumpdiff({filename}, {filename} [, {options}])
Open a new window displaying the difference between the two
files. The files must have been created with
|term_dumpwrite()|.
Returns the buffer number or zero when the diff fails.
Also see |terminal-diff|.
NOTE: this does not work with double-width characters yet.
The top part of the buffer contains the contents of the first
file, the bottom part of the buffer contains the contents of
the second file. The middle part shows the differences.
The parts are separated by a line of equals.
If the {options} argument is present, it must be a Dict with
these possible members:
"term_name" name to use for the buffer name, instead
of the first file name.
"term_rows" vertical size to use for the terminal,
instead of using 'termwinsize'
"term_cols" horizontal size to use for the terminal,
instead of using 'termwinsize'
"vertical" split the window vertically
"curwin" use the current window, do not split the
window; fails if the current buffer
cannot be |abandon|ed
"bufnr" do not create a new buffer, use the
existing buffer "bufnr". This buffer
must have been previously created with
term_dumpdiff() or term_dumpload() and
visible in a window.
"norestore" do not add the terminal window to a
session file
Each character in the middle part indicates a difference. If
there are multiple differences only the first in this list is
used:
X different character
w different width
f different foreground color
b different background color
a different attribute
+ missing position in first file
- missing position in second file
Using the "s" key the top and bottom parts are swapped. This
makes it easy to spot a difference.
*term_dumpload()*
term_dumpload({filename} [, {options}])
Open a new window displaying the contents of {filename}
The file must have been created with |term_dumpwrite()|.
Returns the buffer number or zero when it fails.
Also see |terminal-diff|.
For {options} see |term_dumpdiff()|.
*term_dumpwrite()*
term_dumpwrite({buf}, {filename} [, {options}])
Dump the contents of the terminal screen of {buf} in the file
{filename}. This uses a format that can be used with
|term_dumpload()| and |term_dumpdiff()|.
If the job in the terminal already finished an error is given:
*E958*
If {filename} already exists an error is given: *E953*
Also see |terminal-diff|.
{options} is a dictionary with these optional entries:
"rows" maximum number of rows to dump
"columns" maximum number of columns to dump
term_getaltscreen({buf}) *term_getaltscreen()*
Returns 1 if the terminal of {buf} is using the alternate
screen.
{buf} is used as with |term_getsize()|.
{only available when compiled with the |+terminal| feature}
term_getansicolors({buf}) *term_getansicolors()*
Get the ANSI color palette in use by terminal {buf}.
Returns a List of length 16 where each element is a String
representing a color in hexadecimal "#rrggbb" format.
Also see |term_setansicolors()| and |g:terminal_ansi_colors|.
If neither was used returns the default colors.
{buf} is used as with |term_getsize()|. If the buffer does not
exist or is not a terminal window, an empty list is returned.
{only available when compiled with the |+terminal| feature and
with GUI enabled and/or the |+termguicolors| feature}
term_getattr({attr}, {what}) *term_getattr()*
Given {attr}, a value returned by term_scrape() in the "attr"
item, return whether {what} is on. {what} can be one of:
bold
italic
underline
strike
reverse
{only available when compiled with the |+terminal| feature}
term_getcursor({buf}) *term_getcursor()*
Get the cursor position of terminal {buf}. Returns a list with
two numbers and a dictionary: [row, col, dict].
"row" and "col" are one based, the first screen cell is row
1, column 1. This is the cursor position of the terminal
itself, not of the Vim window.
"dict" can have these members:
"visible" one when the cursor is visible, zero when it
is hidden.
"blink" one when the cursor is blinking, zero when it
is not blinking.
"shape" 1 for a block cursor, 2 for underline and 3
for a vertical bar.
"color" color of the cursor, e.g. "green"
{buf} must be the buffer number of a terminal window. If the
buffer does not exist or is not a terminal window, an empty
list is returned.
{only available when compiled with the |+terminal| feature}
term_getjob({buf}) *term_getjob()*
Get the Job associated with terminal window {buf}.
{buf} is used as with |term_getsize()|.
Returns |v:null| when there is no job.
{only available when compiled with the |+terminal| feature}
term_getline({buf}, {row}) *term_getline()*
Get a line of text from the terminal window of {buf}.
{buf} is used as with |term_getsize()|.
The first line has {row} one. When {row} is "." the cursor
line is used. When {row} is invalid an empty string is
returned.
To get attributes of each character use |term_scrape()|.
{only available when compiled with the |+terminal| feature}
term_getscrolled({buf}) *term_getscrolled()*
Return the number of lines that scrolled to above the top of
terminal {buf}. This is the offset between the row number
used for |term_getline()| and |getline()|, so that: >
term_getline(buf, N)
< is equal to: >
getline(N + term_getscrolled(buf))
< (if that line exists).
{buf} is used as with |term_getsize()|.
{only available when compiled with the |+terminal| feature}
term_getsize({buf}) *term_getsize()*
Get the size of terminal {buf}. Returns a list with two
numbers: [rows, cols]. This is the size of the terminal, not
the window containing the terminal.
{buf} must be the buffer number of a terminal window. Use an
empty string for the current buffer. If the buffer does not
exist or is not a terminal window, an empty list is returned.
{only available when compiled with the |+terminal| feature}
term_getstatus({buf}) *term_getstatus()*
Get the status of terminal {buf}. This returns a comma
separated list of these items:
running job is running
finished job has finished
normal in Terminal-Normal mode
One of "running" or "finished" is always present.
{buf} must be the buffer number of a terminal window. If the
buffer does not exist or is not a terminal window, an empty
string is returned.
{only available when compiled with the |+terminal| feature}
term_gettitle({buf}) *term_gettitle()*
Get the title of terminal {buf}. This is the title that the
job in the terminal has set.
{buf} must be the buffer number of a terminal window. If the
buffer does not exist or is not a terminal window, an empty
string is returned.
{only available when compiled with the |+terminal| feature}
term_gettty({buf} [, {input}]) *term_gettty()*
Get the name of the controlling terminal associated with
terminal window {buf}. {buf} is used as with |term_getsize()|.
When {input} is omitted or 0, return the name for writing
(stdout). When {input} is 1 return the name for reading
(stdin). On UNIX, both return same name.
{only available when compiled with the |+terminal| feature}
term_list() *term_list()*
Return a list with the buffer numbers of all buffers for
terminal windows.
{only available when compiled with the |+terminal| feature}
term_scrape({buf}, {row}) *term_scrape()*
Get the contents of {row} of terminal screen of {buf}.
For {buf} see |term_getsize()|.
The first line has {row} one. When {row} is "." the cursor
line is used. When {row} is invalid an empty string is
returned.
Return a List containing a Dict for each screen cell:
"chars" character(s) at the cell
"fg" foreground color as #rrggbb
"bg" background color as #rrggbb
"attr" attributes of the cell, use |term_getattr()|
to get the individual flags
"width" cell width: 1 or 2
{only available when compiled with the |+terminal| feature}
term_sendkeys({buf}, {keys}) *term_sendkeys()*
Send keystrokes {keys} to terminal {buf}.
{buf} is used as with |term_getsize()|.
{keys} are translated as key sequences. For example, "\<c-x>"
means the character CTRL-X.
{only available when compiled with the |+terminal| feature}
term_setansicolors({buf}, {colors}) *term_setansicolors()*
Set the ANSI color palette used by terminal {buf}.
{colors} must be a List of 16 valid color names or hexadecimal
color codes, like those accepted by |highlight-guifg|.
Also see |term_getansicolors()| and |g:terminal_ansi_colors|.
The colors normally are:
0 black
1 dark red
2 dark green
3 brown
4 dark blue
5 dark magenta
6 dark cyan
7 light grey
8 dark grey
9 red
10 green
11 yellow
12 blue
13 magenta
14 cyan
15 white
These colors are used in the GUI and in the terminal when
'termguicolors' is set. When not using GUI colors (GUI mode
or 'termguicolors'), the terminal window always uses the 16
ANSI colors of the underlying terminal.
{only available when compiled with the |+terminal| feature and
with GUI enabled and/or the |+termguicolors| feature}
term_setkill({buf}, {how}) *term_setkill()*
When exiting Vim or trying to close the terminal window in
another way, {how} defines whether the job in the terminal can
be stopped.
When {how} is empty (the default), the job will not be
stopped, trying to exit will result in |E947|.
Otherwise, {how} specifies what signal to send to the job.
See |job_stop()| for the values.
After sending the signal Vim will wait for up to a second to
check that the job actually stopped.
term_setrestore({buf}, {command}) *term_setrestore()*
Set the command to write in a session file to restore the job
in this terminal. The line written in the session file is: >
terminal ++curwin ++cols=%d ++rows=%d {command}
< Make sure to escape the command properly.
Use an empty {command} to run 'shell'.
Use "NONE" to not restore this window.
{only available when compiled with the |+terminal| feature}
term_setsize({buf}, {rows}, {cols}) *term_setsize()* *E955*
Set the size of terminal {buf}. The size of the window
containing the terminal will also be adjusted, if possible.
If {rows} or {cols} is zero or negative, that dimension is not
changed.
{buf} must be the buffer number of a terminal window. Use an
empty string for the current buffer. If the buffer does not
exist or is not a terminal window, an error is given.
{only available when compiled with the |+terminal| feature}
term_start({cmd} [, {options}]) *term_start()*
Open a terminal window and run {cmd} in it.
{cmd} can be a string or a List, like with |job_start()|. The
string "NONE" can be used to open a terminal window without
starting a job, the pty of the terminal can be used by a
command like gdb.
Returns the buffer number of the terminal window. If {cmd}
cannot be executed the window does open and shows an error
message.
If opening the window fails zero is returned.
{options} are similar to what is used for |job_start()|, see
|job-options|. However, not all options can be used. These
are supported:
all timeout options
"stoponexit", "cwd", "env"
"callback", "out_cb", "err_cb", "exit_cb", "close_cb"
"in_io", "in_top", "in_bot", "in_name", "in_buf"
"out_io", "out_name", "out_buf", "out_modifiable", "out_msg"
"err_io", "err_name", "err_buf", "err_modifiable", "err_msg"
However, at least one of stdin, stdout or stderr must be
connected to the terminal. When I/O is connected to the
terminal then the callback function for that part is not used.
There are extra options:
"term_name" name to use for the buffer name, instead
of the command name.
"term_rows" vertical size to use for the terminal,
instead of using 'termwinsize'
"term_cols" horizontal size to use for the terminal,
instead of using 'termwinsize'
"vertical" split the window vertically; note that
other window position can be defined with
command modifiers, such as |:belowright|.
"curwin" use the current window, do not split the
window; fails if the current buffer
cannot be |abandon|ed
"hidden" do not open a window
"norestore" do not add the terminal window to a
session file
"term_kill" what to do when trying to close the
terminal window, see |term_setkill()|
"term_finish" What to do when the job is finished:
"close": close any windows
"open": open window if needed
Note that "open" can be interruptive.
See |term++close| and |term++open|.
"term_opencmd" command to use for opening the window when
"open" is used for "term_finish"; must
have "%d" where the buffer number goes,
e.g. "10split|buffer %d"; when not
specified "botright sbuf %d" is used
"eof_chars" Text to send after all buffer lines were
written to the terminal. When not set
CTRL-D is used on MS-Windows. For Python
use CTRL-Z or "exit()". For a shell use
"exit". A CR is always added.
"ansi_colors" A list of 16 color names or hex codes
defining the ANSI palette used in GUI
color modes. See |g:terminal_ansi_colors|.
"tty_type" (MS-Windows only): Specify which pty to
use. See 'termwintype' for the values.
{only available when compiled with the |+terminal| feature}
term_wait({buf} [, {time}]) *term_wait()*
Wait for pending updates of {buf} to be handled.
{buf} is used as with |term_getsize()|.
{time} is how long to wait for updates to arrive in msec. If
not set then 10 msec will be used.
{only available when compiled with the |+terminal| feature}
==============================================================================
3. Terminal communication *terminal-communication*
There are several ways to communicate with the job running in a terminal: There are several ways to communicate with the job running in a terminal:
- Use |term_sendkeys()| to send text and escape sequences from Vim to the job. - Use |term_sendkeys()| to send text and escape sequences from Vim to the job.
@ -495,7 +859,8 @@ Currently supported commands:
directory, thus it's best to use the full path. directory, thus it's best to use the full path.
[options] is only used when opening a new window. If present, [options] is only used when opening a new window. If present,
it must be a Dict. Similarly to |++opt|, These entries are recognized: it must be a Dict. Similarly to |++opt|, These entries are
recognized:
"ff" file format: "dos", "mac" or "unix" "ff" file format: "dos", "mac" or "unix"
"fileformat" idem "fileformat" idem
"enc" overrides 'fileencoding' "enc" overrides 'fileencoding'
@ -533,7 +898,7 @@ In the job you can then do something like: >
This will open the file "some_file.c" and put the cursor on line 123. This will open the file "some_file.c" and put the cursor on line 123.
============================================================================== ==============================================================================
3. Remote testing *terminal-testing* 4. Remote testing *terminal-testing*
Most Vim tests execute a script inside Vim. For some tests this does not Most Vim tests execute a script inside Vim. For some tests this does not
work, running the test interferes with the code being tested. To avoid this work, running the test interferes with the code being tested. To avoid this
@ -548,7 +913,7 @@ Functions ~
============================================================================== ==============================================================================
4. Diffing screen dumps *terminal-diff* 5. Diffing screen dumps *terminal-diff*
In some cases it can be bothersome to test that Vim displays the right In some cases it can be bothersome to test that Vim displays the right
characters on the screen. E.g. with syntax highlighting. To make this characters on the screen. E.g. with syntax highlighting. To make this
@ -649,7 +1014,7 @@ Alternatively, press "s" to swap the first and second dump. Do this several
times so that you can spot the difference in the context of the text. times so that you can spot the difference in the context of the text.
============================================================================== ==============================================================================
5. Debugging *terminal-debug* *terminal-debugger* 6. Debugging *terminal-debug* *terminal-debugger*
The Terminal debugging plugin can be used to debug a program with gdb and view The Terminal debugging plugin can be used to debug a program with gdb and view
the source code in a Vim window. Since this is completely contained inside the source code in a Vim window. Since this is completely contained inside
@ -906,7 +1271,7 @@ When 'background' is "dark":
hi debugBreakpoint term=reverse ctermbg=red guibg=red hi debugBreakpoint term=reverse ctermbg=red guibg=red
Shorcuts *termdebug_shortcuts* Shortcuts *termdebug_shortcuts*
You can define your own shortcuts (mappings) to control gdb, that can work in You can define your own shortcuts (mappings) to control gdb, that can work in
any window, using the TermDebugSendCommand() function. Example: > any window, using the TermDebugSendCommand() function. Example: >

View File

@ -1,4 +1,4 @@
*textprop.txt* For Vim version 8.1. Last change: 2019 May 06 *textprop.txt* For Vim version 8.1. Last change: 2019 Jun 13
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -12,7 +12,6 @@ What is not working yet:
- Adjusting column/length when inserting text - Adjusting column/length when inserting text
- Text properties spanning more than one line - Text properties spanning more than one line
- prop_find() - prop_find()
- callbacks when text properties are outdated
1. Introduction |text-prop-intro| 1. Introduction |text-prop-intro|
@ -57,7 +56,7 @@ A text property normally has the name of a property type, which defines
how to highlight the text. The property type can have these entries: how to highlight the text. The property type can have these entries:
"highlight" name of the highlight group to use "highlight" name of the highlight group to use
"combine" when TRUE the text property highlighting is combined "combine" when TRUE the text property highlighting is combined
with any syntax highligting, when omitted or FALSE the with any syntax highlighting, when omitted or FALSE the
text property highlighting replaces the syntax text property highlighting replaces the syntax
highlighting highlighting
"priority" when properties overlap, the one with the highest "priority" when properties overlap, the one with the highest
@ -131,6 +130,12 @@ unless the whole line is deleted.
When using replace mode, the text properties stay on the same character When using replace mode, the text properties stay on the same character
positions, even though the characters themselves change. positions, even though the characters themselves change.
To update text properties after the text was changed, install a callback with
`listener_add()`. E.g, if your plugin does spell checking, you can have the
callback update spelling mistakes in the changed text. Vim will move the
properties below the changed text, so that they still highlight the same text,
thus you don't need to update these.
Text property columns are not updated: ~ Text property columns are not updated: ~

View File

@ -1,4 +1,4 @@
*todo.txt* For Vim version 8.1. Last change: 2019 May 09 *todo.txt* For Vim version 8.1. Last change: 2019 Jul 13
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -38,6 +38,43 @@ browser use: https://github.com/vim/vim/issues/1234
*known-bugs* *known-bugs*
-------------------- Known bugs and current work ----------------------- -------------------- Known bugs and current work -----------------------
Patch to fix session file when using multiple tabs. (Jason Franklin, 2019 May
20)
Also put :argadd commands at the start for all buffers, so that their order
remains equal? Then %argdel to clean it up. Do try this with 'hidden' set.
Shorten the command used in test Makefile. (Daniel Hahler, #4643)
Refactor: Move common things out of evalfunc.c, it's too big.
Move function specs out of eval.txt, it's too big.
Popup windows:
- Default popup_menu padding: only left&right.
- Add 'previewpopup': open preview in a popupwindow.
Values: dict options as a string? "line:20,maxwidth:60,maxheight:20"
- Implement flip option
- Have a way to scroll to the bottom, e.g. set 'firstline' to -1? (#4577)
- Why does 'nrformats' leak from the popup window buffer???
Happens in Test_simple_popup() at the second screendump.
- Disable commands, feedkeys(), CTRL-W, etc. in a popup window.
Use ERROR_IF_POPUP_WINDOW for more commands.
- For the "moved" property also include mouse movement?
- Can the buffer be re-used if it was the last one, to avoid using up lots of
buffer numbers?
- Have an option to attach the popup to a text position, like text properties
do. (#4560)
- Make redrawing more efficient and avoid flicker:
- put popup menu also put in popup_mask?
- Invoke filter with character before mapping?
- Figure out the size and position better.
if wrapping splits a double-wide character
if wrapping inserts indent
- When drawing on top half a double-wide character, display ">" or "<" in the
incomplete cell.
- Use a popup window for the "info" item of completion instead of using a
preview window. Ideas in issue #4544.
How to add highlighting?
'incsearch' with :s: (#3321) 'incsearch' with :s: (#3321)
- Get E20 when using command history to get "'<,'>s/a/b" and no Visual area - Get E20 when using command history to get "'<,'>s/a/b" and no Visual area
was set. (#3837) was set. (#3837)
@ -72,6 +109,8 @@ Terminal debugger:
with another Vim instance. with another Vim instance.
Terminal emulator window: Terminal emulator window:
- When typing "exit" in a terminal window with a shell and it's the only
window, should exit Vim instead of editing another buffer. (#4539)
- When the job in the terminal doesn't use mouse events, let the scroll wheel - When the job in the terminal doesn't use mouse events, let the scroll wheel
scroll the scrollback, like a terminal does at the shell prompt. #2490 scroll the scrollback, like a terminal does at the shell prompt. #2490
And use modeless selection. #2962 And use modeless selection. #2962
@ -104,19 +143,47 @@ Terminal emulator window:
- When 'encoding' is not utf-8, or the job is using another encoding, setup - When 'encoding' is not utf-8, or the job is using another encoding, setup
conversions. conversions.
Support for popup widows: Error numbers available: E172, E221, E242, E249, E260, E274, E275, E276,
- Use text properties to define highlighting. E278, E279, E281, E290, E291, E292, E361, E362, E366, E396, E450, E451, E452,
- Proposal on issue #4063 E453, E454, E460, E489, E491, E56, E57, E565, E569, E578, E610, E611, E653,
E654, E693, E706, E856, E857, E860, E861, E863, E889, E900, E959
Notifications for text changes, could be used for LSP. Sound: support on Mac? Or does libcanberra work there?
- New event, similar to TextChanged, but guaranteed to provide sequential
information of all text changes. Patch to use forward slash for completion even when 'shellslash' is set.
Possibly build on undo info (but undo itself is also a change). Adds 'completepathslash'. (Yasuhiro Matsumoto, 2018 Nov 15, #3612)
How to deal with ":%s/this/that" ?
Patch to add win_splitmove() function. (Andy Massimino, #4561)
Resolve() works incorrectly under windows. (#4661)
Completion mixes results from the current buffer with tags and other files.
Happens when typing CTRL-N while still search for results. E.g., type "b_" in
terminal.c and then CTRL-N twice.
Should do current file first and not split it up when more results are found.
(Also #1890)
Patch to use timers in matchparen. (Daniel Hahler, #1338)
Ready to include now?
Adding "10" to 'spellsuggest' causes spell suggestions to become very slow. Adding "10" to 'spellsuggest' causes spell suggestions to become very slow.
(#4087) (#4087)
Patch for Template string: #4491 Not ready yet. New pull: #4634
":bnext" in a help buffer is supposed to go to the next help buffer, but it
goes to any buffer, and then :bnext skips help buffers, since they are
unlisted. (#4478)
Problem with German spell file. Hint for solution by Klaus-Peter Schreiner in
#4314, solves the Rasenmäher problem.
Problem showing a line if the number column width changes when using "o".
(Mateusz Morusiewicz, #4245)
Visual highlight not removed when 'dipslay' is "lastline" and line doesn't
fit. (Kevin Lawler, #4457)
Does not build with MinGW out of the box: Does not build with MinGW out of the box:
- _stat64 is not defined, need to use "struct stat" in vim.h - _stat64 is not defined, need to use "struct stat" in vim.h
- WINVER conflict, should use 0x0600 by default? - WINVER conflict, should use 0x0600 by default?
@ -124,6 +191,8 @@ Does not build with MinGW out of the box:
Crash when mixing matchadd and substitute()? (Max Christian Pohle, 2018 May Crash when mixing matchadd and substitute()? (Max Christian Pohle, 2018 May
13, #2910) Can't reproduce? 13, #2910) Can't reproduce?
Columns and Rows are long, they should be int.
Errors found with random data: Errors found with random data:
heap-buffer-overflow in alist_add (#2472) heap-buffer-overflow in alist_add (#2472)
@ -134,11 +203,7 @@ Include part of #3242?
When a terminal exit_cb closes the window, a following typed key is lost, if When a terminal exit_cb closes the window, a following typed key is lost, if
it's in a mapping. (2018 Oct 6, #2302, #3522) it's in a mapping. (2018 Oct 6, #2302, #3522)
Completion mixes results from the current buffer with tags and other files. Patch for Inno Setup: #2739
Happens when typing CTRL-N while still search for results. E.g., type "b_" in
terminal.c and then CTRL-N twice.
Should do current file first and not split it up when more results are found.
(Also #1890)
Internal diff doesn't handle binary file like external diff does. (Mike Internal diff doesn't handle binary file like external diff does. (Mike
Williams, 2018 Oct 30) Williams, 2018 Oct 30)
@ -148,16 +213,63 @@ Problem with :tlmenu: Detach item added with all modes? Issue #3563.
The quoting of the [command] argument of :terminal is not clearly documented. The quoting of the [command] argument of :terminal is not clearly documented.
Give a few examples. (#4288) Give a few examples. (#4288)
Opening a file with --remote-tab-silent that matches 'wildignore' does not
work, results in (E479: No match". (#4610)
Bug: script written with "-W scriptout" contains Key codes, while the script Bug: script written with "-W scriptout" contains Key codes, while the script
read with "-s scriptin" expects escape codes. Probably "scriptout" needs to read with "-s scriptin" expects escape codes. Probably "scriptout" needs to
be adjusted. (Daniel Steinberg, 2019 Feb 24, #4041) be adjusted. (Daniel Steinberg, 2019 Feb 24, #4041)
":registers" should indicate char/block/linewise. (Ayberk Aydin, #4546)
Patch for ambiguous width characters in libvterm on MS-Windows 10.
(Nobuhiro Takasaki, #4411)
Problem with colors in terminal window. (Jason Franklin, 2019 May 12)
Lifepillar: Updated/cleaned up color schemes:
https://github.com/lifepillar/vim8-colorschemes.
Include a few color schemes, based on popularity:
http://www.vim.org/scripts/script_search_results.php?keywords=&script_type=color+scheme&order_by=rating&direction=descending&search=search
http://vimawesome.com/?q=tag:color-scheme
Use names that indicate their appearance (Christian Brabandt, 2017 Aug 3)
- monokai - Xia Crusoe (2017 Aug 4)
- seoul256 - Christian Brabandt (2017 Aug 3)
- gruvbox - Christian Brabandt (2017 Aug 3) (simplified version from
Lifepillar, 2018 Jan 22, #2573)
- janah - Marco Hinz (2017 Aug 4)
- apprentice - Romain Lafourcade (2017 Aug 6) remarks about help file #1964
Suggested by Hiroki Kokubun:
- [Iceberg](https://github.com/cocopon/iceberg.vim) (my one)
- [hybrid](https://github.com/w0ng/vim-hybrid)
Include solarized color scheme?, it does not support termguicolors.
- Sanitized version of pablo (Lifepillar, 2017 Nov 21)
Bug: "vipgw" does not put cursor back where it belongs. (Jason Franklin, 2019 Bug: "vipgw" does not put cursor back where it belongs. (Jason Franklin, 2019
Mar 5) Mar 5)
Some composing characters actually add a cell width to the character they are
on top off, making the whole thing two characters wide. (#4526)
Should we include some part of pull request #4505, not increment changedtick
in some cases? E.g. for ":write" when the changed flag was already off, the
buffer didn't change at all.
Patch to add getreginfo() and setreg() with an option to set the unnamed
register "", So that registers can be saved and fully restored.
(Andy Massimino, 2018 Aug 24, #3370)
Line numbers in profile are off when function was defined with ":execute".
(Daniel Hahler, #4511)
Add a way to create an empty, hidden buffer. Like doing ":new|hide". Add a way to create an empty, hidden buffer. Like doing ":new|hide".
":let buf = bufcreate('name') ":let buf = bufcreate('name')
Session file contains absolute paths when "curdir" is removed form
'sessionoptions', making it impossible to have a session with a relative path.
(#4450)
When using a timer callback vgetc_busy is reset, allowing for using input(). When using a timer callback vgetc_busy is reset, allowing for using input().
But in a channel callback this does not happen. We need to do something But in a channel callback this does not happen. We need to do something
similar to check_due_timer(). Also see #3809. similar to check_due_timer(). Also see #3809.
@ -201,6 +313,8 @@ https://lgtm.com/projects/g/vim/vim/alerts/?mode=list
Still a E315 error when using terminal. (Masato Nishihata, #3959) Still a E315 error when using terminal. (Masato Nishihata, #3959)
Not existing directory in CDPATH leads to two shell calls. (#4525)
Use dict_iterate_start() / dict_iterate_next() instead of relying on the Use dict_iterate_start() / dict_iterate_next() instead of relying on the
internals of the dict structure. internals of the dict structure.
@ -214,6 +328,10 @@ nvo-mode mapping works on Windows, not on Linux. (#3678)
Missing tests for: Missing tests for:
- add_termcap_entry() - add_termcap_entry()
Redo only remembers the last change. Could use "{count}g." to redo an older
change. How does the user know which change? At least have a way to list
them: ":repeats". Add to history, like search history and command line history.
When using exclusive selection and vi" that fails, cursor moves to the left. When using exclusive selection and vi" that fails, cursor moves to the left.
Cursor should not move. (#4024) Cursor should not move. (#4024)
@ -243,6 +361,11 @@ punctuation is repeated. (Smylers, 2018 Nov 17, #3621)
ml_get error: (Israel Chauca Fuentes, 2018 Oct 17, #3550). ml_get error: (Israel Chauca Fuentes, 2018 Oct 17, #3550).
Patch to add more info to OptionSet. Should mention what triggered the change
":set", ":setlocal", ":setglobal", "modeline"; and the old global value.
#4118. Proposed implementation: 2019 Mar 27.
Updated 2019 May 25.
Using single wide base character with double wide composing character gives Using single wide base character with double wide composing character gives
drawing errors. Fill up the base character? (Dominique, #4328) drawing errors. Fill up the base character? (Dominique, #4328)
@ -269,35 +392,9 @@ Make ":interactive !cmd" stop termcap mode, also when used in an autocommand.
Add buffer argument to undotree(). (#4001) Add buffer argument to undotree(). (#4001)
Patch to fix that Normal is not defined when not compiled with GUI. Using uninitialized value in test_gn
(Christian Brabandt, 2019 May 7, on issue #4072)
Patch to add optional arguments with default values.
(Andy Massimino, #3952) Needs to be reviewed.
Patch to add more info to OptionSet. Should mention what triggered the change
":set", ":setlocal", ":setglobal", "modeline"; and the old global value.
#4118. Proposed implementation: 2019 Mar 27.
Updated 2019 Apr 9: ASAN fails.
Problem with Visual yank when 'linebreak' and 'showbreak' are set.
Patch with tests, but it's not clear how it is supposed to work. (tommm, 2018
Nov 17) Asked about this, Dec 22. Christian will have a look.
Patch for larger icons in installer. (#978) Still not good.
Patch to add commands to jump to quickfix entry above/below the cursor.
(Yegappan Lakshmanan, #4316) Also do :cbefore and :cafter.
Patch to fix that using "5gj" starting inside a closed fold does not work on
screen lines but on text lines. (Julius Hulsmann, #4095) Lacks a test.
Patch to implement 'diffref' option. (#3535)
Easier to use a 'diffmaster' option, is the extra complexity needed?
Not ready to include.
Memory leaks in test_channel? (or is it because of fork())
Using uninitialized value in test_crypt. Using uninitialized value in test_crypt.
memory leak in test_paste
Memory leak in test_terminal: Memory leak in test_terminal:
==23530== by 0x2640D7: alloc (misc2.c:874) ==23530== by 0x2640D7: alloc (misc2.c:874)
==23530== by 0x2646D6: vim_strsave (misc2.c:1315) ==23530== by 0x2646D6: vim_strsave (misc2.c:1315)
@ -308,26 +405,22 @@ Memory leak in test_terminal:
==23530== by 0x35C923: term_start (terminal.c:421) ==23530== by 0x35C923: term_start (terminal.c:421)
==23530== by 0x2AFF30: mch_call_shell_terminal (os_unix.c:4377) ==23530== by 0x2AFF30: mch_call_shell_terminal (os_unix.c:4377)
==23530== by 0x2B16BE: mch_call_shell (os_unix.c:5383) ==23530== by 0x2B16BE: mch_call_shell (os_unix.c:5383)
TODO: be able to run all parts of test_alot with valgrind separately
Memory leak in test_alot with pyeval() (allocating partial) Memory leak in test_alot with pyeval() (allocating partial)
Memory leak in test_alot with expand()
Memory leaks in test_channel? (or is it because of fork())
gethostbyname() is old, use getaddrinfo() if available. (#3227) gethostbyname() is old, use getaddrinfo() if available. (#3227)
matchaddpos() gets slow with many matches. Proposal by Rick Howe, 2018 Jul matchaddpos() gets slow with many matches. Proposal by Rick Howe, 2018 Jul
19. 19.
Patch to specify color for cterm=underline and cterm=undercurl, like "guisp".
Does #2405 do this?
Patch to add an interrupt() function: sets got_int. Useful in an autocommand
such as BufWritePre that checks the file name or contents.
More patches to check:
- #4098 improve Travis config
Should make 'listchars' global-local. Local to window or to buffer? Should make 'listchars' global-local. Local to window or to buffer?
Probably window. Probably window.
Add something like 'fillchars' local to window, but allow for specifying a Add something like 'fillchars' local to window, but allow for specifying a
highlight name. Esp. for the statusline. highlight name. Esp. for the statusline.
And "extends" and "precedes" are also useful without 'list' set. Also in
'fillchars' or another option?
Sourceforge Vim pages still have content, redirect from empty page. Sourceforge Vim pages still have content, redirect from empty page.
Check for PHP errors. (Wayne Davison, 2018 Oct 26) Check for PHP errors. (Wayne Davison, 2018 Oct 26)
@ -336,6 +429,22 @@ Patch to support ":tag <tagkind> <tagname>". (emmrk, 2018 May 7, #2871)
Use something like ":tag {kind}/{tagname}". Use something like ":tag {kind}/{tagname}".
Not ready to include. Not ready to include.
Problem with Visual yank when 'linebreak' and 'showbreak' are set.
Patch with tests, but it's not clear how it is supposed to work. (tommm, 2018
Nov 17) Asked about this, Dec 22. Christian will have a look.
Patch for larger icons in installer. (#978) Still not good.
Patch to fix that using "5gj" starting inside a closed fold does not work on
screen lines but on text lines. (Julius Hulsmann, #4095) Lacks a test.
Patch to implement 'diffref' option. (#3535)
Easier to use a 'diffmaster' option, is the extra complexity needed?
Not ready to include.
Patch to specify color for cterm=underline and cterm=undercurl, like "guisp".
Patch #2405 does something like this, but in the wrong way.
:pedit resets the 'buflisted' option unexpectedly. (Wang Shidong, 2018 Oct 12, :pedit resets the 'buflisted' option unexpectedly. (Wang Shidong, 2018 Oct 12,
#3536) #3536)
@ -355,9 +464,6 @@ Feedback from someone who uses this?
ml_get error. (Dominique Pelle, 2018 Sep 14, #3434) ml_get error. (Dominique Pelle, 2018 Sep 14, #3434)
Patch to use forward slash for completion even when 'shellslash' is set.
Adds 'completepathslash'. (Yasuhiro Matsumoto, 2018 Nov 15, #3612)
Only output t_Cs when t_Ce is also set. do not use Cs and Ce termcap entries. (Daniel Hahler, 2018 Sep 25) Only output t_Cs when t_Ce is also set. do not use Cs and Ce termcap entries. (Daniel Hahler, 2018 Sep 25)
Add t_cS and t_cR for cursor color select and reset. Use Cs and Cr terminfo Add t_cS and t_cR for cursor color select and reset. Use Cs and Cr terminfo
values. values.
@ -383,15 +489,14 @@ includes the first screen line. (2018 Aug 23, #3368)
Refactored HTML indent file. (Michael Lee, #1821) Refactored HTML indent file. (Michael Lee, #1821)
Ask to write a test first. Ask to write a test first.
Patch to add getregpoint() and setreg() with an option to set "".
(Andy Massimino, 2018 Aug 24, #3370)
Better name?
MS-Windows: .lnk file not resolved properly when 'encoding' is set. MS-Windows: .lnk file not resolved properly when 'encoding' is set.
(lkintact, 2018 Sep 22, #3473) (lkintact, 2018 Sep 22, #3473)
Merge checking for 'cursorline' and 'concealcursor', see neovim #9492. Merge checking for 'cursorline' and 'concealcursor', see neovim #9492.
Request to add sign_setlist() to make it faster to add a lot of signs, e.g.
when adding a sign for every quickfix entry. (#4557)
Win32 key codes are messy. Mike Williams tried to fix that, but now old Win32 key codes are messy. Mike Williams tried to fix that, but now old
mappings no longer work. Create a new terminal for the better solution? mappings no longer work. Create a new terminal for the better solution?
@ -709,22 +814,6 @@ Seems to happen when the selection is requested the second time, but before
clip_x11_convert_selection_cb() is invoked, thus in X library code. clip_x11_convert_selection_cb() is invoked, thus in X library code.
Kazunobu Kuriyama is working on a proper fix. (2017 Jul 25) Kazunobu Kuriyama is working on a proper fix. (2017 Jul 25)
Include a few color schemes, based on popularity:
http://www.vim.org/scripts/script_search_results.php?keywords=&script_type=color+scheme&order_by=rating&direction=descending&search=search
http://vimawesome.com/?q=tag:color-scheme
Use names that indicate their appearance (Christian Brabandt, 2017 Aug 3)
- monokai - Xia Crusoe (2017 Aug 4)
- seoul256 - Christian Brabandt (2017 Aug 3)
- gruvbox - Christian Brabandt (2017 Aug 3) (simplified version from
Lifepillar, 2018 Jan 22, #2573)
- janah - Marco Hinz (2017 Aug 4)
- apprentice - Romain Lafourcade (2017 Aug 6) remarks about help file #1964
Suggested by Hiroki Kokubun:
- [Iceberg](https://github.com/cocopon/iceberg.vim) (my one)
- [hybrid](https://github.com/w0ng/vim-hybrid)
Include solarized color scheme?, it does not support termguicolors.
- Sanitized version of pablo (Lifepillar, 2017 Nov 21)
Problem with three-piece comment. (Michael Lee, 2017 May 11, #1696) Problem with three-piece comment. (Michael Lee, 2017 May 11, #1696)
Creating a partial with an autoload function is confused about the "self" Creating a partial with an autoload function is confused about the "self"
@ -1439,10 +1528,6 @@ Patch for building a 32bit Vim with 64bit MingW compiler.
Patch: On MS-Windows shellescape() may have to triple double quotes. Patch: On MS-Windows shellescape() may have to triple double quotes.
(Ingo Karkat, 2015 Jan 16) (Ingo Karkat, 2015 Jan 16)
Redo only remembers the last change. Could use "{count}g." to redo an older
change. How does the user know which change? At least have a way to list
them: ":repeats".
Patch for glob(), adding slash to normal files. (Ingo Karkat, 2014 Dec 22) Patch for glob(), adding slash to normal files. (Ingo Karkat, 2014 Dec 22)
When entering and leaving the preview window autocommands are triggered, but When entering and leaving the preview window autocommands are triggered, but

View File

@ -1,4 +1,4 @@
*usr_05.txt* For Vim version 8.1. Last change: 2019 Feb 27 *usr_05.txt* For Vim version 8.1. Last change: 2019 May 23
VIM USER MANUAL - by Bram Moolenaar VIM USER MANUAL - by Bram Moolenaar
@ -234,7 +234,7 @@ remote connection, increase the number. See 'ttimeout'.
set display=truncate set display=truncate
Show @@@ in the last line if it is truncated, instead of hiding the whole Show @@@ in the last line if it is truncated, instead of hiding the whole
like. See 'display'. line. See 'display'.
> >
set incsearch set incsearch

View File

@ -1,4 +1,4 @@
*usr_06.txt* For Vim version 8.1. Last change: 2009 Oct 28 *usr_06.txt* For Vim version 8.1. Last change: 2019 Jun 01
VIM USER MANUAL - by Bram Moolenaar VIM USER MANUAL - by Bram Moolenaar
@ -196,13 +196,12 @@ too slow, you might want to disable syntax highlighting for a moment: >
When editing another file (or the same one) the colors will come back. When editing another file (or the same one) the colors will come back.
*:syn-off*
If you want to stop highlighting completely use: > If you want to stop highlighting completely use: >
:syntax off :syntax off
This will completely disable syntax highlighting and remove it immediately for This will completely disable syntax highlighting and remove it immediately for
all buffers. all buffers. See |:syntax-off| for more details.
*:syn-manual* *:syn-manual*
If you want syntax highlighting only for specific files, use this: > If you want syntax highlighting only for specific files, use this: >

View File

@ -220,7 +220,7 @@ a tab page share this directory except for windows with a window-local
directory. Any new windows opened in this tab page will use this directory as directory. Any new windows opened in this tab page will use this directory as
the current working directory. Using a `:cd` command in a tab page will not the current working directory. Using a `:cd` command in a tab page will not
change the working directory of tab pages which have a tab local directory. change the working directory of tab pages which have a tab local directory.
When the global working directory is changed using the ":cd" command in a tab When the global working directory is changed using the `:cd` command in a tab
page, it will also change the current tab page working directory. page, it will also change the current tab page working directory.

View File

@ -1,4 +1,4 @@
*usr_41.txt* For Vim version 8.1. Last change: 2019 May 09 *usr_41.txt* For Vim version 8.1. Last change: 2019 Jul 06
VIM USER MANUAL - by Bram Moolenaar VIM USER MANUAL - by Bram Moolenaar
@ -105,20 +105,21 @@ We won't explain how |:for| and |range()| work until later. Follow the links
if you are impatient. if you are impatient.
THREE KINDS OF NUMBERS FOUR KINDS OF NUMBERS
Numbers can be decimal, hexadecimal or octal. A hexadecimal number starts Numbers can be decimal, hexadecimal, octal or binary. A hexadecimal number
with "0x" or "0X". For example "0x1f" is decimal 31. An octal number starts starts with "0x" or "0X". For example "0x1f" is decimal 31. An octal number
with a zero. "017" is decimal 15. Careful: don't put a zero before a decimal starts with a zero. "017" is decimal 15. A binary number starts with "0b" or
number, it will be interpreted as an octal number! "0B". For example "0b101" is decimal 5. Careful: don't put a zero before a
decimal number, it will be interpreted as an octal number!
The ":echo" command always prints decimal numbers. Example: > The ":echo" command always prints decimal numbers. Example: >
:echo 0x7f 036 :echo 0x7f 036
< 127 30 ~ < 127 30 ~
A number is made negative with a minus sign. This also works for hexadecimal A number is made negative with a minus sign. This also works for hexadecimal,
and octal numbers. A minus sign is also used for subtraction. Compare this octal and binary numbers. A minus sign is also used for subtraction. Compare
with the previous example: > this with the previous example: >
:echo 0x7f -036 :echo 0x7f -036
< 97 ~ < 97 ~
@ -608,12 +609,14 @@ String manipulation: *string-functions*
strcharpart() get part of a string using char index strcharpart() get part of a string using char index
strgetchar() get character from a string using char index strgetchar() get character from a string using char index
expand() expand special keywords expand() expand special keywords
expandcmd() expand a command like done for `:edit`
iconv() convert text from one encoding to another iconv() convert text from one encoding to another
byteidx() byte index of a character in a string byteidx() byte index of a character in a string
byteidxcomp() like byteidx() but count composing characters byteidxcomp() like byteidx() but count composing characters
repeat() repeat a string multiple times repeat() repeat a string multiple times
eval() evaluate a string expression eval() evaluate a string expression
execute() execute an Ex command and get the output execute() execute an Ex command and get the output
win_execute() like execute() but in a specified window
trim() trim characters from a string trim() trim characters from a string
List manipulation: *list-functions* List manipulation: *list-functions*
@ -717,6 +720,7 @@ Cursor and mark position: *cursor-functions* *mark-functions*
cursor() position the cursor at a line/column cursor() position the cursor at a line/column
screencol() get screen column of the cursor screencol() get screen column of the cursor
screenrow() get screen row of the cursor screenrow() get screen row of the cursor
screenpos() screen row and col of a text character
getcurpos() get position of the cursor getcurpos() get position of the cursor
getpos() get position of cursor, mark, etc. getpos() get position of cursor, mark, etc.
setpos() set position of cursor, mark, etc. setpos() set position of cursor, mark, etc.
@ -745,6 +749,12 @@ Working with text in the current buffer: *text-functions*
getcharsearch() return character search information getcharsearch() return character search information
setcharsearch() set character search information setcharsearch() set character search information
Working with text in another buffer:
getbufline() get a list of lines from the specified buffer
setbufline() replace a line in the specified buffer
appendbufline() append a list of lines in the specified buffer
deletebufline() delete lines from a specified buffer
*system-functions* *file-functions* *system-functions* *file-functions*
System functions and manipulation of files: System functions and manipulation of files:
glob() expand wildcards glob() expand wildcards
@ -796,8 +806,10 @@ Buffers, windows and the argument list:
argidx() current position in the argument list argidx() current position in the argument list
arglistid() get id of the argument list arglistid() get id of the argument list
argv() get one entry from the argument list argv() get one entry from the argument list
bufadd() add a file to the list of buffers
bufexists() check if a buffer exists bufexists() check if a buffer exists
buflisted() check if a buffer exists and is listed buflisted() check if a buffer exists and is listed
bufload() ensure a buffer is loaded
bufloaded() check if a buffer exists and is loaded bufloaded() check if a buffer exists and is loaded
bufname() get the name of a specific buffer bufname() get the name of a specific buffer
bufnr() get the buffer number of a specific buffer bufnr() get the buffer number of a specific buffer
@ -808,11 +820,8 @@ Buffers, windows and the argument list:
bufwinid() get the window ID of a specific buffer bufwinid() get the window ID of a specific buffer
bufwinnr() get the window number of a specific buffer bufwinnr() get the window number of a specific buffer
winbufnr() get the buffer number of a specific window winbufnr() get the buffer number of a specific window
getbufline() get a list of lines from the specified buffer
setbufline() replace a line in the specified buffer
appendbufline() append a list of lines in the specified buffer
deletebufline() delete lines from a specified buffer
listener_add() add a callback to listen to changes listener_add() add a callback to listen to changes
listener_flush() invoke listener callbacks
listener_remove() remove a listener callback listener_remove() remove a listener callback
win_findbuf() find windows containing a buffer win_findbuf() find windows containing a buffer
win_getid() get window ID of a window win_getid() get window ID of a window
@ -953,6 +962,7 @@ Testing: *test-functions*
test_autochdir() enable 'autochdir' during startup test_autochdir() enable 'autochdir' during startup
test_override() test with Vim internal overrides test_override() test with Vim internal overrides
test_garbagecollect_now() free memory right now test_garbagecollect_now() free memory right now
test_getvalue() get value of an internal variable
test_ignore_error() ignore a specific error message test_ignore_error() ignore a specific error message
test_null_blob() return a null Blob test_null_blob() return a null Blob
test_null_channel() return a null Channel test_null_channel() return a null Channel
@ -1005,8 +1015,10 @@ Signs: *sign-functions*
sign_getplaced() get a list of placed signs sign_getplaced() get a list of placed signs
sign_jump() jump to a sign sign_jump() jump to a sign
sign_place() place a sign sign_place() place a sign
sign_placelist() place a list of signs
sign_undefine() undefine a sign sign_undefine() undefine a sign
sign_unplace() unplace a sign sign_unplace() unplace a sign
sign_unplacelist() unplace a list of signs
Terminal window: *terminal-functions* Terminal window: *terminal-functions*
term_start() open a terminal window and run a job term_start() open a terminal window and run a job
@ -1033,6 +1045,27 @@ Terminal window: *terminal-functions*
term_setrestore() set command to restore a terminal term_setrestore() set command to restore a terminal
term_setsize() set the size of a terminal term_setsize() set the size of a terminal
Popup window: *popup-window-functions*
popup_create() create popup centered in the screen
popup_atcursor() create popup just above the cursor position,
closes when the cursor moves away
popup_beval() at the position indicated by v:beval_
variables, closes when the mouse moves away
popup_notification() show a notification for three seconds
popup_dialog() create popup centered with padding and border
popup_menu() prompt for selecting an item from a list
popup_hide() hide a popup temporarily
popup_show() show a previously hidden popup
popup_move() change the position and size of a popup
popup_setoptions() override options of a popup
popup_settext() replace the popup buffer contents
popup_close() close one popup
popup_clear() close all popups
popup_filter_menu() select from a list of items
popup_filter_yesno() blocks until 'y' or 'n' is pressed
popup_getoptions() get current options for a popup
popup_getpos() get actual position and size of a popup
Timers: *timer-functions* Timers: *timer-functions*
timer_start() create a timer timer_start() create a timer
timer_pause() pause or unpause a timer timer_pause() pause or unpause a timer

View File

@ -1,4 +1,4 @@
*usr_toc.txt* For Vim version 8.1. Last change: 2016 Mar 25 *usr_toc.txt* For Vim version 8.1. Last change: 2019 May 24
VIM USER MANUAL - by Bram Moolenaar VIM USER MANUAL - by Bram Moolenaar
@ -103,12 +103,13 @@ Read this from start to end to learn the essential commands.
|usr_05.txt| Set your settings |usr_05.txt| Set your settings
|05.1| The vimrc file |05.1| The vimrc file
|05.2| The example vimrc file explained |05.2| The example vimrc file explained
|05.3| Simple mappings |05.3| The defaults.vim file explained
|05.4| Adding a package |05.4| Simple mappings
|05.5| Adding a plugin |05.5| Adding a package
|05.6| Adding a help file |05.6| Adding a plugin
|05.7| The option window |05.7| Adding a help file
|05.8| Often used options |05.8| The option window
|05.9| Often used options
|usr_06.txt| Using syntax highlighting |usr_06.txt| Using syntax highlighting
|06.1| Switching it on |06.1| Switching it on

View File

@ -1,4 +1,4 @@
*various.txt* For Vim version 8.1. Last change: 2019 May 09 *various.txt* For Vim version 8.1. Last change: 2019 Jun 10
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -288,7 +288,7 @@ g8 Print the hex values of the bytes used in the
*:!!* *:!!*
:!! Repeat last ":!{cmd}". :!! Repeat last ":!{cmd}".
*:ve* *:version* *:ve* *:ver* *:version*
:ve[rsion] Print the version number of the editor. If the :ve[rsion] Print the version number of the editor. If the
compiler used understands "__DATE__" the compilation compiler used understands "__DATE__" the compilation
date is mentioned. Otherwise a fixed release-date is date is mentioned. Otherwise a fixed release-date is
@ -428,6 +428,8 @@ m *+ruby/dyn* Ruby interface |ruby-dynamic| |/dyn|
T *+scrollbind* |'scrollbind'| T *+scrollbind* |'scrollbind'|
B *+signs* |:sign| B *+signs* |:sign|
N *+smartindent* |'smartindent'| N *+smartindent* |'smartindent'|
B *+sound* |sound_playevent()|, |sound_playfile()| functions, etc.
N *+spell* spell checking support, see |spell|
N *+startuptime* |--startuptime| argument N *+startuptime* |--startuptime| argument
N *+statusline* Options 'statusline', 'rulerformat' and special N *+statusline* Options 'statusline', 'rulerformat' and special
formats of 'titlestring' and 'iconstring' formats of 'titlestring' and 'iconstring'
@ -708,7 +710,7 @@ K Run a program to lookup the keyword under the
:xr[estore] [display] Reinitializes the connection to the X11 server. Useful :xr[estore] [display] Reinitializes the connection to the X11 server. Useful
after the X server restarts, e.g. when running Vim for after the X server restarts, e.g. when running Vim for
long time inside screen/tmux and connecting from long time inside screen/tmux and connecting from
different machines). different machines.
[display] should be in the format of the $DISPLAY [display] should be in the format of the $DISPLAY
environment variable (e.g. "localhost:10.0") environment variable (e.g. "localhost:10.0")
If [display] is omitted, then it reinitializes the If [display] is omitted, then it reinitializes the

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
*vi_diff.txt* For Vim version 8.1. Last change: 2019 May 07 *vi_diff.txt* For Vim version 8.1. Last change: 2019 May 13
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -199,7 +199,7 @@ Syntax highlighting. |:syntax|
Text properties |textprop.txt| Text properties |textprop.txt|
Vim supports highlighting text by a plugin. Property types can be Vim supports highlighting text by a plugin. Property types can be
specificed with |prop_type_add()| and properties can be placed with specified with |prop_type_add()| and properties can be placed with
|prop_add()|. |prop_add()|.
Spell checking. |spell| Spell checking. |spell|
@ -866,7 +866,7 @@ The following Ex commands are supported by Vi: ~
`:set all&`, `:set option+=value`, `:set option^=value` `:set all&`, `:set option+=value`, `:set option^=value`
`:set option-=value` `:set option<` `:set option-=value` `:set option<`
`:shell` escape to a shell `:shell` escape to a shell
`:source` read Vim or Ex commands from a file `:source` read Vi or Ex commands from a file
`:stop` suspend the editor or escape to a shell `:stop` suspend the editor or escape to a shell
`:substitute` find and replace text; Vi: no '&', 'i', 's', 'r' or 'I' flag, `:substitute` find and replace text; Vi: no '&', 'i', 's', 'r' or 'I' flag,
confirm prompt only supports 'y' and 'n', no highlighting confirm prompt only supports 'y' and 'n', no highlighting
@ -901,6 +901,9 @@ Common for these commands is that Vi doesn't support the ++opt argument on
The following Normal mode commands are supported by Vi: ~ The following Normal mode commands are supported by Vi: ~
note: See the beginning of |normal-index| for the meaning of WORD, N, Nmove
and etc in the description text.
|CTRL-B| scroll N screens Backwards |CTRL-B| scroll N screens Backwards
|CTRL-C| interrupt current (search) command |CTRL-C| interrupt current (search) command
|CTRL-D| scroll Down N lines (default: half a screen); Vim scrolls |CTRL-D| scroll Down N lines (default: half a screen); Vim scrolls
@ -920,7 +923,9 @@ The following Normal mode commands are supported by Vi: ~
|CTRL-P| same as "k" |CTRL-P| same as "k"
|CTRL-R| in some Vi versions: same as CTRL-L |CTRL-R| in some Vi versions: same as CTRL-L
|CTRL-T| jump to N older Tag in tag list |CTRL-T| jump to N older Tag in tag list
|CTRL-U| N lines Upwards (default: half a screen) |CTRL-U| N lines Upwards (default: half a screen) {Vi used file lines
while Vim scrolls 'scroll' screen lines; makes a difference
when lines wrap}
|CTRL-Y| scroll N lines downwards |CTRL-Y| scroll N lines downwards
|CTRL-Z| suspend program (or start new shell) |CTRL-Z| suspend program (or start new shell)
|CTRL-]| :ta to ident under cursor {Vi: identifier after the cursor} |CTRL-]| :ta to ident under cursor {Vi: identifier after the cursor}
@ -1055,7 +1060,7 @@ CTRL-T insert one shiftwidth of indent in current line {Vi: only when
in indent} in indent}
CTRL-V {char} insert next non-digit literally {Vi: no decimal byte entry} CTRL-V {char} insert next non-digit literally {Vi: no decimal byte entry}
CTRL-W delete word before the cursor CTRL-W delete word before the cursor
CTRL-Z when 'insertmode' set: suspend Vim CTRL-Z when 'insertmode' set: suspend Vi
<Esc> end insert mode (unless 'insertmode' set) <Esc> end insert mode (unless 'insertmode' set)
CTRL-[ same as <Esc> CTRL-[ same as <Esc>
0 CTRL-D delete all indent in the current line 0 CTRL-D delete all indent in the current line

View File

@ -1,4 +1,4 @@
*windows.txt* For Vim version 8.1. Last change: 2019 May 05 *windows.txt* For Vim version 8.1. Last change: 2019 Jun 02
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -216,7 +216,7 @@ CTRL-W CTRL_N *CTRL-W_CTRL-N*
:[N]sv[iew] [++opt] [+cmd] {file} *:sv* *:sview* *splitview* :[N]sv[iew] [++opt] [+cmd] {file} *:sv* *:sview* *splitview*
Same as ":split", but set 'readonly' option for this buffer. Same as ":split", but set 'readonly' option for this buffer.
:[N]sf[ind] [++opt] [+cmd] {file} *:sf* *:sfind* *splitfind* :[N]sf[ind] [++opt] [+cmd] {file} *:sf* *:sfi* *:sfind* *splitfind*
Same as ":split", but search for {file} in 'path' like in Same as ":split", but search for {file} in 'path' like in
|:find|. Doesn't split if {file} is not found. |:find|. Doesn't split if {file} is not found.
@ -1030,6 +1030,13 @@ list of buffers. |unlisted-buffer|
thus you can always go to a specific buffer with ":buffer N" thus you can always go to a specific buffer with ":buffer N"
or "N CTRL-^", where N is the buffer number. or "N CTRL-^", where N is the buffer number.
For the file name these special values are used:
[Prompt] |prompt-buffer|
[Popup] buffer of a |popup-window|
[Scratch] 'buftype' is "nofile"
[No Name] no file name specified
For a |terminal-window| buffer the status is used.
Indicators (chars in the same column are mutually exclusive): Indicators (chars in the same column are mutually exclusive):
u an unlisted buffer (only displayed when [!] is used) u an unlisted buffer (only displayed when [!] is used)
|unlisted-buffer| |unlisted-buffer|
@ -1192,7 +1199,6 @@ list of buffers. |unlisted-buffer|
the way when you're browsing code/text buffers. The next three the way when you're browsing code/text buffers. The next three
commands also work like this. commands also work like this.
*:sbn* *:sbnext* *:sbn* *:sbnext*
:[N]sbn[ext] [+cmd] [N] :[N]sbn[ext] [+cmd] [N]
Split window and go to [N]th next buffer in buffer list. Split window and go to [N]th next buffer in buffer list.
@ -1213,7 +1219,7 @@ list of buffers. |unlisted-buffer|
Uses 'switchbuf'. Uses 'switchbuf'.
Also see |+cmd|. Also see |+cmd|.
:br[ewind][!] [+cmd] *:br* *:brewind* :br[ewind][!] [+cmd] *:br* *:bre* *:brewind*
Go to first buffer in buffer list. If the buffer list is Go to first buffer in buffer list. If the buffer list is
empty, go to the first unlisted buffer. empty, go to the first unlisted buffer.
See |:buffer-!| for [!]. See |:buffer-!| for [!].

View File

@ -707,6 +707,9 @@ au BufNewFile,BufRead *.t.html setf tilde
" HTML (.shtml and .stm for server side) " HTML (.shtml and .stm for server side)
au BufNewFile,BufRead *.html,*.htm,*.shtml,*.stm call dist#ft#FThtml() au BufNewFile,BufRead *.html,*.htm,*.shtml,*.stm call dist#ft#FThtml()
" Vue.js Single File Component
au BufNewFile,BufRead *.vue setf vuejs
" HTML with Ruby - eRuby " HTML with Ruby - eRuby
au BufNewFile,BufRead *.erb,*.rhtml setf eruby au BufNewFile,BufRead *.erb,*.rhtml setf eruby

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

@ -0,0 +1,20 @@
" Language: Dune buildsystem
" Maintainer: Markus Mottl <markus.mottl@gmail.com>
" Anton Kochkov <anton.kochkov@gmail.com>
" URL: https://github.com/rgrinberg/vim-ocaml
" Last Change:
" 2018 Nov 3 - Added commentstring (Markus Mottl)
" 2017 Sep 6 - Initial version (Etienne Millon)
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin=1
set lisp
" Comment string
setl commentstring=;\ %s
setl comments=:;
setl iskeyword+=#,?,.,/

View File

@ -5,12 +5,12 @@
" Pierre Vittet <pierre-vittet@pvittet.com> " Pierre Vittet <pierre-vittet@pvittet.com>
" Stefano Zacchiroli <zack@bononia.it> " Stefano Zacchiroli <zack@bononia.it>
" Vincent Aravantinos <firstname.name@imag.fr> " Vincent Aravantinos <firstname.name@imag.fr>
" URL: http://www.ocaml.info/vim/ftplugin/ocaml.vim " URL: https://github.com/rgrinberg/vim-ocaml
" Last Change: " Last Change:
" 2013 Oct 27 - Added commentstring (MM)
" 2013 Jul 26 - load default compiler settings (MM) " 2013 Jul 26 - load default compiler settings (MM)
" 2013 Jul 24 - removed superfluous efm-setting (MM) " 2013 Jul 24 - removed superfluous efm-setting (MM)
" 2013 Jul 22 - applied fixes supplied by Hirotaka Hamada (MM) " 2013 Jul 22 - applied fixes supplied by Hirotaka Hamada (MM)
" 2013 Mar 15 - Improved error format (MM)
if exists("b:did_ftplugin") if exists("b:did_ftplugin")
finish finish
@ -37,6 +37,10 @@ endif
let s:cposet=&cpoptions let s:cposet=&cpoptions
set cpo&vim set cpo&vim
" Comment string
setlocal comments=
setlocal commentstring=(*%s*)
" Add mappings, unless the user didn't want this. " Add mappings, unless the user didn't want this.
if !exists("no_plugin_maps") && !exists("no_ocaml_maps") if !exists("no_plugin_maps") && !exists("no_ocaml_maps")
" (un)commenting " (un)commenting
@ -60,16 +64,39 @@ if !exists("no_plugin_maps") && !exists("no_ocaml_maps")
endif endif
" Let % jump between structure elements (due to Issac Trotts) " Let % jump between structure elements (due to Issac Trotts)
let b:mw = '' let b:mw = '\<let\>:\<and\>:\(\<in\>\|;;\)'
let b:mw = b:mw . ',\<let\>:\<and\>:\(\<in\>\|;;\)'
let b:mw = b:mw . ',\<if\>:\<then\>:\<else\>' let b:mw = b:mw . ',\<if\>:\<then\>:\<else\>'
let b:mw = b:mw . ',\<\(for\|while\)\>:\<do\>:\<done\>,' let b:mw = b:mw . ',\<\(for\|while\)\>:\<do\>:\<done\>'
let b:mw = b:mw . ',\<\(object\|sig\|struct\|begin\)\>:\<end\>' let b:mw = b:mw . ',\<\(object\|sig\|struct\|begin\)\>:\<end\>'
let b:mw = b:mw . ',\<\(match\|try\)\>:\<with\>' let b:mw = b:mw . ',\<\(match\|try\)\>:\<with\>'
let b:match_words = b:mw let b:match_words = b:mw
let b:match_ignorecase=0 let b:match_ignorecase=0
function! s:OcpGrep(bang,args) abort
let grepprg = &l:grepprg
let grepformat = &l:grepformat
let shellpipe = &shellpipe
try
let &l:grepprg = "ocp-grep -c never"
setlocal grepformat=%f:%l:%m
if &shellpipe ==# '2>&1| tee' || &shellpipe ==# '|& tee'
let &shellpipe = "| tee"
endif
execute 'grep! '.a:args
if empty(a:bang) && !empty(getqflist())
return 'cfirst'
else
return ''
endif
finally
let &l:grepprg = grepprg
let &l:grepformat = grepformat
let &shellpipe = shellpipe
endtry
endfunction
command! -bar -bang -complete=file -nargs=+ Ocpgrep exe s:OcpGrep(<q-bang>, <q-args>)
" switching between interfaces (.mli) and implementations (.ml) " switching between interfaces (.mli) and implementations (.ml)
if !exists("g:did_ocaml_switch") if !exists("g:did_ocaml_switch")
let g:did_ocaml_switch = 1 let g:did_ocaml_switch = 1
@ -97,15 +124,8 @@ endif
" Folding support " Folding support
" Get the modeline because folding depends on indentation " Get the modeline because folding depends on indentation
let s:s = line2byte(line('.'))+col('.')-1 let lnum = search('^\s*(\*:o\?caml:', 'n')
if search('^\s*(\*:o\?caml:') let s:modeline = lnum? getline(lnum): ""
let s:modeline = getline(".")
else
let s:modeline = ""
endif
if s:s > 0
exe 'goto' s:s
endif
" Get the indentation params " Get the indentation params
let s:m = matchstr(s:modeline,'default\s*=\s*\d\+') let s:m = matchstr(s:modeline,'default\s*=\s*\d\+')
@ -372,8 +392,8 @@ endfunction
endfun endfun
" This variable contain a dictionnary of list. Each element of the dictionnary " This variable contain a dictionnary of list. Each element of the dictionnary
" represent an annotation system. An annotation system is a list with: " represent an annotation system. An annotation system is a list with :
" - annotation file name as its key " - annotation file name as it's key
" - annotation file path as first element of the contained list " - annotation file path as first element of the contained list
" - build path as second element of the contained list " - build path as second element of the contained list
" - annot_file_last_mod (contain the date of .annot file) as third element " - annot_file_last_mod (contain the date of .annot file) as third element

View File

@ -3,19 +3,21 @@
[Desktop Entry] [Desktop Entry]
# Translators: This is the Application Name used in the GVim desktop file # Translators: This is the Application Name used in the GVim desktop file
Name[de]=GVim Name[de]=GVim
Name[eo]=GVim
Name=GVim Name=GVim
# Translators: This is the Generic Application Name used in the Vim desktop file # Translators: This is the Generic Application Name used in the Vim desktop file
GenericName[de]=Texteditor GenericName[de]=Texteditor
GenericName[eo]=Tekstoredaktilo
GenericName[ja]=テキストエディタ GenericName[ja]=テキストエディタ
GenericName=Text Editor GenericName=Text Editor
# Translators: This is the comment used in the Vim desktop file # Translators: This is the comment used in the Vim desktop file
Comment[de]=Textdateien bearbeiten Comment[de]=Textdateien bearbeiten
Comment[eo]=Redakti tekstajn dosierojn
Comment[ja]=テキストファイルを編集します Comment[ja]=テキストファイルを編集します
Comment=Edit text files Comment=Edit text files
# The translations should come from the po file. Leave them here for now, they will # The translations should come from the po file. Leave them here for now, they will
# be overwritten by the po file when generating the desktop.file! # be overwritten by the po file when generating the desktop.file!
GenericName[da]=Teksteditor GenericName[da]=Teksteditor
GenericName[eo]=Tekstoredaktilo
GenericName[fr]=Éditeur de texte GenericName[fr]=Éditeur de texte
GenericName[pl]=Edytor tekstu GenericName[pl]=Edytor tekstu
GenericName[is]=Ritvinnsluforrit GenericName[is]=Ritvinnsluforrit
@ -34,7 +36,6 @@ Comment[da]=Rediger tekstfiler
Comment[el]=Επεξεργασία αρχείων κειμένου Comment[el]=Επεξεργασία αρχείων κειμένου
Comment[en_CA]=Edit text files Comment[en_CA]=Edit text files
Comment[en_GB]=Edit text files Comment[en_GB]=Edit text files
Comment[eo]=Redakti tekstajn dosierojn
Comment[es]=Edita archivos de texto Comment[es]=Edita archivos de texto
Comment[et]=Redigeeri tekstifaile Comment[et]=Redigeeri tekstifaile
Comment[eu]=Editatu testu-fitxategiak Comment[eu]=Editatu testu-fitxategiak
@ -92,10 +93,12 @@ Terminal=false
Type=Application Type=Application
# Translators: Search terms to find this application. Do NOT change the semicolons! The list MUST also end with a semicolon! # Translators: Search terms to find this application. Do NOT change the semicolons! The list MUST also end with a semicolon!
Keywords[de]=Text;Editor; Keywords[de]=Text;Editor;
Keywords[eo]=Teksto;redaktilo;
Keywords[ja]=テキスト;エディタ; Keywords[ja]=テキスト;エディタ;
Keywords=Text;editor; Keywords=Text;editor;
# Translators: This is the Icon file name. Do NOT translate # Translators: This is the Icon file name. Do NOT translate
Icon[de]=gvim Icon[de]=gvim
Icon[eo]=gvim
Icon=gvim Icon=gvim
Categories=Utility;TextEditor; Categories=Utility;TextEditor;
StartupNotify=true StartupNotify=true

View File

@ -0,0 +1,503 @@
" Vim indent file
" Language: TypeScript
" Maintainer: See https://github.com/HerringtonDarkholme/yats.vim
" Last Change: 2019 Jun 06
" Acknowledgement: Based off of vim-ruby maintained by Nikolai Weibull http://vim-ruby.rubyforge.org
" 0. Initialization {{{1
" =================
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
finish
endif
let b:did_indent = 1
setlocal nosmartindent
" Now, set up our indentation expression and keys that trigger it.
setlocal indentexpr=GetTypescriptIndent()
setlocal formatexpr=Fixedgq(v:lnum,v:count)
setlocal indentkeys=0{,0},0),0],0\,,!^F,o,O,e
" Only define the function once.
if exists("*GetTypescriptIndent")
finish
endif
let s:cpo_save = &cpo
set cpo&vim
" 1. Variables {{{1
" ============
let s:js_keywords = '^\s*\(break\|case\|catch\|continue\|debugger\|default\|delete\|do\|else\|finally\|for\|function\|if\|in\|instanceof\|new\|return\|switch\|this\|throw\|try\|typeof\|var\|void\|while\|with\)'
" Regex of syntax group names that are or delimit string or are comments.
let s:syng_strcom = 'string\|regex\|comment\c'
" Regex of syntax group names that are strings.
let s:syng_string = 'regex\c'
" Regex of syntax group names that are strings or documentation.
let s:syng_multiline = 'comment\c'
" Regex of syntax group names that are line comment.
let s:syng_linecom = 'linecomment\c'
" Expression used to check whether we should skip a match with searchpair().
let s:skip_expr = "synIDattr(synID(line('.'),col('.'),1),'name') =~ '".s:syng_strcom."'"
let s:line_term = '\s*\%(\%(\/\/\).*\)\=$'
" Regex that defines continuation lines, not including (, {, or [.
let s:continuation_regex = '\%([\\*+/.:]\|\%(<%\)\@<![=-]\|\W[|&?]\|||\|&&\|[^=]=[^=].*,\)' . s:line_term
" Regex that defines continuation lines.
" TODO: this needs to deal with if ...: and so on
let s:msl_regex = s:continuation_regex
let s:one_line_scope_regex = '\<\%(if\|else\|for\|while\)\>[^{;]*' . s:line_term
" Regex that defines blocks.
let s:block_regex = '\%([{[]\)\s*\%(|\%([*@]\=\h\w*,\=\s*\)\%(,\s*[*@]\=\h\w*\)*|\)\=' . s:line_term
let s:var_stmt = '^\s*var'
let s:comma_first = '^\s*,'
let s:comma_last = ',\s*$'
let s:ternary = '^\s\+[?|:]'
let s:ternary_q = '^\s\+?'
" 2. Auxiliary Functions {{{1
" ======================
" Check if the character at lnum:col is inside a string, comment, or is ascii.
function s:IsInStringOrComment(lnum, col)
return synIDattr(synID(a:lnum, a:col, 1), 'name') =~ s:syng_strcom
endfunction
" Check if the character at lnum:col is inside a string.
function s:IsInString(lnum, col)
return synIDattr(synID(a:lnum, a:col, 1), 'name') =~ s:syng_string
endfunction
" Check if the character at lnum:col is inside a multi-line comment.
function s:IsInMultilineComment(lnum, col)
return !s:IsLineComment(a:lnum, a:col) && synIDattr(synID(a:lnum, a:col, 1), 'name') =~ s:syng_multiline
endfunction
" Check if the character at lnum:col is a line comment.
function s:IsLineComment(lnum, col)
return synIDattr(synID(a:lnum, a:col, 1), 'name') =~ s:syng_linecom
endfunction
" Find line above 'lnum' that isn't empty, in a comment, or in a string.
function s:PrevNonBlankNonString(lnum)
let in_block = 0
let lnum = prevnonblank(a:lnum)
while lnum > 0
" Go in and out of blocks comments as necessary.
" If the line isn't empty (with opt. comment) or in a string, end search.
let line = getline(lnum)
if line =~ '/\*'
if in_block
let in_block = 0
else
break
endif
elseif !in_block && line =~ '\*/'
let in_block = 1
elseif !in_block && line !~ '^\s*\%(//\).*$' && !(s:IsInStringOrComment(lnum, 1) && s:IsInStringOrComment(lnum, strlen(line)))
break
endif
let lnum = prevnonblank(lnum - 1)
endwhile
return lnum
endfunction
" Find line above 'lnum' that started the continuation 'lnum' may be part of.
function s:GetMSL(lnum, in_one_line_scope)
" Start on the line we're at and use its indent.
let msl = a:lnum
let lnum = s:PrevNonBlankNonString(a:lnum - 1)
while lnum > 0
" If we have a continuation line, or we're in a string, use line as MSL.
" Otherwise, terminate search as we have found our MSL already.
let line = getline(lnum)
let col = match(line, s:msl_regex) + 1
if (col > 0 && !s:IsInStringOrComment(lnum, col)) || s:IsInString(lnum, strlen(line))
let msl = lnum
else
" Don't use lines that are part of a one line scope as msl unless the
" flag in_one_line_scope is set to 1
"
if a:in_one_line_scope
break
end
let msl_one_line = s:Match(lnum, s:one_line_scope_regex)
if msl_one_line == 0
break
endif
endif
let lnum = s:PrevNonBlankNonString(lnum - 1)
endwhile
return msl
endfunction
function s:RemoveTrailingComments(content)
let single = '\/\/\(.*\)\s*$'
let multi = '\/\*\(.*\)\*\/\s*$'
return substitute(substitute(a:content, single, '', ''), multi, '', '')
endfunction
" Find if the string is inside var statement (but not the first string)
function s:InMultiVarStatement(lnum)
let lnum = s:PrevNonBlankNonString(a:lnum - 1)
" let type = synIDattr(synID(lnum, indent(lnum) + 1, 0), 'name')
" loop through previous expressions to find a var statement
while lnum > 0
let line = getline(lnum)
" if the line is a js keyword
if (line =~ s:js_keywords)
" check if the line is a var stmt
" if the line has a comma first or comma last then we can assume that we
" are in a multiple var statement
if (line =~ s:var_stmt)
return lnum
endif
" other js keywords, not a var
return 0
endif
let lnum = s:PrevNonBlankNonString(lnum - 1)
endwhile
" beginning of program, not a var
return 0
endfunction
" Find line above with beginning of the var statement or returns 0 if it's not
" this statement
function s:GetVarIndent(lnum)
let lvar = s:InMultiVarStatement(a:lnum)
let prev_lnum = s:PrevNonBlankNonString(a:lnum - 1)
if lvar
let line = s:RemoveTrailingComments(getline(prev_lnum))
" if the previous line doesn't end in a comma, return to regular indent
if (line !~ s:comma_last)
return indent(prev_lnum) - shiftwidth()
else
return indent(lvar) + shiftwidth()
endif
endif
return -1
endfunction
" Check if line 'lnum' has more opening brackets than closing ones.
function s:LineHasOpeningBrackets(lnum)
let open_0 = 0
let open_2 = 0
let open_4 = 0
let line = getline(a:lnum)
let pos = match(line, '[][(){}]', 0)
while pos != -1
if !s:IsInStringOrComment(a:lnum, pos + 1)
let idx = stridx('(){}[]', line[pos])
if idx % 2 == 0
let open_{idx} = open_{idx} + 1
else
let open_{idx - 1} = open_{idx - 1} - 1
endif
endif
let pos = match(line, '[][(){}]', pos + 1)
endwhile
return (open_0 > 0) . (open_2 > 0) . (open_4 > 0)
endfunction
function s:Match(lnum, regex)
let col = match(getline(a:lnum), a:regex) + 1
return col > 0 && !s:IsInStringOrComment(a:lnum, col) ? col : 0
endfunction
function s:IndentWithContinuation(lnum, ind, width)
" Set up variables to use and search for MSL to the previous line.
let p_lnum = a:lnum
let lnum = s:GetMSL(a:lnum, 1)
let line = getline(lnum)
" If the previous line wasn't a MSL and is continuation return its indent.
" TODO: the || s:IsInString() thing worries me a bit.
if p_lnum != lnum
if s:Match(p_lnum,s:continuation_regex)||s:IsInString(p_lnum,strlen(line))
return a:ind
endif
endif
" Set up more variables now that we know we aren't continuation bound.
let msl_ind = indent(lnum)
" If the previous line ended with [*+/.-=], start a continuation that
" indents an extra level.
if s:Match(lnum, s:continuation_regex)
if lnum == p_lnum
return msl_ind + a:width
else
return msl_ind
endif
endif
return a:ind
endfunction
function s:InOneLineScope(lnum)
let msl = s:GetMSL(a:lnum, 1)
if msl > 0 && s:Match(msl, s:one_line_scope_regex)
return msl
endif
return 0
endfunction
function s:ExitingOneLineScope(lnum)
let msl = s:GetMSL(a:lnum, 1)
if msl > 0
" if the current line is in a one line scope ..
if s:Match(msl, s:one_line_scope_regex)
return 0
else
let prev_msl = s:GetMSL(msl - 1, 1)
if s:Match(prev_msl, s:one_line_scope_regex)
return prev_msl
endif
endif
endif
return 0
endfunction
" 3. GetTypescriptIndent Function {{{1
" =========================
function GetTypescriptIndent()
" 3.1. Setup {{{2
" ----------
" Set up variables for restoring position in file. Could use v:lnum here.
let vcol = col('.')
" 3.2. Work on the current line {{{2
" -----------------------------
let ind = -1
" Get the current line.
let line = getline(v:lnum)
" previous nonblank line number
let prevline = prevnonblank(v:lnum - 1)
" If we got a closing bracket on an empty line, find its match and indent
" according to it. For parentheses we indent to its column - 1, for the
" others we indent to the containing line's MSL's level. Return -1 if fail.
let col = matchend(line, '^\s*[],})]')
if col > 0 && !s:IsInStringOrComment(v:lnum, col)
call cursor(v:lnum, col)
let lvar = s:InMultiVarStatement(v:lnum)
if lvar
let prevline_contents = s:RemoveTrailingComments(getline(prevline))
" check for comma first
if (line[col - 1] =~ ',')
" if the previous line ends in comma or semicolon don't indent
if (prevline_contents =~ '[;,]\s*$')
return indent(s:GetMSL(line('.'), 0))
" get previous line indent, if it's comma first return prevline indent
elseif (prevline_contents =~ s:comma_first)
return indent(prevline)
" otherwise we indent 1 level
else
return indent(lvar) + shiftwidth()
endif
endif
endif
let bs = strpart('(){}[]', stridx(')}]', line[col - 1]) * 2, 2)
if searchpair(escape(bs[0], '\['), '', bs[1], 'bW', s:skip_expr) > 0
if line[col-1]==')' && col('.') != col('$') - 1
let ind = virtcol('.')-1
else
let ind = indent(s:GetMSL(line('.'), 0))
endif
endif
return ind
endif
" If the line is comma first, dedent 1 level
if (getline(prevline) =~ s:comma_first)
return indent(prevline) - shiftwidth()
endif
if (line =~ s:ternary)
if (getline(prevline) =~ s:ternary_q)
return indent(prevline)
else
return indent(prevline) + shiftwidth()
endif
endif
" If we are in a multi-line comment, cindent does the right thing.
if s:IsInMultilineComment(v:lnum, 1) && !s:IsLineComment(v:lnum, 1)
return cindent(v:lnum)
endif
" Check for multiple var assignments
" let var_indent = s:GetVarIndent(v:lnum)
" if var_indent >= 0
" return var_indent
" endif
" 3.3. Work on the previous line. {{{2
" -------------------------------
" If the line is empty and the previous nonblank line was a multi-line
" comment, use that comment's indent. Deduct one char to account for the
" space in ' */'.
if line =~ '^\s*$' && s:IsInMultilineComment(prevline, 1)
return indent(prevline) - 1
endif
" Find a non-blank, non-multi-line string line above the current line.
let lnum = s:PrevNonBlankNonString(v:lnum - 1)
" If the line is empty and inside a string, use the previous line.
if line =~ '^\s*$' && lnum != prevline
return indent(prevnonblank(v:lnum))
endif
" At the start of the file use zero indent.
if lnum == 0
return 0
endif
" Set up variables for current line.
let line = getline(lnum)
let ind = indent(lnum)
" If the previous line ended with a block opening, add a level of indent.
if s:Match(lnum, s:block_regex)
return indent(s:GetMSL(lnum, 0)) + shiftwidth()
endif
" If the previous line contained an opening bracket, and we are still in it,
" add indent depending on the bracket type.
if line =~ '[[({]'
let counts = s:LineHasOpeningBrackets(lnum)
if counts[0] == '1' && searchpair('(', '', ')', 'bW', s:skip_expr) > 0
if col('.') + 1 == col('$')
return ind + shiftwidth()
else
return virtcol('.')
endif
elseif counts[1] == '1' || counts[2] == '1'
return ind + shiftwidth()
else
call cursor(v:lnum, vcol)
end
endif
" 3.4. Work on the MSL line. {{{2
" --------------------------
let ind_con = ind
let ind = s:IndentWithContinuation(lnum, ind_con, shiftwidth())
" }}}2
"
"
let ols = s:InOneLineScope(lnum)
if ols > 0
let ind = ind + shiftwidth()
else
let ols = s:ExitingOneLineScope(lnum)
while ols > 0 && ind > 0
let ind = ind - shiftwidth()
let ols = s:InOneLineScope(ols - 1)
endwhile
endif
return ind
endfunction
" }}}1
let &cpo = s:cpo_save
unlet s:cpo_save
function! Fixedgq(lnum, count)
let l:tw = &tw ? &tw : 80;
let l:count = a:count
let l:first_char = indent(a:lnum) + 1
if mode() == 'i' " gq was not pressed, but tw was set
return 1
endif
" This gq is only meant to do code with strings, not comments
if s:IsLineComment(a:lnum, l:first_char) || s:IsInMultilineComment(a:lnum, l:first_char)
return 1
endif
if len(getline(a:lnum)) < l:tw && l:count == 1 " No need for gq
return 1
endif
" Put all the lines on one line and do normal spliting after that
if l:count > 1
while l:count > 1
let l:count -= 1
normal J
endwhile
endif
let l:winview = winsaveview()
call cursor(a:lnum, l:tw + 1)
let orig_breakpoint = searchpairpos(' ', '', '\.', 'bcW', '', a:lnum)
call cursor(a:lnum, l:tw + 1)
let breakpoint = searchpairpos(' ', '', '\.', 'bcW', s:skip_expr, a:lnum)
" No need for special treatment, normal gq handles edgecases better
if breakpoint[1] == orig_breakpoint[1]
call winrestview(l:winview)
return 1
endif
" Try breaking after string
if breakpoint[1] <= indent(a:lnum)
call cursor(a:lnum, l:tw + 1)
let breakpoint = searchpairpos('\.', '', ' ', 'cW', s:skip_expr, a:lnum)
endif
if breakpoint[1] != 0
call feedkeys("r\<CR>")
else
let l:count = l:count - 1
endif
" run gq on new lines
if l:count == 1
call feedkeys("gqq")
endif
return 0
endfunction

View File

@ -272,6 +272,7 @@ SynMenu HIJK.HTML.HTML\ with\ M4:htmlm4
SynMenu HIJK.HTML.HTML\ with\ Ruby\ (eRuby):eruby SynMenu HIJK.HTML.HTML\ with\ Ruby\ (eRuby):eruby
SynMenu HIJK.HTML.Cheetah\ HTML\ template:htmlcheetah SynMenu HIJK.HTML.Cheetah\ HTML\ template:htmlcheetah
SynMenu HIJK.HTML.Django\ HTML\ template:htmldjango SynMenu HIJK.HTML.Django\ HTML\ template:htmldjango
SynMenu HIJK.HTML.Vue.js\ HTML\ template:vuejs
SynMenu HIJK.HTML.HTML/OS:htmlos SynMenu HIJK.HTML.HTML/OS:htmlos
SynMenu HIJK.HTML.XHTML:xhtml SynMenu HIJK.HTML.XHTML:xhtml
SynMenu HIJK.Host\.conf:hostconf SynMenu HIJK.Host\.conf:hostconf

View File

@ -1,7 +1,7 @@
" These commands create the option window. " These commands create the option window.
" "
" Maintainer: Bram Moolenaar <Bram@vim.org> " Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2019 Feb 08 " Last Change: 2019 May 25
" If there already is an option window, jump to that one. " If there already is an option window, jump to that one.
let buf = bufnr('option-window') let buf = bufnr('option-window')
@ -415,6 +415,9 @@ call append("$", "highlight\twhich highlighting to use for various occasions")
call <SID>OptionG("hl", &hl) call <SID>OptionG("hl", &hl)
call append("$", "hlsearch\thighlight all matches for the last used search pattern") call append("$", "hlsearch\thighlight all matches for the last used search pattern")
call <SID>BinOptionG("hls", &hls) call <SID>BinOptionG("hls", &hls)
call append("$", "wincolor\thighlight group to use for the window")
call append("$", "\t(local to window)")
call <SID>OptionL("wcr")
if has("termguicolors") if has("termguicolors")
call append("$", "termguicolors\tuse GUI colors for the terminal") call append("$", "termguicolors\tuse GUI colors for the terminal")
call <SID>BinOptionG("tgc", &tgc) call <SID>BinOptionG("tgc", &tgc)
@ -988,6 +991,8 @@ call <SID>Header("reading and writing files")
call append("$", "modeline\tenable using settings from modelines when reading a file") call append("$", "modeline\tenable using settings from modelines when reading a file")
call append("$", "\t(local to buffer)") call append("$", "\t(local to buffer)")
call <SID>BinOptionL("ml") call <SID>BinOptionL("ml")
call append("$", "modelineexpr\tallow setting expression options from a modeline")
call <SID>BinOptionG("mle", &mle)
call append("$", "modelines\tnumber of lines to check for modelines") call append("$", "modelines\tnumber of lines to check for modelines")
call append("$", " \tset mls=" . &mls) call append("$", " \tset mls=" . &mls)
call append("$", "binary\tbinary file editing") call append("$", "binary\tbinary file editing")

View File

@ -117,10 +117,14 @@ func s:StartDebug_internal(dict)
let s:startsigncolumn = &signcolumn let s:startsigncolumn = &signcolumn
let s:save_columns = 0 let s:save_columns = 0
let s:allleft = 0
if exists('g:termdebug_wide') if exists('g:termdebug_wide')
if &columns < g:termdebug_wide if &columns < g:termdebug_wide
let s:save_columns = &columns let s:save_columns = &columns
let &columns = g:termdebug_wide let &columns = g:termdebug_wide
" If we make the Vim window wider, use the whole left halve for the debug
" windows.
let s:allleft = 1
endif endif
let s:vertical = 1 let s:vertical = 1
else else
@ -165,6 +169,10 @@ func s:StartDebug_term(dict)
" Assuming the source code window will get a signcolumn, use two more " Assuming the source code window will get a signcolumn, use two more
" columns for that, thus one less for the terminal window. " columns for that, thus one less for the terminal window.
exe (&columns / 2 - 1) . "wincmd |" exe (&columns / 2 - 1) . "wincmd |"
if s:allleft
" use the whole left column
wincmd H
endif
endif endif
" Create a hidden terminal window to communicate with gdb " Create a hidden terminal window to communicate with gdb
@ -830,12 +838,12 @@ endfunc
" if there is any. " if there is any.
func TermDebugBalloonExpr() func TermDebugBalloonExpr()
if v:beval_winid != s:sourcewin if v:beval_winid != s:sourcewin
return return ''
endif endif
if !s:stopped if !s:stopped
" Only evaluate when stopped, otherwise setting a breakpoint using the " Only evaluate when stopped, otherwise setting a breakpoint using the
" mouse triggers a balloon. " mouse triggers a balloon.
return return ''
endif endif
let s:evalFromBalloonExpr = 1 let s:evalFromBalloonExpr = 1
let s:evalFromBalloonExprResult = '' let s:evalFromBalloonExprResult = ''

View File

@ -1,7 +1,7 @@
" Vim support file to detect file types in scripts " Vim support file to detect file types in scripts
" "
" Maintainer: Bram Moolenaar <Bram@vim.org> " Maintainer: Bram Moolenaar <Bram@vim.org>
" Last change: 2018 Feb 03 " Last change: 2019 Jun 25
" This file is called by an autocommand for every file that has just been " This file is called by an autocommand for every file that has just been
" loaded into a buffer. It checks if the type of file can be recognized by " loaded into a buffer. It checks if the type of file can be recognized by
@ -195,7 +195,7 @@ else
if s:line1 =~# '^:$' if s:line1 =~# '^:$'
call dist#ft#SetFileTypeSH(s:line1) " defined in filetype.vim call dist#ft#SetFileTypeSH(s:line1) " defined in filetype.vim
" Z shell scripts " Z shell scripts
elseif s:line1 =~# '^#compdef\>' || s:line1 =~# '^#autoload\>' || elseif s:line1 =~# '^#compdef\>' || s:line1 =~# '^#autoload\>' ||
\ "\n".s:line1."\n".s:line2."\n".s:line3."\n".s:line4."\n".s:line5 =~# '\n\s*emulate\s\+\%(-[LR]\s\+\)\=[ckz]\=sh\>' \ "\n".s:line1."\n".s:line2."\n".s:line3."\n".s:line4."\n".s:line5 =~# '\n\s*emulate\s\+\%(-[LR]\s\+\)\=[ckz]\=sh\>'
set ft=zsh set ft=zsh
@ -204,15 +204,20 @@ else
elseif s:line1 =~# '^From \([a-zA-Z][a-zA-Z_0-9\.=-]*\(@[^ ]*\)\=\|-\) .* \(19\|20\)\d\d$' elseif s:line1 =~# '^From \([a-zA-Z][a-zA-Z_0-9\.=-]*\(@[^ ]*\)\=\|-\) .* \(19\|20\)\d\d$'
set ft=mail set ft=mail
" Mason " Mason
elseif s:line1 =~# '^<[%&].*>' elseif s:line1 =~# '^<[%&].*>'
set ft=mason set ft=mason
" Vim scripts (must have '" vim' as the first line to trigger this) " Vim scripts (must have '" vim' as the first line to trigger this)
elseif s:line1 =~# '^" *[vV]im$' elseif s:line1 =~# '^" *[vV]im$'
set ft=vim set ft=vim
" MOO " libcxx and libstdc++ standard library headers like "iostream" do not have
" an extension, recognize the Emacs file mode.
elseif s:line1 =~? '-\*-.*C++.*-\*-'
set ft=cpp
" MOO
elseif s:line1 =~# '^\*\* LambdaMOO Database, Format Version \%([1-3]\>\)\@!\d\+ \*\*$' elseif s:line1 =~# '^\*\* LambdaMOO Database, Format Version \%([1-3]\>\)\@!\d\+ \*\*$'
set ft=moo set ft=moo

View File

@ -252,48 +252,49 @@ an 50.50.220 &Syntax.HIJK.HTML.HTML\ with\ M4 :cal SetSyn("htmlm4")<CR>
an 50.50.230 &Syntax.HIJK.HTML.HTML\ with\ Ruby\ (eRuby) :cal SetSyn("eruby")<CR> an 50.50.230 &Syntax.HIJK.HTML.HTML\ with\ Ruby\ (eRuby) :cal SetSyn("eruby")<CR>
an 50.50.240 &Syntax.HIJK.HTML.Cheetah\ HTML\ template :cal SetSyn("htmlcheetah")<CR> an 50.50.240 &Syntax.HIJK.HTML.Cheetah\ HTML\ template :cal SetSyn("htmlcheetah")<CR>
an 50.50.250 &Syntax.HIJK.HTML.Django\ HTML\ template :cal SetSyn("htmldjango")<CR> an 50.50.250 &Syntax.HIJK.HTML.Django\ HTML\ template :cal SetSyn("htmldjango")<CR>
an 50.50.260 &Syntax.HIJK.HTML.HTML/OS :cal SetSyn("htmlos")<CR> an 50.50.260 &Syntax.HIJK.HTML.Vue.js\ HTML\ template :cal SetSyn("vuejs")<CR>
an 50.50.270 &Syntax.HIJK.HTML.XHTML :cal SetSyn("xhtml")<CR> an 50.50.270 &Syntax.HIJK.HTML.HTML/OS :cal SetSyn("htmlos")<CR>
an 50.50.280 &Syntax.HIJK.Host\.conf :cal SetSyn("hostconf")<CR> an 50.50.280 &Syntax.HIJK.HTML.XHTML :cal SetSyn("xhtml")<CR>
an 50.50.290 &Syntax.HIJK.Hosts\ access :cal SetSyn("hostsaccess")<CR> an 50.50.290 &Syntax.HIJK.Host\.conf :cal SetSyn("hostconf")<CR>
an 50.50.300 &Syntax.HIJK.Hyper\ Builder :cal SetSyn("hb")<CR> an 50.50.300 &Syntax.HIJK.Hosts\ access :cal SetSyn("hostsaccess")<CR>
an 50.50.320 &Syntax.HIJK.Icewm\ menu :cal SetSyn("icemenu")<CR> an 50.50.310 &Syntax.HIJK.Hyper\ Builder :cal SetSyn("hb")<CR>
an 50.50.330 &Syntax.HIJK.Icon :cal SetSyn("icon")<CR> an 50.50.330 &Syntax.HIJK.Icewm\ menu :cal SetSyn("icemenu")<CR>
an 50.50.340 &Syntax.HIJK.IDL\Generic\ IDL :cal SetSyn("idl")<CR> an 50.50.340 &Syntax.HIJK.Icon :cal SetSyn("icon")<CR>
an 50.50.350 &Syntax.HIJK.IDL\Microsoft\ IDL :cal SetSyn("msidl")<CR> an 50.50.350 &Syntax.HIJK.IDL\Generic\ IDL :cal SetSyn("idl")<CR>
an 50.50.360 &Syntax.HIJK.Indent\ profile :cal SetSyn("indent")<CR> an 50.50.360 &Syntax.HIJK.IDL\Microsoft\ IDL :cal SetSyn("msidl")<CR>
an 50.50.370 &Syntax.HIJK.Inform :cal SetSyn("inform")<CR> an 50.50.370 &Syntax.HIJK.Indent\ profile :cal SetSyn("indent")<CR>
an 50.50.380 &Syntax.HIJK.Informix\ 4GL :cal SetSyn("fgl")<CR> an 50.50.380 &Syntax.HIJK.Inform :cal SetSyn("inform")<CR>
an 50.50.390 &Syntax.HIJK.Initng :cal SetSyn("initng")<CR> an 50.50.390 &Syntax.HIJK.Informix\ 4GL :cal SetSyn("fgl")<CR>
an 50.50.400 &Syntax.HIJK.Inittab :cal SetSyn("inittab")<CR> an 50.50.400 &Syntax.HIJK.Initng :cal SetSyn("initng")<CR>
an 50.50.410 &Syntax.HIJK.Inno\ setup :cal SetSyn("iss")<CR> an 50.50.410 &Syntax.HIJK.Inittab :cal SetSyn("inittab")<CR>
an 50.50.420 &Syntax.HIJK.Innovation\ Data\ Processing.Upstream\ dat :cal SetSyn("upstreamdat")<CR> an 50.50.420 &Syntax.HIJK.Inno\ setup :cal SetSyn("iss")<CR>
an 50.50.430 &Syntax.HIJK.Innovation\ Data\ Processing.Upstream\ log :cal SetSyn("upstreamlog")<CR> an 50.50.430 &Syntax.HIJK.Innovation\ Data\ Processing.Upstream\ dat :cal SetSyn("upstreamdat")<CR>
an 50.50.440 &Syntax.HIJK.Innovation\ Data\ Processing.Upstream\ rpt :cal SetSyn("upstreamrpt")<CR> an 50.50.440 &Syntax.HIJK.Innovation\ Data\ Processing.Upstream\ log :cal SetSyn("upstreamlog")<CR>
an 50.50.450 &Syntax.HIJK.Innovation\ Data\ Processing.Upstream\ Install\ log :cal SetSyn("upstreaminstalllog")<CR> an 50.50.450 &Syntax.HIJK.Innovation\ Data\ Processing.Upstream\ rpt :cal SetSyn("upstreamrpt")<CR>
an 50.50.460 &Syntax.HIJK.Innovation\ Data\ Processing.Usserver\ log :cal SetSyn("usserverlog")<CR> an 50.50.460 &Syntax.HIJK.Innovation\ Data\ Processing.Upstream\ Install\ log :cal SetSyn("upstreaminstalllog")<CR>
an 50.50.470 &Syntax.HIJK.Innovation\ Data\ Processing.USW2KAgt\ log :cal SetSyn("usw2kagtlog")<CR> an 50.50.470 &Syntax.HIJK.Innovation\ Data\ Processing.Usserver\ log :cal SetSyn("usserverlog")<CR>
an 50.50.480 &Syntax.HIJK.InstallShield\ script :cal SetSyn("ishd")<CR> an 50.50.480 &Syntax.HIJK.Innovation\ Data\ Processing.USW2KAgt\ log :cal SetSyn("usw2kagtlog")<CR>
an 50.50.490 &Syntax.HIJK.Interactive\ Data\ Lang :cal SetSyn("idlang")<CR> an 50.50.490 &Syntax.HIJK.InstallShield\ script :cal SetSyn("ishd")<CR>
an 50.50.500 &Syntax.HIJK.IPfilter :cal SetSyn("ipfilter")<CR> an 50.50.500 &Syntax.HIJK.Interactive\ Data\ Lang :cal SetSyn("idlang")<CR>
an 50.50.520 &Syntax.HIJK.J :cal SetSyn("j")<CR> an 50.50.510 &Syntax.HIJK.IPfilter :cal SetSyn("ipfilter")<CR>
an 50.50.530 &Syntax.HIJK.JAL :cal SetSyn("jal")<CR> an 50.50.530 &Syntax.HIJK.J :cal SetSyn("j")<CR>
an 50.50.540 &Syntax.HIJK.JAM :cal SetSyn("jam")<CR> an 50.50.540 &Syntax.HIJK.JAL :cal SetSyn("jal")<CR>
an 50.50.550 &Syntax.HIJK.Jargon :cal SetSyn("jargon")<CR> an 50.50.550 &Syntax.HIJK.JAM :cal SetSyn("jam")<CR>
an 50.50.560 &Syntax.HIJK.Java.Java :cal SetSyn("java")<CR> an 50.50.560 &Syntax.HIJK.Jargon :cal SetSyn("jargon")<CR>
an 50.50.570 &Syntax.HIJK.Java.JavaCC :cal SetSyn("javacc")<CR> an 50.50.570 &Syntax.HIJK.Java.Java :cal SetSyn("java")<CR>
an 50.50.580 &Syntax.HIJK.Java.Java\ Server\ Pages :cal SetSyn("jsp")<CR> an 50.50.580 &Syntax.HIJK.Java.JavaCC :cal SetSyn("javacc")<CR>
an 50.50.590 &Syntax.HIJK.Java.Java\ Properties :cal SetSyn("jproperties")<CR> an 50.50.590 &Syntax.HIJK.Java.Java\ Server\ Pages :cal SetSyn("jsp")<CR>
an 50.50.600 &Syntax.HIJK.JavaScript :cal SetSyn("javascript")<CR> an 50.50.600 &Syntax.HIJK.Java.Java\ Properties :cal SetSyn("jproperties")<CR>
an 50.50.610 &Syntax.HIJK.Jess :cal SetSyn("jess")<CR> an 50.50.610 &Syntax.HIJK.JavaScript :cal SetSyn("javascript")<CR>
an 50.50.620 &Syntax.HIJK.Jgraph :cal SetSyn("jgraph")<CR> an 50.50.620 &Syntax.HIJK.Jess :cal SetSyn("jess")<CR>
an 50.50.630 &Syntax.HIJK.Jovial :cal SetSyn("jovial")<CR> an 50.50.630 &Syntax.HIJK.Jgraph :cal SetSyn("jgraph")<CR>
an 50.50.640 &Syntax.HIJK.JSON :cal SetSyn("json")<CR> an 50.50.640 &Syntax.HIJK.Jovial :cal SetSyn("jovial")<CR>
an 50.50.660 &Syntax.HIJK.Kconfig :cal SetSyn("kconfig")<CR> an 50.50.650 &Syntax.HIJK.JSON :cal SetSyn("json")<CR>
an 50.50.670 &Syntax.HIJK.KDE\ script :cal SetSyn("kscript")<CR> an 50.50.670 &Syntax.HIJK.Kconfig :cal SetSyn("kconfig")<CR>
an 50.50.680 &Syntax.HIJK.Kimwitu++ :cal SetSyn("kwt")<CR> an 50.50.680 &Syntax.HIJK.KDE\ script :cal SetSyn("kscript")<CR>
an 50.50.690 &Syntax.HIJK.Kivy :cal SetSyn("kivy")<CR> an 50.50.690 &Syntax.HIJK.Kimwitu++ :cal SetSyn("kwt")<CR>
an 50.50.700 &Syntax.HIJK.KixTart :cal SetSyn("kix")<CR> an 50.50.700 &Syntax.HIJK.Kivy :cal SetSyn("kivy")<CR>
an 50.50.710 &Syntax.HIJK.KixTart :cal SetSyn("kix")<CR>
an 50.60.100 &Syntax.L.Lace :cal SetSyn("lace")<CR> an 50.60.100 &Syntax.L.Lace :cal SetSyn("lace")<CR>
an 50.60.110 &Syntax.L.LamdaProlog :cal SetSyn("lprolog")<CR> an 50.60.110 &Syntax.L.LamdaProlog :cal SetSyn("lprolog")<CR>
an 50.60.120 &Syntax.L.Latte :cal SetSyn("latte")<CR> an 50.60.120 &Syntax.L.Latte :cal SetSyn("latte")<CR>

46
runtime/syntax/dune.vim Normal file
View File

@ -0,0 +1,46 @@
" Language: Dune buildsystem
" Maintainer: Markus Mottl <markus.mottl@gmail.com>
" Anton Kochkov <anton.kochkov@gmail.com>
" URL: https://github.com/rgrinberg/vim-ocaml
" Last Change:
" 2019 Feb 27 - Add newer keywords to the syntax (Simon Cruanes)
" 2018 May 8 - Check current_syntax (Kawahara Satoru)
" 2018 Mar 29 - Extend jbuild syntax with more keywords (Petter A. Urkedal)
" 2017 Sep 6 - Initial version (Etienne Millon)
if exists("b:current_syntax")
finish
endif
set syntax=lisp
syn case match
" The syn-iskeyword setting lacks #,? from the iskeyword setting here.
" Clearing it avoids maintaining keyword characters in multiple places.
syn iskeyword clear
syn keyword lispDecl jbuild_version library executable executables rule ocamllex ocamlyacc menhir alias install
syn keyword lispKey name public_name synopsis modules libraries wrapped
syn keyword lispKey preprocess preprocessor_deps optional c_names cxx_names
syn keyword lispKey install_c_headers modes no_dynlink self_build_stubs_archive
syn keyword lispKey ppx_runtime_libraries virtual_deps js_of_ocaml link_flags
syn keyword lispKey javascript_files flags ocamlc_flags ocamlopt_flags pps staged_pps
syn keyword lispKey library_flags c_flags c_library_flags kind package action
syn keyword lispKey deps targets locks fallback
syn keyword lispKey inline_tests tests names
syn keyword lispAtom true false
syn keyword lispFunc cat chdir copy# diff? echo run setenv
syn keyword lispFunc ignore-stdout ignore-stderr ignore-outputs
syn keyword lispFunc with-stdout-to with-stderr-to with-outputs-to
syn keyword lispFunc write-file system bash
syn cluster lispBaseListCluster add=duneVar
syn match duneVar '\${[@<^]}' containedin=lispSymbol
syn match duneVar '\${\k\+\(:\k\+\)\?}' containedin=lispSymbol
hi def link duneVar Identifier
let b:current_syntax = "dune"

View File

@ -2,8 +2,8 @@
" Language: fstab file " Language: fstab file
" Maintainer: Radu Dineiu <radu.dineiu@gmail.com> " Maintainer: Radu Dineiu <radu.dineiu@gmail.com>
" URL: https://raw.github.com/rid9/vim-fstab/master/fstab.vim " URL: https://raw.github.com/rid9/vim-fstab/master/fstab.vim
" Last Change: 2017 Nov 09 " Last Change: 2019 Jun 06
" Version: 1.2 " Version: 1.3
" "
" Credits: " Credits:
" David Necas (Yeti) <yeti@physics.muni.cz> " David Necas (Yeti) <yeti@physics.muni.cz>
@ -68,7 +68,7 @@ syn match fsOptionsString /[a-zA-Z0-9_-]\+/
syn keyword fsOptionsYesNo yes no syn keyword fsOptionsYesNo yes no
syn cluster fsOptionsCheckCluster contains=fsOptionsExt2Check,fsOptionsFatCheck syn cluster fsOptionsCheckCluster contains=fsOptionsExt2Check,fsOptionsFatCheck
syn keyword fsOptionsSize 512 1024 2048 syn keyword fsOptionsSize 512 1024 2048
syn keyword fsOptionsGeneral async atime auto bind current defaults dev devgid devmode devmtime devuid dirsync exec force fstab kudzu loop mand move noatime noauto noclusterr noclusterw nodev nodevmtime nodiratime noexec nomand norelatime nosuid nosymfollow nouser owner rbind rdonly relatime remount ro rq rw suid suiddir supermount sw sync union update user users wxallowed xx syn keyword fsOptionsGeneral async atime auto bind current defaults dev devgid devmode devmtime devuid dirsync exec force fstab kudzu loop mand move noatime noauto noclusterr noclusterw nodev nodevmtime nodiratime noexec nomand norelatime nosuid nosymfollow nouser owner rbind rdonly relatime remount ro rq rw suid suiddir supermount sw sync union update user users wxallowed xx nofail
syn match fsOptionsGeneral /_netdev/ syn match fsOptionsGeneral /_netdev/
" Options: adfs " Options: adfs

View File

@ -1,7 +1,7 @@
" Vim syntax file " Vim syntax file
" Language: Vim help file " Language: Vim help file
" Maintainer: Bram Moolenaar (Bram@vim.org) " Maintainer: Bram Moolenaar (Bram@vim.org)
" Last Change: 2017 Oct 19 " Last Change: 2019 May 12
" Quit when a (custom) syntax file was already loaded " Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax") if exists("b:current_syntax")
@ -11,7 +11,7 @@ endif
let s:cpo_save = &cpo let s:cpo_save = &cpo
set cpo&vim set cpo&vim
syn match helpHeadline "^[-A-Z .][-A-Z0-9 .()]*[ \t]\+\*"me=e-1 syn match helpHeadline "^[-A-Z .][-A-Z0-9 .()_]*[ \t]\+\*"me=e-1
syn match helpSectionDelim "^===.*===$" syn match helpSectionDelim "^===.*===$"
syn match helpSectionDelim "^---.*--$" syn match helpSectionDelim "^---.*--$"
if has("conceal") if has("conceal")

View File

@ -1,8 +1,9 @@
" Vim syntax file " Vim syntax file
" Language: none; used to see highlighting " Language: none; used to see highlighting
" Maintainer: Ronald Schild <rs@scutum.de> " Maintainer: Ronald Schild <rs@scutum.de>
" Last Change: 2017 Jul 28 " Last Change: 2019 Jun 06
" Version: 5.4n.1 " Version: 5.4n.1
" Additional Changes By: Lifepillar, Bram
" To see your current highlight settings, do " To see your current highlight settings, do
" :so $VIMRUNTIME/syntax/hitest.vim " :so $VIMRUNTIME/syntax/hitest.vim
@ -12,6 +13,7 @@ let s:hidden = &hidden
let s:lazyredraw = &lazyredraw let s:lazyredraw = &lazyredraw
let s:more = &more let s:more = &more
let s:report = &report let s:report = &report
let s:whichwrap = &whichwrap
let s:shortmess = &shortmess let s:shortmess = &shortmess
let s:wrapscan = &wrapscan let s:wrapscan = &wrapscan
let s:register_a = @a let s:register_a = @a
@ -19,10 +21,11 @@ let s:register_se = @/
" set global options " set global options
set hidden lazyredraw nomore report=99999 shortmess=aoOstTW wrapscan set hidden lazyredraw nomore report=99999 shortmess=aoOstTW wrapscan
set whichwrap&
" print current highlight settings into register a " print current highlight settings into register a
redir @a redir @a
highlight silent highlight
redir END redir END
" Open a new window if the current one isn't empty " Open a new window if the current one isn't empty
@ -34,25 +37,32 @@ endif
edit Highlight\ test edit Highlight\ test
" set local options " set local options
setlocal autoindent noexpandtab formatoptions=t shiftwidth=16 noswapfile tabstop=16 setlocal autoindent noexpandtab formatoptions=t shiftwidth=18 noswapfile tabstop=18
let &textwidth=&columns let &textwidth=&columns
" insert highlight settings " insert highlight settings
% delete % delete
put a put a
" remove cleared groups
silent! g/ cleared$/d
" remove the colored xxx items " remove the colored xxx items
g/xxx /s///e g/xxx /s///e
" remove color settings (not needed here) " remove color settings (not needed here)
global! /links to/ substitute /\s.*$//e global! /links to/ substitute /\s.*$//e
" Move split 'links to' lines to the same line
% substitute /^\(\w\+\)\n\s*\(links to.*\)/\1\t\2/e
" move linked groups to the end of file " move linked groups to the end of file
global /links to/ move $ global /links to/ move $
" move linked group names to the matching preferred groups " move linked group names to the matching preferred groups
" TODO: this fails if the group linked to isn't defined
% substitute /^\(\w\+\)\s*\(links to\)\s*\(\w\+\)$/\3\t\2 \1/e % substitute /^\(\w\+\)\s*\(links to\)\s*\(\w\+\)$/\3\t\2 \1/e
global /links to/ normal mz3ElD0#$p'zdd silent! global /links to/ normal mz3ElD0#$p'zdd
" delete empty lines " delete empty lines
global /^ *$/ delete global /^ *$/ delete
@ -124,6 +134,7 @@ let &lazyredraw = s:lazyredraw
let &more = s:more let &more = s:more
let &report = s:report let &report = s:report
let &shortmess = s:shortmess let &shortmess = s:shortmess
let &whichwrap = s:whichwrap
let &wrapscan = s:wrapscan let &wrapscan = s:wrapscan
let @a = s:register_a let @a = s:register_a
@ -133,6 +144,6 @@ let @/ = s:register_se
" remove variables " remove variables
unlet s:hidden s:lazyredraw s:more s:report s:shortmess unlet s:hidden s:lazyredraw s:more s:report s:shortmess
unlet s:wrapscan s:register_a s:register_se unlet s:whichwrap s:wrapscan s:register_a s:register_se
" vim: ts=8 " vim: ts=8

View File

@ -1,7 +1,8 @@
" Vim syntax file " Vim syntax file
" Language: JSON " Language: JSON
" Maintainer: Eli Parra <eli@elzr.com> " Maintainer: vacancy
" Last Change: 2014 Aug 23 " Previous Maintainer: Eli Parra <eli@elzr.com>
" Last Change: 2019 Jul 08
" Version: 0.12 " Version: 0.12
if !exists("main_syntax") if !exists("main_syntax")
@ -16,8 +17,19 @@ syntax match jsonNoise /\%(:\|,\)/
" NOTE that for the concealing to work your conceallevel should be set to 2 " NOTE that for the concealing to work your conceallevel should be set to 2
" Syntax: JSON Keywords
" Separated into a match and region because a region by itself is always greedy
syn match jsonKeywordMatch /"\([^"]\|\\\"\)\+"[[:blank:]\r\n]*\:/ contains=jsonKeyword
if has('conceal')
syn region jsonKeyword matchgroup=jsonQuote start=/"/ end=/"\ze[[:blank:]\r\n]*\:/ concealends contained
else
syn region jsonKeyword matchgroup=jsonQuote start=/"/ end=/"\ze[[:blank:]\r\n]*\:/ contained
endif
" Syntax: Strings " Syntax: Strings
" Separated into a match and region because a region by itself is always greedy " Separated into a match and region because a region by itself is always greedy
" Needs to come after keywords or else a json encoded string will break the
" syntax
syn match jsonStringMatch /"\([^"]\|\\\"\)\+"\ze[[:blank:]\r\n]*[,}\]]/ contains=jsonString syn match jsonStringMatch /"\([^"]\|\\\"\)\+"\ze[[:blank:]\r\n]*[,}\]]/ contains=jsonString
if has('conceal') if has('conceal')
syn region jsonString oneline matchgroup=jsonQuote start=/"/ skip=/\\\\\|\\"/ end=/"/ concealends contains=jsonEscape contained syn region jsonString oneline matchgroup=jsonQuote start=/"/ skip=/\\\\\|\\"/ end=/"/ concealends contains=jsonEscape contained
@ -28,14 +40,6 @@ endif
" Syntax: JSON does not allow strings with single quotes, unlike JavaScript. " Syntax: JSON does not allow strings with single quotes, unlike JavaScript.
syn region jsonStringSQError oneline start=+'+ skip=+\\\\\|\\"+ end=+'+ syn region jsonStringSQError oneline start=+'+ skip=+\\\\\|\\"+ end=+'+
" Syntax: JSON Keywords
" Separated into a match and region because a region by itself is always greedy
syn match jsonKeywordMatch /"\([^"]\|\\\"\)\+"[[:blank:]\r\n]*\:/ contains=jsonKeyword
if has('conceal')
syn region jsonKeyword matchgroup=jsonQuote start=/"/ end=/"\ze[[:blank:]\r\n]*\:/ concealends contained
else
syn region jsonKeyword matchgroup=jsonQuote start=/"/ end=/"\ze[[:blank:]\r\n]*\:/ contained
endif
" Syntax: Escape sequences " Syntax: Escape sequences
syn match jsonEscape "\\["\\/bfnrt]" contained syn match jsonEscape "\\["\\/bfnrt]" contained

View File

@ -4,9 +4,10 @@
" Credits: Preben 'Peppe' Guldberg <peppe-vim@wielders.org> " Credits: Preben 'Peppe' Guldberg <peppe-vim@wielders.org>
" Maurizio Tranchero - maurizio(.)tranchero(@)gmail(.)com " Maurizio Tranchero - maurizio(.)tranchero(@)gmail(.)com
" Original author: Mario Eusebio " Original author: Mario Eusebio
" Last Change: Mon Jan 23 2017 " Last Change: June 10 2019
" added support for cell mode " added highlight rule for double-quoted string literals
" Change History: " Change History:
" - double-quoted string literals added
" - now highlights cell-mode separator comments " - now highlights cell-mode separator comments
" - 'global' and 'persistent' keyword are now recognized " - 'global' and 'persistent' keyword are now recognized
@ -40,6 +41,7 @@ syn match matlabLineContinuation "\.\{3}"
" String " String
" MT_ADDON - added 'skip' in order to deal with 'tic' escaping sequence " MT_ADDON - added 'skip' in order to deal with 'tic' escaping sequence
syn region matlabString start=+'+ end=+'+ oneline skip=+''+ syn region matlabString start=+'+ end=+'+ oneline skip=+''+
syn region matlabStringArray start=+"+ end=+"+ oneline skip=+""+
" If you don't like tabs " If you don't like tabs
syn match matlabTab "\t" syn match matlabTab "\t"
@ -87,6 +89,7 @@ hi def link matlabExceptions Conditional
hi def link matlabRepeat Repeat hi def link matlabRepeat Repeat
hi def link matlabTodo Todo hi def link matlabTodo Todo
hi def link matlabString String hi def link matlabString String
hi def link matlabStringArray String
hi def link matlabDelimiter Identifier hi def link matlabDelimiter Identifier
hi def link matlabTransposeOther Identifier hi def link matlabTransposeOther Identifier
hi def link matlabNumber Number hi def link matlabNumber Number

View File

@ -4,10 +4,15 @@
" Maintainers: Markus Mottl <markus.mottl@gmail.com> " Maintainers: Markus Mottl <markus.mottl@gmail.com>
" Karl-Heinz Sylla <Karl-Heinz.Sylla@gmd.de> " Karl-Heinz Sylla <Karl-Heinz.Sylla@gmd.de>
" Issac Trotts <ijtrotts@ucdavis.edu> " Issac Trotts <ijtrotts@ucdavis.edu>
" URL: http://www.ocaml.info/vim/syntax/ocaml.vim " URL: https://github.com/rgrinberg/vim-ocaml
" Last Change: 2012 May 12 - Added Dominique Pellé's spell checking patch (MM) " Last Change:
" 2012 Feb 01 - Improved module path highlighting (MM) " 2018 Nov 08 - Improved highlighting of operators (Maëlan)
" 2010 Oct 11 - Added highlighting of lnot (MM, thanks to Erick Matsen) " 2018 Apr 22 - Improved support for PPX (Andrey Popp)
" 2018 Mar 16 - Remove raise, lnot and not from keywords (Étienne Millon, "copy")
" 2017 Apr 11 - Improved matching of negative numbers (MM)
" 2016 Mar 11 - Improved support for quoted strings (Glen Mével)
" 2015 Aug 13 - Allow apostrophes in identifiers (Jonathan Chan, Einar Lielmanis)
" 2015 Jun 17 - Added new "nonrec" keyword (MM)
" A minor patch was applied to the official version so that object/end " A minor patch was applied to the official version so that object/end
" can be distinguished from begin/end, which is used for indentation, " can be distinguished from begin/end, which is used for indentation,
@ -18,6 +23,9 @@ if exists("b:current_syntax") && b:current_syntax == "ocaml"
finish finish
endif endif
" ' can be used in OCaml identifiers
setlocal iskeyword+='
" OCaml is case sensitive. " OCaml is case sensitive.
syn case match syn case match
@ -28,7 +36,7 @@ syn match ocamlMethod "#"
syn match ocamlComment "^#!.*" contains=@Spell syn match ocamlComment "^#!.*" contains=@Spell
" Scripting directives " Scripting directives
syn match ocamlScript "^#\<\(quit\|labels\|warnings\|directory\|cd\|load\|use\|install_printer\|remove_printer\|require\|thread\|trace\|untrace\|untrace_all\|print_depth\|print_length\|camlp4o\)\>" syn match ocamlScript "^#\<\(quit\|labels\|warnings\|warn_error\|directory\|remove_directory\|cd\|load\|load_rec\|use\|mod_use\|install_printer\|remove_printer\|require\|list\|ppx\|principal\|predicates\|rectypes\|thread\|trace\|untrace\|untrace_all\|print_depth\|print_length\|camlp4o\|camlp4r\|topfind_log\|topfind_verbose\)\>"
" lowercase identifier - the standard way to match " lowercase identifier - the standard way to match
syn match ocamlLCIdentifier /\<\(\l\|_\)\(\w\|'\)*\>/ syn match ocamlLCIdentifier /\<\(\l\|_\)\(\w\|'\)*\>/
@ -66,7 +74,7 @@ syn cluster ocamlAllErrs contains=ocamlBraceErr,ocamlBrackErr,ocamlParenErr,oca
syn cluster ocamlAENoParen contains=ocamlBraceErr,ocamlBrackErr,ocamlCommentErr,ocamlCountErr,ocamlDoErr,ocamlDoneErr,ocamlEndErr,ocamlThenErr syn cluster ocamlAENoParen contains=ocamlBraceErr,ocamlBrackErr,ocamlCommentErr,ocamlCountErr,ocamlDoErr,ocamlDoneErr,ocamlEndErr,ocamlThenErr
syn cluster ocamlContained contains=ocamlTodo,ocamlPreDef,ocamlModParam,ocamlModParam1,ocamlPreMPRestr,ocamlMPRestr,ocamlMPRestr1,ocamlMPRestr2,ocamlMPRestr3,ocamlModRHS,ocamlFuncWith,ocamlFuncStruct,ocamlModTypeRestr,ocamlModTRWith,ocamlWith,ocamlWithRest,ocamlModType,ocamlFullMod,ocamlVal syn cluster ocamlContained contains=ocamlTodo,ocamlPreDef,ocamlModParam,ocamlModParam1,ocamlMPRestr,ocamlMPRestr1,ocamlMPRestr2,ocamlMPRestr3,ocamlModRHS,ocamlFuncWith,ocamlFuncStruct,ocamlModTypeRestr,ocamlModTRWith,ocamlWith,ocamlWithRest,ocamlModType,ocamlFullMod,ocamlVal
" Enclosing delimiters " Enclosing delimiters
@ -103,11 +111,15 @@ endif
" "if" " "if"
syn region ocamlNone matchgroup=ocamlKeyword start="\<if\>" matchgroup=ocamlKeyword end="\<then\>" contains=ALLBUT,@ocamlContained,ocamlThenErr syn region ocamlNone matchgroup=ocamlKeyword start="\<if\>" matchgroup=ocamlKeyword end="\<then\>" contains=ALLBUT,@ocamlContained,ocamlThenErr
"" PPX nodes
syn match ocamlPpxIdentifier /\(\[@\{1,3\}\)\@<=\w\+\(\.\w\+\)*/
syn region ocamlPpx matchgroup=ocamlPpxEncl start="\[@\{1,3\}" contains=TOP end="\]"
"" Modules "" Modules
" "sig" " "sig"
syn region ocamlSig matchgroup=ocamlModule start="\<sig\>" matchgroup=ocamlModule end="\<end\>" contains=ALLBUT,@ocamlContained,ocamlEndErr,ocamlModule syn region ocamlSig matchgroup=ocamlSigEncl start="\<sig\>" matchgroup=ocamlSigEncl end="\<end\>" contains=ALLBUT,@ocamlContained,ocamlEndErr,ocamlModule
syn region ocamlModSpec matchgroup=ocamlKeyword start="\<module\>" matchgroup=ocamlModule end="\<\u\(\w\|'\)*\>" contained contains=@ocamlAllErrs,ocamlComment skipwhite skipempty nextgroup=ocamlModTRWith,ocamlMPRestr syn region ocamlModSpec matchgroup=ocamlKeyword start="\<module\>" matchgroup=ocamlModule end="\<\u\(\w\|'\)*\>" contained contains=@ocamlAllErrs,ocamlComment skipwhite skipempty nextgroup=ocamlModTRWith,ocamlMPRestr
" "open" " "open"
@ -118,15 +130,14 @@ syn match ocamlKeyword "\<include\>" skipwhite skipempty nextgroup=ocamlModPa
" "module" - somewhat complicated stuff ;-) " "module" - somewhat complicated stuff ;-)
syn region ocamlModule matchgroup=ocamlKeyword start="\<module\>" matchgroup=ocamlModule end="\<\u\(\w\|'\)*\>" contains=@ocamlAllErrs,ocamlComment skipwhite skipempty nextgroup=ocamlPreDef syn region ocamlModule matchgroup=ocamlKeyword start="\<module\>" matchgroup=ocamlModule end="\<\u\(\w\|'\)*\>" contains=@ocamlAllErrs,ocamlComment skipwhite skipempty nextgroup=ocamlPreDef
syn region ocamlPreDef start="."me=e-1 matchgroup=ocamlKeyword end="\l\|=\|)"me=e-1 contained contains=@ocamlAllErrs,ocamlComment,ocamlModParam,ocamlModTypeRestr,ocamlModTRWith nextgroup=ocamlModPreRHS syn region ocamlPreDef start="."me=e-1 matchgroup=ocamlKeyword end="\l\|=\|)"me=e-1 contained contains=@ocamlAllErrs,ocamlComment,ocamlModParam,ocamlGenMod,ocamlModTypeRestr,ocamlModTRWith nextgroup=ocamlModPreRHS
syn region ocamlModParam start="([^*]" end=")" contained contains=@ocamlAENoParen,ocamlModParam1,ocamlVal syn region ocamlModParam start="([^*]" end=")" contained contains=ocamlGenMod,ocamlModParam1,ocamlSig,ocamlVal
syn match ocamlModParam1 "\<\u\(\w\|'\)*\>" contained skipwhite skipempty nextgroup=ocamlPreMPRestr syn match ocamlModParam1 "\<\u\(\w\|'\)*\>" contained skipwhite skipempty
syn match ocamlGenMod "()" contained skipwhite skipempty
syn region ocamlPreMPRestr start="."me=e-1 end=")"me=e-1 contained contains=@ocamlAllErrs,ocamlComment,ocamlMPRestr,ocamlModTypeRestr
syn region ocamlMPRestr start=":" end="."me=e-1 contained contains=@ocamlComment skipwhite skipempty nextgroup=ocamlMPRestr1,ocamlMPRestr2,ocamlMPRestr3 syn region ocamlMPRestr start=":" end="."me=e-1 contained contains=@ocamlComment skipwhite skipempty nextgroup=ocamlMPRestr1,ocamlMPRestr2,ocamlMPRestr3
syn region ocamlMPRestr1 matchgroup=ocamlModule start="\ssig\s\=" matchgroup=ocamlModule end="\<end\>" contained contains=ALLBUT,@ocamlContained,ocamlEndErr,ocamlModule syn region ocamlMPRestr1 matchgroup=ocamlSigEncl start="\ssig\s\=" matchgroup=ocamlSigEncl end="\<end\>" contained contains=ALLBUT,@ocamlContained,ocamlEndErr,ocamlModule
syn region ocamlMPRestr2 start="\sfunctor\(\s\|(\)\="me=e-1 matchgroup=ocamlKeyword end="->" contained contains=@ocamlAllErrs,ocamlComment,ocamlModParam skipwhite skipempty nextgroup=ocamlFuncWith,ocamlMPRestr2 syn region ocamlMPRestr2 start="\sfunctor\(\s\|(\)\="me=e-1 matchgroup=ocamlKeyword end="->" contained contains=@ocamlAllErrs,ocamlComment,ocamlModParam,ocamlGenMod skipwhite skipempty nextgroup=ocamlFuncWith,ocamlMPRestr2
syn match ocamlMPRestr3 "\w\(\w\|'\)*\( *\. *\w\(\w\|'\)*\)*" contained syn match ocamlMPRestr3 "\w\(\w\|'\)*\( *\. *\w\(\w\|'\)*\)*" contained
syn match ocamlModPreRHS "=" contained skipwhite skipempty nextgroup=ocamlModParam,ocamlFullMod syn match ocamlModPreRHS "=" contained skipwhite skipempty nextgroup=ocamlModParam,ocamlFullMod
syn keyword ocamlKeyword val syn keyword ocamlKeyword val
@ -134,8 +145,8 @@ syn region ocamlVal matchgroup=ocamlKeyword start="\<val\>" matchgroup=ocamlLC
syn region ocamlModRHS start="." end=". *\w\|([^*]"me=e-2 contained contains=ocamlComment skipwhite skipempty nextgroup=ocamlModParam,ocamlFullMod syn region ocamlModRHS start="." end=". *\w\|([^*]"me=e-2 contained contains=ocamlComment skipwhite skipempty nextgroup=ocamlModParam,ocamlFullMod
syn match ocamlFullMod "\<\u\(\w\|'\)*\( *\. *\u\(\w\|'\)*\)*" contained skipwhite skipempty nextgroup=ocamlFuncWith syn match ocamlFullMod "\<\u\(\w\|'\)*\( *\. *\u\(\w\|'\)*\)*" contained skipwhite skipempty nextgroup=ocamlFuncWith
syn region ocamlFuncWith start="([^*]"me=e-1 end=")" contained contains=ocamlComment,ocamlWith,ocamlFuncStruct skipwhite skipempty nextgroup=ocamlFuncWith syn region ocamlFuncWith start="([^*)]"me=e-1 end=")" contained contains=ocamlComment,ocamlWith,ocamlFuncStruct skipwhite skipempty nextgroup=ocamlFuncWith
syn region ocamlFuncStruct matchgroup=ocamlModule start="[^a-zA-Z]struct\>"hs=s+1 matchgroup=ocamlModule end="\<end\>" contains=ALLBUT,@ocamlContained,ocamlEndErr syn region ocamlFuncStruct matchgroup=ocamlStructEncl start="[^a-zA-Z]struct\>"hs=s+1 matchgroup=ocamlStructEncl end="\<end\>" contains=ALLBUT,@ocamlContained,ocamlEndErr
syn match ocamlModTypeRestr "\<\w\(\w\|'\)*\( *\. *\w\(\w\|'\)*\)*\>" contained syn match ocamlModTypeRestr "\<\w\(\w\|'\)*\( *\. *\w\(\w\|'\)*\)*\>" contained
syn region ocamlModTRWith start=":\s*("hs=s+1 end=")" contained contains=@ocamlAENoParen,ocamlWith syn region ocamlModTRWith start=":\s*("hs=s+1 end=")" contained contains=@ocamlAENoParen,ocamlWith
@ -143,20 +154,23 @@ syn match ocamlWith "\<\(\u\(\w\|'\)* *\. *\)*\w\(\w\|'\)*\>" contained skipw
syn region ocamlWithRest start="[^)]" end=")"me=e-1 contained contains=ALLBUT,@ocamlContained syn region ocamlWithRest start="[^)]" end=")"me=e-1 contained contains=ALLBUT,@ocamlContained
" "struct" " "struct"
syn region ocamlStruct matchgroup=ocamlModule start="\<\(module\s\+\)\=struct\>" matchgroup=ocamlModule end="\<end\>" contains=ALLBUT,@ocamlContained,ocamlEndErr syn region ocamlStruct matchgroup=ocamlStructEncl start="\<\(module\s\+\)\=struct\>" matchgroup=ocamlStructEncl end="\<end\>" contains=ALLBUT,@ocamlContained,ocamlEndErr
" "module type" " "module type"
syn region ocamlKeyword start="\<module\>\s*\<type\>\(\s*\<of\>\)\=" matchgroup=ocamlModule end="\<\w\(\w\|'\)*\>" contains=ocamlComment skipwhite skipempty nextgroup=ocamlMTDef syn region ocamlKeyword start="\<module\>\s*\<type\>\(\s*\<of\>\)\=" matchgroup=ocamlModule end="\<\w\(\w\|'\)*\>" contains=ocamlComment skipwhite skipempty nextgroup=ocamlMTDef
syn match ocamlMTDef "=\s*\w\(\w\|'\)*\>"hs=s+1,me=s+1 skipwhite skipempty nextgroup=ocamlFullMod syn match ocamlMTDef "=\s*\w\(\w\|'\)*\>"hs=s+1,me=s+1 skipwhite skipempty nextgroup=ocamlFullMod
" Quoted strings
syn region ocamlString matchgroup=ocamlQuotedStringDelim start="{\z\([a-z_]*\)|" end="|\z1}" contains=@Spell
syn keyword ocamlKeyword and as assert class syn keyword ocamlKeyword and as assert class
syn keyword ocamlKeyword constraint else syn keyword ocamlKeyword constraint else
syn keyword ocamlKeyword exception external fun syn keyword ocamlKeyword exception external fun
syn keyword ocamlKeyword in inherit initializer syn keyword ocamlKeyword in inherit initializer
syn keyword ocamlKeyword land lazy let match syn keyword ocamlKeyword lazy let match
syn keyword ocamlKeyword method mutable new of syn keyword ocamlKeyword method mutable new nonrec of
syn keyword ocamlKeyword parser private raise rec syn keyword ocamlKeyword parser private rec
syn keyword ocamlKeyword try type syn keyword ocamlKeyword try type
syn keyword ocamlKeyword virtual when while with syn keyword ocamlKeyword virtual when while with
@ -166,14 +180,11 @@ if exists("ocaml_revised")
else else
syn keyword ocamlKeyword function syn keyword ocamlKeyword function
syn keyword ocamlBoolean true false syn keyword ocamlBoolean true false
syn match ocamlKeyChar "!"
endif endif
syn keyword ocamlType array bool char exn float format format4 syn keyword ocamlType array bool char exn float format format4
syn keyword ocamlType int int32 int64 lazy_t list nativeint option syn keyword ocamlType int int32 int64 lazy_t list nativeint option
syn keyword ocamlType string unit syn keyword ocamlType bytes string unit
syn keyword ocamlOperator asr lnot lor lsl lsr lxor mod not
syn match ocamlConstructor "(\s*)" syn match ocamlConstructor "(\s*)"
syn match ocamlConstructor "\[\s*\]" syn match ocamlConstructor "\[\s*\]"
@ -193,39 +204,61 @@ syn match ocamlCharErr "'\\\d\d'\|'\\\d'"
syn match ocamlCharErr "'\\[^\'ntbr]'" syn match ocamlCharErr "'\\[^\'ntbr]'"
syn region ocamlString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell syn region ocamlString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell
syn match ocamlFunDef "->"
syn match ocamlRefAssign ":="
syn match ocamlTopStop ";;" syn match ocamlTopStop ";;"
syn match ocamlOperator "\^"
syn match ocamlOperator "::"
syn match ocamlOperator "&&"
syn match ocamlOperator "<"
syn match ocamlOperator ">"
syn match ocamlAnyVar "\<_\>" syn match ocamlAnyVar "\<_\>"
syn match ocamlKeyChar "|[^\]]"me=e-1 syn match ocamlKeyChar "|[^\]]"me=e-1
syn match ocamlKeyChar ";" syn match ocamlKeyChar ";"
syn match ocamlKeyChar "\~" syn match ocamlKeyChar "\~"
syn match ocamlKeyChar "?" syn match ocamlKeyChar "?"
syn match ocamlKeyChar "\*"
syn match ocamlKeyChar "="
"" Operators
" The grammar of operators is found there:
" https://caml.inria.fr/pub/docs/manual-ocaml/names.html#operator-name
" https://caml.inria.fr/pub/docs/manual-ocaml/extn.html#s:ext-ops
" https://caml.inria.fr/pub/docs/manual-ocaml/extn.html#s:index-operators
" =, *, < and > are both operator names and keywords, we let the user choose how
" to display them (has to be declared before regular infix operators):
syn match ocamlEqual "="
syn match ocamlStar "*"
syn match ocamlAngle "<"
syn match ocamlAngle ">"
" Custom indexing operators:
syn match ocamlIndexingOp "\.[~?!:|&$%=>@^/*+-][~?!.:|&$%<=>@^*/+-]*\(()\|\[]\|{}\)\(<-\)\?"
" Extension operators (has to be declared before regular infix operators):
syn match ocamlExtensionOp "#[#~?!.:|&$%<=>@^*/+-]\+"
" Infix and prefix operators:
syn match ocamlPrefixOp "![~?!.:|&$%<=>@^*/+-]*"
syn match ocamlPrefixOp "[~?][~?!.:|&$%<=>@^*/+-]\+"
syn match ocamlInfixOp "[&$%@^/+-][~?!.:|&$%<=>@^*/+-]*"
syn match ocamlInfixOp "[|<=>*][~?!.:|&$%<=>@^*/+-]\+"
syn match ocamlInfixOp "#[~?!.:|&$%<=>@^*/+-]\+#\@!"
syn match ocamlInfixOp "!=[~?!.:|&$%<=>@^*/+-]\@!"
syn keyword ocamlInfixOpKeyword asr land lor lsl lsr lxor mod or
" := is technically an infix operator, but we may want to show it as a keyword
" (somewhat analogously to = for letbindings and <- for assignations):
syn match ocamlRefAssign ":="
" :: is technically not an operator, but we may want to show it as such:
syn match ocamlCons "::"
" -> and <- are keywords, not operators (but can appear in longer operators):
syn match ocamlArrow "->[~?!.:|&$%<=>@^*/+-]\@!"
if exists("ocaml_revised") if exists("ocaml_revised")
syn match ocamlErr "<-" syn match ocamlErr "<-[~?!.:|&$%<=>@^*/+-]\@!"
else else
syn match ocamlOperator "<-" syn match ocamlKeyChar "<-[~?!.:|&$%<=>@^*/+-]\@!"
endif endif
syn match ocamlNumber "\<-\=\d\(_\|\d\)*[l|L|n]\?\>" syn match ocamlNumber "-\=\<\d\(_\|\d\)*[l|L|n]\?\>"
syn match ocamlNumber "\<-\=0[x|X]\(\x\|_\)\+[l|L|n]\?\>" syn match ocamlNumber "-\=\<0[x|X]\(\x\|_\)\+[l|L|n]\?\>"
syn match ocamlNumber "\<-\=0[o|O]\(\o\|_\)\+[l|L|n]\?\>" syn match ocamlNumber "-\=\<0[o|O]\(\o\|_\)\+[l|L|n]\?\>"
syn match ocamlNumber "\<-\=0[b|B]\([01]\|_\)\+[l|L|n]\?\>" syn match ocamlNumber "-\=\<0[b|B]\([01]\|_\)\+[l|L|n]\?\>"
syn match ocamlFloat "\<-\=\d\(_\|\d\)*\.\?\(_\|\d\)*\([eE][-+]\=\d\(_\|\d\)*\)\=\>" syn match ocamlFloat "-\=\<\d\(_\|\d\)*\.\?\(_\|\d\)*\([eE][-+]\=\d\(_\|\d\)*\)\=\>"
" Labels " Labels
syn match ocamlLabel "\~\(\l\|_\)\(\w\|'\)*"lc=1 syn match ocamlLabel "\~\(\l\|_\)\(\w\|'\)*"lc=1
syn match ocamlLabel "?\(\l\|_\)\(\w\|'\)*"lc=1 syn match ocamlLabel "?\(\l\|_\)\(\w\|'\)*"lc=1
syn region ocamlLabel transparent matchgroup=ocamlLabel start="?(\(\l\|_\)\(\w\|'\)*"lc=2 end=")"me=e-1 contains=ALLBUT,@ocamlContained,ocamlParenErr syn region ocamlLabel transparent matchgroup=ocamlLabel start="[~?](\(\l\|_\)\(\w\|'\)*"lc=2 end=")"me=e-1 contains=ALLBUT,@ocamlContained,ocamlParenErr
" Synchronization " Synchronization
@ -281,6 +314,8 @@ hi def link ocamlFullMod Include
hi def link ocamlModTypeRestr Include hi def link ocamlModTypeRestr Include
hi def link ocamlWith Include hi def link ocamlWith Include
hi def link ocamlMTDef Include hi def link ocamlMTDef Include
hi def link ocamlSigEncl ocamlModule
hi def link ocamlStructEncl ocamlModule
hi def link ocamlScript Include hi def link ocamlScript Include
@ -291,18 +326,34 @@ hi def link ocamlModPreRHS Keyword
hi def link ocamlMPRestr2 Keyword hi def link ocamlMPRestr2 Keyword
hi def link ocamlKeyword Keyword hi def link ocamlKeyword Keyword
hi def link ocamlMethod Include hi def link ocamlMethod Include
hi def link ocamlFunDef Keyword
hi def link ocamlRefAssign Keyword
hi def link ocamlKeyChar Keyword hi def link ocamlKeyChar Keyword
hi def link ocamlAnyVar Keyword hi def link ocamlAnyVar Keyword
hi def link ocamlTopStop Keyword hi def link ocamlTopStop Keyword
hi def link ocamlOperator Keyword
hi def link ocamlRefAssign ocamlKeyChar
hi def link ocamlEqual ocamlKeyChar
hi def link ocamlStar ocamlInfixOp
hi def link ocamlAngle ocamlInfixOp
hi def link ocamlCons ocamlInfixOp
hi def link ocamlPrefixOp ocamlOperator
hi def link ocamlInfixOp ocamlOperator
hi def link ocamlExtensionOp ocamlOperator
hi def link ocamlIndexingOp ocamlOperator
if exists("ocaml_highlight_operators")
hi def link ocamlInfixOpKeyword ocamlOperator
hi def link ocamlOperator Operator
else
hi def link ocamlInfixOpKeyword Keyword
endif
hi def link ocamlBoolean Boolean hi def link ocamlBoolean Boolean
hi def link ocamlCharacter Character hi def link ocamlCharacter Character
hi def link ocamlNumber Number hi def link ocamlNumber Number
hi def link ocamlFloat Float hi def link ocamlFloat Float
hi def link ocamlString String hi def link ocamlString String
hi def link ocamlQuotedStringDelim Identifier
hi def link ocamlLabel Identifier hi def link ocamlLabel Identifier
@ -312,6 +363,7 @@ hi def link ocamlTodo Todo
hi def link ocamlEncl Keyword hi def link ocamlEncl Keyword
hi def link ocamlPpxEncl ocamlEncl
let b:current_syntax = "ocaml" let b:current_syntax = "ocaml"

View File

@ -2,8 +2,8 @@
" Language: shell (sh) Korn shell (ksh) bash (sh) " Language: shell (sh) Korn shell (ksh) bash (sh)
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz> " Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
" Previous Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int> " Previous Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int>
" Last Change: Mar 26, 2019 " Last Change: Jun 16, 2019
" Version: 186 " Version: 188
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH
" For options and settings, please use: :help ft-sh-syntax " For options and settings, please use: :help ft-sh-syntax
" This file includes many ideas from Eric Brunet (eric.brunet@ens.fr) " This file includes many ideas from Eric Brunet (eric.brunet@ens.fr)
@ -381,22 +381,23 @@ syn match shBQComment contained "#.\{-}\ze`" contains=@shCommentGroup
" Here Documents: {{{1 " Here Documents: {{{1
" ========================================= " =========================================
" Note : shHereDoc0[137] only had shDblQuoteList contained
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc01 start="<<\s*\\\=\z([^ \t|>]\+\)" matchgroup=shHereDoc01 end="^\z1\s*$" contains=@shDblQuoteList 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([^"]\+\)\"" matchgroup=shHereDoc02 end="^\z1\s*$" ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc02 start="<<\s*\"\z([^"]\+\)\"" 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=shHereDoc03 start="<<-\s*\z([^ \t|>]\+\)" matchgroup=shHereDoc03 end="^\s*\z1\s*$" contains=@shDblQuoteList
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc04 start="<<-\s*'\z([^']\+\)'" matchgroup=shHereDoc04 end="^\s*\z1\s*$" ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc04 start="<<-\s*'\z([^']\+\)'" matchgroup=shHereDoc04 end="^\s*\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc05 start="<<\s*'\z([^']\+\)'" matchgroup=shHereDoc05 end="^\z1\s*$" ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc05 start="<<\s*'\z([^']\+\)'" matchgroup=shHereDoc05 end="^\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc06 start="<<-\s*\"\z([^"]\+\)\"" matchgroup=shHereDoc06 end="^\s*\z1\s*$" ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc06 start="<<-\s*\"\z([^"]\+\)\"" 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=shHereDoc07 start="<<\s*\\\_$\_s*\z([^ \t'"|>]\+\)" matchgroup=shHereDoc07 end="^\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc08 start="<<\s*\\\_$\_s*'\z([^ \t|>]\+\)'" matchgroup=shHereDoc08 end="^\z1\s*$" 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=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=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=shHereDoc11 start="<<-\s*\\\_$\_s*\\\z([^ \t|>]\+\)" matchgroup=shHereDoc11 end="^\s*\z1\s*$" contains=@shDblQuoteList
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc12 start="<<-\s*\\\_$\_s*'\z([^']\+\)'" matchgroup=shHereDoc12 end="^\s*\z1\s*$" ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc12 start="<<-\s*\\\_$\_s*'\z([^']\+\)'" matchgroup=shHereDoc12 end="^\s*\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc13 start="<<-\s*\\\_$\_s*\"\z([^"]\+\)\"" matchgroup=shHereDoc13 end="^\s*\z1\s*$" ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc13 start="<<-\s*\\\_$\_s*\"\z([^"]\+\)\"" 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=shHereDoc14 start="<<\\\z([^ \t|>]\+\)" matchgroup=shHereDoc14 end="^\z1\s*$" contains=@shDblQuoteList
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc15 start="<<-\s*\\\z([^ \t|>]\+\)" matchgroup=shHereDoc15 end="^\s*\z1\s*$" ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc15 start="<<-\s*\\\z([^ \t|>]\+\)" matchgroup=shHereDoc15 end="^\s*\z1\s*$" contains=@shDblQuoteList
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc16 start="<<-\s*\\\z([^ \t|>]\+\)" matchgroup=shHereDoc15 end="^\s*\z1\s*$" ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc16 start="<<-\s*\\\z([^ \t|>]\+\)" matchgroup=shHereDoc15 end="^\s*\z1\s*$" contains=@shDblQuoteList
" Here Strings: {{{1 " Here Strings: {{{1
" ============= " =============

View File

@ -6,8 +6,8 @@
" Contributor: Leonard Ehrenfried <leonard.ehrenfried@web.de> " Contributor: Leonard Ehrenfried <leonard.ehrenfried@web.de>
" Contributor: Karsten Hopp <karsten@redhat.com> " Contributor: Karsten Hopp <karsten@redhat.com>
" Originally: 2009-07-09 " Originally: 2009-07-09
" Last Change: 2017 Oct 25 " Last Change: 2019-05-31
" SSH Version: 7.6p1 " SSH Version: 7.9p1
" "
" Setup " Setup
@ -137,7 +137,8 @@ syn case ignore
" Keywords " Keywords
syn keyword sshdconfigMatch Host User Group Address " Also includes RDomain, but that is a keyword.
syn keyword sshdconfigMatch Host User Group Address LocalAddress LocalPort
syn keyword sshdconfigKeyword AcceptEnv syn keyword sshdconfigKeyword AcceptEnv
syn keyword sshdconfigKeyword AddressFamily syn keyword sshdconfigKeyword AddressFamily
@ -150,8 +151,11 @@ syn keyword sshdconfigKeyword AuthenticationMethods
syn keyword sshdconfigKeyword AuthorizedKeysFile syn keyword sshdconfigKeyword AuthorizedKeysFile
syn keyword sshdconfigKeyword AuthorizedKeysCommand syn keyword sshdconfigKeyword AuthorizedKeysCommand
syn keyword sshdconfigKeyword AuthorizedKeysCommandUser syn keyword sshdconfigKeyword AuthorizedKeysCommandUser
syn keyword sshdconfigKeyword AuthorizedPrincipalsCommand
syn keyword sshdconfigKeyword AuthorizedPrincipalsCommandUser
syn keyword sshdconfigKeyword AuthorizedPrincipalsFile syn keyword sshdconfigKeyword AuthorizedPrincipalsFile
syn keyword sshdconfigKeyword Banner syn keyword sshdconfigKeyword Banner
syn keyword sshdconfigKeyword CASignatureAlgorithms
syn keyword sshdconfigKeyword ChallengeResponseAuthentication syn keyword sshdconfigKeyword ChallengeResponseAuthentication
syn keyword sshdconfigKeyword ChrootDirectory syn keyword sshdconfigKeyword ChrootDirectory
syn keyword sshdconfigKeyword Ciphers syn keyword sshdconfigKeyword Ciphers
@ -162,13 +166,17 @@ syn keyword sshdconfigKeyword DebianBanner
syn keyword sshdconfigKeyword DenyGroups syn keyword sshdconfigKeyword DenyGroups
syn keyword sshdconfigKeyword DenyUsers syn keyword sshdconfigKeyword DenyUsers
syn keyword sshdconfigKeyword DisableForwarding syn keyword sshdconfigKeyword DisableForwarding
syn keyword sshdconfigKeyword ExposeAuthInfo
syn keyword sshdconfigKeyword FingerprintHash
syn keyword sshdconfigKeyword ForceCommand syn keyword sshdconfigKeyword ForceCommand
syn keyword sshdconfigKeyword GatewayPorts
syn keyword sshdconfigKeyword GSSAPIAuthentication syn keyword sshdconfigKeyword GSSAPIAuthentication
syn keyword sshdconfigKeyword GSSAPICleanupCredentials syn keyword sshdconfigKeyword GSSAPICleanupCredentials
syn keyword sshdconfigKeyword GSSAPIEnablek5users
syn keyword sshdconfigKeyword GSSAPIKeyExchange syn keyword sshdconfigKeyword GSSAPIKeyExchange
syn keyword sshdconfigKeyword GSSAPIKexAlgorithms
syn keyword sshdconfigKeyword GSSAPIStoreCredentialsOnRekey syn keyword sshdconfigKeyword GSSAPIStoreCredentialsOnRekey
syn keyword sshdconfigKeyword GSSAPIStrictAcceptorCheck syn keyword sshdconfigKeyword GSSAPIStrictAcceptorCheck
syn keyword sshdconfigKeyword GatewayPorts
syn keyword sshdconfigKeyword HostCertificate syn keyword sshdconfigKeyword HostCertificate
syn keyword sshdconfigKeyword HostKey syn keyword sshdconfigKeyword HostKey
syn keyword sshdconfigKeyword HostKeyAgent syn keyword sshdconfigKeyword HostKeyAgent
@ -184,6 +192,8 @@ syn keyword sshdconfigKeyword KerberosAuthentication
syn keyword sshdconfigKeyword KerberosGetAFSToken syn keyword sshdconfigKeyword KerberosGetAFSToken
syn keyword sshdconfigKeyword KerberosOrLocalPasswd syn keyword sshdconfigKeyword KerberosOrLocalPasswd
syn keyword sshdconfigKeyword KerberosTicketCleanup syn keyword sshdconfigKeyword KerberosTicketCleanup
syn keyword sshdconfigKeyword KerberosUniqueCCache
syn keyword sshdconfigKeyword KerberosUseKuserok
syn keyword sshdconfigKeyword KexAlgorithms syn keyword sshdconfigKeyword KexAlgorithms
syn keyword sshdconfigKeyword KeyRegenerationInterval syn keyword sshdconfigKeyword KeyRegenerationInterval
syn keyword sshdconfigKeyword ListenAddress syn keyword sshdconfigKeyword ListenAddress
@ -197,6 +207,7 @@ syn keyword sshdconfigKeyword MaxStartups
syn keyword sshdconfigKeyword PasswordAuthentication syn keyword sshdconfigKeyword PasswordAuthentication
syn keyword sshdconfigKeyword PermitBlacklistedKeys syn keyword sshdconfigKeyword PermitBlacklistedKeys
syn keyword sshdconfigKeyword PermitEmptyPasswords syn keyword sshdconfigKeyword PermitEmptyPasswords
syn keyword sshdconfigKeyword PermitListen
syn keyword sshdconfigKeyword PermitOpen syn keyword sshdconfigKeyword PermitOpen
syn keyword sshdconfigKeyword PermitRootLogin syn keyword sshdconfigKeyword PermitRootLogin
syn keyword sshdconfigKeyword PermitTTY syn keyword sshdconfigKeyword PermitTTY
@ -213,10 +224,14 @@ syn keyword sshdconfigKeyword PubkeyAuthentication
syn keyword sshdconfigKeyword RSAAuthentication syn keyword sshdconfigKeyword RSAAuthentication
syn keyword sshdconfigKeyword RekeyLimit syn keyword sshdconfigKeyword RekeyLimit
syn keyword sshdconfigKeyword RevokedKeys syn keyword sshdconfigKeyword RevokedKeys
syn keyword sshdconfigKeyword RDomain
syn keyword sshdconfigKeyword RhostsRSAAuthentication syn keyword sshdconfigKeyword RhostsRSAAuthentication
syn keyword sshdconfigKeyword ServerKeyBits syn keyword sshdconfigKeyword ServerKeyBits
syn keyword sshdconfigKeyword SetEnv
syn keyword sshdconfigKeyword ShowPatchLevel syn keyword sshdconfigKeyword ShowPatchLevel
syn keyword sshdconfigKeyword StrictModes syn keyword sshdconfigKeyword StrictModes
syn keyword sshdconfigKeyword StreamLocalBindMask
syn keyword sshdconfigKeyword StreamLocalBindUnlink
syn keyword sshdconfigKeyword Subsystem syn keyword sshdconfigKeyword Subsystem
syn keyword sshdconfigKeyword SyslogFacility syn keyword sshdconfigKeyword SyslogFacility
syn keyword sshdconfigKeyword TCPKeepAlive syn keyword sshdconfigKeyword TCPKeepAlive
@ -227,6 +242,7 @@ syn keyword sshdconfigKeyword UsePAM
syn keyword sshdconfigKeyword VersionAddendum syn keyword sshdconfigKeyword VersionAddendum
syn keyword sshdconfigKeyword X11DisplayOffset syn keyword sshdconfigKeyword X11DisplayOffset
syn keyword sshdconfigKeyword X11Forwarding syn keyword sshdconfigKeyword X11Forwarding
syn keyword sshdconfigKeyword X11MaxDisplays
syn keyword sshdconfigKeyword X11UseLocalhost syn keyword sshdconfigKeyword X11UseLocalhost
syn keyword sshdconfigKeyword XAuthLocation syn keyword sshdconfigKeyword XAuthLocation

View File

@ -1,8 +1,8 @@
" Vim syntax file " Vim syntax file
" Language: TeX " Language: TeX
" Maintainer: Charles E. Campbell <NdrchipO@ScampbellPfamily.AbizM> " Maintainer: Charles E. Campbell <NdrchipO@ScampbellPfamily.AbizM>
" Last Change: Apr 01, 2019 " Last Change: May 14, 2019
" Version: 113 " Version: 114
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX
" "
" Notes: {{{1 " Notes: {{{1
@ -947,6 +947,7 @@ if has("conceal") && &enc == 'utf-8'
call s:Greek('texGreek','\\eta\>' ,'η') call s:Greek('texGreek','\\eta\>' ,'η')
call s:Greek('texGreek','\\theta\>' ,'θ') call s:Greek('texGreek','\\theta\>' ,'θ')
call s:Greek('texGreek','\\vartheta\>' ,'ϑ') call s:Greek('texGreek','\\vartheta\>' ,'ϑ')
call s:Greek('texGreek','\\iota\>' ,'ι')
call s:Greek('texGreek','\\kappa\>' ,'κ') call s:Greek('texGreek','\\kappa\>' ,'κ')
call s:Greek('texGreek','\\lambda\>' ,'λ') call s:Greek('texGreek','\\lambda\>' ,'λ')
call s:Greek('texGreek','\\mu\>' ,'μ') call s:Greek('texGreek','\\mu\>' ,'μ')
@ -969,11 +970,12 @@ if has("conceal") && &enc == 'utf-8'
call s:Greek('texGreek','\\Delta\>' ,'Δ') call s:Greek('texGreek','\\Delta\>' ,'Δ')
call s:Greek('texGreek','\\Theta\>' ,'Θ') call s:Greek('texGreek','\\Theta\>' ,'Θ')
call s:Greek('texGreek','\\Lambda\>' ,'Λ') call s:Greek('texGreek','\\Lambda\>' ,'Λ')
call s:Greek('texGreek','\\Xi\>' ,'Χ') call s:Greek('texGreek','\\Xi\>' ,'Ξ')
call s:Greek('texGreek','\\Pi\>' ,'Π') call s:Greek('texGreek','\\Pi\>' ,'Π')
call s:Greek('texGreek','\\Sigma\>' ,'Σ') call s:Greek('texGreek','\\Sigma\>' ,'Σ')
call s:Greek('texGreek','\\Upsilon\>' ,'Υ') call s:Greek('texGreek','\\Upsilon\>' ,'Υ')
call s:Greek('texGreek','\\Phi\>' ,'Φ') call s:Greek('texGreek','\\Phi\>' ,'Φ')
call s:Greek('texGreek','\\Chi\>' ,'Χ')
call s:Greek('texGreek','\\Psi\>' ,'Ψ') call s:Greek('texGreek','\\Psi\>' ,'Ψ')
call s:Greek('texGreek','\\Omega\>' ,'Ω') call s:Greek('texGreek','\\Omega\>' ,'Ω')
delfun s:Greek delfun s:Greek

View File

@ -1,5 +1,5 @@
" Language: tmux(1) configuration file " Language: tmux(1) configuration file
" Version: 2.7 (git-e4e060f2) " Version: 2.9a (git-0d64531f)
" URL: https://github.com/ericpruitt/tmux.vim/ " URL: https://github.com/ericpruitt/tmux.vim/
" Maintainer: Eric Pruitt <eric.pruitt@gmail.com> " Maintainer: Eric Pruitt <eric.pruitt@gmail.com>
" License: 2-Clause BSD (http://opensource.org/licenses/BSD-2-Clause) " License: 2-Clause BSD (http://opensource.org/licenses/BSD-2-Clause)
@ -64,60 +64,51 @@ endfor
syn keyword tmuxOptions syn keyword tmuxOptions
\ buffer-limit command-alias default-terminal escape-time exit-empty \ buffer-limit command-alias default-terminal escape-time exit-empty
\ activity-action assume-paste-time base-index bell-action default-command \ activity-action assume-paste-time base-index bell-action default-command
\ default-shell destroy-unattached detach-on-destroy \ default-shell default-size destroy-unattached detach-on-destroy
\ display-panes-active-colour display-panes-colour display-panes-time \ display-panes-active-colour display-panes-colour display-panes-time
\ display-time exit-unattached focus-events history-file history-limit \ display-time exit-unattached focus-events history-file history-limit
\ key-table lock-after-time lock-command message-attr message-bg \ key-table lock-after-time lock-command message-command-style message-limit
\ message-command-attr message-command-bg message-command-fg \ message-style mouse aggressive-resize allow-rename alternate-screen
\ message-command-style message-fg message-limit message-style mouse \ automatic-rename automatic-rename-format clock-mode-colour
\ aggressive-resize allow-rename alternate-screen automatic-rename \ clock-mode-style main-pane-height main-pane-width mode-keys mode-style
\ automatic-rename-format clock-mode-colour clock-mode-style force-height \ monitor-activity monitor-bell monitor-silence other-pane-height
\ force-width main-pane-height main-pane-width mode-attr mode-bg mode-fg \ other-pane-width pane-active-border-style pane-base-index
\ mode-keys mode-style monitor-activity monitor-bell monitor-silence \ pane-border-format pane-border-status pane-border-style prefix prefix2
\ other-pane-height other-pane-width pane-active-border-bg \ remain-on-exit renumber-windows repeat-time set-clipboard set-titles
\ pane-active-border-fg pane-active-border-style pane-base-index \ set-titles-string silence-action status status-bg status-fg status-format
\ pane-border-bg pane-border-fg pane-border-format pane-border-status \ status-interval status-justify status-keys status-left status-left-length
\ pane-border-style prefix prefix2 remain-on-exit renumber-windows \ status-left-style status-position status-right status-right-length
\ repeat-time set-clipboard set-titles set-titles-string silence-action
\ status status-attr status-bg status-fg status-interval status-justify
\ status-keys status-left status-left-attr status-left-bg status-left-fg
\ status-left-length status-left-style status-position status-right
\ status-right-attr status-right-bg status-right-fg status-right-length
\ status-right-style status-style synchronize-panes terminal-overrides \ status-right-style status-style synchronize-panes terminal-overrides
\ update-environment user-keys visual-activity visual-bell visual-silence \ update-environment user-keys visual-activity visual-bell visual-silence
\ window-active-style window-status-activity-attr window-status-activity-bg \ window-active-style window-size window-status-activity-style
\ window-status-activity-fg window-status-activity-style window-status-attr \ window-status-bell-style window-status-current-format
\ window-status-bell-attr window-status-bell-bg window-status-bell-fg \ window-status-current-style window-status-format window-status-last-style
\ window-status-bell-style window-status-bg window-status-current-attr \ window-status-separator window-status-style window-style word-separators
\ window-status-current-bg window-status-current-fg \ wrap-search xterm-keys
\ window-status-current-format window-status-current-style window-status-fg
\ window-status-format window-status-last-attr window-status-last-bg
\ window-status-last-fg window-status-last-style window-status-separator
\ window-status-style window-style word-separators wrap-search xterm-keys
syn keyword tmuxCommands syn keyword tmuxCommands
\ attach attach-session bind bind-key break-pane breakp capture-pane \ attach attach-session bind bind-key break-pane breakp capture-pane
\ capturep choose-buffer choose-client choose-tree clear-history clearhist \ capturep choose-buffer choose-client choose-tree clear-history clearhist
\ clock-mode command-prompt confirm confirm-before copy-mode detach \ clock-mode command-prompt confirm confirm-before copy-mode detach
\ detach-client display display-message display-panes displayp find-window \ detach-client display display-menu display-message display-panes displayp
\ findw if if-shell join-pane joinp kill-pane kill-server kill-session \ find-window findw if if-shell join-pane joinp kill-pane kill-server
\ kill-window killp has-session has killw link-window linkw list-buffers \ kill-session kill-window killp has-session has killw link-window linkw
\ list-clients list-commands list-keys list-panes list-sessions list-windows \ list-buffers list-clients list-commands list-keys list-panes list-sessions
\ load-buffer loadb lock lock-client lock-server lock-session last-pane \ list-windows load-buffer loadb lock lock-client lock-server lock-session
\ lastp lockc locks last-window last ls lsb delete-buffer deleteb lsc lscm \ lockc last-pane lastp locks ls last-window last lsb lsc delete-buffer
\ lsk lsp lsw move-pane move-window movep movew new new-session new-window \ deleteb lscm lsk lsp lsw menu move-pane move-window movep movew new
\ neww next next-layout next-window nextl paste-buffer pasteb pipe-pane \ new-session new-window neww next next-layout next-window nextl
\ pipep prev previous-layout previous-window prevl refresh refresh-client \ paste-buffer pasteb pipe-pane pipep prev previous-layout previous-window
\ rename rename-session rename-window renamew resize-pane resizep \ prevl refresh refresh-client rename rename-session rename-window renamew
\ respawn-pane respawn-window respawnp respawnw rotate-window rotatew run \ resize-pane resize-window resizep resizew respawn-pane respawn-window
\ run-shell save-buffer saveb select-layout select-pane select-window \ respawnp respawnw rotate-window rotatew run run-shell save-buffer saveb
\ selectl selectp selectw send send-keys send-prefix set set-buffer \ select-layout select-pane select-window selectl selectp selectw send
\ set-environment set-hook set-option set-window-option setb setenv setw \ send-keys send-prefix set set-buffer set-environment set-hook set-option
\ show show-buffer show-environment show-hooks show-messages show-options \ set-window-option setb setenv setw show show-buffer show-environment
\ show-window-options showb showenv showmsgs showw source source-file \ show-hooks show-messages show-options show-window-options showb showenv
\ split-window splitw start start-server suspend-client suspendc swap-pane \ showmsgs showw source source-file split-window splitw start start-server
\ swap-window swapp swapw switch-client switchc unbind unbind-key \ suspend-client suspendc swap-pane swap-window swapp swapw switch-client
\ unlink-window unlinkw wait wait-for \ switchc unbind unbind-key unlink-window unlinkw wait wait-for
let &cpo = s:original_cpo let &cpo = s:original_cpo
unlet! s:original_cpo s:bg s:i unlet! s:original_cpo s:bg s:i

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,8 @@
" Vim syntax file " Vim syntax file
" Language: Vim 8.0 script " Language: Vim 8.0 script
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz> " Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
" Last Change: Mar 08, 2019 " Last Change: Jun 16, 2019
" Version: 8.0-21 " Version: 8.0-22
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_VIM " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_VIM
" Automatically generated keyword lists: {{{1 " Automatically generated keyword lists: {{{1
@ -23,8 +23,8 @@ syn keyword vimCommand contained a arga[dd] argu[ment] bad[d] bn[ext] breakd[el]
syn keyword vimCommand contained ab argd[elete] as[cii] bd[elete] bo[tright] breakl[ist] cN[ext] caddf[ile] ccl[ose] cfdo chd[ir] cle[arjumps] co[py] con[tinue] cr[ewind] d[elete] deletel delm[arks] diffo[ff] dir dp earlier elsei[f] endw[hile] files fini[sh] folddoc[losed] gr[ep] helpc[lose] his[tory] il[ist] iuna[bbrev] keepalt la[st] later lcs lf[ile] lgr[ep] lli[st] lo[adview] lop[en] lua m[ove] mes mkvie[w] nbc[lose] noautocmd nu[mber] opt[ions] pc[lose] popu[p] prof[ile] ptN[ext] ptn[ext] pw[d] pyf[ile] pyxfile rec[over] reg[isters] ri[ght] rubyf[ile] sIe sIr sav[eas] sbl[ast] sc scl scscope sf[ind] sge sgr sig sip sm[ap] sno[magic] sp[lit] spellu[ndo] src srn startg[replace] sun[hide] sw[apname] syntime tabN[ext] tabfir[st] tabo[nly] tc[l] tf[irst] tma[p] tp[revious] tunma[p] unh[ide] v vie[w] vne[w] wh[ile] wn[ext] wundo xme xunme syn keyword vimCommand contained ab argd[elete] as[cii] bd[elete] bo[tright] breakl[ist] cN[ext] caddf[ile] ccl[ose] cfdo chd[ir] cle[arjumps] co[py] con[tinue] cr[ewind] d[elete] deletel delm[arks] diffo[ff] dir dp earlier elsei[f] endw[hile] files fini[sh] folddoc[losed] gr[ep] helpc[lose] his[tory] il[ist] iuna[bbrev] keepalt la[st] later lcs lf[ile] lgr[ep] lli[st] lo[adview] lop[en] lua m[ove] mes mkvie[w] nbc[lose] noautocmd nu[mber] opt[ions] pc[lose] popu[p] prof[ile] ptN[ext] ptn[ext] pw[d] pyf[ile] pyxfile rec[over] reg[isters] ri[ght] rubyf[ile] sIe sIr sav[eas] sbl[ast] sc scl scscope sf[ind] sge sgr sig sip sm[ap] sno[magic] sp[lit] spellu[ndo] src srn startg[replace] sun[hide] sw[apname] syntime tabN[ext] tabfir[st] tabo[nly] tc[l] tf[irst] tma[p] tp[revious] tunma[p] unh[ide] v vie[w] vne[w] wh[ile] wn[ext] wundo xme xunme
syn keyword vimCommand contained abc[lear] argdo au bel[owright] bp[revious] bro[wse] cNf[ile] cal[l] cd cfir[st] che[ckpath] clo[se] col[der] conf[irm] cs debug deletep delp diffp[atch] dj[ump] dr[op] ec em[enu] ene[w] filet fir[st] foldo[pen] grepa[dd] helpf[ind] i imapc[lear] j[oin] keepj[umps] lad[dexpr] lb[uffer] lcscope lfdo lgrepa[dd] lmak[e] loadk lp[revious] luado ma[rk] messages mod[e] nbs[tart] noh[lsearch] o[pen] ownsyntax pe[rl] pp[op] profd[el] pta[g] ptp[revious] py3 python3 q[uit] red[o] res[ize] rightb[elow] rundo sIg sN[ext] sbN[ext] sbm[odified] scI scp se[t] sfir[st] sgi sh[ell] sign sir sme snoreme spe[llgood] spellw[rong] sre[wind] srp startr[eplace] sunme sy t tabc[lose] tabl[ast] tabp[revious] tcld[o] th[row] tmapc[lear] tr[ewind] u[ndo] unl ve[rsion] vim[grep] vs[plit] win[size] wp[revious] wv[iminfo] xmenu xunmenu syn keyword vimCommand contained abc[lear] argdo au bel[owright] bp[revious] bro[wse] cNf[ile] cal[l] cd cfir[st] che[ckpath] clo[se] col[der] conf[irm] cs debug deletep delp diffp[atch] dj[ump] dr[op] ec em[enu] ene[w] filet fir[st] foldo[pen] grepa[dd] helpf[ind] i imapc[lear] j[oin] keepj[umps] lad[dexpr] lb[uffer] lcscope lfdo lgrepa[dd] lmak[e] loadk lp[revious] luado ma[rk] messages mod[e] nbs[tart] noh[lsearch] o[pen] ownsyntax pe[rl] pp[op] profd[el] pta[g] ptp[revious] py3 python3 q[uit] red[o] res[ize] rightb[elow] rundo sIg sN[ext] sbN[ext] sbm[odified] scI scp se[t] sfir[st] sgi sh[ell] sign sir sme snoreme spe[llgood] spellw[rong] sre[wind] srp startr[eplace] sunme sy t tabc[lose] tabl[ast] tabp[revious] tcld[o] th[row] tmapc[lear] tr[ewind] u[ndo] unl ve[rsion] vim[grep] vs[plit] win[size] wp[revious] wv[iminfo] xmenu xunmenu
syn keyword vimCommand contained abo[veleft] arge[dit] bN[ext] bf[irst] br[ewind] bufdo c[hange] cat[ch] cdo cg[etfile] checkt[ime] cmapc[lear] colo[rscheme] cope[n] cscope debugg[reedy] deletl dep diffpu[t] dl ds[earch] echoe[rr] en[dif] ex filetype fix[del] for gui helpg[rep] ia in ju[mps] keepp[atterns] laddb[uffer] lbo[ttom] ld[o] lfir[st] lh[elpgrep] lmapc[lear] loadkeymap lpf[ile] luafile mak[e] mk[exrc] mz[scheme] new nor ol[dfiles] p[rint] ped[it] pre[serve] promptf[ind] ptf[irst] ptr[ewind] py3do pythonx qa[ll] redi[r] ret[ab] ru[ntime] rv[iminfo] sIl sa[rgument] sb[uffer] sbn[ext] sce scr[iptnames] setf[iletype] sg sgl si sil[ent] sl[eep] smenu snoremenu spelld[ump] spr[evious] srg st[op] stj[ump] sunmenu syn tN[ext] tabd[o] tabm[ove] tabr[ewind] tclf[ile] tj[ump] tn[ext] try una[bbreviate] unlo[ckvar] verb[ose] vimgrepa[dd] wN[ext] winc[md] wq x[it] xnoreme xwininfo syn keyword vimCommand contained abo[veleft] arge[dit] bN[ext] bf[irst] br[ewind] bufdo c[hange] cat[ch] cdo cg[etfile] checkt[ime] cmapc[lear] colo[rscheme] cope[n] cscope debugg[reedy] deletl dep diffpu[t] dl ds[earch] echoe[rr] en[dif] ex filetype fix[del] for gui helpg[rep] ia in ju[mps] keepp[atterns] laddb[uffer] lbo[ttom] ld[o] lfir[st] lh[elpgrep] lmapc[lear] loadkeymap lpf[ile] luafile mak[e] mk[exrc] mz[scheme] new nor ol[dfiles] p[rint] ped[it] pre[serve] promptf[ind] ptf[irst] ptr[ewind] py3do pythonx qa[ll] redi[r] ret[ab] ru[ntime] rv[iminfo] sIl sa[rgument] sb[uffer] sbn[ext] sce scr[iptnames] setf[iletype] sg sgl si sil[ent] sl[eep] smenu snoremenu spelld[ump] spr[evious] srg st[op] stj[ump] sunmenu syn tN[ext] tabd[o] tabm[ove] tabr[ewind] tclf[ile] tj[ump] tn[ext] try una[bbreviate] unlo[ckvar] verb[ose] vimgrepa[dd] wN[ext] winc[md] wq x[it] xnoreme xwininfo
syn keyword vimCommand contained al[l] argg[lobal] b[uffer] bl[ast] brea[k] buffers cabc[lear] cb[uffer] ce[nter] cgetb[uffer] chi[story] cn[ext] com cp[revious] cstag delc[ommand] deletp di[splay] diffs[plit] dli[st] dsp[lit] echom[sg] endf[unction] exi[t] filt[er] fo[ld] fu[nction] gvim helpt[ags] iabc[lear] intro k lN[ext] laddf[ile] lc[d] le[ft] lg[etfile] lhi[story] lne[xt] loc[kmarks] lr[ewind] lv[imgrep] marks mks[ession] mzf[ile] nmapc[lear] nore omapc[lear] pa[ckadd] perld[o] prev[ious] promptr[epl] ptj[ump] pts[elect] py[thon] pyx quita[ll] redr[aw] retu[rn] rub[y] sI sIn sal[l] sba[ll] sbp[revious] scg scripte[ncoding] setg[lobal] sgI sgn sic sim[alt] sla[st] smile so[urce] spelli[nfo] sr sri sta[g] stopi[nsert] sus[pend] sync ta[g] tabe[dit] tabn[ext] tabs tcd te[aroff] tl[ast] tno[remap] ts[elect] undoj[oin] uns[ilent] vert[ical] viu[sage] w[rite] windo wqa[ll] xa[ll] xnoremenu y[ank] syn keyword vimCommand contained al[l] argg[lobal] b[uffer] bl[ast] brea[k] buffers cabc[lear] cb[uffer] ce[nter] cgetb[uffer] chi[story] cn[ext] com cp[revious] cstag delc[ommand] deletp di[splay] diffs[plit] dli[st] dsp[lit] echom[sg] endf[unction] exi[t] filt[er] fo[ld] fu[nction] gvim helpt[ags] iabc[lear] intro k lN[ext] laddf[ile] lc[d] le[ft] lg[etfile] lhi[story] lne[xt] loc[kmarks] lr[ewind] lv[imgrep] marks mks[ession] mzf[ile] nmapc[lear] nore omapc[lear] pa[ckadd] perld[o] prev[ious] promptr[epl] ptj[ump] pts[elect] py[thon] pyx quita[ll] redr[aw] retu[rn] rub[y] sI sIn sal[l] sba[ll] sbp[revious] scg scripte[ncoding] setg[lobal] sgI sgn sic sim[alt] sla[st] smile so[urce] spelli[nfo] sr sri sta[g] stopi[nsert] sus[pend] sync ta[g] tabe[dit] tabn[ext] tabs te[aroff] tl[ast] tno[remap] ts[elect] undoj[oin] uns[ilent] vert[ical] viu[sage] w[rite] windo wqa[ll] xa[ll] xnoremenu y[ank]
syn keyword vimCommand contained ar[gs] argl[ocal] ba[ll] bm[odified] breaka[dd] bun[load] cad[dbuffer] cbo[ttom] cex[pr] cgete[xpr] cl[ist] cnew[er] comc[lear] cpf[ile] cuna[bbrev] delel delf[unction] dif[fupdate] difft[his] do e[dit] echon endfo[r] exu[sage] fin[d] foldc[lose] g h[elp] hi if is[earch] kee[pmarks] lNf[ile] lan[guage] lch[dir] lefta[bove] lgetb[uffer] ll lnew[er] lockv[ar] ls lvimgrepa[dd] mat[ch] mksp[ell] n[ext] tch[dir] syn keyword vimCommand contained ar[gs] argl[ocal] ba[ll] bm[odified] breaka[dd] bun[load] cad[dbuffer] cbo[ttom] cex[pr] cgete[xpr] cl[ist] cnew[er] comc[lear] cpf[ile] cuna[bbrev] delel delf[unction] dif[fupdate] difft[his] do e[dit] echon endfo[r] exu[sage] fin[d] foldc[lose] g h[elp] hi if is[earch] kee[pmarks] lNf[ile] lan[guage] lch[dir] lefta[bove] lgetb[uffer] ll lnew[er] lockv[ar] ls lvimgrepa[dd] mat[ch] mksp[ell] n[ext]
syn match vimCommand contained "\<z[-+^.=]\=\>" syn match vimCommand contained "\<z[-+^.=]\=\>"
syn keyword vimStdPlugin contained Arguments Break Clear Continue DiffOrig Evaluate Finish Gdb Man N[ext] Over P[rint] Program Run S Source Step Stop Termdebug TermdebugCommand TOhtml Winbar XMLent XMLns syn keyword vimStdPlugin contained Arguments Break Clear Continue DiffOrig Evaluate Finish Gdb Man N[ext] Over P[rint] Program Run S Source Step Stop Termdebug TermdebugCommand TOhtml Winbar XMLent XMLns
@ -166,7 +166,7 @@ syn match vimNumber "-\d\+\%(\.\d\+\%([eE][+-]\=\d\+\)\=\)\=" skipwhite nextgro
syn match vimNumber "\<0[xX]\x\+" skipwhite nextgroup=vimGlobal,vimSubst,vimCommand,vimComment syn match vimNumber "\<0[xX]\x\+" skipwhite nextgroup=vimGlobal,vimSubst,vimCommand,vimComment
syn match vimNumber "\%(^\|\A\)\zs#\x\{6}" skipwhite nextgroup=vimGlobal,vimSubst,vimCommand,vimComment syn match vimNumber "\%(^\|\A\)\zs#\x\{6}" skipwhite nextgroup=vimGlobal,vimSubst,vimCommand,vimComment
" All vimCommands are contained by vimIsCommands. {{{2 " All vimCommands are contained by vimIsCommand. {{{2
syn match vimCmdSep "[:|]\+" skipwhite nextgroup=vimAddress,vimAutoCmd,vimEcho,vimIsCommand,vimExtCmd,vimFilter,vimLet,vimMap,vimMark,vimSet,vimSyntax,vimUserCmd syn match vimCmdSep "[:|]\+" skipwhite nextgroup=vimAddress,vimAutoCmd,vimEcho,vimIsCommand,vimExtCmd,vimFilter,vimLet,vimMap,vimMark,vimSet,vimSyntax,vimUserCmd
syn match vimIsCommand "\<\h\w*\>" contains=vimCommand syn match vimIsCommand "\<\h\w*\>" contains=vimCommand
syn match vimVar contained "\<\h[a-zA-Z0-9#_]*\>" syn match vimVar contained "\<\h[a-zA-Z0-9#_]*\>"
@ -201,7 +201,7 @@ syn keyword vimFTOption contained detect indent off on plugin
" Augroup : vimAugroupError removed because long augroups caused sync'ing problems. {{{2 " Augroup : vimAugroupError removed because long augroups caused sync'ing problems. {{{2
" ======= : Trade-off: Increasing synclines with slower editing vs augroup END error checking. " ======= : Trade-off: Increasing synclines with slower editing vs augroup END error checking.
syn cluster vimAugroupList contains=vimAugroup,vimIsCommand,vimCommand,vimUserCmd,vimExecute,vimNotFunc,vimFuncName,vimFunction,vimFunctionError,vimLineComment,vimMap,vimSpecFile,vimOper,vimNumber,vimOperParen,vimComment,vimString,vimSubst,vimMark,vimRegister,vimAddress,vimFilter,vimCmplxRepeat,vimComment,vimLet,vimSet,vimAutoCmd,vimRegion,vimSynLine,vimNotation,vimCtrlChar,vimFuncVar,vimContinue,vimSetEqual,vimOption syn cluster vimAugroupList contains=vimAugroup,vimIsCommand,vimUserCmd,vimExecute,vimNotFunc,vimFuncName,vimFunction,vimFunctionError,vimLineComment,vimNotFunc,vimMap,vimSpecFile,vimOper,vimNumber,vimOperParen,vimComment,vimString,vimSubst,vimMark,vimRegister,vimAddress,vimFilter,vimCmplxRepeat,vimComment,vimLet,vimSet,vimAutoCmd,vimRegion,vimSynLine,vimNotation,vimCtrlChar,vimFuncVar,vimContinue,vimSetEqual,vimOption
if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'a' if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'a'
syn region vimAugroup fold matchgroup=vimAugroupKey start="\<aug\%[roup]\>\ze\s\+\K\k*" end="\<aug\%[roup]\>\ze\s\+[eE][nN][dD]\>" contains=vimAutoCmd,@vimAugroupList syn region vimAugroup fold matchgroup=vimAugroupKey start="\<aug\%[roup]\>\ze\s\+\K\k*" end="\<aug\%[roup]\>\ze\s\+[eE][nN][dD]\>" contains=vimAutoCmd,@vimAugroupList
else else
@ -217,8 +217,8 @@ syn keyword vimAugroupKey contained aug[roup]
" ========= " =========
syn cluster vimOperGroup contains=vimEnvvar,vimFunc,vimFuncVar,vimOper,vimOperParen,vimNumber,vimString,vimRegister,vimContinue syn cluster vimOperGroup contains=vimEnvvar,vimFunc,vimFuncVar,vimOper,vimOperParen,vimNumber,vimString,vimRegister,vimContinue
syn match vimOper "\%#=1\(==\|!=\|>=\|<=\|=\~\|!\~\|>\|<\|=\)[?#]\{0,2}" skipwhite nextgroup=vimString,vimSpecFile syn match vimOper "\%#=1\(==\|!=\|>=\|<=\|=\~\|!\~\|>\|<\|=\)[?#]\{0,2}" skipwhite nextgroup=vimString,vimSpecFile
syn match vimOper "\(\<is\|\<isnot\)[?#]\{0,2}\>" skipwhite nextgroup=vimString,vimSpecFile syn match vimOper "\(\<is\|\<isnot\)[?#]\{0,2}\>" skipwhite nextgroup=vimString,vimSpecFile
syn match vimOper "||\|&&\|[-+.]" skipwhite nextgroup=vimString,vimSpecFile syn match vimOper "||\|&&\|[-+.!]" skipwhite nextgroup=vimString,vimSpecFile
syn region vimOperParen matchgroup=vimParenSep start="(" end=")" contains=@vimOperGroup syn region vimOperParen matchgroup=vimParenSep start="(" end=")" contains=@vimOperGroup
syn region vimOperParen matchgroup=vimSep start="{" end="}" contains=@vimOperGroup nextgroup=vimVar,vimFuncVar syn region vimOperParen matchgroup=vimSep start="{" end="}" contains=@vimOperGroup nextgroup=vimVar,vimFuncVar
if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_noopererror") if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_noopererror")
@ -255,7 +255,7 @@ syn match vimSpecFileMod "\(:[phtre]\)\+" contained
" User-Specified Commands: {{{2 " User-Specified Commands: {{{2
" ======================= " =======================
syn cluster vimUserCmdList contains=vimAddress,vimSyntax,vimHighlight,vimAutoCmd,vimCmplxRepeat,vimComment,vimCtrlChar,vimEscapeBrace,vimFilter,vimFunc,vimFuncName,vimFunction,vimFunctionError,vimIsCommand,vimMark,vimNotation,vimNumber,vimOper,vimRegion,vimRegister,vimLet,vimSet,vimSetEqual,vimSetString,vimSpecFile,vimString,vimSubst,vimSubstRep,vimSubstRange,vimSynLine syn cluster vimUserCmdList contains=vimAddress,vimSyntax,vimHighlight,vimAutoCmd,vimCmplxRepeat,vimComment,vimCtrlChar,vimEscapeBrace,vimFunc,vimFuncName,vimFunction,vimFunctionError,vimIsCommand,vimMark,vimNotation,vimNumber,vimOper,vimRegion,vimRegister,vimLet,vimSet,vimSetEqual,vimSetString,vimSpecFile,vimString,vimSubst,vimSubstRep,vimSubstRange,vimSynLine
syn keyword vimUserCommand contained com[mand] syn keyword vimUserCommand contained com[mand]
syn match vimUserCmd "\<com\%[mand]!\=\>.*$" contains=vimUserAttrb,vimUserAttrbError,vimUserCommand,@vimUserCmdList syn match vimUserCmd "\<com\%[mand]!\=\>.*$" contains=vimUserAttrb,vimUserAttrbError,vimUserCommand,@vimUserCmdList
syn match vimUserAttrbError contained "-\a\+\ze\s" syn match vimUserAttrbError contained "-\a\+\ze\s"
@ -334,13 +334,14 @@ syn match vimSubstFlags contained "[&cegiIpr]\+"
syn match vimString "[^(,]'[^']\{-}\zs'" syn match vimString "[^(,]'[^']\{-}\zs'"
" Marks, Registers, Addresses, Filters: {{{2 " Marks, Registers, Addresses, Filters: {{{2
syn match vimMark "'[a-zA-Z0-9]\ze[-+,!]" nextgroup=vimOper,vimMarkNumber,vimSubst syn match vimMark "'[a-zA-Z0-9]\ze[-+,!]" nextgroup=vimFilter,vimMarkNumber,vimSubst
syn match vimMark "'[<>]\ze[-+,!]" nextgroup=vimOper,vimMarkNumber,vimSubst syn match vimMark "'[<>]\ze[-+,!]" nextgroup=vimFilter,vimMarkNumber,vimSubst
syn match vimMark ",\zs'[<>]\ze" nextgroup=vimOper,vimMarkNumber,vimSubst syn match vimMark ",\zs'[<>]\ze" nextgroup=vimFilter,vimMarkNumber,vimSubst
syn match vimMark "[!,:]\zs'[a-zA-Z0-9]" nextgroup=vimOper,vimMarkNumber,vimSubst syn match vimMark "[!,:]\zs'[a-zA-Z0-9]" nextgroup=vimFilter,vimMarkNumber,vimSubst
syn match vimMark "\<norm\%[al]\s\zs'[a-zA-Z0-9]" nextgroup=vimOper,vimMarkNumber,vimSubst syn match vimMark "\<norm\%[al]\s\zs'[a-zA-Z0-9]" nextgroup=vimFilter,vimMarkNumber,vimSubst
syn match vimMarkNumber "[-+]\d\+" contained contains=vimOper nextgroup=vimSubst2 syn match vimMarkNumber "[-+]\d\+" contained contains=vimOper nextgroup=vimSubst2
syn match vimPlainMark contained "'[a-zA-Z0-9]" syn match vimPlainMark contained "'[a-zA-Z0-9]"
syn match vimRange "[`'][a-zA-Z0-9],[`'][a-zA-Z0-9]" contains=vimMark skipwhite nextgroup=vimFilter
syn match vimRegister '[^,;[{: \t]\zs"[a-zA-Z0-9.%#:_\-/]\ze[^a-zA-Z_":0-9]' syn match vimRegister '[^,;[{: \t]\zs"[a-zA-Z0-9.%#:_\-/]\ze[^a-zA-Z_":0-9]'
syn match vimRegister '\<norm\s\+\zs"[a-zA-Z0-9]' syn match vimRegister '\<norm\s\+\zs"[a-zA-Z0-9]'
@ -351,8 +352,8 @@ syn match vimPlainRegister contained '"[a-zA-Z0-9\-:.%#*+=]'
syn match vimAddress ",\zs[.$]" skipwhite nextgroup=vimSubst1 syn match vimAddress ",\zs[.$]" skipwhite nextgroup=vimSubst1
syn match vimAddress "%\ze\a" skipwhite nextgroup=vimString,vimSubst1 syn match vimAddress "%\ze\a" skipwhite nextgroup=vimString,vimSubst1
syn match vimFilter contained "^!.\{-}\(|\|$\)" contains=vimSpecFile syn match vimFilter "^!!\=[^"]\{-}\(|\|\ze\"\|$\)" contains=vimOper,vimSpecFile
syn match vimFilter contained "\A!.\{-}\(|\|$\)"ms=s+1 contains=vimSpecFile,vimFunction,vimFuncName,vimOperParen syn match vimFilter contained "!!\=[^"]\{-}\(|\|\ze\"\|$\)" contains=vimOper,vimSpecFile
" Complex repeats (:h complex-repeat) {{{2 " Complex repeats (:h complex-repeat) {{{2
syn match vimCmplxRepeat '[^a-zA-Z_/\\()]q[0-9a-zA-Z"]\>'lc=1 syn match vimCmplxRepeat '[^a-zA-Z_/\\()]q[0-9a-zA-Z"]\>'lc=1
@ -433,17 +434,18 @@ syn case match
" ========================== " ==========================
syn match vimFunc "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%(\w\+\.\)*\I[a-zA-Z0-9_.]*\)\ze\s*(" contains=vimFuncName,vimUserFunc,vimExecute syn match vimFunc "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%(\w\+\.\)*\I[a-zA-Z0-9_.]*\)\ze\s*(" contains=vimFuncName,vimUserFunc,vimExecute
syn match vimUserFunc contained "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%(\w\+\.\)*\I[a-zA-Z0-9_.]*\)\|\<\u[a-zA-Z0-9.]*\>\|\<if\>" contains=vimNotation syn match vimUserFunc contained "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%(\w\+\.\)*\I[a-zA-Z0-9_.]*\)\|\<\u[a-zA-Z0-9.]*\>\|\<if\>" contains=vimNotation
syn match vimNotFunc "\<if\>\|\<el\%[seif]\>\|\<return\>\|\<while\>"
" Errors And Warnings: {{{2 " Errors And Warnings: {{{2
" ==================== " ====================
if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimfunctionerror") if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimfunctionerror")
syn match vimFunctionError "\s\zs[a-z0-9]\i\{-}\ze\s*(" contained contains=vimFuncKey,vimFuncBlank syn match vimFunctionError "\s\zs[a-z0-9]\i\{-}\ze\s*(" contained contains=vimFuncKey,vimFuncBlank
" syn match vimFunctionError "\s\zs\%(<[sS][iI][dD]>\|[sSgGbBwWtTlL]:\)\d\i\{-}\ze\s*(" contained contains=vimFuncKey,vimFuncBlank syn match vimFunctionError "\s\zs\%(<[sS][iI][dD]>\|[sSgGbBwWtTlL]:\)\d\i\{-}\ze\s*(" contained contains=vimFuncKey,vimFuncBlank
syn match vimElseIfErr "\<else\s\+if\>" syn match vimElseIfErr "\<else\s\+if\>"
syn match vimBufnrWarn /\<bufnr\s*(\s*["']\.['"]\s*)/ syn match vimBufnrWarn /\<bufnr\s*(\s*["']\.['"]\s*)/
endif endif
syn match vimNotFunc "\<if\>\|\<el\%[seif]\>\|\<return\>\|\<while\>" skipwhite nextgroup=vimOper,vimOperParen,vimVar,vimFunc,vimNotation
" Norm {{{2 " Norm {{{2
" ==== " ====
syn match vimNorm "\<norm\%[al]!\=" skipwhite nextgroup=vimNormCmds syn match vimNorm "\<norm\%[al]!\=" skipwhite nextgroup=vimNormCmds
@ -653,7 +655,7 @@ if (g:vimsyn_embed =~# 'l' && has("lua")) && filereadable(s:luapath)
syn cluster vimFuncBodyList add=vimLuaRegion syn cluster vimFuncBodyList add=vimLuaRegion
exe "syn include @vimLuaScript ".s:luapath exe "syn include @vimLuaScript ".s:luapath
VimFoldl syn region vimLuaRegion matchgroup=vimScriptDelim start=+lua\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimLuaScript VimFoldl syn region vimLuaRegion matchgroup=vimScriptDelim start=+lua\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimLuaScript
VimFoldl syn region vimLuaRegion matchgroup=vimScriptDelim start=+lua\s*<<\s*$+ end=+\.$+ contains=@vimLuaScript VimFoldl syn region vimLuaRegion matchgroup=vimScriptDelim start=+lua\s*<<\s*$+ end=+\.$+ contains=@vimLuaScript
syn cluster vimFuncBodyList add=vimLuaRegion syn cluster vimFuncBodyList add=vimLuaRegion
else else
syn region vimEmbedError start=+lua\s*<<\s*\z(.*\)$+ end=+^\z1$+ syn region vimEmbedError start=+lua\s*<<\s*\z(.*\)$+ end=+^\z1$+

14
runtime/syntax/vuejs.vim Normal file
View File

@ -0,0 +1,14 @@
" Vim syntax file
" Language: Vue.js Single File Component
" Maintainer: Ralph Giles <giles@thaumas.net>
" URL: https://vuejs.org/v2/guide/single-file-components.html
" Last Change: 2019 Jul 8
" Quit if a syntax file was already loaded.
if exists("b:current_syntax")
finish
endif
" We have a collection of html, css and javascript wrapped in
" tags. The default HTML syntax highlight works well enough.
runtime! syntax/html.vim

968
runtime/tutor/tutor.ko Normal file
View File

@ -0,0 +1,968 @@
===============================================================================
= 빔 길잡이 (VIM Tutor) 에 오신 것을 환영합니다 - Version 1.7 =
===============================================================================
빔(Vim)은 이 길잡이에서 다 설명할 수 없을 만큼 많은 명령을 가진
매우 강력한 편집기입니다. 이 길잡이는 빔을 쉽게 전천후 편집기로 사용할
수 있도록 충분한 명령에 대해 설명하고 있습니다.
이 길잡이를 떼는 데에는 실습하는 데에 얼마나 시간을 쓰는 가에 따라서
25-30 분 정도가 걸립니다.
이 연습에 포함된 명령은 내용을 고칩니다. 이 파일의 복사본을 만들어서
연습하세요. (vimtutor 를 통해 시작했다면, 이미 복사본을 사용하는
중입니다.)
중요한 것은, 이 길잡이가 직접 써보면서 배우도록 고려되어 있다는 것입니다.
명령을 제대로 익히려면, 직접 실행해보는 것이 필요합니다. 내용을 읽는
것만으로는, 명령을 잊어버리게 될 것입니다.
자 이제, Caps Lock(Shift-Lock) 키가 눌려있지 않은지 확인해보시고, j 키를
충분히 눌러서 Lesson 1.1이 화면에 가득 차도록 움직여봅시다.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 1.1: 커서 움직이기
** 커서를 움직이려면, 표시된 대로 h,j,k,l 키를 누르십시오. **
^
k 힌트: h 키는 왼쪽에 있으며, 왼쪽으로 움직입니다.
< h l > l 키는 오른쪽에 있으며, 오른쪽으로
j 움직입니다.
v j 키는 아래방향 화살표처럼 생겼습니다.
1. 익숙해질 때까지 커서를 스크린 상에서 움직여 보십시오.
2. 아래 방향키 (j)를 반복입력이 될 때까지 누르고 계십시오.
이제 다음 lesson으로 가는 방법을 알게 되었습니다.
3. 아래 방향키를 이용하여, Lesson 1.2 로 가십시오.
참고: 원하지 않는 무언가가 입력이 되었다면, <ESC>를 눌러서, 명령 모드로
돌아가십시오. 그 후에 원하는 명령을 다시 입력하십시오.
참고: 커서키 또한 작동할 것입니다. 하지만 hjkl에 익숙해지면, 커서키보다
훨씬 빠르게 이동할 수 있을 것입니다. 정말요!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 1.2: 빔을 시작하고 끝내기
!! 주의: 아래 있는 단계를 실행하기 전에, 이 lesson 전체를 읽으십시오!!
1. <ESC> 키를 눌러서 확실하게 명령 모드로 빠져 나옵니다.
2. 다음과 같이 입력합니다: :q! <ENTER>
이렇게 하면, 바뀐 내용을 *저장하지 않고* 편집기를 빠져나갑니다.
3. 쉘 프롬프트가 보인다면, 다시 길잡이로 돌아오기 위해 다음과 같이
입력합니다.
vimtutor <ENTER>
또는 다음과 같을 수도 있습니다.
vim tutor.ko <ENTER>
---> 'vim' 은 빔 편집기로 들어가는 것을 뜻하며, 'tutor.ko'는 편집하려는
파일을 뜻합니다.
4. 위에서 이야기한 단계를 기억하였으며, 확신이 서면, 1에서 3까지를
수행하여 편집기를 나갔다가 다시 들어와 보십시오.
주의: :q! <ENTER> 는 바뀐 내용을 저장하지 않습니다. 이 후 lesson에서
어떻게 편집 내용을 저장하는지 배울 수 있습니다.
5. 그 후 커서를 아래로 움직여 Lesson 1.3 으로 가십시오.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 1.3: 텍스트 편집 - 지우기
** 명령 모드에서 x 를 누르면 커서가 위치한 곳의 글자를 지울 수 있습니다. **
1. ----> 로 표시된 곳으로 커서를 옮겨보십시오.
2. 오타를 수정하기 위해, 커서를 지울 글자 위로 움직여 보십시오.
3. x 키를 눌러서 지워야할 글자를 지우십시오.
4. 2에서 4까지를 반복하여 문장이 올바르게 되도록 하여 보십시오.
---> The ccow jumpedd ovverr thhe mooon.
5. 문장이 정확해졌다면, Lesson 1.4로 가십시오.
주의: 이 길잡이를 보면서 외우려고 하지말고, 직접 사용해보면서 익히길
바랍니다.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 1.4: 텍스트 편집 - 삽입 (INSERTION)
** 명령 모드에서 i 를 누르면 텍스트를 입력할 수 있습니다. **
1. 커서를 첫번째 ---> 로 표시된 줄로 움직입니다.
2. 첫번째 줄을 두번째 줄과 똑같이 만들것입니다. 텍스트가 들어가야할
곳 다음부터 첫번째 글자 위에 커서를 옮겨 놓습니다.
3. i 키를 누른 후, 필요한 내용을 입력합니다.
4. 수정한 후에는 <ESC> 를 눌러서 명령 모드로 돌아갑니다.
문장을 올바르게 만들기 위해 2에서 4의 과정을 반복합니다.
---> There is text misng this .
---> There is some text missing from this line.
5. 텍스트를 삽입하는 데에 익숙해졌다면, Lesson 1.5로 가십시오.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 1.5: 택스트 편집 - 추가 (APPENDING)
** A 를 입력해 텍스트를 추가할 수 있습니다. **
1. 커서를 첫번째 ---> 로 표시된 줄로 움직입니다.
커서가 문장 내 어디에 있던 상관없습니다.
2. A 키를 눌러 필요한 내용을 입력합니다.
3. 내용을 모두 입력한 후 <ESC>를 눌러 명령 모드로 돌아갑니다.
4. 커서를 두번째 ---> 로 표시된 줄로 움직입니다.
문장을 올바르게 만들기 위해 2에서 3의 과정을 반복합니다.
---> There is some text missing from th
There is some text missing from this line.
---> There is also some text miss
There is also some text missing here.
5. 텍스트를 추가하는 데 익숙해졌다면, Lesson 1.6으로 가십시오.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 1.6: 파일 편집
** :wq 를 이용하여 파일을 저장하고 빠져나갈 수 있습니다. **
!! 주의: 아래 있는 단계를 실행하기 전에, 이 lesson 전체를 읽으십시오!!
1. lesson 1.2에서 배웠던 것처럼 :q!로 편집기를 나갈 수 있습니다.
만약, 다른 터미널에 접근 가능하다면, 아래의 단계를 다른 터미널에서 해봅니다.
2. 쉘 프롬프트에 다음과 같이 입력합니다: vim tutor <ENTER>
'vim' 은 빔 에디터 시작을 위한 명령어, 'tutor'는 수정하고자 하는
파일의 이름 입니다.
3. 앞에서 배웠던 것처럼 텍스트를 삽입하고 지워보세요.
4. 다음 명령어를 이용해 파일 수정 부분을 저장하고 빠져나갑니다: :wq <ENTER>
5. 만약 1에서 vimtutor를 빠져나갔다가 다시 들어왔다면, 아래로 움직여 요약으로 넘어가도록 합시다.
6. 위 모든 단계를 다 읽고 이해한 후에 직접 해보세요.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LESSON 1 요약
1. 커서를 움직일 때에는 화살표 키나 hjkl 키를 이용합니다.
h (왼쪽) j (아래) k (위) l (오른쪽)
2. 쉘 프롬프트에서 빔을 시작하려면 vim FILENAME <ENTER>
3. 수정한 내용을 무시한 채로 빔에서 빠져나가려면 <ESC> :q! <ENTER>
저장한 후 빔에서 빠져나가려면 <ESC> :wq <ENTER>
4. 명령 모드에서 커서가 위치한 곳의 글자를 지우려면 x 를 입력합니다.
5. 명령 모드에서 커서가 위치한 곳에 텍스트를 삽입하려면
i 를 누른 후 텍스트를 입력하고 <ESC> 커서 앞에 삽입합니다.
A 를 누른 후 텍스트를 입력하고 <ESC> 문장 뒤에 추가 합니다.
참고: <ESC>는 명령 모드로 돌아가는 데 쓰며, 원치 않는 명령이나 완전히 입력되지
않은 명령을 취소하는 데에도 씁니다.
그럼 Lesson 2를 시작합시다.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 2.1: 삭제(DELETION) 명령
** 한 단어를 끝까지 지우려면 dw 라고 치면 됩니다. **
1. <ESC> 키를 눌러서 확실하게 명령 모드로 빠져 나옵니다.
2. 아래에 ---> 로 표시된 줄 까지 커서를 옮깁니다.
3. 지워야할 단어의 처음으로 커서를 옮깁니다.
4. dw 라고 쳐서 그 단어를 지웁니다.
주의: 위에서 말한대로 하면 화면의 마지막 줄에 dw 라는 글자가 표시됩니다.
잘못 쳤다면, <ESC> 를 눌러서 다시 시작하십시오.
---> There are a some words fun that don't belong paper in this sentence.
5. 3, 4번 과정을 다시 하여 문장을 정확하게 만든 뒤 Lesson 2.2로 가십시오.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 2.2: 다른 삭제 명령
** d$ 라고 치면 그 줄 끝까지 지워집니다. **
1. <ESC> 키를 눌러서 확실하게 명령 모드로 빠져 나옵니다.
2. 아래에 ---> 로 표시된 줄 까지 커서를 옮깁니다.
3. 올바른 줄의 끝으로 커서를 옮깁니다. (첫번째로 나오는 . 다음입니다.)
4. d$ 라고 쳐서 줄 끝까지 지웁니다.
---> Somebody typed the end of this line twice. end of this line twice.
5. 어떤 일이 일어났는지 이해하기 위해 Lesson 2.3 으로 가십시오.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 2.3: 명령과 적용 대상에 대해
삭제 명령 d의 형식은 다음과 같습니다.
d 대상
여기서:
d - 지우는 명령
대상 - 아래에 제시된 대상에 대해 명령을 수행
적용 가능한 대상의 종류:
w - 커서에서 그 단어의 끝까지 (공백 포함.)
e - 커서에서 그 단어의 끝까지 (공백을 포함하지 않음.)
$ - 커서에서 그 줄의 끝까지
예를 들어, de 는 커서의 위치부터 해당 단어의 끝까지 지웁니다.
참고: 호기심이 있다면, 명령 모드에서 명령 없이 대상을 입력해보십시오.
위에서 이야기한 대상의 목록에 따라 커서가 움직이게 됩니다.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 2.4: 대상에 반복 적용하기
** 대상 이전에 숫자를 넣어주면 그 만큼 반복 됩니다. **
1. 아래에 ---> 로 표시된 줄 까지 커서를 옮깁니다.
2. 2w 입력하여 커서를 단어 두 개 뒤로 옮깁니다.
3. 3e 입력하여 커서를 뒤로 세 번째 단어의 끝으로 옮깁니다.
4. 0 (zero) 를 입력하여 문장의 시작부분으로 움직입니다.
5. 2에서 3까지를 다른 숫자로 반복해 봅니다.
---> This is just a line with words you can move around in.
6. Lesson 2.5로 가십시오.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 2.5: 삭제에 반복 적용하기
** 명령과 숫자를 함께 사용하면 그만큼 반복 수행 됩니다. **
위에서 삭제 명령과 대상의 조합과 같이, 대상 이전에 횟수를 넣어 더 많이 삭제 할 수 있습니다:
d 횟수 대상
1. 아래 ---> 표시된 줄에서 커서를 첫번째 대문자 단어로 옮깁니다.
2. d2w를 입력하여 두 대문자 단어를 지웁니다.
3. 이어지는 대문자 단어들을 1에서 2까지의 단계를 이용해 횟수를 바꾸어 삭제해 봅니다.
---> this ABC DE line FGHI JK LMN OP of words is Q RS TUV cleaned up.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 2.6: 줄 전체 조작하기
** dd 라고 치면 줄 전체를 지웁니다. **
줄 전체를 지우는 일이 잦기 때문에, Vi를 디자인 한 사람들은, 간단히 d를
두번 연달아 치면 한 줄을 지울 수 있도록 하였습니다.
1. 커서를 아래 나온 단락의 두번째 줄로 가져가십시오.
2. dd 를 입력하여 그 줄을 지우십시오.
3. 그런 다음 네번째 줄로 가십시오.
4. 2dd 라고 입력하여 두줄을 지웁니다. ( 횟수-명령-대상을 기억하세요. )
---> 1) Roses are red,
---> 2) Mud is fun,
---> 3) Violets are blue,
---> 4) I have a car,
---> 5) Clocks tell time,
---> 6) Sugar is sweet
---> 7) And so are you.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 2.7: 취소(UNDO) 명령
** u 를 누르면 마지막 명령이 취소되며, U 는 줄 전체를 수정합니다. **
1. 커서를 ---> 로 표시된 줄로 이동한 후 첫번째 잘못된 부분 위로 옮깁니다.
2. x 를 입력하여 첫번째 잘못된 글자를 지웁니다.
3. 그럼 이제 u 를 입력하여 마지막으로 수행된 명령을 취소합니다.
4. 이번에는 x 명령을 이용하여 그 줄의 모든 에러를 수정해봅시다.
5. 대문자 U 를 눌러서 그 줄을 원래 상태로 돌려놓아 보십시오.
6. 이번에는 u 를 몇 번 눌러서 U 와 이전 명령을 취소해봅시다.
7. CTRL-R (CTRL 키를 누른 상태에서 R을 누르는 것) 을 몇 번 눌러서
명령을 다시 실행해봅시다. (취소한 것을 취소함.)
---> Fiix the errors oon thhis line and reeplace them witth undo.
8. 이 명령은 매우 유용합니다. 그럼 Lesson 2 요약으로 넘어가도록 합시다.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LESSON 2 요약
1. 커서가 위치한 곳부터 단어의 끝까지 지우려면: dw
2. 커서가 위치한 곳부터 줄 끝까지 지우려면: d$
3. 줄 전체를 지우려면: dd
4. 횟수와 함께 대상을 반복 시키려면: 2w
5. 명령 모드에서 내리는 명령의 형식은 다음과 같습니다:
[횟수] 명령 대상 또는 명령 [횟수] 대상
여기서:
횟수 - 그 명령을 몇 번 반복할 것인가
명령 - 어떤 명령을 내릴 것인가 ( 예를 들어, 삭제인 경우는 d )
대상 - 명령이 동작할 대상, 예를 들어 w (단어), $ (줄의 끝) 등.
6. 커서를 문장 맨 앞으로 옮기려면: 0
7. 이전 행동을 취소하려면: u (소문자 u)
한 줄에서 수정한 것을 모두 취소하려면: U (대문자 U)
취소한 것을 다시 실행하려면: CTRL-R
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 3.1: 붙이기(PUT) 명령
** p 를 입력하여 마지막으로 지운 내용을 커서 뒤에 붙입니다. **
1. 아래에 있는 문단의 첫 줄로 커서를 움직이십시오.
2. dd 를 입력하여 그 줄을 지워서 빔의 버퍼에 저장합니다.
3. 아까 지운 줄이 가야할 위치의 *윗줄로* 커서를 옮깁니다.
4. 명령 모드에서, p 를 입력하여 그 줄을 제대로 된 자리로 옮깁니다.
5. 2에서 4를 반복하여 모든 줄의 순서를 바로 잡으십시오.
d) Can you learn too?
b) Violets are blue,
c) Intelligence is learned,
a) Roses are red,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 3.2: 치환(REPLACE) 명령
** 커서 아래의 글자 하나를 바꾸려면, r 을 누른 후 바꿀 글자를 입력합니다. **
1. 커서를 ---> 로 표시된 첫 줄로 옮깁니다.
2. 커서를 잘못된 첫 부분으로 옮깁니다.
3. r 을 누른 후, 잘못된 부분을 고쳐 쓸 글자를 입력합니다.
4. 2에서 3의 과정을 반복하여, 첫 줄의 오류를 수정하십시오.
---> Whan this lime was tuoed in, someone presswd some wrojg keys!
---> When this line was typed in, someone pressed some wrong keys!
5. Lesson 3.2 로 이동합시다.
주의: 외우지 말고, 직접 해보면서 익혀야 한다는 것을 잊지 마십시오.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 3.3: 변환(CHANGE) 명령
** 한 단어의 전체를 바꾸려면, ce 를 치십시오. **
1. 커서를 ---> 로 표시된 첫줄로 옮깁니다.
2. 커서를 lubw 에서 u 위에 올려놓습니다.
3. ce 라고 명령한 후 단어를 정확하게 수정합니다. (이 경우, 'ine' 를 칩니다.)
4. <ESC> 를 누른 후 다음 에러로 갑니다 (수정되어야할 첫 글자로 갑니다.)
5. 3에서 4의 과정을 반복하여 첫번째 문장을 두번째 문장과 같도록 만듭니다.
---> This lubw has a few wptfd that mrrf changing usf the change command.
---> This line has a few words that need changing using the change command.
ce 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있도록 한다는 것에
유의합시다.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 3.4: c 를 이용한 다른 변환 명령
** 변환 명령은 삭제할 때 이용한 대상에 대해 적용할 수 있습니다. **
1. 변환 명령은 삭제와 동일한 방식으로 동작합니다. 형식은 다음과 같습니다:
[횟수] c 대상 또는 c [횟수] 대상
2. 적용 가능한 대상 역시 같습니다. w (단어), $ (줄의 끝) 등이 있습니다.
3. ---> 로 표시된 첫줄로 이동합니다.
4. 첫 에러 위로 커서를 옮깁니다.
5. c$ 를 입력하여, 그 줄의 나머지가 두번째 줄처럼 되도록 수정한 후 <ESC> 를
누르십시오.
---> The end of this line needs some help to make it like the second.
---> The end of this line needs to be corrected using the c$ command.
참고: 입력하는 동안은 백스페이스를 이용할 수 있습니다.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LESSON 3 요약
1. 이미 지운 내용을 되돌리려면, p 를 누르십시오. 이 명령은 커서 *다음에*
지워진 내용을 붙입니다(PUT). (한 줄을 지운 경우에는 커서 다음 줄에
지워진 내용이 붙습니다.)
2. 커서 아래의 글자를 치환하려면(REPLACE), r 을 누른 후 원래 글자 대신
바꾸어 넣을 글자를 입력합니다.
3. 변환 명령(CHANGE)은 커서에서 부터 지정한 대상의 끝까지 바꿀 수 있는
명령입니다. 예를 들어, 커서 위치에서 단어의 끝까지 바꾸려면 ce 를
입력하면 되며, c$ 는 줄 끝까지 바꾸는 데 쓰입니다.
4. 변환 명령의 형식은 다음과 같습니다:
[횟수] c 대상 또는 c [횟수] 대상
계속해서 다음 Lesson 을 진행합시다.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 4.1: 위치와 파일의 상태
** CTRL-G 를 누르면 파일 내에서의 현재 위치와 파일의 상태를 볼 수 있습니다.
G 를 누르면 파일 내의 마지막 줄로 이동합니다. **
주의: 아래의 단계를 따라하기 전에, 이 Lesson 전체를 먼저 읽으십시오.
1. CTRL 키를 누른 상태에서 g 를 누릅니다. 파일 이름과 현재 위치한 줄이
표시된 상태줄이 화면 아래에 표시될 것입니다. 3번째 단계를 위해 그
줄 번호를 기억하고 계십시오.
참고: 커서가 화면 오른쪽 하단으로 옮겨진 것을 보인다면,
이는 'ruler' 옵션을 세팅된 경우 입니다. (:help 'ruler' 를 참고 하세요.)
2. G 를 누르면 파일의 마지막으로 이동합니다.
gg 를 누르면 파일의 시작 부분으로 이동합니다.
3. 아까 기억했던 줄 번호를 입력한 후 G 를 누르십시오. 이렇게 하면
처음에 CTRL-G 를 눌렀던 장소로 되돌아가게 될 것입니다.
(번호를 입력할 때, 이것은 화면에 표시되지 않습니다.)
4. 자신이 생겼다면, 1에서 3까지를 실행해보십시오.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 4.2: 찾기 명령
** / 를 누른 후 검색할 문구를 입력하십시오. **
1. 명령 모드에서 / 를 입력하십시오. : 명령에서와 마찬가지로, 화면 아래에
/ 와 커서가 표시될 것입니다.
2. 'errroor' 라고 친 후 <ENTER> 를 치십시오. 이 단어를 찾으려고 합니다.
3. 같은 문구를 다시 찾으려면, 간단히 n 을 입력하십시오.
같은 문구를 반대 방향으로 찾으려면, Shift-N 을 입력하십시오.
4. 문구를 역방향으로 찾으려면, / 대신 ? 를 이용하면 됩니다.
5. 원래 있던 곳으로 돌아가기 위해서는 CTRL-O 를 이용하면 됩니다. 반복하면 더 이전으로도
갈 수 있습니다. CTRL-I 로 다시 뒤로 갈 수도 있습니다.
---> "errroor" is not the way to spell error; errroor is an error.
참고: 찾는 중에 파일의 끝에 다다르게 되면, 파일의 처음부터 다시 찾게 됩니다.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 4.3: 괄호의 짝 찾기
** % 를 눌러서 ), ], } 의 짝을 찾습니다. **
1. 커서를 ---> 로 표시된 줄의 (, [, { 중 하나에 가져다 놓습니다.
2. % 를 입력해 봅시다.
3. 커서가 짝이 맞는 괄호로 이동할 것입니다.
4. % 를 입력하여, 이전 괄호로 되돌아 옵시다.
5. 커서를 다른 (,),[,],{ 혹은 } 로 움직여 % 를 입력해 봅니다.
---> This ( is a test line with ('s, ['s ] and {'s } in it. ))
참고: 짝이 맞지 않는 괄호가 있는 프로그램을 디버깅할 때에 매우 유용합니다!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 4.4: 치환(SUBTITUTE) 명령
** :s/old/new/g 하면 'old' 를 'new' 로 치환(SUBTITUTE)합니다. **
1. 커서를 ---> 로 표시된 줄에 가져다 놓습니다.
2. :s/thee/the 를 입력한 후 <ENTER> 를 칩니다. 이 명령은 그 줄에서
처음으로 발견된 것만 바꾼다는 것에 주의하십시오.
3. 이번에는 :s/thee/the/g 를 입력합니다. 이는 그 줄 전체(globally)를
치환한다는 것을 의미합니다.
---> thee best time to see thee flowers is in thee spring.
4. 두 줄 사이의 모든 문자열에 대해 치환하려면 다음과 같이 합니다,
:#,#s/old/new/g #,# 는 두 줄의 줄번호를 뜻합니다.
:%s/old/new/g 파일 전체에서 발견된 모든 것을 치환하는 경우입니다.
:%s/old/new/gc 파일 전체에서 발견된 모든 것을 찾고, 치환할지 안
할지 프롬프트로 명령합니다.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LESSON 4 요약
1. CTRL-G 파일의 상태와 파일 내에서의 현재 위치를 표시합니다.
G 파일의 끝으로 이동합니다.
숫자 G 해당 줄로 이동합니다.
gg 첫 번째 라인으로 이동합니다.
2. / 를 입력한 후 문구를 입력하면 그 문구를 아랫방향으로 찾습니다.
? 를 입력한 후 문구를 입력하면 윗방향으로 찾습니다.
검색 후, n 을 입력하면 같은 방향으로 다음 문구를 찾으며,
Shift-N 을 입력하면 반대 방향으로 찾습니다.
CTRL-O 는 과거의 위치로, CTRL-I는 새로운 위치로 옮겨줍니다.
3. 커서가 (,),[,],{,} 위에 있을 때에 % 를 입력하면 상응하는 짝을
찾아갑니다.
4. 어떤 줄에 처음 등장하는 old를 new로 바꾸려면 :s/old/new
한 줄에 등장하는 모든 old를 new로 바꾸려면 :s/old/new/g
두 줄 #,# 사이에서 치환을 하려면 :#,#s/old/new/g
파일 내의 모든 문구를 치환하려면 :%s/old/new/g
바꿀 때마다 확인을 거치려면 'c'를 붙여서 :%s/old/new/gc
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 5.1: 외부 명령 실행하는 방법
** :! 을 입력한 후 실행하려는 명령을 입력하십시오. **
1. 친숙한 명령인 : 를 입력하면 커서가 화면 아래로 이동합니다. 명령을
입력할 수 있게 됩니다.
2. 이제 ! (느낌표) 를 입력하십시오. 이렇게 하면 외부 쉘 명령을 실행할
수 있습니다.
3. 시험삼아 ! 다음에 ls 를 입력한 후 <ENTER> 를 쳐보십시오. 쉘 프롬프트
에서처럼 디렉토리의 목록이 출력될 것입니다. ls 가 동작하지 않는다면
:!dir 을 시도해 보십시오.
참고: 어떤 외부 명령도 이 방법으로 실행할 수 있습니다.
참고: 모든 : 명령은 <ENTER> 를 쳐야 마무리 됩니다.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 5.2: 보다 자세한 파일 저장
** 수정된 내용을 파일로 저장하려면, :w FILENAME 하십시오. **
1. :!dir 또는 :!ls 를 입력하여 디렉토리의 리스트를 얻어옵니다.
위의 명령 후 <ENTER>를 쳐야한다는 것은 이미 알고 있을 것입니다.
2. TEST 처럼 존재하지 않는 파일 이름을 하나 고르십시오.
3. 이제 :w TEST 라고 입력하십시오. (TEST는 당신이 선택한 파일 이름입니다.)
4. 이렇게 하면 빔 길잡이 파일 전체를 TEST라는 이름으로 저장합니다.
확인하려면, :!dir 을 다시 입력하여, 디렉토리를 살펴보십시오.
참고: 빔을 종료한 후, 빔을 다시 실행하여 TEST라는 파일을 열면, 그 파일은
저장했을 때와 완벽히 같은 복사본일 것입니다.
5. 이제 그 파일을 지웁시다.
(MS-DOS에서): !del TEST
(Unix에서): !rm TEST
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 5.3: 선택적으로 저장하는 명령
** 파일의 일부를 저장하려면, v 대상 :w FILENAME 을 입력합니다. **
1. 이 줄로 커서를 가져옵니다.
2. v 를 누르고 커서를 아래 다섯번째로 옮깁니다. 이 때, 문자열들이 하이라이트 됨을 주목합니다.
3. : 를 누릅니다. 화면 하단에 :'<,'> 가 나타납니다.
4. w TEST 를 입력합니다. 여기서 TEST는 파일 이름이며 아직 생성되어 있지 않습니다. <ENTER>를
누르기 전, :'<,'>w TEST 로 입력되었는지 확인 합니다.
5. 빔은 선택된 문장들을 TEST 파일에 입력합니다. :!dir 혹은 :!ls를 이용하여 파일이 만들어졌는지
확인하십시오. 아직 삭제하지 마십시오! 다음 레슨에서 이 파일을 사용합니다.
참고 : v 를 눌러 비주얼(Visual) 선택을 시작합니다. 커서를 주변으로 움직여 선택 부분을 조절할 수
있습니다. 그리고 명령어를 이용해 해당 문자열을 조작할 수 있습니다. 예를 들어, d 를 이용해
삭제할 수도 있습니다.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 5.4: 파일 읽어들이기, 합치기
** 어떤 파일의 내용을 삽입하려면, :r FILENAME 하십시오 **
1. 커서를 이 라인 바로 위로 옮기십시오.
주의: 3번째 단계를 실행하면, Lesson 5.3 을 보게 될 것입니다. 그렇게 되면
이 lesson으로 다시 내려오십시오.
2. 이제 TEST 파일을 읽어들입시다. :r TEST 명령을 사용하십시오. TEST 는
파일의 이름입니다. 읽어들인 파일은 커서가 위치한 문장 아래부터 놓이게 됩니다.
3. 파일이 읽어들여진 것을 확인하기 위해, 뒤로 이동해서 기존 버전과 파일에서
읽어들인 버전, 이렇게 Lesson 5.3 이 두번 반복되었음을 확인하십시오.
참고: 외부 명령어의 결과값도 읽을 수 있습니다. 예를 들어, :r !ls 는 ls 명령어에 대한 결과값을
읽어 커서 바로 아래에 합칩니다.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LESSON 5 요약
1. :!command 를 이용하여 외부 명령을 실행합니다.
유용한 예:
(MS-DOS) (Unix)
:!dir :!ls - 디렉토리의 목록을 보여준다.
:!del FILENAME :!rm FILENAME - FILENAME이라는 파일을 지운다.
2. :w FILENAME 하면 현재 빔에서 사용하는 파일을 FILENAME이라는 이름으로
디스크에 저장합니다.
3. v 명령 :w FILENAME 은 비주얼 모드에서 선택된 문장들을 파일 FILENAME에 저장합니다.
4. :r FILENAME 은 디스크에서 FILENAME이라는 파일을 불러들여서 커서 위치
뒤에 현재 파일을 집어넣습니다.
5. :r !dir 는 dir 명령어의 결과값을 현재 커서의 위치 아래에 붙힙니다.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 6.1: 새 줄 열기(OPEN) 명령
** o 를 누르면 커서 아래에 줄을 만들고 편집 모드가 됩니다. **
1. 아래에 ---> 로 표시된 줄로 커서를 옮기십시오.
2. o (소문자)를 쳐서 커서 *아래에* 줄을 하나 여십시오. 편집 모드가 됩니다.
3. ---> 로 표시된 줄을 복사한 후 <ESC> 를 눌러서 편집 모드에서 나오십시오.
---> After typing o the cursor is placed on the open line in Insert mode.
4. 커서 *위에* 줄을 하나 만드려면, 소문자 o 대신 대문자 O 를 치면 됩니다.
아래 있는 줄에 대해 이 명령을 내려보십시오.
---> Open up a line above this by typing O while the cursor is on this line.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 6.2: 추가(APPEND) 명령
** a 를 누르면 커서 *다음에* 글을 입력할 수 있습니다. **
1. 커서를 ---> 로 표시된 첫번째 줄의 끝으로 옮깁니다.
2. e 를 눌러 li 의 끝으로 커서를 옮깁니다.
3. 소문자 a 를 커서 아래 글자 *다음*에 글을 추가할 수 있습니다.
4. 아랫줄과 같이 문장을 완성해 봅니다. <ESC>를 이용해 편집(Insert) 모드를 나갑니다.
5. e 를 이용해 다음 고칠 단어로 움직여 3에서 4까지를 반복합니다.
참고: 그렇게 하시면 고작 줄의 끝에 추가를 하기 위해 i를 누르고, 커서 아래에
있던 글자를 반복하고, 글을 끼워넣고, <ESC>를 눌러 명령 모드로 돌아와서,
커서를 오른쪽으로 옮기고 마지막으로 x까지 눌러야 하는 번거로움을 피하실
수 있습니다.
3. 이제 첫 줄을 완성하십시오. 추가 명령은 텍스트가 입력되는 위치 외에는
편집 모드와 완전히 같다는 것을 유념하십시오.
---> This li will allow you to pract appendi text to a line.
---> This line will allow you to practice appending text to a line.
참고: a, i 그리고 A 는 텍스트가 입력되는 위치 외에는 편집 모드와 완전히 같다는 것을 유념하십시오.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 6.3: 치환(REPLACE) 의 다른 버전
** 대문자 R 을 입력하면 하나 이상의 글자를 바꿀 수 있습니다. **
1. ---> 로 표시된 첫번째 줄로 움직여 커서를 xxx의 앞으로 옮깁니다.
2. R 을 입력한 후, 두번째 줄과 같은 숫자를 입력해 xxx를 치환합니다.
3. <ESC> 를 눌러 치환 모드를 빠져나갑니다. 나머지 문장은 그대로 남아 있는지 확인합니다.
4. 위 단계들 반복하여 남은 모든 xxx를 치환합니다.
---> Adding 123 to xxx gives you xxx.
---> Adding 123 to 456 gives you 579.
주의: 치환 모드는 편집 모드와 비슷합니다. 하지만 입력된 문자들이 원래 문자들을 삭제하는 점이 다릅니다.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 6.4: 문자 복사 붙여넣기(COPY AND PASTE)
** y 를 이용해 복사하고 p 로 붙여 넣습니다. **
1. ---> 로 표시된 줄로 움직여 커서를 "a)" 뒤로 옮깁니다.
2. v 를 눌러 비주얼 모드를 시작하고 "first" 바로 앞까지 커서를 움직입니다.
3. y 를 눌러 하이라이트 된 부분을 복사(yank (copy))합니다.
4. 커서를 다음 문장의 끝으로 옮깁니다: j$
5. p 를 눌러 문자열을 붙여 넣습니다.(paste) 그리고 second <ESC> 를 입력합니다.
6. 비주얼 모드를 이용해 " item."을 선택, y 로 복사, j$ 으로 다음 문장 끝으로 움직여
p 로 단어를 붙여 넣습니다.
---> a) this is the first item.
b)
참고: y 역시 명령어로 사용 가능합니다. 예를 들어, yw 는 한 단어를 복사합니다.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 6.5: 옵션 설정(SET)
** 찾기나 바꾸기에서 대소문자 구분을 없애기 위해 옵션을 설정합니다 **
1. 다음을 입력하여 'ignore' 를 찾으십시오: /ignore <ENTER>
n 키를 이용하여 여러번 반복하십시오.
2. 'ic' (대소문자 구별 안함, Ignore case) 옵션을 설정하십시오:
:set ic
3. n 키를 눌러서 'ignore' 를 다시 찾아보십시오.
이제 ignore과 IGNORE 모두 검색되는 점을 주목합니다.
4. 'hlsearch' 와 'incsearch' 옵션을 설정합시다.
:set hls is
5. 찾기 명령을 다시 입력하여, 어떤 일이 일어나는지 확인해 보십시오:
/ignore
6. 대소문자 구별을 끄기 위해서는, 다음과 같이 입력합니다:
:set noic
참고: 찾은 내용이 강조(HIGHLIGHT)된 것을 없애려면: :nohlsearch
참고: 만약, 검색 한번에 대해서만 대소문자 구별 세팅을 끄고 싶다면 \c 를 이용할 수 있습니다.
: /ignore\c <ENTER>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LESSON 6 요약
1. o 를 입력하면 커서 *아래에* 한 줄이 열리며, 커서는 편집 모드로
열린 줄 위에 위치하게 됩니다.
대문자 O 를 입력하면 커서가 있는 줄의 *위로* 새 줄을 열게 됩니다.
2. a 를 입력하면 커서 *다음에* 글을 입력할 수 있습니다.
대문자 A 를 입력하면 자동으로 그 줄의 끝에 글자를 추가하게 됩니다.
3. e 를 입력하면 단어의 끝으로 움직입니다.
4. y 를 입력하면 복사(yank (copy))를, p 를 입력하면 붙여 넣기가 됩니다.
5. 대문자 R 을 입력하면 <ESC> 를 눌러서 나가기 전까지 바꾸기 모드가 됩니다.
6. ":set xxx" 를 하면 "xxx" 옵션이 설정됩니다.:
'ic' 'ignorecase' 검색시 대소문자 구별을 하지 않습니다.
'is' 'incsearch' 검색어에서 부분 검색 결과를 보여줍니다.
'hls' 'hlsearch' 검색 결과값을 하이라이트해줍니다.
옵션은 전체 이름 혹은 줄인 이름 모두 사용 가능합니다.
7. 앞에 "no"를 붙여 옵션을 끌 수 있습니다: :set noic
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LESSON 7.1: 온라인 도움말 명령
** 온라인 도움말 시스템 사용하기 **
빔은 폭 넓은 온라인 도움말 시스템을 제공합니다. 도움말을 보려면,
다음 세가지 중 하나를 시도해보십시오:
- <HELP> 키를 누른다. (키가 있는 경우)
- <F1> 키를 누른다. (키가 있는 경우)
- :help <ENTER> 라고 입력한다.
도움말 창을 닫으려면 :q <ENTER> 라고 입력하십시오.
CTRL-W CTRL-W 다른쪽 윈도우로 넘어갑니다.
:q <ENTER> 도움말 윈도우를 닫습니다.
":help" 라는 명령에 인자를 주면 어떤 주제에 관한 도움말을 찾을 수 있습니다.
다음 명령을 내려 보십시오. ( <ENTER> 키를 누르는 것을 잊지 마십시오.)
:help w
:help c_CTRL-D
:help insert-index
:help user-manual
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LESSON 7.2: 시작 스크립트 만들기
** 빔의 기능 켜기 **
빔은 Vi 보다 훨씬 많은 기능을 가지고 있지만, 대부분은 기본적으로 작동하지
않습니다. 더 많은 기능을 써보려면, "vimrc" 라는 파일을 만들어야 합니다.
1. "vimrc" 파일을 수정합시다. 이 파일은 사용하는 시스템에 따라 다릅니다:
:e ~/.vimrc Unix의 경우
:e $VIM/_vimrc MS-Windows의 경우
2. 이제 "vimrc"의 예제를 읽어들입니다:
:r $VIMRUNTIME/vimrc_example.vim
3. 다음과 같이 하여 파일을 저장합니다:
:w
다음 번에 빔을 시작하면, 구문 강조(syntax highlighting)이 사용될 것입니다.
모든 원하는 설정을 이 "vimrc" 파일에 넣어둘 수 있습니다.
더 자세한 내용은 :help vimrc-intro를 참고 하세요.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 7.3: 명령어 완성하기
** CTRL-D 와 <TAB> 이용하여 명령어를 완성할 수 있습니다.**
1. 먼저 vim이 호환 모드가 아닌지를 확인합니다: :set nocp
2. 디렉토리에 파일이 존재하는지 먼저 확인 합니다.: :!ls 혹은 :!dir
3. 다음과 같이 명령어를 입력합니다: :e
4. CTRL-D 를 누르면 "e"로 시작하는 모든 명령어들을 볼 수 있습니다.
5. <TAB> 을 눌러 ":edit" 명령어를 완성해 봅니다.
6. 이제 빈칸 하나를 추가한 뒤, 존재 파일 이름을 앞 부분을 입력합니다: :edit FIL
7. <TAB> 을 눌러 파일 이름을 완성 시킵니다.
참고: 완성하기는 많은 명령어에서 사용할 수 있습니다. CTRL-D와 <TAB> 만 누르세요!
특히, :help 에서 유용할 것입니다.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 7 요약
1. 도움말을 열기 위해 :help 혹은 <F1> 혹은 <Help> 를 누릅니다.
2. cmd 에 대한 도움말을 보기 위해서는 :help cmd 를 입력합니다.
3. CTRL-W CTRL-W 를 이용해 다른 윈도우로 넘어갑니다.
4. :q 로 도움말 윈도우를 빠져나옵니다.
5. vimrc 시작 스크립트를 이용해 선호하는 세팅을 유지할 수 있습니다.
6. : 명령어를 입력할때, CTRL-D 를 눌러 가능한 명령어들을 볼수 있습니다.
<TAB> 을 눌러 완성 가능합니다.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
이것으로 빔 길잡이를 마칩니다. 이 길잡이는 빔 편집기에 대한 간략한 개요를
보여주기 위한 의도로 제작되었으며, 이 편집기를 정말 간단히 사용하기에
충분할 뿐입니다. 빔에는 이 길잡이와는 비교할 수 없을 만큼 훨씬 많은 명령이
있습니다. 다음 사용자 매뉴얼을 읽으십시오: ":help user-manual"
보다 자세히 읽고 공부하려면, 다음 책을 추천해 드립니다:
Vim - Vi Improved - by Steve Oualline
출판사: New Riders
이 책은 완전히 빔에 대해서만 다루고 있습니다. 특히 초보자들에게 유용합니다.
많은 예제와 그림이 있습니다.
다음을 참고하십시오: http://iccf-holland.org/click5.html
다음 책은 좀 오래된 책으로 빔보다는 Vi에 대해 다루고 있지만, 역시 추천할 만
합니다:
Learning the Vi Editor - by Linda Lamb
출판사: O'Reilly & Associates Inc.
Vi로 하고 싶은 거의 모든 것에 대해 알 수 있는 좋은 책입니다.
여섯번째 개정판은 빔에 관한 내용을 포함하고 있습니다.
이 길잡이는 Colorado School of Mines의 Michael C. Pierce 와
Robert K. Ware 가 Colorado State University의 Charles Smith 의 아이디어에
착안하여 썼습니다.
. E-mail: bware@mines.colorado.edu.
Modified for Vim by Bram Moolenaar.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -1,5 +1,5 @@
=============================================================================== ===============================================================================
= 빔 길잡이 (VIM Tutor) 에 오신 것을 환영합니다 - Version 1.5 = = 빔 길잡이 (VIM Tutor) 에 오신 것을 환영합니다 - Version 1.7 =
=============================================================================== ===============================================================================
빔(Vim)은 이 길잡이에서 다 설명할 수 없을 만큼 많은 명령을 가진 빔(Vim)은 이 길잡이에서 다 설명할 수 없을 만큼 많은 명령을 가진
@ -32,15 +32,15 @@
1. 익숙해질 때까지 커서를 스크린 상에서 움직여 보십시오. 1. 익숙해질 때까지 커서를 스크린 상에서 움직여 보십시오.
2. 아래 방향키 (j)를 반복입력이 될 때까지 누르고 계십시오. 2. 아래 방향키 (j)를 반복입력이 될 때까지 누르고 계십시오.
---> 이제 다음 lesson으로 가는 방법을 알게 되었습니다. 이제 다음 lesson으로 가는 방법을 알게 되었습니다.
3. 아래 방향키를 이용하여, Lesson 1.2 로 가십시오. 3. 아래 방향키를 이용하여, Lesson 1.2 로 가십시오.
참고: 원하지 않는 무언가가 입력이 되었다면, <ESC>를 눌러서, 명령 모드로 참고: 원하지 않는 무언가가 입력이 되었다면, <ESC>를 눌러서, 명령 모드로
돌아가십시오. 그 후에 원하는 명령을 다시 입력하십시오. 돌아가십시오. 그 후에 원하는 명령을 다시 입력하십시오.
참고: 커서키 또한 작동할 것입니다. 하지만 hjkl에 익숙해지면, 커서키보다 참고: 커서키 또한 작동할 것입니다. 하지만 hjkl에 익숙해지면, 커서키보다
훨씬 빠르게 이동할 수 있을 것입니다. 훨씬 빠르게 이동할 수 있을 것입니다. 정말요!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 1.2: 빔을 시작하고 끝내기 Lesson 1.2: 빔을 시작하고 끝내기
@ -51,10 +51,7 @@
1. <ESC> 키를 눌러서 확실하게 명령 모드로 빠져 나옵니다. 1. <ESC> 키를 눌러서 확실하게 명령 모드로 빠져 나옵니다.
2. 다음과 같이 입력합니다: :q! <ENTER> 2. 다음과 같이 입력합니다: :q! <ENTER>
이렇게 하면, 바뀐 내용을 *저장하지 않고* 편집기를 빠져나갑니다.
---> 이렇게 하면, 바뀐 내용을 *저장하지 않고* 편집기를 빠져나갑니다.
저장한 후 빠져나가려면 다음과 같이 입력합니다:
:wq <ENTER>
3. 쉘 프롬프트가 보인다면, 다시 길잡이로 돌아오기 위해 다음과 같이 3. 쉘 프롬프트가 보인다면, 다시 길잡이로 돌아오기 위해 다음과 같이
입력합니다. 입력합니다.
@ -66,8 +63,12 @@
파일을 뜻합니다. 파일을 뜻합니다.
4. 위에서 이야기한 단계를 기억하였으며, 확신이 서면, 1에서 3까지를 4. 위에서 이야기한 단계를 기억하였으며, 확신이 서면, 1에서 3까지를
수행하여 편집기를 나갔다가 다시 들어와보십시오. 그 후 커서를 아래로 수행하여 편집기를 나갔다가 다시 들어와 보십시오.
움직여 Lesson 1.3 으로 가십시오.
주의: :q! <ENTER> 는 바뀐 내용을 저장하지 않습니다. 이 후 lesson에서
어떻게 편집 내용을 저장하는지 배울 수 있습니다.
5. 그 후 커서를 아래로 움직여 Lesson 1.3 으로 가십시오.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 1.3: 텍스트 편집 - 지우기 Lesson 1.3: 텍스트 편집 - 지우기
@ -110,10 +111,55 @@
---> There is text misng this . ---> There is text misng this .
---> There is some text missing from this line. ---> There is some text missing from this line.
5. 텍스트를 삽입하는 데에 익숙해졌다면, 요약을 봐주십시오. 5. 텍스트를 삽입하는 데에 익숙해졌다면, Lesson 1.5로 가십시오.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 1.5: 택스트 편집 - 추가 (APPENDING)
** A 를 입력해 텍스트를 추가할 수 있습니다. **
1. 커서를 첫번째 ---> 로 표시된 줄로 움직입니다.
커서가 문장 내 어디에 있던 상관없습니다.
2. A 키를 눌러 필요한 내용을 입력합니다.
3. 내용을 모두 입력한 후 <ESC>를 눌러 명령 모드로 돌아갑니다.
4. 커서를 두번째 ---> 로 표시된 줄로 움직입니다.
문장을 올바르게 만들기 위해 2에서 3의 과정을 반복합니다.
---> There is some text missing from th
There is some text missing from this line.
---> There is also some text miss
There is also some text missing here.
5. 텍스트를 추가하는 데 익숙해졌다면, Lesson 1.6으로 가십시오.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 1.6: 파일 편집
** :wq 를 이용하여 파일을 저장하고 빠져나갈 수 있습니다. **
!! 주의: 아래 있는 단계를 실행하기 전에, 이 lesson 전체를 읽으십시오!!
1. lesson 1.2에서 배웠던 것처럼 :q!로 편집기를 나갈 수 있습니다.
만약, 다른 터미널에 접근 가능하다면, 아래의 단계를 다른 터미널에서 해봅니다.
2. 쉘 프롬프트에 다음과 같이 입력합니다: vim tutor <ENTER>
'vim' 은 빔 에디터 시작을 위한 명령어, 'tutor'는 수정하고자 하는
파일의 이름 입니다.
3. 앞에서 배웠던 것처럼 텍스트를 삽입하고 지워보세요.
4. 다음 명령어를 이용해 파일 수정 부분을 저장하고 빠져나갑니다: :wq <ENTER>
5. 만약 1에서 vimtutor를 빠져나갔다가 다시 들어왔다면, 아래로 움직여 요약으로 넘어가도록 합시다.
6. 위 모든 단계를 다 읽고 이해한 후에 직접 해보세요.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LESSON 1 요약 LESSON 1 요약
@ -129,14 +175,14 @@
4. 명령 모드에서 커서가 위치한 곳의 글자를 지우려면 x 를 입력합니다. 4. 명령 모드에서 커서가 위치한 곳의 글자를 지우려면 x 를 입력합니다.
5. 명령 모드에서 커서가 위치한 곳에 텍스트를 삽입하려면 5. 명령 모드에서 커서가 위치한 곳에 텍스트를 삽입하려면
i 를 누른 후 텍스트를 입력하고 <ESC> 를 누릅니다. i 를 누른 후 텍스트를 입력하고 <ESC> 커서 앞에 삽입합니다.
A 를 누른 후 텍스트를 입력하고 <ESC> 문장 뒤에 추가 합니다.
참고: <ESC>는 명령 모드로 돌아가는 데 쓰며, 원치 않는 명령이나 완전히 입력되지 참고: <ESC>는 명령 모드로 돌아가는 데 쓰며, 원치 않는 명령이나 완전히 입력되지
않은 명령을 취소하는 데에도 씁니다. 않은 명령을 취소하는 데에도 씁니다.
그럼 Lesson 2를 시작합시다. 그럼 Lesson 2를 시작합시다.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 2.1: 삭제(DELETION) 명령 Lesson 2.1: 삭제(DELETION) 명령
@ -180,15 +226,16 @@
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 2.3: 명령과 적용 대상에 대해 Lesson 2.3: 명령과 적용 대상에 대해
삭제 명령 d의 형식은 다음과 같습니다. 삭제 명령 d의 형식은 다음과 같습니다.
[횟수] d 대상 또는 d [횟수] 대상 d 대상
여기서
횟수 - 명령을 몇 번 수행할 지 (옵션, 기본값=1). 여기서:
d - 지우는 명령 d - 지우는 명령
대상 - 아래에 제시된 대상에 대해 명령을 수행 대상 - 아래에 제시된 대상에 대해 명령을 수행
@ -197,13 +244,51 @@
e - 커서에서 그 단어의 끝까지 (공백을 포함하지 않음.) e - 커서에서 그 단어의 끝까지 (공백을 포함하지 않음.)
$ - 커서에서 그 줄의 끝까지 $ - 커서에서 그 줄의 끝까지
예를 들어, de 는 커서의 위치부터 해당 단어의 끝까지 지웁니다.
참고: 호기심이 있다면, 명령 모드에서 명령 없이 대상을 입력해보십시오. 참고: 호기심이 있다면, 명령 모드에서 명령 없이 대상을 입력해보십시오.
위에서 이야기한 대상의 목록에 따라 커서가 움직이게 됩니다. 위에서 이야기한 대상의 목록에 따라 커서가 움직이게 됩니다.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 2.4: 대상에 반복 적용하기
** 대상 이전에 숫자를 넣어주면 그 만큼 반복 됩니다. **
1. 아래에 ---> 로 표시된 줄 까지 커서를 옮깁니다.
2. 2w 입력하여 커서를 단어 두 개 뒤로 옮깁니다.
3. 3e 입력하여 커서를 뒤로 세 번째 단어의 끝으로 옮깁니다.
4. 0 (zero) 를 입력하여 문장의 시작부분으로 움직입니다.
5. 2에서 3까지를 다른 숫자로 반복해 봅니다.
---> This is just a line with words you can move around in.
6. Lesson 2.5로 가십시오.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 2.4: '명령-대상' 에 대한 예외 Lesson 2.5: 삭제에 반복 적용하기
** 명령과 숫자를 함께 사용하면 그만큼 반복 수행 됩니다. **
위에서 삭제 명령과 대상의 조합과 같이, 대상 이전에 횟수를 넣어 더 많이 삭제 할 수 있습니다:
d 횟수 대상
1. 아래 ---> 표시된 줄에서 커서를 첫번째 대문자 단어로 옮깁니다.
2. d2w를 입력하여 두 대문자 단어를 지웁니다.
3. 이어지는 대문자 단어들을 1에서 2까지의 단계를 이용해 횟수를 바꾸어 삭제해 봅니다.
---> this ABC DE line FGHI JK LMN OP of words is Q RS TUV cleaned up.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 2.6: 줄 전체 조작하기
** dd 라고 치면 줄 전체를 지웁니다. ** ** dd 라고 치면 줄 전체를 지웁니다. **
@ -216,17 +301,17 @@
3. 그런 다음 네번째 줄로 가십시오. 3. 그런 다음 네번째 줄로 가십시오.
4. 2dd 라고 입력하여 두줄을 지웁니다. ( 횟수-명령-대상을 기억하세요. ) 4. 2dd 라고 입력하여 두줄을 지웁니다. ( 횟수-명령-대상을 기억하세요. )
1) Roses are red, ---> 1) Roses are red,
2) Mud is fun, ---> 2) Mud is fun,
3) Violets are blue, ---> 3) Violets are blue,
4) I have a car, ---> 4) I have a car,
5) Clocks tell time, ---> 5) Clocks tell time,
6) Sugar is sweet ---> 6) Sugar is sweet
7) And so are you. ---> 7) And so are you.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 2.5: 취소(UNDO) 명령 Lesson 2.7: 취소(UNDO) 명령
** u 를 누르면 마지막 명령이 취소되며, U 는 줄 전체를 수정합니다. ** ** u 를 누르면 마지막 명령이 취소되며, U 는 줄 전체를 수정합니다. **
@ -252,20 +337,22 @@
1. 커서가 위치한 곳부터 단어의 끝까지 지우려면: dw 1. 커서가 위치한 곳부터 단어의 끝까지 지우려면: dw
2. 커서가 위치한 곳부터 줄 끝까지 지우려면: d$ 2. 커서가 위치한 곳부터 줄 끝까지 지우려면: d$
3. 줄 전체를 지우려면: dd 3. 줄 전체를 지우려면: dd
4. 명령 모드에서 내리는 명령의 형식은 다음과 같습니다: 4. 횟수와 함께 대상을 반복 시키려면: 2w
5. 명령 모드에서 내리는 명령의 형식은 다음과 같습니다:
[횟수] 명령 대상 또는 명령 [횟수] 대상 [횟수] 명령 대상 또는 명령 [횟수] 대상
여기서: 여기서:
횟수 - 그 명령을 몇 번 반복할 것인가 횟수 - 그 명령을 몇 번 반복할 것인가
명령 - 어떤 명령을 내릴 것인가 ( 예를 들어, 삭제인 경우는 d ) 명령 - 어떤 명령을 내릴 것인가 ( 예를 들어, 삭제인 경우는 d )
대상 - 명령이 동작할 대상, 예를 들어 w (단어), $ (줄의 끝) 등. 대상 - 명령이 동작할 대상, 예를 들어 w (단어), $ (줄의 끝) 등.
5. 이전 행동을 취소하려면: u (소문자 u) 6. 커서를 문장 맨 앞으로 옮기려면: 0
7. 이전 행동을 취소하려면: u (소문자 u)
한 줄에서 수정한 것을 모두 취소하려면: U (대문자 U) 한 줄에서 수정한 것을 모두 취소하려면: U (대문자 U)
취소한 것을 다시 실행하려면: CTRL-R 취소한 것을 다시 실행하려면: CTRL-R
@ -319,13 +406,13 @@
Lesson 3.3: 변환(CHANGE) 명령 Lesson 3.3: 변환(CHANGE) 명령
** 한 단어의 일부나 전체를 바꾸려면, cw 를 치십시오. ** ** 한 단어의 전체를 바꾸려면, ce 를 치십시오. **
1. 커서를 ---> 로 표시된 첫줄로 옮깁니다. 1. 커서를 ---> 로 표시된 첫줄로 옮깁니다.
2. 커서를 lubw 에서 u 위에 올려놓습니다. 2. 커서를 lubw 에서 u 위에 올려놓습니다.
3. cw 라고 명령한 후 단어를 정확하게 수정합니다. (이 경우, 'ine' 를 칩니다.) 3. ce 라고 명령한 후 단어를 정확하게 수정합니다. (이 경우, 'ine' 를 칩니다.)
4. <ESC> 를 누른 후 다음 에러로 갑니다 (수정되어야할 첫 글자로 갑니다.) 4. <ESC> 를 누른 후 다음 에러로 갑니다 (수정되어야할 첫 글자로 갑니다.)
@ -334,8 +421,8 @@
---> This lubw has a few wptfd that mrrf changing usf the change command. ---> This lubw has a few wptfd that mrrf changing usf the change command.
---> This line has a few words that need changing using the change command. ---> This line has a few words that need changing using the change command.
cw 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있도록 한다는 것에 ce 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있도록 한다는 것에
의합시다. 의합시다.
@ -361,7 +448,7 @@ cw 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있
---> The end of this line needs some help to make it like the second. ---> The end of this line needs some help to make it like the second.
---> The end of this line needs to be corrected using the c$ command. ---> The end of this line needs to be corrected using the c$ command.
참고: 입력하는 동안은 백스페이스를 이용할 수 있습니다.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LESSON 3 요약 LESSON 3 요약
@ -375,7 +462,7 @@ cw 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있
바꾸어 넣을 글자를 입력합니다. 바꾸어 넣을 글자를 입력합니다.
3. 변환 명령(CHANGE)은 커서에서 부터 지정한 대상의 끝까지 바꿀 수 있는 3. 변환 명령(CHANGE)은 커서에서 부터 지정한 대상의 끝까지 바꿀 수 있는
명령입니다. 예를 들어, 커서 위치에서 단어의 끝까지 바꾸려면, cw 명령입니다. 예를 들어, 커서 위치에서 단어의 끝까지 바꾸려면 ce
입력하면 되며, c$ 는 줄 끝까지 바꾸는 데 쓰입니다. 입력하면 되며, c$ 는 줄 끝까지 바꾸는 데 쓰입니다.
4. 변환 명령의 형식은 다음과 같습니다: 4. 변환 명령의 형식은 다음과 같습니다:
@ -390,8 +477,8 @@ cw 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있
Lesson 4.1: 위치와 파일의 상태 Lesson 4.1: 위치와 파일의 상태
** CTRL-g 를 누르면 파일 내에서의 현재 위치와 파일의 상태를 볼 수 있습니다. ** CTRL-G 를 누르면 파일 내에서의 현재 위치와 파일의 상태를 볼 수 있습니다.
SHIFT-G 를 누르면 파일 내의 줄로 이동합니다. ** G 를 누르면 파일 내의 마지막 줄로 이동합니다. **
주의: 아래의 단계를 따라하기 전에, 이 Lesson 전체를 먼저 읽으십시오. 주의: 아래의 단계를 따라하기 전에, 이 Lesson 전체를 먼저 읽으십시오.
@ -399,10 +486,14 @@ cw 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있
표시된 상태줄이 화면 아래에 표시될 것입니다. 3번째 단계를 위해 그 표시된 상태줄이 화면 아래에 표시될 것입니다. 3번째 단계를 위해 그
줄 번호를 기억하고 계십시오. 줄 번호를 기억하고 계십시오.
2. SHIFT-G 를 누르면 파일의 마지막으로 이동합니다. 참고: 커서가 화면 오른쪽 하단으로 옮겨진 것을 보인다면,
이는 'ruler' 옵션을 세팅된 경우 입니다. (:help 'ruler' 를 참고 하세요.)
3. 아까 기억했던 줄 번호를 입력한 후 SHIFT-G 를 누르십시오. 이렇게 하면 2. G 를 누르면 파일의 마지막으로 이동합니다.
처음에 CTRL-g 를 눌렀던 장소로 되돌아가게 될 것입니다. gg 를 누르면 파일의 시작 부분으로 이동합니다.
3. 아까 기억했던 줄 번호를 입력한 후 G 를 누르십시오. 이렇게 하면
처음에 CTRL-G 를 눌렀던 장소로 되돌아가게 될 것입니다.
(번호를 입력할 때, 이것은 화면에 표시되지 않습니다.) (번호를 입력할 때, 이것은 화면에 표시되지 않습니다.)
4. 자신이 생겼다면, 1에서 3까지를 실행해보십시오. 4. 자신이 생겼다면, 1에서 3까지를 실행해보십시오.
@ -425,6 +516,9 @@ cw 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있
4. 문구를 역방향으로 찾으려면, / 대신 ? 를 이용하면 됩니다. 4. 문구를 역방향으로 찾으려면, / 대신 ? 를 이용하면 됩니다.
5. 원래 있던 곳으로 돌아가기 위해서는 CTRL-O 를 이용하면 됩니다. 반복하면 더 이전으로도
갈 수 있습니다. CTRL-I 로 다시 뒤로 갈 수도 있습니다.
---> "errroor" is not the way to spell error; errroor is an error. ---> "errroor" is not the way to spell error; errroor is an error.
참고: 찾는 중에 파일의 끝에 다다르게 되면, 파일의 처음부터 다시 찾게 됩니다. 참고: 찾는 중에 파일의 끝에 다다르게 되면, 파일의 처음부터 다시 찾게 됩니다.
@ -444,17 +538,16 @@ cw 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있
4. % 를 입력하여, 이전 괄호로 되돌아 옵시다. 4. % 를 입력하여, 이전 괄호로 되돌아 옵시다.
5. 커서를 다른 (,),[,],{ 혹은 } 로 움직여 % 를 입력해 봅니다.
---> This ( is a test line with ('s, ['s ] and {'s } in it. )) ---> This ( is a test line with ('s, ['s ] and {'s } in it. ))
참고: 짝이 맞지 않는 괄호가 있는 프로그램을 디버깅할 때에 매우 유용합니다! 참고: 짝이 맞지 않는 괄호가 있는 프로그램을 디버깅할 때에 매우 유용합니다!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 4.4: 에러를 수정하는 방법 Lesson 4.4: 치환(SUBTITUTE) 명령
** :s/old/new/g 하면 'old' 를 'new' 로 치환(SUBTITUTE)합니다. ** ** :s/old/new/g 하면 'old' 를 'new' 로 치환(SUBTITUTE)합니다. **
@ -472,22 +565,22 @@ cw 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있
4. 두 줄 사이의 모든 문자열에 대해 치환하려면 다음과 같이 합니다, 4. 두 줄 사이의 모든 문자열에 대해 치환하려면 다음과 같이 합니다,
:#,#s/old/new/g #,# 는 두 줄의 줄번호를 뜻합니다. :#,#s/old/new/g #,# 는 두 줄의 줄번호를 뜻합니다.
:%s/old/new/g 파일 전체에서 발견된 모든 것을 치환하는 경우입니다. :%s/old/new/g 파일 전체에서 발견된 모든 것을 치환하는 경우입니다.
:%s/old/new/gc 파일 전체에서 발견된 모든 것을 찾고, 치환할지 안
할지 프롬프트로 명령합니다.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LESSON 4 요약 LESSON 4 요약
1. CTRL-G 파일의 상태와 파일 내에서의 현재 위치를 표시합니다.
1. CTRL-g 는 파일의 상태와 파일 내에서의 현재 위치를 표시합니다. G 파일의 끝으로 이동합니다.
SHIFT-G 는 파일의 끝으로 이동합니다. 줄번호를 입력한 후 SHIFT-G를 숫자 G 해당 줄로 이동합니다.
입력하면, 그 줄로 이동합니다. gg 첫 번째 라인으로 이동합니다.
2. / 를 입력한 후 문구를 입력하면 그 문구를 아랫방향으로 찾습니다. 2. / 를 입력한 후 문구를 입력하면 그 문구를 아랫방향으로 찾습니다.
? 를 입력한 후 문구를 입력하면 윗방향으로 찾습니다. ? 를 입력한 후 문구를 입력하면 윗방향으로 찾습니다.
검색 후, n 을 입력하면 같은 방향으로 다음 문구를 찾으며, 검색 후, n 을 입력하면 같은 방향으로 다음 문구를 찾으며,
Shift-N 을 입력하면 반대 방향으로 찾습니다. Shift-N 을 입력하면 반대 방향으로 찾습니다.
CTRL-O 는 과거의 위치로, CTRL-I는 새로운 위치로 옮겨줍니다.
3. 커서가 (,),[,],{,} 위에 있을 때에 % 를 입력하면 상응하는 짝을 3. 커서가 (,),[,],{,} 위에 있을 때에 % 를 입력하면 상응하는 짝을
찾아갑니다. 찾아갑니다.
@ -548,25 +641,23 @@ cw 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 5.3: 선택적으로 저장하는 명령 Lesson 5.3: 선택적으로 저장하는 명령
** 파일의 일부를 저장하려면, v 대상 :w FILENAME 을 입력합니다. **
** 파일의 일부를 저장하려면, :#,# w FILENAME 하십시오. ** 1. 이 줄로 커서를 가져옵니다.
1. 다시 한번, :!dir 이나 :!ls 를 입력하여 디렉토리의 목록을 받아온 후
TEST 같은 적합한 이름을 선택합니다.
2. 커서를 이 페이지의 처음으로 옮긴 후, Ctrl-g 를 입력하여 그 줄의 줄번호를
알아냅니다. 이 번호를 기억하십시오!
3. 이제 이 페이지의 마지막으로 가서 Ctrl-g 를 다시 입력하십시오. 이 줄의
줄번호 또한 기억하십시오!
4. 어떤 섹션만 파일로 저장하려면, :#,# w TEST 를 입력하면 됩니다. 이 때
#,# 는 아까 기억했던 시작과 끝 줄번호 입니다. TEST는 파일 이름입니다.
5. :!dir 을 이용하여 파일이 만들어졌는지 확인하십시오. 지우지는 마십시오.
2. v 를 누르고 커서를 아래 다섯번째로 옮깁니다. 이 때, 문자열들이 하이라이트 됨을 주목합니다.
3. : 를 누릅니다. 화면 하단에 :'<,'> 가 나타납니다.
4. w TEST 를 입력합니다. 여기서 TEST는 파일 이름이며 아직 생성되어 있지 않습니다. <ENTER>를
누르기 전, :'<,'>w TEST 로 입력되었는지 확인 합니다.
5. 빔은 선택된 문장들을 TEST 파일에 입력합니다. :!dir 혹은 :!ls를 이용하여 파일이 만들어졌는지
확인하십시오. 아직 삭제하지 마십시오! 다음 레슨에서 이 파일을 사용합니다.
참고 : v 를 눌러 비주얼(Visual) 선택을 시작합니다. 커서를 주변으로 움직여 선택 부분을 조절할 수
있습니다. 그리고 명령어를 이용해 해당 문자열을 조작할 수 있습니다. 예를 들어, d 를 이용해
삭제할 수도 있습니다.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 5.4: 파일 읽어들이기, 합치기 Lesson 5.4: 파일 읽어들이기, 합치기
@ -574,22 +665,19 @@ cw 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있
** 어떤 파일의 내용을 삽입하려면, :r FILENAME 하십시오 ** ** 어떤 파일의 내용을 삽입하려면, :r FILENAME 하십시오 **
1. :!dir 을 입력하여 아까 만든 TEST 파일이 그대로 있는지 확인하십시오. 1. 커서를 이 라인 바로 위로 옮기십시오.
2. 커서를 이 페이지의 처음으로 움직이십시오. 주의: 3번째 단계를 실행하면, Lesson 5.3 을 보게 될 것입니다. 그렇게 되면
주의: 3번째 단계를 실행하면, Lesson 5.3 을 보게 될 것입니다. 그렇게 되면
이 lesson으로 다시 내려오십시오. 이 lesson으로 다시 내려오십시오.
2. 이제 TEST 파일을 읽어들입시다. :r TEST 명령을 사용하십시오. TEST 는
파일의 이름입니다. 읽어들인 파일은 커서가 위치한 문장 아래부터 놓이게 됩니다.
3. 이제 TEST 파일 읽어들입시다. :r TEST 명령을 사용하십시오. TEST 는 3. 파일 읽어들여진 것을 확인하기 위해, 뒤로 이동해서 기존 버전과 파일에서
파일의 이름입니다.
참고: 읽어들인 파일은 커서가 위치한 지점에서부터 놓이게 됩니다.
4. 파일이 읽어들여진 것을 확인하기 위해, 뒤로 이동해서 기존 버전과 파일에서
읽어들인 버전, 이렇게 Lesson 5.3 이 두번 반복되었음을 확인하십시오. 읽어들인 버전, 이렇게 Lesson 5.3 이 두번 반복되었음을 확인하십시오.
참고: 외부 명령어의 결과값도 읽을 수 있습니다. 예를 들어, :r !ls 는 ls 명령어에 대한 결과값을
읽어 커서 바로 아래에 합칩니다.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LESSON 5 요약 LESSON 5 요약
@ -605,14 +693,12 @@ cw 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있
2. :w FILENAME 하면 현재 빔에서 사용하는 파일을 FILENAME이라는 이름으로 2. :w FILENAME 하면 현재 빔에서 사용하는 파일을 FILENAME이라는 이름으로
디스크에 저장합니다. 디스크에 저장합니다.
3. :#,#w FILENAME 하면 #부터 #까지의 줄을 FILENAME이라는 파일로 저장합니다. 3. v 명령 :w FILENAME 은 비주얼 모드에서 선택된 문장들을 파일 FILENAME 저장합니다.
4. :r FILENAME 은 디스크에서 FILENAME이라는 파일을 불러들여서 커서 위치 4. :r FILENAME 은 디스크에서 FILENAME이라는 파일을 불러들여서 커서 위치
뒤에 현재 파일을 집어넣습니다. 뒤에 현재 파일을 집어넣습니다.
5. :r !dir 는 dir 명령어의 결과값을 현재 커서의 위치 아래에 붙힙니다.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -624,7 +710,6 @@ cw 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있
1. 아래에 ---> 로 표시된 줄로 커서를 옮기십시오. 1. 아래에 ---> 로 표시된 줄로 커서를 옮기십시오.
2. o (소문자)를 쳐서 커서 *아래에* 줄을 하나 여십시오. 편집 모드가 됩니다. 2. o (소문자)를 쳐서 커서 *아래에* 줄을 하나 여십시오. 편집 모드가 됩니다.
Insert mode.
3. ---> 로 표시된 줄을 복사한 후 <ESC> 를 눌러서 편집 모드에서 나오십시오. 3. ---> 로 표시된 줄을 복사한 후 <ESC> 를 눌러서 편집 모드에서 나오십시오.
@ -632,10 +717,8 @@ cw 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있
4. 커서 *위에* 줄을 하나 만드려면, 소문자 o 대신 대문자 O 를 치면 됩니다. 4. 커서 *위에* 줄을 하나 만드려면, 소문자 o 대신 대문자 O 를 치면 됩니다.
아래 있는 줄에 대해 이 명령을 내려보십시오. 아래 있는 줄에 대해 이 명령을 내려보십시오.
Open up a line above this by typing Shift-O while the cursor is on this line.
---> Open up a line above this by typing O while the cursor is on this line.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -644,11 +727,15 @@ Open up a line above this by typing Shift-O while the cursor is on this line.
** a 를 누르면 커서 *다음에* 글을 입력할 수 있습니다. ** ** a 를 누르면 커서 *다음에* 글을 입력할 수 있습니다. **
1. 커서를 ---> 로 표시된 첫번째 줄의 끝으로 옮깁니다. 명령 모드에서 1. 커서를 ---> 로 표시된 첫번째 줄의 끝으로 옮깁니다.
$ 를 이용하십시오.
2. e 를 눌러 li 의 끝으로 커서를 옮깁니다.
2. 소문자 a 를 커서 아래 글자 *다음*에 글을 추가할 수 있습니다. 3. 소문자 a 를 커서 아래 글자 *다음*에 글을 추가할 수 있습니다.
(대문자 A는 그 줄의 끝에 추가합니다.)
4. 아랫줄과 같이 문장을 완성해 봅니다. <ESC>를 이용해 편집(Insert) 모드를 나갑니다.
5. e 를 이용해 다음 고칠 단어로 움직여 3에서 4까지를 반복합니다.
참고: 그렇게 하시면 고작 줄의 끝에 추가를 하기 위해 i를 누르고, 커서 아래에 참고: 그렇게 하시면 고작 줄의 끝에 추가를 하기 위해 i를 누르고, 커서 아래에
있던 글자를 반복하고, 글을 끼워넣고, <ESC>를 눌러 명령 모드로 돌아와서, 있던 글자를 반복하고, 글을 끼워넣고, <ESC>를 눌러 명령 모드로 돌아와서,
@ -658,10 +745,10 @@ Open up a line above this by typing Shift-O while the cursor is on this line.
3. 이제 첫 줄을 완성하십시오. 추가 명령은 텍스트가 입력되는 위치 외에는 3. 이제 첫 줄을 완성하십시오. 추가 명령은 텍스트가 입력되는 위치 외에는
편집 모드와 완전히 같다는 것을 유념하십시오. 편집 모드와 완전히 같다는 것을 유념하십시오.
---> This line will allow you to practice ---> This li will allow you to pract appendi text to a line.
---> This line will allow you to practice appending text to the end of a line. ---> This line will allow you to practice appending text to a line.
참고: a, i 그리고 A 는 텍스트가 입력되는 위치 외에는 편집 모드와 완전히 같다는 것을 유념하십시오.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 6.3: 치환(REPLACE) 의 다른 버전 Lesson 6.3: 치환(REPLACE) 의 다른 버전
@ -669,37 +756,56 @@ Open up a line above this by typing Shift-O while the cursor is on this line.
** 대문자 R 을 입력하면 하나 이상의 글자를 바꿀 수 있습니다. ** ** 대문자 R 을 입력하면 하나 이상의 글자를 바꿀 수 있습니다. **
1. 커서를 ---> 로 표시된 첫번째 줄로 옮기십시오. 1. ---> 로 표시된 첫번째 줄로 움직여 커서를 xxx의 앞으로 옮깁니다.
2. 커서를 ---> 로 표시된 두번째 줄과 다른 첫번째 단어 위로 옮기십시오. 2. R 을 입력한 후, 두번째 줄과 같은 숫자를 입력해 xxx를 치환합니다.
('last' 입니다.)
3. R 을 입력한 후 첫번째 줄의 예전 텍스트 위에 새로운 글을 입력하여
나머지 내용이 두번째 줄과 같아지도록 바꿉시다.
---> To make the first line the same as the last on this page use the keys.
---> To make the first line the same as the second, type R and the new text.
4. <ESC> 를 눌러서 나가면, 바뀌지 않은 텍스트는 그대로 남게 됩니다.
3. <ESC> 를 눌러 치환 모드를 빠져나갑니다. 나머지 문장은 그대로 남아 있는지 확인합니다.
4. 위 단계들 반복하여 남은 모든 xxx를 치환합니다.
---> Adding 123 to xxx gives you xxx.
---> Adding 123 to 456 gives you 579.
주의: 치환 모드는 편집 모드와 비슷합니다. 하지만 입력된 문자들이 원래 문자들을 삭제하는 점이 다릅니다.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 6.4: 옵션 설정(SET) Lesson 6.4: 문자 복사 붙여넣기(COPY AND PASTE)
** y 를 이용해 복사하고 p 로 붙여 넣습니다. **
1. ---> 로 표시된 줄로 움직여 커서를 "a)" 뒤로 옮깁니다.
2. v 를 눌러 비주얼 모드를 시작하고 "first" 바로 앞까지 커서를 움직입니다.
3. y 를 눌러 하이라이트 된 부분을 복사(yank (copy))합니다.
4. 커서를 다음 문장의 끝으로 옮깁니다: j$
5. p 를 눌러 문자열을 붙여 넣습니다.(paste) 그리고 second <ESC> 를 입력합니다.
6. 비주얼 모드를 이용해 " item."을 선택, y 로 복사, j$ 으로 다음 문장 끝으로 움직여
p 로 단어를 붙여 넣습니다.
---> a) this is the first item.
b)
참고: y 역시 명령어로 사용 가능합니다. 예를 들어, yw 는 한 단어를 복사합니다.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 6.5: 옵션 설정(SET)
** 찾기나 바꾸기에서 대소문자 구분을 없애기 위해 옵션을 설정합니다 ** ** 찾기나 바꾸기에서 대소문자 구분을 없애기 위해 옵션을 설정합니다 **
1. 다음을 입력하여 'ignore' 를 찾으십시오: 1. 다음을 입력하여 'ignore' 를 찾으십시오: /ignore <ENTER>
/ignore n 키를 이용하여 여러번 반복하십시오.
n 키를 이용하여 여러번 반복하십시오.
2. 'ic' (대소문자 구별 안함, Ignore case) 옵션을 설정하십시오: 2. 'ic' (대소문자 구별 안함, Ignore case) 옵션을 설정하십시오:
:set ic :set ic
3. n 키를 눌러서 'ignore' 를 다시 찾아보십시오. 3. n 키를 눌러서 'ignore' 를 다시 찾아보십시오.
n 키를 계속 눌러서 여러번 찾으십시오. 이제 ignore과 IGNORE 모두 검색되는 점을 주목합니다.
4. 'hlsearch' 와 'incsearch' 옵션을 설정합시다. 4. 'hlsearch' 와 'incsearch' 옵션을 설정합시다.
:set hls is :set hls is
@ -707,8 +813,13 @@ Open up a line above this by typing Shift-O while the cursor is on this line.
5. 찾기 명령을 다시 입력하여, 어떤 일이 일어나는지 확인해 보십시오: 5. 찾기 명령을 다시 입력하여, 어떤 일이 일어나는지 확인해 보십시오:
/ignore /ignore
6. 찾은 내용이 강조(HIGHLIGHT)된 것을 없애려면, 다음과 같이 입력합니다: 6. 대소문자 구별을 끄기 위해서는, 다음과 같이 입력합니다:
:nohlsearch :set noic
참고: 찾은 내용이 강조(HIGHLIGHT)된 것을 없애려면: :nohlsearch
참고: 만약, 검색 한번에 대해서만 대소문자 구별 세팅을 끄고 싶다면 \c 를 이용할 수 있습니다.
: /ignore\c <ENTER>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LESSON 6 요약 LESSON 6 요약
@ -720,20 +831,22 @@ Open up a line above this by typing Shift-O while the cursor is on this line.
2. a 를 입력하면 커서 *다음에* 글을 입력할 수 있습니다. 2. a 를 입력하면 커서 *다음에* 글을 입력할 수 있습니다.
대문자 A 를 입력하면 자동으로 그 줄의 끝에 글자를 추가하게 됩니다. 대문자 A 를 입력하면 자동으로 그 줄의 끝에 글자를 추가하게 됩니다.
3. 대문자 R 을 입력하면 <ESC> 를 눌러서 나가기 전까지 바꾸기 모드가 됩니다. 3. e 를 입력하면 단어의 끝으로 움직입니다.
4. ":set xxx" 를 하면 "xxx" 옵션이 설정됩니다.
4. y 를 입력하면 복사(yank (copy))를, p 를 입력하면 붙여 넣기가 됩니다.
5. 대문자 R 을 입력하면 <ESC> 를 눌러서 나가기 전까지 바꾸기 모드가 됩니다.
6. ":set xxx" 를 하면 "xxx" 옵션이 설정됩니다.:
'ic' 'ignorecase' 검색시 대소문자 구별을 하지 않습니다.
'is' 'incsearch' 검색어에서 부분 검색 결과를 보여줍니다.
'hls' 'hlsearch' 검색 결과값을 하이라이트해줍니다.
옵션은 전체 이름 혹은 줄인 이름 모두 사용 가능합니다.
7. 앞에 "no"를 붙여 옵션을 끌 수 있습니다: :set noic
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LESSON 7: 온라인 도움말 명령 LESSON 7.1: 온라인 도움말 명령
** 온라인 도움말 시스템 사용하기 ** ** 온라인 도움말 시스템 사용하기 **
@ -745,18 +858,19 @@ Open up a line above this by typing Shift-O while the cursor is on this line.
- :help <ENTER> 라고 입력한다. - :help <ENTER> 라고 입력한다.
도움말 창을 닫으려면 :q <ENTER> 라고 입력하십시오. 도움말 창을 닫으려면 :q <ENTER> 라고 입력하십시오.
CTRL-W CTRL-W 다른쪽 윈도우로 넘어갑니다.
:q <ENTER> 도움말 윈도우를 닫습니다.
":help" 라는 명령에 인자를 주면 어떤 주제에 관한 도움말을 찾을 수 있습니다. ":help" 라는 명령에 인자를 주면 어떤 주제에 관한 도움말을 찾을 수 있습니다.
다음 명령을 내려 보십시오. ( <ENTER> 키를 누르는 것을 잊지 마십시오.) 다음 명령을 내려 보십시오. ( <ENTER> 키를 누르는 것을 잊지 마십시오.)
:help w :help w
:help c_<T :help c_CTRL-D
:help insert-index :help insert-index
:help user-manual :help user-manual
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LESSON 8: 시작 스크립트 만들기 LESSON 7.2: 시작 스크립트 만들기
** 빔의 기능 켜기 ** ** 빔의 기능 켜기 **
@ -764,20 +878,64 @@ Open up a line above this by typing Shift-O while the cursor is on this line.
않습니다. 더 많은 기능을 써보려면, "vimrc" 라는 파일을 만들어야 합니다. 않습니다. 더 많은 기능을 써보려면, "vimrc" 라는 파일을 만들어야 합니다.
1. "vimrc" 파일을 수정합시다. 이 파일은 사용하는 시스템에 따라 다릅니다: 1. "vimrc" 파일을 수정합시다. 이 파일은 사용하는 시스템에 따라 다릅니다:
1. Start editing the "vimrc" file, this depends on your system: :e ~/.vimrc Unix의 경우
:edit ~/.vimrc Unix의 경우 :e $VIM/_vimrc MS-Windows의 경우
:edit $VIM/_vimrc MS-Windows의 경우
2. 이제 "vimrc"의 예제를 읽어들입니다: 2. 이제 "vimrc"의 예제를 읽어들입니다:
:r $VIMRUNTIME/vimrc_example.vim
:read $VIMRUNTIME/vimrc_example.vim
3. 다음과 같이 하여 파일을 저장합니다: 3. 다음과 같이 하여 파일을 저장합니다:
:w
:write
다음 번에 빔을 시작하면, 구문 강조(syntax highlighting)이 사용될 것입니다. 다음 번에 빔을 시작하면, 구문 강조(syntax highlighting)이 사용될 것입니다.
모든 원하는 설정을 이 "vimrc" 파일에 넣어둘 수 있습니다. 모든 원하는 설정을 이 "vimrc" 파일에 넣어둘 수 있습니다.
더 자세한 내용은 :help vimrc-intro를 참고 하세요.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 7.3: 명령어 완성하기
** CTRL-D 와 <TAB> 이용하여 명령어를 완성할 수 있습니다.**
1. 먼저 vim이 호환 모드가 아닌지를 확인합니다: :set nocp
2. 디렉토리에 파일이 존재하는지 먼저 확인 합니다.: :!ls 혹은 :!dir
3. 다음과 같이 명령어를 입력합니다: :e
4. CTRL-D 를 누르면 "e"로 시작하는 모든 명령어들을 볼 수 있습니다.
5. <TAB> 을 눌러 ":edit" 명령어를 완성해 봅니다.
6. 이제 빈칸 하나를 추가한 뒤, 존재 파일 이름을 앞 부분을 입력합니다: :edit FIL
7. <TAB> 을 눌러 파일 이름을 완성 시킵니다.
참고: 완성하기는 많은 명령어에서 사용할 수 있습니다. CTRL-D와 <TAB> 만 누르세요!
특히, :help 에서 유용할 것입니다.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lesson 7 요약
1. 도움말을 열기 위해 :help 혹은 <F1> 혹은 <Help> 를 누릅니다.
2. cmd 에 대한 도움말을 보기 위해서는 :help cmd 를 입력합니다.
3. CTRL-W CTRL-W 를 이용해 다른 윈도우로 넘어갑니다.
4. :q 로 도움말 윈도우를 빠져나옵니다.
5. vimrc 시작 스크립트를 이용해 선호하는 세팅을 유지할 수 있습니다.
6. : 명령어를 입력할때, CTRL-D 를 눌러 가능한 명령어들을 볼수 있습니다.
<TAB> 을 눌러 완성 가능합니다.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -807,6 +965,4 @@ Open up a line above this by typing Shift-O while the cursor is on this line.
Modified for Vim by Bram Moolenaar. Modified for Vim by Bram Moolenaar.
이 문서의 한국어 버전에 관한 문의는 다음 사이트로 해주십시오.
http://wiki.kldp.org/wiki.php/VimTutorKo
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -3,13 +3,16 @@
[Desktop Entry] [Desktop Entry]
# Translators: This is the Application Name used in the Vim desktop file # Translators: This is the Application Name used in the Vim desktop file
Name[de]=Vim Name[de]=Vim
Name[eo]=Vim
Name=Vim Name=Vim
# Translators: This is the Generic Application Name used in the Vim desktop file # Translators: This is the Generic Application Name used in the Vim desktop file
GenericName[de]=Texteditor GenericName[de]=Texteditor
GenericName[eo]=Tekstoredaktilo
GenericName[ja]=テキストエディタ GenericName[ja]=テキストエディタ
GenericName=Text Editor GenericName=Text Editor
# Translators: This is the comment used in the Vim desktop file # Translators: This is the comment used in the Vim desktop file
Comment[de]=Textdateien bearbeiten Comment[de]=Textdateien bearbeiten
Comment[eo]=Redakti tekstajn dosierojn
Comment[ja]=テキストファイルを編集します Comment[ja]=テキストファイルを編集します
Comment=Edit text files Comment=Edit text files
# The translations should come from the po file. Leave them here for now, they will # The translations should come from the po file. Leave them here for now, they will
@ -89,10 +92,12 @@ Terminal=true
Type=Application Type=Application
# Translators: Search terms to find this application. Do NOT change the semicolons! The list MUST also end with a semicolon! # Translators: Search terms to find this application. Do NOT change the semicolons! The list MUST also end with a semicolon!
Keywords[de]=Text;Editor; Keywords[de]=Text;Editor;
Keywords[eo]=Teksto;redaktilo;
Keywords[ja]=テキスト;エディタ; Keywords[ja]=テキスト;エディタ;
Keywords=Text;editor; Keywords=Text;editor;
# Translators: This is the Icon file name. Do NOT translate # Translators: This is the Icon file name. Do NOT translate
Icon[de]=gvim Icon[de]=gvim
Icon[eo]=gvim
Icon=gvim Icon=gvim
Categories=Utility;TextEditor; Categories=Utility;TextEditor;
StartupNotify=false StartupNotify=false

View File

@ -106,6 +106,13 @@ else
TERMINAL=no TERMINAL=no
endif endif
# Set to yes to enable sound support.
ifneq ($(findstring $(FEATURES),BIG HUGE),)
SOUND=yes
else
SOUND=no
endif
ifndef CTAGS ifndef CTAGS
# this assumes ctags is Exuberant ctags # this assumes ctags is Exuberant ctags
CTAGS = ctags -I INIT+ --fields=+S CTAGS = ctags -I INIT+ --fields=+S
@ -633,6 +640,10 @@ TERM_DEPS = \
libvterm/src/vterm_internal.h libvterm/src/vterm_internal.h
endif endif
ifeq ($(SOUND),yes)
DEFINES += -DFEAT_SOUND
endif
# DirectWrite (DirectX) # DirectWrite (DirectX)
ifeq ($(DIRECTX),yes) ifeq ($(DIRECTX),yes)
# Only allow DirectWrite for a GUI build. # Only allow DirectWrite for a GUI build.
@ -719,6 +730,7 @@ OBJ = \
$(OUTDIR)/getchar.o \ $(OUTDIR)/getchar.o \
$(OUTDIR)/hardcopy.o \ $(OUTDIR)/hardcopy.o \
$(OUTDIR)/hashtab.o \ $(OUTDIR)/hashtab.o \
$(OUTDIR)/highlight.o \
$(OUTDIR)/indent.o \ $(OUTDIR)/indent.o \
$(OUTDIR)/insexpand.o \ $(OUTDIR)/insexpand.o \
$(OUTDIR)/json.o \ $(OUTDIR)/json.o \
@ -740,6 +752,8 @@ OBJ = \
$(OUTDIR)/os_win32.o \ $(OUTDIR)/os_win32.o \
$(OUTDIR)/pathdef.o \ $(OUTDIR)/pathdef.o \
$(OUTDIR)/popupmnu.o \ $(OUTDIR)/popupmnu.o \
$(OUTDIR)/popupwin.o \
$(OUTDIR)/profiler.o \
$(OUTDIR)/quickfix.o \ $(OUTDIR)/quickfix.o \
$(OUTDIR)/regexp.o \ $(OUTDIR)/regexp.o \
$(OUTDIR)/screen.o \ $(OUTDIR)/screen.o \
@ -751,6 +765,7 @@ OBJ = \
$(OUTDIR)/syntax.o \ $(OUTDIR)/syntax.o \
$(OUTDIR)/tag.o \ $(OUTDIR)/tag.o \
$(OUTDIR)/term.o \ $(OUTDIR)/term.o \
$(OUTDIR)/testing.o \
$(OUTDIR)/textprop.o \ $(OUTDIR)/textprop.o \
$(OUTDIR)/ui.o \ $(OUTDIR)/ui.o \
$(OUTDIR)/undo.o \ $(OUTDIR)/undo.o \
@ -848,6 +863,10 @@ OBJ += $(OUTDIR)/terminal.o \
$(OUTDIR)/vterm.o $(OUTDIR)/vterm.o
endif endif
ifeq ($(SOUND),yes)
OBJ += $(OUTDIR)/sound.o
endif
# Include xdiff # Include xdiff
OBJ += $(OUTDIR)/xdiffi.o \ OBJ += $(OUTDIR)/xdiffi.o \
$(OUTDIR)/xemit.o \ $(OUTDIR)/xemit.o \
@ -956,6 +975,10 @@ CFLAGS += -I$(ICONV)
DEFINES+=-DDYNAMIC_ICONV DEFINES+=-DDYNAMIC_ICONV
endif endif
ifeq (yes, $(SOUND))
LIB += -lwinmm
endif
ifeq (yes, $(USE_STDCPLUS)) ifeq (yes, $(USE_STDCPLUS))
LINK = $(CXX) LINK = $(CXX)
ifeq (yes, $(STATIC_STDCPLUS)) ifeq (yes, $(STATIC_STDCPLUS))
@ -986,7 +1009,7 @@ install.exe: dosinst.c
$(CC) $(CFLAGS) -o install.exe dosinst.c $(LIB) -lole32 -luuid $(CC) $(CFLAGS) -o install.exe dosinst.c $(LIB) -lole32 -luuid
uninstal.exe: uninstal.c uninstal.exe: uninstal.c
$(CC) $(CFLAGS) -o uninstal.exe uninstal.c $(LIB) $(CC) $(CFLAGS) -o uninstal.exe uninstal.c $(LIB) -lole32
ifeq ($(VIMDLL),yes) ifeq ($(VIMDLL),yes)
$(TARGET): $(OUTDIR) $(OBJ) $(TARGET): $(OUTDIR) $(OBJ)
@ -1028,9 +1051,9 @@ notags:
clean: clean:
-$(DEL) $(OUTDIR)$(DIRSLASH)*.o -$(DEL) $(OUTDIR)$(DIRSLASH)*.o
-$(DEL) $(OUTDIR)$(DIRSLASH)*.res -$(DEL) $(OUTDIR)$(DIRSLASH)*.res
-$(DEL) $(OUTDIR)$(DIRSLASH)pathdef.c
-rmdir $(OUTDIR) -rmdir $(OUTDIR)
-$(DEL) $(MAIN_TARGET) vimrun.exe install.exe uninstal.exe -$(DEL) $(MAIN_TARGET) vimrun.exe install.exe uninstal.exe
-$(DEL) pathdef.c
ifdef PERL ifdef PERL
-$(DEL) if_perl.c -$(DEL) if_perl.c
-$(DEL) auto$(DIRSLASH)if_perl.c -$(DEL) auto$(DIRSLASH)if_perl.c
@ -1047,8 +1070,13 @@ INCL = vim.h alloc.h ascii.h ex_cmds.h feature.h globals.h \
keymap.h macros.h option.h os_dos.h os_win32.h proto.h regexp.h \ keymap.h macros.h option.h os_dos.h os_win32.h proto.h regexp.h \
spell.h structs.h term.h beval.h $(NBDEBUG_INCL) spell.h structs.h term.h beval.h $(NBDEBUG_INCL)
GUI_INCL = gui.h GUI_INCL = gui.h
ifeq ($(DIRECTX),yes)
GUI_INCL += gui_dwrite.h
endif
CUI_INCL = iscygpty.h CUI_INCL = iscygpty.h
PATHDEF_SRC = $(OUTDIR)/pathdef.c
$(OUTDIR)/if_python.o: if_python.c if_py_both.h $(INCL) $(OUTDIR)/if_python.o: if_python.c if_py_both.h $(INCL)
$(CC) -c $(CFLAGS) $(PYTHONINC) $(PYTHON_HOME_DEF) $< -o $@ $(CC) -c $(CFLAGS) $(PYTHONINC) $(PYTHON_HOME_DEF) $< -o $@
@ -1083,7 +1111,7 @@ endif
$(OUTDIR): $(OUTDIR):
$(MKDIR) $(OUTDIR) $(MKDIR) $(OUTDIR)
$(OUTDIR)/gui_dwrite.o: gui_dwrite.cpp $(INCL) gui_dwrite.h $(OUTDIR)/gui_dwrite.o: gui_dwrite.cpp gui_dwrite.h
$(CC) -c $(CFLAGS) $(CXXFLAGS) gui_dwrite.cpp -o $@ $(CC) -c $(CFLAGS) $(CXXFLAGS) gui_dwrite.cpp -o $@
$(OUTDIR)/gui.o: gui.c $(INCL) $(GUI_INCL) $(OUTDIR)/gui.o: gui.c $(INCL) $(GUI_INCL)
@ -1148,6 +1176,9 @@ $(OUTDIR)/regexp.o: regexp.c regexp_nfa.c $(INCL)
$(OUTDIR)/terminal.o: terminal.c $(INCL) $(TERM_DEPS) $(OUTDIR)/terminal.o: terminal.c $(INCL) $(TERM_DEPS)
$(CC) -c $(CFLAGS) terminal.c -o $@ $(CC) -c $(CFLAGS) terminal.c -o $@
$(OUTDIR)/pathdef.o: $(PATHDEF_SRC) $(INCL)
$(CC) -c $(CFLAGS) $(PATHDEF_SRC) -o $@
CCCTERM = $(CC) -c $(CFLAGS) -Ilibvterm/include -DINLINE="" \ CCCTERM = $(CC) -c $(CFLAGS) -Ilibvterm/include -DINLINE="" \
-DVSNPRINTF=vim_vsnprintf \ -DVSNPRINTF=vim_vsnprintf \
@ -1162,27 +1193,27 @@ $(OUTDIR)/%.o : xdiff/%.c $(XDIFF_DEPS)
$(CC) -c $(CFLAGS) $< -o $@ $(CC) -c $(CFLAGS) $< -o $@
pathdef.c: $(INCL) $(PATHDEF_SRC): Make_cyg_ming.mak Make_cyg.mak Make_ming.mak
ifneq (sh.exe, $(SHELL)) ifneq (sh.exe, $(SHELL))
@echo creating pathdef.c @echo creating $(PATHDEF_SRC)
@echo '/* pathdef.c */' > pathdef.c @echo '/* pathdef.c */' > $(PATHDEF_SRC)
@echo '#include "vim.h"' >> pathdef.c @echo '#include "vim.h"' >> $(PATHDEF_SRC)
@echo 'char_u *default_vim_dir = (char_u *)"$(VIMRCLOC)";' >> pathdef.c @echo 'char_u *default_vim_dir = (char_u *)"$(VIMRCLOC)";' >> $(PATHDEF_SRC)
@echo 'char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR)";' >> pathdef.c @echo 'char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR)";' >> $(PATHDEF_SRC)
@echo 'char_u *all_cflags = (char_u *)"$(CC) $(CFLAGS)";' >> pathdef.c @echo 'char_u *all_cflags = (char_u *)"$(CC) $(CFLAGS)";' >> $(PATHDEF_SRC)
@echo 'char_u *all_lflags = (char_u *)"$(LINK) $(CFLAGS) $(LFLAGS) -o $(TARGET) $(LIB) -lole32 -luuid $(LUA_LIB) $(MZSCHEME_LIBDIR) $(MZSCHEME_LIB) $(PYTHONLIB) $(PYTHON3LIB) $(RUBYLIB)";' >> pathdef.c @echo 'char_u *all_lflags = (char_u *)"$(LINK) $(CFLAGS) $(LFLAGS) -o $(TARGET) $(LIB) -lole32 -luuid $(LUA_LIB) $(MZSCHEME_LIBDIR) $(MZSCHEME_LIB) $(PYTHONLIB) $(PYTHON3LIB) $(RUBYLIB)";' >> $(PATHDEF_SRC)
@echo 'char_u *compiled_user = (char_u *)"$(USERNAME)";' >> pathdef.c @echo 'char_u *compiled_user = (char_u *)"$(USERNAME)";' >> $(PATHDEF_SRC)
@echo 'char_u *compiled_sys = (char_u *)"$(USERDOMAIN)";' >> pathdef.c @echo 'char_u *compiled_sys = (char_u *)"$(USERDOMAIN)";' >> $(PATHDEF_SRC)
else else
@echo creating pathdef.c @echo creating $(PATHDEF_SRC)
@echo /* pathdef.c */ > pathdef.c @echo /* pathdef.c */ > $(PATHDEF_SRC)
@echo #include "vim.h" >> pathdef.c @echo #include "vim.h" >> $(PATHDEF_SRC)
@echo char_u *default_vim_dir = (char_u *)"$(VIMRCLOC)"; >> pathdef.c @echo char_u *default_vim_dir = (char_u *)"$(VIMRCLOC)"; >> $(PATHDEF_SRC)
@echo char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR)"; >> pathdef.c @echo char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR)"; >> $(PATHDEF_SRC)
@echo char_u *all_cflags = (char_u *)"$(CC) $(CFLAGS)"; >> pathdef.c @echo char_u *all_cflags = (char_u *)"$(CC) $(CFLAGS)"; >> $(PATHDEF_SRC)
@echo char_u *all_lflags = (char_u *)"$(CC) $(CFLAGS) $(LFLAGS) -o $(TARGET) $(LIB) -lole32 -luuid $(LUA_LIB) $(MZSCHEME_LIBDIR) $(MZSCHEME_LIB) $(PYTHONLIB) $(PYTHON3LIB) $(RUBYLIB)"; >> pathdef.c @echo char_u *all_lflags = (char_u *)"$(CC) $(CFLAGS) $(LFLAGS) -o $(TARGET) $(LIB) -lole32 -luuid $(LUA_LIB) $(MZSCHEME_LIBDIR) $(MZSCHEME_LIB) $(PYTHONLIB) $(PYTHON3LIB) $(RUBYLIB)"; >> $(PATHDEF_SRC)
@echo char_u *compiled_user = (char_u *)"$(USERNAME)"; >> pathdef.c @echo char_u *compiled_user = (char_u *)"$(USERNAME)"; >> $(PATHDEF_SRC)
@echo char_u *compiled_sys = (char_u *)"$(USERDOMAIN)"; >> pathdef.c @echo char_u *compiled_sys = (char_u *)"$(USERDOMAIN)"; >> $(PATHDEF_SRC)
endif endif
# vim: set noet sw=8 ts=8 sts=0 wm=0 tw=0: # vim: set noet sw=8 ts=8 sts=0 wm=0 tw=0:

View File

@ -1,301 +0,0 @@
#
# Makefile for VIM, using DICE 3
#
#>>>>> choose options:
### See feature.h for a list of optionals.
### Any other defines can be included here.
DEFINES = -DHAVE_TGETENT -DUP_BC_PC_EXTERN -DOSPEED_EXTERN
#>>>>> if HAVE_TGETENT is defined o/termlib.o has to be used
TERMLIB = o/termlib.o
#TERMLIB =
#>>>>> end of choices
###########################################################################
CFLAGS = -c -DAMIGA -Iproto $(DEFINES)
SYMS = vim.syms
PRE = -H${SYMS}=vim.h
LIBS = -la
CC = dcc
LD = dcc
.c.o:
${CC} ${PRE} ${CFLAGS} $< -o $@
SRC = \
arabic.c \
autocmd.c \
blowfish.c \
buffer.c \
change.c \
charset.c \
crypt.c \
crypt_zip.c \
debugger.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 \
fileio.c \
findfile.c \
fold.c \
getchar.c \
hardcopy.c \
hashtab.c \
indent.c \
insexpand.c \
json.c \
list.c \
main.c \
mark.c \
memfile.c \
memline.c \
menu.c \
message.c \
misc1.c \
misc2.c \
move.c \
mbyte.c \
normal.c \
ops.c \
option.c \
os_amiga.c \
popupmnu.c \
quickfix.c \
regexp.c \
screen.c \
search.c \
sha256.c \
sign.c \
spell.c \
spellfile.c \
syntax.c \
tag.c \
term.c \
ui.c \
undo.c \
usercmd.c \
userfunc.c \
window.c \
version.c
OBJ = o/arabic.o \
o/autocmd.o \
o/blowfish.o \
o/buffer.o \
o/change.o \
o/charset.o \
o/crypt.o \
o/crypt_zip.o \
o/debugger.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/fileio.o \
o/findfile.o \
o/fold.o \
o/getchar.o \
o/hardcopy.o \
o/hashtab.o \
o/indent.o \
o/insexpand.o \
o/json.o \
o/list.o \
o/main.o \
o/mark.o \
o/memfile.o \
o/memline.o \
o/menu.o \
o/message.o \
o/misc1.o \
o/misc2.o \
o/move.o \
o/mbyte.o \
o/normal.o \
o/ops.o \
o/option.o \
o/os_amiga.o \
o/popupmnu.o \
o/quickfix.o \
o/regexp.o \
o/screen.o \
o/search.o \
o/sha256.o \
o/sign.o \
o/spell.o \
o/spellfile.o \
o/syntax.o \
o/tag.o \
o/term.o \
o/ui.o \
o/undo.o \
o/usercmd.o \
o/userfunc.o \
o/window.o \
$(TERMLIB)
Vim: $(OBJ) version.c version.h
${CC} $(CFLAGS) version.c -o o/version.o
${LD} -o Vim $(OBJ) o/version.o $(LIBS)
debug: $(OBJ) version.c version.h
${CC} $(CFLAGS) version.c -o o/version.o
${LD} -s -o Vim $(OBJ) o/version.o $(LIBS)
tags:
csh -c ctags $(SRC) *.h
clean:
delete o/*.o Vim $(SYMS)
$(SYMS) : vim.h globals.h keymap.h macros.h ascii.h term.h os_amiga.h structs.h
delete $(SYMS)
###########################################################################
o/arabic.o: arabic.c $(SYMS)
o/autocmd.o: autocmd.c $(SYMS)
o/blowfish.o: blowfish.c $(SYMS)
o/buffer.o: buffer.c $(SYMS)
o/change.o: change.c $(SYMS)
o/charset.o: charset.c $(SYMS)
o/crypt.o: crypt.c $(SYMS)
o/crypt_zip.o: crypt_zip.c $(SYMS)
o/debugger.o: debugger.c $(SYMS)
o/dict.o: dict.c $(SYMS)
o/diff.o: diff.c $(SYMS)
o/digraph.o: digraph.c $(SYMS)
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)
o/ex_docmd.o: ex_docmd.c $(SYMS) ex_cmds.h
o/ex_eval.o: ex_eval.c $(SYMS) ex_cmds.h
o/ex_getln.o: ex_getln.c $(SYMS)
o/fileio.o: fileio.c $(SYMS)
o/findfile.o: findfile.c $(SYMS)
o/fold.o: fold.c $(SYMS)
o/getchar.o: getchar.c $(SYMS)
o/hardcopy.o: hardcopy.c $(SYMS)
o/hashtab.o: hashtab.c $(SYMS)
o/indent.o: indent.c $(SYMS)
o/insexpand.o: insexpand.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)
o/memfile.o: memfile.c $(SYMS)
o/memline.o: memline.c $(SYMS)
o/menu.o: menu.c $(SYMS)
o/message.o: message.c $(SYMS)
o/misc1.o: misc1.c $(SYMS)
o/misc2.o: misc2.c $(SYMS)
o/move.o: move.c $(SYMS)
o/mbyte.o: mbyte.c $(SYMS)
o/normal.o: normal.c $(SYMS)
o/ops.o: ops.c $(SYMS)
o/option.o: option.c $(SYMS)
# Because of a bug in DC1 2.06.40, initialisation of unions does not
# work correctly. dc1-21 is DC1 2.06.21 which does work.
# rename dc1-21 dc1
${CC} ${CFLAGS} option.c -o o/option.o
# rename dc1 dc1-21
o/os_amiga.o: os_amiga.c $(SYMS) os_amiga.h
o/popupmnu.o: popupmnu.c $(SYMS)
o/quickfix.o: quickfix.c $(SYMS)
o/regexp.o: regexp.c $(SYMS) regexp.h
o/screen.o: screen.c $(SYMS)
o/search.o: search.c $(SYMS) regexp.h
o/sha256.o: sha256.c $(SYMS)
o/sign.o: sign.c $(SYMS)
o/spell.o: spell.c $(SYMS) spell.h
o/spellfile.o: spellfile.c $(SYMS) spell.h
o/syntax.o: syntax.c $(SYMS)
o/tag.o: tag.c $(SYMS)
o/term.o: term.c $(SYMS) term.h
o/termlib.o: termlib.c $(SYMS)
o/ui.o: ui.c $(SYMS)
o/undo.o: undo.c $(SYMS)
o/usercmd.o: usercmd.c $(SYMS)
o/userfunc.o: userfunc.c $(SYMS)
o/window.o: window.c $(SYMS)

View File

@ -1,462 +0,0 @@
#
# Makefile for VIM on the Amiga, using Aztec/Manx C 5.0 or later
#
# NOTE: THIS IS OLD AND PROBABLY NO LONGER WORKS.
#
# Note: Not all dependencies are included. This was done to avoid having
# to compile everything when a global variable or function is added.
# Careful when changing a global struct or variable!
#
#>>>>> choose options:
### See feature.h for a list of optionals.
### Any other defines can be included here.
DEFINES =
#>>>>> if HAVE_TGETENT is defined obj/termlib.o has to be used
#TERMLIB = obj/termlib.o
TERMLIB =
#>>>>> choose between debugging (-bs) or optimizing (-so)
OPTIONS = -so
#OPTIONS = -bs
#>>>>> end of choices
###########################################################################
CFLAGS = $(OPTIONS) -wapruq -ps -qf -Iproto $(DEFINES) -DAMIGA
LIBS = -lc16
SYMS = vim.syms
CC = cc
LN = ln
LNFLAGS = +q
SHELL = csh
REN = $(SHELL) -c mv -f
DEL = $(SHELL) -c rm -f
SRC = arabic.c \
autocmd.c \
blowfish.c \
buffer.c \
change.c \
charset.c \
crypt.c \
crypt_zip.c \
debugger.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 \
fileio.c \
findfile.c \
fold.c \
getchar.c \
hardcopy.c \
hashtab.c \
indent.c \
insexpand.c \
json.c \
list.c \
main.c \
mark.c \
memfile.c \
memline.c \
menu.c \
message.c \
misc1.c \
misc2.c \
move.c \
mbyte.c \
normal.c \
ops.c \
option.c \
os_amiga.c \
popupmnu.c \
quickfix.c \
regexp.c \
screen.c \
search.c \
sha256.c \
sign.c \
spell.c \
spellfile.c \
syntax.c \
tag.c \
term.c \
ui.c \
undo.c \
usercmd.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/arabic.o \
obj/autocmd.o \
obj/blowfish.o \
obj/buffer.o \
obj/change.o \
obj/charset.o \
obj/crypt.o \
obj/crypt_zip.o \
obj/debugger.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/fileio.o \
obj/findfile.o \
obj/fold.o \
obj/getchar.o \
obj/hardcopy.o \
obj/hashtab.o \
obj/indent.o \
obj/insexpand.o \
obj/json.o \
obj/list.o \
obj/main.o \
obj/mark.o \
obj/memfile.o \
obj/memline.o \
obj/menu.o \
obj/message.o \
obj/misc1.o \
obj/misc2.o \
obj/move.o \
obj/mbyte.o \
obj/normal.o \
obj/ops.o \
obj/option.o \
obj/os_amiga.o \
obj/popupmnu.o \
obj/quickfix.o \
obj/regexp.o \
obj/screen.o \
obj/search.o \
obj/sha256.o \
obj/sign.o \
obj/spell.o \
obj/spellfile.o \
obj/syntax.o \
obj/tag.o \
obj/term.o \
obj/ui.o \
obj/undo.o \
obj/usercmd.o \
obj/userfunc.o \
obj/window.o \
$(TERMLIB)
PRO = proto/arabic.pro \
proto/autocmd.pro \
proto/blowfish.pro \
proto/buffer.pro \
proto/change.pro \
proto/charset.pro \
proto/crypt.pro \
proto/crypt_zip.pro \
proto/debugger.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/fileio.pro \
proto/findfile.pro \
proto/fold.pro \
proto/getchar.pro \
proto/hardcopy.pro \
proto/hashtab.pro \
proto/indent.pro \
proto/insexpand.pro \
proto/json.pro \
proto/list.pro \
proto/main.pro \
proto/mark.pro \
proto/memfile.pro \
proto/memline.pro \
proto/menu.pro \
proto/message.pro \
proto/misc1.pro \
proto/misc2.pro \
proto/move.pro \
proto/mbyte.pro \
proto/normal.pro \
proto/ops.pro \
proto/option.pro \
proto/os_amiga.pro \
proto/popupmnu.pro \
proto/quickfix.pro \
proto/regexp.pro \
proto/screen.pro \
proto/search.pro \
proto/sha256.pro \
proto/sign.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/usercmd.pro \
proto/userfunc.pro \
proto/window.pro
all: Vim xxd/Xxd
Vim: obj $(OBJ) version.c version.h
$(CC) $(CFLAGS) version.c -o obj/version.o
$(LN) $(LNFLAGS) -m -o Vim $(OBJ) obj/version.o $(LIBS)
debug: obj $(OBJ) version.c version.h
$(CC) $(CFLAGS) version.c -o obj/version.o
$(LN) $(LNFLAGS) -m -g -o Vim $(OBJ) obj/version.o $(LIBS)
xxd/Xxd: xxd/xxd.c
$(SHELL) -c cd xxd; make -f Make_amiga.mak; cd ..
# Making prototypes with Manx has been removed, because it caused too many
# problems.
#proto: $(SYMS) $(PRO)
obj:
makedir obj
tags: $(SRC) $(INCL)
$(SHELL) -c ctags $(SRC) *.h
# can't use delete here, too many file names
clean:
$(DEL) $(OBJ) obj/version.o \
obj/termlib.o Vim $(SYMS) xxd/Xxd
test:
$(SHELL) -c cd testdir; make -f Make_amiga.mak; cd ..
$(SYMS): $(INCL) $(PRO)
$(CC) $(CFLAGS) -ho$(SYMS) vim.h
###########################################################################
# Unfortunately, Manx's make doesn't understand a .c.o rule, so each
# compilation command has to be given explicitly.
CCSYM = $(CC) $(CFLAGS) -hi$(SYMS) -o
CCNOSYM = $(CC) $(CFLAGS) -o
$(OBJ): $(SYMS)
obj/arabic.o: arabic.c
$(CCSYM) $@ arabic.c
obj/autocmd.o: autocmd.c
$(CCSYM) $@ autocmd.c
obj/blowfish.o: blowfish.c
$(CCSYM) $@ blowfish.c
obj/buffer.o: buffer.c
$(CCSYM) $@ buffer.c
obj/change.o: change.c
$(CCSYM) $@ change.c
obj/charset.o: charset.c
$(CCSYM) $@ charset.c
obj/crypt.o: crypt.c
$(CCSYM) $@ crypt.c
obj/crypt_zip.o: crypt_zip.c
$(CCSYM) $@ crypt_zip.c
obj/debugger.o: debugger.c
$(CCSYM) $@ debugger.c
obj/dict.o: dict.c
$(CCSYM) $@ dict.c
obj/diff.o: diff.c
$(CCSYM) $@ diff.c
obj/digraph.o: digraph.c
$(CCSYM) $@ digraph.c
obj/edit.o: edit.c
$(CCSYM) $@ 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
obj/ex_cmds2.o: ex_cmds2.c
$(CCSYM) $@ ex_cmds2.c
# Don't use $(SYMS) here, because ex_docmd.c defines DO_DECLARE_EXCMD
obj/ex_docmd.o: ex_docmd.c ex_cmds.h
$(CCNOSYM) $@ ex_docmd.c
obj/ex_eval.o: ex_eval.c ex_cmds.h
$(CCSYM) $@ ex_eval.c
obj/ex_getln.o: ex_getln.c
$(CCSYM) $@ ex_getln.c
obj/fileio.o: fileio.c
$(CCSYM) $@ fileio.c
obj/findfile.o: findfile.c
$(CCSYM) $@ findfile.c
obj/fold.o: fold.c
$(CCSYM) $@ fold.c
obj/getchar.o: getchar.c
$(CCSYM) $@ getchar.c
obj/hardcopy.o: hardcopy.c
$(CCSYM) $@ hardcopy.c
obj/hashtab.o: hashtab.c
$(CCSYM) $@ hashtab.c
obj/indent.o: indent.c
$(CCSYM) $@ indent.c
obj/insexpand.o: insexpand.c
$(CCSYM) $@ insexpand.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
obj/mark.o: mark.c
$(CCSYM) $@ mark.c
obj/memfile.o: memfile.c
$(CCSYM) $@ memfile.c
obj/memline.o: memline.c
$(CCSYM) $@ memline.c
obj/menu.o: menu.c
$(CCSYM) $@ menu.c
# Don't use $(SYMS) here, because message.c defines MESSAGE_FILE
obj/message.o: message.c
$(CCNOSYM) $@ message.c
obj/misc1.o: misc1.c
$(CCSYM) $@ misc1.c
obj/misc2.o: misc2.c
$(CCSYM) $@ misc2.c
obj/move.o: move.c
$(CCSYM) $@ move.c
obj/mbyte.o: mbyte.c
$(CCSYM) $@ mbyte.c
obj/normal.o: normal.c
$(CCSYM) $@ normal.c
obj/ops.o: ops.c
$(CCSYM) $@ ops.c
# Don't use $(SYMS) here, because option.h defines variables here
obj/option.o: option.c
$(CCNOSYM) $@ option.c
obj/os_amiga.o: os_amiga.c
$(CCSYM) $@ os_amiga.c
obj/popupmnu.o: popupmnu.c
$(CCSYM) $@ popupmnu.c
obj/quickfix.o: quickfix.c
$(CCSYM) $@ quickfix.c
obj/regexp.o: regexp.c
$(CCSYM) $@ regexp.c
obj/screen.o: screen.c
$(CCSYM) $@ screen.c
obj/search.o: search.c
$(CCSYM) $@ search.c
obj/sha256.o: sha256.c
$(CCSYM) $@ sha256.c
obj/sign.o: sign.c
$(CCSYM) $@ sign.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
obj/tag.o: tag.c
$(CCSYM) $@ tag.c
obj/term.o: term.c term.h
$(CCSYM) $@ term.c
obj/termlib.o: termlib.c
$(CCSYM) $@ termlib.c
obj/ui.o: ui.c
$(CCSYM) $@ ui.c
obj/undo.o: undo.c
$(CCSYM) $@ undo.c
obj/usercmd.o: usercmd.c
$(CCSYM) $@ usercmd.c
obj/userfunc.o: userfunc.c
$(CCSYM) $@ userfunc.c
obj/window.o: window.c
$(CCSYM) $@ window.c

View File

@ -50,6 +50,7 @@ SRC = arabic.c \
getchar.c \ getchar.c \
hardcopy.c \ hardcopy.c \
hashtab.c \ hashtab.c \
highlight.c \
indent.c \ indent.c \
insexpand.c \ insexpand.c \
json.c \ json.c \
@ -69,6 +70,7 @@ SRC = arabic.c \
option.c \ option.c \
os_amiga.c \ os_amiga.c \
popupmnu.c \ popupmnu.c \
profiler.c \
quickfix.c \ quickfix.c \
regexp.c \ regexp.c \
screen.c \ screen.c \
@ -80,6 +82,8 @@ SRC = arabic.c \
syntax.c \ syntax.c \
tag.c \ tag.c \
term.c \ term.c \
testing.c \
textprop.c \
ui.c \ ui.c \
undo.c \ undo.c \
usercmd.c \ usercmd.c \

View File

@ -38,7 +38,9 @@
# is yes) # is yes)
# Global IME support: GIME=yes (requires GUI=yes) # Global IME support: GIME=yes (requires GUI=yes)
# #
# Terminal support: TERMINAL=yes (default is yes) # Terminal support: TERMINAL=yes (default is yes)
#
# Sound support: SOUND=yes (default is yes)
# #
# DLL support (EXPERIMENTAL): VIMDLL=yes (default is no) # DLL support (EXPERIMENTAL): VIMDLL=yes (default is no)
# Creates vim{32,64}.dll, and stub gvim.exe and vim.exe. # Creates vim{32,64}.dll, and stub gvim.exe and vim.exe.
@ -381,6 +383,14 @@ TERM_DEPS = \
libvterm/src/vterm_internal.h libvterm/src/vterm_internal.h
!endif !endif
!ifndef SOUND
! if "$(FEATURES)"=="HUGE" || "$(FEATURES)"=="BIG"
SOUND = yes
! else
SOUND = no
! endif
!endif
!ifndef NETBEANS !ifndef NETBEANS
NETBEANS = $(GUI) NETBEANS = $(GUI)
!endif !endif
@ -454,6 +464,13 @@ XPM_INC = -I $(XPM)\include -I $(XPM)\..\include
! endif ! endif
!endif # GUI !endif # GUI
!if "$(SOUND)" == "yes"
SOUND_PRO = proto/sound.pro
SOUND_OBJ = $(OBJDIR)/sound.obj
SOUND_DEFS = -DFEAT_SOUND
SOUND_LIB = winmm.lib
!endif
!if "$(CHANNEL)" == "yes" !if "$(CHANNEL)" == "yes"
CHANNEL_PRO = proto/channel.pro CHANNEL_PRO = proto/channel.pro
CHANNEL_OBJ = $(OBJDIR)/channel.obj CHANNEL_OBJ = $(OBJDIR)/channel.obj
@ -494,7 +511,7 @@ WINVER = 0x0501
#VIMRUNTIMEDIR = somewhere #VIMRUNTIMEDIR = somewhere
CFLAGS = -c /W3 /nologo $(CVARS) -I. -Iproto -DHAVE_PATHDEF -DWIN32 \ CFLAGS = -c /W3 /nologo $(CVARS) -I. -Iproto -DHAVE_PATHDEF -DWIN32 \
$(CSCOPE_DEFS) $(TERM_DEFS) $(NETBEANS_DEFS) $(CHANNEL_DEFS) \ $(CSCOPE_DEFS) $(TERM_DEFS) $(SOUND_DEFS) $(NETBEANS_DEFS) $(CHANNEL_DEFS) \
$(NBDEBUG_DEFS) $(XPM_DEFS) \ $(NBDEBUG_DEFS) $(XPM_DEFS) \
$(DEFINES) -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) $(DEFINES) -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER)
@ -722,6 +739,7 @@ OBJ = \
$(OUTDIR)\getchar.obj \ $(OUTDIR)\getchar.obj \
$(OUTDIR)\hardcopy.obj \ $(OUTDIR)\hardcopy.obj \
$(OUTDIR)\hashtab.obj \ $(OUTDIR)\hashtab.obj \
$(OUTDIR)\highlight.obj \
$(OUTDIR)\indent.obj \ $(OUTDIR)\indent.obj \
$(OUTDIR)\insexpand.obj \ $(OUTDIR)\insexpand.obj \
$(OUTDIR)\json.obj \ $(OUTDIR)\json.obj \
@ -743,6 +761,8 @@ OBJ = \
$(OUTDIR)\os_win32.obj \ $(OUTDIR)\os_win32.obj \
$(OUTDIR)\pathdef.obj \ $(OUTDIR)\pathdef.obj \
$(OUTDIR)\popupmnu.obj \ $(OUTDIR)\popupmnu.obj \
$(OUTDIR)\popupwin.obj \
$(OUTDIR)\profiler.obj \
$(OUTDIR)\quickfix.obj \ $(OUTDIR)\quickfix.obj \
$(OUTDIR)\regexp.obj \ $(OUTDIR)\regexp.obj \
$(OUTDIR)\screen.obj \ $(OUTDIR)\screen.obj \
@ -754,6 +774,7 @@ OBJ = \
$(OUTDIR)\syntax.obj \ $(OUTDIR)\syntax.obj \
$(OUTDIR)\tag.obj \ $(OUTDIR)\tag.obj \
$(OUTDIR)\term.obj \ $(OUTDIR)\term.obj \
$(OUTDIR)\testing.obj \
$(OUTDIR)\textprop.obj \ $(OUTDIR)\textprop.obj \
$(OUTDIR)\ui.obj \ $(OUTDIR)\ui.obj \
$(OUTDIR)\undo.obj \ $(OUTDIR)\undo.obj \
@ -847,7 +868,7 @@ XDIFF_DEPS = \
!if "$(SUBSYSTEM_VER)" != "" !if "$(SUBSYSTEM_VER)" != ""
SUBSYSTEM = $(SUBSYSTEM),$(SUBSYSTEM_VER) SUBSYSTEM = $(SUBSYSTEM),$(SUBSYSTEM_VER)
SUBSYSTEM_TOOLS = $(SUBSYSTEM_TOOLS),$(SUBSYSTEM_VER) SUBSYSTEM_TOOLS = $(SUBSYSTEM_TOOLS),$(SUBSYSTEM_VER)
! if "$(VIMDLL)" != "yes" ! if "$(VIMDLL)" == "yes"
SUBSYSTEM_CON = $(SUBSYSTEM_CON),$(SUBSYSTEM_VER) SUBSYSTEM_CON = $(SUBSYSTEM_CON),$(SUBSYSTEM_VER)
! endif ! endif
# Pass SUBSYSTEM_VER to GvimExt and other tools # Pass SUBSYSTEM_VER to GvimExt and other tools
@ -1216,7 +1237,7 @@ conflags = $(conflags) /map /mapinfo:lines
LINKARGS1 = $(linkdebug) $(conflags) LINKARGS1 = $(linkdebug) $(conflags)
LINKARGS2 = $(CON_LIB) $(GUI_LIB) $(NODEFAULTLIB) $(LIBC) $(OLE_LIB) user32.lib \ LINKARGS2 = $(CON_LIB) $(GUI_LIB) $(NODEFAULTLIB) $(LIBC) $(OLE_LIB) user32.lib \
$(LUA_LIB) $(MZSCHEME_LIB) $(PERL_LIB) $(PYTHON_LIB) $(PYTHON3_LIB) $(RUBY_LIB) \ $(LUA_LIB) $(MZSCHEME_LIB) $(PERL_LIB) $(PYTHON_LIB) $(PYTHON3_LIB) $(RUBY_LIB) \
$(TCL_LIB) $(NETBEANS_LIB) $(XPM_LIB) $(LINK_PDB) $(TCL_LIB) $(SOUND_LIB) $(NETBEANS_LIB) $(XPM_LIB) $(LINK_PDB)
# Report link time code generation progress if used. # Report link time code generation progress if used.
!ifdef NODEBUG !ifdef NODEBUG
@ -1248,17 +1269,22 @@ all: $(MAIN_TARGET) \
tee/tee.exe \ tee/tee.exe \
GvimExt/gvimext.dll GvimExt/gvimext.dll
# To get around the command line limit: Make use of nmake's response files to
# capture the arguments for $(link) in a file using the @<<ARGS<< syntax.
!if "$(VIMDLL)" == "yes" !if "$(VIMDLL)" == "yes"
$(VIMDLLBASE).dll: $(OUTDIR) $(OBJ) $(XDIFF_OBJ) $(GUI_OBJ) $(CUI_OBJ) $(OLE_OBJ) $(OLE_IDL) $(MZSCHEME_OBJ) \ $(VIMDLLBASE).dll: $(OUTDIR) $(OBJ) $(XDIFF_OBJ) $(GUI_OBJ) $(CUI_OBJ) $(OLE_OBJ) $(OLE_IDL) $(MZSCHEME_OBJ) \
$(LUA_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(PYTHON3_OBJ) $(RUBY_OBJ) $(TCL_OBJ) \ $(LUA_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(PYTHON3_OBJ) $(RUBY_OBJ) $(TCL_OBJ) \
$(CSCOPE_OBJ) $(TERM_OBJ) $(NETBEANS_OBJ) $(CHANNEL_OBJ) $(XPM_OBJ) \ $(CSCOPE_OBJ) $(TERM_OBJ) $(SOUND_OBJ) $(NETBEANS_OBJ) $(CHANNEL_OBJ) $(XPM_OBJ) \
version.c version.h version.c version.h
$(CC) $(CFLAGS_OUTDIR) version.c $(CC) $(CFLAGS_OUTDIR) version.c
$(link) $(LINKARGS1) /dll -out:$(VIMDLLBASE).dll $(OBJ) $(XDIFF_OBJ) $(GUI_OBJ) $(CUI_OBJ) $(OLE_OBJ) \ $(link) @<<
$(LUA_OBJ) $(MZSCHEME_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(PYTHON3_OBJ) $(RUBY_OBJ) \ $(LINKARGS1) /dll -out:$(VIMDLLBASE).dll $(OBJ) $(XDIFF_OBJ) $(GUI_OBJ) $(CUI_OBJ) $(OLE_OBJ) \
$(TCL_OBJ) $(CSCOPE_OBJ) $(TERM_OBJ) $(NETBEANS_OBJ) $(CHANNEL_OBJ) \ $(LUA_OBJ) $(MZSCHEME_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(PYTHON3_OBJ) $(RUBY_OBJ) \
$(XPM_OBJ) $(OUTDIR)\version.obj $(LINKARGS2) $(TCL_OBJ) $(CSCOPE_OBJ) $(TERM_OBJ) $(SOUND_OBJ) $(NETBEANS_OBJ) $(CHANNEL_OBJ) \
$(XPM_OBJ) $(OUTDIR)\version.obj $(LINKARGS2)
<<
$(GVIM).exe: $(OUTDIR) $(EXEOBJG) $(VIMDLLBASE).dll $(GVIM).exe: $(OUTDIR) $(EXEOBJG) $(VIMDLLBASE).dll
$(link) $(LINKARGS1) /subsystem:$(SUBSYSTEM) -out:$(GVIM).exe $(EXEOBJG) $(VIMDLLBASE).lib $(LIBC) $(link) $(LINKARGS1) /subsystem:$(SUBSYSTEM) -out:$(GVIM).exe $(EXEOBJG) $(VIMDLLBASE).lib $(LIBC)
@ -1272,13 +1298,15 @@ $(VIM).exe: $(OUTDIR) $(EXEOBJC) $(VIMDLLBASE).dll
$(VIM).exe: $(OUTDIR) $(OBJ) $(XDIFF_OBJ) $(GUI_OBJ) $(CUI_OBJ) $(OLE_OBJ) $(OLE_IDL) $(MZSCHEME_OBJ) \ $(VIM).exe: $(OUTDIR) $(OBJ) $(XDIFF_OBJ) $(GUI_OBJ) $(CUI_OBJ) $(OLE_OBJ) $(OLE_IDL) $(MZSCHEME_OBJ) \
$(LUA_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(PYTHON3_OBJ) $(RUBY_OBJ) $(TCL_OBJ) \ $(LUA_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(PYTHON3_OBJ) $(RUBY_OBJ) $(TCL_OBJ) \
$(CSCOPE_OBJ) $(TERM_OBJ) $(NETBEANS_OBJ) $(CHANNEL_OBJ) $(XPM_OBJ) \ $(CSCOPE_OBJ) $(TERM_OBJ) $(SOUND_OBJ) $(NETBEANS_OBJ) $(CHANNEL_OBJ) $(XPM_OBJ) \
version.c version.h version.c version.h
$(CC) $(CFLAGS_OUTDIR) version.c $(CC) $(CFLAGS_OUTDIR) version.c
$(link) $(LINKARGS1) /subsystem:$(SUBSYSTEM) -out:$(VIM).exe $(OBJ) $(XDIFF_OBJ) $(GUI_OBJ) $(CUI_OBJ) $(OLE_OBJ) \ $(link) @<<
$(LUA_OBJ) $(MZSCHEME_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(PYTHON3_OBJ) $(RUBY_OBJ) \ $(LINKARGS1) /subsystem:$(SUBSYSTEM) -out:$(VIM).exe $(OBJ) $(XDIFF_OBJ) $(GUI_OBJ) $(CUI_OBJ) $(OLE_OBJ) \
$(TCL_OBJ) $(CSCOPE_OBJ) $(TERM_OBJ) $(NETBEANS_OBJ) $(CHANNEL_OBJ) \ $(LUA_OBJ) $(MZSCHEME_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(PYTHON3_OBJ) $(RUBY_OBJ) \
$(XPM_OBJ) $(OUTDIR)\version.obj $(LINKARGS2) $(TCL_OBJ) $(CSCOPE_OBJ) $(TERM_OBJ) $(SOUND_OBJ) $(NETBEANS_OBJ) $(CHANNEL_OBJ) \
$(XPM_OBJ) $(OUTDIR)\version.obj $(LINKARGS2)
<<
if exist $(VIM).exe.manifest mt.exe -nologo -manifest $(VIM).exe.manifest -updateresource:$(VIM).exe;1 if exist $(VIM).exe.manifest mt.exe -nologo -manifest $(VIM).exe.manifest -updateresource:$(VIM).exe;1
!endif !endif
@ -1467,6 +1495,8 @@ $(OUTDIR)/hardcopy.obj: $(OUTDIR) hardcopy.c $(INCL)
$(OUTDIR)/hashtab.obj: $(OUTDIR) hashtab.c $(INCL) $(OUTDIR)/hashtab.obj: $(OUTDIR) hashtab.c $(INCL)
$(OUTDIR)/highlight.obj: $(OUTDIR) highlight.c $(INCL)
$(OUTDIR)/indent.obj: $(OUTDIR) indent.c $(INCL) $(OUTDIR)/indent.obj: $(OUTDIR) indent.c $(INCL)
$(OUTDIR)/insexpand.obj: $(OUTDIR) insexpand.c $(INCL) $(OUTDIR)/insexpand.obj: $(OUTDIR) insexpand.c $(INCL)
@ -1477,7 +1507,7 @@ $(OUTDIR)/gui_beval.obj: $(OUTDIR) gui_beval.c $(INCL) $(GUI_INCL)
$(OUTDIR)/gui_w32.obj: $(OUTDIR) gui_w32.c $(INCL) $(GUI_INCL) $(OUTDIR)/gui_w32.obj: $(OUTDIR) gui_w32.c $(INCL) $(GUI_INCL)
$(OUTDIR)/gui_dwrite.obj: $(OUTDIR) gui_dwrite.cpp $(INCL) $(GUI_INCL) $(OUTDIR)/gui_dwrite.obj: $(OUTDIR) gui_dwrite.cpp gui_dwrite.h
$(OUTDIR)/if_cscope.obj: $(OUTDIR) if_cscope.c $(INCL) if_cscope.h $(OUTDIR)/if_cscope.obj: $(OUTDIR) if_cscope.c $(INCL) if_cscope.h
@ -1575,6 +1605,10 @@ $(OUTDIR)/pathdef.obj: $(OUTDIR) $(PATHDEF_SRC) $(INCL)
$(OUTDIR)/popupmnu.obj: $(OUTDIR) popupmnu.c $(INCL) $(OUTDIR)/popupmnu.obj: $(OUTDIR) popupmnu.c $(INCL)
$(OUTDIR)/popupwin.obj: $(OUTDIR) popupwin.c $(INCL)
$(OUTDIR)/profiler.obj: $(OUTDIR) profiler.c $(INCL)
$(OUTDIR)/quickfix.obj: $(OUTDIR) quickfix.c $(INCL) $(OUTDIR)/quickfix.obj: $(OUTDIR) quickfix.c $(INCL)
$(OUTDIR)/regexp.obj: $(OUTDIR) regexp.c regexp_nfa.c $(INCL) $(OUTDIR)/regexp.obj: $(OUTDIR) regexp.c regexp_nfa.c $(INCL)
@ -1597,6 +1631,8 @@ $(OUTDIR)/tag.obj: $(OUTDIR) tag.c $(INCL)
$(OUTDIR)/term.obj: $(OUTDIR) term.c $(INCL) $(OUTDIR)/term.obj: $(OUTDIR) term.c $(INCL)
$(OUTDIR)/term.obj: $(OUTDIR) testing.c $(INCL)
$(OUTDIR)/textprop.obj: $(OUTDIR) textprop.c $(INCL) $(OUTDIR)/textprop.obj: $(OUTDIR) textprop.c $(INCL)
$(OUTDIR)/ui.obj: $(OUTDIR) ui.c $(INCL) $(OUTDIR)/ui.obj: $(OUTDIR) ui.c $(INCL)
@ -1682,7 +1718,7 @@ E0_LINKARGS2 = $(LINKARGS2:\=\\)
E_LINKARGS2 = $(E0_LINKARGS2:"=\") E_LINKARGS2 = $(E0_LINKARGS2:"=\")
# ") stop the string # ") stop the string
$(PATHDEF_SRC): auto $(PATHDEF_SRC): Make_mvc.mak
@echo creating $(PATHDEF_SRC) @echo creating $(PATHDEF_SRC)
@echo /* pathdef.c */ > $(PATHDEF_SRC) @echo /* pathdef.c */ > $(PATHDEF_SRC)
@echo #include "vim.h" >> $(PATHDEF_SRC) @echo #include "vim.h" >> $(PATHDEF_SRC)
@ -1693,9 +1729,6 @@ $(PATHDEF_SRC): auto
@echo char_u *compiled_user = (char_u *)"$(USERNAME)"; >> $(PATHDEF_SRC) @echo char_u *compiled_user = (char_u *)"$(USERNAME)"; >> $(PATHDEF_SRC)
@echo char_u *compiled_sys = (char_u *)"$(USERDOMAIN)"; >> $(PATHDEF_SRC) @echo char_u *compiled_sys = (char_u *)"$(USERDOMAIN)"; >> $(PATHDEF_SRC)
auto:
if not exist auto/nul mkdir auto
# End Custom Build # End Custom Build
proto.h: \ proto.h: \
proto/arabic.pro \ proto/arabic.pro \
@ -1724,6 +1757,7 @@ proto.h: \
proto/getchar.pro \ proto/getchar.pro \
proto/hardcopy.pro \ proto/hardcopy.pro \
proto/hashtab.pro \ proto/hashtab.pro \
proto/highlight.pro \
proto/indent.pro \ proto/indent.pro \
proto/insexpand.pro \ proto/insexpand.pro \
proto/json.pro \ proto/json.pro \
@ -1745,6 +1779,8 @@ proto.h: \
proto/winclip.pro \ proto/winclip.pro \
proto/os_win32.pro \ proto/os_win32.pro \
proto/popupmnu.pro \ proto/popupmnu.pro \
proto/popupwin.pro \
proto/profiler.pro \
proto/quickfix.pro \ proto/quickfix.pro \
proto/regexp.pro \ proto/regexp.pro \
proto/screen.pro \ proto/screen.pro \
@ -1756,12 +1792,14 @@ proto.h: \
proto/syntax.pro \ proto/syntax.pro \
proto/tag.pro \ proto/tag.pro \
proto/term.pro \ proto/term.pro \
proto/testing.pro \
proto/textprop.pro \ proto/textprop.pro \
proto/ui.pro \ proto/ui.pro \
proto/undo.pro \ proto/undo.pro \
proto/usercmd.pro \ proto/usercmd.pro \
proto/userfunc.pro \ proto/userfunc.pro \
proto/window.pro \ proto/window.pro \
$(SOUND_PRO) \
$(NETBEANS_PRO) \ $(NETBEANS_PRO) \
$(CHANNEL_PRO) $(CHANNEL_PRO)

View File

@ -1,460 +0,0 @@
# vim: set ft=make :
# Makefile for VIM on the Amiga, using SAS/Lattice C 6.0 to 6.58
#
# Do NOT use the peephole optimizer with a version before 6.56!
# It messes up all kinds of things:
# For 6.0 and 6.1, expand_env() will not work correctly.
# For 6.2 and 6.3 the call to free_line in u_freeentry is wrong.
# The "read.me" file for version 6.56 includes a remark about a fix for the
# peephole optimizer. Everything before 6.56 will probably fail.
#
# You should use Manx Aztec C whenever possible, because it has been tested.
#
# The prototypes from Manx and SAS are incompatible. If the prototypes
# were generated by Manx, first do "touch *.c; make proto" before "make".
# The prototypes generated on Unix work for both.
#
# Note: Not all dependencies are included. This was done to avoid having
# to compile everything when a global variable or function is added.
#>>>>> choose options:
### See feature.h for a list of optionals.
### Any other defines can be included here.
# NO_ARP Don't include ARP functions
# SASC=658 Sas/C version number
# NEWSASC fixes a bug in the syntax highlighting?
DEFINES = DEF=NO_ARP DEF=NEWSASC DEF="SASC=658"
#>>>>> if HAVE_TGETENT is defined termlib.o has to be used
#TERMLIB = termlib.o
TERMLIB =
#>>>>> choose NODEBUG for normal compiling, the other for debugging and
# profiling
# don't switch on debugging when generating proto files, it crashes the
# compiler.
DBG = NODEBUG
#DBG = DBG=SF
#>>>>> choose NOOPTPEEP for 6.0 to 6.3, NOOPT for debugging
# with version 6.56 and later you can probably use OPT
OPTIMIZE = OPT
#OPTIMIZE = NOOPTPEEP
#OPTIMIZE = NOOPT
# for 6.58 you can use the line below, but be warned it takes a loooonnnggg time
#OPTIMIZE=OPT OPTIMIZERSCHEDULER OPTIMIZERTIME NoOPTIMIZERALIAS \
OptimizerComplexity=10 OptimizerDepth=10 OptimizerRecurDepth=10 \
OptimizerInLocal OPTPEEP
#generate code for your processor - 68060 will work for 040's as well.
CPU=68000
#CPU=68020
#CPU=68030
#CPU=68040
#CPU=68060
#Error reporting - rexx or console
ERROR = ERRORCONSOLE ERRORSOURCE ERRORHIGHLIGHT
#ERROR = ERRORREXX ERRORCONSOLE ERRORSOURCE ERRORHIGHLIGHT
#memory types, if you have fast use it :->,
# ANY = will work on all machines
# FAST = this is the best option, for speed
#MEMORYTYPE=FAST
MEMORYTYPE=ANY
#MEMSIZE - this is for compile time only for speed of compilation
#MEMSIZE=HUGE
MEMSIZE=LARGE
#MEMSIZE=SMALL
#>>>>> end of choices
###########################################################################
CC = sc
GST = vim.gst
COPTS = SINT SCODE SDATA
SHELL = csh
DEL = $(SHELL) -c rm -f
# ignore error messages for uninitialized variables, they are mostly not correct
CFLAGS = NOLINK $(DBG) CPU=$(CPU) NOSTACKCHECK DEF=AMIGA CODE=FAR idir=proto ignore=317
CFLAGS2 = $(OPTIMIZE) $(ERROR) GSTIMMEDIATE GST=$(GST)
CFLAGS3 = $(COPTS) STRINGMERGE MEMSIZE=$(MEMSIZE)
CFLAGS4 = $(DEFINES) DATAMEMORY=$(MEMORYTYPE)
PROPT = DEF=PROTO GPROTO GPPARM MAXIMUMERRORS=999 GENPROTOSTATICS GENPROTOPARAMETERS
SRC = \
arabic.c \
autocmd.c \
blowfish.c \
buffer.c \
change.c \
charset.c \
crypt.c \
crypt_zip.c \
debugger.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 \
fileio.c \
findfile.c \
fold.c \
getchar.c \
hardcopy.c \
hashtab.c \
indent.c \
insexpand.c \
json.c \
list.c \
main.c \
mark.c \
memfile.c \
memline.c \
menu.c \
message.c \
misc1.c \
misc2.c \
move.c \
mbyte.c \
normal.c \
ops.c \
option.c \
os_amiga.c \
popupmnu.c \
quickfix.c \
regexp.c \
screen.c \
search.c \
sha256.c \
sign.c \
spell.c \
spellfile.c \
syntax.c \
tag.c \
term.c \
ui.c \
undo.c \
usercmd.c \
userfunc.c \
window.c \
version.c
OBJ = \
arabic.o \
autocmd.o \
blowfish.o \
buffer.o \
change.o \
charset.o \
crypt.o \
crypt_zip.o \
debugger.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 \
fileio.o \
findfile.o \
fold.o \
getchar.o \
hardcopy.o \
hashtab.o \
indent.o \
insexpand.o \
json.o \
list.o \
main.o \
mark.o \
memfile.o \
memline.o \
menu.o \
message.o \
misc1.o \
misc2.o \
move.o \
mbyte.o \
normal.o \
ops.o \
option.o \
os_amiga.o \
popupmnu.o \
quickfix.o \
regexp.o \
screen.o \
search.o \
sha256.o \
sign.o \
spell.o \
spellfile.o \
syntax.o \
tag.o \
term.o \
ui.o \
undo.o \
usercmd.o \
userfunc.o \
window.o \
$(TERMLIB)
PRO = \
proto/arabic.pro \
proto/autocmd.pro \
proto/blowfish.pro \
proto/buffer.pro \
proto/change.pro \
proto/charset.pro \
proto/crypt.pro \
proto/crypt_zip.pro \
proto/debugger.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/fileio.pro \
proto/findfile.pro \
proto/fold.pro \
proto/getchar.pro \
proto/hardcopy.pro \
proto/hashtab.pro \
proto/indent.pro \
proto/insexpand.pro \
proto/json.pro \
proto/list.pro \
proto/main.pro \
proto/mark.pro \
proto/memfile.pro \
proto/memline.pro \
proto/menu.pro \
proto/message.pro \
proto/misc1.pro \
proto/misc2.pro \
proto/move.pro \
proto/mbyte.pro \
proto/normal.pro \
proto/ops.pro \
proto/option.pro \
proto/os_amiga.pro \
proto/popupmnu.pro \
proto/quickfix.pro \
proto/regexp.pro \
proto/screen.pro \
proto/search.pro \
proto/sha256.pro \
proto/sign.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/usercmd.pro \
proto/userfunc.pro \
proto/window.pro
all: proto Vim
Vim: scoptions $(OBJ) version.c version.h
$(CC) $(CFLAGS) version.c
$(CC) LINK $(COPTS) $(OBJ) version.o $(DBG) PNAME=Vim
debug: scoptions $(OBJ) version.c version.h
$(CC) $(CFLAGS) version.c
$(CC) LINK $(COPTS) $(OBJ) version.o $(DBG) PNAME=Vim
proto: $(GST) $(PRO)
tags:
spat ctags $(SRC) *.h
# csh -c ctags $(SRC) *.h
# can't use delete here, too many file names
clean:
$(DEL) *.o Vim $(GST)
# generate GlobalSymbolTable, which speeds up the compile time.
#
# A preprocessing stage is used to work around a bug in the GST generator, in
# that it does not handle nested makefiles properly in this stage.
# Ignore error message for not producing any code (105).
$(GST): scoptions vim.h keymap.h macros.h ascii.h term.h structs.h
$(CC) $(CFLAGS) PREPROCESSORONLY vim.h objectname pre.h
$(CC) MGST=$(GST) pre.h ignore=105
$(DEL) pre.h
# generate an options file, because SAS/C smake can't handle the amiga command
# line can handle the lengths that this makefile will impose on the shell.
# (Manx's make can do this).
scoptions: Make_sas.mak
@echo "Generating - $@ ..."
@echo $(CFLAGS) > scoptions
@echo $(CFLAGS1) >> scoptions
@echo $(CFLAGS2) >> scoptions
@echo $(CFLAGS3) >> scoptions
@echo $(CFLAGS4) >> scoptions
@echo $(COPTS) >>scoptions
@echo done
###########################################################################
$(OBJ): $(GST) vim.h
$(PRO): $(GST) vim.h
.c.o:
$(CC) $(CFLAGS) $*.c
.c.pro:
$(CC) $(CFLAGS) GPFILE=proto/$*.pro $(PROPT) $*.c
# dependencies
arabic.o: arabic.c
proto/arabic.pro: arabic.c
autocmd.o: autocmd.c
proto/autocmd.pro: autocmd.c
blowfish.o: blowfish.c
proto/blowfish.pro: blowfish.c
buffer.o: buffer.c
proto/buffer.pro: buffer.c
change.o: change.c
proto/change.pro: change.c
charset.o: charset.c
proto/charset.pro: charset.c
crypt.o: crypt.c
proto/crypt.pro: crypt.c
crypt_zip.o: crypt_zip.c
proto/crypt_zip.pro: crypt_zip.c
debugger.o: debugger.c
proto/debugger.pro: debugger.c
dict.o: dict.c
proto/dict.pro: dict.c
diff.o: diff.c
proto/diff.pro: diff.c
digraph.o: digraph.c
proto/digraph.pro: digraph.c
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
proto/ex_cmds2.pro: ex_cmds2.c
ex_docmd.o: ex_docmd.c ex_cmds.h
proto/ex_docmd.pro: ex_docmd.c ex_cmds.h
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
fileio.o: fileio.c
proto/fileio.pro: fileio.c
findfile.o: findfile.c
proto/findfile.pro: findfile.c
fold.o: fold.c
proto/fold.pro: fold.c
getchar.o: getchar.c
proto/getchar.pro: getchar.c
hardcopy.o: hardcopy.c
proto/hardcopy.pro: hardcopy.c
hashtab.o: hashtab.c
proto/hashtab.pro: hashtab.c
indent.o: indent.c
proto/indent.pro: indent.c
insexpand.o: insexpand.c
proto/insexpand.pro: insexpand.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
proto/mark.pro: mark.c
memfile.o: memfile.c
proto/memfile.pro: memfile.c
memline.o: memline.c
proto/memline.pro: memline.c
menu.o: menu.c
proto/menu.pro: menu.c
message.o: message.c
proto/message.pro: message.c
misc1.o: misc1.c
proto/misc1.pro: misc1.c
misc2.o: misc2.c
proto/misc2.pro: misc2.c
move.o: move.c
proto/move.pro: move.c
mbyte.o: mbyte.c
proto/mbyte.pro: mbyte.c
normal.o: normal.c
proto/normal.pro: normal.c
ops.o: ops.c
proto/ops.pro: ops.c
option.o: option.c
proto/option.pro: option.c
os_amiga.o: os_amiga.c
proto/os_amiga.pro: os_amiga.c
popupmnu.o: popupmnu.c
proto/popupmnu.pro: popupmnu.c
quickfix.o: quickfix.c
proto/quickfix.pro: quickfix.c
regexp.o: regexp.c
proto/regexp.pro: regexp.c
screen.o: screen.c
proto/screen.pro: screen.c
search.o: search.c
proto/search.pro: search.c
sha256.o: sha256.c
proto/sha256.pro: sha256.c
sign.o: sign.c
proto/sign.pro: sign.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
proto/tag.pro: tag.c
term.o: term.c
proto/term.pro: term.c
termlib.o: termlib.c
proto/termlib.pro: termlib.c
ui.o: ui.c
proto/ui.pro: ui.c
undo.o: undo.c
proto/undo.pro: undo.c
usercmd.o: usercmd.c
proto/usercmd.pro: usercmd.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 # Makefile for Vim on OpenVMS
# #
# Maintainer: Zoltan Arpadffy <arpadffy@polarhome.com> # Maintainer: Zoltan Arpadffy <arpadffy@polarhome.com>
# Last change: 2019 May 11 # Last change: 2019 Jul 14
# #
# This has script been tested on VMS 6.2 to 8.2 on DEC Alpha, VAX and IA64 # This has script been tested on VMS 6.2 to 8.2 on DEC Alpha, VAX and IA64
# with MMS and MMK # with MMS and MMK
@ -311,12 +311,13 @@ SRC = arabic.c autocmd.c beval.c blob.c blowfish.c buffer.c change.c charset.c \
crypt.c crypt_zip.c debugger.c dict.c diff.c digraph.c edit.c eval.c \ crypt.c crypt_zip.c debugger.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 \ evalfunc.c ex_cmds.c ex_cmds2.c ex_docmd.c ex_eval.c ex_getln.c \
if_cscope.c if_xcmdsrv.c fileio.c findfile.c fold.c getchar.c \ if_cscope.c if_xcmdsrv.c fileio.c findfile.c fold.c getchar.c \
hardcopy.c hashtab.c indent.c insexpand.c json.c list.c main.c mark.c \ hardcopy.c hashtab.c highlight.c indent.c insexpand.c json.c list.c \
menu.c mbyte.c memfile.c memline.c message.c misc1.c misc2.c move.c \ main.c mark.c menu.c mbyte.c memfile.c memline.c message.c misc1.c \
normal.c ops.c option.c popupmnu.c quickfix.c regexp.c search.c \ misc2.c move.c normal.c ops.c option.c popupmnu.c popupwin.c \
sha256.c sign.c spell.c spellfile.c syntax.c tag.c term.c termlib.c \ profiler.c quickfix.c regexp.c search.c sha256.c sign.c spell.c \
textprop.c ui.c undo.c usercmd.c userfunc.c version.c screen.c \ spellfile.c syntax.c tag.c term.c termlib.c testing.c textprop.c ui.c \
window.c os_unix.c os_vms.c pathdef.c \ undo.c usercmd.c userfunc.c version.c screen.c window.c os_unix.c \
os_vms.c pathdef.c \
$(GUI_SRC) $(PERL_SRC) $(PYTHON_SRC) $(TCL_SRC) \ $(GUI_SRC) $(PERL_SRC) $(PYTHON_SRC) $(TCL_SRC) \
$(RUBY_SRC) $(HANGULIN_SRC) $(MZSCH_SRC) $(XDIFF_SRC) $(RUBY_SRC) $(HANGULIN_SRC) $(MZSCH_SRC) $(XDIFF_SRC)
@ -325,13 +326,14 @@ OBJ = arabic.obj autocmd.obj beval.obj blob.obj blowfish.obj buffer.obj change.
digraph.obj edit.obj eval.obj evalfunc.obj ex_cmds.obj ex_cmds2.obj \ digraph.obj edit.obj eval.obj evalfunc.obj ex_cmds.obj ex_cmds2.obj \
ex_docmd.obj ex_eval.obj ex_getln.obj if_cscope.obj if_xcmdsrv.obj \ ex_docmd.obj ex_eval.obj ex_getln.obj if_cscope.obj if_xcmdsrv.obj \
fileio.obj findfile.obj fold.obj getchar.obj hardcopy.obj hashtab.obj \ fileio.obj findfile.obj fold.obj getchar.obj hardcopy.obj hashtab.obj \
indent.obj insexpand.obj json.obj list.obj main.obj mark.obj \ highlight.obj indent.obj insexpand.obj json.obj list.obj main.obj \
menu.obj memfile.obj memline.obj message.obj misc1.obj misc2.obj \ mark.obj menu.obj memfile.obj memline.obj message.obj misc1.obj \
move.obj mbyte.obj normal.obj ops.obj option.obj popupmnu.obj \ misc2.obj move.obj mbyte.obj normal.obj ops.obj option.obj \
quickfix.obj regexp.obj search.obj sha256.obj sign.obj spell.obj \ popupmnu.obj popupwin.obj profiler.obj quickfix.obj regexp.obj \
spellfile.obj syntax.obj tag.obj term.obj termlib.obj textprop.obj \ search.obj sha256.obj sign.obj spell.obj spellfile.obj syntax.obj \
ui.obj undo.obj usercmd.obj userfunc.obj screen.obj version.obj \ tag.obj term.obj termlib.obj testing.obj textprop.obj ui.obj undo.obj \
window.obj os_unix.obj os_vms.obj pathdef.obj if_mzsch.obj \ usercmd.obj userfunc.obj screen.obj version.obj window.obj \
os_unix.obj os_vms.obj pathdef.obj if_mzsch.obj \
$(GUI_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(TCL_OBJ) \ $(GUI_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(TCL_OBJ) \
$(RUBY_OBJ) $(HANGULIN_OBJ) $(MZSCH_OBJ) $(XDIFF_OBJ) $(RUBY_OBJ) $(HANGULIN_OBJ) $(MZSCH_OBJ) $(XDIFF_OBJ)
@ -598,6 +600,10 @@ hashtab.obj : hashtab.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h term.h macros.h structs.h regexp.h \ ascii.h keymap.h term.h macros.h structs.h regexp.h \
gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
globals.h globals.h
highlight.obj : highlight.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 beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
globals.h
if_cscope.obj : if_cscope.c vim.h [.auto]config.h feature.h os_unix.h \ if_cscope.obj : if_cscope.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h term.h macros.h structs.h regexp.h \ ascii.h keymap.h term.h macros.h structs.h regexp.h \
gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
@ -688,6 +694,14 @@ popupmnu.obj : popupmnu.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h term.h macros.h structs.h regexp.h \ ascii.h keymap.h term.h macros.h structs.h regexp.h \
gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
globals.h globals.h
popupwin.obj : popupwin.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 beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
globals.h
profiler.obj : profiler.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 beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
globals.h
quickfix.obj : quickfix.c vim.h [.auto]config.h feature.h os_unix.h \ quickfix.obj : quickfix.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h term.h macros.h structs.h regexp.h \ ascii.h keymap.h term.h macros.h structs.h regexp.h \
gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
@ -736,6 +750,10 @@ termlib.obj : termlib.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 beval.h \ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
[.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \ [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
testing.obj : testing.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 beval.h \
[.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \
textprop.obj : textprop.c vim.h [.auto]config.h feature.h os_unix.h \ textprop.obj : textprop.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 beval.h \ ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h beval.h \
[.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \ [.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h \

View File

@ -521,6 +521,7 @@ CClink = $(CC)
# gpm - For mouse support on Linux console via gpm # gpm - For mouse support on Linux console via gpm
# Uncomment this when you do not want to include gpm support, even # Uncomment this when you do not want to include gpm support, even
# though you have gpm libraries and includes. # though you have gpm libraries and includes.
# For Debian/Ubuntu gpm support requires the libgpm-dev package.
#CONF_OPT_GPM = --disable-gpm #CONF_OPT_GPM = --disable-gpm
# sysmouse - For mouse support on FreeBSD and DragonFly console via sysmouse # sysmouse - For mouse support on FreeBSD and DragonFly console via sysmouse
@ -528,6 +529,11 @@ CClink = $(CC)
# though you have /dev/sysmouse and includes. # though you have /dev/sysmouse and includes.
#CONF_OPT_SYSMOUSE = --disable-sysmouse #CONF_OPT_SYSMOUSE = --disable-sysmouse
# libcanberra - For sound support. Default is on for big features.
# Uncomment one of the two to chose otherwise.
# CONF_OPT_CANBERRA = --enable-canberra
# CONF_OPT_CANBERRA = --disable-canberra
# FEATURES - For creating Vim with more or less features # FEATURES - For creating Vim with more or less features
# Uncomment one of these lines when you want to include few to many features. # Uncomment one of these lines when you want to include few to many features.
# The default is "huge" for most systems. # The default is "huge" for most systems.
@ -1598,6 +1604,7 @@ BASIC_SRC = \
getchar.c \ getchar.c \
hardcopy.c \ hardcopy.c \
hashtab.c \ hashtab.c \
highlight.c \
if_cscope.c \ if_cscope.c \
if_xcmdsrv.c \ if_xcmdsrv.c \
indent.c \ indent.c \
@ -1620,6 +1627,8 @@ BASIC_SRC = \
os_unix.c \ os_unix.c \
auto/pathdef.c \ auto/pathdef.c \
popupmnu.c \ popupmnu.c \
popupwin.c \
profiler.c \
pty.c \ pty.c \
quickfix.c \ quickfix.c \
regexp.c \ regexp.c \
@ -1627,12 +1636,14 @@ BASIC_SRC = \
search.c \ search.c \
sha256.c \ sha256.c \
sign.c \ sign.c \
sound.c \
spell.c \ spell.c \
spellfile.c \ spellfile.c \
syntax.c \ syntax.c \
tag.c \ tag.c \
term.c \ term.c \
terminal.c \ terminal.c \
testing.c \
textprop.c \ textprop.c \
ui.c \ ui.c \
undo.c \ undo.c \
@ -1715,6 +1726,7 @@ OBJ_COMMON = \
objects/getchar.o \ objects/getchar.o \
objects/hardcopy.o \ objects/hardcopy.o \
objects/hashtab.o \ objects/hashtab.o \
objects/highlight.o \
$(HANGULIN_OBJ) \ $(HANGULIN_OBJ) \
objects/if_cscope.o \ objects/if_cscope.o \
objects/if_xcmdsrv.o \ objects/if_xcmdsrv.o \
@ -1734,6 +1746,8 @@ OBJ_COMMON = \
objects/os_unix.o \ objects/os_unix.o \
objects/pathdef.o \ objects/pathdef.o \
objects/popupmnu.o \ objects/popupmnu.o \
objects/popupwin.o \
objects/profiler.o \
objects/pty.o \ objects/pty.o \
objects/quickfix.o \ objects/quickfix.o \
objects/regexp.o \ objects/regexp.o \
@ -1741,12 +1755,14 @@ OBJ_COMMON = \
objects/search.o \ objects/search.o \
objects/sha256.o \ objects/sha256.o \
objects/sign.o \ objects/sign.o \
objects/sound.o \
objects/spell.o \ objects/spell.o \
objects/spellfile.o \ objects/spellfile.o \
objects/syntax.o \ objects/syntax.o \
objects/tag.o \ objects/tag.o \
objects/term.o \ objects/term.o \
objects/terminal.o \ objects/terminal.o \
objects/testing.o \
objects/textprop.o \ objects/textprop.o \
objects/ui.o \ objects/ui.o \
objects/undo.o \ objects/undo.o \
@ -1846,6 +1862,7 @@ PRO_AUTO = \
hardcopy.pro \ hardcopy.pro \
hashtab.pro \ hashtab.pro \
hangulin.pro \ hangulin.pro \
highlight.pro \
if_cscope.pro \ if_cscope.pro \
if_lua.pro \ if_lua.pro \
if_mzsch.pro \ if_mzsch.pro \
@ -1873,6 +1890,8 @@ PRO_AUTO = \
os_mac_conv.pro \ os_mac_conv.pro \
os_unix.pro \ os_unix.pro \
popupmnu.pro \ popupmnu.pro \
popupwin.pro \
profiler.pro \
pty.pro \ pty.pro \
quickfix.pro \ quickfix.pro \
regexp.pro \ regexp.pro \
@ -1880,6 +1899,7 @@ PRO_AUTO = \
search.pro \ search.pro \
sha256.pro \ sha256.pro \
sign.pro \ sign.pro \
sound.pro \
spell.pro \ spell.pro \
spellfile.pro \ spellfile.pro \
syntax.pro \ syntax.pro \
@ -1887,6 +1907,7 @@ PRO_AUTO = \
term.pro \ term.pro \
terminal.pro \ terminal.pro \
termlib.pro \ termlib.pro \
testing.pro \
textprop.pro \ textprop.pro \
ui.pro \ ui.pro \
undo.pro \ undo.pro \
@ -1946,7 +1967,7 @@ config auto/config.mk: auto/configure config.mk.in config.h.in
$(CONF_ARGS4) $(CONF_ARGS5) $(CONF_ARGS6) \ $(CONF_ARGS4) $(CONF_ARGS5) $(CONF_ARGS6) \
$(CONF_OPT_MZSCHEME) $(CONF_OPT_PLTHOME) \ $(CONF_OPT_MZSCHEME) $(CONF_OPT_PLTHOME) \
$(CONF_OPT_LUA) $(CONF_OPT_LUA_PREFIX) \ $(CONF_OPT_LUA) $(CONF_OPT_LUA_PREFIX) \
$(CONF_OPT_SYSMOUSE); \ $(CONF_OPT_SYSMOUSE) $(CONF_OPT_CANBERRA); \
fi fi
# Use "make reconfig" to rerun configure without cached values. # Use "make reconfig" to rerun configure without cached values.
@ -2114,7 +2135,8 @@ types.vim: $(TAGS_FILES)
# TESTING # TESTING
# #
# Execute the test scripts and the unittests. # Execute the test scripts and the unittests.
test check: scripttests unittests test_libvterm # Do the scripttests first, so that the summary shows last.
test check: unittests test_libvterm scripttests
# Execute the test scripts. Run these after compiling Vim, before installing. # Execute the test scripts. Run these after compiling Vim, before installing.
# This doesn't depend on $(VIMTARGET), because that won't work when configure # This doesn't depend on $(VIMTARGET), because that won't work when configure
@ -2178,8 +2200,7 @@ test_libvterm:
# These do not depend on the executable, compile it when needed. # These do not depend on the executable, compile it when needed.
test1 \ test1 \
test_eval \ test_eval \
test3 \ test39 \
test29 test30 test37 test39 \
test42 test44 test48 test49 \ test42 test44 test48 test49 \
test52 test59 \ test52 test59 \
test64 test69 \ test64 test69 \
@ -3085,6 +3106,9 @@ objects/gui_mac.o: gui_mac.c
objects/hangulin.o: hangulin.c objects/hangulin.o: hangulin.c
$(CCC) -o $@ hangulin.c $(CCC) -o $@ hangulin.c
objects/highlight.o: highlight.c
$(CCC) -o $@ highlight.c
objects/if_cscope.o: if_cscope.c objects/if_cscope.o: if_cscope.c
$(CCC) -o $@ if_cscope.c $(CCC) -o $@ if_cscope.c
@ -3208,6 +3232,12 @@ objects/pathdef.o: auto/pathdef.c
objects/popupmnu.o: popupmnu.c objects/popupmnu.o: popupmnu.c
$(CCC) -o $@ popupmnu.c $(CCC) -o $@ popupmnu.c
objects/popupwin.o: popupwin.c
$(CCC) -o $@ popupwin.c
objects/profiler.o: profiler.c
$(CCC) -o $@ profiler.c
objects/pty.o: pty.c objects/pty.o: pty.c
$(CCC) -o $@ pty.c $(CCC) -o $@ pty.c
@ -3229,6 +3259,9 @@ objects/sha256.o: sha256.c
objects/sign.o: sign.c objects/sign.o: sign.c
$(CCC) -o $@ sign.c $(CCC) -o $@ sign.c
objects/sound.o: sound.c
$(CCC) -o $@ sound.c
objects/spell.o: spell.c objects/spell.o: spell.c
$(CCC) -o $@ spell.c $(CCC) -o $@ spell.c
@ -3247,6 +3280,9 @@ objects/term.o: term.c
objects/terminal.o: terminal.c $(TERM_DEPS) objects/terminal.o: terminal.c $(TERM_DEPS)
$(CCC) -o $@ terminal.c $(CCC) -o $@ terminal.c
objects/testing.o: testing.c
$(CCC) -o $@ testing.c
objects/textprop.o: textprop.c objects/textprop.o: textprop.c
$(CCC) -o $@ textprop.c $(CCC) -o $@ textprop.c
@ -3524,6 +3560,10 @@ objects/hashtab.o: hashtab.c vim.h protodef.h auto/config.h feature.h os_unix.h
auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
proto.h globals.h proto.h globals.h
objects/highlight.o: highlight.c vim.h protodef.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
proto.h globals.h
objects/if_cscope.o: if_cscope.c vim.h protodef.h auto/config.h feature.h \ objects/if_cscope.o: if_cscope.c vim.h protodef.h auto/config.h feature.h \
os_unix.h auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \ os_unix.h auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
@ -3612,6 +3652,14 @@ objects/popupmnu.o: popupmnu.c vim.h protodef.h auto/config.h feature.h os_unix.
auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
proto.h globals.h proto.h globals.h
objects/popupwin.o: popupwin.c vim.h protodef.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
proto.h globals.h
objects/profiler.o: profiler.c vim.h protodef.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
proto.h globals.h
objects/pty.o: pty.c vim.h protodef.h auto/config.h feature.h os_unix.h \ objects/pty.o: pty.c vim.h protodef.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
@ -3640,6 +3688,10 @@ objects/sign.o: sign.c vim.h protodef.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
proto.h globals.h proto.h globals.h
objects/sound.o: spell.c vim.h protodef.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
proto.h globals.h
objects/spell.o: spell.c vim.h protodef.h auto/config.h feature.h os_unix.h \ objects/spell.o: spell.c vim.h protodef.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
@ -3666,6 +3718,10 @@ objects/terminal.o: terminal.c vim.h protodef.h auto/config.h feature.h os_unix.
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
proto.h globals.h libvterm/include/vterm.h \ proto.h globals.h libvterm/include/vterm.h \
libvterm/include/vterm_keycodes.h libvterm/include/vterm_keycodes.h
objects/testing.o: testing.c vim.h protodef.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
proto.h globals.h
objects/textprop.o: textprop.c vim.h protodef.h auto/config.h feature.h os_unix.h \ objects/textprop.o: textprop.c vim.h protodef.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \ auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \ proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \

View File

@ -21,8 +21,8 @@ To jump to a file, move the cursor on its name and use the `gf` command.
Most code can be found in a file with an obvious name (incomplete list): Most code can be found in a file with an obvious name (incomplete list):
File name | Description File name | Description
--------- | ----------- --------------- | -----------
autocmd.c | autocommands autocmd.c | autocommands
buffer.c | manipulating buffers (loaded files) buffer.c | manipulating buffers (loaded files)
change.c | handling changes to text change.c | handling changes to text
@ -34,6 +34,7 @@ fileio.c | reading and writing files
findfile.c | search for files in 'path' findfile.c | search for files in 'path'
fold.c | folding fold.c | folding
getchar.c | getting characters and key mapping getchar.c | getting characters and key mapping
highlight.c | syntax highlighting
indent.c | C and Lisp indentation indent.c | C and Lisp indentation
insexpand.c | Insert mode completion insexpand.c | Insert mode completion
mark.c | marks mark.c | marks
@ -44,15 +45,20 @@ menu.c | menus
message.c | (error) messages message.c | (error) messages
ops.c | handling operators ("d", "y", "p") ops.c | handling operators ("d", "y", "p")
option.c | options option.c | options
popupmnu.c | popup menu
popupwin.c | popup window
profiler.c | vim script profiler
quickfix.c | quickfix commands (":make", ":cn") quickfix.c | quickfix commands (":make", ":cn")
regexp.c | pattern matching regexp.c | pattern matching
screen.c | updating the windows screen.c | updating the windows
search.c | pattern searching search.c | pattern searching
sign.c | signs sign.c | signs
spell.c | spell checking spell.c | spell checking
syntax.c | syntax and other highlighting syntax.c | syntax and other highlighting
tag.c | tags tag.c | tags
term.c | terminal handling, termcap codes term.c | terminal handling, termcap codes
testing.c | testing: assert and test functions
textprop.c | text properties
undo.c | undo and redo undo.c | undo and redo
usercmd.c | user defined commands usercmd.c | user defined commands
userfunc.c | user defined functions userfunc.c | user defined functions

225
src/auto/configure vendored
View File

@ -840,6 +840,7 @@ enable_desktop_database_update
with_motif_lib with_motif_lib
with_tlib with_tlib
enable_largefile enable_largefile
enable_canberra
enable_acl enable_acl
enable_gpm enable_gpm
enable_sysmouse enable_sysmouse
@ -1515,6 +1516,7 @@ Optional Features:
--disable-icon-cache-update update disabled --disable-icon-cache-update update disabled
--disable-desktop-database-update update disabled --disable-desktop-database-update update disabled
--disable-largefile omit support for large files --disable-largefile omit support for large files
--disable-canberra Do not use libcanberra.
--disable-acl No check for ACL support. --disable-acl No check for ACL support.
--disable-gpm Don't use gpm (Linux mouse daemon). --disable-gpm Don't use gpm (Linux mouse daemon).
--disable-sysmouse Don't use sysmouse (mouse in *BSD console). --disable-sysmouse Don't use sysmouse (mouse in *BSD console).
@ -9303,28 +9305,8 @@ fi
if test "X$PKG_CONFIG" = "X"; then
if test -z "$SKIP_GTK2"; then if test -n "$ac_tool_prefix"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-gtktest argument" >&5
$as_echo_n "checking --disable-gtktest argument... " >&6; }
# Check whether --enable-gtktest was given.
if test "${enable_gtktest+set}" = set; then :
enableval=$enable_gtktest;
else
enable_gtktest=yes
fi
if test "x$enable_gtktest" = "xyes" ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: gtk test enabled" >&5
$as_echo "gtk test enabled" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: gtk test disabled" >&5
$as_echo "gtk test disabled" >&6; }
fi
if test "X$PKG_CONFIG" = "X"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@ -9422,6 +9404,26 @@ else
PKG_CONFIG="$ac_cv_path_PKG_CONFIG" PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
fi fi
fi
if test -z "$SKIP_GTK2"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-gtktest argument" >&5
$as_echo_n "checking --disable-gtktest argument... " >&6; }
# Check whether --enable-gtktest was given.
if test "${enable_gtktest+set}" = set; then :
enableval=$enable_gtktest;
else
enable_gtktest=yes
fi
if test "x$enable_gtktest" = "xyes" ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: gtk test enabled" >&5
$as_echo "gtk test enabled" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: gtk test disabled" >&5
$as_echo "gtk test disabled" >&6; }
fi fi
if test "x$PKG_CONFIG" != "xno"; then if test "x$PKG_CONFIG" != "xno"; then
@ -9677,107 +9679,6 @@ $as_echo "gtk test enabled" >&6; }
$as_echo "gtk test disabled" >&6; } $as_echo "gtk test disabled" >&6; }
fi fi
if test "X$PKG_CONFIG" = "X"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PKG_CONFIG+:} false; then :
$as_echo_n "(cached) " >&6
else
case $PKG_CONFIG in
[\\/]* | ?:[\\/]*)
ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
fi
if test -z "$ac_cv_path_PKG_CONFIG"; then
ac_pt_PKG_CONFIG=$PKG_CONFIG
# Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
$as_echo_n "(cached) " >&6
else
case $ac_pt_PKG_CONFIG in
[\\/]* | ?:[\\/]*)
ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
if test -n "$ac_pt_PKG_CONFIG"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
$as_echo "$ac_pt_PKG_CONFIG" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
if test "x$ac_pt_PKG_CONFIG" = x; then
PKG_CONFIG="no"
else
case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
PKG_CONFIG=$ac_pt_PKG_CONFIG
fi
else
PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
fi
fi
if test "x$PKG_CONFIG" != "xno"; then if test "x$PKG_CONFIG" != "xno"; then
if test "X$GTK_CONFIG" != "Xno" -o "X$PKG_CONFIG" != "Xno"; then if test "X$GTK_CONFIG" != "Xno" -o "X$PKG_CONFIG" != "Xno"; then
@ -12668,7 +12569,7 @@ for ac_func in fchdir fchown fchmod fsync getcwd getpseudotty \
memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \ memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \
getpgid setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \ getpgid setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
sigprocmask sigvec strcasecmp strerror strftime stricmp strncasecmp \ sigprocmask sigvec strcasecmp strerror strftime stricmp strncasecmp \
strnicmp strpbrk strtol tgetent towlower towupper iswupper \ strnicmp strpbrk strtol tgetent towlower towupper iswupper tzset \
usleep utime utimes mblen ftruncate unsetenv posix_openpt usleep utime utimes mblen ftruncate unsetenv posix_openpt
do : do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@ -13026,6 +12927,73 @@ rm -rf conftest*
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-canberra argument" >&5
$as_echo_n "checking --enable-canberra argument... " >&6; }
# Check whether --enable-canberra was given.
if test "${enable_canberra+set}" = set; then :
enableval=$enable_canberra;
else
enable_canberra="maybe"
fi
if test "$enable_canberra" = "maybe"; then
if test "$features" = "big" -o "$features" = "huge"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Defaulting to yes" >&5
$as_echo "Defaulting to yes" >&6; }
enable_canberra="yes"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Defaulting to no" >&5
$as_echo "Defaulting to no" >&6; }
enable_canberra="no"
fi
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_canberra" >&5
$as_echo "$enable_canberra" >&6; }
fi
if test "$enable_canberra" = "yes"; then
if test "x$PKG_CONFIG" != "xno"; then
canberra_lib=`$PKG_CONFIG --libs libcanberra 2>/dev/null`
canberra_cflags=`$PKG_CONFIG --cflags libcanberra 2>/dev/null`
fi
if test "x$canberra_lib" = "x"; then
canberra_lib=-lcanberra
canberra_cflags=-D_REENTRANT
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcanberra" >&5
$as_echo_n "checking for libcanberra... " >&6; }
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $canberra_cflags"
LIBS="$LIBS $canberra_lib"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
# include <canberra.h>
int
main ()
{
ca_context *hello;
ca_context_create(&hello);
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }; $as_echo "#define HAVE_CANBERRA 1" >>confdefs.h
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }; CFLAGS="$ac_save_CFLAGS"; LIBS="$ac_save_LIBS"
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_blksize" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_blksize" >&5
$as_echo_n "checking for st_blksize... " >&6; } $as_echo_n "checking for st_blksize... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@ -14549,9 +14517,14 @@ rm -f core conftest.err conftest.$ac_objext \
$as_echo_n "checking if msgfmt supports --desktop... " >&6; } $as_echo_n "checking if msgfmt supports --desktop... " >&6; }
MSGFMT_DESKTOP= MSGFMT_DESKTOP=
if "$MSGFMT" --help | grep -e '--desktop' >/dev/null; then if "$MSGFMT" --help | grep -e '--desktop' >/dev/null; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 if "$MSGFMT" --version | grep '0.19.[3-7]$' >/dev/null; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: broken" >&5
$as_echo "broken" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; } $as_echo "yes" >&6; }
MSGFMT_DESKTOP="gvim.desktop vim.desktop" MSGFMT_DESKTOP="gvim.desktop vim.desktop"
fi
else else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; } $as_echo "no" >&6; }

View File

@ -1193,7 +1193,7 @@ do_autocmd_event(
return FAIL; return FAIL;
} }
ap = (AutoPat *)alloc((unsigned)sizeof(AutoPat)); ap = ALLOC_ONE(AutoPat);
if (ap == NULL) if (ap == NULL)
return FAIL; return FAIL;
ap->pat = vim_strnsave(pat, patlen); ap->pat = vim_strnsave(pat, patlen);
@ -1242,7 +1242,7 @@ do_autocmd_event(
prev_ac = &(ap->cmds); prev_ac = &(ap->cmds);
while ((ac = *prev_ac) != NULL) while ((ac = *prev_ac) != NULL)
prev_ac = &ac->next; prev_ac = &ac->next;
ac = (AutoCmd *)alloc((unsigned)sizeof(AutoCmd)); ac = ALLOC_ONE(AutoCmd);
if (ac == NULL) if (ac == NULL)
return FAIL; return FAIL;
ac->cmd = vim_strsave(cmd); ac->cmd = vim_strsave(cmd);
@ -1423,7 +1423,7 @@ aucmd_prepbuf(
// back to using the current window. // back to using the current window.
if (win == NULL && aucmd_win == NULL) if (win == NULL && aucmd_win == NULL)
{ {
win_alloc_aucmd_win(); aucmd_win = win_alloc_popup_win();
if (aucmd_win == NULL) if (aucmd_win == NULL)
win = curwin; win = curwin;
} }
@ -1451,20 +1451,12 @@ aucmd_prepbuf(
// unexpected results. // unexpected results.
aco->use_aucmd_win = TRUE; aco->use_aucmd_win = TRUE;
aucmd_win_used = TRUE; aucmd_win_used = TRUE;
aucmd_win->w_buffer = buf;
#if defined(FEAT_SYN_HL) || defined(FEAT_SPELL)
aucmd_win->w_s = &buf->b_s;
#endif
++buf->b_nwindows;
win_init_empty(aucmd_win); // set cursor and topline to safe values
// Make sure w_localdir and globaldir are NULL to avoid a chdir() in win_init_popup_win(aucmd_win, buf);
// win_enter_ext().
VIM_CLEAR(aucmd_win->w_localdir);
aco->globaldir = globaldir; aco->globaldir = globaldir;
globaldir = NULL; globaldir = NULL;
// Split the current window, put the aucmd_win in the upper half. // Split the current window, put the aucmd_win in the upper half.
// We don't want the BufEnter or WinEnter autocommands. // We don't want the BufEnter or WinEnter autocommands.
block_autocmds(); block_autocmds();
@ -1717,7 +1709,6 @@ has_cursormoved(void)
return (first_autopat[(int)EVENT_CURSORMOVED] != NULL); return (first_autopat[(int)EVENT_CURSORMOVED] != NULL);
} }
#if defined(FEAT_CONCEAL) || defined(PROTO)
/* /*
* Return TRUE when there is a CursorMovedI autocommand defined. * Return TRUE when there is a CursorMovedI autocommand defined.
*/ */
@ -1726,7 +1717,6 @@ has_cursormovedI(void)
{ {
return (first_autopat[(int)EVENT_CURSORMOVEDI] != NULL); return (first_autopat[(int)EVENT_CURSORMOVEDI] != NULL);
} }
#endif
/* /*
* Return TRUE when there is a TextChanged autocommand defined. * Return TRUE when there is a TextChanged autocommand defined.
@ -2303,8 +2293,8 @@ auto_next_pat(
{ {
name = event_nr2name(apc->event); name = event_nr2name(apc->event);
s = _("%s Autocommands for \"%s\""); s = _("%s Autocommands for \"%s\"");
sourcing_name = alloc((unsigned)(STRLEN(s) sourcing_name = alloc(STRLEN(s)
+ STRLEN(name) + ap->patlen + 1)); + STRLEN(name) + ap->patlen + 1);
if (sourcing_name != NULL) if (sourcing_name != NULL)
{ {
sprintf((char *)sourcing_name, s, sprintf((char *)sourcing_name, s,
@ -2339,7 +2329,7 @@ auto_next_pat(
* Returns allocated string, or NULL for end of autocommands. * Returns allocated string, or NULL for end of autocommands.
*/ */
char_u * char_u *
getnextac(int c UNUSED, void *cookie, int indent UNUSED) getnextac(int c UNUSED, void *cookie, int indent UNUSED, int do_concat UNUSED)
{ {
AutoPatCmd *acp = (AutoPatCmd *)cookie; AutoPatCmd *acp = (AutoPatCmd *)cookie;
char_u *retval; char_u *retval;

View File

@ -10,61 +10,50 @@
#include "vim.h" #include "vim.h"
#if defined(FEAT_BEVAL) || defined(PROTO) #if defined(FEAT_BEVAL) || defined(FEAT_TEXT_PROP) || defined(PROT)
/* /*
* Get the text and position to be evaluated for "beval". * Find text under the mouse position "row" / "col".
* If "getword" is true the returned text is not the whole line but the * If "getword" is TRUE the returned text in "*textp" is not the whole line but
* relevant word in allocated memory. * the relevant word in allocated memory.
* Returns OK or FAIL. * Return OK if found.
* Return FAIL if not found, no text at the mouse position.
*/ */
int int
get_beval_info( find_word_under_cursor(
BalloonEval *beval, int mouserow,
int getword, int mousecol,
win_T **winp, int getword,
linenr_T *lnump, int flags, // flags for find_ident_at_pos()
char_u **textp, win_T **winp, // can be NULL
int *colp) linenr_T *lnump, // can be NULL
char_u **textp,
int *colp, // column where mouse hovers, can be NULL
int *startcolp) // column where text starts, can be NULL
{ {
int row = mouserow;
int col = mousecol;
int scol;
win_T *wp; win_T *wp;
int row, col;
char_u *lbuf; char_u *lbuf;
linenr_T lnum; linenr_T lnum;
*textp = NULL; *textp = NULL;
# ifdef FEAT_BEVAL_TERM wp = mouse_find_win(&row, &col, FAIL_POPUP);
# ifdef FEAT_GUI
if (!gui.in_use)
# endif
{
row = mouse_row;
col = mouse_col;
}
# endif
# ifdef FEAT_GUI
if (gui.in_use)
{
row = Y_2_ROW(beval->y);
col = X_2_COL(beval->x);
}
#endif
wp = mouse_find_win(&row, &col);
if (wp != NULL && row >= 0 && row < wp->w_height && col < wp->w_width) if (wp != NULL && row >= 0 && row < wp->w_height && col < wp->w_width)
{ {
/* Found a window and the cursor is in the text. Now find the line // Found a window and the cursor is in the text. Now find the line
* number. */ // number.
if (!mouse_comp_pos(wp, &row, &col, &lnum)) if (!mouse_comp_pos(wp, &row, &col, &lnum))
{ {
/* Not past end of the file. */ // Not past end of the file.
lbuf = ml_get_buf(wp->w_buffer, lnum, FALSE); lbuf = ml_get_buf(wp->w_buffer, lnum, FALSE);
if (col <= win_linetabsize(wp, lbuf, (colnr_T)MAXCOL)) if (col <= win_linetabsize(wp, lbuf, (colnr_T)MAXCOL))
{ {
/* Not past end of line. */ // Not past end of line.
if (getword) if (getword)
{ {
/* For Netbeans we get the relevant part of the line // For Netbeans we get the relevant part of the line
* instead of the whole line. */ // instead of the whole line.
int len; int len;
pos_T *spos = NULL, *epos = NULL; pos_T *spos = NULL, *epos = NULL;
@ -93,9 +82,9 @@ get_beval_info(
? col <= (int)epos->col ? col <= (int)epos->col
: lnum < epos->lnum)) : lnum < epos->lnum))
{ {
/* Visual mode and pointing to the line with the // Visual mode and pointing to the line with the
* Visual selection: return selected text, with a // Visual selection: return selected text, with a
* maximum of one line. */ // maximum of one line.
if (spos->lnum != epos->lnum || spos->col == epos->col) if (spos->lnum != epos->lnum || spos->col == epos->col)
return FAIL; return FAIL;
@ -109,10 +98,10 @@ get_beval_info(
} }
else else
{ {
/* Find the word under the cursor. */ // Find the word under the cursor.
++emsg_off; ++emsg_off;
len = find_ident_at_pos(wp, lnum, (colnr_T)col, &lbuf, len = find_ident_at_pos(wp, lnum, (colnr_T)col,
FIND_IDENT + FIND_STRING + FIND_EVAL); &lbuf, &scol, flags);
--emsg_off; --emsg_off;
if (len == 0) if (len == 0)
return FAIL; return FAIL;
@ -120,27 +109,74 @@ get_beval_info(
} }
} }
*winp = wp; if (winp != NULL)
*lnump = lnum; *winp = wp;
if (lnump != NULL)
*lnump = lnum;
*textp = lbuf; *textp = lbuf;
*colp = col; if (colp != NULL)
#ifdef FEAT_VARTABS *colp = col;
vim_free(beval->vts); if (startcolp != NULL)
beval->vts = tabstop_copy(wp->w_buffer->b_p_vts_array); *startcolp = scol;
if (wp->w_buffer->b_p_vts_array != NULL && beval->vts == NULL)
return FAIL;
#endif
beval->ts = wp->w_buffer->b_p_ts;
return OK; return OK;
} }
} }
} }
return FAIL;
}
#endif
#if defined(FEAT_BEVAL) || defined(PROTO)
/*
* Get the text and position to be evaluated for "beval".
* If "getword" is TRUE the returned text is not the whole line but the
* relevant word in allocated memory.
* Returns OK or FAIL.
*/
int
get_beval_info(
BalloonEval *beval,
int getword,
win_T **winp,
linenr_T *lnump,
char_u **textp,
int *colp)
{
int row = mouse_row;
int col = mouse_col;
# ifdef FEAT_GUI
if (gui.in_use)
{
row = Y_2_ROW(beval->y);
col = X_2_COL(beval->x);
}
#endif
if (find_word_under_cursor(row, col, getword,
FIND_IDENT + FIND_STRING + FIND_EVAL,
winp, lnump, textp, colp, NULL) == OK)
{
#ifdef FEAT_VARTABS
vim_free(beval->vts);
beval->vts = tabstop_copy((*winp)->w_buffer->b_p_vts_array);
if ((*winp)->w_buffer->b_p_vts_array != NULL && beval->vts == NULL)
{
if (getword)
vim_free(*textp);
return FAIL;
}
#endif
beval->ts = (*winp)->w_buffer->b_p_ts;
return OK;
}
return FAIL; return FAIL;
} }
/* /*
* Show a balloon with "mesg" or "list". * Show a balloon with "mesg" or "list".
* Hide the balloon when both are NULL.
*/ */
void void
post_balloon(BalloonEval *beval UNUSED, char_u *mesg, list_T *list UNUSED) post_balloon(BalloonEval *beval UNUSED, char_u *mesg, list_T *list UNUSED)
@ -153,7 +189,7 @@ post_balloon(BalloonEval *beval UNUSED, char_u *mesg, list_T *list UNUSED)
# endif # endif
# ifdef FEAT_BEVAL_GUI # ifdef FEAT_BEVAL_GUI
if (gui.in_use) if (gui.in_use)
/* GUI can't handle a list */ // GUI can't handle a list
gui_mch_post_balloon(beval, mesg); gui_mch_post_balloon(beval, mesg);
# endif # endif
} }
@ -263,11 +299,15 @@ general_beval_cb(BalloonEval *beval, int state UNUSED)
set_vim_var_string(VV_BEVAL_TEXT, NULL, -1); set_vim_var_string(VV_BEVAL_TEXT, NULL, -1);
if (result != NULL && result[0] != NUL) if (result != NULL && result[0] != NUL)
{
post_balloon(beval, result, NULL); post_balloon(beval, result, NULL);
recursive = FALSE;
return; // The 'balloonexpr' evaluation may show something on the screen
} // that requires a screen update.
if (must_redraw)
redraw_after_callback(FALSE);
recursive = FALSE;
return;
} }
} }
#endif #endif

View File

@ -22,7 +22,7 @@
blob_T * blob_T *
blob_alloc(void) blob_alloc(void)
{ {
blob_T *blob = (blob_T *)alloc_clear(sizeof(blob_T)); blob_T *blob = ALLOC_CLEAR_ONE(blob_T);
if (blob != NULL) if (blob != NULL)
ga_init2(&blob->bv_ga, 1, 100); ga_init2(&blob->bv_ga, 1, 100);
@ -63,6 +63,7 @@ blob_copy(typval_T *from, typval_T *to)
int ret = OK; int ret = OK;
to->v_type = VAR_BLOB; to->v_type = VAR_BLOB;
to->v_lock = 0;
if (from->vval.v_blob == NULL) if (from->vval.v_blob == NULL)
to->vval.v_blob = NULL; to->vval.v_blob = NULL;
else if (rettv_blob_alloc(to) == FAIL) else if (rettv_blob_alloc(to) == FAIL)

View File

@ -645,7 +645,7 @@ crypt_blowfish_init(
char_u* seed, char_u* seed,
int seed_len) int seed_len)
{ {
bf_state_T *bfs = (bf_state_T *)alloc_clear(sizeof(bf_state_T)); bf_state_T *bfs = ALLOC_CLEAR_ONE(bf_state_T);
if (bfs == NULL) if (bfs == NULL)
return FAIL; return FAIL;

View File

@ -60,7 +60,9 @@ static char *e_auabort = N_("E855: Autocommands caused command to abort");
/* Number of times free_buffer() was called. */ /* Number of times free_buffer() was called. */
static int buf_free_count = 0; static int buf_free_count = 0;
/* Read data from buffer for retrying. */ /*
* Read data from buffer for retrying.
*/
static int static int
read_buffer( read_buffer(
int read_stdin, /* read file from stdin, otherwise fifo */ int read_stdin, /* read file from stdin, otherwise fifo */
@ -104,7 +106,7 @@ read_buffer(
if (!readonlymode && !BUFEMPTY()) if (!readonlymode && !BUFEMPTY())
changed(); changed();
else if (retval == OK) else if (retval == OK)
unchanged(curbuf, FALSE); unchanged(curbuf, FALSE, TRUE);
if (retval == OK) if (retval == OK)
{ {
@ -119,6 +121,23 @@ read_buffer(
return retval; return retval;
} }
/*
* Ensure buffer "buf" is loaded. Does not trigger the swap-exists action.
*/
void
buffer_ensure_loaded(buf_T *buf)
{
if (buf->b_ml.ml_mfp == NULL)
{
aco_save_T aco;
aucmd_prepbuf(&aco, buf);
swap_exists_action = SEA_NONE;
open_buffer(FALSE, NULL, 0);
aucmd_restbuf(&aco);
}
}
/* /*
* Open current buffer, that is: open the memfile and read the file into * Open current buffer, that is: open the memfile and read the file into
* memory. * memory.
@ -275,7 +294,7 @@ open_buffer(
) )
changed(); changed();
else if (retval == OK && !read_stdin && !read_fifo) else if (retval == OK && !read_stdin && !read_fifo)
unchanged(curbuf, FALSE); unchanged(curbuf, FALSE, TRUE);
save_file_ff(curbuf); /* keep this fileformat */ save_file_ff(curbuf); /* keep this fileformat */
/* Set last_changedtick to avoid triggering a TextChanged autocommand right /* Set last_changedtick to avoid triggering a TextChanged autocommand right
@ -456,7 +475,7 @@ close_buffer(
win_T *win, /* if not NULL, set b_last_cursor */ win_T *win, /* if not NULL, set b_last_cursor */
buf_T *buf, buf_T *buf,
int action, int action,
int abort_if_last UNUSED) int abort_if_last)
{ {
int is_curbuf; int is_curbuf;
int nwindows; int nwindows;
@ -700,7 +719,7 @@ aucmd_abort:
buf_clear_file(buf_T *buf) buf_clear_file(buf_T *buf)
{ {
buf->b_ml.ml_line_count = 1; buf->b_ml.ml_line_count = 1;
unchanged(buf, TRUE); unchanged(buf, TRUE, TRUE);
buf->b_shortname = FALSE; buf->b_shortname = FALSE;
buf->b_p_eol = TRUE; buf->b_p_eol = TRUE;
buf->b_start_eol = TRUE; buf->b_start_eol = TRUE;
@ -862,7 +881,7 @@ free_buffer(buf_T *buf)
#endif #endif
#ifdef FEAT_JOB_CHANNEL #ifdef FEAT_JOB_CHANNEL
vim_free(buf->b_prompt_text); vim_free(buf->b_prompt_text);
free_callback(buf->b_prompt_callback, buf->b_prompt_partial); free_callback(&buf->b_prompt_callback);
#endif #endif
buf_hashtab_remove(buf); buf_hashtab_remove(buf);
@ -1071,7 +1090,7 @@ handle_swap_exists(bufref_T *old_curbuf)
/* User selected Recover at ATTENTION prompt. */ /* User selected Recover at ATTENTION prompt. */
msg_scroll = TRUE; msg_scroll = TRUE;
ml_recover(); ml_recover(FALSE);
msg_puts("\n"); /* don't overwrite the last message */ msg_puts("\n"); /* don't overwrite the last message */
cmdline_row = msg_row; cmdline_row = msg_row;
do_modelines(0); do_modelines(0);
@ -1742,9 +1761,12 @@ enter_buffer(buf_T *buf)
} }
else else
{ {
if (!msg_silent) if (!msg_silent && !shortmess(SHM_FILEINFO))
need_fileinfo = TRUE; /* display file info after redraw */ need_fileinfo = TRUE; // display file info after redraw
(void)buf_check_timestamp(curbuf, FALSE); /* check if file changed */
// check if file changed
(void)buf_check_timestamp(curbuf, FALSE);
curwin->w_topline = 1; curwin->w_topline = 1;
#ifdef FEAT_DIFF #ifdef FEAT_DIFF
curwin->w_topfill = 0; curwin->w_topfill = 0;
@ -1955,7 +1977,7 @@ buflist_new(
} }
if (buf != curbuf || curbuf == NULL) if (buf != curbuf || curbuf == NULL)
{ {
buf = (buf_T *)alloc_clear((unsigned)sizeof(buf_T)); buf = ALLOC_CLEAR_ONE(buf_T);
if (buf == NULL) if (buf == NULL)
{ {
vim_free(ffname); vim_free(ffname);
@ -1982,7 +2004,7 @@ buflist_new(
} }
clear_wininfo(buf); clear_wininfo(buf);
buf->b_wininfo = (wininfo_T *)alloc_clear((unsigned)sizeof(wininfo_T)); buf->b_wininfo = ALLOC_CLEAR_ONE(wininfo_T);
if ((ffname != NULL && (buf->b_ffname == NULL || buf->b_sfname == NULL)) if ((ffname != NULL && (buf->b_ffname == NULL || buf->b_sfname == NULL))
|| buf->b_wininfo == NULL) || buf->b_wininfo == NULL)
@ -2574,7 +2596,7 @@ ExpandBufnames(
/* Make a copy of "pat" and change "^" to "\(^\|[\/]\)". */ /* Make a copy of "pat" and change "^" to "\(^\|[\/]\)". */
if (*pat == '^') if (*pat == '^')
{ {
patc = alloc((unsigned)STRLEN(pat) + 11); patc = alloc(STRLEN(pat) + 11);
if (patc == NULL) if (patc == NULL)
return FAIL; return FAIL;
STRCPY(patc, "\\(^\\|[\\/]\\)"); STRCPY(patc, "\\(^\\|[\\/]\\)");
@ -2631,7 +2653,7 @@ ExpandBufnames(
break; break;
if (round == 1) if (round == 1)
{ {
*file = (char_u **)alloc((unsigned)(count * sizeof(char_u *))); *file = ALLOC_MULT(char_u *, count);
if (*file == NULL) if (*file == NULL)
{ {
vim_regfree(regmatch.regprog); vim_regfree(regmatch.regprog);
@ -2768,7 +2790,7 @@ buflist_setfpos(
if (wip == NULL) if (wip == NULL)
{ {
/* allocate a new entry */ /* allocate a new entry */
wip = (wininfo_T *)alloc_clear((unsigned)sizeof(wininfo_T)); wip = ALLOC_CLEAR_ONE(wininfo_T);
if (wip == NULL) if (wip == NULL)
return; return;
wip->wi_win = win; wip->wi_win = win;
@ -3427,7 +3449,7 @@ fileinfo(
char *buffer; char *buffer;
size_t len; size_t len;
buffer = (char *)alloc(IOSIZE); buffer = alloc(IOSIZE);
if (buffer == NULL) if (buffer == NULL)
return; return;
@ -3890,7 +3912,8 @@ build_stl_str_hl(
char_u base; char_u base;
char_u opt; char_u opt;
#define TMPLEN 70 #define TMPLEN 70
char_u tmp[TMPLEN]; char_u buf_tmp[TMPLEN];
char_u win_tmp[TMPLEN];
char_u *usefmt = fmt; char_u *usefmt = fmt;
struct stl_hlrec *sp; struct stl_hlrec *sp;
int save_must_redraw = must_redraw; int save_must_redraw = must_redraw;
@ -3903,9 +3926,17 @@ build_stl_str_hl(
*/ */
if (fmt[0] == '%' && fmt[1] == '!') if (fmt[0] == '%' && fmt[1] == '!')
{ {
typval_T tv;
tv.v_type = VAR_NUMBER;
tv.vval.v_number = wp->w_id;
set_var((char_u *)"g:statusline_winid", &tv, FALSE);
usefmt = eval_to_string_safe(fmt + 2, NULL, use_sandbox); usefmt = eval_to_string_safe(fmt + 2, NULL, use_sandbox);
if (usefmt == NULL) if (usefmt == NULL)
usefmt = fmt; usefmt = fmt;
do_unlet((char_u *)"g:statusline_winid", TRUE);
} }
#endif #endif
@ -4222,8 +4253,11 @@ build_stl_str_hl(
p = t; p = t;
#ifdef FEAT_EVAL #ifdef FEAT_EVAL
vim_snprintf((char *)tmp, sizeof(tmp), "%d", curbuf->b_fnum); vim_snprintf((char *)buf_tmp, sizeof(buf_tmp),
set_internal_string_var((char_u *)"g:actual_curbuf", tmp); "%d", curbuf->b_fnum);
set_internal_string_var((char_u *)"g:actual_curbuf", buf_tmp);
vim_snprintf((char *)win_tmp, sizeof(win_tmp), "%d", curwin->w_id);
set_internal_string_var((char_u *)"g:actual_curwin", win_tmp);
save_curbuf = curbuf; save_curbuf = curbuf;
save_curwin = curwin; save_curwin = curwin;
@ -4235,6 +4269,7 @@ build_stl_str_hl(
curwin = save_curwin; curwin = save_curwin;
curbuf = save_curbuf; curbuf = save_curbuf;
do_unlet((char_u *)"g:actual_curbuf", TRUE); do_unlet((char_u *)"g:actual_curbuf", TRUE);
do_unlet((char_u *)"g:actual_curwin", TRUE);
if (str != NULL && *str != 0) if (str != NULL && *str != 0)
{ {
@ -4287,21 +4322,21 @@ build_stl_str_hl(
break; break;
case STL_ALTPERCENT: case STL_ALTPERCENT:
str = tmp; str = buf_tmp;
get_rel_pos(wp, str, TMPLEN); get_rel_pos(wp, str, TMPLEN);
break; break;
case STL_ARGLISTSTAT: case STL_ARGLISTSTAT:
fillable = FALSE; fillable = FALSE;
tmp[0] = 0; buf_tmp[0] = 0;
if (append_arg_number(wp, tmp, (int)sizeof(tmp), FALSE)) if (append_arg_number(wp, buf_tmp, (int)sizeof(buf_tmp), FALSE))
str = tmp; str = buf_tmp;
break; break;
case STL_KEYMAP: case STL_KEYMAP:
fillable = FALSE; fillable = FALSE;
if (get_keymap_str(wp, (char_u *)"<%s>", tmp, TMPLEN)) if (get_keymap_str(wp, (char_u *)"<%s>", buf_tmp, TMPLEN))
str = tmp; str = buf_tmp;
break; break;
case STL_PAGENUM: case STL_PAGENUM:
#if defined(FEAT_PRINTER) || defined(FEAT_GUI_TABLINE) #if defined(FEAT_PRINTER) || defined(FEAT_GUI_TABLINE)
@ -4357,9 +4392,9 @@ build_stl_str_hl(
if (*wp->w_buffer->b_p_ft != NUL if (*wp->w_buffer->b_p_ft != NUL
&& STRLEN(wp->w_buffer->b_p_ft) < TMPLEN - 3) && STRLEN(wp->w_buffer->b_p_ft) < TMPLEN - 3)
{ {
vim_snprintf((char *)tmp, sizeof(tmp), "[%s]", vim_snprintf((char *)buf_tmp, sizeof(buf_tmp), "[%s]",
wp->w_buffer->b_p_ft); wp->w_buffer->b_p_ft);
str = tmp; str = buf_tmp;
} }
break; break;
@ -4368,11 +4403,11 @@ build_stl_str_hl(
if (*wp->w_buffer->b_p_ft != NUL if (*wp->w_buffer->b_p_ft != NUL
&& STRLEN(wp->w_buffer->b_p_ft) < TMPLEN - 2) && STRLEN(wp->w_buffer->b_p_ft) < TMPLEN - 2)
{ {
vim_snprintf((char *)tmp, sizeof(tmp), ",%s", vim_snprintf((char *)buf_tmp, sizeof(buf_tmp), ",%s",
wp->w_buffer->b_p_ft); wp->w_buffer->b_p_ft);
for (t = tmp; *t != 0; t++) for (t = buf_tmp; *t != 0; t++)
*t = TOUPPER_LOC(*t); *t = TOUPPER_LOC(*t);
str = tmp; str = buf_tmp;
} }
break; break;
@ -4895,7 +4930,7 @@ do_arg_all(
setpcmark(); setpcmark();
opened_len = ARGCOUNT; opened_len = ARGCOUNT;
opened = alloc_clear((unsigned)opened_len); opened = alloc_clear(opened_len);
if (opened == NULL) if (opened == NULL)
return; return;
@ -4940,7 +4975,7 @@ do_arg_all(
if (i < alist->al_ga.ga_len if (i < alist->al_ga.ga_len
&& (AARGLIST(alist)[i].ae_fnum == buf->b_fnum && (AARGLIST(alist)[i].ae_fnum == buf->b_fnum
|| fullpathcmp(alist_name(&AARGLIST(alist)[i]), || fullpathcmp(alist_name(&AARGLIST(alist)[i]),
buf->b_ffname, TRUE) & FPC_SAME)) buf->b_ffname, TRUE, TRUE) & FPC_SAME))
{ {
int weight = 1; int weight = 1;
@ -5662,7 +5697,17 @@ bt_help(buf_T *buf)
int int
bt_prompt(buf_T *buf) bt_prompt(buf_T *buf)
{ {
return buf != NULL && buf->b_p_bt[0] == 'p'; return buf != NULL && buf->b_p_bt[0] == 'p' && buf->b_p_bt[1] == 'r';
}
/*
* Return TRUE if "buf" is a buffer for a popup window.
*/
int
bt_popup(buf_T *buf)
{
return buf != NULL && buf->b_p_bt != NULL
&& buf->b_p_bt[0] == 'p' && buf->b_p_bt[1] == 'o';
} }
/* /*
@ -5670,7 +5715,7 @@ bt_prompt(buf_T *buf)
* buffer. This means the buffer name is not a file name. * buffer. This means the buffer name is not a file name.
*/ */
int int
bt_nofile(buf_T *buf) bt_nofilename(buf_T *buf)
{ {
return buf != NULL && ((buf->b_p_bt[0] == 'n' && buf->b_p_bt[2] == 'f') return buf != NULL && ((buf->b_p_bt[0] == 'n' && buf->b_p_bt[2] == 'f')
|| buf->b_p_bt[0] == 'a' || buf->b_p_bt[0] == 'a'
@ -5678,6 +5723,15 @@ bt_nofile(buf_T *buf)
|| buf->b_p_bt[0] == 'p'); || buf->b_p_bt[0] == 'p');
} }
/*
* Return TRUE if "buf" has 'buftype' set to "nofile".
*/
int
bt_nofile(buf_T *buf)
{
return buf != NULL && buf->b_p_bt[0] == 'n' && buf->b_p_bt[2] == 'f';
}
/* /*
* Return TRUE if "buf" is a "nowrite", "nofile", "terminal" or "prompt" * Return TRUE if "buf" is a "nowrite", "nofile", "terminal" or "prompt"
* buffer. * buffer.
@ -5744,7 +5798,7 @@ buf_spname(buf_T *buf)
/* There is no _file_ when 'buftype' is "nofile", b_sfname /* There is no _file_ when 'buftype' is "nofile", b_sfname
* contains the name as specified by the user. */ * contains the name as specified by the user. */
if (bt_nofile(buf)) if (bt_nofilename(buf))
{ {
#ifdef FEAT_TERMINAL #ifdef FEAT_TERMINAL
if (buf->b_term != NULL) if (buf->b_term != NULL)
@ -5755,6 +5809,10 @@ buf_spname(buf_T *buf)
#ifdef FEAT_JOB_CHANNEL #ifdef FEAT_JOB_CHANNEL
if (bt_prompt(buf)) if (bt_prompt(buf))
return (char_u *)_("[Prompt]"); return (char_u *)_("[Prompt]");
#endif
#ifdef FEAT_TEXT_PROP
if (bt_popup(buf))
return (char_u *)_("[Popup]");
#endif #endif
return (char_u *)_("[Scratch]"); return (char_u *)_("[Scratch]");
} }
@ -5921,3 +5979,48 @@ wipe_buffer(
if (!aucmd) if (!aucmd)
unblock_autocmds(); unblock_autocmds();
} }
#if defined(FEAT_EVAL) || defined(PROTO)
/*
* Mark references in functions of buffers.
*/
int
set_ref_in_buffers(int copyID)
{
int abort = FALSE;
buf_T *bp;
FOR_ALL_BUFFERS(bp)
{
listener_T *lnr;
typval_T tv;
for (lnr = bp->b_listener; !abort && lnr != NULL; lnr = lnr->lr_next)
{
if (lnr->lr_callback.cb_partial != NULL)
{
tv.v_type = VAR_PARTIAL;
tv.vval.v_partial = lnr->lr_callback.cb_partial;
abort = abort || set_ref_in_item(&tv, copyID, NULL, NULL);
}
}
# ifdef FEAT_JOB_CHANNEL
if (!abort && bp->b_prompt_callback.cb_partial != NULL)
{
tv.v_type = VAR_PARTIAL;
tv.vval.v_partial = bp->b_prompt_callback.cb_partial;
abort = abort || set_ref_in_item(&tv, copyID, NULL, NULL);
}
if (!abort && bp->b_prompt_interrupt.cb_partial != NULL)
{
tv.v_type = VAR_PARTIAL;
tv.vval.v_partial = bp->b_prompt_interrupt.cb_partial;
abort = abort || set_ref_in_item(&tv, copyID, NULL, NULL);
}
# endif
if (abort)
break;
}
return abort;
}
#endif

View File

@ -152,11 +152,81 @@ changed_internal(void)
} }
#ifdef FEAT_EVAL #ifdef FEAT_EVAL
static list_T *recorded_changes = NULL;
static long next_listener_id = 0; static long next_listener_id = 0;
/*
* Check if the change at "lnum" / "col" is above or overlaps with an existing
* changed. If above then flush changes and invoke listeners.
* If "merge" is TRUE do the merge.
* Returns TRUE if the change was merged.
*/
static int
check_recorded_changes(
buf_T *buf,
linenr_T lnum,
colnr_T col,
linenr_T lnume,
long xtra,
int merge)
{
if (buf->b_recorded_changes != NULL && xtra != 0)
{
listitem_T *li;
linenr_T prev_lnum;
linenr_T prev_lnume;
for (li = buf->b_recorded_changes->lv_first; li != NULL;
li = li->li_next)
{
prev_lnum = (linenr_T)dict_get_number(
li->li_tv.vval.v_dict, (char_u *)"lnum");
prev_lnume = (linenr_T)dict_get_number(
li->li_tv.vval.v_dict, (char_u *)"end");
if (prev_lnum >= lnum || prev_lnum > lnume
|| (prev_lnume >= lnum && xtra != 0))
{
if (li->li_next == NULL && lnum == prev_lnum
&& xtra == 0
&& col + 1 == (colnr_T)dict_get_number(
li->li_tv.vval.v_dict, (char_u *)"col"))
{
if (merge)
{
dictitem_T *di;
// Same start point and nothing is following, entries
// can be merged.
di = dict_find(li->li_tv.vval.v_dict,
(char_u *)"end", -1);
if (di != NULL)
{
prev_lnum = tv_get_number(&di->di_tv);
if (lnume > prev_lnum)
di->di_tv.vval.v_number = lnume;
}
di = dict_find(li->li_tv.vval.v_dict,
(char_u *)"added", -1);
if (di != NULL)
di->di_tv.vval.v_number += xtra;
return TRUE;
}
}
else
{
// the current change is going to make the line number in
// the older change invalid, flush now
invoke_listeners(curbuf);
break;
}
}
}
}
return FALSE;
}
/* /*
* Record a change for listeners added with listener_add(). * Record a change for listeners added with listener_add().
* Always for the current buffer.
*/ */
static void static void
may_record_change( may_record_change(
@ -169,13 +239,19 @@ may_record_change(
if (curbuf->b_listener == NULL) if (curbuf->b_listener == NULL)
return; return;
if (recorded_changes == NULL)
// If the new change is going to change the line numbers in already listed
// changes, then flush.
if (check_recorded_changes(curbuf, lnum, col, lnume, xtra, TRUE))
return;
if (curbuf->b_recorded_changes == NULL)
{ {
recorded_changes = list_alloc(); curbuf->b_recorded_changes = list_alloc();
if (recorded_changes == NULL) // out of memory if (curbuf->b_recorded_changes == NULL) // out of memory
return; return;
++recorded_changes->lv_refcount; ++curbuf->b_recorded_changes->lv_refcount;
recorded_changes->lv_lock = VAR_FIXED; curbuf->b_recorded_changes->lv_lock = VAR_FIXED;
} }
dict = dict_alloc(); dict = dict_alloc();
@ -186,7 +262,7 @@ may_record_change(
dict_add_number(dict, "added", (varnumber_T)xtra); dict_add_number(dict, "added", (varnumber_T)xtra);
dict_add_number(dict, "col", (varnumber_T)col + 1); dict_add_number(dict, "col", (varnumber_T)col + 1);
list_append_dict(recorded_changes, dict); list_append_dict(curbuf->b_recorded_changes, dict);
} }
/* /*
@ -195,54 +271,71 @@ may_record_change(
void void
f_listener_add(typval_T *argvars, typval_T *rettv) f_listener_add(typval_T *argvars, typval_T *rettv)
{ {
char_u *callback; callback_T callback;
partial_T *partial;
listener_T *lnr; listener_T *lnr;
buf_T *buf = curbuf; buf_T *buf = curbuf;
callback = get_callback(&argvars[0], &partial); callback = get_callback(&argvars[0]);
if (callback == NULL) if (callback.cb_name == NULL)
return; return;
if (argvars[1].v_type != VAR_UNKNOWN) if (argvars[1].v_type != VAR_UNKNOWN)
{ {
buf = get_buf_arg(&argvars[1]); buf = get_buf_arg(&argvars[1]);
if (buf == NULL) if (buf == NULL)
{
free_callback(&callback);
return; return;
}
} }
lnr = (listener_T *)alloc_clear((sizeof(listener_T))); lnr = ALLOC_CLEAR_ONE(listener_T);
if (lnr == NULL) if (lnr == NULL)
{ {
free_callback(callback, partial); free_callback(&callback);
return; return;
} }
lnr->lr_next = buf->b_listener; lnr->lr_next = buf->b_listener;
buf->b_listener = lnr; buf->b_listener = lnr;
if (partial == NULL) set_callback(&lnr->lr_callback, &callback);
lnr->lr_callback = vim_strsave(callback);
else
lnr->lr_callback = callback; // pointer into the partial
lnr->lr_partial = partial;
lnr->lr_id = ++next_listener_id; lnr->lr_id = ++next_listener_id;
rettv->vval.v_number = lnr->lr_id; rettv->vval.v_number = lnr->lr_id;
} }
/*
* listener_flush() function
*/
void
f_listener_flush(typval_T *argvars, typval_T *rettv UNUSED)
{
buf_T *buf = curbuf;
if (argvars[0].v_type != VAR_UNKNOWN)
{
buf = get_buf_arg(&argvars[0]);
if (buf == NULL)
return;
}
invoke_listeners(buf);
}
/* /*
* listener_remove() function * listener_remove() function
*/ */
void void
f_listener_remove(typval_T *argvars, typval_T *rettv UNUSED) f_listener_remove(typval_T *argvars, typval_T *rettv)
{ {
listener_T *lnr; listener_T *lnr;
listener_T *next; listener_T *next;
listener_T *prev = NULL; listener_T *prev;
int id = tv_get_number(argvars); int id = tv_get_number(argvars);
buf_T *buf; buf_T *buf;
for (buf = firstbuf; buf != NULL; buf = buf->b_next) for (buf = firstbuf; buf != NULL; buf = buf->b_next)
{
prev = NULL;
for (lnr = buf->b_listener; lnr != NULL; lnr = next) for (lnr = buf->b_listener; lnr != NULL; lnr = next)
{ {
next = lnr->lr_next; next = lnr->lr_next;
@ -252,11 +345,24 @@ f_listener_remove(typval_T *argvars, typval_T *rettv UNUSED)
prev->lr_next = lnr->lr_next; prev->lr_next = lnr->lr_next;
else else
buf->b_listener = lnr->lr_next; buf->b_listener = lnr->lr_next;
free_callback(lnr->lr_callback, lnr->lr_partial); free_callback(&lnr->lr_callback);
vim_free(lnr); vim_free(lnr);
rettv->vval.v_number = 1;
return;
} }
prev = lnr; prev = lnr;
} }
}
}
/*
* Called before inserting a line above "lnum"/"lnum3" or deleting line "lnum"
* to "lnume".
*/
void
may_invoke_listeners(buf_T *buf, linenr_T lnum, linenr_T lnume, int added)
{
check_recorded_changes(buf, lnum, 0, lnume, added, FALSE);
} }
/* /*
@ -264,27 +370,72 @@ f_listener_remove(typval_T *argvars, typval_T *rettv UNUSED)
* listener_add(). * listener_add().
*/ */
void void
invoke_listeners(void) invoke_listeners(buf_T *buf)
{ {
listener_T *lnr; listener_T *lnr;
typval_T rettv; typval_T rettv;
int dummy; int dummy;
typval_T argv[2]; typval_T argv[6];
listitem_T *li;
linenr_T start = MAXLNUM;
linenr_T end = 0;
linenr_T added = 0;
int save_updating_screen = updating_screen;
static int recursive = FALSE;
if (recorded_changes == NULL) // nothing changed if (buf->b_recorded_changes == NULL // nothing changed
|| buf->b_listener == NULL // no listeners
|| recursive) // already busy
return; return;
argv[0].v_type = VAR_LIST; recursive = TRUE;
argv[0].vval.v_list = recorded_changes;
for (lnr = curbuf->b_listener; lnr != NULL; lnr = lnr->lr_next) // Block messages on channels from being handled, so that they don't make
// text changes here.
++updating_screen;
argv[0].v_type = VAR_NUMBER;
argv[0].vval.v_number = buf->b_fnum; // a:bufnr
for (li = buf->b_recorded_changes->lv_first; li != NULL; li = li->li_next)
{ {
call_func(lnr->lr_callback, -1, &rettv, varnumber_T lnum;
1, argv, NULL, 0L, 0L, &dummy, TRUE, lnr->lr_partial, NULL);
lnum = dict_get_number(li->li_tv.vval.v_dict, (char_u *)"lnum");
if (start > lnum)
start = lnum;
lnum = dict_get_number(li->li_tv.vval.v_dict, (char_u *)"end");
if (lnum > end)
end = lnum;
added = dict_get_number(li->li_tv.vval.v_dict, (char_u *)"added");
}
argv[1].v_type = VAR_NUMBER;
argv[1].vval.v_number = start;
argv[2].v_type = VAR_NUMBER;
argv[2].vval.v_number = end;
argv[3].v_type = VAR_NUMBER;
argv[3].vval.v_number = added;
argv[4].v_type = VAR_LIST;
argv[4].vval.v_list = buf->b_recorded_changes;
++textlock;
for (lnr = buf->b_listener; lnr != NULL; lnr = lnr->lr_next)
{
call_callback(&lnr->lr_callback, -1, &rettv,
5, argv, NULL, 0L, 0L, &dummy, TRUE, NULL);
clear_tv(&rettv); clear_tv(&rettv);
} }
list_unref(recorded_changes); --textlock;
recorded_changes = NULL; list_unref(buf->b_recorded_changes);
buf->b_recorded_changes = NULL;
if (save_updating_screen)
updating_screen = TRUE;
else
after_updating_screen(TRUE);
recursive = FALSE;
} }
#endif #endif
@ -553,12 +704,12 @@ changed_bytes(linenr_T lnum, colnr_T col)
void void
inserted_bytes(linenr_T lnum, colnr_T col, int added UNUSED) inserted_bytes(linenr_T lnum, colnr_T col, int added UNUSED)
{ {
changed_bytes(lnum, col);
#ifdef FEAT_TEXT_PROP #ifdef FEAT_TEXT_PROP
if (curbuf->b_has_textprop && added != 0) if (curbuf->b_has_textprop && added != 0)
adjust_prop_columns(lnum, col, added); adjust_prop_columns(lnum, col, added, 0);
#endif #endif
changed_bytes(lnum, col);
} }
/* /*
@ -696,9 +847,11 @@ changed_lines(
/* /*
* Called when the changed flag must be reset for buffer "buf". * Called when the changed flag must be reset for buffer "buf".
* When "ff" is TRUE also reset 'fileformat'. * When "ff" is TRUE also reset 'fileformat'.
* When "always_inc_changedtick" is TRUE b:changedtick is incremented also when
* the changed flag was off.
*/ */
void void
unchanged(buf_T *buf, int ff) unchanged(buf_T *buf, int ff, int always_inc_changedtick)
{ {
if (buf->b_changed || (ff && file_ff_differs(buf, FALSE))) if (buf->b_changed || (ff && file_ff_differs(buf, FALSE)))
{ {
@ -711,8 +864,10 @@ unchanged(buf_T *buf, int ff)
#ifdef FEAT_TITLE #ifdef FEAT_TITLE
need_maketitle = TRUE; // set window title later need_maketitle = TRUE; // set window title later
#endif #endif
++CHANGEDTICK(buf);
} }
++CHANGEDTICK(buf); else if (always_inc_changedtick)
++CHANGEDTICK(buf);
#ifdef FEAT_NETBEANS_INTG #ifdef FEAT_NETBEANS_INTG
netbeans_unmodified(buf); netbeans_unmodified(buf);
#endif #endif
@ -856,7 +1011,7 @@ ins_char_bytes(char_u *buf, int charlen)
} }
} }
newp = alloc_check((unsigned)(linelen + newlen - oldlen)); newp = alloc(linelen + newlen - oldlen);
if (newp == NULL) if (newp == NULL)
return; return;
@ -931,7 +1086,7 @@ ins_str(char_u *s)
oldp = ml_get(lnum); oldp = ml_get(lnum);
oldlen = (int)STRLEN(oldp); oldlen = (int)STRLEN(oldp);
newp = alloc_check((unsigned)(oldlen + newlen + 1)); newp = alloc(oldlen + newlen + 1);
if (newp == NULL) if (newp == NULL)
return; return;
if (col > 0) if (col > 0)
@ -1084,7 +1239,7 @@ del_bytes(
newp = oldp; // use same allocated memory newp = oldp; // use same allocated memory
else else
{ // need to allocate a new line { // need to allocate a new line
newp = alloc((unsigned)(newlen + 1)); newp = alloc(newlen + 1);
if (newp == NULL) if (newp == NULL)
return FAIL; return FAIL;
mch_memmove(newp, oldp, (size_t)col); mch_memmove(newp, oldp, (size_t)col);
@ -2045,6 +2200,12 @@ open_line(
) )
mark_adjust(curwin->w_cursor.lnum + 1, (linenr_T)MAXLNUM, 1L, 0L); mark_adjust(curwin->w_cursor.lnum + 1, (linenr_T)MAXLNUM, 1L, 0L);
did_append = TRUE; did_append = TRUE;
#ifdef FEAT_TEXT_PROP
if ((State & INSERT) && !(State & VREPLACE_FLAG))
// properties after the split move to the next line
adjust_props_for_split(curwin->w_cursor.lnum, curwin->w_cursor.lnum,
curwin->w_cursor.col + 1, 0);
#endif
} }
else else
{ {

File diff suppressed because it is too large Load Diff

View File

@ -355,10 +355,10 @@ transstr(char_u *s)
len += 4; /* illegal byte sequence */ len += 4; /* illegal byte sequence */
} }
} }
res = alloc((unsigned)(len + 1)); res = alloc(len + 1);
} }
else else
res = alloc((unsigned)(vim_strsize(s) + 1)); res = alloc(vim_strsize(s) + 1);
if (res != NULL) if (res != NULL)
{ {
*res = NUL; *res = NUL;
@ -1105,15 +1105,16 @@ win_lbr_chartabsize(
{ {
if (size + sbrlen + numberwidth > (colnr_T)wp->w_width) if (size + sbrlen + numberwidth > (colnr_T)wp->w_width)
{ {
/* calculate effective window width */ // calculate effective window width
int width = (colnr_T)wp->w_width - sbrlen - numberwidth; int width = (colnr_T)wp->w_width - sbrlen - numberwidth;
int prev_width = col int prev_width = col
? ((colnr_T)wp->w_width - (sbrlen + col)) : 0; ? ((colnr_T)wp->w_width - (sbrlen + col)) : 0;
if (width == 0)
width = (colnr_T)wp->w_width; if (width <= 0)
width = (colnr_T)1;
added += ((size - prev_width) / width) * vim_strsize(p_sbr); added += ((size - prev_width) / width) * vim_strsize(p_sbr);
if ((size - prev_width) % width) if ((size - prev_width) % width)
/* wrapped, add another length of 'sbr' */ // wrapped, add another length of 'sbr'
added += vim_strsize(p_sbr); added += vim_strsize(p_sbr);
} }
else else
@ -1776,25 +1777,30 @@ vim_isblankline(char_u *lbuf)
* If "what" contains STR2NR_HEX recognize hex numbers * If "what" contains STR2NR_HEX recognize hex numbers
* If "what" contains STR2NR_FORCE always assume bin/oct/hex. * If "what" contains STR2NR_FORCE always assume bin/oct/hex.
* If maxlen > 0, check at a maximum maxlen chars. * If maxlen > 0, check at a maximum maxlen chars.
* If strict is TRUE, check the number strictly. return *len = 0 if fail.
*/ */
void void
vim_str2nr( vim_str2nr(
char_u *start, char_u *start,
int *prep, /* return: type of number 0 = decimal, 'x' int *prep, // return: type of number 0 = decimal, 'x'
or 'X' is hex, '0' = octal, 'b' or 'B' // or 'X' is hex, '0' = octal, 'b' or 'B'
is bin */ // is bin
int *len, /* return: detected length of number */ int *len, // return: detected length of number
int what, /* what numbers to recognize */ int what, // what numbers to recognize
varnumber_T *nptr, /* return: signed result */ varnumber_T *nptr, // return: signed result
uvarnumber_T *unptr, /* return: unsigned result */ uvarnumber_T *unptr, // return: unsigned result
int maxlen) /* max length of string to check */ int maxlen, // max length of string to check
int strict) // check strictly
{ {
char_u *ptr = start; char_u *ptr = start;
int pre = 0; /* default is decimal */ int pre = 0; // default is decimal
int negative = FALSE; int negative = FALSE;
uvarnumber_T un = 0; uvarnumber_T un = 0;
int n; int n;
if (len != NULL)
*len = 0;
if (ptr[0] == '-') if (ptr[0] == '-')
{ {
negative = TRUE; negative = TRUE;
@ -1836,9 +1842,7 @@ vim_str2nr(
} }
} }
/* // Do the conversion manually to avoid sscanf() quirks.
* Do the string-to-numeric conversion "manually" to avoid sscanf quirks.
*/
n = 1; n = 1;
if (pre == 'B' || pre == 'b' || what == STR2NR_BIN + STR2NR_FORCE) if (pre == 'B' || pre == 'b' || what == STR2NR_BIN + STR2NR_FORCE)
{ {
@ -1907,6 +1911,10 @@ vim_str2nr(
break; break;
} }
} }
// Check for an alpha-numeric character immediately following, that is
// most likely a typo.
if (strict && n - 1 != maxlen && ASCII_ISALNUM(*ptr))
return;
if (prep != NULL) if (prep != NULL)
*prep = pre; *prep = pre;

View File

@ -207,6 +207,7 @@
#undef HAVE_STRNICMP #undef HAVE_STRNICMP
#undef HAVE_STRPBRK #undef HAVE_STRPBRK
#undef HAVE_STRTOL #undef HAVE_STRTOL
#undef HAVE_CANBERRA
#undef HAVE_ST_BLKSIZE #undef HAVE_ST_BLKSIZE
#undef HAVE_SYSCONF #undef HAVE_SYSCONF
#undef HAVE_SYSCTL #undef HAVE_SYSCTL
@ -216,6 +217,7 @@
#undef HAVE_TOWLOWER #undef HAVE_TOWLOWER
#undef HAVE_TOWUPPER #undef HAVE_TOWUPPER
#undef HAVE_ISWUPPER #undef HAVE_ISWUPPER
#undef HAVE_TZSET
#undef HAVE_UNSETENV #undef HAVE_UNSETENV
#undef HAVE_USLEEP #undef HAVE_USLEEP
#undef HAVE_UTIME #undef HAVE_UTIME

View File

@ -2702,6 +2702,10 @@ AC_DEFUN([GNOME_INIT],[
GNOME_INIT_HOOK([],fail) GNOME_INIT_HOOK([],fail)
]) ])
if test "X$PKG_CONFIG" = "X"; then
AC_PATH_TOOL(PKG_CONFIG, pkg-config, no)
fi
dnl --------------------------------------------------------------------------- dnl ---------------------------------------------------------------------------
dnl Check for GTK2. If it fails, then continue on for Motif as before... dnl Check for GTK2. If it fails, then continue on for Motif as before...
@ -2717,10 +2721,6 @@ if test -z "$SKIP_GTK2"; then
AC_MSG_RESULT(gtk test disabled) AC_MSG_RESULT(gtk test disabled)
fi fi
if test "X$PKG_CONFIG" = "X"; then
AC_PATH_TOOL(PKG_CONFIG, pkg-config, no)
fi
if test "x$PKG_CONFIG" != "xno"; then if test "x$PKG_CONFIG" != "xno"; then
dnl First try finding version 2.2.0 or later. The 2.0.x series has dnl First try finding version 2.2.0 or later. The 2.0.x series has
dnl problems (bold fonts, --remote doesn't work). dnl problems (bold fonts, --remote doesn't work).
@ -2769,10 +2769,6 @@ if test -z "$SKIP_GTK3"; then
AC_MSG_RESULT(gtk test disabled) AC_MSG_RESULT(gtk test disabled)
fi fi
if test "X$PKG_CONFIG" = "X"; then
AC_PATH_TOOL(PKG_CONFIG, pkg-config, no)
fi
if test "x$PKG_CONFIG" != "xno"; then if test "x$PKG_CONFIG" != "xno"; then
AM_PATH_GTK(3.0.0, AM_PATH_GTK(3.0.0,
[GUI_LIB_LOC="$GTK_LIBDIR" [GUI_LIB_LOC="$GTK_LIBDIR"
@ -3746,7 +3742,7 @@ AC_CHECK_FUNCS(fchdir fchown fchmod fsync getcwd getpseudotty \
memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \ memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \
getpgid setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \ getpgid setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
sigprocmask sigvec strcasecmp strerror strftime stricmp strncasecmp \ sigprocmask sigvec strcasecmp strerror strftime stricmp strncasecmp \
strnicmp strpbrk strtol tgetent towlower towupper iswupper \ strnicmp strpbrk strtol tgetent towlower towupper iswupper tzset \
usleep utime utimes mblen ftruncate unsetenv posix_openpt) usleep utime utimes mblen ftruncate unsetenv posix_openpt)
AC_FUNC_SELECT_ARGTYPES AC_FUNC_SELECT_ARGTYPES
AC_FUNC_FSEEKO AC_FUNC_FSEEKO
@ -3755,6 +3751,46 @@ dnl define _LARGE_FILES, _FILE_OFFSET_BITS and _LARGEFILE_SOURCE when
dnl appropriate, so that off_t is 64 bits when needed. dnl appropriate, so that off_t is 64 bits when needed.
AC_SYS_LARGEFILE AC_SYS_LARGEFILE
AC_MSG_CHECKING(--enable-canberra argument)
AC_ARG_ENABLE(canberra,
[ --disable-canberra Do not use libcanberra.],
, [enable_canberra="maybe"])
if test "$enable_canberra" = "maybe"; then
if test "$features" = "big" -o "$features" = "huge"; then
AC_MSG_RESULT(Defaulting to yes)
enable_canberra="yes"
else
AC_MSG_RESULT(Defaulting to no)
enable_canberra="no"
fi
else
AC_MSG_RESULT($enable_canberra)
fi
if test "$enable_canberra" = "yes"; then
if test "x$PKG_CONFIG" != "xno"; then
canberra_lib=`$PKG_CONFIG --libs libcanberra 2>/dev/null`
canberra_cflags=`$PKG_CONFIG --cflags libcanberra 2>/dev/null`
fi
if test "x$canberra_lib" = "x"; then
canberra_lib=-lcanberra
canberra_cflags=-D_REENTRANT
fi
AC_MSG_CHECKING(for libcanberra)
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $canberra_cflags"
LIBS="$LIBS $canberra_lib"
AC_TRY_LINK([
# include <canberra.h>
], [
ca_context *hello;
ca_context_create(&hello);],
AC_MSG_RESULT(yes); AC_DEFINE(HAVE_CANBERRA),
AC_MSG_RESULT(no); CFLAGS="$ac_save_CFLAGS"; LIBS="$ac_save_LIBS")
fi
dnl fstatfs() can take 2 to 4 arguments, try to use st_blksize if possible dnl fstatfs() can take 2 to 4 arguments, try to use st_blksize if possible
AC_MSG_CHECKING(for st_blksize) AC_MSG_CHECKING(for st_blksize)
AC_TRY_COMPILE( AC_TRY_COMPILE(
@ -4302,8 +4338,14 @@ if test "$enable_nls" = "yes"; then
AC_MSG_CHECKING([if msgfmt supports --desktop]) AC_MSG_CHECKING([if msgfmt supports --desktop])
MSGFMT_DESKTOP= MSGFMT_DESKTOP=
if "$MSGFMT" --help | grep -e '--desktop' >/dev/null; then if "$MSGFMT" --help | grep -e '--desktop' >/dev/null; then
AC_MSG_RESULT([yes]) if "$MSGFMT" --version | grep '0.19.[[3-7]]$' >/dev/null; then
MSGFMT_DESKTOP="gvim.desktop vim.desktop" dnl GNU gettext 0.19.7's --desktop is broken. We assume back to
dnl 0.19.3 is also broken.
AC_MSG_RESULT([broken])
else
AC_MSG_RESULT([yes])
MSGFMT_DESKTOP="gvim.desktop vim.desktop"
fi
else else
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
fi fi

View File

@ -14,8 +14,8 @@ let lines = readfile('ex_cmds.h')
let idx = 0 let idx = 0
while idx < len(lines) while idx < len(lines)
let line = lines[idx] let line = lines[idx]
if line =~ '^EX(CMD_' if line =~ '^EXCMD(CMD_'
let m = matchlist(line, '^EX(CMD_\S*,\s*"\([a-z][^"]*\)"') let m = matchlist(line, '^EXCMD(CMD_\S*,\s*"\([a-z][^"]*\)"')
if len(m) >= 2 if len(m) >= 2
let cmds += [ m[1] ] let cmds += [ m[1] ]
else else
@ -27,18 +27,18 @@ while idx < len(lines)
let idx += 1 let idx += 1
let addr_type = lines[idx] let addr_type = lines[idx]
if flags =~ '\<RANGE\>' if flags =~ '\<EX_RANGE\>'
if addr_type =~ 'ADDR_NONE' if addr_type =~ 'ADDR_NONE'
echoerr 'ex_cmds.h:' .. (idx - 1) .. ': Using RANGE with ADDR_NONE: ' .. line echoerr 'ex_cmds.h:' .. (idx - 1) .. ': Using EX_RANGE with ADDR_NONE: ' .. line
endif endif
else else
if addr_type !~ 'ADDR_NONE' if addr_type !~ 'ADDR_NONE'
echoerr 'ex_cmds.h:' .. (idx - 1) .. ': Missing ADDR_NONE: ' .. line echoerr 'ex_cmds.h:' .. (idx - 1) .. ': Missing ADDR_NONE: ' .. line
endif endif
endif endif
if flags =~ '\<DFLALL\>' && (addr_type =~ 'ADDR_OTHER' || addr_type =~ 'ADDR_NONE') if flags =~ '\<EX_DFLALL\>' && (addr_type =~ 'ADDR_OTHER' || addr_type =~ 'ADDR_NONE')
echoerr 'ex_cmds.h:' .. (idx - 1) .. ': Missing misplaced DFLALL: ' .. line echoerr 'ex_cmds.h:' .. (idx - 1) .. ': Missing misplaced EX_DFLALL: ' .. line
endif endif
endif endif
let idx += 1 let idx += 1

View File

@ -254,7 +254,7 @@ crypt_create(
char_u *seed, char_u *seed,
int seed_len) int seed_len)
{ {
cryptstate_T *state = (cryptstate_T *)alloc((int)sizeof(cryptstate_T)); cryptstate_T *state = ALLOC_ONE(cryptstate_T);
if (state == NULL) if (state == NULL)
return state; return state;
@ -407,7 +407,7 @@ crypt_encode_alloc(
/* Not buffering, just return EOF. */ /* Not buffering, just return EOF. */
return (long)len; return (long)len;
*newptr = alloc((long)len); *newptr = alloc(len);
if (*newptr == NULL) if (*newptr == NULL)
return -1; return -1;
method->encode_fn(state, from, len, *newptr); method->encode_fn(state, from, len, *newptr);

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