Compare commits

...

222 Commits

Author SHA1 Message Date
Bram Moolenaar
1f8495cf48 patch 8.0.1659: scroll events not recognized for some xterm emulators
Problem:    Scroll events not recognized for some xterm emulators.
Solution:   Recognize mouse codes 0x40 and 0x41 as scroll events.
2018-04-04 21:53:11 +02:00
Bram Moolenaar
79cf7c0d45 patch 8.0.1658: capitalize argument not available in long form
Problem:    Capitalize argument not available in long form.
Solution:   Recognize -capitalize.  Update man page.
2018-04-03 14:21:16 +02:00
Bram Moolenaar
9af9778209 patch 8.0.1657: crash when reading a channel
Problem:    Crash when reading a channel.
Solution:   Clear the write flag before writing. (idea by Shinya Ohyanagi,
            closes #2769).
2018-04-03 12:51:01 +02:00
Bram Moolenaar
8b31a6ff7a patch 8.0.1656: no option to have xxd produce upper case variable names
Problem:    No option to have xxd produce upper case variable names.
Solution:   Add the -C argument. (Matt Panaro closes #2772)
2018-04-03 12:17:25 +02:00
Bram Moolenaar
25a6e8a769 Small runtime update 2018-03-30 12:27:32 +02:00
Bram Moolenaar
f3ba14ffd3 patch 8.0.1655: outdated gdb message in terminal debugger unclear
Problem:    Outdated gdb message in terminal debugger unclear.
Solution:   Specifically mention the required gdb version.  Avoid getting
            stuck on pagination.
2018-03-29 18:29:51 +02:00
Bram Moolenaar
ab943431d8 Update runtime files 2018-03-29 18:27:07 +02:00
Bram Moolenaar
7b24ce08fe patch 8.0.1654: warnings for conversion of void to function pointer
Problem:    Warnings for conversion of void to function pointer.
Solution:   Use a temp variable that is a function pointer.
2018-03-29 18:15:26 +02:00
Bram Moolenaar
1834d37396 patch 8.0.1653: screen dump is made too soon
Problem:    Screen dump is made too soon.
Solution:   Wait until the ruler is displayed. (Ozaki Kiichi, closes #2755)
2018-03-29 17:40:46 +02:00
Bram Moolenaar
f06b0b6c8f patch 8.0.1652: term_dumpwrite() does not output composing characters
Problem:    term_dumpwrite() does not output composing characters.
Solution:   Use the cell index.
2018-03-29 17:22:24 +02:00
Bram Moolenaar
0751f51a5b patch 8.0.1651: cannot filter :ls output for terminal buffers
Problem:    Cannot filter :ls output for terminal buffers.
Solution:   Add flags for terminal buffers. (Marcin Szamotulski, closes #2751)
2018-03-29 16:37:16 +02:00
Bram Moolenaar
0c72fe4ed8 patch 8.0.1650: too many #ifdefs
Problem:    Too many #ifdefs.
Solution:   Graduate FEAT_LISTCMDS, no reason to leave out buffer commands.
2018-03-29 16:04:08 +02:00
Bram Moolenaar
cd43effeca patch 8.0.1649: no completion for argument list commands
Problem:    No completion for argument list commands.
Solution:   Add arglist completion. (Yegappan Lakshmanan, closes #2706)
2018-03-29 15:55:38 +02:00
Bram Moolenaar
1b2f61e732 patch 8.0.1648: resource fork tool doesn't work on Python 3
Problem:    Resource fork tool doesn't work on Python 3.
Solution:   Use "print()" instead of "print". (Marius Gedminas)
2018-03-27 21:12:01 +02:00
Bram Moolenaar
2a77d21f78 patch 8.0.1647: terminal API may call any user function
Problem:    Terminal API may call a function not meant to be called by this
            API.
Solution:   Require the function to start with Tapi_.
2018-03-26 21:38:52 +02:00
Bram Moolenaar
4368d5ce8a patch 8.0.1646: MS-Windows: executable contains unreferenced functions
Problem:    MS-Windows: executable contains unreferenced functions and data.
Solution:   Add /opt:ref to the compiler command. (Ken Takata)
2018-03-26 20:55:10 +02:00
Bram Moolenaar
086eb87695 patch 8.0.1645: test for terminal response to escape sequence may fail
Problem:    Test for terminal response to escape sequence fails for some
            people. (toothpik)
Solution:   Run "cat" and let it echo the characters.
2018-03-25 21:24:12 +02:00
Bram Moolenaar
cf67a509e9 patch 8.0.1644: terminal API tests still fail
Problem:    Terminal API tests still fail.
Solution:   Explicitly set 'title' in the terminal job. (Ozaki Kiichi,
            closes #2750)
2018-03-25 20:31:32 +02:00
Bram Moolenaar
2de50f8762 patch 8.0.1643: terminal API tests fail
Problem:    Terminal API tests fail.
Solution:   Explicitly set 'title'.
2018-03-25 19:09:56 +02:00
Bram Moolenaar
15a1c3fdc1 patch 8.0.1642: running Vim in terminal fails with two windows
Problem:    Running Vim in terminal fails with two windows.
Solution:   Pass the number of rows to RunVimInTerminal().
2018-03-25 18:56:25 +02:00
Bram Moolenaar
8fbaeb195d patch 8.0.1641: job in terminal can't communicate with Vim
Problem:    Job in terminal can't communicate with Vim.
Solution:   Add the terminal API.
2018-03-25 18:20:17 +02:00
Bram Moolenaar
65873846e0 patch 8.0.1640: Test_cwd() is flaky
Problem:    Test_cwd() is flaky.
Solution:   Add to list of flaky tests.
2018-03-25 17:12:58 +02:00
Bram Moolenaar
b5b49a3b43 patch 8.0.1639: libvterm code lags behind master
Problem:    Libvterm code lags behind master.
Solution:   Sync to head, solve merge problems.
2018-03-25 16:20:37 +02:00
Bram Moolenaar
e7499ddc33 patch 8.0.1638: popup test fails depending on environment variable
Problem:    Popup test fails depending on environment variable.
Solution:   Reset $COLORFGBG when running Vim in a terminal. (closes #2693)
2018-03-24 17:56:13 +01:00
Bram Moolenaar
897e63c4c0 patch 8.0.1637: no test for term_dumpdiff() options argument
Problem:    No test for term_dumpdiff() options argument.
Solution:   Add a test.
2018-03-24 17:16:33 +01:00
Bram Moolenaar
45d2a64f96 patch 8.0.1636: no test for term_dumpload() and term_dumpdiff()
Problem:    No test for term_dumpload() and term_dumpdiff().
Solution:   Add tests.
2018-03-24 14:30:32 +01:00
Bram Moolenaar
16d7eced1a patch 8.0.1635: undefining _POSIX_THREADS causes problems with Python 3
Problem:    Undefining _POSIX_THREADS causes problems with Python 3. (Micah
            Bucy, closes #2748)
Solution:   Remove the lines.
2018-03-24 14:06:15 +01:00
Bram Moolenaar
75b0a888e4 patch 8.0.1634: the ex_vimgrep() function is too long
Problem:    The ex_vimgrep() function is too long.
Solution:   Split it in smaller functions. (Yegappan Lakshmanan)
2018-03-24 14:01:56 +01:00
Bram Moolenaar
8c64a36e40 patch 8.0.1633: a TextChanged autocmd triggers when it is defined
Problem:    A TextChanged autocmd triggers when it is defined after creating a
            buffer.
Solution:   Set b_last_changedtick when opening a buffer. (Hirohito Highlight,
            closes #2742)
2018-03-23 22:39:31 +01:00
Bram Moolenaar
47015b80a0 patch 8.0.1632: in a terminal dump NUL and space are different
Problem:    In a terminal dump NUL and space considered are different,
            although they are displayed the same.
Solution:   When encountering NUL handle it like space.
2018-03-23 22:10:34 +01:00
Bram Moolenaar
948a796bfe patch 8.0.1631: testing with Vim running in terminal is a bit flaky
Problem:    Testing with Vim running in terminal is a bit flaky.
Solution:   Delete any .swp file so that later tests don't fail.
2018-03-23 20:37:45 +01:00
Bram Moolenaar
295ac5ab5e patch 8.0.1630: trimming white space is not that easy
Problem:    Trimming white space is not that easy.
Solution:   Add the trim() function. (Bukn, closes #1280)
2018-03-22 23:04:02 +01:00
Bram Moolenaar
62b7f6a139 patch 8.0.1629: Mac: getpagesize() is deprecated
Problem:    Mac: getpagesize() is deprecated.
Solution:   Use sysconf() instead. (Ozaki Kiichi, closes #2741)
2018-03-22 21:44:07 +01:00
Bram Moolenaar
0bd052ba12 patch 8.0.1628: channel log doesn't mention exiting
Problem:    Channel log doesn't mention exiting.
Solution:   Add a ch_log() call in getout().
2018-03-22 20:33:56 +01:00
Bram Moolenaar
7735dafb58 patch 8.0.1627: compiler warning for visibility attribute not supported
Problem:    Compiler warning for visibility attribute not supported on MinGW
            builds.
Solution:   Don't add the attribute when we don't expect it to work.
            (Christian Brabandt)
2018-03-22 20:26:50 +01:00
Bram Moolenaar
b571c63d48 patch 8.0.1626: compiler warning for possible loss of data
Problem:    Compiler warning for possible loss of data.
Solution:   Use size_t instead of int. (Christian Brabandt)
2018-03-21 22:27:59 +01:00
Bram Moolenaar
29dfa5af3c patch 8.0.1625: test_quotestar is flaky when run in GTK GUI
Problem:    Test_quotestar is flaky when run in GTK GUI.
Solution:   Do not call lose_selection when invoked from
            selection_clear_event().
2018-03-20 21:24:45 +01:00
Bram Moolenaar
5a3a49ed59 patch 8.0.1624: options for term_dumpdiff() and term_dumpload() not implemented
Problem:    Options for term_dumpdiff() and term_dumpload() not implemented
            yet.
Solution:   Implement the relevant options.
2018-03-20 18:35:53 +01:00
Bram Moolenaar
3e8d385347 patch 8.0.1623: terminal kill tests are flaky
Problem:    Terminal kill tests are flaky.
Solution:   Instead of running Vim in a terminal, run it as a normal command.
2018-03-20 17:43:01 +01:00
Bram Moolenaar
6ed86ad170 patch 8.0.1622: possible NULL pointer dereference
Problem:    Possible NULL pointer dereferencey. (Coverity)
Solution:   Reverse the check for a NULL pointer.
2018-03-20 13:30:42 +01:00
Bram Moolenaar
6185903e3d patch 8.0.1621: using invalid default value for highlight attribute
Problem:    Using invalid default value for highlight attribute.
Solution:   Use zero instead of -1.
2018-03-20 13:00:25 +01:00
Bram Moolenaar
e26e0d2b83 patch 8.0.1620: reading spell file has no good EOF detection
Problem:    Reading spell file has no good EOF detection.
Solution:   Check for EOF at every character read for a length field.
2018-03-20 12:34:04 +01:00
Bram Moolenaar
81c3c89a28 patch 8.0.1619: Win32 GUI: crash when winpty is not installed
Problem:    Win32 GUI: crash when winpty is not installed and trying to use
            :shell in a terminal window.
Solution:   Check for NULL return form term_start(). (Yasuhiro Matsumoto,
            closes #2727)
2018-03-20 11:41:44 +01:00
Bram Moolenaar
ecadf4377f patch 8.0.1618: color Grey50 is missing in the compiled-in table
Problem:    Color Grey50, used for ToolbarLine, is missing in the compiled-in
            table.
Solution:   Add the color to the list. (Kazunobu Kuriyama)
2018-03-20 11:17:04 +01:00
Bram Moolenaar
42f652f733 patch 8.0.1617: Win32: :shell command in the GUI crashes
Problem:    Win32: :shell command in the GUI crashes.
Solution:   Handle the situation that "cmd" is NULL. (Yasuhiro Matsumoto,
            closes #2721)
2018-03-19 21:44:37 +01:00
Bram Moolenaar
f05fa37822 patch 8.0.1616: Win32: shell commands in the GUI open a new console
Problem:    Win32: shell commands in the GUI open a new console.
Solution:   Use a terminal window for interactive use when 'guioptions'
            contains "!".
2018-03-18 19:29:34 +01:00
Bram Moolenaar
52acb110ac patch 8.0.1615: term_dumpload() does not use the right colors
Problem:    term_dumpload() does not use the right colors.
Solution:   Initialize colors when not using create_vterm().
2018-03-18 19:20:22 +01:00
Bram Moolenaar
98ef233e14 Update runtime files. Convert a couple of help files to utf-8. 2018-03-18 14:44:37 +01:00
Bram Moolenaar
9ef2a30e6f patch 8.0.1614: "make tags" doesn't include libvterm
Problem:    "make tags" doesn't include libvterm.
Solution:   Add the libvterm sources to the tags command.
2018-03-17 15:55:26 +01:00
Bram Moolenaar
a2150ac016 patch 8.0.1613: warning for unused variable in tiny build
Problem:    Warning for unused variable in tiny build. (Tony Mechelynck)
Solution:   Move declaration to inner block.
2018-03-17 13:15:17 +01:00
Bram Moolenaar
1dd98334d6 patch 8.0.1612: need to close terminal after shell stopped
Problem:    Need to close terminal after shell stopped.
Solution:   Make :terminal without argument close the window by default.
2018-03-16 22:54:53 +01:00
Bram Moolenaar
af23bad0fd patch 8.0.1611: CTRL-W in system terminal does not go to job
Problem:    CTRL-W in system terminal does not go to job.
Solution:   Do not use CTRL-W as a terminal command in a system terminal.
2018-03-16 22:20:49 +01:00
Bram Moolenaar
4ac31eeff0 patch 8.0.1610: cannot build without GUI
Problem:    Cannot build without GUI.
Solution:   Add #ifdef.
2018-03-16 21:34:25 +01:00
Bram Moolenaar
135682517b patch 8.0.1609: shell commands in the GUI use a dumb terminal
Problem:    Shell commands in the GUI use a dumb terminal.
Solution:   Add the "!" flag to 'guioptions' to execute system commands in a
            special terminal window.  Only for Unix now.
2018-03-16 20:46:58 +01:00
Bram Moolenaar
43cb626214 patch 8.0.1608: Win32: directx not enabled by default
Problem:    Win32: directx not enabled by default.
Solution:   Change Makefile to enable directx by default. (Ken Takata)
2018-03-14 21:39:02 +01:00
Bram Moolenaar
62dd452d02 patch 8.0.1607: --clean loads user settings from .gvimrc
Problem:    --clean loads user settings from .gvimrc.
Solution:   Behave like "-U NONE" was used. (Ken Takata)
2018-03-14 21:20:02 +01:00
Bram Moolenaar
228de1dfd2 patch 8.0.1606: singular/plural variants not translated
Problem:    Singular/plural variants not translated.
Solution:   Add NGETTEXT argument to xgettext. (Sergey Alyoshin)
2018-03-14 20:11:12 +01:00
Bram Moolenaar
012eb66293 patch 8.0.1605: terminal test is a bit flaky
Problem:    Terminal test is a bit flaky.
Solution:   Check for the shell prompt.  Use more lambda functions.
2018-03-13 17:55:27 +01:00
Bram Moolenaar
a903472cfa patch 8.0.1604: paste test may fail if $DISPLAY is not set
Problem:    Paste test may fail if $DISPLAY is not set.
Solution:   Add WorkingClipboard() and use it in the paste test.
2018-03-13 15:43:46 +01:00
Bram Moolenaar
f118d4847e patch 8.0.1603: cannot build with +terminal but without +menu
Problem:    Cannot build with +terminal but without +menu.
Solution:   Add #ifdef. (Damien)
2018-03-13 13:14:00 +01:00
Bram Moolenaar
625f0c1eb7 patch 8.0.1602: crash in parsing JSON
Problem:    Crash in parsing JSON.
Solution:   Fail when using array or dict as dict key. (Damien)
2018-03-13 13:10:41 +01:00
Bram Moolenaar
ff1e879577 patch 8.0.1601: highlight test fails on Win32
Problem:    Highlight test fails on Win32.
Solution:   Check for vtp and vcon support.
2018-03-12 22:16:37 +01:00
Bram Moolenaar
f708ac592f patch 8.0.1600: crash when setting t_Co to zero when 'termguicolors' is set
Problem:    Crash when setting t_Co to zero when 'termguicolors' is set.
Solution:   Use IS_CTERM instead of checking the number of colors.
            (closes #2710)
2018-03-12 21:48:32 +01:00
Bram Moolenaar
3e4b84d0b5 patch 8.0.1599: no error message when gdb does not support debugger
Problem:    No error message when gdb does not support the terminal debugger.
Solution:   Check for the response to open the Machine Interface.
2018-03-11 20:51:52 +01:00
Bram Moolenaar
c48369c3fc patch 8.0.1598: cannot select text in a terminal with the mouse
Problem:    Cannot select text in a terminal with the mouse.
Solution:   When a job in a terminal is not consuming mouse events, use them
            for modeless selection.  Also stop Insert mode when clicking in a
            terminal window.
2018-03-11 19:30:45 +01:00
Bram Moolenaar
e87303af32 patch 8.0.1597: autocommand events are not sorted
Problem:    Autocommand events are not sorted.
Solution:   Sort the autocommand events.
2018-03-11 17:02:12 +01:00
Bram Moolenaar
b852c3e64d patch 8.0.1596: no autocommand specifically for opening a terminal window
Problem:    No autocommand specifically for opening a terminal window.
Solution:   Add TerminalOpen. (?, closes #2484)
2018-03-11 16:55:36 +01:00
Bram Moolenaar
12a96de430 patch 8.0.1595: no autocommand triggered before exiting
Problem:    No autocommand triggered before exiting.
Solution:   Add the ExitPre autocommand event.
2018-03-11 14:44:18 +01:00
Bram Moolenaar
435acdb88c patch 8.0.1594: :conform qall not tested with active terminal window
Problem:    :conform qall not tested with active terminal window.
Solution:   Add a test.
2018-03-10 20:51:25 +01:00
Bram Moolenaar
25cdd9c33b patch 8.0.1593: :qall never exits with an active terminal window
Problem:    :qall never exits with an active terminal window.
Solution:   Add a way to kill a job in a terminal window.
2018-03-10 20:28:12 +01:00
Bram Moolenaar
b5b7562475 Update runtime files. 2018-03-09 22:22:21 +01:00
Bram Moolenaar
4d8bac8bf5 patch 8.0.1592: terminal windows in a session are not properly restored
Problem:    Terminal windows in a session are not properly restored.
Solution:   Add "terminal" in 'sessionoptions'.  When possible restore the
            command running in a terminal.
2018-03-09 21:33:34 +01:00
Bram Moolenaar
20586cb4f4 patch 8.0.1591: MS-Windows: when reparsing the arguments 'wildignore' matters
Problem:    MS-Windows: when reparsing the arguments 'wildignore' matters.
Solution:   Save and reset 'wildignore'. (Yasuhiro Matsumoto, closes #2702)
2018-03-08 22:03:14 +01:00
Bram Moolenaar
1a84024037 patch 8.0.1590: padding in list type wastes memory
Problem:    Padding in list type wastes memory.
Solution:   Reorder struct members to optimize padding. (Dominique Pelle,
            closes #2704)
2018-03-08 21:46:43 +01:00
Bram Moolenaar
d7db27bafd patch 8.0.1589: error for setting 'modifiable' when resetting it
Problem:    Error for setting 'modifiable' when resetting it.
Solution:   Check if 'modifiable' was actually set.
2018-03-07 23:02:33 +01:00
Bram Moolenaar
52f18a112a patch 8.0.1588: popup menu hangs after typing CTRL-C
Problem:    Popup menu hangs after typing CTRL-C.
Solution:   Make CTRL-C exit the loop. (Ozaki Kiichi, closes #2697)
2018-03-07 22:09:11 +01:00
Bram Moolenaar
3324d0a864 patch 8.0.1587: inserting from the clipboard doesn't work literally
Problem:    inserting from the clipboard doesn't work literally
Solution:   When pasting from the * or + register always assume literally.
2018-03-06 19:51:13 +01:00
Bram Moolenaar
201dc67db5 patch 8.0.1586: imactivatefunc does not work on non-GUI Mac
Problem:    Imactivatefunc does not work on non-GUI Mac.
Solution:   Fix logic in #ifdef.
2018-03-06 18:59:57 +01:00
Bram Moolenaar
ebf142a1ed patch 8.0.1585: enabling beval_term feature in Win32 GUI
Problem:    Enabling beval_term feature in Win32 GUI.
Solution:   Only enable beval_term in Win32 console.
2018-03-06 18:20:03 +01:00
Bram Moolenaar
f536bf6d45 patch 8.0.1584: using C99 in Mac file gives compiler warning messages
Problem:    Using C99 in Mac file gives compiler warning messages.
Solution:   Add #prama's to avoid the warnings. (Kazunobu Kuriyama)
2018-03-06 17:55:01 +01:00
Bram Moolenaar
fc6f16b57c patch 8.0.1583: using C99 comment
Problem:    Using C99 comment.
Solution:   Use old style comment. (Kazunobu Kuriyama)
2018-03-06 17:43:22 +01:00
Bram Moolenaar
157d813be4 patch 8.0.1582: in the MS-Windows console mouse movement is not used
Problem:    In the MS-Windows console mouse movement is not used.
Solution:   Pass mouse movement events when useful.
2018-03-06 17:09:20 +01:00
Bram Moolenaar
3b3a9a5609 patch 8.0.1581: cannot build Win32 GUI without +eval
Problem:    Cannot build Win32 GUI without +eval.
Solution:   Define HAVE_INPUT_METHOD without +eval. (Ken Takata)
2018-03-06 16:11:47 +01:00
Bram Moolenaar
946acdac5b patch 8.0.1580: FEAT_CURSORBIND and FEAT_SCROLLBIND are unused
Problem:    FEAT_CURSORBIND and FEAT_SCROLLBIND are unused.
Solution:   Delete them.
2018-03-06 15:06:19 +01:00
Bram Moolenaar
df0d24b627 patch 8.0.1579: virtual replace test fails in GUI
Problem:    Virtual replace test fails in GUI.
Solution:   Don't save key options if they were not set.
2018-03-06 14:22:58 +01:00
Bram Moolenaar
69f5a3011d patch 8.0.1578: no test for :popup in terminal
Problem:    No test for :popup in terminal.
Solution:   Add a screen dump test.
2018-03-06 13:23:08 +01:00
Bram Moolenaar
e780848150 patch 8.0.1577: virtual replace test fails on MS-Windows
Problem:    Virtual replace test fails on MS-Windows.
Solution:   Make adding a termcap entry work for a builtin terminal.
            Restore terminal keys in a better way.
2018-03-06 13:17:23 +01:00
Bram Moolenaar
16896a1019 patch 8.0.1576: Perl VIM::Buffers() does not find every buffer
Problem:    Perl VIM::Buffers() does not find every buffer.
Solution:   Also find unlisted buffer by number or name. (Chris Weyl,
            closes #2692)
2018-03-06 12:25:56 +01:00
Bram Moolenaar
63e82db6fc patch 8.0.1575: crash when using virtual replace
Problem:    Crash when using virtual replace.
Solution:   Adjust orig_line_count.  Add more tests. (Christian Brabandt)
2018-03-06 12:10:48 +01:00
Bram Moolenaar
987723e084 patch 8.0.1574: show cursor in wrong place when using popup menu
Problem:    Show cursor in wrong place when using popup menu. (Wei Zhang)
Solution:   Force updating the cursor position.  Fix skipping over unused
            entries.
2018-03-06 11:43:04 +01:00
Bram Moolenaar
89894aa671 patch 8.0.1573: getwinpos(1) may cause response to be handled as command
Problem:    getwinpos(1) may cause response to be handled as command.
Solution:   Handle any cursor position report once one was request. (partly by
            Hirohito Higashi)
2018-03-05 22:43:10 +01:00
Bram Moolenaar
362dc33835 patch 8.0.1572: Mac: getting memory size doesn't work everywhere
Problem:    Mac: getting memory size doesn't work everywhere.
Solution:   Use MACOS_X instead of MACOS_X_DARWIN. (Kazunobu Kuriyama)
2018-03-05 21:59:37 +01:00
Bram Moolenaar
40d77b0ec1 patch 8.0.1571: can't build without GUI
Problem:    Can't build without GUI.
Solution:   Adjust #ifdef for gui_find_menu().
2018-03-05 21:32:27 +01:00
Bram Moolenaar
29a2c08d79 patch 8.0.1570: can't use :popup for a menu in the terminal
Problem:    Can't use :popup for a menu in the terminal. (Wei Zhang)
Solution:   Make :popup work in the terminal.  Also fix that entries were
            included that don't work in the current state.
2018-03-05 21:06:23 +01:00
Bram Moolenaar
28ada699c1 patch 8.0.1569: warning for uninitialized variable from gcc
Problem:    Warning for uninitialized variable from gcc.
Solution:   Initialize the variable.
2018-03-05 12:42:42 +01:00
Bram Moolenaar
24fe475894 patch 8.0.1568: can't build on older Mac, header file is missing
Problem:    Can't build on older Mac, header file is missing.
Solution:   Remove the header file. (Ozaki Kiichi, closes #2691)
2018-03-05 10:54:53 +01:00
Bram Moolenaar
6e35a11490 patch 8.0.1567: cannot build Win32 GUI without IME
Problem:    Cannot build Win32 GUI without IME. (John Marriott)
Solution:   Adjust when IME_WITHOUT_XIM and HAVE_INPUT_METHOD are defined and
            use it in a few more places.
2018-03-04 21:36:05 +01:00
Bram Moolenaar
8a3bb56230 patch 8.0.1566: too many #ifdefs
Problem:    Too many #ifdefs.
Solution:   Graduate FEAT_SCROLLBIND and FEAT_CURSORBIND.
2018-03-04 20:14:14 +01:00
Bram Moolenaar
107279c17b patch 8.0.1565: can't build Mac version without GUI
Problem:    Can't build Mac version without GUI.
Solution:   Adjust when IME_WITHOUT_XIM is defined.
2018-03-04 18:57:19 +01:00
Bram Moolenaar
f2bd8ef2b4 patch 8.0.1564: too many #ifdefs
Problem:    Too many #ifdefs.
Solution:   Graduate the +autocmd feature. Takes away 450 #ifdefs and
            increases code size of tiny Vim by only 40 Kbyte.
2018-03-04 18:08:14 +01:00
Bram Moolenaar
3f54fd319f patch 8.0.1563: timeout of getwinposx() can be too short
Problem:    Timeout of getwinposx() can be too short. (lilydjwg)
Solution:   Add getwinpos(). (closes #2689)
2018-03-03 21:29:55 +01:00
Bram Moolenaar
71137fed4d patch 8.0.1562: the terminal debugger can't set a breakpoint with the mouse
Problem:    The terminal debugger can't set a breakpoint with the mouse.
Solution:   Add popup menu entries.
2018-03-03 20:47:21 +01:00
Bram Moolenaar
069dafc1de patch 8.0.1561: crash with rust syntax highligting
Problem:    Crash with rust syntax highligting. (Edd Barrett)
Solution:   Avoid going past the end of an empty line.
2018-03-03 20:02:19 +01:00
Bram Moolenaar
3767b61ad9 patch 8.0.1560: build failure without GUI on MS-Windows
Problem:    Build failure without GUI on MS-Windows.
Solution:   Adjust #ifdef for vcol2col().
2018-03-03 19:51:58 +01:00
Bram Moolenaar
658a154cbf patch 8.0.1559: build failure without GUI
Problem:    Build failure without GUI.
Solution:   Adjust #ifdef for get_fpos_of_mouse().
2018-03-03 19:29:43 +01:00
Bram Moolenaar
aef8c3da2b patch 8.0.1558: no right-click menu in a terminal
Problem:    No right-click menu in a terminal.
Solution:   Implement the right click menu for the terminal.
2018-03-03 18:59:16 +01:00
Bram Moolenaar
c71807db9c patch 8.0.1557: printf() does not work with only one argument
Problem:    printf() does not work with only one argument. (Daniel Hahler)
Solution:   Allow using just the format. (Ken Takata, closes #2687)
2018-03-03 15:06:52 +01:00
Bram Moolenaar
590ec878a5 patch 8.0.1556: may not parse the t_RS response correctly
Problem:    May not parse the t_RS response correctly, resulting in wrong
            characters in the input stream.
Solution:   When the t_RS response is partly received wait for more
            characters.
2018-03-02 20:58:42 +01:00
Bram Moolenaar
77780b66f4 patch 8.0.1555: build error for some combination of features
Problem:    Build error for some combination of features.
Solution:   Declare variable in more situations.
2018-03-01 23:10:45 +01:00
Bram Moolenaar
0726870326 patch 8.0.1554: custom plugins loaded with --clean
Problem:    Custom plugins loaded with --clean.
Solution:   Do not include the home directory in 'runtimepath'.
2018-03-01 21:57:32 +01:00
Bram Moolenaar
5f73ef8d20 patch 8.0.1553: cannot see what digraph is used to insert a character
Problem:    Cannot see what digraph is used to insert a character.
Solution:   Show the digraph with the "ga" command. (Christian Brabandt)
2018-02-27 21:09:30 +01:00
Bram Moolenaar
8195247054 patch 8.0.1552: may leak file descriptors when executing job
Problem:    May leak file descriptors when executing job.
Solution:   Close more file descriptors. (Ozaki Kiichi, closes #2531)
2018-02-27 19:10:00 +01:00
Bram Moolenaar
988615f26f patch 8.0.1551: on Mac 'maxmemtot' is set to a weird value
Problem:    On Mac 'maxmemtot' is set to a weird value.
Solution:   For Mac use total memory and subtract system memory. For other
            systems accept both a 32 bit and 64 bit result. (Ozaki Kiichi,
            closes #2646)
2018-02-27 17:58:20 +01:00
Bram Moolenaar
792f0e3659 patch 8.0.1550: various small problems in source files
Problem:    Various small problems in source files.
Solution:   Fix the problems.
2018-02-27 17:27:13 +01:00
Bram Moolenaar
5d7ead3bc8 patch 8.0.1549: various small problems in test files
Problem:    Various small problems in test files.
Solution:   Include small changes.
2018-02-27 17:17:42 +01:00
Bram Moolenaar
3ad8772ef0 Include Serbian spell input files 2018-02-27 17:11:01 +01:00
Bram Moolenaar
75542ec9f6 patch 8.0.1548: screen dump test script not included in distribution
Problem:    Screen dump test script not included in distribution.
Solution:   Add the script to the list of distributed files.
2018-02-27 17:07:43 +01:00
Bram Moolenaar
9c474b2773 patch 8.0.1547: undo in the options window makes it empty
Problem:    Undo in the options window makes it empty.
Solution:   Set 'undolevels' while filling the buffer. (Yasuhiro Matthew,
            closes #2645)
2018-02-27 17:04:25 +01:00
Bram Moolenaar
c8bcfe7efd patch 8.0.1546: using feedkeys() in a terminal may trigger mappings
Problem:    Using feedkeys() in a terminal window may trigger mappings.
            (Charles Sheridan)
Solution:   Avoid triggering a mapping when peeking for a key.
2018-02-27 16:29:28 +01:00
Bram Moolenaar
8226ac6b59 patch 8.0.1545: screen dumps not included in distribution
Problem:    Screen dumps not included in distribution.
Solution:   Add dumps to the list of distributed files.
2018-02-27 14:54:53 +01:00
Bram Moolenaar
22f1d0e35e Updated runtime files.
Add Serbian translations and spell checking.
2018-02-27 14:53:30 +01:00
Bram Moolenaar
d4fc577e60 patch 8.0.1544: when using 'termguicolors' SpellBad doesn't show
Problem:    When using 'termguicolors' SpellBad doesn't show.
Solution:   When the GUI colors are not set fall back to the cterm colors.
2018-02-27 14:39:03 +01:00
Bram Moolenaar
33ef5bb0e4 patch 8.0.1543: with 'termguicolors' Normal color doesn't work correctly
Problem:    With 'termguicolors' Normal color doesn't work correctly.
Solution:   Set cterm_normal_bg_gui_color and cterm_normal_fg_color always.
            (Kazunobu Kuriyama, closes #981, closes #2332)
2018-02-27 13:04:59 +01:00
Bram Moolenaar
9271d058c9 patch 8.0.1542: terminal screen dump does not include cursor position
Problem:    Terminal screen dump does not include cursor position.
Solution:   Mark the cursor position in the cump.
2018-02-25 21:39:46 +01:00
Bram Moolenaar
36f923014a patch 8.0.1541: synpat_T is taking too much memory
Problem:    synpat_T is taking too much memory.
Solution:   Reorder members to reduce padding. (Dominique Pelle, closes #2671)
2018-02-24 21:36:34 +01:00
Bram Moolenaar
2b10bcbfc1 patch 8.0.1540: popup menu positioning fails with longer string
Problem:    Popup menu positioning fails with longer string.
Solution:   Only align with right side of window when width is less than
            'pumwidth' (closes #2661)
2018-02-24 21:25:44 +01:00
Bram Moolenaar
6bb2cdfe60 patch 8.0.1539: no test for the popup menu positioning
Problem:    No test for the popup menu positioning.
Solution:   Add a screendump test for the popup menu.
2018-02-24 19:53:53 +01:00
Bram Moolenaar
bb008dd323 patch 8.0.1538: popupmenu is too far left when completion is long
Problem:    Popupmenu is too far left when completion is long. (Linwei)
Solution:   Adjust column computations. (Hirohito Higashi, closes #2661)
2018-02-24 18:59:55 +01:00
Bram Moolenaar
085346f5a1 patch 8.0.1537: xxd does not skip NUL lines when using ebcdic
Problem:    Xxd does not skip NUL lines when using ebcdic.
Solution:   Check for a NUL before converting a character for ebcdic. (Tim
            Sell, closes #2668)
2018-02-24 18:30:55 +01:00
Bram Moolenaar
791010e648 patch 8.0.1536: quotestar test is flaky when using the GUI
Problem:    Quotestar test is flaky when using the GUI.
Solution:   Add check that the star register arrived at the server.  Increase
            timeouts.
2018-02-24 17:42:28 +01:00
Bram Moolenaar
6acadda8d6 patch 8.0.1535: C syntax test still fails when using gvim
Problem:    C syntax test still fails when using gvim.
Solution:   Clear Normal cterm highlighting instead of setting it.
2018-02-24 16:51:32 +01:00
Bram Moolenaar
b7ea7cb8e4 patch 8.0.1534: C syntax test fails when using gvim
Problem:    C syntax test fails when using gvim
Solution:   Force running in a terminal.  Check that 'background' is correct
            even when $COLORFGBG is set.
2018-02-24 14:38:51 +01:00
Bram Moolenaar
674e482d13 patch 8.0.1533: libterm doesn't support requesting fg and bg color
Problem:    Libterm doesn't support requesting fg and bg color.
Solution:   Implement t_RF and t_RB.
2018-02-24 14:03:56 +01:00
Bram Moolenaar
cc0f2be880 patch 8.0.1532: compiler warnings without termguicolors feature
Problem:    Compiler warnings without termguicolors feature.
Solution:   Add #ifdef. (John Marriott)  Cleanup the code a bit.
2018-02-23 18:23:30 +01:00
Bram Moolenaar
cafafb381a patch 8.0.1531: cannot use 24 bit colors in MS-Windows console
Problem:    Cannot use 24 bit colors in MS-Windows console.
Solution:   Add support for vcon. (Nobuhiro Takasaki, Ken Takasaki,
            fixes #1270, fixes #2060)
2018-02-22 21:07:09 +01:00
Bram Moolenaar
19eb6658ec patch 8.0.1530: dump test fails when using a shadow directory
Problem:    Dump test fails when using a shadow directory.
Solution:   Add the directory to the list of symlinks to make (Elimar
            Riesebieter)
2018-02-22 11:42:49 +01:00
Bram Moolenaar
3049418f3d patch 8.0.1529: assert_equalfile() does not close file descriptors
Problem:    Assert_equalfile() does not close file descriptors. (Coverity)
Solution:   Close the file descriptors.
2018-02-20 21:46:05 +01:00
Bram Moolenaar
81226e0310 patch 8.0.1528: dead code found
Problem:    Dead code found.
Solution:   Remove the useless lines. (CodeAi, closes #2656)
2018-02-20 21:44:45 +01:00
Bram Moolenaar
3cc9f7440d patch 8.0.1527: screen dump test fails on MS-Windows
Problem:    Screen dump test fails on MS-Windows.
Solution:   Skip dump test on MS-Windows for now.
2018-02-20 17:09:16 +01:00
Bram Moolenaar
da65058a9c patch 8.0.1526: no test using a screen dump yet
Problem:    No test using a screen dump yet.
Solution:   Add a test for C syntax highlighting.  Add helper functions.
2018-02-20 15:51:40 +01:00
Bram Moolenaar
7a76092a51 patch 8.0.1525: using :wqa exits even if a job runs in a terminal window
Problem:    Using :wqa exits even if a job runs in a terminal window. (Jason
            Felice)
Solution:   Check if a terminal has a running job. (closes #2654)
2018-02-19 23:10:02 +01:00
Bram Moolenaar
9c8816bd30 patch 8.0.1524: compiler warnings for uninitialized variables
Problem:    Compiler warnings for uninitialized variables. (Tony Mechelynck)
Solution:   Initialize variables.
2018-02-19 21:50:42 +01:00
Bram Moolenaar
d96ff16511 patch 8.0.1523: cannot write and read terminal screendumps
Problem:    Cannot write and read terminal screendumps.
Solution:   Add term_dumpwrite(), term_dumpread() and term_dumpdiff().
            Also add assert_equalfile().
2018-02-18 22:13:29 +01:00
Bram Moolenaar
4287ed33dd patch 8.0.1522: popup menu is positioned in the wrong place
Problem:    Popup menu is positioned in the wrong place. (Davit Samvelyan,
            Boris Staletic)
Solution:   Correct computation of the column and the conditions for that.
            (Hirohito Higashi, closes #2640)
2018-02-17 20:35:29 +01:00
Bram Moolenaar
73cddfd559 patch 8.0.1521: Shift-Tab does not work in a terminal window
Problem:    Shift-Tab does not work in a terminal window.
Solution:   Recognize Shift-Tab key press. (Jsees Luehrs, closes #2644)
2018-02-16 20:01:04 +01:00
Bram Moolenaar
181ca99e16 patch 8.0.1520: cursor in wrong line when using a WinBar in Terminal window
Problem:    Cursor is in the wrong line when using a WinBar in a Terminal
            window.
Solution:   Adjust the row number. (Christian Brabandt, closes #2362)
2018-02-13 21:19:21 +01:00
Bram Moolenaar
341a64c9ca patch 8.0.1519: getchangelist() does not use argument as bufname()
Problem:    Getchangelist() does not use argument as bufname().
Solution:   Use get_buf_tv(). (Yegappan Lakshmanan, closes #2641)
2018-02-13 19:21:17 +01:00
Bram Moolenaar
2be5733152 patch 8.0.1518: error messages suppressed after ":silent! try"
Problem:    Error messages suppressed after ":silent! try". (Ben Reilly)
Solution:   Restore emsg_silent before executing :try. (closes #2531)
2018-02-13 18:05:18 +01:00
Bram Moolenaar
bc197195b0 patch 8.0.1517: invalid memory acces with pattern using look-behind match
Problem:    Invalid memory acces with pattern using look-behind match.
            (Dominique Pelle)
Solution:   Get a pointer to the right line.
2018-02-13 16:35:06 +01:00
Bram Moolenaar
b3292fa2d3 patch 8.0.1516: errors for job options are not very specific
Problem:    Errors for job options are not very specific.
Solution:   Add more specific error messages.
2018-02-13 15:17:58 +01:00
Bram Moolenaar
ab5e7c3deb patch 8.0.1515: BufWinEnter event fired when opening hidden terminal
Problem:    BufWinEnter event fired when opening hidden terminal.
Solution:   Do not fire BufWinEnter when the terminal is midden and does not
            open a window. (Kenta Sato, closes #2636)
2018-02-13 14:07:18 +01:00
Bram Moolenaar
07ad816525 patch 8.0.1514: getting the list of changes is not easy
Problem:    Getting the list of changes is not easy.
Solution:   Add the getchangelist() function. (Yegappan Lakshmanan,
            closes #2634)
2018-02-13 13:59:59 +01:00
Bram Moolenaar
4867974137 patch 8.0.1513: the jumplist is not always properly cleaned up
Problem:    The jumplist is not always properly cleaned up.
Solution:   Call fname2fnum() before cleanup_jumplist(). (Yegappan Lakshmanan)
2018-02-13 13:33:29 +01:00
Bram Moolenaar
e4db7aedab patch 8.0.1512: warning for possibly using NULL pointer
Problem:    Warning for possibly using NULL pointer. (Coverity)
Solution:   Skip using the pointer if it's NULL.
2018-02-13 13:12:11 +01:00
Bram Moolenaar
3198870137 patch 8.0.1511: some code for the debugger watch expression is clumsy
Problem:    Some code for the debugger watch expression is clumsy.
Solution:   Clean up the code.
2018-02-13 12:57:42 +01:00
Bram Moolenaar
b48e96f61c patch 8.0.1510: cannot test if a command causes a beep
Problem:    Cannot test if a command causes a beep.
Solution:   Add assert_beeps().
2018-02-13 12:26:14 +01:00
Bram Moolenaar
294959528e patch 8.0.1509: test for failing drag-n-drop command no longer fails
Problem:    Test for failing drag-n-drop command no longer fails.
Solution:   Check for the "dnd" feature.
2018-02-12 22:49:00 +01:00
Bram Moolenaar
5a656864a0 patch 8.0.1508: the :drop command is not always available
Problem:    The :drop command is not always available.
Solution:   Include :drop in all builds. (Yasuhiro Matsumoto, closes #2639)
2018-02-12 22:08:06 +01:00
Bram Moolenaar
bfbea567d8 patch 8.0.1507: timer test is a bit flaky
Problem:    Timer test is a bit flaky.
Solution:   Add it to the list of flaky tests.
2018-02-12 21:31:35 +01:00
Bram Moolenaar
c19e1d1ba5 patch 8.0.1506: new version of HP NonStop (Tandem) doesn't like a header
Problem:    New version of HP NonStop (Tandem) doesn't like the default header
            for setenv().
Solution:   Put a #ifdef around the setenv() entry. (Joachim Schmitz)
2018-02-12 20:58:11 +01:00
Bram Moolenaar
c6f9f739d3 patch 8.0.1505: debugger can't break on a condition
Problem:    Debugger can't break on a condition. (Charles Campbell)
Solution:   Add ":breakadd expr". (Christian Brabandt, closes #859)
2018-02-11 19:06:26 +01:00
Bram Moolenaar
c33ecb2915 patch 8.0.1504: Win32: the screen may be cleared on startup
Problem:    Win32: the screen may be cleared on startup.
Solution:   Only call shell_resized() when the size actually changed. (Ken
            Takata, closes #2527)
2018-02-11 16:40:45 +01:00
Bram Moolenaar
cdd09aa51a patch 8.0.1503: access memory beyond end of string
Problem:    Access memory beyond end of string. (Coverity)
Solution:   Keep allocated memory in separate pointer.  Avoid outputting the
            NUL character.
2018-02-11 15:38:40 +01:00
Bram Moolenaar
71a43c0137 patch 8.0.1502: in out-of-memory situation character is not restored
Problem:    In out-of-memory situation character is not restored. (Coverity)
Solution:   Restore the character in all situations.
2018-02-11 15:20:20 +01:00
Bram Moolenaar
a0221df149 patch 8.0.1501: out-of-memory situation not correctly handled
Problem:    Out-of-memory situation not correctly handled. (Coverity)
Solution:   Check for NULL value.
2018-02-11 15:07:22 +01:00
Bram Moolenaar
0549a1e184 patch 8.0.1500: possible NULL pointer dereference
Problem:    Possible NULL pointer dereference. (Coverity)
Solution:   Check for the pointer not being NULL.
2018-02-11 15:02:48 +01:00
Bram Moolenaar
4b7e7bed6c patch 8.0.1499: out-of-memory situation not correctly handled
Problem:    Out-of-memory situation not correctly handled. (Coverity)
Solution:   Check for NULL value.
2018-02-11 14:53:30 +01:00
Bram Moolenaar
a7e18d237f patch 8.0.1498: getjumplist() returns duplicate entries
Problem:    Getjumplist() returns duplicate entries. (lacygoill)
Solution:   Call cleanup_jumplist(). (Yegappan Lakshmanan)
2018-02-11 14:29:49 +01:00
Bram Moolenaar
4f50588ba3 patch 8.0.1497: getting the jump list requires parsing the output of :jumps
Problem:    Getting the jump list requires parsing the output of :jumps.
Solution:   Add getjumplist(). (Yegappan Lakshmanan, closes #2609)
2018-02-10 21:06:32 +01:00
Bram Moolenaar
d23a823669 patch 8.0.1496: clearing a pointer takes two lines
Problem:    Clearing a pointer takes two lines.
Solution:   Add VIM_CLEAR() and replace vim_clear(). (Hirohito Higashi,
            closes #2629)
2018-02-10 18:45:26 +01:00
Bram Moolenaar
42443c7d7f patch 8.0.1495: having 'pumwidth' default to zero has no merit
Problem:    Having 'pumwidth' default to zero has no merit.
Solution:   Make the default 15, as the actual default value.
2018-02-10 18:28:52 +01:00
Bram Moolenaar
5a09343719 patch 8.0.1494: no autocmd triggered in Insert mode with visible popup menu
Problem:    No autocmd triggered in Insert mode with visible popup menu.
Solution:   Add TextChangedP. (Prabir Shrestha, Christian Brabandt,
            closes #2372, closes #1691)
            Fix that the TextChanged autocommands are not always triggered
            when sourcing a script.
2018-02-10 18:15:19 +01:00
Bram Moolenaar
9b56a57cda patch 8.0.1493: completion items cannot be annotated
Problem:    Completion items cannot be annotated.
Solution:   Add a "user_data" entry to the completion item. (Ben Jackson,
            coses #2608, closes #2508)
2018-02-10 16:19:32 +01:00
Bram Moolenaar
b301f6b950 patch 8.0.1492: memory leak in balloon_split()
Problem:    Memory leak in balloon_split().
Solution:   Free the balloon lines. Free the balloon when exiting.
2018-02-10 15:38:35 +01:00
Bram Moolenaar
a8f04aa275 patch 8.0.1491: the minimum width of the popup menu is hard coded
Problem:    The minimum width of the popup menu is hard coded.
Solution:   Add the 'pumwidth' option. (Christian Brabandt, James McCoy,
            closes #2314)
2018-02-10 15:36:55 +01:00
Bram Moolenaar
2993ac5fce patch 8.0.1490: number of spell regions is spread out through the code
Problem:    Number of spell regions is spread out through the code.
Solution:   Define MAXREGIONS.
2018-02-10 14:12:43 +01:00
Bram Moolenaar
7254067ee9 Update runtime files. 2018-02-09 22:00:53 +01:00
Bram Moolenaar
5459129af2 patch 8.0.1489: there is no easy way to get the global directory
Problem:    There is no easy way to get the global directory, esp. if some
            windows have a local directory.
Solution:   Make getcwd(-1) return the global directory. (Andy Massimino,
            closes #2606)
2018-02-09 20:53:59 +01:00
Bram Moolenaar
0d20737732 patch 8.0.1488: emacs tags no longer work
Problem:    Emacs tags no longer work. (zdohnal)
Solution:   Do not skip over end of line.
2018-02-09 19:25:29 +01:00
Bram Moolenaar
8846ac5aed patch 8.0.1487: test 14 fails
Problem:    Test 14 fails.
Solution:   Fix of-by-one error.
2018-02-09 19:24:01 +01:00
Bram Moolenaar
82846a00ac patch 8.0.1486: accessing invalid memory with "it"
Problem:    Accessing invalid memory with "it". (Dominique Pelle)
Solution:   Avoid going over the end of the line. (Christian Brabandt,
            closes #2532)
2018-02-09 18:09:54 +01:00
Bram Moolenaar
9e33efd152 patch 8.0.1485: weird autocmd may cause arglist to be changed recursively
Problem:    Weird autocmd may cause arglist to be changed recursively.
Solution:   Prevent recursively changing the argument list. (Christian
            Brabandt, closes #2472)
2018-02-09 17:50:28 +01:00
Bram Moolenaar
a15ef4588c patch 8.0.1484: reduntant conditions
Problem:    Reduntant conditions.
Solution:   Remove them. (Dominique Pelle)
2018-02-09 16:46:00 +01:00
Bram Moolenaar
9d32276b52 patch 8.0.1483: searchpair() might return an invalid value on timeout
Problem:    Searchpair() might return an invalid value on timeout.
Solution:   When the second search times out, do not accept a match from the
            first search. (Daniel Hahler, closes #2552)
2018-02-09 16:04:25 +01:00
Bram Moolenaar
02ae9b4a93 patch 8.0.1482: using feedkeys() does not work to test completion
Problem:    Using feedkeys() does not work to test Insert mode completion.
            (Lifepillar)
Solution:   Do not check for typed keys when executing :normal or feedkeys().
            Fix thesaurus completion not working when 'complete' is empty.
2018-02-09 15:06:02 +01:00
Bram Moolenaar
1567558b20 patch 8.0.1481: clearing a pointer takes two lines
Problem:    Clearing a pointer takes two lines.
Solution:   Add vim_clear() to free and clear the pointer.
2018-02-09 12:29:56 +01:00
Bram Moolenaar
0562532c2e patch 8.0.1480: patch missing change
Problem:    Patch missing change.
Solution:   Add missing change.
2018-02-09 12:28:00 +01:00
Bram Moolenaar
bc0e9adae9 patch 8.0.1479: insert mode completion state is confusing
Problem:    Insert mode completion state is confusing.
Solution:   Move ctrl_x_mode into edit.c.  Add CTRL_X_NORMAL for zero.
2018-02-09 12:13:34 +01:00
Bram Moolenaar
dff72ba445 patch 8.0.1478: unnecessary condition
Problem:    Unnecessary condition for "len" being zero.
Solution:   Remove the condition. (Dominique Pelle)
2018-02-08 22:45:17 +01:00
Bram Moolenaar
d317b38a4d patch 8.0.1477: redraw flicker when moving the mouse outside of terminal window
Problem:    Redraw flicker when moving the mouse outside of terminal window.
Solution:   Instead of updating the cursor color and shape every time leaving
            and entering a terminal window, only update when different from
            the previously used cursor.
2018-02-08 22:33:31 +01:00
Bram Moolenaar
acda04f5c6 patch 8.0.1476: screen isn't always updated right away
Problem:    Screen isn't always updated right away.
Solution:   Adjust #ifdef: Call out_flush() when not running the GUI.
2018-02-08 09:57:28 +01:00
Bram Moolenaar
f12519dec8 patch 8.0.1475: invalid memory access in read_redo()
Problem:    Invalid memory access in read_redo(). (gy741)
Solution:   Convert the replacement character back from a negative number to
            CR or NL. (hint by Dominique Pelle, closes #2616)
2018-02-06 22:52:49 +01:00
Bram Moolenaar
dd08b6a32b patch 8.0.1474: Visual C 2017 has multiple MSVCVER numbers
Problem:    Visual C 2017 has multiple MSVCVER numbers.
Solution:   Assume the 2017 version if MSVCVER >= 1910. (Leonardo Valeri
            Manera, closes #2619)
2018-02-06 22:02:43 +01:00
Bram Moolenaar
511ffdd65d patch 8.0.1473: MS-Windows: D&D fails between 32 and 64 bit apps
Problem:    MS-Windows: D&D fails between 32 and 64 bit apps.
Solution:   Add the /HIGHENTROPYVA:NO linker option. (Ken Takata, closes #2504)
2018-02-04 19:37:40 +01:00
Bram Moolenaar
5d4247402b patch 8.0.1472: MS-Windows: nsis installer is a bit slow
Problem:    MS-Windows: nsis installer is a bit slow.
Solution:   Use ReserveFile for vimrc.ini. (closes #2522)
2018-02-04 19:11:30 +01:00
Bram Moolenaar
28944fecff patch 8.0.1471: on MS-Windows CursorIM highlighting no longer works
Problem:    On MS-Windows CursorIM highlighting no longer works.
Solution:   Adjust #if statements. (Ken Takata)
2018-02-04 19:01:31 +01:00
Bram Moolenaar
2c7b906afb patch 8.0.1470: integer overflow when using regexp pattern
Problem:    Integer overflow when using regexp pattern. (geeknik)
Solution:   Use a long instead of int. (Christian Brabandt, closes #2251)
2018-02-04 18:22:46 +01:00
Bram Moolenaar
2374faae11 patch 8.0.1469: when package path is a symlink 'runtimepath' is wrong
Problem:    When package path is a symlink adding it to 'runtimepath' happens
            at the end.
Solution:   Do not resolve symlinks before locating the position in
            'runtimepath'. (Ozaki Kiichi, closes #2604)
2018-02-04 17:47:42 +01:00
Bram Moolenaar
191f18bad0 patch 8.0.1468: illegal memory access in del_bytes()
Problem:    Illegal memory access in del_bytes().
Solution:   Check for negative byte count. (Christian Brabandt, closes #2466)
2018-02-04 16:38:47 +01:00
Bram Moolenaar
fef4ddd5eb patch 8.0.1467: libvterm doesn't handle illegal byte sequence correctly
Problem:    Libvterm doesn't handle illegal byte sequence correctly.
Solution:   After the invalid code check if there is space to store another
            character.  Allocate one more character. (zhykzhykzhyk, closes
            #2614, closes #2613)
2018-02-04 14:49:57 +01:00
Bram Moolenaar
06b77ef69f patch 8.0.1466: older GTK versions don't have gtk_entry_get_text_length()
Problem:    Older GTK versions don't have gtk_entry_get_text_length().
Solution:   Add a function with #ifdefs to take care of GTK version
            differences. (Kazunobu Kuriyama, closes #2605)
2018-02-04 14:32:57 +01:00
Bram Moolenaar
4bc0bed536 patch 8.0.1465: python2 and python3 detection not tested
Problem:    Python2 and python3 detection not tested. (Matej Cepl)
Solution:   Add test for detecting python2 and python3.  Also detect a script
            using "js" as javascript.
2018-02-03 22:35:40 +01:00
Bram Moolenaar
8a37b03289 patch 8.0.1464: completing directory after :find does not add slash
Problem:    Completing directory after :find does not add slash.
Solution:   Adjust the flags for globpath(). (Genki Sky)
2018-02-03 20:43:08 +01:00
Bram Moolenaar
ec48a9c589 patch 8.0.1463: test fails without 'autochdir' option
Problem:    Test fails without 'autochdir' option.
Solution:   Skip test if 'autochdir' is not supported.
2018-02-03 20:11:40 +01:00
Bram Moolenaar
f4aba797cb patch 8.0.1462: missing yet another file in patch
Problem:    Missing yet another file in patch.
Solution:   Add changes to missing file.
2018-02-03 19:17:36 +01:00
Bram Moolenaar
15833239a4 patch 8.0.1461: missing another file in patch
Problem:    Missing another file in patch.
Solution:   Add changes to missing file.
2018-02-03 18:33:17 +01:00
Bram Moolenaar
b5cb65ba2b patch 8.0.1460: missing file in patch
Problem:    Missing file in patch.
Solution:   Add changes to missing file.
2018-02-03 18:01:37 +01:00
Bram Moolenaar
b7407d3fc9 patch 8.0.1459: cannot handle change of directory
Problem:    Cannot handle change of directory.
Solution:   Add the DirChanged autocommand event. (Andy Massimino,
            closes #888)  Avoid changing directory for 'autochdir' too often.
2018-02-03 17:36:27 +01:00
Bram Moolenaar
ddb349369d patch 8.0.1458: filetype detection test does not check all scripts
Problem:    Filetype detection test does not check all scripts.
Solution:   Add most scripts to the test
2018-02-03 15:55:49 +01:00
Bram Moolenaar
8fd2ffc530 patch 8.0.1457: clojure now supports a shebang line
Problem:    Clojure now supports a shebang line.
Solution:   Detect clojure script from the shebang line. (David Burgin,
            closes #2570)
2018-02-03 15:43:15 +01:00
Bram Moolenaar
8dce6c54c8 patch 8.0.1456: timer test on travis Mac is still flaky
Problem:    Timer test on travis Mac is still flaky.
Solution:   Increase time range a bit more.
2018-02-03 15:38:42 +01:00
Bram Moolenaar
4bfa8af141 patch 8.0.1455: if $SHELL contains a space then 'shell' is incorrect
Problem:    If $SHELL contains a space then the default value of 'shell' is
            incorrect. (Matthew Horan)
Solution:   Escape spaces in $SHELL. (Christian Brabandt, closes #459)
2018-02-03 15:14:46 +01:00
Bram Moolenaar
42b23fad1d patch 8.0.1454: when in silent mode too much output is buffered
Problem:    When in silent mode too much output is buffered.
Solution:   Use line buffering instead of fully buffered. (Brian M. Carlson,
            closes #2537)
2018-02-03 14:46:45 +01:00
Bram Moolenaar
218101442e patch 8.0.1453: terminal test fails on some slow terminals
Problem:    Terminal test fails on some slow terminals.
Solution:   Increase timeout to 10 seconds.
2018-02-02 18:30:36 +01:00
Bram Moolenaar
d4a282f7a5 patch 8.0.1452: terminal test fails on some systems
Problem:    Terminal test fails on some systems. (jonathonf)
Solution:   Use "cat" instead of Python to produce the input.  Add a delay.
            (closes #2607)
2018-02-02 18:22:31 +01:00
Bram Moolenaar
94073167e3 patch 8.0.1451: difficult to set the python home directories properly
Problem:    It is difficult to set the python home directory properly for
            Python 2.7 and 3.5 since both use $PYTHONHOME.
Solution:   Add the 'pythonhome' and 'pythonthreehome' options. (Kazuki
            Sakamoto, closes #1266)
2018-01-31 21:49:05 +01:00
Bram Moolenaar
1dd45fb4f3 patch 8.0.1450: GUI: endless loop when stopping cursor blinking
Problem:    Endless loop when gui_mch_stop_blink() is called while blink_state
            is BLINK_OFF. (zdohnal)
Solution:   Avoid calling gui_update_cursor() recursively.
2018-01-31 21:10:01 +01:00
Bram Moolenaar
a338adcf22 patch 8.0.1449: slow redrawing with DirectX
Problem:    Slow redrawing with DirectX.
Solution:   Avoid calling gui_mch_flush() unnecessarily, especially when
            updating the cursor. (Ken Takata, closes #2560)
2018-01-31 20:51:47 +01:00
Bram Moolenaar
37badc898b patch 8.0.1448: segfault with exception inside :rubyfile command
Problem:    Segmentation fault when Ruby throws an exception inside :rubyfile
            command.
Solution:   Use rb_protect() instead of rb_load_protect(). (ujihisa,
            closes #2147, greywolf, closes #2512, #2511)
2018-01-31 20:15:30 +01:00
Bram Moolenaar
cada78975e patch 8.0.1447: still too many old style tests
Problem:    Still too many old style tests.
Solution:   Turn a few tests into new style. (Yegappan Lakshmanan,
            closes #2509)
2018-01-31 19:30:24 +01:00
Bram Moolenaar
6f361c9912 patch 8.0.1446: acessing freed memory after window command in auto command
Problem:    Acessing freed memory after window command in auto command.
            (gy741)
Solution:   Adjust the pointer in the parent frame. (Christian Brabandt,
            closes #2467)
2018-01-31 19:06:50 +01:00
Bram Moolenaar
153b704e20 patch 8.0.1445: cannot act on edits in the command line
Problem:    Cannot act on edits in the command line.
Solution:   Add the CmdlineChanged autocommand event. (xtal8, closes #2603,
            closes #2524)
2018-01-31 15:48:32 +01:00
292 changed files with 19916 additions and 6272 deletions

View File

@@ -110,6 +110,7 @@ SRC_ALL = \
src/testdir/sautest/autoload/*.vim \
src/testdir/runtest.vim \
src/testdir/shared.vim \
src/testdir/screendump.vim \
src/testdir/view_util.vim \
src/testdir/setup.vim \
src/testdir/gui_init.vim \
@@ -134,6 +135,7 @@ SRC_ALL = \
src/testdir/pyxfile/*.py \
src/testdir/bench*.in \
src/testdir/bench*.vim \
src/testdir/dumps/*.dump \
src/testdir/samples/*.txt \
src/testdir/samples/test000 \
src/testdir/if_ver*.vim \

View File

@@ -89,6 +89,11 @@ Page instfiles
UninstPage uninstConfirm
UninstPage instfiles
# Reserve files
# Needed for showing the _vimrc setting page faster.
ReserveFile /plugin InstallOptions.dll
ReserveFile vimrc.ini
##########################################################
# Functions
@@ -475,14 +480,12 @@ Function SetCustom
# Display the InstallOptions dialog
# Check if a _vimrc should be created
SectionGetFlags ${sec_vimrc_id} $0
IntOp $0 $0 & 1
StrCmp $0 "1" +2 0
SectionGetFlags ${sec_vimrc_id} $3
IntOp $3 $3 & 1
StrCmp $3 "1" +2 0
Abort
Push $3
InstallOptions::dialog "$PLUGINSDIR\vimrc.ini"
Pop $3
InstallOptions::dialog "$PLUGINSDIR\vimrc.ini"
Pop $3
FunctionEnd

View File

@@ -1,4 +1,4 @@
*autocmd.txt* For Vim version 8.0. Last change: 2017 Dec 17
*autocmd.txt* For Vim version 8.0. Last change: 2018 Mar 15
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -21,7 +21,6 @@ For a basic explanation, see section |40.3| in the user manual.
11. Disabling autocommands |autocmd-disable|
{Vi does not have any of these commands}
{only when the |+autocmd| feature has not been disabled at compile time}
==============================================================================
1. Introduction *autocmd-intro*
@@ -33,7 +32,7 @@ files matching *.c. You can also use autocommands to implement advanced
features, such as editing compressed files (see |gzip-example|). The usual
place to put autocommands is in your .vimrc or .exrc file.
*E203* *E204* *E143* *E855* *E937*
*E203* *E204* *E143* *E855* *E937* *E952*
WARNING: Using autocommands is very powerful, and may lead to unexpected side
effects. Be careful not to destroy your text.
- It's a good idea to do some testing on an expendable copy of a file first.
@@ -57,6 +56,8 @@ effects. Be careful not to destroy your text.
Add {cmd} to the list of commands that Vim will
execute automatically on {event} for a file matching
{pat} |autocmd-patterns|.
Note: A quote character is seen as argument to the
:autocmd and won't start a comment.
Vim always adds the {cmd} after existing autocommands,
so that the autocommands execute in the order in which
they were given. See |autocmd-nested| for [nested].
@@ -92,7 +93,8 @@ will appear twice. To avoid this, define your autocommands in a group, so
that you can easily clear them: >
augroup vimrc
autocmd! " Remove all vimrc autocommands
" Remove all vimrc autocommands
autocmd!
au BufNewFile,BufRead *.html so <sfile>:h/html.vim
augroup END
@@ -146,6 +148,8 @@ prompt. When one command outputs two messages this can happen anyway.
plugins, syntax highlighting, etc.
:au[tocmd]! [group] Remove ALL autocommands.
Note: a quote will be seen as argument to the :autocmd
and won't start a comment.
Warning: You should normally not do this without a
group, it breaks plugins, syntax highlighting, etc.
@@ -258,6 +262,7 @@ Name triggered by ~
|BufCreate| just after adding a buffer to the buffer list
|BufDelete| before deleting a buffer from the buffer list
|BufWipeout| before completely deleting a buffer
|TerminalOpen| after a terminal buffer was created
|BufFilePre| before changing the name of the current buffer
|BufFilePost| after changing the name of the current buffer
@@ -286,7 +291,8 @@ Name triggered by ~
|GUIFailed| after starting the GUI failed
|TermResponse| after the terminal response to |t_RV| is received
|QuitPre| when using `:quit`, before deciding whether to quit
|QuitPre| when using `:quit`, before deciding whether to exit
|ExitPre| when using a command that may make Vim exit
|VimLeavePre| before exiting Vim, before writing the viminfo file
|VimLeave| before exiting Vim, after writing the viminfo file
@@ -295,6 +301,8 @@ Name triggered by ~
|FileChangedShellPost| After handling a file changed since editing started
|FileChangedRO| before making the first change to a read-only file
|DirChanged| after the working directory has changed
|ShellCmdPost| after executing a shell command
|ShellFilterPost| after filtering with a shell command
@@ -322,6 +330,10 @@ Name triggered by ~
|CmdwinEnter| after entering the command-line window
|CmdwinLeave| before leaving the command-line window
|CmdlineChanged| after a change was made to the command-line text
|CmdlineEnter| after the cursor moves to the command line
|CmdlineLeave| before the cursor leaves the command line
|InsertEnter| starting Insert mode
|InsertChange| when typing <Insert> while in Insert or Replace mode
|InsertLeave| when leaving Insert mode
@@ -330,6 +342,9 @@ Name triggered by ~
|TextChanged| after a change was made to the text in Normal mode
|TextChangedI| after a change was made to the text in Insert mode
when popup menu is not visible
|TextChangedP| after a change was made to the text in Insert mode
when popup menu visible
|TextYankPost| after text is yanked or deleted
|ColorScheme| after loading a color scheme
@@ -500,6 +515,13 @@ CmdUndefined When a user command is used but it isn't
command is defined. An alternative is to
always define the user command and have it
invoke an autoloaded function. See |autoload|.
*CmdlineChanged*
CmdlineChanged After a change was made to the text in the
command line. Be careful not to mess up
the command line, it may cause Vim to lock up.
<afile> is set to a single character,
indicating the type of command-line.
|cmdwin-char|
*CmdlineEnter*
CmdlineEnter After moving the cursor to the command line,
where the user can type a command or search
@@ -626,6 +648,21 @@ FileChangedRO Before making the first change to a read-only
*E881*
If the number of lines changes saving for undo
may fail and the change will be aborted.
*DirChanged*
DirChanged The working directory has changed in response
to the |:cd| or |:lcd| commands, or as a
result of the 'autochdir' option.
The pattern can be:
"window" to trigger on `:lcd
"global" to trigger on `:cd`
"auto" to trigger on 'autochdir'.
"drop" to trigger on editing a file
<afile> is set to the new directory name.
*ExitPre*
ExitPre When using `:quit`, `:wq` in a way it makes
Vim exit, or using `:qall`, just after
|QuitPre|. Can be used to close any
non-essential window.
*FileChangedShell*
FileChangedShell When Vim notices that the modification time of
a file has changed since editing started.
@@ -763,7 +800,7 @@ InsertCharPre When a character is typed in Insert mode,
inserted literally.
It is not allowed to change the text |textlock|.
The event is not triggered when 'paste' is
set.
set. {only with the +eval feature}
*InsertEnter*
InsertEnter Just before starting Insert mode. Also for
Replace mode and Virtual Replace mode. The
@@ -841,6 +878,7 @@ QuitPre When using `:quit`, `:wq` or `:qall`, before
or quits Vim. Can be used to close any
non-essential window if the current window is
the last ordinary window.
Also see |ExitPre|.
*RemoteReply*
RemoteReply When a reply from a Vim that functions as
server was received |server2client()|. The
@@ -909,6 +947,7 @@ SwapExists Detected an existing swap file when starting
It is not allowed to change to another buffer,
change a buffer name or change directory
here.
{only available with the +eval feature}
*Syntax*
Syntax When the 'syntax' option has been set. The
pattern is matched against the syntax name.
@@ -935,6 +974,11 @@ TermChanged After the value of 'term' has changed. Useful
for re-loading the syntax file to update the
colors, fonts and other terminal-dependent
settings. Executed for all loaded buffers.
*TerminalOpen*
TerminalOpen Just after a terminal buffer was created, with
`:terminal` or |term_start()|. This event is
triggered even if the buffer is created
without a window, with the ++hidden option.
*TermResponse*
TermResponse After the response to |t_RV| is received from
the terminal. The value of |v:termresponse|
@@ -957,6 +1001,11 @@ TextChangedI After a change was made to the text in the
current buffer in Insert mode.
Not triggered when the popup menu is visible.
Otherwise the same as TextChanged.
*TextChangedP*
TextChangedP After a change was made to the text in the
current buffer in Insert mode, only when the
popup menu is visible. Otherwise the same as
TextChanged.
*TextYankPost*
TextYankPost After text has been yanked or deleted in the
current buffer. The following values of
@@ -976,6 +1025,7 @@ TextYankPost After text has been yanked or deleted in the
called recursively.
It is not allowed to change the buffer text,
see |textlock|.
{only when compiled with the +eval feature}
*User*
User Never executed automatically. To be used for
autocommands that are only executed with

View File

@@ -1,4 +1,4 @@
*editing.txt* For Vim version 8.0. Last change: 2017 Nov 16
*editing.txt* For Vim version 8.0. Last change: 2018 Mar 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -424,6 +424,15 @@ On Unix and a few other systems you can also use backticks for the file name
argument, for example: >
:next `find . -name ver\\*.c -print`
:view `ls -t *.patch \| head -n1`
Vim will run the command in backticks using the 'shell' and use the standard
output as argument for the given Vim command (error messages from the shell
command will be discarded).
To see what shell command Vim is running, set the 'verbose' option to 4. When
the shell command returns a non-zero exit code, an error message will be
displayed and the Vim command will be aborted. To avoid this make the shell
always return zero like so: >
:next `find . -name ver\\*.c -print \|\| true`
The backslashes before the star are required to prevent the shell from
expanding "ver*.c" prior to execution of the find program. The backslash
before the shell pipe symbol "|" prevents Vim from parsing it as command
@@ -650,8 +659,7 @@ list of the current window.
There is no check for duplicates, it is possible to
add a file to the argument list twice.
The currently edited file is not changed.
{not in Vi} {not available when compiled without the
|+listcmds| feature}
{not in Vi}
Note: you can also use this method: >
:args ## x
< This will add the "x" item and sort the new list.
@@ -665,8 +673,7 @@ list of the current window.
when it's deleted from the argument list.
Example: >
:argdel *.obj
< {not in Vi} {not available when compiled without the
|+listcmds| feature}
< {not in Vi}
:[range]argd[elete] Delete the {range} files from the argument list.
Example: >
@@ -681,8 +688,7 @@ list of the current window.
< Removes all the files from the arglist.
When the last number in the range is too high, up to
the last argument is deleted.
{not in Vi} {not available when compiled without the
|+listcmds| feature}
{not in Vi}
*:argu* *:argument*
:[count]argu[ment] [count] [++opt] [+cmd]
@@ -691,16 +697,14 @@ list of the current window.
when changes have been made and Vim does not want to
|abandon| the current buffer.
Also see |++opt| and |+cmd|.
{not in Vi} {not available when compiled without the
|+listcmds| feature}
{not in Vi}
:[count]argu[ment]! [count] [++opt] [+cmd]
Edit file [count] in the argument list, discard any
changes to the current buffer. When [count] is
omitted the current entry is used.
Also see |++opt| and |+cmd|.
{not in Vi} {not available when compiled without the
|+listcmds| feature}
{not in Vi}
:[count]n[ext] [++opt] [+cmd] *:n* *:ne* *:next* *E165* *E163*
Edit [count] next file. This fails when changes have
@@ -823,7 +827,6 @@ fourth file in the argument list. This happens when you do ":e file".
LOCAL ARGUMENT LIST
{not in Vi}
{not available when compiled without the |+windows| or |+listcmds| features}
*:arglocal*
:argl[ocal] Make a local copy of the global argument list.
@@ -875,8 +878,7 @@ USING THE ARGUMENT LIST
autocommand event is disabled by adding it to
'eventignore'. This considerably speeds up editing
each file.
{not in Vi} {not available when compiled without the
|+listcmds| feature}
{not in Vi}
Also see |:windo|, |:tabdo|, |:bufdo|, |:cdo|, |:ldo|,
|:cfdo| and |:lfdo|
@@ -1202,7 +1204,8 @@ MULTIPLE WINDOWS AND BUFFERS *window-exit*
:wqa[ll]! [++opt]
:xa[ll]! Write all changed buffers, even the ones that are readonly,
and exit Vim. If there are buffers without a file name or
which cannot be written for another reason, Vim will not quit.
which cannot be written for another reason, or there is a
terminal with a running job, Vim will not quit.
{not in Vi}
==============================================================================

View File

@@ -1,4 +1,4 @@
*eval.txt* For Vim version 8.0. Last change: 2018 Jan 28
*eval.txt* For Vim version 8.0. Last change: 2018 Mar 23
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1246,8 +1246,8 @@ The arguments are optional. Example: >
*closure*
Lambda expressions can access outer scope variables and arguments. This is
often called a closure. Example where "i" and "a:arg" are used in a lambda
while they exist in the function scope. They remain valid even after the
function returns: >
while they already exist in the function scope. They remain valid even after
the function returns: >
:function Foo(arg)
: let i = 3
: return {x -> x + i - a:arg}
@@ -1256,7 +1256,10 @@ function returns: >
:echo Bar(6)
< 5
See also |:func-closure|. Lambda and closure support can be checked with: >
Note that the variables must exist in the outer scope before the lamba is
defined for this to work. See also |:func-closure|.
Lambda and closure support can be checked with: >
if has('lambda')
Examples for using a lambda expression with |sort()|, |map()| and |filter()|: >
@@ -2017,8 +2020,11 @@ argidx() Number current index in the argument list
arglistid([{winnr} [, {tabnr}]]) Number argument list id
argv({nr}) String {nr} entry of the argument list
argv() List the argument list
assert_beeps({cmd}) none assert {cmd} causes a beep
assert_equal({exp}, {act} [, {msg}])
none assert {exp} is equal to {act}
assert_equalfile({fname-one}, {fname-two})
none assert file contents is equal
assert_exception({error} [, {msg}])
none assert {error} is in v:exception
assert_fails({cmd} [, {error}]) none assert {cmd} fails
@@ -2151,6 +2157,7 @@ getbufline({expr}, {lnum} [, {end}])
List lines {lnum} to {end} of buffer {expr}
getbufvar({expr}, {varname} [, {def}])
any variable {varname} in buffer {expr}
getchangelist({expr}) List list of change list items
getchar([expr]) Number get one character from the user
getcharmod() Number modifiers for the last typed character
getcharsearch() Dict last character search
@@ -2167,6 +2174,8 @@ getfperm({fname}) String file permissions of file {fname}
getfsize({fname}) Number size in bytes of file {fname}
getftime({fname}) Number last modification time of file
getftype({fname}) String description of type of file {fname}
getjumplist([{winnr} [, {tabnr}]])
List list of jump list items
getline({lnum}) String line {lnum} of current buffer
getline({lnum}, {end}) List lines {lnum} to {end} of current buffer
getloclist({nr} [, {what}]) List list of location list items
@@ -2183,8 +2192,9 @@ gettabvar({nr}, {varname} [, {def}])
gettabwinvar({tabnr}, {winnr}, {name} [, {def}])
any {name} in {winnr} in tab page {tabnr}
getwininfo([{winid}]) List list of windows
getwinposx() Number X coord in pixels of GUI Vim window
getwinposy() Number Y coord in pixels of GUI Vim window
getwinpos([{timeout}]) List X and Y coord in pixels of the Vim window
getwinposx() Number X coord in pixels of the Vim window
getwinposy() Number Y coord in pixels of the Vim window
getwinvar({nr}, {varname} [, {def}])
any variable {varname} in window {nr}
glob({expr} [, {nosuf} [, {list} [, {alllinks}]]])
@@ -2406,6 +2416,12 @@ tagfiles() List tags files used
tan({expr}) Float tangent of {expr}
tanh({expr}) Float hyperbolic tangent of {expr}
tempname() String name for a temporary file
term_dumpdiff({filename}, {filename} [, {options}])
Number display difference between two dumps
term_dumpload({filename} [, {options}])
Number displaying a screen dump
term_dumpwrite({buf}, {filename} [, {options}])
none dump terminal window contents
term_getaltscreen({buf}) Number get the alternate screen flag
term_getattr({attr}, {what}) Number get the value of attribute {what}
term_getcursor({buf}) List get the cursor position of a terminal
@@ -2419,6 +2435,8 @@ term_gettty({buf}, [{input}]) String get the tty name of a terminal
term_list() List get the list of terminal buffers
term_scrape({buf}, {row}) List get row of a terminal screen
term_sendkeys({buf}, {keys}) none send keystrokes to a terminal
term_setkill({buf}, {how}) none set signal to stop job in terminal
term_setrestore({buf}, {command}) none set command to restore terminal
term_start({cmd}, {options}) Job open a terminal window and run a job
term_wait({buf} [, {time}]) Number wait for screen to be updated
test_alloc_fail({id}, {countdown}, {repeat})
@@ -2445,6 +2463,7 @@ tolower({expr}) String the String {expr} switched to lowercase
toupper({expr}) String the String {expr} switched to uppercase
tr({src}, {fromstr}, {tostr}) String translate chars of {src} in {fromstr}
to chars in {tostr}
trim({text}[, {mask}]) String trim characters in {mask} from {text}
trunc({expr}) Float truncate Float {expr}
type({name}) Number type of variable {name}
undofile({name}) String undo file name for {name}
@@ -2566,6 +2585,11 @@ argv([{nr}]) The result is the {nr}th file in the argument list of the
< Without the {nr} argument a |List| with the whole |arglist| is
returned.
assert_beeps({cmd}) *assert_beeps()*
Run {cmd} and add an error message to |v:errors| if it does
NOT produce a beep or visual bell.
Also see |assert_fails()|.
*assert_equal()*
assert_equal({expected}, {actual} [, {msg}])
When {expected} and {actual} are not equal an error message is
@@ -2581,6 +2605,14 @@ assert_equal({expected}, {actual} [, {msg}])
< Will result in a string to be added to |v:errors|:
test.vim line 12: Expected 'foo' but got 'bar' ~
*assert_equalfile()*
assert_equalfile({fname-one}, {fname-two})
When the files {fname-one} and {fname-two} do not contain
exactly the same text an error message is added to |v:errors|.
When {fname-one} or {fname-two} does not exist the error will
mention that.
Mainly useful with |terminal-diff|.
assert_exception({error} [, {msg}]) *assert_exception()*
When v:exception does not contain the string {error} an error
message is added to |v:errors|.
@@ -2598,6 +2630,8 @@ assert_fails({cmd} [, {error}]) *assert_fails()*
Run {cmd} and add an error message to |v:errors| if it does
NOT produce an error.
When {error} is given it must match in |v:errmsg|.
Note that beeping is not considered an error, and some failing
commands only beep. Use |assert_beeps()| for those.
assert_false({actual} [, {msg}]) *assert_false()*
When {actual} is not false an error message is added to
@@ -3139,8 +3173,8 @@ char2nr({expr} [, {utf8}]) *char2nr()*
char2nr("ABC") returns 65
< When {utf8} is omitted or zero, the current 'encoding' is used.
Example for "utf-8": >
char2nr("<EFBFBD>") returns 225
char2nr("<EFBFBD>"[0]) returns 195
char2nr("á") returns 225
char2nr("á"[0]) returns 195
< With {utf8} set to 1, always treat as utf-8 characters.
A combining character is a separate character.
|nr2char()| does the opposite.
@@ -4268,6 +4302,22 @@ getbufvar({expr}, {varname} [, {def}]) *getbufvar()*
:let bufmodified = getbufvar(1, "&mod")
:echo "todo myvar = " . getbufvar("todo", "myvar")
<
getchangelist({expr}) *getchangelist()*
Returns the |changelist| for the buffer {expr}. For the use
of {expr}, see |bufname()| above. If buffer {expr} doesn't
exist, an empty list is returned.
The returned list contains two entries: a list with the change
locations and the current position in the list. Each
entry in the change list is a dictionary with the following
entries:
col column number
coladd column offset for 'virtualedit'
lnum line number
If buffer {expr} is the current buffer, then the current
position refers to the position in the list. For other
buffers, it is set to the length of the list.
getchar([expr]) *getchar()*
Get a single character from the user or input stream.
If [expr] is omitted, wait until a character is available.
@@ -4419,6 +4469,7 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()*
specifies what for. The following completion types are
supported:
arglist file names in argument list
augroup autocmd groups
buffer buffer names
behave :behave suboptions
@@ -4484,10 +4535,13 @@ getcwd([{winnr} [, {tabnr}]])
Without arguments, for the current window.
With {winnr} return the local current directory of this window
in the current tab page.
in the current tab page. {winnr} can be the window number or
the |window-ID|.
If {winnr} is -1 return the name of the global working
directory. See also |haslocaldir()|.
With {winnr} and {tabnr} return the local current directory of
the window in the specified tab page.
{winnr} can be the window number or the |window-ID|.
Return an empty string if the arguments are invalid.
getfsize({fname}) *getfsize()*
@@ -4557,6 +4611,25 @@ getftype({fname}) *getftype()*
"file" are returned. On MS-Windows a symbolic link to a
directory returns "dir" instead of "link".
getjumplist([{winnr} [, {tabnr}]]) *getjumplist()*
Returns the |jumplist| for the specified window.
Without arguments use the current window.
With {winnr} only use this window in the current tab page.
{winnr} can also be a |window-ID|.
With {winnr} and {tabnr} use the window in the specified tab
page.
The returned list contains two entries: a list with the jump
locations and the last used jump position number in the list.
Each entry in the jump location list is a dictionary with
the following entries:
bufnr buffer number
col column number
coladd column offset for 'virtualedit'
filename filename if available
lnum line number
*getline()*
getline({lnum} [, {end}])
Without {end} the result is a String, which is line {lnum}
@@ -4809,17 +4882,37 @@ gettabwinvar({tabnr}, {winnr}, {varname} [, {def}]) *gettabwinvar()*
Examples: >
:let list_is_on = gettabwinvar(1, 2, '&list')
:echo "myvar = " . gettabwinvar(3, 1, 'myvar')
<
getwinpos([{timeout}]) *getwinpos()*
The result is a list with two numbers, the result of
getwinposx() and getwinposy() combined:
[x-pos, y-pos]
{timeout} can be used to specify how long to wait in msec for
a response from the terminal. When omitted 100 msec is used.
Use a longer time for a remote terminal.
When using a value less than 10 and no response is received
within that time, a previously reported position is returned,
if available. This can be used to poll for the position and
do some work in the mean time: >
while 1
let res = getwinpos(1)
if res[0] >= 0
break
endif
" Do some work here
endwhile
<
*getwinposx()*
getwinposx() The result is a Number, which is the X coordinate in pixels of
the left hand side of the GUI Vim window. Also works for an
xterm.
xterm (uses a timeout of 100 msec).
The result will be -1 if the information is not available.
The value can be used with `:winpos`.
*getwinposy()*
getwinposy() The result is a Number, which is the Y coordinate in pixels of
the top of the GUI Vim window. Also works for an xterm.
the top of the GUI Vim window. Also works for an xterm (uses
a timeout of 100 msec).
The result will be -1 if the information is not available.
The value can be used with `:winpos`.
@@ -5933,8 +6026,6 @@ matchaddpos({group}, {pos} [, {priority} [, {id} [, {dict}]]])
< Matches added by |matchaddpos()| are returned by
|getmatches()| with an entry "pos1", "pos2", etc., with the
value a list like the {pos} item.
These matches cannot be set via |setmatches()|, however they
can still be deleted by |clearmatches()|.
matcharg({nr}) *matcharg()*
Selects the {nr} match item, as set with a |:match|,
@@ -6523,7 +6614,7 @@ remote_expr({server}, {string} [, {idvar} [, {timeout}]])
between (not at the end), like with join(expr, "\n").
If {idvar} is present and not empty, it is taken as the name
of a variable and a {serverid} for later use with
remote_read() is stored there.
|remote_read()| is stored there.
If {timeout} is given the read times out after this many
seconds. Otherwise a timeout of 600 seconds is used.
See also |clientserver| |RemoteReply|.
@@ -8087,6 +8178,70 @@ tempname() *tempname()* *temp-file-name*
For MS-Windows forward slashes are used when the 'shellslash'
option is set or when 'shellcmdflag' starts with '-'.
*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 dashes.
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 'termsize'
"term_cols" horizontal size to use for the terminal,
instead of using 'termsize'
"vertical" split the window vertically
"curwin" use the current window, do not split the
window; fails if the current buffer
cannot be |abandon|ed
"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 {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.
@@ -8137,6 +8292,8 @@ term_getline({buf}, {row}) *term_getline()*
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()*
@@ -8222,6 +8379,28 @@ term_sendkeys({buf}, {keys}) *term_sendkeys()*
means the character CTRL-X.
{only available when compiled with the |+terminal| 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}, {expr}) *term_setsize()*
Not implemented yet.
{only available when compiled with the |+terminal| feature}
@@ -8265,6 +8444,10 @@ term_start({cmd}, {options}) *term_start()*
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
@@ -8478,6 +8661,22 @@ tr({src}, {fromstr}, {tostr}) *tr()*
echo tr("<blob>", "<>", "{}")
< returns "{blob}"
trim({text}[, {mask}]) *trim()*
Return {text} as a String where any character in {mask} is
removed from the beginning and end of {text}.
If {mask} is not given, {mask} is all characters up to 0x20,
which includes Tab, space, NL and CR, plus the non-breaking
space character 0xa0.
This code deals with multibyte characters properly.
Examples: >
echo trim(" some text ")
< returns "some text" >
echo trim(" \r\t\t\r RESERVE \t\n\x0B\xA0") . "_TAIL"
< returns "RESERVE_TAIL" >
echo trim("rm<Xrm<>X>rrm", "rm<>")
< returns "Xrm<>X" (characters in the middle are not removed)
trunc({expr}) *trunc()*
Return the largest integral value with magnitude less than or
equal to {expr} as a |Float| (truncate towards zero).
@@ -9056,6 +9255,8 @@ ttyout output is a terminal (tty)
unix Unix version of Vim. *+unix*
unnamedplus Compiled with support for "unnamedplus" in 'clipboard'
user_commands User-defined commands.
vcon Win32: Virtual console support is working, can use
'termguicolors'. Also see |+vtp|.
vertsplit Compiled with vertically split windows |:vsplit|.
vim_starting True while initial source'ing takes place. |startup|
*vim_starting*
@@ -9066,6 +9267,8 @@ visualextra Compiled with extra Visual mode commands.
|blockwise-operators|.
vms VMS version of Vim.
vreplace Compiled with |gR| and |gr| commands.
vtp Compiled for vcon support |+vtp| (check vcon to find
out if it works in the current console).
wildignore Compiled with 'wildignore' option.
wildmenu Compiled with 'wildmenu' option.
win32 Win32 version of Vim (MS-Windows 95 and later, 32 or
@@ -9304,8 +9507,7 @@ may be larger.
It is also possible to define a function without any arguments. You must
still supply the () then.
It is allowed to define another function inside a function
body.
It is allowed to define another function inside a function body.
*local-variables*
Inside a function local variables can be used. These will disappear when the

View File

@@ -1,4 +1,4 @@
*filetype.txt* For Vim version 8.0. Last change: 2017 Dec 05
*filetype.txt* For Vim version 8.0. Last change: 2018 Feb 04
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -602,51 +602,17 @@ MANPAGER *manpager.vim*
The :Man command allows you to turn Vim into a manpager (that syntax highlights
manpages and follows linked manpages on hitting CTRL-]).
Tested on:
- Linux
- Mac OS
- FreeBSD
- OpenBSD
- Cygwin
- Win 10 under Bash
Untested:
- Amiga OS
- BeOS
- OS/2
If man sets the $MAN_PN environment variable, like man-db, the most common
implementation on Linux, then the "env MAN_PN=1 " part below should NOT be
set, that is, the "env MAN_PN=1" should be omitted! Otherwise, the Vim
manpager does not correctly recognize manpages whose title contains a capital
letter. See the discussion on
https://groups.google.com/forum/#!topic/vim_dev/pWZmt_7GkxI
For bash,zsh,ksh or dash, add to the config file (.bashrc,.zshrc, ...)
export MANPAGER="env MAN_PN=1 vim -M +MANPAGER -"
export MANPAGER="vim -M +MANPAGER -"
For (t)csh, add to the config file
setenv MANPAGER "env MAN_PN=1 vim -M +MANPAGER -"
setenv MANPAGER "vim -M +MANPAGER -"
For fish, add to the config file
set -x MANPAGER "env MAN_PN=1 vim -M +MANPAGER -"
On OpenBSD:
export MANPAGER="env MAN_PN=1 vim -M +MANPAGER"
If you experience still issues on manpages whose titles do not contain capital
letters, then try adding MANPATH=${MANPATH} after MAN_PN=1. If your manpages do
not show up localized, then try adding, LANGUAGE=${LANG} after MAN_PN=1. See
https://github.com/vim/vim/issues/1002
set -x MANPAGER "vim -M +MANPAGER -"
PDF *ft-pdf-plugin*
@@ -669,7 +635,7 @@ By default the following options are set, in accordance with PEP8: >
setlocal expandtab shiftwidth=4 softtabstop=4 tabstop=8
To disable this behaviour, set the following variable in your vimrc: >
let g:python_recommended_style = 0

View File

@@ -1,4 +1,4 @@
*gui.txt* For Vim version 8.0. Last change: 2017 Nov 09
*gui.txt* For Vim version 8.0. Last change: 2018 Mar 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -134,7 +134,7 @@ task bar with the 'guiheadroom' option.
:winp[os]
Display current position of the top left corner of the GUI vim
window in pixels. Does not work in all versions.
Also see |getwinposx()| and |getwinposy()|.
Also see |getwinpos()|, |getwinposx()| and |getwinposy()|.
:winp[os] {X} {Y} *E466*
Put the GUI vim window at the given {X} and {Y} coordinates.
@@ -992,10 +992,14 @@ it behaves in a strange way.
:popu[p] {name} Popup the menu {name}. The menu named must
have at least one subentry, but need not
appear on the menu-bar (see |hidden-menus|).
{only available for Win32 and GTK GUI}
{only available for Win32 and GTK GUI or in
the terminal when compiled with +insert_expand}
:popu[p]! {name} Like above, but use the position of the mouse
pointer instead of the cursor.
In the terminal this is the last known
position, which is usually at the last click
or release (mouse movement is irrelevalt).
Example: >
:popup File
@@ -1006,6 +1010,10 @@ pointer if ! was used). >
:popup ]Toolbar
This creates a popup menu that doesn't exist on the main menu-bar.
Note that in the GUI the :popup command will return immediately, before a
selection has been made. In the terminal the commands waits for the user to
make a selection.
Note that a menu that starts with ']' will not be displayed.
==============================================================================

View File

@@ -1,4 +1,4 @@
*if_pyth.txt* For Vim version 8.0. Last change: 2018 Jan 28
*if_pyth.txt* For Vim version 8.0. Last change: 2018 Jan 30
VIM REFERENCE MANUAL by Paul Moore
@@ -823,14 +823,14 @@ To avoid loading the dynamic library, only check if Vim was compiled with
python support: >
if has('python_compiled')
echo 'compiled with Python 2.x support'
if has('python_dynamic
echo 'Python 2.x dynamically loaded
if has('python_dynamic')
echo 'Python 2.x dynamically loaded'
endif
endif
if has('python3_compiled')
echo 'compiled with Python 3.x support'
if has('python3_dynamic
echo 'Python 3.x dynamically loaded
if has('python3_dynamic')
echo 'Python 3.x dynamically loaded'
endif
endif

View File

@@ -1,4 +1,4 @@
*if_ruby.txt* For Vim version 8.0. Last change: 2016 Sep 01
*if_ruby.txt* For Vim version 8.0. Last change: 2018 Mar 15
VIM REFERENCE MANUAL by Shugo Maeda
@@ -221,6 +221,9 @@ for sure edit "gvim.exe" and search for "ruby\d*.dll\c".
If you want to build Vim with RubyInstaller 1.9 or 2.X using MSVC, you need
some tricks. See the src/INSTALLpc.txt for detail.
If Vim is built with RubyInstaller 2.4 or later, you may also need to add
"C:\Ruby<version>\bin\ruby_builtin_dlls" to the PATH environment variable.
Unix ~

View File

@@ -1,4 +1,4 @@
*insert.txt* For Vim version 8.0. Last change: 2018 Jan 26
*insert.txt* For Vim version 8.0. Last change: 2018 Feb 10
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1103,6 +1103,8 @@ items:
item with the same word is already present.
empty when non-zero this match will be added even when it is
an empty string
user_data custom data which is associated with the item and
available in |v:completed_item|
All of these except "icase", "dup" and "empty" must be a string. If an item
does not meet these requirements then an error message is given and further
@@ -1196,6 +1198,8 @@ The menu is used when:
The 'pumheight' option can be used to set a maximum height. The default is to
use all space available.
The 'pumwidth' option can be used to set a minimum width. The default is 15
characters.
There are three states:
1. A complete match has been inserted, e.g., after using CTRL-N or CTRL-P.

View File

@@ -1272,6 +1272,7 @@ By default, the arguments of user defined commands do not undergo completion.
However, by specifying one or the other of the following attributes, argument
completion can be enabled:
-complete=arglist file names in argument list
-complete=augroup autocmd groups
-complete=buffer buffer names
-complete=behave :behave suboptions

View File

@@ -1,4 +1,4 @@
*message.txt* For Vim version 8.0. Last change: 2017 Oct 14
*message.txt* For Vim version 8.0. Last change: 2018 Feb 04
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -76,7 +76,7 @@ See `:messages` above.
LIST OF MESSAGES
*E222* *E228* *E232* *E256* *E293* *E298* *E304* *E317*
*E318* *E356* *E438* *E439* *E440* *E316* *E320* *E322*
*E323* *E341* *E473* *E570* *E685* >
*E323* *E341* *E473* *E570* *E685* *E950* >
Add to read buffer
makemap: Illegal mode
Cannot create BalloonEval with both message and callback
@@ -97,6 +97,7 @@ LIST OF MESSAGES
Internal error
Internal error: {function}
fatal error in cs_manage_matches
Invalid count for del_bytes(): {N}
This is an internal error. If you can reproduce it, please send in a bug
report. |bugs|

View File

@@ -1,4 +1,4 @@
*options.txt* For Vim version 8.0. Last change: 2017 Dec 21
*options.txt* For Vim version 8.0. Last change: 2018 Mar 13
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -50,7 +50,7 @@ achieve special effects. These options come in three forms:
:se[t] {option}&vi Reset option to its Vi default value. {not in Vi}
:se[t] {option}&vim Reset option to its Vim default value. {not in Vi}
:se[t] all& Set all options to their default value. The values of
:se[t] all& Set all options to their default value. The values of
these options are not changed:
all terminal options, starting with t_
'columns'
@@ -402,8 +402,8 @@ Setting the filetype
used to set the option value in, unless this is a help
window, in which case the window below help window is
used (skipping the option-window).
{not available when compiled without the |+eval| or
|+autocmd| features}
{not available when compiled without the |+eval|
feature}
*$HOME*
Using "~" is like using "$HOME", but it is only recognized at the start of an
@@ -1325,7 +1325,7 @@ A jump table for the options with a short description can be found at |Q_op|.
characters. It permits dynamic French paragraph
indentation (negative) or emphasizing the line
continuation (positive).
sbr Display the 'showbreak' value before applying the
sbr Display the 'showbreak' value before applying the
additional indent.
The default value for min is 20 and shift is 0.
@@ -1385,8 +1385,7 @@ A jump table for the options with a short description can be found at |Q_op|.
written
nowrite buffer which will not be written
acwrite buffer which will always be written with BufWriteCmd
autocommands. {not available when compiled without the
|+autocmd| feature}
autocommands.
quickfix quickfix buffer, contains list of errors |:cwindow|
or list of locations |:lwindow|
help help buffer (you are not supposed to set this
@@ -1808,7 +1807,7 @@ A jump table for the options with a short description can be found at |Q_op|.
'copyindent' + off don't copy indent structure
'cpoptions' & (all flags) Vi-compatible flags
'cscopepathcomp'+ 0 don't show directories in tags list
'cscoperelative'+ off
'cscoperelative'+ off don't use basename of path as prefix
'cscopetag' + off don't use cscope for ":tag"
'cscopetagorder'+ 0 see |cscopetagorder|
'cscopeverbose' + off see |cscopeverbose|
@@ -2466,8 +2465,6 @@ A jump table for the options with a short description can be found at |Q_op|.
'cursorbind' 'crb' boolean (default off)
local to window
{not in Vi}
{not available when compiled without the |+cursorbind|
feature}
When this option is set, as the cursor in the current
window moves other cursorbound windows (windows that also have
this option set) move their cursors to the corresponding line and
@@ -2918,8 +2915,6 @@ A jump table for the options with a short description can be found at |Q_op|.
'eventignore' 'ei' string (default "")
global
{not in Vi}
{not available when compiled without the |+autocmd|
feature}
A list of autocommand event names, which are to be ignored.
When set to "all" or when "all" is one of the items, all autocommand
events are ignored, autocommands will not be executed.
@@ -3168,8 +3163,6 @@ A jump table for the options with a short description can be found at |Q_op|.
'filetype' 'ft' string (default: "")
local to buffer
{not in Vi}
{not available when compiled without the |+autocmd|
feature}
When this option is set, the FileType autocommand event is triggered.
All autocommands that match with the value of this option will be
executed. Thus the value of 'filetype' is used in place of the file
@@ -3468,7 +3461,7 @@ A jump table for the options with a short description can be found at |Q_op|.
when internal formatting is used. Make sure the cursor is kept in the
same spot relative to the text then! The |mode()| function will
return "i" or "R" in this situation.
When the expression evaluates to non-zero Vim will fall back to using
the internal format mechanism.
@@ -3852,7 +3845,14 @@ A jump table for the options with a short description can be found at |Q_op|.
To avoid problems with flags that are added in the future, use the
"+=" and "-=" feature of ":set" |add-option-flags|.
Valid letters are as follows:
Valid characters are as follows:
*'go-!'*
'!' External commands are executed in a terminal window. Without
this flag the MS-Windows GUI will open a console window to
execute the command. The Unix GUI will simulate a dumb
terminal to list the command output.
The terminal window will be positioned at the bottom, and grow
upwards as needed.
*guioptions_a* *'go-a'*
'a' Autoselect: If present, then whenever VISUAL mode is started,
or the Visual area extended, Vim tries to become the owner of
@@ -5114,8 +5114,8 @@ A jump table for the options with a short description can be found at |Q_op|.
global or local to buffer |global-local|
{not in Vi}
Program to use for the ":make" command. See |:make_makeprg|.
This option may contain '%' and '#' characters (see |:_%| and |:_#|),
which are expanded to the current and alternate file name. Use |::S|
This option may contain '%' and '#' characters (see |:_%| and |:_#|),
which are expanded to the current and alternate file name. Use |::S|
to escape file names in case they contain special characters.
Environment variables are expanded |:set_env|. See |option-backslash|
about including spaces and backslashes.
@@ -5203,8 +5203,11 @@ A jump table for the options with a short description can be found at |Q_op|.
{not in Vi}
Maximum amount of memory (in Kbyte) to use for one buffer. When this
limit is reached allocating extra memory for a buffer will cause
other memory to be freed. The maximum usable value is about 2000000.
Use this to work without a limit. Also see 'maxmemtot'.
other memory to be freed.
The maximum usable value is about 2000000. Use this to work without a
limit.
The value is ignored when 'swapfile' is off.
Also see 'maxmemtot'.
*'maxmempattern'* *'mmp'*
'maxmempattern' 'mmp' number (default 1000)
@@ -5233,6 +5236,8 @@ A jump table for the options with a short description can be found at |Q_op|.
need more than 2 Gbyte for text editing? Keep in mind that text is
stored in the swap file, one can edit files > 2 Gbyte anyway. We do
need the memory to store undo info.
Buffers with 'swapfile' off still count to the total amount of memory
used.
Also see 'maxmem'.
*'menuitems'* *'mis'*
@@ -5329,6 +5334,8 @@ A jump table for the options with a short description can be found at |Q_op|.
an explanation.
When 'buftype' is "nowrite" or "nofile" this option may be set, but
will be ignored.
Note that the text may actually be the same, e.g. 'modified' is set
when using "rA" on an "A".
*'more'* *'nomore'*
'more' boolean (Vim default: on, Vi default: off)
@@ -5417,6 +5424,8 @@ A jump table for the options with a short description can be found at |Q_op|.
In the "popup" model the right mouse button produces a pop-up menu.
You need to define this first, see |popup-menu|.
In a terminal the popup menu works if Vim is compiled with the
|+insert_expand| option.
Note that you can further refine the meaning of buttons with mappings.
See |gui-mouse-mapping|. But mappings are NOT used for modeless
@@ -5955,6 +5964,15 @@ A jump table for the options with a short description can be found at |Q_op|.
Insert mode completion. When zero as much space as available is used.
|ins-completion-menu|.
*'pumwidth'* *'pw'*
'pumwidth' 'pw' number (default 15)
global
{not available when compiled without the
|+insert_expand| feature}
{not in Vi}
Determines the minimum width to use for the popup menu for Insert mode
completion. |ins-completion-menu|.
*'pythondll'*
'pythondll' string (default depends on the build)
global
@@ -5965,6 +5983,20 @@ A jump table for the options with a short description can be found at |Q_op|.
DYNAMIC_PYTHON_DLL, which was specified at compile time.
Environment variables are expanded |:set_env|.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
*'pythonhome'*
'pythonhome' string (default "")
global
{not in Vi}
{only available when compiled with the |+python/dyn|
feature}
Specifies the name of the Python 2.x home directory. When 'pythonhome'
and the PYTHONHOME environment variable are not set, PYTHON_HOME,
which was specified at compile time, will be used for the Python 2.x
home directory.
Environment variables are expanded |:set_env|.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
*'pythonthreedll'*
@@ -5977,6 +6009,20 @@ A jump table for the options with a short description can be found at |Q_op|.
DYNAMIC_PYTHON3_DLL, which was specified at compile time.
Environment variables are expanded |:set_env|.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
*'pythonthreehome'*
'pythonthreehome' string (default "")
global
{not in Vi}
{only available when compiled with the |+python3/dyn|
feature}
Specifies the name of the Python 3 home directory. When
'pythonthreehome' and the PYTHONHOME environment variable are not set,
PYTHON3_HOME, which was specified at compile time, will be used for
the Python 3 home directory.
Environment variables are expanded |:set_env|.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
*'pyxversion'* *'pyx'*
@@ -6080,7 +6126,7 @@ A jump table for the options with a short description can be found at |Q_op|.
characters are put before the number.
See |hl-LineNr| and |hl-CursorLineNr| for the highlighting used for
the number.
The number in front of the cursor line also depends on the value of
'number', see |number_relativenumber| for all combinations of the two
options.
@@ -6122,7 +6168,7 @@ A jump table for the options with a short description can be found at |Q_op|.
geom pixelGeometry int 0 - 2 (see below)
renmode renderingMode int 0 - 6 (see below)
taamode textAntialiasMode int 0 - 3 (see below)
scrlines Scroll Lines int >= 0 (see below)
scrlines Scroll Lines int (deprecated)
See this URL for detail (except for scrlines):
https://msdn.microsoft.com/en-us/library/dd368190.aspx
@@ -6156,23 +6202,9 @@ A jump table for the options with a short description can be found at |Q_op|.
See this URL for detail:
https://msdn.microsoft.com/en-us/library/dd368170.aspx
For scrlines: threshold for lines to be scrolled.
0 - Always use scrolling. (default)
1 - Use full page redrawing.
> 1 - If the lines to be scrolled is grater or equal to the
specified value, use redrawing. Otherwise use
scrolling.
If you feel scrolling a page (CTRL-F) is too slow with DirectX
renderer, try this "scrlines" option.
When set it "1", Vim uses full page redrawing instead of
scrolling. Redrawing a page is faster than scrolling a
page in some environments.
After that, when you feel scrolling lines (CTRL-Y) becomes
slow, please try "2" or greater value for this option.
It works threshold line number to switch scrolling to
redrawing. Scrolling a few lines might be faster than
redrawing a page in some environments.
For scrlines:
This was used for optimizing scrolling behavior, however this
is now deprecated. If specified, it is simply ignored.
Example: >
set encoding=utf-8
@@ -6413,6 +6445,8 @@ A jump table for the options with a short description can be found at |Q_op|.
to find files which replace a distributed runtime files. You can put
a directory after $VIMRUNTIME to find files which add to distributed
runtime files.
When Vim is started with |--clean| the home directory entries are not
included.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
@@ -6431,8 +6465,6 @@ A jump table for the options with a short description can be found at |Q_op|.
'scrollbind' 'scb' boolean (default off)
local to window
{not in Vi}
{not available when compiled without the |+scrollbind|
feature}
See also |scroll-binding|. When this option is set, the current
window scrolls as other scrollbind windows (windows that also have
this option set) scroll. This option is useful for viewing the
@@ -6470,8 +6502,6 @@ A jump table for the options with a short description can be found at |Q_op|.
*'scrollopt'* *'sbo'*
'scrollopt' 'sbo' string (default "ver,jump")
global
{not available when compiled without the |+scrollbind|
feature}
{not in Vi}
This is a comma-separated list of words that specifies how
'scrollbind' windows should behave. 'sbo' stands for ScrollBind
@@ -6561,7 +6591,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'sessionoptions'* *'ssop'*
'sessionoptions' 'ssop' string (default: "blank,buffers,curdir,folds,
help,options,tabpages,winsize")
help,options,tabpages,winsize,terminal")
global
{not in Vi}
{not available when compiled without the |+mksession|
@@ -6593,6 +6623,7 @@ A jump table for the options with a short description can be found at |Q_op|.
tabpages all tab pages; without this only the current tab page
is restored, so that you can make a session for each
tab page separately
terminal include terminal windows where the command can be restored
unix with Unix end-of-line format (single <NL>), even when
on Windows or DOS
winpos position of the whole Vim window
@@ -6616,14 +6647,21 @@ A jump table for the options with a short description can be found at |Q_op|.
It is allowed to give an argument to the command, e.g. "csh -f".
See |option-backslash| about including spaces and backslashes.
Environment variables are expanded |:set_env|.
If the name of the shell contains a space, you might need to enclose
it in quotes. Example: >
it in quotes or escape the space. Example with quotes: >
:set shell=\"c:\program\ files\unix\sh.exe\"\ -f
< Note the backslash before each quote (to avoid starting a comment) and
each space (to avoid ending the option value). Also note that the
"-f" is not inside the quotes, because it is not part of the command
name. And Vim automagically recognizes the backslashes that are path
name. Vim automagically recognizes the backslashes that are path
separators.
Example with escaped space (Vim will do this when initializing the
option from $SHELL): >
:set shell=/bin/with\\\ space/sh
< The resulting value of 'shell' is "/bin/with\ space/sh", two
backslashes are consumed by `:set`.
Under MS-Windows, when the executable ends in ".com" it must be
included. Thus setting the shell to "command.com" or "4dos.com"
works, but "command" and "4dos" do not work for all commands (e.g.,
@@ -7381,7 +7419,6 @@ A jump table for the options with a short description can be found at |Q_op|.
W F Preview window flag, text is ",PRV".
y F Type of file in the buffer, e.g., "[vim]". See 'filetype'.
Y F Type of file in the buffer, e.g., ",VIM". See 'filetype'.
{not available when compiled without |+autocmd| feature}
q S "[Quickfix List]", "[Location List]" or empty.
k S Value of "b:keymap_name" or 'keymap' when |:lmap| mappings are
being used: "<keymap>"
@@ -7526,6 +7563,7 @@ A jump table for the options with a short description can be found at |Q_op|.
Also see |swap-file| and |'swapsync'|.
If you want to open a new buffer without creating a swap file for it,
use the |:noswapfile| modifier.
See 'directory' for where the swap file is created.
This option is used together with 'bufhidden' and 'buftype' to
specify special kinds of buffers. See |special-buffers|.
@@ -7872,17 +7910,24 @@ A jump table for the options with a short description can be found at |Q_op|.
:set encoding=utf-8
< You need to do this when your system has no locale support for UTF-8.
*'termguicolors'* *'tgc'*
*'termguicolors'* *'tgc'* *E954*
'termguicolors' 'tgc' boolean (default off)
global
{not in Vi}
{not available when compiled without the
|+termguicolors| feature}
When on, uses |highlight-guifg| and |highlight-guibg| attributes in
the terminal (thus using 24-bit color). Requires a ISO-8613-3
compatible terminal.
If setting this option does not work (produces a colorless UI)
reading |xterm-true-color| might help.
the terminal (thus using 24-bit color).
Requires a ISO-8613-3 compatible terminal. If setting this option
does not work (produces a colorless UI) reading |xterm-true-color|
might help.
For Win32 console, Windows 10 version 1703 (Creators Update) or later
is required. Use this check to find out: >
if has('vcon')
< This requires Vim to be built with the |+vtp| feature.
Note that the "cterm" attributes are still used, not the "gui" ones.
NOTE: This option is reset when 'compatible' is set.
@@ -7969,7 +8014,7 @@ A jump table for the options with a short description can be found at |Q_op|.
non-keyword characters (white space is preferred). Maximum line
length is 510 bytes.
To obtain a file to be used here, check out this ftp site:
[Sorry this link doesn't work anymore, do you know the right one?]
[Sorry this link doesn't work anymore, do you know the right one?]
ftp://ftp.ox.ac.uk/pub/wordlists/ First get the README file.
To include a comma in a file name precede it with a backslash. Spaces
after a comma are ignored, otherwise spaces are included in the file

View File

@@ -1,4 +1,4 @@
*pattern.txt* For Vim version 8.0. Last change: 2017 Jun 05
*pattern.txt* For Vim version 8.0. Last change: 2018 Mar 13
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -905,7 +905,7 @@ $ At end of pattern or in front of "\|", "\)" or "\n" ('magic' on):
becomes invalid. Vim doesn't automatically update the matches.
Similar to moving the cursor for "\%#" |/\%#|.
*/\%l* */\%>l* */\%<l*
*/\%l* */\%>l* */\%<l* *E951*
\%23l Matches in a specific line.
\%<23l Matches above a specific line (lower line number).
\%>23l Matches below a specific line (higher line number).
@@ -1166,7 +1166,8 @@ x A single character, with no special meaning, matches itself
- Matching with a collection can be slow, because each character in
the text has to be compared with each character in the collection.
Use one of the other atoms above when possible. Example: "\d" is
much faster than "[0-9]" and matches the same characters.
much faster than "[0-9]" and matches the same characters. However,
the new |NFA| regexp engine deals with this better than the old one.
*/\%[]* *E69* *E70* *E369*
\%[] A sequence of optionally matched atoms. This always matches.

View File

@@ -1,4 +1,4 @@
*quickfix.txt* For Vim version 8.0. Last change: 2017 Dec 13
*quickfix.txt* For Vim version 8.0. Last change: 2018 Mar 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -330,9 +330,9 @@ deleted for some reason, the message "line changed" is shown to warn you that
the error location may not be correct. If you quit Vim and start again the
marks are lost and the error locations may not be correct anymore.
If vim is built with |+autocmd| support, two autocommands are available for
running commands before and after a quickfix command (':make', ':grep' and so
on) is executed. See |QuickFixCmdPre| and |QuickFixCmdPost| for details.
Two autocommands are available for running commands before and after a
quickfix command (':make', ':grep' and so on) is executed. See
|QuickFixCmdPre| and |QuickFixCmdPost| for details.
*QuickFixCmdPost-example*
When 'encoding' differs from the locale, the error messages may have a
@@ -419,8 +419,7 @@ EXECUTE A COMMAND IN ALL THE BUFFERS IN QUICKFIX OR LOCATION LIST:
autocommand event is disabled by adding it to
'eventignore'. This considerably speeds up editing
each buffer.
{not in Vi} {not available when compiled without the
|+listcmds| feature}
{not in Vi}
Also see |:bufdo|, |:tabdo|, |:argdo|, |:windo|,
|:ldo|, |:cfdo| and |:lfdo|.
@@ -433,8 +432,7 @@ EXECUTE A COMMAND IN ALL THE BUFFERS IN QUICKFIX OR LOCATION LIST:
:{cmd}
etc.
< Otherwise it works the same as `:cdo`.
{not in Vi} {not available when compiled without the
|+listcmds| feature}
{not in Vi}
*:ldo*
:ld[o][!] {cmd} Execute {cmd} in each valid entry in the location list
@@ -447,8 +445,7 @@ EXECUTE A COMMAND IN ALL THE BUFFERS IN QUICKFIX OR LOCATION LIST:
etc.
< Only valid entries in the location list are used.
Otherwise it works the same as `:cdo`.
{not in Vi} {not available when compiled without the
|+listcmds| feature}
{not in Vi}
*:lfdo*
:lfdo[!] {cmd} Execute {cmd} in each file in the location list for
@@ -460,8 +457,7 @@ EXECUTE A COMMAND IN ALL THE BUFFERS IN QUICKFIX OR LOCATION LIST:
:{cmd}
etc.
< Otherwise it works the same as `:ldo`.
{not in Vi} {not available when compiled without the
|+listcmds| feature}
{not in Vi}
=============================================================================
2. The error window *quickfix-window*
@@ -657,8 +653,8 @@ To get the number of the current list in the stack: >
4. Using :make *:make_makeprg*
*:mak* *:make*
:mak[e][!] [arguments] 1. If vim was built with |+autocmd|, all relevant
|QuickFixCmdPre| autocommands are executed.
:mak[e][!] [arguments] 1. All relevant |QuickFixCmdPre| autocommands are
executed.
2. If the 'autowrite' option is on, write any changed
buffers
3. An errorfile name is made from 'makeef'. If
@@ -670,9 +666,8 @@ To get the number of the current list in the stack: >
errorfile (for Unix it is also echoed on the
screen).
5. The errorfile is read using 'errorformat'.
6. If vim was built with |+autocmd|, all relevant
|QuickFixCmdPost| autocommands are executed.
See example below.
6. All relevant |QuickFixCmdPost| autocommands are
executed. See example below.
7. If [!] is not given the first error is jumped to.
8. The errorfile is deleted.
9. You can now move through the errors with commands

View File

@@ -1,4 +1,4 @@
*quickref.txt* For Vim version 8.0. Last change: 2017 Nov 21
*quickref.txt* For Vim version 8.0. Last change: 2018 Feb 11
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -838,8 +838,11 @@ Short explanation of each option: *option-list*
'printoptions' 'popt' controls the format of :hardcopy output
'prompt' 'prompt' enable prompt in Ex mode
'pumheight' 'ph' maximum height of the popup menu
'pumwidth' 'pw' minimum width of the popup menu
'pythondll' name of the Python 2 dynamic library
'pythonhome' name of the Python 2 home directory
'pythonthreedll' name of the Python 3 dynamic library
'pythonthreehome' name of the Python 3 home directory
'pyxversion' 'pyx' Python version used for pyx* commands
'quoteescape' 'qe' escape characters used in a string
'readonly' 'ro' disallow writing the buffer

View File

@@ -1,4 +1,4 @@
*quotes.txt* For Vim version 8.0. Last change: 2010 Nov 03
*quotes.txt* For Vim version 8.0. Last change: 2018 Mar 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -18,7 +18,7 @@ Coming with a very GUI mindset from Windows, I always thought of people using
Vi as some kind of outer space alien in human clothes. Once I tried I really
got addicted by its power and now I found myself typing Vim keypresses in the
oddest places! That's why I would like to see Vim embedded in every
application which deals with text editing. (Jos<EFBFBD> Fonseca)
application which deals with text editing. (José Fonseca)
I was a 12-year emacs user who switched to Vim about a year ago after finally
giving up on the multiple incompatible versions, flaky contributed packages,

View File

@@ -1,4 +1,4 @@
*repeat.txt* For Vim version 8.0. Last change: 2017 Dec 17
*repeat.txt* For Vim version 8.0. Last change: 2018 Mar 04
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -265,6 +265,7 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
loaded during initialization, see |load-plugins|.
Also see |pack-add|.
{only available when compiled with +eval}
*:packl* *:packloadall*
:packl[oadall][!] Load all packages in the "start" directory under each
@@ -288,6 +289,7 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
An error only causes sourcing the script where it
happens to be aborted, further plugins will be loaded.
See |packages|.
{only available when compiled with +eval}
:scripte[ncoding] [encoding] *:scripte* *:scriptencoding* *E167*
Specify the character encoding used in the script.
@@ -806,6 +808,19 @@ DEFINING BREAKPOINTS
< Note that this only works for commands that are executed when
sourcing the file, not for a function defined in that file.
:breaka[dd] expr {expression}
Sets a breakpoint, that will break whenever the {expression}
evaluates to a different value. Example: >
:breakadd expr g:lnum
< Will break, whenever the global variable lnum changes.
Note if you watch a |script-variable| this will break
when switching scripts, since the script variable is only
valid in the script where it has been defined and if that
script is called from several other scripts, this will stop
whenever that particular variable will become visible or
unaccessible again.
The [lnum] is the line number of the breakpoint. Vim will stop at or after
this line. When omitted line 1 is used.

View File

@@ -1,4 +1,4 @@
*spell.txt* For Vim version 8.0. Last change: 2017 Oct 26
*spell.txt* For Vim version 8.0. Last change: 2018 Mar 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -907,9 +907,9 @@ when using "cp1250" on Unix.
*spell-LOW* *spell-UPP*
Three lines in the affix file are needed. Simplistic example:
FOL <EFBFBD><EFBFBD><EFBFBD> ~
LOW <EFBFBD><EFBFBD><EFBFBD> ~
UPP <EFBFBD><EFBFBD><EFBFBD> ~
FOL áëñ ~
LOW áëñ ~
UPP ÁËÑ ~
All three lines must have exactly the same number of characters.
@@ -924,9 +924,9 @@ The "UPP" line specifies the characters with upper-case. That is, a character
is upper-case where it's different from the character at the same position in
"FOL".
An exception is made for the German sharp s <EFBFBD>. The upper-case version is
An exception is made for the German sharp s ß. The upper-case version is
"SS". In the FOL/LOW/UPP lines it should be included, so that it's recognized
as a word character, but use the <EFBFBD> character in all three.
as a word character, but use the ß character in all three.
ASCII characters should be omitted, Vim always handles these in the same way.
When the encoding is UTF-8 no word characters need to be specified.
@@ -1397,7 +1397,7 @@ suggestions would spend most time trying all kind of weird compound words.
*spell-SYLLABLE*
The SYLLABLE item defines characters or character sequences that are used to
count the number of syllables in a word. Example:
SYLLABLE a<EFBFBD>e<EFBFBD>i<EFBFBD>o<EFBFBD><EFBFBD><EFBFBD>u<EFBFBD><EFBFBD><EFBFBD>y/aa/au/ea/ee/ei/ie/oa/oe/oo/ou/uu/ui ~
SYLLABLE aáeéiíoóöõuúüûy/aa/au/ea/ee/ei/ie/oa/oe/oo/ou/uu/ui ~
Before the first slash is the set of characters that are counted for one
syllable, also when repeated and mixed, until the next character that is not
@@ -1478,8 +1478,8 @@ alike. This is mostly used for a letter with different accents. This is used
to prefer suggestions with these letters substituted. Example:
MAP 2 ~
MAP e<EFBFBD><EFBFBD><EFBFBD><EFBFBD> ~
MAP u<EFBFBD><EFBFBD><EFBFBD><EFBFBD> ~
MAP eéëêè ~
MAP uüùúû ~
The first line specifies the number of MAP lines following. Vim ignores the
number, but the line must be there.

View File

@@ -1,4 +1,4 @@
*starting.txt* For Vim version 8.0. Last change: 2018 Jan 27
*starting.txt* For Vim version 8.0. Last change: 2018 Mar 14
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -510,12 +510,14 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
{not in Vi}
*--clean*
--clean Equal to "-u DEFAULTS -i NONE":
--clean Equal to "-u DEFAULTS -U NONE -i NONE":
- initializations from files and environment variables is
skipped
- the |defaults.vim| script is loaded, which implies
'nocompatible': use Vim defaults
- no |gvimrc| script is loaded
- no viminfo file is read or written
- the home directory is excluded from 'runtimepath'
*-x*
-x Use encryption to read/write files. Will prompt for a key,
which is then stored in the 'key' option. All writes will
@@ -1010,14 +1012,13 @@ Vi compatible default value ~
When Vim starts, the 'compatible' option is on. This will be used when Vim
starts its initializations. But as soon as:
- a user vimrc file is found, or
- a vimrc file in the current directory, or
- a vimrc file in the current directory is found, or
- the "VIMINIT" environment variable is set, or
- the "-N" command line argument is given, or
- the "--clean" command line argument is given, or
even when no vimrc file exists.
- the |defaults.vim| script is loaded, or
- gvimrc file was found,
then it will be set to 'nocompatible'.
- a gvimrc file was found,
then the option will be set to 'nocompatible'.
Note that this does NOT happen when a system-wide vimrc file was found.

View File

@@ -1,4 +1,4 @@
*syntax.txt* For Vim version 8.0. Last change: 2018 Jan 27
*syntax.txt* For Vim version 8.0. Last change: 2018 Jan 31
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -2779,13 +2779,10 @@ Ruby syntax will perform spellchecking of strings if you define
SCHEME *scheme.vim* *ft-scheme-syntax*
By default only R5RS keywords are highlighted and properly indented.
By default only R7RS keywords are highlighted and properly indented.
MzScheme-specific stuff will be used if b:is_mzscheme or g:is_mzscheme
variables are defined.
Also scheme.vim supports keywords of the Chicken Scheme->C compiler. Define
b:is_chicken or g:is_chicken, if you need them.
scheme.vim also supports extensions of the CHICKEN Scheme->C compiler.
Define b:is_chicken or g:is_chicken, if you need them.
SDL *sdl.vim* *ft-sdl-syntax*

View File

@@ -1,4 +1,4 @@
*tabpage.txt* For Vim version 8.0. Last change: 2016 Oct 20
*tabpage.txt* For Vim version 8.0. Last change: 2018 Mar 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -286,8 +286,7 @@ LOOPING OVER TAB PAGES:
current tab page.
{cmd} can contain '|' to concatenate several commands.
{cmd} must not open or close tab pages or reorder them.
{not in Vi} {not available when compiled without the
|+listcmds| feature}
{not in Vi}
Also see |:windo|, |:argdo|, |:bufdo|, |:cdo|, |:ldo|, |:cfdo|
and |:lfdo|

View File

@@ -294,6 +294,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
'gfw' options.txt /*'gfw'*
'ghr' options.txt /*'ghr'*
'go' options.txt /*'go'*
'go-!' options.txt /*'go-!'*
'go-A' options.txt /*'go-A'*
'go-F' options.txt /*'go-F'*
'go-L' options.txt /*'go-L'*
@@ -782,10 +783,14 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
'prompt' options.txt /*'prompt'*
'pt' options.txt /*'pt'*
'pumheight' options.txt /*'pumheight'*
'pumwidth' options.txt /*'pumwidth'*
'pvh' options.txt /*'pvh'*
'pvw' options.txt /*'pvw'*
'pw' options.txt /*'pw'*
'pythondll' options.txt /*'pythondll'*
'pythonhome' options.txt /*'pythonhome'*
'pythonthreedll' options.txt /*'pythonthreedll'*
'pythonthreehome' options.txt /*'pythonthreehome'*
'pyx' options.txt /*'pyx'*
'pyxversion' options.txt /*'pyxversion'*
'qe' options.txt /*'qe'*
@@ -1353,6 +1358,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
+visual various.txt /*+visual*
+visualextra various.txt /*+visualextra*
+vreplace various.txt /*+vreplace*
+vtp various.txt /*+vtp*
+wildignore various.txt /*+wildignore*
+wildmenu various.txt /*+wildmenu*
+windows various.txt /*+windows*
@@ -3664,6 +3670,7 @@ Cmd-event autocmd.txt /*Cmd-event*
CmdUndefined autocmd.txt /*CmdUndefined*
Cmdline cmdline.txt /*Cmdline*
Cmdline-mode cmdline.txt /*Cmdline-mode*
CmdlineChanged autocmd.txt /*CmdlineChanged*
CmdlineEnter autocmd.txt /*CmdlineEnter*
CmdlineLeave autocmd.txt /*CmdlineLeave*
CmdwinEnter autocmd.txt /*CmdwinEnter*
@@ -3688,6 +3695,7 @@ Dictionaries eval.txt /*Dictionaries*
Dictionary eval.txt /*Dictionary*
Dictionary-function eval.txt /*Dictionary-function*
Digraphs digraph.txt /*Digraphs*
DirChanged autocmd.txt /*DirChanged*
E motion.txt /*E*
E10 message.txt /*E10*
E100 diff.txt /*E100*
@@ -4577,6 +4585,11 @@ E947 terminal.txt /*E947*
E948 terminal.txt /*E948*
E949 editing.txt /*E949*
E95 message.txt /*E95*
E950 message.txt /*E950*
E951 pattern.txt /*E951*
E952 autocmd.txt /*E952*
E953 eval.txt /*E953*
E954 options.txt /*E954*
E96 diff.txt /*E96*
E97 diff.txt /*E97*
E98 diff.txt /*E98*
@@ -4588,6 +4601,7 @@ EncodingChanged autocmd.txt /*EncodingChanged*
Eterm syntax.txt /*Eterm*
Ex intro.txt /*Ex*
Ex-mode intro.txt /*Ex-mode*
ExitPre autocmd.txt /*ExitPre*
Exuberant_ctags tagsrch.txt /*Exuberant_ctags*
F motion.txt /*F*
FALSE eval.txt /*FALSE*
@@ -4818,8 +4832,10 @@ Tcl if_tcl.txt /*Tcl*
TermChanged autocmd.txt /*TermChanged*
TermResponse autocmd.txt /*TermResponse*
Terminal-mode terminal.txt /*Terminal-mode*
TerminalOpen autocmd.txt /*TerminalOpen*
TextChanged autocmd.txt /*TextChanged*
TextChangedI autocmd.txt /*TextChangedI*
TextChangedP autocmd.txt /*TextChangedP*
TextYankPost autocmd.txt /*TextYankPost*
Transact-SQL ft_sql.txt /*Transact-SQL*
U undo.txt /*U*
@@ -5080,7 +5096,9 @@ asin() eval.txt /*asin()*
asm.vim syntax.txt /*asm.vim*
asm68k syntax.txt /*asm68k*
asmh8300.vim syntax.txt /*asmh8300.vim*
assert_beeps() eval.txt /*assert_beeps()*
assert_equal() eval.txt /*assert_equal()*
assert_equalfile() eval.txt /*assert_equalfile()*
assert_exception() eval.txt /*assert_exception()*
assert_fails() eval.txt /*assert_fails()*
assert_false() eval.txt /*assert_false()*
@@ -6555,6 +6573,7 @@ get-ms-debuggers debug.txt /*get-ms-debuggers*
getbufinfo() eval.txt /*getbufinfo()*
getbufline() eval.txt /*getbufline()*
getbufvar() eval.txt /*getbufvar()*
getchangelist() eval.txt /*getchangelist()*
getchar() eval.txt /*getchar()*
getcharmod() eval.txt /*getcharmod()*
getcharsearch() eval.txt /*getcharsearch()*
@@ -6570,6 +6589,7 @@ getfperm() eval.txt /*getfperm()*
getfsize() eval.txt /*getfsize()*
getftime() eval.txt /*getftime()*
getftype() eval.txt /*getftype()*
getjumplist() eval.txt /*getjumplist()*
getlatestvimscripts-install pi_getscript.txt /*getlatestvimscripts-install*
getline() eval.txt /*getline()*
getloclist() eval.txt /*getloclist()*
@@ -6589,6 +6609,7 @@ gettabinfo() eval.txt /*gettabinfo()*
gettabvar() eval.txt /*gettabvar()*
gettabwinvar() eval.txt /*gettabwinvar()*
getwininfo() eval.txt /*getwininfo()*
getwinpos() eval.txt /*getwinpos()*
getwinposx() eval.txt /*getwinposx()*
getwinposy() eval.txt /*getwinposy()*
getwinvar() eval.txt /*getwinvar()*
@@ -8894,6 +8915,9 @@ term++open terminal.txt /*term++open*
term-dependent-settings term.txt /*term-dependent-settings*
term-list syntax.txt /*term-list*
term.txt term.txt /*term.txt*
term_dumpdiff() eval.txt /*term_dumpdiff()*
term_dumpload() eval.txt /*term_dumpload()*
term_dumpwrite() eval.txt /*term_dumpwrite()*
term_getaltscreen() eval.txt /*term_getaltscreen()*
term_getattr() eval.txt /*term_getattr()*
term_getcursor() eval.txt /*term_getcursor()*
@@ -8907,6 +8931,8 @@ term_gettty() eval.txt /*term_gettty()*
term_list() eval.txt /*term_list()*
term_scrape() eval.txt /*term_scrape()*
term_sendkeys() eval.txt /*term_sendkeys()*
term_setkill() eval.txt /*term_setkill()*
term_setrestore() eval.txt /*term_setrestore()*
term_setsize() eval.txt /*term_setsize()*
term_start() eval.txt /*term_start()*
term_wait() eval.txt /*term_wait()*
@@ -8924,10 +8950,18 @@ termdebug-example terminal.txt /*termdebug-example*
termdebug-starting terminal.txt /*termdebug-starting*
termdebug-stepping terminal.txt /*termdebug-stepping*
termdebug-variables terminal.txt /*termdebug-variables*
termdebug_popup terminal.txt /*termdebug_popup*
termdebug_wide terminal.txt /*termdebug_wide*
terminal terminal.txt /*terminal*
terminal-api terminal.txt /*terminal-api*
terminal-client-server terminal.txt /*terminal-client-server*
terminal-colors os_unix.txt /*terminal-colors*
terminal-communication terminal.txt /*terminal-communication*
terminal-cursor-style terminal.txt /*terminal-cursor-style*
terminal-debug terminal.txt /*terminal-debug*
terminal-diff terminal.txt /*terminal-diff*
terminal-diffscreendump terminal.txt /*terminal-diffscreendump*
terminal-dumptest terminal.txt /*terminal-dumptest*
terminal-functions usr_41.txt /*terminal-functions*
terminal-info term.txt /*terminal-info*
terminal-key-codes term.txt /*terminal-key-codes*
@@ -8935,9 +8969,12 @@ terminal-ms-windows terminal.txt /*terminal-ms-windows*
terminal-options term.txt /*terminal-options*
terminal-output-codes term.txt /*terminal-output-codes*
terminal-resizing terminal.txt /*terminal-resizing*
terminal-screendump terminal.txt /*terminal-screendump*
terminal-session terminal.txt /*terminal-session*
terminal-size-color terminal.txt /*terminal-size-color*
terminal-special-keys terminal.txt /*terminal-special-keys*
terminal-testing terminal.txt /*terminal-testing*
terminal-to-job terminal.txt /*terminal-to-job*
terminal-typing terminal.txt /*terminal-typing*
terminal-unix terminal.txt /*terminal-unix*
terminal-use terminal.txt /*terminal-use*
@@ -9009,6 +9046,7 @@ tolower() eval.txt /*tolower()*
toolbar-icon gui.txt /*toolbar-icon*
toupper() eval.txt /*toupper()*
tr() eval.txt /*tr()*
trim() eval.txt /*trim()*
trojan-horse starting.txt /*trojan-horse*
true-variable eval.txt /*true-variable*
trunc() eval.txt /*trunc()*

View File

@@ -1,4 +1,4 @@
*terminal.txt* For Vim version 8.0. Last change: 2018 Jan 28
*terminal.txt* For Vim version 8.0. Last change: 2018 Mar 26
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -7,36 +7,42 @@
Terminal window support *terminal*
WARNING: THIS IS ONLY PARTLY IMPLEMENTED, ANYTHING CAN STILL CHANGE
The terminal feature is optional, use this to check if your Vim has it: >
echo has('terminal')
If the result is "1" you have it.
1. Basic use |terminal-use|
Typing |terminal-typing|
Size and color |terminal-size-color|
Syntax |:terminal|
Resizing |terminal-resizing|
Terminal Modes |Terminal-mode|
Cursor style |terminal-cursor-style|
Special keys |terminal-special-keys|
Unix |terminal-unix|
MS-Windows |terminal-ms-windows|
2. Remote testing |terminal-testing|
3. Debugging |terminal-debug|
Starting |termdebug-starting|
Example session |termdebug-example|
Stepping through code |termdebug-stepping|
Inspecting variables |termdebug-variables|
Other commands |termdebug-commands|
Communication |termdebug-communication|
Customizing |termdebug-customizing|
1. Basic use |terminal-use|
Typing |terminal-typing|
Size and color |terminal-size-color|
Syntax |:terminal|
Resizing |terminal-resizing|
Terminal Modes |Terminal-mode|
Cursor style |terminal-cursor-style|
Special keys |terminal-special-keys|
Session |terminal-session|
Unix |terminal-unix|
MS-Windows |terminal-ms-windows|
2. Terminal communication |terminal-communication|
Vim to job: term_sendkeys() |terminal-to-job|
Job to Vim: JSON API |terminal-api|
Using the client-server feature |terminal-client-server|
3. Remote testing |terminal-testing|
4. Diffing screen dumps |terminal-diff|
Writing a screen dump test for Vim |terminal-dumptest|
Creating a screen dump |terminal-screendump|
Comparing screen dumps |terminal-diffscreendump|
5. Debugging |terminal-debug|
Starting |termdebug-starting|
Example session |termdebug-example|
Stepping through code |termdebug-stepping|
Inspecting variables |termdebug-variables|
Other commands |termdebug-commands|
Communication |termdebug-communication|
Customizing |termdebug-customizing|
{Vi does not have any of these commands}
{only available when compiled with the |+terminal| feature}
The terminal feature requires the |+multi_byte|, |+job| and |+channel| features.
==============================================================================
@@ -97,9 +103,14 @@ themselves (like Vim does).
To change the keys you type use terminal mode mappings, see |:tmap|.
These are defined like any mapping, but apply only when typing keys that are
sent to the job running in the terminal. For example, to make Escape switch
sent to the job running in the terminal. For example, to make F1 switch
to Terminal-Normal mode: >
tnoremap <F1> <C-W>N
You can use Esc, but you need to make sure it won't cause other keys to
break: >
tnoremap <Esc> <C-W>N
set notimeout ttimeout timeoutlen=100
< *options-in-terminal*
After opening the terminal window and setting 'buftype' to "terminal" the
BufWinEnter autocommand event is triggered. This makes it possible to set
@@ -138,6 +149,13 @@ Syntax ~
if [command] is NONE no job is started, the pty of the
terminal can be used by a command like gdb.
If [command] is missing the default behavior is to
close the terminal when the shell exits. This can be
changed with the ++noclose argument.
If [command] is present the default behavior is to
keep the terminal open in Terminal-Normal mode. This
can be changed with the ++close argument.
A new buffer will be created, using [command] or
'shell' as the name, prefixed with a "!". If a buffer
by this name already exists a number is added in
@@ -153,15 +171,25 @@ Syntax ~
Supported [options] are:
++close The terminal window will close
automatically when the job terminates.
++noclose The terminal window will NOT close
automatically when the job terminates.
++open When the job terminates and no window
shows it, a window will be opened.
Note that this can be interruptive.
The last of ++close, ++noclose and ++open
matters and rules out earlier arguments.
++curwin Open the terminal in the current
window, do not split the current
window. Fails if the current buffer
cannot be |abandon|ed.
++hidden Open the terminal in a hidden buffer,
no window will be used.
++norestore Do not include this terminal window
in a session file.
++kill={how} When trying to close the terminal
window kill the job with {how}. See
|term_setkill()| for the values.
++rows={height} Use {height} for the terminal window
height. If the terminal uses the full
Vim height (no window above or below
@@ -185,8 +213,12 @@ Syntax ~
If you want to use more options use the |term_start()|
function.
When the buffer associated with the terminal is unloaded or wiped out the job
is killed, similar to calling `job_stop(job, "kill")`
When the buffer associated with the terminal is forcibly unloaded or wiped out
the job is killed, similar to calling `job_stop(job, "kill")` .
Closing the window normally results in |E947|. When a kill method was set
with "++kill={how}" or |term_setkill()| then closing the window will use that
way to kill or interrupt the job. For example: >
:term ++kill=term tail -f /tmp/log
So long as the job is running the window behaves like it contains a modified
buffer. Trying to close the window with `CTRL-W :quit` fails. When using
@@ -285,6 +317,22 @@ is inverted. Since Vim cannot detect this, the terminal window cursor
blinking will also be inverted.
Session ~
*terminal-session*
A terminal window will be restored when using a session file, if possible and
wanted.
If "terminal" was removed from 'sessionoptions' then no terminal windows will
be restored.
If the job in the terminal was finished the window will not be restored.
If the terminal can be restored, the command that was used to open it will be
used again. To change this use the |term_setrestore()| function. This can
also be used to not restore a specific terminal by setting the command to
"NONE".
Special keys ~
*terminal-special-keys*
Since the terminal emulator simulates an xterm, only escape sequences that
@@ -311,15 +359,6 @@ Environment variables are used to pass information to the running job:
COLORS number of colors, 't_Co' (256*256*256 in the GUI)
VIM_SERVERNAME v:servername
The |client-server| feature can be used to communicate with the Vim instance
where the job was started. This only works when v:servername is not empty.
If needed you can set it with: >
call remote_startserver('vim-server')
In the job you can then do something like: >
vim --servername $VIM_SERVERNAME --remote +123 some_file.c
This will open the file "some_file.c" and put the cursor on line 123.
MS-Windows ~
*terminal-ms-windows*
@@ -345,7 +384,97 @@ Environment variables are used to pass information to the running job:
VIM_SERVERNAME v:servername
==============================================================================
2. Remote testing *terminal-testing*
2. Terminal communication *terminal-communication*
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 the JSON API to send encoded commands from the job to Vim.
- Use the |client-server| mechanism. This works on machines with an X server
and on MS-Windows.
Vim to job: term_sendkeys() ~
*terminal-to-job*
This allows for remote controlling the job running in the terminal. It is a
one-way mechanism. The job can update the display to signal back to Vim.
For example, if a shell is running in a terminal, you can do: >
call term_sendkeys(buf, "ls *.java\<CR>")
This requires for the job to be in the right state where it will do the right
thing when receiving the keys. For the above example, the shell must be
waiting for a command to be typed.
For a job that was written for the purpose, you can use the JSON API escape
sequence in the other direction. E.g.: >
call term_sendkeys(buf, "\<Esc>]51;["response"]\x07")
Job to Vim: JSON API ~
*terminal-api*
The job can send JSON to Vim, using a special escape sequence. The JSON
encodes a command that Vim understands. Example of such a message: >
<Esc>]51;["drop", "README.md"]<07>
The body is always a list, making it easy to find the end: ]<07>.
The <Esc>]51;msg<07> sequence is reserved by xterm for "Emacs shell", which is
similar to what we are doing here.
Currently supported commands:
call {funcname} {argument}
Call a user defined function with {argument}.
The function is called with two arguments: the buffer number
of the terminal and {argument}, the decoded JSON argument.
The function name must start with "Tapi_" to avoid
accidentally calling a function not meant to be used for the
terminal API
The user function should sanity check the argument.
The function can use |term_sendkeys()| to send back a reply.
Example in JSON: >
["call", "Tapi_Impression", ["play", 14]]
< Calls a function defined like this: >
function Tapi_Impression(bufnum, arglist)
if len(a:arglist) == 2
echomsg "impression " . a:arglist[0]
echomsg "count " . a:arglist[1]
endif
endfunc
< Output from `:echo` may be erased by a redraw, use `:echomsg`
to be able to see it with `:messages`.
drop {filename}
Let Vim open a file, like the `:drop` command. If {filename}
is already open in a window, switch to that window. Otherwise
open a new window to edit {filename}.
Example in JSON: >
["drop", "path/file.txt", {"ff": "dos"}]
A trick to have Vim send this escape sequence: >
exe "set t_ts=\<Esc>]51; t_fs=\x07"
let &titlestring = '["call","Tapi_TryThis",["hello",123]]'
redraw
set t_ts& t_fs&
Rationale: Why not allow for any command or expression? Because that might
create a security problem.
Using the client-server feature ~
*terminal-client-server*
This only works when v:servername is not empty. If needed you can set it,
before opening the terminal, with: >
call remote_startserver('vim-server')
$VIM_SERVERNAME is set in the terminal to pass on the server name.
In the job you can then do something like: >
vim --servername $VIM_SERVERNAME --remote +123 some_file.c
This will open the file "some_file.c" and put the cursor on line 123.
==============================================================================
3. Remote testing *terminal-testing*
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
@@ -360,7 +489,97 @@ term_scrape() inspect terminal screen
==============================================================================
3. Debugging *terminal-debug*
4. Diffing screen dumps *terminal-diff*
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
simpler it is possible to take a screen dump of a terminal and compare it to
an expected screen dump.
Vim uses the window size, text, color and other attributes as displayed. The
Vim screen size, font and other properties do not matter. Therefore this
mechanism is portable across systems. A conventional screenshot would reflect
all differences, including font size and family.
Writing a screen dump test for Vim ~
*terminal-dumptest*
For an example see the Test_syntax_c() function in
src/testdir/test_syntax.vim. The main parts are:
- Write a file you want to test with. This is useful for testing syntax
highlighting. You can also start Vim with en empty buffer.
- Run Vim in a terminal with a specific size. The default is 20 lines of 75
characters. This makes sure the dump is always this size. The function
RunVimInTerminal() takes care of this. Pass it the arguments for the Vim
command.
- Send any commands to Vim using term_sendkeys(). For example: >
call term_sendkeys(buf, ":echo &lines &columns\<CR>")
- Check that the screen is now in the expected state, using
VerifyScreenDump(). This expects the reference screen dump to be in the
src/testdir/dumps/ directory. Pass the name without ".dump". It is
recommended to use the name of the test function and a sequence number, so
that we know what test is using the file.
- Repeat sending commands and checking the state.
- Finally stop Vim by calling StopVimInTerminal().
The first time you do this you won't have a screen dump yet. Create an empty
file for now, e.g.: >
touch src/testdir/dumps/Test_function_name_01.dump
The test will then fail, giving you the command to compare the reference dump
and the failed dump, e.g.: >
call term_dumpdiff("Test_func.dump.failed", "dumps/Test_func.dump")
Use this command in Vim, with the current directory set to src/testdir.
Once you are satisfied with the test, move the failed dump in place of the
reference: >
:!mv Test_func.dump.failed dumps/Test_func.dump
Creating a screen dump ~
*terminal-screendump*
To create the screen dump, run Vim (or any other program) in a terminal and
make it show the desired state. Then use the term_dumpwrite() function to
create a screen dump file. For example: >
:call term_dumpwrite(77, "mysyntax.dump")
Here "77" is the buffer number of the terminal. Use `:ls!` to see it.
You can view the screen dump with term_dumpload(): >
:call term_dumpload("mysyntax.dump")
To verify that Vim still shows exactly the same screen, run Vim again with
exactly the same way to show the desired state. Then create a screen dump
again, using a different file name: >
:call term_dumpwrite(88, "test.dump")
To assert that the files are exactly the same use assert_equalfile(): >
call assert_equalfile("mysyntax.dump", "test.dump")
If there are differences then v:errors will contain the error message.
Comparing screen dumps ~
*terminal-diffscreendump*
assert_equalfile() does not make it easy to see what is different.
To spot the problem use term_dumpdiff(): >
call term_dumpdiff("mysyntax.dump", "test.dump")
This will open a window consisting of three parts:
1. The contents of the first dump
2. The difference between the first and second dump
3. The contents of the second dump
You can usually see what differs in the second part. Use the 'ruler' to
relate it to the position in the first or second dump.
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.
==============================================================================
5. Debugging *terminal-debug*
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
@@ -387,7 +606,7 @@ program window A terminal window for the executed program. When "run" is
The current window is used to show the source code. When gdb pauses the
source file location will be displayed, if possible. A sign is used to
highlight the current position (using highlight group debugPC).
highlight the current position, using highlight group debugPC.
If the buffer in the current window is modified, another window will be opened
to display the current gdb position.
@@ -412,6 +631,7 @@ You should now have three windows:
source - where you started, has a window toolbar with buttons
gdb - you can type gdb commands here
program - the executed program will use this window
You can use CTRL-W CTRL-W or the mouse to move focus between windows.
Put focus on the gdb window and type: >
break ex_help
@@ -432,6 +652,8 @@ displayed:
This way you can inspect the value of local variables. You can also focus the
gdb window and use a "print" command, e.g.: >
print *eap
If mouse pointer movements are working, Vim will also show a balloon when the
mouse rests on text that can be evaluated by gdb.
Now go back to the source window and put the cursor on the first line after
the for loop, then type: >
@@ -467,38 +689,42 @@ Put focus on the gdb window to type commands there. Some common ones are:
- frame N go to the Nth stack frame
- continue continue execution
In the window showing the source code these commands can used to control gdb:
:Run [args] run the program with [args] or the previous arguments
:Arguments {args} set arguments for the next :Run
In the window showing the source code these commands can be used to control gdb:
`:Run` [args] run the program with [args] or the previous arguments
`:Arguments` {args} set arguments for the next `:Run`
:Break set a breakpoint at the current line; a sign will be displayed
:Delete delete a breakpoint at the current line
`:Break` set a breakpoint at the current line; a sign will be displayed
`:Clear` delete the breakpoint at the current line
:Step execute the gdb "step" command
:Over execute the gdb "next" command (:Next is a Vim command)
:Finish execute the gdb "finish" command
:Continue execute the gdb "continue" command
:Stop interrupt the program
`:Step` execute the gdb "step" command
`:Over` execute the gdb "next" command (`:Next` is a Vim command)
`:Finish` execute the gdb "finish" command
`:Continue` execute the gdb "continue" command
`:Stop` interrupt the program
If 'mouse' is set the plugin adds a window toolbar with these entries:
Step :Step
Next :Over
Finish :Finish
Cont :Continue
Stop :Stop
Eval :Evaluate
Step `:Step`
Next `:Over`
Finish `:Finish`
Cont `:Continue`
Stop `:Stop`
Eval `:Evaluate`
This way you can use the mouse to perform the most common commands. You need
to have the 'mouse' option set to enable mouse clicks.
You can add the window toolbar in other windows you open with: >
:Winbar
Inspecting variables ~
*termdebug-variables*
:Evaluate evaluate the expression under the cursor
K same
:Evaluate {expr} evaluate {expr}
:'<,'>Evaluate evaluate the Visually selected text
`:Evaluate` evaluate the expression under the cursor
`K` same
`:Evaluate` {expr} evaluate {expr}
`:'<,'>Evaluate` evaluate the Visually selected text
This is similar to using "print" in the gdb window.
You can usually shorten `:Evaluate` to `:Ev`.
Other commands ~
@@ -515,17 +741,22 @@ will break the debugger.
Customizing ~
*termdebug-customizing*
GDB command *termdebug-customizing*
To change the name of the gdb command, set the "termdebugger" variable before
invoking `:Termdebug`: >
let termdebugger = "mygdb"
< *gdb-version*
< *gdb-version*
Only debuggers fully compatible with gdb will work. Vim uses the GDB/MI
interface. This probably requires gdb version 7.12. if you get this error:
interface. The "new-ui" command requires gdb version 7.12 or later. if you
get this error:
Undefined command: "new-ui". Try "help".~
Then your gdb is too old.
*hl-debugPC* *hl-debugBreakpoint*
Colors *hl-debugPC* *hl-debugBreakpoint*
The color of the signs can be adjusted with these highlight groups:
- debugPC the current position
- debugBreakpoint a breakpoint
@@ -538,6 +769,20 @@ When 'background' is "dark":
hi debugPC term=reverse ctermbg=darkblue guibg=darkblue
hi debugBreakpoint term=reverse ctermbg=red guibg=red
Popup menu *termdebug_popup*
By default the Termdebug plugin sets 'mousemodel' to "popup_setpos" and adds
these entries to the popup menu:
Set breakpoint `:Break`
Clear breakpoint `:Clear`
Evaluate `:Evaluate`
If you don't want this then disable it with: >
let g:termdebug_popup = 0
Vim window width *termdebug_wide*
To change the width of the Vim window when debugging starts, and use a
vertical split: >
let g:termdebug_wide = 163

View File

@@ -1,4 +1,4 @@
*todo.txt* For Vim version 8.0. Last change: 2018 Jan 28
*todo.txt* For Vim version 8.0. Last change: 2018 Mar 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -35,229 +35,102 @@ entered there will not be repeated below, unless there is extra information.
*known-bugs*
-------------------- Known bugs and current work -----------------------
No maintainer for Vietnamese translations.
No maintainer for Simplified Chinese translations.
Terminal emulator window:
- Lots of stuff to implement, see src/terminal.c
- Improve debugger interface:
Include all debug features of Agide.
- Implement the right-click popup menu for the terminal. Can use the
completion popup menu code and mouse dragging.
Use it for "set breakpoint", "remove breakpoint", etc.
- get ideas from http://clewn.sf.net
- Look into the idevim plugin/script.
- Improve testing:
Make a screenshot of a terminal, store in a file.
Display a stored screenshot, display diff with another one.
Make a test that puts Vim in a specific state, make a screenshot and compare
with the expected screenshot. Set t_Co to 256.
- dump diff sometimes creates a different way of repeating.
Example: https://api.travis-ci.org/v3/job/359102504/log.txt
unclear why this can happen.
- Still some stuff to implement and bugs to fix, see src/terminal.c
+channel:
- Add a separate timeout for opening a socket. Currently it's fixed at 50
msec, which is too small for a remote connection. (tverniquet, #2130)
- Try out background make plugin:
https://github.com/AndrewVos/vim-make-background
- Problem with stderr on Windows? (Vincent Rischmann, 2016 Aug 31, #1026)
- Writing raw mode to a buffer should still handle NL characters as line
breaks. (Dmitry Zotikov, 2017 Aug 16)
- When out_cb executes :sleep, the close_cb may be invoked. (Daniel Hahler,
2016 Dec 11, #1320)
- Implement |job-term| ?
- Channel test fails with Motif. Sometimes kills the X11 server.
- When a message in the queue but there is no callback, drop it after a while?
Add timestamp to queued messages and callbacks with ID, remove after a
minute. Option to set the droptime.
- Add an option to drop text of very long lines? Default to 1 Mbyte.
- Add remark about undo sync, is there a way to force it?
- When starting a job, have an option to open the server socket, so we know
the port, and pass it to the command with --socket-fd {nr}. (Olaf Dabrunz,
Feb 9) How to do this on MS-Windows?
- For connection to server, a "keep open" flag would be useful. Retry
connecting in the main loop with zero timeout.
- job_start(): run job in a newly opened terminal (not a terminal window).
With xterm could use -S{pty}.
Although user could use "xterm -e 'cmd arg'".
Mode message isn't updated on vertical split. (Alexei Averchenko, 2018 Feb 2,
#2611)
Regexp problems:
- When search pattern has the base character both with and without combining
character, search fails. E.g. "รรีบ" in "การรีบรักใคร". (agguser, #2312)
- [:space:] only matches ASCII spaces. Add [:white:] for all space-like
characters, esp. including 0xa0. Use character class zero.
- Since 7.4.704 the old regex engine fails to match [[:print:]] in 0xf6.
(Manuel Ortega, 2016 Apr 24)
Test fails on Mac. Avoid using isalpha(), isalnum(), etc? Depends on
LC_CTYPE
- The old engine does not find a match for "/\%#=1\(\)\{80}", the new engine
matches everywhere.
- Using win_linetabsize() can still be slow. Cache the result, store col and
vcol. Reset them when moving to another line.
- Very slow with a long line and Ruby highlighting. (John Whitley, 2014 Dec 4)
- Bug with pattern: '\vblock (\d+)\.\n.*\d+%(\1)@<!\.$'
(Lech Lorens, 2014 Feb 3)
- Issue 164: freeze on regexp search.
- Ignorecase not handled properly for multi-byte characters. (Axel Bender,
2013 Dec 11)
- Using \@> and \?. (Brett Stahlman, 2013 Dec 21) Remark from Marcin
Szamotulski; Remark from Brett 2014 Jan 6 and 7.
- NFA regexp doesn't handle \%<v correctly. (Ingo Karkat, 2014 May 12)
- Does not work with NFA regexp engine:
\%u, \%x, \%o, \%d followed by a composing character
- Search for \%d0\+ may fail with E363. (Christian Brabandt, 2016 Oct 4)
- \%'[ does not work. '%'] does work. (Masaaki Nakamura, 2016 Apr 4)
- Bug relating to back references. (Ingo Karkat, 2014 Jul 24)
- New RE does not give an error for empty group: "\(\)\{2}" (Dominique Pelle,
2015 Feb 7)
- Using back reference before the capturing group sometimes works with the old
engine, can we do this with the new engine? E.g. with
"/\%(<\1>\)\@<=.*\%(<\/\(\w\+\)>\)\@=" matching text inside HTML tags.
This problem is probably the same: "\%(^\1.*$\n\)\@<=\(\d\+\).*$".
(guotuofeng, 2015 Jun 22)
- Strange matching with "\(Hello\n\)\@<=A". (Anas Syed, 2015 Feb 12)
- Problem with \v(A)@<=b+\1c. (Issue 334)
- Diff highlighting can be very slow. (Issue 309)
- Using %> for a virtual column has a check based on 'tabsize'. Better would
be to cache the result of win_linetabsize(col), storing both col and vcol,
and use them to decide whether win_linetabsize() needs to be called. Reset
col and vcol when moving to another line.
- this doesn't work: "syntax match ErrorMsg /.\%9l\%>20c\&\%<28c/". Leaving
out the \& works. Seems any column check after \& fails.
- Difference between two engines: ".*\zs\/\@>\/" on text "///"
(Chris Paul, 2016 Nov 13) New engine not greedy enough?
Another one: echom matchstr(" sdfsfsf\n sfdsdfsdf",'[^\n]*')
(2017 May 15, #1252)
Patch to fix vimgrep adding to wrong quickfix list. (Yegappan, 2018 Mar 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 sudo. #2758
Reproducible:
invalid memory access in regexp with zero-width.
reproduced by Dominique, 2017 Dec 23
heap-use-after-free in win_equal_rec (#2467)
au* 0 vs¡
ar0
arga
al
al
Patch to fix using freed memory. (Christian Brabandt, 2018 Jan 6, #2467)
Code refactoring, macro for message, #2729
Patch for nsis runtime files. (Ken Takata, 2018 Jan 25)
Patch for scheme runtime files (new version) (Evan Hanson, 2018 Jan 26)
Patch to turn tests into new style. (Yegappan, 2017 Dec 29, #2509)
Patch to fix crash in rubyf. (W, #2512) fixes #2511
Updates for Debian runtime files. (James McCoy, 2018 Jan 7)
Crash when calling term_start() with empty command on windows. (Wang Shidong,
2018 Dec 27, #2501)
Patch to improve DirectX rendering. (Ken Takata, 2018 Jan 18, #2560 fixes
#2401)
Endless loop invovlving gui_mch_stop_blink(). (zdohnal, 2018 Jan 11)
Patch to add 'pythonhome' and 'pythonthreehome' options. (Kazuki Sakamoto,
2016 Nov 21, #1266)
"silent! try" doesn't restore emsg_silent when an exception is thrown.
(Ben Reilly, 2018 Jan 5, #2531) Possible solution by Christian Brabandt, 2018
Jan 6.
Patch to fix ex mode buffering output. (Brian M. Carlson, 2018 Jan 8, #2537)
Patch for config.vim syntax file. (James McCoy, 2018 Jan 28, maintainer didn't
respond).
Patch to add support for clojure script filetype detection. (David Burgin,
2018 Jan 20, #257)
Patch to implement the DirChanged autocmd event. (Andy Massimino, 2018 Jan 9,
replaces #888)
Patch to fix not adding a slash after :find completion. (Genki Sky, 2018 Jan
10)
Patch for man.vim, fix for Mac. (SungHyun Nam, 2018 Jan 8, #2488)
Update Jan 10.
Patch to fix illegal memory access in del_bytes(). (Christian Brabandt, 2018
Jan 2, #2466)
Recursive use of alist_add() (Christian Brabandt, 2018 Jan 6, #2472)
patch 1218 breaks etags. (zdohnal, 2018 Jan 5)
Patch to enforce c89 compliance. (James McCoy, #2735)
With fix for Mac from Kazunobu.
Errors found with random data:
heap-buffer-overflow in alist_add (#2472)
heap-buffer-overflow in del_bytes (#2466)
Patch to avoid bad highlighting caused by #if. (ichizok, #2731)
Implement option_save() and option_restore()? Or remove the help.
Looks like an error for inserting register makes ":file other" not work.
(Tom M, 2018 Mar 28)
Patch to fix mouse pointer after :tselect. (Hirohito Higashi, #2709)
How to reproduce the problem?
Patch to avoid job killed when I/O is disconnected. (ichizok, #2734)
When opening foo/x.txt and bar/x.txt get swap file warning. Should check the
file name. (Juergen Weigert)
Compiler warnings (geeknik, 2017 Oct 26):
- signed integer overflow in do_sub() (#2249)
- signed integer overflow in get_address() (#2248)
- signed integer overflow in getdecchrs() (#2254)
- signed integer overflow in nfa_regatom() (#2251)
patch by Christian Brabandt, 2018 Jan 8
- undefined left shift in get_string_tv() (#2250)
Patch to fix CursorIM highlighting on Windows. (Ken Takata, 2018 Jan 18)
Tests failing for "make testgui" with GTK:
- Test_setbufvar_options()
- Test_exit_callback_interval()
Cursor in wrong screen line with WinBar. (#2362)
Fix by Christian Brabandt (2018 Jan 2)
Mouse pointer sticks to stop shape. Only on Windows GUI? #2709
Patch to make log_tr() use variable arguments. (Ichizok, 2018 Mar 20, #2730)
balloon_show() does not work properly in the terminal. (Ben Jackson, 2017 Dec
20, #2481)
Also see #2352, want better control over balloon, perhaps set the position.
Patch to make installer faster. (Ken Takata, 2018 Jan 3, #2522)
Try out background make plugin:
https://github.com/AndrewVos/vim-make-background
or asyncmake:
https://github.com/yegappan/asyncmake
Patch to support hunspell. (Matej Cepl, Jan 2018, #2500)
Add a ModeChanged autocommand that has an argument indicating the old and new
mode. Also used for switching Terminal mode.
Cursor in status line after search. (#2530)
Patch to fix that an empty buffer remains when using :argedit. (Christian,
#2713) Updated patch.
Patch to fix interaction between 'virtualedit' and i_CTRL-G_j. (Christian
Brabandt, #2743)
Cursor in wrong position when line wraps. (#2540)
Add an option similar to 'lazyredraw' to skip redrawing while executing a
script or function.
Alternative manpager.vim. (Enno, 2018 Jan 5, #2529)
Patch for minimum width of completion popup menu. (Christian Brabandt, 2018
Jan 3, #2314)
Patch to add more flags to :ls. (Marcin Szamotulski, #2751)
Does setting 'cursorline' cause syntax highlighting to slow down? Perhaps is
mess up the cache? (Mike Lee Williams, 2018 Jan 27, #2539)
When using :packadd files under "later" are not used, which is inconsistent
with packages under "start". (xtal8, #1994)
Patch to make D&D work between 32 bit app and 64 bit Vim. (Ken Takata, #2504)
Patch to fix invalid return value with backwards searchpair. (Daniel Hahler,
2018 Jan 15, #2552)
Column number is wrong whsn using 'linebreak' and 'wrap'. (Keith Smiley, 2018
Column number is wrong when using 'linebreak' and 'wrap'. (Keith Smiley, 2018
Jan 15, #2555)
Patch to remove redundant "if". (Dominique Pelle, 2018 Jan 14)
Serbian translations. (Peseic, 2018 Jan 17)
":bufdo e" disabled syntax HL in windows other than the current. (BPJ)
Check argument of systemlist(). (Pavlov)
Patch to parse ":line" in tags file and use it for search. (Daniel Hahler,
#2546)
Patch to add reg_executing() and reg_recording(). (Hirohito Higashi, #2745)
Patch to fix illegal memory access. (Christian Brabandt, 2018 Jan 6, #2523)
No maintainer for Vietnamese translations.
No maintainer for Simplified Chinese translations.
When 'inchsearch' and 'hlsearch' are set /\v highlights everything.
Also see #2337
@@ -265,28 +138,28 @@ Also see #2337
Starting job with cwd option, when the directory does not exist, gives a
confusing error message. (Wang Shidong, 2018 Jan 2, #2519)
7 Add a watchpoint in the debug mode: An expression that breaks execution
when evaluating to non-zero. Add the "watchadd expr" command, stop when
the value of the expression changes. ":watchdel" deletes an item,
":watchlist" lists the items. (Charles Campbell)
Patch by Christian Brabandt, 2016 Jun 10, #859
7 Make "ga" show the digraph for a character, if it exists.
Patch from Christian Brabandt, 2011 Aug 19.
Patch to add "module" to quickfix entries. (Marcin Szamotulski, Coot, 2017 Jun
8, #1757) Now part of #2322. Or #2327? #1757 was re-opened, include that
first.
Add the debug command line history to viminfo.
Avoid that "sign unplace id" does a redraw right away, esp. when there is a
sequence of these commands. (Andy Stewart, 2018 Mar 16)
ch_sendraw() with long string does not try to read inbetween, which may cause
a deadlock if the reading side is waiting for the write to finish. (Nate
Bosch, 2018 Jan 13, #2548)
Problem with mouse scroll in tmux. (fcying, #2419) Might be caused by patch
8.0.1309.
Add Makefiles to the runtime/spell directory tree, since nobody uses Aap.
Will have to explain the manual steps (downloading the .aff and .dic files,
applying the diff, etc.
Des setting 'cursorline' cause syntax highlighting to slow down? Perhaps is
mess up the cache? (Mike Lee Williams, 2018 Jan 27, #2539)
User dictionary ~/.vim/spell/lang.utf-8.add not used for spell checking until a
word is re-added to it. (Matej Cepl, 2018 Feb 6)
Problem with mouse scroll in tmux. (fcying, #2419) Might be caused by patch
8.0.1309. Removing "held_button = MOUSE_RELEASE;" helps. (2018 Feb 5)
Fold at end of the buffer behaves inconsistently. (James McCoy, 2017 Oct 9)
@@ -296,18 +169,24 @@ With foldmethod=syntax and nofoldenable comment highlighting isn't removed.
Using 'wildignore' also applies to literally entered file name. Also with
:drop (remote commands).
Patch to use the xdiff library instead of external diff. (Christian Brabandt,
2018 Mar 20, #2732)
"gvim --remote" from a directory with non-word characters changes the current
directory (Paulo Marcel Coelho Arabic, 2017 Oct 30, #2266)
Also see #1689.
Patch for 24 bit color support in MS-Windows console, using vcon. (Nobuhiro
Takasaki, Ken Takata, 2017 Oct 1, #2060).
ml_get error when using a Python. (Yggdroot, 2017 Jun 1, #1737)
Lemonboy can reproduce (2017 Jun 5)
crash when removing an element while inside map(). (Nikolai Pavlov, 2018 Feb
17, #2652)
When 'virtualedit' is "all" and 'cursorcolumn' is set, the wrong column may be
highlighted. (van-debugger, 2018 Jan 23, #2576)
highlighted. (van-de-bugger, 2018 Jan 23, #2576)
Patch to parse ":line" in tags file and use it for search. (Daniel Hahler,
#2546) Fixes #1057. Missing a test.
Patch to add winlayout() function. (Yegappan Lakshmanan, 2018 Jan 4)
@@ -317,6 +196,8 @@ No profile information for function that executes ":quit". (Daniel Hahler,
Get a "No Name" buffer when 'hidden' is set and opening a new window from the
quickfix list. (bfrg, 2018 Jan 22, #2574)
CTRL-X on zero gets stuck on 0xfffffffffffffffe. (Hengyang Zhao, #2746)
A function on a dictionary is not profiled. (ZyX, 2010 Dec 25)
Patch to fix E806. (Dominique, 2017 Nov 22, #2368)
@@ -328,12 +209,22 @@ Patch to fix GUI find/replace dialog. (kiloliter, 2017 Dec 11, report in
Invalid range error when using BufWinLeave for closing terminal.
(Gabriel Barta, 2017 Nov 15, #2339)
Using an external diff is inefficient. Not all systems have a good diff
program available (esp. MS-Windows). Would be nice to have in internal diff
implementation. Can then also use this for displaying changes within a line.
Olaf Dabrunz is working on this. (10 Jan 2016)
9 Instead invoking an external diff program, use builtin code. One can be
found here: http://www.ioplex.com/~miallen/libmba/dl/src/diff.c
It's complicated and badly documented.
Alternative: use the xdiff library. Patch from Christian Brabandt, 2018 Mar
2018, #2732)
ml_get errors with buggy script. (Dominique, 2017 Apr 30)
Error in emsg with buggy script. (Dominique, 2017 Apr 30)
Patch to avoid clearing the intro message on Win32 console.
(Ken Takata, 2017 Nov 14)
Using CTRL-G j in insert mode in combination with 'virtualedit' doesn't work
as expected. (Rich, 2018 March 23, #2743)
Patch to fix encoding in print document name (Yasuhiro Matsumoto, 2017 Dec 20,
#2478)
@@ -344,9 +235,16 @@ Linse, 2017 Nov 14, #2336)
Join truncates xml comment. (Dmitrii Tcyganok, 2017 Dec 24, #2494)
Requires 'formatoptions' to include "j". (Gary Johnson, 2017 Dec 24)
Patch to support hunspell. (Matej Cepl, Jan 2018, #2500) Based on older patch
in #846)
Doesn't work on Windows yet. Not ready to included, hard coded paths.
When a timer is running and typing CTRL-R on the command line, it is not
redrawn properly. (xtal8, 2017 Oct 23, #2241)
In an optional package the "after" directory is not scanned?
(Renato Fabbri, 2018 Feb 22)
Universal solution to detect if t_RS is working, using cursor position.
Koichi Iwamoto, #2126
@@ -362,9 +260,6 @@ Ask whether to use Windows or Vim key behavior?
Patch for improving detecting Ruby on Mac in configure. (Ilya Mikhaltsou, 2017
Nov 21)
Add a ModeChanged autocommand that has an argument indicating the old and new
mode. Also used for switching Terminal mode.
When using command line window, CmdlineLeave is triggered without
CmdlineEnter. (xtal8, 2017 Oct 30, #2263)
Add some way to get the nested state. Although CmdwinEnter is obviously
@@ -372,6 +267,9 @@ always nested.
matchit hasn't been maintained for a long time. #955.
Patch to add variable name after "scope add". (Eddie Lebow, 2018 Feb 7, #2620)
Maybe not needed?
Problem with 'delcombine'. (agguser, 2017 Nov 10, #2313)
MS-Windows: buffer completion doesn't work when using backslash (or slash)
@@ -385,6 +283,10 @@ Start with filetype detection: testdir/test_filetype.vim
Window not closed when deleting buffer. (Harm te Hennepe, 2017 Aug 27, #2029)
Duplication of completion suggestions for ":!hom". Issue #539.
Patch by Christian, 2016 Jan 29
Another patch in #2733.
>
Add options_default() / options_restore() to set several options to Vim
defaults for a plugin. Comments from Zyx, 2017 May 10.
Perhaps use a vimcontext / endvimcontext command block.
@@ -400,13 +302,13 @@ line breaks. (Ken Takata, 2017 Aug 22)
The ":move" command does not honor closed folds. (Ryan Lue, #2351)
Patch to fix increment/decrement not working properly when 'virtualedit' is
set. (Hirohito Higashi, 2016 Aug 1, #923)
Memory leaks in test_channel? (or is it because of fork())
Using uninitialized value in test_crypt.
Memory leaks in test_escaped_glob
Patch to clear background when "guibg=NONE" is used and 'termguicolors' is
set. (Nick Jensen, 2017 Nov 13, #2332, based on #981 by Kazunobu Kuriyama)
Patch to make gM move to middle of line. (Yasuhiro Matsumoto, Sep 8, #2070)
Cannot copy modeless selection when cursor is inside it. (lkintact, #2300)
@@ -416,9 +318,6 @@ It can replace the BeOS code, which is likely not used anymore.
Now on github: #1856. Updated Oct 2017
Got permission to include this under the Vim license.
Patch to include hunspell support. (Matej Cepl, 2017 Dec 26, #845)
Doesn't work on Windows yet.
Refactored HTML indent file. (Michael Lee, #1821)
Test_writefile_fails_conversion failure on Solaris because if different iconv
@@ -457,6 +356,22 @@ 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.
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)
Creating a partial with an autoload function is confused about the "self"
@@ -700,14 +615,6 @@ Patch to be able to separately map CTRL-H and BS on Windows.
When 'completeopt' has "noselect" does not insert a newline. (Lifepillar, 2017
Apr 23, #1653)
Using an external diff is inefficient. Not all systems have a good diff
program available (esp. MS-Windows). Would be nice to have in internal diff
implementation. Can then also use this for displaying changes within a line.
Olaf Dabrunz is working on this. (10 Jan 2016)
9 Instead invoking an external diff program, use builtin code. One can be
found here: http://www.ioplex.com/~miallen/libmba/dl/src/diff.c
It's complicated and badly documented.
Window resizing with 'winfixheight': With a vertical split the height changes
anyway. (Tommy allen, 2017 Feb 21, #1502)
@@ -723,8 +630,6 @@ Patch to make it possible to extend a list with itself.
Patch to add Zstandard compressed file support. (Nick Terrell, 2016 Oct 24)
Patch to add trim() function. (Bukn, 2016 Nov 25, #1280)
Patch to add MODIFIED_BY to MSVC build file. (Chen Lei, 2016 Nov 24, #1275)
Patch to change argument of :marks. (LemonBoy, 2017 Jan 29, #1426)
@@ -747,6 +652,78 @@ no longer support.
sort() is not stable when using numeric/float sort (Nikolay Pavlov, 2016 Sep
4#1038)
+channel:
- Add a separate timeout for opening a socket. Currently it's fixed at 50
msec, which is too small for a remote connection. (tverniquet, #2130)
- Problem with stderr on Windows? (Vincent Rischmann, 2016 Aug 31, #1026)
- Writing raw mode to a buffer should still handle NL characters as line
breaks. (Dmitry Zotikov, 2017 Aug 16)
- When out_cb executes :sleep, the close_cb may be invoked. (Daniel Hahler,
2016 Dec 11, #1320)
- Implement |job-term| ?
- Channel test fails with Motif. Sometimes kills the X11 server.
- When a message in the queue but there is no callback, drop it after a while?
Add timestamp to queued messages and callbacks with ID, remove after a
minute. Option to set the droptime.
- Add an option to drop text of very long lines? Default to 1 Mbyte.
- Add remark about undo sync, is there a way to force it?
- When starting a job, have an option to open the server socket, so we know
the port, and pass it to the command with --socket-fd {nr}. (Olaf Dabrunz,
Feb 9) How to do this on MS-Windows?
- For connection to server, a "keep open" flag would be useful. Retry
connecting in the main loop with zero timeout.
- job_start(): run job in a newly opened terminal (not a terminal window).
With xterm could use -S{pty}.
Although user could use "xterm -e 'cmd arg'".
Regexp problems:
- When search pattern has the base character both with and without combining
character, search fails. E.g. "รรีบ" in "การรีบรักใคร". (agguser, #2312)
- [:space:] only matches ASCII spaces. Add [:white:] for all space-like
characters, esp. including 0xa0. Use character class zero.
- Since 7.4.704 the old regex engine fails to match [[:print:]] in 0xf6.
(Manuel Ortega, 2016 Apr 24)
Test fails on Mac. Avoid using isalpha(), isalnum(), etc? Depends on
LC_CTYPE
- The old engine does not find a match for "/\%#=1\(\)\{80}", the new engine
matches everywhere.
- Using win_linetabsize() can still be slow. Cache the result, store col and
vcol. Reset them when moving to another line.
- Very slow with a long line and Ruby highlighting. (John Whitley, 2014 Dec 4)
- Bug with pattern: '\vblock (\d+)\.\n.*\d+%(\1)@<!\.$'
(Lech Lorens, 2014 Feb 3)
- Issue 164: freeze on regexp search.
- Ignorecase not handled properly for multi-byte characters. (Axel Bender,
2013 Dec 11)
- Using \@> and \?. (Brett Stahlman, 2013 Dec 21) Remark from Marcin
Szamotulski; Remark from Brett 2014 Jan 6 and 7.
- NFA regexp doesn't handle \%<v correctly. (Ingo Karkat, 2014 May 12)
- Does not work with NFA regexp engine:
\%u, \%x, \%o, \%d followed by a composing character
- Search for \%d0\+ may fail with E363. (Christian Brabandt, 2016 Oct 4)
- \%'[ does not work. '%'] does work. (Masaaki Nakamura, 2016 Apr 4)
- Bug relating to back references. (Ingo Karkat, 2014 Jul 24)
- New RE does not give an error for empty group: "\(\)\{2}" (Dominique Pelle,
2015 Feb 7)
- Using back reference before the capturing group sometimes works with the old
engine, can we do this with the new engine? E.g. with
"/\%(<\1>\)\@<=.*\%(<\/\(\w\+\)>\)\@=" matching text inside HTML tags.
This problem is probably the same: "\%(^\1.*$\n\)\@<=\(\d\+\).*$".
(guotuofeng, 2015 Jun 22)
- Strange matching with "\(Hello\n\)\@<=A". (Anas Syed, 2015 Feb 12)
- Problem with \v(A)@<=b+\1c. (Issue 334)
- Diff highlighting can be very slow. (Issue 309)
- Using %> for a virtual column has a check based on 'tabsize'. Better would
be to cache the result of win_linetabsize(col), storing both col and vcol,
and use them to decide whether win_linetabsize() needs to be called. Reset
col and vcol when moving to another line.
- this doesn't work: "syntax match ErrorMsg /.\%9l\%>20c\&\%<28c/". Leaving
out the \& works. Seems any column check after \& fails.
- Difference between two engines: ".*\zs\/\@>\/" on text "///"
(Chris Paul, 2016 Nov 13) New engine not greedy enough?
Another one: echom matchstr(" sdfsfsf\n sfdsdfsdf",'[^\n]*')
(2017 May 15, #1252)
Patch to add "cmdline" completion to getcompletion(). (Shougo, Oct 1, #1140)
Feature request: Complete members of a dictionary. (Luc Hermitte, 2017 Jan 4,
@@ -855,9 +832,6 @@ emoji_width table has only one entry.
It's possible to add ",," to 'wildignore', an empty entry. Causes problems.
Reject the value? #710.
Patch to fix increment/decrement not working properly when 'virtualedit' is
set. (Hirohito Higashi, 2016 Aug 1, #923)
When doing "vi buf.md" a BufNew autocommand for *.md is not triggered.
Because of using the initial buffer? (Dun Peal, 2016 May 12)
@@ -887,9 +861,6 @@ Appveyor build with self-installing executable, includes getting most
interfaces: https://github.com/k-takata/vim/tree/chrisbra-appveyor-build
result: https://ci.appveyor.com/project/k-takata/vim/history
Duplication of completion suggestions for ":!hom". Issue 539.
Patch by Christian, 2016 Jan 29
>
Problem that a previous silent ":throw" causes a following try/catch not to
work. (ZyX, 2013 Sep 28) With examples: (Malcolm Rowe, 2015 Dec 24)
@@ -1072,10 +1043,6 @@ Update Aug 14.
When using --remote-tab on MS-Windows 'encoding' hasn't been initialized yet,
the file name ends up encoded wrong. (Raul Coronado, 2015 Dec 21)
Patch for problem with restoring screen on Windows. (Nobuhiro Takasaki, 2015
Sep 10) Update 2018 Jan 4 #2575
Alternate change by Ken Takata.
Example in editing.txt uses $HOME with the expectation that it ends in a
slash. For me it does, but perhaps not for everybody. Add a function that
inserts a slash when needed? pathconcat(dir, path) (Thilo Six, 2015 Aug 12)
@@ -1122,9 +1089,6 @@ Doesn't work completely (Dominique Orban)
Patch to add a "literal" argument to bufnr(). (Olaf Dabrunz, 2015 Aug 4)
Cannot execute the shell when it's in a directory with a space.
Issue #459.
When a session file is created and there are "nofile" buffers, these are not
filled. Need to trigger BufReadCmd autocommands. Also handle deleting the
initial empty buffer better. (ZyX, 2015 March 8)
@@ -1185,7 +1149,7 @@ Patch: On MS-Windows shellescape() may have to triple double quotes.
(Ingo Karkat, 2015 Jan 16)
Patch for variable tabstops. On github (Christian Brabandt, 2014 May 15)
Update 2016 Jun 10, # 857
Update 2018 March 12, #2711
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
@@ -4401,6 +4365,8 @@ Perl interface:
Shared libraries:
8 libcall() can keep the library around instead of always calling dlclose().
(Jason Felice, 2018 Mar 20)
6 Add support for loading shared libraries, and calling functions in it.
:libload internal-name libname
:libunload internal-name
@@ -4623,8 +4589,6 @@ Autocommands:
Error - When an error happens
NormalEnter - Entering Normal mode
ReplaceEnter - Entering Replace mode
CmdEnter - Entering Cmdline mode (with type of cmdline to allow
different mapping)
VisualEnter - Entering Visual mode
*Leave - Leaving a mode (in pair with the above *Enter)
VimLeaveCheck - Before Vim decides to exit, so that it can be cancelled

View File

@@ -1,4 +1,4 @@
*usr_05.txt* For Vim version 8.0. Last change: 2016 Mar 28
*usr_05.txt* For Vim version 8.0. Last change: 2018 Feb 20
VIM USER MANUAL - by Bram Moolenaar
@@ -48,6 +48,14 @@ For MS-DOS and MS-Windows you can use one of these:
$HOME/_vimrc ~
$VIM/_vimrc ~
If you are creating the vimrc file for the first time, it is recommended to
put this line at the top: >
source $VIMRUNTIME/defaults.vim
This initializes Vim for new users (as opposed to traditional Vi users). See
|defaults.vim| for the details.
The vimrc file can contain all the commands that you type after a colon. The
most simple ones are for setting options. For example, if you want Vim to
always start with the 'incsearch' option on, add this line your vimrc file: >

View File

@@ -1,4 +1,4 @@
*usr_24.txt* For Vim version 8.0. Last change: 2006 Jul 23
*usr_24.txt* For Vim version 8.0. Last change: 2018 Mar 18
VIM USER MANUAL - by Bram Moolenaar
@@ -538,8 +538,8 @@ a 16 bit and a 32 bit number (e.g., for a Unicode character): >
*24.9* Digraphs
Some characters are not on the keyboard. For example, the copyright character
(<EFBFBD>). To type these characters in Vim, you use digraphs, where two characters
represent one. To enter a <EFBFBD>, for example, you press three keys: >
(©). To type these characters in Vim, you use digraphs, where two characters
represent one. To enter a ©, for example, you press three keys: >
CTRL-K Co
@@ -549,12 +549,12 @@ To find out what digraphs are available, use the following command: >
Vim will display the digraph table. Here are three lines of it:
AC ~_ 159 NS | 160 !I <EFBFBD> 161 Ct <EFBFBD> 162 Pd <EFBFBD> 163 Cu <EFBFBD> 164 Ye <EFBFBD> 165 ~
BB <EFBFBD> 166 SE <EFBFBD> 167 ': <EFBFBD> 168 Co <EFBFBD> 169 -a <EFBFBD> 170 << <EFBFBD> 171 NO <EFBFBD> 172 ~
-- <EFBFBD> 173 Rg <EFBFBD> 174 'm <EFBFBD> 175 DG <EFBFBD> 176 +- <EFBFBD> 177 2S <EFBFBD> 178 3S <EFBFBD> 179 ~
AC ~_ 159 NS | 160 !I ¡ 161 Ct ¢ 162 Pd £ 163 Cu ¤ 164 Ye ¥ 165 ~
BB ¦ 166 SE § 167 ': ¨ 168 Co © 169 -a ª 170 << « 171 NO ¬ 172 ~
-- ­ 173 Rg ® 174 'm ¯ 175 DG ° 176 +- ± 177 2S ² 178 3S ³ 179 ~
This shows, for example, that the digraph you get by typing CTRL-K Pd is the
character (<EFBFBD>). This is character number 163 (decimal).
character (£). This is character number 163 (decimal).
Pd is short for Pound. Most digraphs are selected to give you a hint about
the character they will produce. If you look through the list you will
understand the logic.
@@ -569,9 +569,9 @@ that combination. Thus CTRL-K dP also works. Since there is no digraph for
You can define your own digraphs. Example: >
:digraph a" <EFBFBD>
:digraph a" ä
This defines that CTRL-K a" inserts an <EFBFBD> character. You can also specify the
This defines that CTRL-K a" inserts an ä character. You can also specify the
character with a decimal number. This defines the same digraph: >
:digraph a" 228

View File

@@ -1,4 +1,4 @@
*usr_41.txt* For Vim version 8.0. Last change: 2017 Dec 02
*usr_41.txt* For Vim version 8.0. Last change: 2018 Mar 03
VIM USER MANUAL - by Bram Moolenaar
@@ -807,6 +807,8 @@ Buffers, windows and the argument list:
getbufinfo() get a list with buffer information
gettabinfo() get a list with tab page information
getwininfo() get a list with window information
getchangelist() get a list of change list entries
getjumplist() get a list of jump list entries
Command line: *command-line-functions*
getcmdline() get the current command line
@@ -883,8 +885,9 @@ Interactive: *interactive-functions*
GUI: *gui-functions*
getfontname() get name of current font being used
getwinposx() X position of the GUI Vim window
getwinposy() Y position of the GUI Vim window
getwinpos() position of the Vim window
getwinposx() X position of the Vim window
getwinposy() Y position of the Vim window
balloon_show() set the balloon content
balloon_split() split a message for a balloon
@@ -922,7 +925,8 @@ Testing: *test-functions*
assert_false() assert that an expression is false
assert_true() assert that an expression is true
assert_exception() assert that a command throws an exception
assert_fails() assert that a function call fails
assert_beeps() assert that a command beeps
assert_fails() assert that a command fails
assert_report() report a test failure
test_alloc_fail() make memory allocation fail
test_autochdir() enable 'autochdir' during startup

View File

@@ -1,4 +1,4 @@
*various.txt* For Vim version 8.0. Last change: 2017 Nov 18
*various.txt* For Vim version 8.0. Last change: 2018 Mar 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -40,23 +40,35 @@ CTRL-L Clear and redraw the screen. The redraw may happen
:as[cii] or *ga* *:as* *:ascii*
ga Print the ascii value of the character under the
cursor in decimal, hexadecimal and octal. For
example, when the cursor is on a 'R':
cursor in decimal, hexadecimal and octal.
Mnemonic: Get Ascii value.
For example, when the cursor is on a 'R':
<R> 82, Hex 52, Octal 122 ~
When the character is a non-standard ASCII character,
but printable according to the 'isprint' option, the
non-printable version is also given. When the
character is larger than 127, the <M-x> form is also
printed. For example:
non-printable version is also given.
When the character is larger than 127, the <M-x> form
is also printed. For example:
<~A> <M-^A> 129, Hex 81, Octal 201 ~
<p> <|~> <M-~> 254, Hex fe, Octal 376 ~
(where <p> is a special character)
The <Nul> character in a file is stored internally as
<NL>, but it will be shown as:
<^@> 0, Hex 00, Octal 000 ~
If the character has composing characters these are
also shown. The value of 'maxcombine' doesn't matter.
Mnemonic: Get Ascii value. {not in Vi}
If the character can be inserted as a digraph, also
output the two characters that can be used to create
the character:
<ö> 246, Hex 00f6, Oct 366, Digr o: ~
This shows you can type CTRL-K o : to insert ö.
{not in Vi}
*g8*
g8 Print the hex values of the bytes used in the
@@ -294,7 +306,7 @@ g8 Print the hex values of the bytes used in the
Here is an overview of the features.
The first column shows the smallest version in which
they are included:
T tiny
T tiny (always)
S small
N normal
B big
@@ -308,7 +320,7 @@ g8 Print the hex values of the bytes used in the
*+acl* |ACL| support included
*+ARP* Amiga only: ARP support included
B *+arabic* |Arabic| language support
N *+autocmd* |:autocmd|, automatic commands
T *+autocmd* |:autocmd|, automatic commands
H *+autoservername* Automatically enable |clientserver|
m *+balloon_eval* |balloon-eval| support in the GUI. Included when
compiling with supported GUI (Motif, GTK, GUI) and
@@ -332,7 +344,7 @@ N *+comments* |'comments'| support
B *+conceal* "conceal" support, see |conceal| |:syn-conceal| etc.
N *+cryptv* encryption support |encryption|
B *+cscope* |cscope| support
m *+cursorbind* |'cursorbind'| support
T *+cursorbind* |'cursorbind'| support
m *+cursorshape* |termcap-cursor-shape| support
m *+debug* Compiled for debugging.
N *+dialog_gui* Support for |:confirm| with GUI dialog.
@@ -340,7 +352,7 @@ N *+dialog_con* Support for |:confirm| with console dialog.
N *+dialog_con_gui* Support for |:confirm| with GUI and console dialog.
N *+diff* |vimdiff| and 'diff'
N *+digraphs* |digraphs| *E196*
m *+directx* Win32 GUI only: DirectX and |'renderoptions'|
*+directx* Win32 GUI only: DirectX and |'renderoptions'|
*+dnd* Support for DnD into the "~ register |quote_~|.
B *+emacs_tags* |emacs-tags| files
N *+eval* expression evaluation |eval.txt|
@@ -372,7 +384,7 @@ B *+langmap* |'langmap'|
N *+libcall* |libcall()|
N *+linebreak* |'linebreak'|, |'breakat'| and |'showbreak'|
N *+lispindent* |'lisp'|
N *+listcmds* Vim commands for the list of buffers |buffer-hidden|
T *+listcmds* Vim commands for the list of buffers |buffer-hidden|
and argument list |:argdelete|
N *+localmap* Support for mappings local to a buffer |:map-local|
m *+lua* |Lua| interface
@@ -417,7 +429,7 @@ N *+reltime* |reltime()| function, 'hlsearch'/'incsearch' timeout,
B *+rightleft* Right to left typing |'rightleft'|
m *+ruby* Ruby interface |ruby|
m *+ruby/dyn* Ruby interface |ruby-dynamic| |/dyn|
N *+scrollbind* |'scrollbind'|
T *+scrollbind* |'scrollbind'|
B *+signs* |:sign|
N *+smartindent* |'smartindent'|
N *+startuptime* |--startuptime| argument
@@ -449,6 +461,7 @@ N *+virtualedit* |'virtualedit'|
S *+visual* Visual mode |Visual-mode| Always enabled since 7.4.200.
N *+visualextra* extra Visual mode commands |blockwise-operators|
N *+vreplace* |gR| and |gr|
*+vtp* on MS-Windows console: support for 'termguicolors'
N *+wildignore* |'wildignore'|
N *+wildmenu* |'wildmenu'|
*+windows* more than one window; Always enabled since 8.0.1118.

View File

@@ -1,4 +1,4 @@
*version6.txt* For Vim version 8.0. Last change: 2014 Aug 29
*version6.txt* For Vim version 8.0. Last change: 2018 Mar 18
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -6103,7 +6103,7 @@ New tutor translations:
Slovak (Lubos Celko)
Greek (Christos Kontas)
German (Joachim Hofmann)
Norwegian (<EFBFBD>yvind Holm)
Norwegian (Øyvind Holm)
New filetype plugins:
Occam (Mario Schweigler)
@@ -6121,13 +6121,13 @@ New compiler plugins:
Modelsim vcom (Paul Baleme)
New menu translations:
Brazilian (Jos<EFBFBD> de Paula)
Brazilian (José de Paula)
British (Mike Williams)
Korean in UTF-8. (Nam SungHyun)
Norwegian (<EFBFBD>yvind Holm)
Norwegian (Øyvind Holm)
Serbian (Aleksandar Jelenak)
New message translation for Norwegian. (<EFBFBD>yvind Holm)
New message translation for Norwegian. (Øyvind Holm)
New color scheme:
desert (Hans Fugal)
@@ -10066,7 +10066,7 @@ Files: src/os_unix.c
Patch 6.2.019 (lang)
Problem: Loading the Portuguese menu causes an error message.
Solution: Join two lines. (Jose Pedro Oliveira, Jos<EFBFBD> de Paula)
Solution: Join two lines. (Jose Pedro Oliveira, José de Paula)
Files: runtime/lang/menu_pt_br.vim
Patch 6.2.020
@@ -12418,7 +12418,7 @@ Files: src/message.c
Patch 6.2.376
Problem: Win32: Ruby interface cannot be dynamically linked with Ruby 1.6.
Solution: Add #ifdefs around use of rb_w32_snprintf(). (Beno<EFBFBD>t Cerrina)
Solution: Add #ifdefs around use of rb_w32_snprintf(). (Benoît Cerrina)
Files: src/if_ruby.c
Patch 6.2.377 (after 6.2.372)
@@ -14320,7 +14320,7 @@ Files: src/edit.c
Patch 6.3.061
Problem: When editing a utf-8 file in an utf-8 xterm and there is a
multi-byte character in the last column, displaying is messed up.
(Jo<EFBFBD>l Rio)
(Joël Rio)
Solution: Check for a multi-byte character, not a multi-column character.
Files: src/screen.c

View File

@@ -1,4 +1,4 @@
*windows.txt* For Vim version 8.0. Last change: 2017 Sep 25
*windows.txt* For Vim version 8.0. Last change: 2018 Mar 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -711,7 +711,6 @@ can also get to them with the buffer list commands, like ":bnext".
When using the |:tab| modifier each argument is opened in a
tab page. The last window is used if it's empty.
Also see |++opt| and |+cmd|.
{only available when compiled with a GUI}
==============================================================================
8. Do a command in all buffers or windows *list-repeat*
@@ -732,8 +731,7 @@ can also get to them with the buffer list commands, like ":bnext".
the current window.
{cmd} can contain '|' to concatenate several commands.
{cmd} must not open or close windows or reorder them.
{not in Vi} {not available when compiled without the
|+listcmds| feature}
{not in Vi}
Also see |:tabdo|, |:argdo|, |:bufdo|, |:cdo|, |:ldo|,
|:cfdo| and |:lfdo|
@@ -761,8 +759,7 @@ can also get to them with the buffer list commands, like ":bnext".
autocommand event is disabled by adding it to
'eventignore'. This considerably speeds up editing
each buffer.
{not in Vi} {not available when compiled without the
|+listcmds| feature}
{not in Vi}
Also see |:tabdo|, |:argdo|, |:windo|, |:cdo|, |:ldo|,
|:cfdo| and |:lfdo|
@@ -975,7 +972,6 @@ is no word under the cursor, and a few other things: >
A hidden buffer is not displayed in a window, but is still loaded into memory.
This makes it possible to jump from file to file, without the need to read or
write the file every time you get another buffer in a window.
{not available when compiled without the |+listcmds| feature}
*:buffer-!*
If the option 'hidden' ('hid') is set, abandoned buffers are kept for all
@@ -1050,6 +1046,9 @@ list of buffers. |unlisted-buffer|
x buffers with a read error
% current buffer
# alternate buffer
R terminal buffers with a running job
F terminal buffers with a finished job
? terminal buffers without a job: `:terminal NONE`
Combining flags means they are "and"ed together, e.g.:
h+ hidden buffers which are modified
a+ active buffers which are modified

View File

@@ -57,7 +57,7 @@ are all equivalent.
.PP
.TP
.IR \-a " | " \-autoskip
toggle autoskip: A single '*' replaces nul-lines. Default off.
Toggle autoskip: A single '*' replaces nul-lines. Default off.
.TP
.IR \-b " | " \-bits
Switch to bits (binary digits) dump, rather than hexdump.
@@ -67,10 +67,13 @@ followed by an ascii (or ebcdic) representation. The command line switches
\-r, \-p, \-i do not work with this mode.
.TP
.IR "\-c cols " | " \-cols cols"
format
Format
.RI < cols >
octets per line. Default 16 (\-i: 12, \-ps: 30, \-b: 6). Max 256.
.TP
.IR \-C " | " \-capitalize
Capitalize variable names in C include file style, when using \-i.
.TP
.IR \-E " | " \-EBCDIC
Change the character encoding in the righthand column from ASCII to EBCDIC.
This does not change the hexadecimal representation. The option is
@@ -87,7 +90,7 @@ The command line switches
\-r, \-p, \-i do not work with this mode.
.TP
.IR "\-g bytes " | " \-groupsize bytes"
separate the output of every
Separate the output of every
.RI < bytes >
bytes (two hex characters or eight bit-digits each) by a whitespace.
Specify
@@ -98,28 +101,28 @@ in normal mode, \fI4\fP in little-endian mode and \fI1\fP in bits mode.
Grouping does not apply to postscript or include style.
.TP
.IR \-h " | " \-help
print a summary of available commands and exit. No hex dumping is performed.
Print a summary of available commands and exit. No hex dumping is performed.
.TP
.IR \-i " | " \-include
output in C include file style. A complete static array definition is written
Output in C include file style. A complete static array definition is written
(named after the input file), unless xxd reads from stdin.
.TP
.IR "\-l len " | " \-len len"
stop after writing
Stop after writing
.RI < len >
octets.
.TP
.I \-o offset
add
Add
.RI < offset >
to the displayed file position.
.TP
.IR \-p " | " \-ps " | " \-postscript " | " \-plain
output in postscript continuous hexdump style. Also known as plain hexdump
Output in postscript continuous hexdump style. Also known as plain hexdump
style.
.TP
.IR \-r " | " \-revert
reverse operation: convert (or patch) hexdump into binary.
Reverse operation: convert (or patch) hexdump into binary.
If not writing to stdout, xxd writes into its output file without truncating
it. Use the combination
.I \-r \-p
@@ -135,7 +138,7 @@ revert with
added to file positions found in hexdump.
.TP
.I \-s [+][\-]seek
start at
Start at
.RI < seek >
bytes abs. (or rel.) infile offset.
\fI+ \fRindicates that the seek is relative to the current stdin file position
@@ -145,10 +148,10 @@ should be that many characters from the end of the input (or if combined with
Without \-s option, xxd starts at the current file position.
.TP
.I \-u
use upper case hex letters. Default is lower case.
Use upper case hex letters. Default is lower case.
.TP
.IR \-v " | " \-version
show version string.
Show version string.
.SH CAVEATS
.PP
.I xxd \-r

View File

@@ -30,7 +30,7 @@ OPTIONS
notation. Thus -c8, -c 8, -c 010 and -cols 8 are all equivalent.
-a | -autoskip
toggle autoskip: A single '*' replaces nul-lines. Default off.
Toggle autoskip: A single '*' replaces nul-lines. Default off.
-b | -bits
Switch to bits (binary digits) dump, rather than hexdump. This
@@ -41,9 +41,13 @@ OPTIONS
mode.
-c cols | -cols cols
format <cols> octets per line. Default 16 (-i: 12, -ps: 30, -b:
Format <cols> octets per line. Default 16 (-i: 12, -ps: 30, -b:
6). Max 256.
-C | -capitalize
Capitalize variable names in C include file style, when using
-i.
-E | -EBCDIC
Change the character encoding in the righthand column from ASCII
to EBCDIC. This does not change the hexadecimal representation.
@@ -52,41 +56,41 @@ OPTIONS
-e Switch to little-endian hexdump. This option treats byte groups
as words in little-endian byte order. The default grouping of 4
bytes may be changed using -g. This option only applies to hex
dump, leaving the ASCII (or EBCDIC) representation unchanged.
dump, leaving the ASCII (or EBCDIC) representation unchanged.
The command line switches -r, -p, -i do not work with this mode.
-g bytes | -groupsize bytes
separate the output of every <bytes> bytes (two hex characters
Separate the output of every <bytes> bytes (two hex characters
or eight bit-digits each) by a whitespace. Specify -g 0 to sup
press grouping. <Bytes> defaults to 2 in normal mode, 4 in lit
tle-endian mode and 1 in bits mode. Grouping does not apply to
tle-endian mode and 1 in bits mode. Grouping does not apply to
postscript or include style.
-h | -help
print a summary of available commands and exit. No hex dumping
Print a summary of available commands and exit. No hex dumping
is performed.
-i | -include
output in C include file style. A complete static array defini
tion is written (named after the input file), unless xxd reads
Output in C include file style. A complete static array defini
tion is written (named after the input file), unless xxd reads
from stdin.
-l len | -len len
stop after writing <len> octets.
Stop after writing <len> octets.
-o offset
add <offset> to the displayed file position.
Add <offset> to the displayed file position.
-p | -ps | -postscript | -plain
output in postscript continuous hexdump style. Also known as
Output in postscript continuous hexdump style. Also known as
plain hexdump style.
-r | -revert
reverse operation: convert (or patch) hexdump into binary. If
not writing to stdout, xxd writes into its output file without
Reverse operation: convert (or patch) hexdump into binary. If
not writing to stdout, xxd writes into its output file without
truncating it. Use the combination -r -p to read plain hexadeci
mal dumps without line number information and without a particu
lar column layout. Additional Whitespace and line-breaks are
lar column layout. Additional Whitespace and line-breaks are
allowed anywhere.
-seek offset
@@ -94,34 +98,34 @@ OPTIONS
found in hexdump.
-s [+][-]seek
start at <seek> bytes abs. (or rel.) infile offset. + indicates
that the seek is relative to the current stdin file position
Start at <seek> bytes abs. (or rel.) infile offset. + indicates
that the seek is relative to the current stdin file position
(meaningless when not reading from stdin). - indicates that the
seek should be that many characters from the end of the input
seek should be that many characters from the end of the input
(or if combined with +: before the current stdin file position).
Without -s option, xxd starts at the current file position.
-u use upper case hex letters. Default is lower case.
-u Use upper case hex letters. Default is lower case.
-v | -version
show version string.
Show version string.
CAVEATS
xxd -r has some builtin magic while evaluating line number information.
If the output file is seekable, then the linenumbers at the start of
each hexdump line may be out of order, lines may be missing, or over
lapping. In these cases xxd will lseek(2) to the next position. If the
output file is not seekable, only gaps are allowed, which will be
If the output file is seekable, then the linenumbers at the start of
each hexdump line may be out of order, lines may be missing, or over
lapping. In these cases xxd will lseek(2) to the next position. If the
output file is not seekable, only gaps are allowed, which will be
filled by null-bytes.
xxd -r never generates parse errors. Garbage is silently skipped.
When editing hexdumps, please note that xxd -r skips everything on the
When editing hexdumps, please note that xxd -r skips everything on the
input line after reading enough columns of hexadecimal data (see option
-c). This also means, that changes to the printable ascii (or ebcdic)
columns are always ignored. Reverting a plain (or postscript) style
hexdump with xxd -r -p does not depend on the correct number of col
umns. Here anything that looks like a pair of hex-digits is inter
-c). This also means, that changes to the printable ascii (or ebcdic)
columns are always ignored. Reverting a plain (or postscript) style
hexdump with xxd -r -p does not depend on the correct number of col
umns. Here anything that looks like a pair of hex-digits is inter
preted.
Note the difference between
@@ -129,28 +133,28 @@ CAVEATS
and
% xxd -i < file
xxd -s +seek may be different from xxd -s seek, as lseek(2) is used to
xxd -s +seek may be different from xxd -s seek, as lseek(2) is used to
"rewind" input. A '+' makes a difference if the input source is stdin,
and if stdin's file position is not at the start of the file by the
time xxd is started and given its input. The following examples may
and if stdin's file position is not at the start of the file by the
time xxd is started and given its input. The following examples may
help to clarify (or further confuse!)...
Rewind stdin before reading; needed because the `cat' has already read
Rewind stdin before reading; needed because the `cat' has already read
to the end of stdin.
% sh -c "cat > plain_copy; xxd -s 0 > hex_copy" < file
Hexdump from file position 0x480 (=1024+128) onwards. The `+' sign
Hexdump from file position 0x480 (=1024+128) onwards. The `+' sign
means "relative to the current position", thus the `128' adds to the 1k
where dd left off.
% sh -c "dd of=plain_snippet bs=1k count=1; xxd -s +128 > hex_snippet"
% sh -c "dd of=plain_snippet bs=1k count=1; xxd -s +128 > hex_snippet"
< file
Hexdump from file position 0x100 ( = 1024-768) on.
% sh -c "dd of=plain_snippet bs=1k count=1; xxd -s +-768 > hex_snippet"
< file
However, this is a rare situation and the use of `+' is rarely needed.
The author prefers to monitor the effect of xxd with strace(1) or
However, this is a rare situation and the use of `+' is rarely needed.
The author prefers to monitor the effect of xxd with strace(1) or
truss(1), whenever -s is used.
EXAMPLES
@@ -194,7 +198,7 @@ EXAMPLES
% xxd -s 0x36 -l 13 -c 13 xxd.1
0000036: 3235 7468 204d 6179 2031 3939 36 25th May 1996
Create a 65537 byte file with all bytes 0x00, except for the last one
Create a 65537 byte file with all bytes 0x00, except for the last one
which is 'A' (hex 0x41).
% echo "010000: 41" | xxd -r > file
@@ -204,7 +208,7 @@ EXAMPLES
*
000fffc: 0000 0000 40 ....A
Create a 1 byte file containing a single 'A' character. The number
Create a 1 byte file containing a single 'A' character. The number
after '-r -s' adds to the linenumbers found in the file; in effect, the
leading bytes are suppressed.
% echo "010000: 41" | xxd -r -s -0x10000 > file
@@ -245,7 +249,7 @@ SEE ALSO
uuencode(1), uudecode(1), patch(1)
WARNINGS
The tools weirdness matches its creators brain. Use entirely at your
The tools weirdness matches its creators brain. Use entirely at your
own risk. Copy files. Trace it. Become a wizard.
VERSION

View File

@@ -0,0 +1,54 @@
" CHICKEN-specific Vim customizations
" Last Change: 2018-03-05
" Author: Evan Hanson <evhan@foldling.org>
" Maintainer: Evan Hanson <evhan@foldling.org>
" URL: https://foldling.org/vim/ftplugin/chicken.vim
" Notes: These are supplemental settings, to be loaded after the core
" Scheme ftplugin file (ftplugin/scheme.vim). Enable it by setting
" b:is_chicken=1 and filetype=scheme.
if !exists('b:did_scheme_ftplugin')
finish
endif
setl keywordprg=chicken-doc
setl lispwords+=and-let*
setl lispwords+=compiler-typecase
setl lispwords+=condition-case
setl lispwords+=define-compiler-syntax
setl lispwords+=define-constant
setl lispwords+=define-external
setl lispwords+=define-for-syntax
setl lispwords+=define-foreign-type
setl lispwords+=define-inline
setl lispwords+=define-location
setl lispwords+=define-record
setl lispwords+=define-record-printer
setl lispwords+=define-specialization
setl lispwords+=fluid-let
setl lispwords+=foreign-lambda*
setl lispwords+=foreign-primitive
setl lispwords+=foreign-safe-lambda*
setl lispwords+=functor
setl lispwords+=handle-exceptions
setl lispwords+=let-compiler-syntax
setl lispwords+=let-location
setl lispwords+=let-optionals
setl lispwords+=let-optionals*
setl lispwords+=letrec-values
setl lispwords+=match
setl lispwords+=match-let
setl lispwords+=match-let*
setl lispwords+=match-letrec
setl lispwords+=module
setl lispwords+=receive
setl lispwords+=set!-values
setl lispwords+=test-group
let b:undo_ftplugin = b:undo_ftplugin . ' keywordprg<'
if exists('g:loaded_matchit') && !exists('b:match_words')
let b:match_words = '#>:<#'
let b:undo_ftplugin = b:undo_ftplugin . ' | unlet! b:match_words'
endif

View File

@@ -1,11 +1,11 @@
" Vim filetype plugin file (GUI menu, folding and completion)
" Language: Debian Changelog
" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
" Maintainer: Debian Vim Maintainers
" Former Maintainers: Michael Piefel <piefel@informatik.hu-berlin.de>
" Stefano Zacchiroli <zack@debian.org>
" Last Change: 2014-01-31
" Last Change: 2018-01-06
" License: Vim License
" URL: http://hg.debian.org/hg/pkg-vim/vim/file/unstable/runtime/ftplugin/debchangelog.vim
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/ftplugin/debchangelog.vim
" Bug completion requires apt-listbugs installed for Debian packages or
" python-launchpadlib installed for Ubuntu packages

View File

@@ -1,9 +1,9 @@
" Vim filetype plugin file (GUI menu and folding)
" Language: Debian control files
" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
" Maintainer: Debian Vim Maintainers
" Former Maintainer: Pierre Habouzit <madcoder@debian.org>
" Last Change: 2008-03-08
" URL: http://hg.debian.org/hg/pkg-vim/vim/raw-file/tip/runtime/ftplugin/debcontrol.vim
" Last Change: 2018-01-06
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/ftplugin/debcontrol.vim
" Do these settings once per buffer
if exists("b:did_ftplugin")

View File

@@ -3,7 +3,7 @@
" Maintainer: Tom Picton <tom@tompicton.co.uk>
" Previous Maintainer: James Sully <sullyj3@gmail.com>
" Previous Maintainer: Johannes Zellner <johannes@zellner.org>
" Last Change: Wed, 20 December 2017
" Last Change: Sun, 18 March 2018
" https://github.com/tpict/vim-ftplugin-python
if exists("b:did_ftplugin") | finish | endif
@@ -14,7 +14,25 @@ set cpo&vim
setlocal cinkeys-=0#
setlocal indentkeys-=0#
setlocal include=^\\s*\\(from\\\|import\\)
setlocal includeexpr=substitute(v:fname,'\\.','/','g')
" For imports with leading .., append / and replace additional .s with ../
let b:grandparent_match = '^\(.\.\)\(\.*\)'
let b:grandparent_sub = '\=submatch(1)."/".repeat("../",strlen(submatch(2)))'
" For imports with a single leading ., replace it with ./
let b:parent_match = '^\.\(\.\)\@!'
let b:parent_sub = './'
" Replace any . sandwiched between word characters with /
let b:child_match = '\(\w\)\.\(\w\)'
let b:child_sub = '\1/\2'
setlocal includeexpr=substitute(substitute(substitute(
\v:fname,
\b:grandparent_match,b:grandparent_sub,''),
\b:parent_match,b:parent_sub,''),
\b:child_match,b:child_sub,'g')
setlocal suffixesadd=.py
setlocal comments=b:#,fb:-
setlocal commentstring=#\ %s

View File

@@ -1,45 +1,57 @@
" Vim filetype plugin
" Language: Scheme
" Maintainer: Sergey Khorev <sergey.khorev@gmail.com>
" URL: http://sites.google.com/site/khorser/opensource/vim
" Original author: Dorai Sitaram <ds26@gte.com>
" Original URL: http://www.ccs.neu.edu/~dorai/vimplugins/vimplugins.html
" Last Change: Oct 23, 2013
" Vim filetype plugin file
" Language: Scheme (R7RS)
" Last Change: 2018-03-05
" Author: Evan Hanson <evhan@foldling.org>
" Maintainer: Evan Hanson <evhan@foldling.org>
" Previous Maintainer: Sergey Khorev <sergey.khorev@gmail.com>
" URL: https://foldling.org/vim/ftplugin/scheme.vim
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
if exists('b:did_ftplugin')
finish
endif
" Don't load another plugin for this buffer
let b:did_ftplugin = 1
let s:cpo = &cpo
set cpo&vim
" Copy-paste from ftplugin/lisp.vim
setl comments=:;
setl define=^\\s*(def\\k*
setl formatoptions-=t
setl iskeyword+=+,-,*,/,%,<,=,>,:,$,?,!,@-@,94
setl lisp
setl comments=:;;;;,:;;;,:;;,:;,sr:#\|,mb:\|,ex:\|#
setl commentstring=;%s
setl define=^\\s*(def\\k*
setl iskeyword=33,35-39,42-43,45-58,60-90,94,95,97-122,126
setl comments^=:;;;,:;;,sr:#\|,mb:\|,ex:\|#
let b:undo_ftplugin = 'setl lisp< comments< commentstring< define< iskeyword<'
" Scheme-specific settings
if exists("b:is_mzscheme") || exists("is_mzscheme")
" improve indenting
setl iskeyword+=#,%,^
setl lispwords+=module,parameterize,let-values,let*-values,letrec-values
setl lispwords+=define-values,opt-lambda,case-lambda,syntax-rules,with-syntax,syntax-case
setl lispwords+=define-signature,unit,unit/sig,compund-unit/sig,define-values/invoke-unit/sig
setl lispwords=case
setl lispwords+=define
setl lispwords+=define-record-type
setl lispwords+=define-syntax
setl lispwords+=define-values
setl lispwords+=do
setl lispwords+=guard
setl lispwords+=lambda
setl lispwords+=let
setl lispwords+=let*
setl lispwords+=let*-values
setl lispwords+=let-syntax
setl lispwords+=let-values
setl lispwords+=letrec
setl lispwords+=letrec*
setl lispwords+=letrec-syntax
setl lispwords+=parameterize
setl lispwords+=set!
setl lispwords+=syntax-rules
setl lispwords+=unless
setl lispwords+=when
let b:undo_ftplugin = b:undo_ftplugin . ' lispwords<'
let b:did_scheme_ftplugin = 1
if exists('b:is_chicken') || exists('g:is_chicken')
exe 'ru! ftplugin/chicken.vim'
endif
if exists("b:is_chicken") || exists("is_chicken")
" improve indenting
setl iskeyword+=#,%,^
setl lispwords+=let-optionals,let-optionals*,declare
setl lispwords+=let-values,let*-values,letrec-values
setl lispwords+=define-values,opt-lambda,case-lambda,syntax-rules,with-syntax,syntax-case
setl lispwords+=cond-expand,and-let*,foreign-lambda,foreign-lambda*
endif
let b:undo_ftplugin = "setlocal comments< define< formatoptions< iskeyword< lispwords< lisp< commentstring<"
unlet b:did_scheme_ftplugin
let b:did_ftplugin = 1
let &cpo = s:cpo
unlet s:cpo

View File

@@ -2,7 +2,7 @@
" Header: "{{{
" Maintainer: Bram Moolenaar
" Original Author: Andy Wokula <anwoku@yahoo.de>
" Last Change: 2017 Jun 13
" Last Change: 2018 Mar 28
" Version: 1.0
" Description: HTML indent script with cached state for faster indenting on a
" range of lines.
@@ -56,6 +56,9 @@ let s:cpo_save = &cpo
set cpo-=C
"}}}
" Pattern to match the name of a tag, including custom elements.
let s:tagname = '\w\+\(-\w\+\)*'
" Check and process settings from b:html_indent and g:html_indent... variables.
" Prefer using buffer-local settings over global settings, so that there can
" be defaults for all HTML files and exceptions for specific types of HTML
@@ -213,7 +216,8 @@ endfunc "}}}
" Add known tag pairs.
" Self-closing tags and tags that are sometimes {{{
" self-closing (e.g., <p>) are not here (when encountering </p> we can find
" the matching <p>, but not the other way around).
" the matching <p>, but not the other way around). Known self-closing tags:
" 'p', 'img', 'source'.
" Old HTML tags:
call s:AddITags(s:indent_tags, [
\ 'a', 'abbr', 'acronym', 'address', 'b', 'bdo', 'big',
@@ -230,9 +234,9 @@ call s:AddITags(s:indent_tags, [
call s:AddITags(s:indent_tags, [
\ 'area', 'article', 'aside', 'audio', 'bdi', 'canvas',
\ 'command', 'data', 'datalist', 'details', 'embed', 'figcaption',
\ 'figure', 'footer', 'header', 'keygen', 'mark', 'meter', 'nav', 'output',
\ 'progress', 'rp', 'rt', 'ruby', 'section', 'source', 'summary', 'svg',
\ 'time', 'track', 'video', 'wbr'])
\ 'figure', 'footer', 'header', 'keygen', 'main', 'mark', 'meter',
\ 'nav', 'output', 'picture', 'progress', 'rp', 'rt', 'ruby', 'section',
\ 'summary', 'svg', 'time', 'track', 'video', 'wbr'])
" Tags added for web components:
call s:AddITags(s:indent_tags, [
@@ -280,7 +284,7 @@ func! s:CountITags(text)
let s:nextrel = 0 " relative indent steps for next line [unit &sw]:
let s:block = 0 " assume starting outside of a block
let s:countonly = 1 " don't change state
call substitute(a:text, '<\zs/\=\w\+\(-\w\+\)*\>\|<!--\[\|\[endif\]-->\|<!--\|-->', '\=s:CheckTag(submatch(0))', 'g')
call substitute(a:text, '<\zs/\=' . s:tagname . '\>\|<!--\[\|\[endif\]-->\|<!--\|-->', '\=s:CheckTag(submatch(0))', 'g')
let s:countonly = 0
endfunc "}}}
@@ -292,7 +296,7 @@ func! s:CountTagsAndState(text)
let s:nextrel = 0 " relative indent steps for next line [unit &sw]:
let s:block = b:hi_newstate.block
let tmp = substitute(a:text, '<\zs/\=\w\+\(-\w\+\)*\>\|<!--\[\|\[endif\]-->\|<!--\|-->', '\=s:CheckTag(submatch(0))', 'g')
let tmp = substitute(a:text, '<\zs/\=' . s:tagname . '\>\|<!--\[\|\[endif\]-->\|<!--\|-->', '\=s:CheckTag(submatch(0))', 'g')
if s:block == 3
let b:hi_newstate.scripttype = s:GetScriptType(matchstr(tmp, '\C.*<SCRIPT\>\zs[^>]*'))
endif
@@ -530,7 +534,7 @@ func! s:FreshState(lnum)
let swendtag = match(text, '^\s*</') >= 0
" If previous line ended in a closing tag, line up with the opening tag.
if !swendtag && text =~ '</\w\+\s*>\s*$'
if !swendtag && text =~ '</' . s:tagname . '\s*>\s*$'
call cursor(state.lnum, 99999)
normal! F<
let start_lnum = HtmlIndent_FindStartTag()
@@ -860,7 +864,7 @@ func! HtmlIndent_FindStartTag()
" The cursor must be on or before a closing tag.
" If found, positions the cursor at the match and returns the line number.
" Otherwise returns 0.
let tagname = matchstr(getline('.')[col('.') - 1:], '</\zs\w\+\ze')
let tagname = matchstr(getline('.')[col('.') - 1:], '</\zs' . s:tagname . '\ze')
let start_lnum = searchpair('<' . tagname . '\>', '', '</' . tagname . '\>', 'bW')
if start_lnum > 0
return start_lnum
@@ -876,7 +880,7 @@ func! HtmlIndent_FindTagEnd()
" a self-closing tag, to the matching ">".
" Limited to look up to b:html_indent_line_limit lines away.
let text = getline('.')
let tagname = matchstr(text, '\w\+\|!--', col('.'))
let tagname = matchstr(text, s:tagname . '\|!--', col('.'))
if tagname == '!--'
call search('--\zs>')
elseif s:get_tag('/' . tagname) != 0
@@ -921,9 +925,22 @@ func! s:InsideTag(foundHtmlString)
else
let idx = match(text, '\s\zs[_a-zA-Z0-9-]\+="')
endif
if idx == -1
" try <tag attr
let idx = match(text, '<' . s:tagname . '\s\+\zs\w')
endif
if idx == -1
" after just <tag indent one level more
let idx = match(text, '<' . s:tagname . '$')
if idx >= 0
call cursor(lnum, idx)
return virtcol('.') + shiftwidth()
endif
endif
if idx > 0
" Found the attribute. TODO: assumes spaces, no Tabs.
return idx
" Found the attribute to align with.
call cursor(lnum, idx)
return virtcol('.')
endif
endwhile
return -1

View File

@@ -1,11 +1,14 @@
" Vim indent file
" Language: Scheme
" Maintainer: Sergey Khorev <sergey.khorev@gmail.com>
" Last Change: 2005 Jun 24
" Language: Scheme
" Last Change: 2018 Jan 31
" Maintainer: Evan Hanson <evhan@foldling.org>
" Previous Maintainer: Sergey Khorev <sergey.khorev@gmail.com>
" URL: https://foldling.org/vim/indent/scheme.vim
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
finish
endif
" Use the Lisp indenting
runtime! indent/lisp.vim

View File

@@ -0,0 +1,143 @@
" Maintainer: Oliver Corff <oliver.corff@email.de>
" Last Changed: 2018 Feb 12
scriptencoding utf-8
" oto = Old Turkic, Orkhon
let b:keymap_name = "oto"
highlight lCursor guibg=red guifg=NONE
" map F8 to toggle keymap (Ctrl-^ not present on keyboard)
noremap <F8> :let &iminsert = ! &iminsert<CR>
lnoremap <F8> <C-^>
noremap! <F8> <C-^>
loadkeymap
A 𐰀 10C00 OLD TURKIC LETTER ORKHON A
00 𐰀 10C00 OLD TURKIC LETTER ORKHON A
I 𐰃 10C03 OLD TURKIC LETTER ORKHON I
03 𐰃 10C03 OLD TURKIC LETTER ORKHON I
O 𐰆 10C06 OLD TURKIC LETTER ORKHON O
U 𐰆 10C06 OLD TURKIC LETTER ORKHON O
06 𐰆 10C06 OLD TURKIC LETTER ORKHON O
OE 𐰇 10C07 OLD TURKIC LETTER ORKHON OE
UE 𐰇 10C07 OLD TURKIC LETTER ORKHON OE
07 𐰇 10C07 OLD TURKIC LETTER ORKHON OE
ab 𐰉 10C09 OLD TURKIC LETTER ORKHON AB
b1 𐰉 10C09 OLD TURKIC LETTER ORKHON AB
09 𐰉 10C09 OLD TURKIC LETTER ORKHON AB
aeb 𐰋 10C0B OLD TURKIC LETTER ORKHON AEB
eb 𐰋 10C0B OLD TURKIC LETTER ORKHON AEB
b2 𐰋 10C0B OLD TURKIC LETTER ORKHON AEB
0b 𐰋 10C0B OLD TURKIC LETTER ORKHON AEB
ag 𐰍 10C0D OLD TURKIC LETTER ORKHON AG
g1 𐰍 10C0D OLD TURKIC LETTER ORKHON AG
0d 𐰍 10C0D OLD TURKIC LETTER ORKHON AG
aeg 𐰏 10C0F OLD TURKIC LETTER ORKHON AEG
eg 𐰏 10C0F OLD TURKIC LETTER ORKHON AEG
g2 𐰏 10C0F OLD TURKIC LETTER ORKHON AEG
0f 𐰏 10C0F OLD TURKIC LETTER ORKHON AEG
ad 𐰑 10C11 OLD TURKIC LETTER ORKHON AD
d1 𐰑 10C11 OLD TURKIC LETTER ORKHON AD
11 𐰑 10C11 OLD TURKIC LETTER ORKHON AD
aed 𐰓 10C13 OLD TURKIC LETTER ORKHON AED
ed 𐰓 10C13 OLD TURKIC LETTER ORKHON AED
d2 𐰓 10C13 OLD TURKIC LETTER ORKHON AED
13 𐰓 10C13 OLD TURKIC LETTER ORKHON AED
ez 𐰔 10C14 OLD TURKIC LETTER ORKHON EZ
z 𐰔 10C14 OLD TURKIC LETTER ORKHON EZ
14 𐰔 10C14 OLD TURKIC LETTER ORKHON EZ
ay 𐰖 10C16 OLD TURKIC LETTER ORKHON AY
y1 𐰖 10C16 OLD TURKIC LETTER ORKHON AY
16 𐰖 10C16 OLD TURKIC LETTER ORKHON AY
aey 𐰘 10C18 OLD TURKIC LETTER ORKHON AEY
ey 𐰘 10C18 OLD TURKIC LETTER ORKHON AEY
y2 𐰘 10C18 OLD TURKIC LETTER ORKHON AEY
18 𐰘 10C18 OLD TURKIC LETTER ORKHON AEY
aek 𐰚 10C1A OLD TURKIC LETTER ORKHON AEK
k 𐰚 10C1A OLD TURKIC LETTER ORKHON AEK
1a 𐰚 10C1A OLD TURKIC LETTER ORKHON AEK
oek 𐰜 10C1C OLD TURKIC LETTER ORKHON OEK
q 𐰜 10C1C OLD TURKIC LETTER ORKHON OEK
1c 𐰜 10C1C OLD TURKIC LETTER ORKHON OEK
al 𐰞 10C1E OLD TURKIC LETTER ORKHON AL
l1 𐰞 10C1E OLD TURKIC LETTER ORKHON AL
1e 𐰞 10C1E OLD TURKIC LETTER ORKHON AL
ael 𐰠 10C20 OLD TURKIC LETTER ORKHON AEL
el 𐰠 10C20 OLD TURKIC LETTER ORKHON AEL
l2 𐰠 10C20 OLD TURKIC LETTER ORKHON AEL
20 𐰠 10C20 OLD TURKIC LETTER ORKHON AEL
elt 𐰡 10C21 OLD TURKIC LETTER ORKHON ELT
lt 𐰡 10C21 OLD TURKIC LETTER ORKHON ELT
21 𐰡 10C21 OLD TURKIC LETTER ORKHON ELT
em 𐰢 10C22 OLD TURKIC LETTER ORKHON EM
m 𐰢 10C22 OLD TURKIC LETTER ORKHON EM
22 𐰢 10C22 OLD TURKIC LETTER ORKHON EM
an 𐰣 10C23 OLD TURKIC LETTER ORKHON AN
n1 𐰣 10C23 OLD TURKIC LETTER ORKHON AN
23 𐰣 10C23 OLD TURKIC LETTER ORKHON AN
en 𐰤 10C24 OLD TURKIC LETTER ORKHON AEN
n2 𐰤 10C24 OLD TURKIC LETTER ORKHON AEN
24 𐰤 10C24 OLD TURKIC LETTER ORKHON AEN
ent 𐰦 10C26 OLD TURKIC LETTER ORKHON ENT
nt 𐰦 10C26 OLD TURKIC LETTER ORKHON ENT
26 𐰦 10C26 OLD TURKIC LETTER ORKHON ENT
enc 𐰨 10C28 OLD TURKIC LETTER ORKHON ENC
nc 𐰨 10C28 OLD TURKIC LETTER ORKHON ENC
28 𐰨 10C28 OLD TURKIC LETTER ORKHON ENC
eny 𐰪 10C2A OLD TURKIC LETTER ORKHON ENY
ny 𐰪 10C2A OLD TURKIC LETTER ORKHON ENY
2a 𐰪 10C2A OLD TURKIC LETTER ORKHON ENY
eng 𐰭 10C2D OLD TURKIC LETTER ORKHON ENG
ng 𐰭 10C2D OLD TURKIC LETTER ORKHON ENG
2d 𐰭 10C2D OLD TURKIC LETTER ORKHON ENG
ep 𐰯 10C2F OLD TURKIC LETTER ORKHON EP
p 𐰯 10C2F OLD TURKIC LETTER ORKHON EP
2f 𐰯 10C2F OLD TURKIC LETTER ORKHON EP
op 𐰰 10C30 OLD TURKIC LETTER ORKHON OP
up 𐰰 10C30 OLD TURKIC LETTER ORKHON OP
30 𐰰 10C30 OLD TURKIC LETTER ORKHON OP
ic 𐰱 10C31 OLD TURKIC LETTER ORKHON IC
31 𐰱 10C31 OLD TURKIC LETTER ORKHON IC
ec 𐰲 10C32 OLD TURKIC LETTER ORKHON EC
32 𐰲 10C32 OLD TURKIC LETTER ORKHON EC
aq 𐰴 10C34 OLD TURKIC LETTER ORKHON AQ
34 𐰴 10C34 OLD TURKIC LETTER ORKHON AQ
iq 𐰶 10C36 OLD TURKIC LETTER ORKHON IQ
yq 𐰶 10C36 OLD TURKIC LETTER ORKHON IQ
36 𐰶 10C36 OLD TURKIC LETTER ORKHON IQ
oq 𐰸 10C38 OLD TURKIC LETTER ORKHON OQ
uq 𐰸 10C38 OLD TURKIC LETTER ORKHON OQ
38 𐰸 10C38 OLD TURKIC LETTER ORKHON OQ
ar 𐰺 10C3A OLD TURKIC LETTER ORKHON AR
r1 𐰺 10C3A OLD TURKIC LETTER ORKHON AR
3a 𐰺 10C3A OLD TURKIC LETTER ORKHON AR
aer 𐰼 10C3C OLD TURKIC LETTER ORKHON AER
er 𐰼 10C3C OLD TURKIC LETTER ORKHON AER
r2 𐰼 10C3C OLD TURKIC LETTER ORKHON AER
3c 𐰼 10C3C OLD TURKIC LETTER ORKHON AER
as 𐰽 10C3D OLD TURKIC LETTER ORKHON AS
s1 𐰽 10C3D OLD TURKIC LETTER ORKHON AS
3d 𐰽 10C3D OLD TURKIC LETTER ORKHON AS
aes 𐰾 10C3E OLD TURKIC LETTER ORKHON AES
es 𐰾 10C3E OLD TURKIC LETTER ORKHON AES
s2 𐰾 10C3E OLD TURKIC LETTER ORKHON AES
3e 𐰾 10C3E OLD TURKIC LETTER ORKHON AES
ash 𐰿 10C3F OLD TURKIC LETTER ORKHON ASH
sh1 𐰿 10C3F OLD TURKIC LETTER ORKHON ASH
3f 𐰿 10C3F OLD TURKIC LETTER ORKHON ASH
esh 𐱁 10C41 OLD TURKIC LETTER ORKHON ESH
sh2 𐱁 10C41 OLD TURKIC LETTER ORKHON ESH
41 𐱁 10C41 OLD TURKIC LETTER ORKHON ESH
at 𐱃 10C43 OLD TURKIC LETTER ORKHON AT
t1 𐱃 10C43 OLD TURKIC LETTER ORKHON AT
43 𐱃 10C43 OLD TURKIC LETTER ORKHON AT
aet 𐱅 10C45 OLD TURKIC LETTER ORKHON AET
et 𐱅 10C45 OLD TURKIC LETTER ORKHON AET
t2 𐱅 10C45 OLD TURKIC LETTER ORKHON AET
45 𐱅 10C45 OLD TURKIC LETTER ORKHON AET
ot 𐱇 10C47 OLD TURKIC LETTER ORKHON OT
ut 𐱇 10C47 OLD TURKIC LETTER ORKHON OT
47 𐱇 10C47 OLD TURKIC LETTER ORKHON OT
bash 𐱈 10C48 OLD TURKIC LETTER ORKHON BASH
48 𐱈 10C48 OLD TURKIC LETTER ORKHON BASH

View File

@@ -0,0 +1,115 @@
" Maintainer: Oliver Corff <oliver.corff@yemail.de>
" Last Changed: 2018 Feb 12
" All characters are given literally, conversion to another encoding (e.g.,
" UTF-8) should work.
scriptencoding utf-8
let b:keymap_name = "oto"
highlight lCursor guibg=red guifg=NONE
" map F8 to toggle keymap (Ctrl-^ not present on keyboard)
noremap <F8> :let &iminsert = ! &iminsert<CR>
lnoremap <F8> <C-^>
noremap! <F8> <C-^>
loadkeymap
A 𐰁 10C01 OLD TURKIC LETTER YENISEI A
01 𐰁 10C01 OLD TURKIC LETTER YENISEI A
AE 𐰂 10C02 OLD TURKIC LETTER YENISEI AE
02 𐰂 10C02 OLD TURKIC LETTER YENISEI AE
I 𐰄 10C04 OLD TURKIC LETTER YENISEI I
04 𐰄 10C04 OLD TURKIC LETTER YENISEI I
E 𐰅 10C05 OLD TURKIC LETTER YENISEI E
05 𐰅 10C05 OLD TURKIC LETTER YENISEI E
OE 𐰈 10C08 OLD TURKIC LETTER YENISEI OE
UE 𐰈 10C08 OLD TURKIC LETTER YENISEI OE
08 𐰈 10C08 OLD TURKIC LETTER YENISEI OE
ab 𐰊 10C0A OLD TURKIC LETTER YENISEI AB
b1 𐰊 10C0A OLD TURKIC LETTER YENISEI AB
0a 𐰊 10C0A OLD TURKIC LETTER YENISEI AB
aeb 𐰌 10C0C OLD TURKIC LETTER YENISEI AEB
eb 𐰌 10C0C OLD TURKIC LETTER YENISEI AEB
b2 𐰌 10C0C OLD TURKIC LETTER YENISEI AEB
0c 𐰌 10C0C OLD TURKIC LETTER YENISEI AEB
ag 𐰎 10C0E OLD TURKIC LETTER YENISEI AG
g1 𐰎 10C0E OLD TURKIC LETTER YENISEI AG
0e 𐰎 10C0E OLD TURKIC LETTER YENISEI AG
aeg 𐰐 10C10 OLD TURKIC LETTER YENISEI AEG
eg 𐰐 10C10 OLD TURKIC LETTER YENISEI AEG
g2 𐰐 10C10 OLD TURKIC LETTER YENISEI AEG
10 𐰐 10C10 OLD TURKIC LETTER YENISEI AEG
ad 𐰒 10C12 OLD TURKIC LETTER YENISEI AD
d1 𐰒 10C12 OLD TURKIC LETTER YENISEI AD
12 𐰒 10C12 OLD TURKIC LETTER YENISEI AD
ez 𐰕 10C15 OLD TURKIC LETTER YENISEI EZ
z 𐰕 10C15 OLD TURKIC LETTER YENISEI EZ
15 𐰕 10C15 OLD TURKIC LETTER YENISEI EZ
ay 𐰗 10C17 OLD TURKIC LETTER YENISEI AY
y1 𐰗 10C17 OLD TURKIC LETTER YENISEI AY
17 𐰗 10C17 OLD TURKIC LETTER YENISEI AY
aey 𐰙 10C19 OLD TURKIC LETTER YENISEI AEY
ey 𐰙 10C19 OLD TURKIC LETTER YENISEI AEY
y2 𐰙 10C19 OLD TURKIC LETTER YENISEI AEY
19 𐰙 10C19 OLD TURKIC LETTER YENISEI AEY
aek 𐰛 10C1B OLD TURKIC LETTER YENISEI AEK
ak 𐰛 10C1B OLD TURKIC LETTER YENISEI AEK
k 𐰛 10C1B OLD TURKIC LETTER YENISEI AEK
1b 𐰛 10C1B OLD TURKIC LETTER YENISEI AEK
oek 𐰝 10C1D OLD TURKIC LETTER YENISEI OEK
ök 𐰝 10C1D OLD TURKIC LETTER YENISEI OEK
uek 𐰝 10C1D OLD TURKIC LETTER YENISEI OEK
ük 𐰝 10C1D OLD TURKIC LETTER YENISEI OEK
1d 𐰝 10C1D OLD TURKIC LETTER YENISEI OEK
al 𐰟 10C1F OLD TURKIC LETTER YENISEI AL
l 𐰟 10C1F OLD TURKIC LETTER YENISEI AL
l1 𐰟 10C1F OLD TURKIC LETTER YENISEI AL
1f 𐰟 10C1F OLD TURKIC LETTER YENISEI AL
aen 𐰥 10C25 OLD TURKIC LETTER YENISEI AEN
en 𐰥 10C25 OLD TURKIC LETTER YENISEI AEN
n2 𐰥 10C25 OLD TURKIC LETTER YENISEI AEN
25 𐰥 10C25 OLD TURKIC LETTER YENISEI AEN
ent 𐰧 10C27 OLD TURKIC LETTER YENISEI ENT
nt 𐰧 10C27 OLD TURKIC LETTER YENISEI ENT
27 𐰧 10C27 OLD TURKIC LETTER YENISEI ENT
enc 𐰩 10C29 OLD TURKIC LETTER YENISEI ENC
nc 𐰩 10C29 OLD TURKIC LETTER YENISEI ENC
29 𐰩 10C29 OLD TURKIC LETTER YENISEI ENC
eny 𐰫 10C2B OLD TURKIC LETTER YENISEI ENY
ny 𐰫 10C2B OLD TURKIC LETTER YENISEI ENY
2b 𐰫 10C2B OLD TURKIC LETTER YENISEI ENY
ang 𐰬 10C2C OLD TURKIC LETTER YENISEI ANG
ng 𐰬 10C2C OLD TURKIC LETTER YENISEI ANG
2c 𐰬 10C2C OLD TURKIC LETTER YENISEI ANG
aeng 𐰮 10C2E OLD TURKIC LETTER YENISEI AENG
eng 𐰮 10C2E OLD TURKIC LETTER YENISEI AENG
2e 𐰮 10C2E OLD TURKIC LETTER YENISEI AENG
ec 𐰳 10C33 OLD TURKIC LETTER YENISEI EC
c 𐰳 10C33 OLD TURKIC LETTER YENISEI EC
33 𐰳 10C33 OLD TURKIC LETTER YENISEI EC
aq 𐰵 10C35 OLD TURKIC LETTER YENISEI AQ
q 𐰵 10C35 OLD TURKIC LETTER YENISEI AQ
35 𐰵 10C35 OLD TURKIC LETTER YENISEI AQ
iq 𐰷 10C37 OLD TURKIC LETTER YENISEI IQ
yq 𐰷 10C37 OLD TURKIC LETTER YENISEI IQ
37 𐰷 10C37 OLD TURKIC LETTER YENISEI IQ
oq 𐰹 10C39 OLD TURKIC LETTER YENISEI OQ
uq 𐰹 10C39 OLD TURKIC LETTER YENISEI OQ
39 𐰹 10C39 OLD TURKIC LETTER YENISEI OQ
ar 𐰻 10C3B OLD TURKIC LETTER YENISEI AR
r 𐰻 10C3B OLD TURKIC LETTER YENISEI AR
r1 𐰻 10C3B OLD TURKIC LETTER YENISEI AR
3b 𐰻 10C3B OLD TURKIC LETTER YENISEI AR
ash 𐱀 10C40 OLD TURKIC LETTER YENISEI ASH
sh1 𐱀 10C40 OLD TURKIC LETTER YENISEI ASH
40 𐱀 10C40 OLD TURKIC LETTER YENISEI ASH
esh 𐱂 10C42 OLD TURKIC LETTER YENISEI ESH
sh2 𐱂 10C42 OLD TURKIC LETTER YENISEI ESH
42 𐱂 10C42 OLD TURKIC LETTER YENISEI ESH
at 𐱄 10C44 OLD TURKIC LETTER YENISEI AT
t1 𐱄 10C44 OLD TURKIC LETTER YENISEI AT
44 𐱄 10C44 OLD TURKIC LETTER YENISEI AT
aet 𐱆 10C46 OLD TURKIC LETTER YENISEI AET
et 𐱆 10C46 OLD TURKIC LETTER YENISEI AET
t2 𐱆 10C46 OLD TURKIC LETTER YENISEI AET
46 𐱆 10C46 OLD TURKIC LETTER YENISEI AET

View File

@@ -1,6 +1,7 @@
" Menu Translations: Serbian
" Maintainer: Aleksandar Jelenak <ajelenak AT yahoo.com>
" Last Change: Fri, 30 May 2003 12:15:30 -0400
" Last Change: Fri, 30 May 2003 10:17:39 Eastern Daylight Time
" Adapted for VIM 8 by: Ivan Pesic on 2017-12-28 12:05+0400
" Quit when menu translations have already been done.
if exists("did_menu_trans")
@@ -19,6 +20,7 @@ menutrans &Find &Nadji
menutrans &Credits &Zasluge
menutrans Co&pying P&reuzimanje
menutrans O&rphans &Sirocici
menutrans &Sponsor/Register Sponzor/&Registrujte\ se
menutrans &Version &Verzija
menutrans &About &O\ programu
@@ -26,6 +28,7 @@ menutrans &About &O\ programu
menutrans &File &Datoteka
menutrans &Open\.\.\.<Tab>:e &Otvori\.\.\.<Tab>:e
menutrans Sp&lit-Open\.\.\.<Tab>:sp &Podeli-otvori\.\.\.<Tab>:sp
menutrans Open\ Tab\.\.\.<Tab>:tabnew Otvori\ karticu\.\.\.<Tab>:tabnew
menutrans &New<Tab>:enew &Nova<Tab>:enew
menutrans &Close<Tab>:close &Zatvori<Tab>:close
menutrans &Save<Tab>:w &Sacuvaj<Tab>:w
@@ -52,24 +55,27 @@ menutrans &Select\ all<Tab>ggVG Izaberi\ sv&e<Tab>ggVG
menutrans &Find\.\.\. &Nadji\.\.\.
menutrans Find\ and\ Rep&lace\.\.\. Nadji\ i\ &zameni\.\.\.
menutrans Settings\ &Window P&rozor\ podesavanja
menutrans Startup\ &Settings Po&desavanja\ pri\ pokretanju
menutrans &Global\ Settings Op&sta\ podesavanja
menutrans F&ile\ Settings Podesavanja\ za\ da&toteke
menutrans &Shiftwidth &Pomeraj
menutrans Soft\ &Tabstop &Meka\ tabulacija
menutrans Te&xt\ Width\.\.\. &Sirina\ teksta\.\.\.
menutrans &File\ Format\.\.\. &Vrsta\ datoteke\.\.\.
menutrans C&olor\ Scheme Bo&je
menutrans &Keymap Pres&likavanje\ tastature
menutrans Show\ C&olor\ Schemes\ in\ Menu Prikazi\ seme\ bo&ja\ u\ meniju
menutrans C&olor\ Scheme \Seme\ bo&ja
menutrans Show\ &Keymaps\ in\ Menu Prikazi\ pres&likavanja\ tastature\ u\ meniju
menutrans &Keymap Pres&likavanja\ tastature
menutrans Select\ Fo&nt\.\.\. Izbor\ &fonta\.\.\.
" Edit/Global Settings
menutrans Toggle\ Pattern\ &Highlight<Tab>:set\ hls! Naglasi\ &obrazce\ (da/ne)<Tab>:set\ hls!
menutrans Toggle\ &Ignore-case<Tab>:set\ ic! Zanemari\ \velicinu\ &slova\ (da/ne)<Tab>:set\ ic!
menutrans Toggle\ &Showmatch<Tab>:set\ sm! Proveri\ pratecu\ &zagradu\ (da/ne)<Tab>:set\ sm!
menutrans Toggle\ &Ignoring\ Case<Tab>:set\ ic! Zanemari\ velicinu\ &slova\ (da/ne)<Tab>:set\ ic!
menutrans Toggle\ &Showing\ Matched\ Pairs<Tab>:set\ sm! Proveri\ pratecu\ &zagradu\ (da/ne)<Tab>:set\ sm!
menutrans &Context\ lines Vidljivi\ &redovi
menutrans &Virtual\ Edit Virtuelno\ &uredjivanje
menutrans Toggle\ Insert\ &Mode<Tab>:set\ im! Rezim\ u&nosa\ (da/ne)<Tab>:set\ im!
menutrans Toggle\ Vi\ C&ompatible<Tab>:set\ cp! '&Vi'\ saglasno\ (da/ne)<Tab>:set\ cp!
menutrans Toggle\ Vi\ C&ompatibility<Tab>:set\ cp! '&Vi'\ saglasno\ (da/ne)<Tab>:set\ cp!
menutrans Search\ &Path\.\.\. Putanja\ &pretrage\.\.\.
menutrans Ta&g\ Files\.\.\. &Datoteke\ oznaka\.\.\.
menutrans Toggle\ &Toolbar Linija\ sa\ &alatkama\ (da/ne)
@@ -85,28 +91,30 @@ menutrans Block\ and\ Insert Blok\ i\ unos
menutrans Always Uvek
" Edit/File Settings
menutrans Toggle\ Line\ &Numbering<Tab>:set\ nu! Redni\ &brojevi\ (da/ne)<Tab>:set\ nu!
menutrans Toggle\ &List\ Mode<Tab>:set\ list! Rezim\ &liste\ (da/ne)<Tab>:set\ list!
menutrans Toggle\ Line\ &Wrap<Tab>:set\ wrap! Obavijanje\ &redova\ (da/ne)<Tab>:set\ wrap!
menutrans Toggle\ W&rap\ at\ word<Tab>:set\ lbr! Prelomi\ &na\ rec\ (da/ne)<Tab>:set\ lbr!
menutrans Toggle\ &expand-tab<Tab>:set\ et! Razmaci\ umesto\ &tabulacije\ (da/ne)<Tab>:set\ et!
menutrans Toggle\ &auto-indent<Tab>:set\ ai! Auto-&uvlacenje\ (da/ne)<Tab>:set\ ai!
menutrans Toggle\ &C-indenting<Tab>:set\ cin! &Ce-uvlacenje\ (da/ne)<Tab>:set\ cin!
menutrans Toggle\ Line\ &Numbering<Tab>:set\ nu! Prikazi\ &numeraciju\ linija\ (da/ne)<Tab>:set\ nu!
menutrans Toggle\ Relati&ve\ Line\ Numbering<Tab>:set\ rnu! Prikazi\ Relati&vnu\ numeraciju\ linija\ (da/ne)<Tab>:set\ rnu!
menutrans Toggle\ &List\ Mode<Tab>:set\ list! Rezim\ &liste\ (da/ne)<Tab>:set\ list!
menutrans Toggle\ Line\ &Wrapping<Tab>:set\ wrap! Obavijanje\ &redova\ (da/ne)<Tab>:set\ wrap!
menutrans Toggle\ W&rapping\ at\ Word<Tab>:set\ lbr! Prelomi\ &na\ rec\ (da/ne)<Tab>:set\ lbr!
menutrans Toggle\ Tab\ &Expanding<Tab>:set\ et! Razmaci\ umesto\ &tabulacije\ (da/ne)<Tab>:set\ et!
menutrans Toggle\ &Auto\ Indenting<Tab>:set\ ai! Auto-&uvlacenje\ (da/ne)<Tab>:set\ ai!
menutrans Toggle\ &C-Style\ Indenting<Tab>:set\ cin! &C-uvlacenje\ (da/ne)<Tab>:set\ cin!
" Edit/Keymap
menutrans None Nijedan
menutrans None Bez\ preslikavanja
" Tools menu
menutrans &Tools &Alatke
menutrans &Jump\ to\ this\ tag<Tab>g^] Skoci\ na\ &ovu\ oznaku<Tab>g^]
menutrans Jump\ &back<Tab>^T Skoci\ &natrag<Tab>^T
menutrans Build\ &Tags\ File Izgradi\ &datoteku\ oznaka
menutrans &Spelling Pra&vopis
menutrans &Folding &Podvijanje
menutrans Create\ &Fold<Tab>zf S&tvori\ podvijutak<Tab>zf
menutrans &Delete\ Fold<Tab>zd O&brisi\ podvijutak<Tab>zd
menutrans Delete\ &All\ Folds<Tab>zD Obrisi\ sve\ po&dvijutke<Tab>zD
menutrans Fold\ column\ &width Sirina\ &reda\ podvijutka
menutrans &Diff &Uporedjivanje
"menutrans &Diff &Uporedjivanje
menutrans &Make<Tab>:make 'mak&e'<Tab>:make
menutrans &List\ Errors<Tab>:cl Spisak\ &gresaka<Tab>:cl
menutrans L&ist\ Messages<Tab>:cl! Sp&isak\ poruka<Tab>:cl!
@@ -115,32 +123,49 @@ menutrans &Previous\ Error<Tab>:cp Pre&thodna\ greska<Tab>:cp
menutrans &Older\ List<Tab>:cold Stari\ spisa&k<Tab>:cold
menutrans N&ewer\ List<Tab>:cnew No&vi\ spisak<Tab>:cnew
menutrans Error\ &Window Prozor\ sa\ g&reskama
menutrans &Set\ Compiler I&zaberi\ prevodioca
menutrans Se&t\ Compiler I&zaberi\ prevodioca
menutrans &Convert\ to\ HEX<Tab>:%!xxd Pretvori\ u\ &HEKS<Tab>:%!xxd
menutrans Conve&rt\ back<Tab>:%!xxd\ -r Vr&ati\ u\ prvobitan\ oblik<Tab>:%!xxd\ -r
menutrans Show\ Compiler\ Se&ttings\ in\ Menu Prikazi\ pode&savanja\ prevodioca\ u\ meniju
" Tools/Spelling
menutrans &Spell\ Check\ On &Ukljuci\ proveru\ pravopisa
menutrans Spell\ Check\ &Off &Iskljuci\ proveru\ pravopisa
menutrans To\ &Next\ Error<Tab>]s Idi\ na\ &sledecu\ gresku<Tab>]s
menutrans To\ &Previous\ Error<Tab>[s Idi\ na\ &prethodnu\ gresku<Tab>[s
menutrans Suggest\ &Corrections<Tab>z= Predlozi\ isp&ravke<Tab>z=
menutrans &Repeat\ Correction<Tab>:spellrepall P&onovi\ ispravku<Tab>:spellrepall
menutrans Set\ Language\ to\ "en" Postavi\ jezik\ na\ "en"
menutrans Set\ Language\ to\ "en_au" Postavi\ jezik\ na\ "en_au"
menutrans Set\ Language\ to\ "en_ca" Postavi\ jezik\ na\ "en_ca"
menutrans Set\ Language\ to\ "en_gb" Postavi\ jezik\ na\ "en_gb"
menutrans Set\ Language\ to\ "en_nz" Postavi\ jezik\ na\ "en_nz"
menutrans Set\ Language\ to\ "en_us" Postavi\ jezik\ na\ "en_us"
menutrans &Find\ More\ Languages Pronadji\ jos\ jezika
" Tools/Folding
menutrans &Enable/Disable\ folds<Tab>zi &Omoguci/prekini\ podvijanje<Tab>zi
menutrans &View\ Cursor\ Line<Tab>zv &Pokazi\ red\ sa\ kursorom<Tab>zv
menutrans &View\ Cursor\ Line<Tab>zv &Pokazi\ red\ sa\ kursorom<Tab>zv
menutrans Vie&w\ Cursor\ Line\ only<Tab>zMzx Pokazi\ &samo\ red\ sa\ kursorom<Tab>zMzx
menutrans C&lose\ more\ folds<Tab>zm &Zatvori\ vise\ podvijutaka<Tab>zm
menutrans &Close\ all\ folds<Tab>zM Zatvori\ s&ve\ podvijutke<Tab>zM
menutrans O&pen\ more\ folds<Tab>zr Otvori\ vis&e\ podvijutaka<Tab>zr
menutrans &Open\ all\ folds<Tab>zR O&tvori\ sve\ podvijutke<Tab>zR
menutrans Fold\ Met&hod &Nacin\ podvijanja
menutrans Fold\ Col&umn\ Width Sirina\ kolone\ ispred\ podvijutaka
" Tools/Folding/Fold Method
menutrans M&anual &Rucno
menutrans I&ndent &Uvucenost
menutrans E&xpression &Izraz
menutrans S&yntax &Sintaksa
menutrans M&anual &Rucno
menutrans I&ndent &Uvucenost
menutrans E&xpression &Izraz
menutrans S&yntax &Sintaksa
"menutrans &Diff
menutrans Ma&rker &Oznaka
menutrans Ma&rker &Oznaka
" Tools/Diff
menutrans &Update &Azuriraj
menutrans &Get\ Block &Prihvati\ izmenu
menutrans &Put\ Block Pre&baci\ izmenu
menutrans &Update &Azuriraj
menutrans &Get\ Block &Prihvati\ blok\ izmena
menutrans &Put\ Block Pre&baci\ blok\ izmena
" Tools/Error Window
menutrans &Update<Tab>:cwin &Azuriraj<Tab>:cwin
@@ -188,8 +213,10 @@ menutrans Cu&t &Iseci
menutrans &Copy &Kopiraj
menutrans &Paste &Ubaci
menutrans &Delete I&zbrisi
menutrans Select\ Blockwise Biraj\ &pravougaono
menutrans Select\ Blockwise Biraj\ b&lokovski
menutrans Select\ &Word Izaberi\ &rec
menutrans Select\ &Sentence Izaberi\ r&ecenicu
menutrans Select\ Pa&ragraph Izaberi\ &paragraf
menutrans Select\ &Line Izaberi\ r&ed
menutrans Select\ &Block Izaberi\ &blok
menutrans Select\ &All Izaberi\ &sve
@@ -235,9 +262,9 @@ endif
" Syntax menu
menutrans &Syntax &Sintaksa
menutrans &Show\ filetypes\ in\ menu Izbor\ 'filetype'\ iz\ &menija
menutrans Set\ '&syntax'\ only Pode&si\ 'syntax'\ samo
menutrans Set\ '&filetype'\ too Podesi\ 'filetype'\ &takodje
menutrans &Show\ File\ Types\ in\ Menu Prikazi\ tipove\ datoteka\ u\ &meniju
menutrans Set\ '&syntax'\ only Pode&si\ samo\ 'syntax'
menutrans Set\ '&filetype'\ too Podesi\ &takodje\ i\ 'filetype'
menutrans &Off &Iskljuceno
menutrans &Manual &Rucno
menutrans A&utomatic &Automatski
@@ -255,9 +282,13 @@ let g:menutrans_tags_dialog = "Unesite imena datoteka sa oznakama\nRazdvojite za
let g:menutrans_textwidth_dialog = "Unesite novu sirinu teksta (0 sprecava prelom)"
let g:menutrans_fileformat_dialog = "Izaberite vrstu datoteke"
let g:menutrans_fileformat_dialog = "Izaberite format zapisa datoteke"
let g:menutrans_fileformat_choices = "&Unix\n&Dos\n&Mac\n&Otkazi"
let menutrans_no_file = "[Nema datoteke]"
let &cpo = s:keepcpo
unlet s:keepcpo
" vim: tw=0 keymap=serbian

View File

@@ -1,6 +1,7 @@
" Menu Translations: Serbian
" Maintainer: Aleksandar Jelenak <ajelenak AT yahoo.com>
" Last Change: Fri, 30 May 2003 12:04:48 -0400
" Last Change: Fri, 30 May 2003 10:17:39 Eastern Daylight Time
" Adapted for VIM 8 by: Ivan Pe<50>i<EFBFBD> on 2017-12-28 12:05+0400
" Quit when menu translations have already been done.
if exists("did_menu_trans")
@@ -21,6 +22,7 @@ menutrans &Find &Na
menutrans &Credits &Zasluge
menutrans Co&pying P&reuzimanje
menutrans O&rphans &Siro<EFBFBD>i<EFBFBD>i
menutrans &Sponsor/Register Sponzor/&Registrujte\ se
menutrans &Version &Verzija
menutrans &About &O\ programu
@@ -28,6 +30,7 @@ menutrans &About &O\ programu
menutrans &File &Datoteka
menutrans &Open\.\.\.<Tab>:e &Otvori\.\.\.<Tab>:e
menutrans Sp&lit-Open\.\.\.<Tab>:sp &Podeli-otvori\.\.\.<Tab>:sp
menutrans Open\ Tab\.\.\.<Tab>:tabnew Otvori\ karticu\.\.\.<Tab>:tabnew
menutrans &New<Tab>:enew &Nova<Tab>:enew
menutrans &Close<Tab>:close &Zatvori<Tab>:close
menutrans &Save<Tab>:w &Sa<EFBFBD>uvaj<Tab>:w
@@ -54,24 +57,27 @@ menutrans &Select\ all<Tab>ggVG Izaberi\ sv&e<Tab>ggVG
menutrans &Find\.\.\. &Na<EFBFBD>i\.\.\.
menutrans Find\ and\ Rep&lace\.\.\. Na<EFBFBD>i\ i\ &zameni\.\.\.
menutrans Settings\ &Window P&rozor\ pode<EFBFBD>avanja
menutrans Startup\ &Settings Po&de<EFBFBD>avanja\ pri\ pokretanju
menutrans &Global\ Settings Op&<26>ta\ pode<EFBFBD>avanja
menutrans F&ile\ Settings Pode<EFBFBD>avanja\ za\ da&toteke
menutrans &Shiftwidth &Pomeraj
menutrans Soft\ &Tabstop &Meka\ tabulacija
menutrans Te&xt\ Width\.\.\. &<26>irina\ teksta\.\.\.
menutrans &File\ Format\.\.\. &Vrsta\ datoteke\.\.\.
menutrans C&olor\ Scheme Bo&je
menutrans &Keymap Pres&likavanje\ tastature
menutrans Show\ C&olor\ Schemes\ in\ Menu Prika<EFBFBD>i\ <20>eme\ bo&ja\ u\ meniju
menutrans C&olor\ Scheme \<5C>eme\ bo&ja
menutrans Show\ &Keymaps\ in\ Menu Prika<EFBFBD>i\ pres&likavanja\ tastature\ u\ meniju
menutrans &Keymap Pres&likavanja\ tastature
menutrans Select\ Fo&nt\.\.\. Izbor\ &fonta\.\.\.
" Edit/Global Settings
menutrans Toggle\ Pattern\ &Highlight<Tab>:set\ hls! Naglasi\ &obrazce\ (da/ne)<Tab>:set\ hls!
menutrans Toggle\ &Ignore-case<Tab>:set\ ic! Zanemari\ \veli<EFBFBD>inu\ &slova\ (da/ne)<Tab>:set\ ic!
menutrans Toggle\ &Showmatch<Tab>:set\ sm! Proveri\ prate<EFBFBD>u\ &zagradu\ (da/ne)<Tab>:set\ sm!
menutrans Toggle\ &Ignoring\ Case<Tab>:set\ ic! Zanemari\ veli<EFBFBD>inu\ &slova\ (da/ne)<Tab>:set\ ic!
menutrans Toggle\ &Showing\ Matched\ Pairs<Tab>:set\ sm! Proveri\ prate<EFBFBD>u\ &zagradu\ (da/ne)<Tab>:set\ sm!
menutrans &Context\ lines Vidljivi\ &redovi
menutrans &Virtual\ Edit Virtuelno\ &ure<EFBFBD>ivanje
menutrans Toggle\ Insert\ &Mode<Tab>:set\ im! Re<EFBFBD>im\ u&nosa\ (da/ne)<Tab>:set\ im!
menutrans Toggle\ Vi\ C&ompatible<Tab>:set\ cp! '&Vi'\ saglasno\ (da/ne)<Tab>:set\ cp!
menutrans Toggle\ Insert\ &Mode<Tab>:set\ im! Re<EFBFBD>im\ u&nosa\ (da/ne)<Tab>:set\ im!
menutrans Toggle\ Vi\ C&ompatibility<Tab>:set\ cp! '&Vi'\ saglasno\ (da/ne)<Tab>:set\ cp!
menutrans Search\ &Path\.\.\. Putanja\ &pretrage\.\.\.
menutrans Ta&g\ Files\.\.\. &Datoteke\ oznaka\.\.\.
menutrans Toggle\ &Toolbar Linija\ sa\ &alatkama\ (da/ne)
@@ -87,28 +93,30 @@ menutrans Block\ and\ Insert Blok\ i\ unos
menutrans Always Uvek
" Edit/File Settings
menutrans Toggle\ Line\ &Numbering<Tab>:set\ nu! Redni\ &brojevi\ (da/ne)<Tab>:set\ nu!
menutrans Toggle\ Line\ &Numbering<Tab>:set\ nu! Prika<EFBFBD>i\ &numeraciju\ linija\ (da/ne)<Tab>:set\ nu!
menutrans Toggle\ Relati&ve\ Line\ Numbering<Tab>:set\ rnu! Prika<EFBFBD>i\ Relati&vnu\ numeraciju\ linija\ (da/ne)<Tab>:set\ rnu!
menutrans Toggle\ &List\ Mode<Tab>:set\ list! Re<EFBFBD>im\ &liste\ (da/ne)<Tab>:set\ list!
menutrans Toggle\ Line\ &Wrap<Tab>:set\ wrap! Obavijanje\ &redova\ (da/ne)<Tab>:set\ wrap!
menutrans Toggle\ W&rap\ at\ word<Tab>:set\ lbr! Prelomi\ &na\ re<EFBFBD>\ (da/ne)<Tab>:set\ lbr!
menutrans Toggle\ &expand-tab<Tab>:set\ et! Razmaci\ umesto\ &tabulacije\ (da/ne)<Tab>:set\ et!
menutrans Toggle\ &auto-indent<Tab>:set\ ai! Auto-&uvla<EFBFBD>enje\ (da/ne)<Tab>:set\ ai!
menutrans Toggle\ &C-indenting<Tab>:set\ cin! &Ce-uvla<EFBFBD>enje\ (da/ne)<Tab>:set\ cin!
menutrans Toggle\ Line\ &Wrapping<Tab>:set\ wrap! Obavijanje\ &redova\ (da/ne)<Tab>:set\ wrap!
menutrans Toggle\ W&rapping\ at\ Word<Tab>:set\ lbr! Prelomi\ &na\ re<EFBFBD>\ (da/ne)<Tab>:set\ lbr!
menutrans Toggle\ Tab\ &Expanding<Tab>:set\ et! Razmaci\ umesto\ &tabulacije\ (da/ne)<Tab>:set\ et!
menutrans Toggle\ &Auto\ Indenting<Tab>:set\ ai! Auto-&uvla<EFBFBD>enje\ (da/ne)<Tab>:set\ ai!
menutrans Toggle\ &C-Style\ Indenting<Tab>:set\ cin! &C-uvla<EFBFBD>enje\ (da/ne)<Tab>:set\ cin!
" Edit/Keymap
menutrans None Nijedan
menutrans None Bez\ preslikavanja
" Tools menu
menutrans &Tools &Alatke
menutrans &Jump\ to\ this\ tag<Tab>g^] Sko<EFBFBD>i\ na\ &ovu\ oznaku<Tab>g^]
menutrans Jump\ &back<Tab>^T Sko<EFBFBD>i\ &natrag<Tab>^T
menutrans Build\ &Tags\ File Izgradi\ &datoteku\ oznaka
menutrans &Spelling Pra&vopis
menutrans &Folding &Podvijanje
menutrans Create\ &Fold<Tab>zf S&tvori\ podvijutak<Tab>zf
menutrans &Delete\ Fold<Tab>zd O&bri<EFBFBD>i\ podvijutak<Tab>zd
menutrans Delete\ &All\ Folds<Tab>zD Obri<EFBFBD>i\ sve\ po&dvijutke<Tab>zD
menutrans Fold\ column\ &width <20>irina\ &reda\ podvijutka
menutrans &Diff &Upore<EFBFBD>ivanje
"menutrans &Diff &Upore<EFBFBD>ivanje
menutrans &Make<Tab>:make 'mak&e'<Tab>:make
menutrans &List\ Errors<Tab>:cl Spisak\ &gre<EFBFBD>aka<Tab>:cl
menutrans L&ist\ Messages<Tab>:cl! Sp&isak\ poruka<Tab>:cl!
@@ -117,9 +125,25 @@ menutrans &Previous\ Error<Tab>:cp Pre&thodna\ gre
menutrans &Older\ List<Tab>:cold Stari\ spisa&k<Tab>:cold
menutrans N&ewer\ List<Tab>:cnew No&vi\ spisak<Tab>:cnew
menutrans Error\ &Window Prozor\ sa\ g&re<EFBFBD>kama
menutrans &Set\ Compiler I&zaberi\ prevodioca
menutrans Se&t\ Compiler I&zaberi\ prevodioca
menutrans &Convert\ to\ HEX<Tab>:%!xxd Pretvori\ u\ &HEKS<Tab>:%!xxd
menutrans Conve&rt\ back<Tab>:%!xxd\ -r Vr&ati\ u\ prvobitan\ oblik<Tab>:%!xxd\ -r
menutrans Show\ Compiler\ Se&ttings\ in\ Menu Prika<EFBFBD>i\ pode&<26>avanja\ prevodioca\ u\ meniju
" Tools/Spelling
menutrans &Spell\ Check\ On &Uklju<EFBFBD>i\ proveru\ pravopisa
menutrans Spell\ Check\ &Off &Isklju<EFBFBD>i\ proveru\ pravopisa
menutrans To\ &Next\ Error<Tab>]s Idi\ na\ &slede<EFBFBD>u\ gre<EFBFBD>ku<Tab>]s
menutrans To\ &Previous\ Error<Tab>[s Idi\ na\ &prethodnu\ gre<EFBFBD>ku<Tab>[s
menutrans Suggest\ &Corrections<Tab>z= Predlo<EFBFBD>i\ isp&ravke<Tab>z=
menutrans &Repeat\ Correction<Tab>:spellrepall P&onovi\ ispravku<Tab>:spellrepall
menutrans Set\ Language\ to\ "en" Postavi\ jezik\ na\ "en"
menutrans Set\ Language\ to\ "en_au" Postavi\ jezik\ na\ "en_au"
menutrans Set\ Language\ to\ "en_ca" Postavi\ jezik\ na\ "en_ca"
menutrans Set\ Language\ to\ "en_gb" Postavi\ jezik\ na\ "en_gb"
menutrans Set\ Language\ to\ "en_nz" Postavi\ jezik\ na\ "en_nz"
menutrans Set\ Language\ to\ "en_us" Postavi\ jezik\ na\ "en_us"
menutrans &Find\ More\ Languages Prona<EFBFBD>i\ jo<EFBFBD>\ jezika
" Tools/Folding
menutrans &Enable/Disable\ folds<Tab>zi &Omogu<67>i/prekini\ podvijanje<Tab>zi
@@ -130,6 +154,7 @@ menutrans &Close\ all\ folds<Tab>zM Zatvori\ s&ve\ podvijutke<Tab>zM
menutrans O&pen\ more\ folds<Tab>zr Otvori\ vi<EFBFBD>&e\ podvijutaka<Tab>zr
menutrans &Open\ all\ folds<Tab>zR O&tvori\ sve\ podvijutke<Tab>zR
menutrans Fold\ Met&hod &Na<EFBFBD>in\ podvijanja
menutrans Fold\ Col&umn\ Width <09>irina\ kolone\ ispred\ podvijutaka
" Tools/Folding/Fold Method
menutrans M&anual &Ru<EFBFBD>no
@@ -141,8 +166,8 @@ menutrans Ma&rker &Oznaka
" Tools/Diff
menutrans &Update &A<EFBFBD>uriraj
menutrans &Get\ Block &Prihvati\ izmenu
menutrans &Put\ Block Pre&baci\ izmenu
menutrans &Get\ Block &Prihvati\ blok\ izmena
menutrans &Put\ Block Pre&baci\ blok\ izmena
" Tools/Error Window
menutrans &Update<Tab>:cwin &A<EFBFBD>uriraj<Tab>:cwin
@@ -190,8 +215,10 @@ menutrans Cu&t &Iseci
menutrans &Copy &Kopiraj
menutrans &Paste &Ubaci
menutrans &Delete I&zbri<EFBFBD>i
menutrans Select\ Blockwise Biraj\ &pravougaono
menutrans Select\ Blockwise Biraj\ b&lokovski
menutrans Select\ &Word Izaberi\ &re<EFBFBD>
menutrans Select\ &Sentence Izaberi\ r&e<EFBFBD>enicu
menutrans Select\ Pa&ragraph Izaberi\ &paragraf
menutrans Select\ &Line Izaberi\ r&ed
menutrans Select\ &Block Izaberi\ &blok
menutrans Select\ &All Izaberi\ &sve
@@ -202,20 +229,20 @@ if has("toolbar")
delfun Do_toolbar_tmenu
endif
fun Do_toolbar_tmenu()
tmenu ToolBar.Open U<EFBFBD>itaj
tmenu ToolBar.Save Sa<EFBFBD>uvaj
tmenu ToolBar.Open U<EFBFBD>itaj
tmenu ToolBar.Save Sa<EFBFBD>uvaj
tmenu ToolBar.SaveAll Sa<EFBFBD>uvaj sve
tmenu ToolBar.Print <20>tampaj
tmenu ToolBar.Undo Vrati
tmenu ToolBar.Redo Povrati
tmenu ToolBar.Cut Iseci
tmenu ToolBar.Copy Kopiraj
tmenu ToolBar.Undo Vrati
tmenu ToolBar.Redo Povrati
tmenu ToolBar.Cut Iseci
tmenu ToolBar.Copy Kopiraj
tmenu ToolBar.Paste Ubaci
tmenu ToolBar.Find Na<EFBFBD>i
tmenu ToolBar.Find Na<EFBFBD>i
tmenu ToolBar.FindNext Na<EFBFBD>i slede<EFBFBD>i
tmenu ToolBar.FindPrev Na<EFBFBD>i prethodni
tmenu ToolBar.Replace Zameni
tmenu ToolBar.New Novi
tmenu ToolBar.New Novi
tmenu ToolBar.WinSplit Podeli prozor
tmenu ToolBar.WinMax Maksimalna visina
tmenu ToolBar.WinMin Minimalna visina
@@ -226,25 +253,25 @@ if has("toolbar")
tmenu ToolBar.LoadSesn U<EFBFBD>itaj seansu
tmenu ToolBar.SaveSesn Sa<EFBFBD>uvaj seansu
tmenu ToolBar.RunScript Izvr<EFBFBD>i spis
tmenu ToolBar.Make 'make'
tmenu ToolBar.Make 'make'
tmenu ToolBar.Shell Operativno okru<EFBFBD>enje
tmenu ToolBar.RunCtags Napravi oznake
tmenu ToolBar.TagJump Idi na oznaku
tmenu ToolBar.Help Pomo<EFBFBD>
tmenu ToolBar.Help Pomo<EFBFBD>
tmenu ToolBar.FindHelp Na<EFBFBD>i obja<EFBFBD>njenje
endfun
endif
" Syntax menu
menutrans &Syntax &Sintaksa
menutrans &Show\ filetypes\ in\ menu Izbor\ 'filetype'\ iz\ &menija
menutrans Set\ '&syntax'\ only Pode&si\ 'syntax'\ samo
menutrans Set\ '&filetype'\ too Podesi\ 'filetype'\ &tako<EFBFBD>e
menutrans &Off &Isklju<EFBFBD>eno
menutrans &Show\ File\ Types\ in\ Menu Prika<EFBFBD>i\ tipove\ datoteka\ u\ &meniju
menutrans Set\ '&syntax'\ only Pode&si\ samo\ 'syntax'
menutrans Set\ '&filetype'\ too Podesi\ &tako<EFBFBD>e\ i\ 'filetype'
menutrans &Off &Isklju<EFBFBD>eno
menutrans &Manual &Ru<EFBFBD>no
menutrans A&utomatic &Automatski
menutrans A&utomatic &Automatski
menutrans on/off\ for\ &This\ file Da/ne\ za\ ovu\ &datoteku
menutrans Co&lor\ test Provera\ &boja
menutrans Co&lor\ test Provera\ &boja
menutrans &Highlight\ test Provera\ isti&canja
menutrans &Convert\ to\ HTML Pretvori\ &u\ HTML
@@ -257,9 +284,13 @@ let g:menutrans_tags_dialog = "Unesite imena datoteka sa oznakama\nRazdvojite za
let g:menutrans_textwidth_dialog = "Unesite novu <20>irinu teksta (0 spre<72>ava prelom)"
let g:menutrans_fileformat_dialog = "Izaberite vrstu datoteke"
let g:menutrans_fileformat_dialog = "Izaberite format zapisa datoteke"
let g:menutrans_fileformat_choices = "&Unix\n&Dos\n&Mac\n&Otka<6B>i"
let menutrans_no_file = "[Nema datoteke]"
let &cpo = s:keepcpo
unlet s:keepcpo
" vim: tw=0 keymap=serbian

View File

@@ -1,6 +1,7 @@
" Menu Translations: Serbian
" Maintainer: Aleksandar Jelenak <ajelenak AT yahoo.com>
" Last Change: Fri, 30 May 2003 12:02:07 -0400
" Last Change: Fri, 30 May 2003 10:17:39 Eastern Daylight Time
" Adapted for VIM 8 by: <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> on 2017-12-28 12:05+0400
" Quit when menu translations have already been done.
if exists("did_menu_trans")
@@ -21,6 +22,7 @@ menutrans &Find &
menutrans &Credits &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans Co&pying <20>&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans O&rphans &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans &Sponsor/Register <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>/&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><>
menutrans &Version &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans &About &<26>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
@@ -28,6 +30,7 @@ menutrans &About &
menutrans &File &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans &Open\.\.\.<Tab>:e &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\.\.\.<Tab>:e
menutrans Sp&lit-Open\.\.\.<Tab>:sp &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\.\.\.<Tab>:sp
menutrans Open\ Tab\.\.\.<Tab>:tabnew <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\.\.\.<Tab>:tabnew
menutrans &New<Tab>:enew &<26><><EFBFBD><EFBFBD><Tab>:enew
menutrans &Close<Tab>:close &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><Tab>:close
menutrans &Save<Tab>:w &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><Tab>:w
@@ -54,24 +57,27 @@ menutrans &Select\ all<Tab>ggVG
menutrans &Find\.\.\. &<26><><EFBFBD><EFBFBD>\.\.\.
menutrans Find\ and\ Rep&lace\.\.\. <20><><EFBFBD><EFBFBD>\ <20>\ &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\.\.\.
menutrans Settings\ &Window <20>&<26><><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans Startup\ &Settings <20><>&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans &Global\ Settings <20><>&<26><><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans F&ile\ Settings <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><>\ <20><>&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans &Shiftwidth &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans Soft\ &Tabstop &<26><><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans Te&xt\ Width\.\.\. &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\.\.\.
menutrans &File\ Format\.\.\. &<26><><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\.\.\.
menutrans C&olor\ Scheme <20><>&<EFBFBD><EFBFBD>
menutrans &Keymap <20><><EFBFBD><EFBFBD>&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans Show\ C&olor\ Schemes\ in\ Menu <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD>\ <20><>&<26><>\ <20>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans C&olor\ Scheme \<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><>&<EFBFBD><EFBFBD>
menutrans Show\ &Keymaps\ in\ Menu <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD>&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans &Keymap <09><><EFBFBD><EFBFBD>&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans Select\ Fo&nt\.\.\. <20><><EFBFBD><EFBFBD><EFBFBD>\ &<26><><EFBFBD><EFBFBD><EFBFBD>\.\.\.
" Edit/Global Settings
menutrans Toggle\ Pattern\ &Highlight<Tab>:set\ hls! <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ (<EFBFBD><EFBFBD>/<2F><>)<Tab>:set\ hls!
menutrans Toggle\ &Ignore-case<Tab>:set\ ic! <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ \<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ &<26><><EFBFBD><EFBFBD><EFBFBD>\ (<EFBFBD><EFBFBD>/<2F><>)<Tab>:set\ ic!
menutrans Toggle\ &Showmatch<Tab>:set\ sm! <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ (<EFBFBD><EFBFBD>/<2F><>)<Tab>:set\ sm!
menutrans Toggle\ &Ignoring\ Case<Tab>:set\ ic! <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ &<26><><EFBFBD><EFBFBD><EFBFBD>\ (<EFBFBD><EFBFBD>/<2F><>)<Tab>:set\ ic!
menutrans Toggle\ &Showing\ Matched\ Pairs<Tab>:set\ sm! <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ (<EFBFBD><EFBFBD>/<2F><>)<Tab>:set\ sm!
menutrans &Context\ lines <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans &Virtual\ Edit <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans Toggle\ Insert\ &Mode<Tab>:set\ im! <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20>&<26><><EFBFBD><EFBFBD>\ (<EFBFBD><EFBFBD>/<2F><>)<Tab>:set\ im!
menutrans Toggle\ Vi\ C&ompatible<Tab>:set\ cp! '&Vi'\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ (<EFBFBD><EFBFBD>/<2F><>)<Tab>:set\ cp!
menutrans Toggle\ Insert\ &Mode<Tab>:set\ im! <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20>&<26><><EFBFBD><EFBFBD>\ (<EFBFBD><EFBFBD>/<2F><>)<Tab>:set\ im!
menutrans Toggle\ Vi\ C&ompatibility<Tab>:set\ cp! '&Vi'\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ (<EFBFBD><EFBFBD>/<2F><>)<Tab>:set\ cp!
menutrans Search\ &Path\.\.\. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\.\.\.
menutrans Ta&g\ Files\.\.\. &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\.\.\.
menutrans Toggle\ &Toolbar <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><>\ &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ (<EFBFBD><EFBFBD>/<2F><>)
@@ -87,28 +93,30 @@ menutrans Block\ and\ Insert
menutrans Always <20><><EFBFBD><EFBFBD>
" Edit/File Settings
menutrans Toggle\ Line\ &Numbering<Tab>:set\ nu! <20><><EFBFBD><EFBFBD><EFBFBD>\ &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ (<EFBFBD><EFBFBD>/<2F><>)<Tab>:set\ nu!
menutrans Toggle\ Line\ &Numbering<Tab>:set\ nu! <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ &<26><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ (<EFBFBD><EFBFBD>/<2F><>)<Tab>:set\ nu!
menutrans Toggle\ Relati&ve\ Line\ Numbering<Tab>:set\ rnu! <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>&<26><><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ (<EFBFBD><EFBFBD>/<2F><>)<Tab>:set\ rnu!
menutrans Toggle\ &List\ Mode<Tab>:set\ list! <20><><EFBFBD><EFBFBD><EFBFBD>\ &<26><><EFBFBD><EFBFBD><EFBFBD>\ (<EFBFBD><EFBFBD>/<2F><>)<Tab>:set\ list!
menutrans Toggle\ Line\ &Wrap<Tab>:set\ wrap! <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ (<EFBFBD><EFBFBD>/<2F><>)<Tab>:set\ wrap!
menutrans Toggle\ W&rap\ at\ word<Tab>:set\ lbr! <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ &<26><>\ <20><><EFBFBD>\ (<EFBFBD><EFBFBD>/<2F><>)<Tab>:set\ lbr!
menutrans Toggle\ &expand-tab<Tab>:set\ et! <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ (<EFBFBD><EFBFBD>/<2F><>)<Tab>:set\ et!
menutrans Toggle\ &auto-indent<Tab>:set\ ai! <09><><EFBFBD><EFBFBD>-&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ (<EFBFBD><EFBFBD>/<2F><>)<Tab>:set\ ai!
menutrans Toggle\ &C-indenting<Tab>:set\ cin! &<EFBFBD><EFBFBD>-<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ (<EFBFBD><EFBFBD>/<2F><>)<Tab>:set\ cin!
menutrans Toggle\ Line\ &Wrapping<Tab>:set\ wrap! <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ (<EFBFBD><EFBFBD>/<2F><>)<Tab>:set\ wrap!
menutrans Toggle\ W&rapping\ at\ Word<Tab>:set\ lbr! <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ &<26><>\ <20><><EFBFBD>\ (<EFBFBD><EFBFBD>/<2F><>)<Tab>:set\ lbr!
menutrans Toggle\ Tab\ &Expanding<Tab>:set\ et! <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ (<EFBFBD><EFBFBD>/<2F><>)<Tab>:set\ et!
menutrans Toggle\ &Auto\ Indenting<Tab>:set\ ai! <09><><EFBFBD><EFBFBD>-&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ (<EFBFBD><EFBFBD>/<2F><>)<Tab>:set\ ai!
menutrans Toggle\ &C-Style\ Indenting<Tab>:set\ cin! &C-<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ (<EFBFBD><EFBFBD>/<2F><>)<Tab>:set\ cin!
" Edit/Keymap
menutrans None <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans None <20><><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
" Tools menu
menutrans &Tools &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans &Jump\ to\ this\ tag<Tab>g^] <20><><EFBFBD><EFBFBD><EFBFBD>\ <20><>\ &<26><><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><Tab>g^]
menutrans Jump\ &back<Tab>^T <20><><EFBFBD><EFBFBD><EFBFBD>\ &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><Tab>^T
menutrans Build\ &Tags\ File <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans &Spelling <20><><EFBFBD>&<26><><EFBFBD><EFBFBD><EFBFBD>
menutrans &Folding &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans Create\ &Fold<Tab>zf <20>&<26><><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><Tab>zf
menutrans &Delete\ Fold<Tab>zd <20>&<26><><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><Tab>zd
menutrans Delete\ &All\ Folds<Tab>zD <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD>\ <20><>&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><Tab>zD
menutrans Fold\ column\ &width <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ &<26><><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans &Diff &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
"menutrans &Diff &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans &Make<Tab>:make 'mak&<26>'<Tab>:make
menutrans &List\ Errors<Tab>:cl <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><Tab>:cl
menutrans L&ist\ Messages<Tab>:cl! <20><>&<26><><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><Tab>:cl!
@@ -117,9 +125,25 @@ menutrans &Previous\ Error<Tab>:cp
menutrans &Older\ List<Tab>:cold <20><><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD>&<26><Tab>:cold
menutrans N&ewer\ List<Tab>:cnew <20><>&<26><>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><Tab>:cnew
menutrans Error\ &Window <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><>\ <20>&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans &Set\ Compiler <20>&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans Se&t\ Compiler <20>&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans &Convert\ to\ HEX<Tab>:%!xxd <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20>\ &ŵ<EFBFBD><EFBFBD><Tab>:%!xxd
menutrans Conve&rt\ back<Tab>:%!xxd\ -r <20><>&<26><><EFBFBD>\ <20>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><Tab>:%!xxd\ -r
menutrans Show\ Compiler\ Se&ttings\ in\ Menu <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD>&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
" Tools/Spelling
menutrans &Spell\ Check\ On &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans Spell\ Check\ &Off &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans To\ &Next\ Error<Tab>]s <09><><EFBFBD>\ <20><>\ &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><Tab>]s
menutrans To\ &Previous\ Error<Tab>[s <09><><EFBFBD>\ <20><>\ &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><Tab>[s
menutrans Suggest\ &Corrections<Tab>z= <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD>&<26><><EFBFBD><EFBFBD><EFBFBD><Tab>z=
menutrans &Repeat\ Correction<Tab>:spellrepall <09>&<26><><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><Tab>:spellrepall
menutrans Set\ Language\ to\ "en" <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD>\ <20><>\ "en"
menutrans Set\ Language\ to\ "en_au" <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD>\ <20><>\ "en_au"
menutrans Set\ Language\ to\ "en_ca" <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD>\ <20><>\ "en_ca"
menutrans Set\ Language\ to\ "en_gb" <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD>\ <20><>\ "en_gb"
menutrans Set\ Language\ to\ "en_nz" <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD>\ <20><>\ "en_nz"
menutrans Set\ Language\ to\ "en_us" <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD>\ <20><>\ "en_us"
menutrans &Find\ More\ Languages <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
" Tools/Folding
menutrans &Enable/Disable\ folds<Tab>zi &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>/<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><Tab>zi
@@ -130,6 +154,7 @@ menutrans &Close\ all\ folds<Tab>zM
menutrans O&pen\ more\ folds<Tab>zr <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD>&<26>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><Tab>zr
menutrans &Open\ all\ folds<Tab>zR <20>&<26><><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><Tab>zR
menutrans Fold\ Met&hod &<26><><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans Fold\ Col&umn\ Width <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
" Tools/Folding/Fold Method
menutrans M&anual &<26><><EFBFBD><EFBFBD><EFBFBD>
@@ -141,8 +166,8 @@ menutrans Ma&rker &
" Tools/Diff
menutrans &Update &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans &Get\ Block &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans &Put\ Block <09><><EFBFBD>&<26><><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans &Get\ Block &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD>a
menutrans &Put\ Block <09><><EFBFBD>&<26><><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
" Tools/Error Window
menutrans &Update<Tab>:cwin &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><Tab>:cwin
@@ -190,8 +215,10 @@ menutrans Cu&t &
menutrans &Copy &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans &Paste &<26><><EFBFBD><EFBFBD><EFBFBD>
menutrans &Delete <20>&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans Select\ Blockwise <20><><EFBFBD><EFBFBD><EFBFBD>\ &<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans Select\ Blockwise <20><><EFBFBD><EFBFBD><EFBFBD>\ <EFBFBD>&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans Select\ &Word <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ &<26><><EFBFBD>
menutrans Select\ &Sentence <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20>&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans Select\ Pa&ragraph <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans Select\ &Line <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20>&<26><>
menutrans Select\ &Block <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ &<26><><EFBFBD><EFBFBD>
menutrans Select\ &All <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ &<26><><EFBFBD>
@@ -202,20 +229,20 @@ if has("toolbar")
delfun Do_toolbar_tmenu
endif
fun Do_toolbar_tmenu()
tmenu ToolBar.Open <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
tmenu ToolBar.Save <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
tmenu ToolBar.Open <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
tmenu ToolBar.Save <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
tmenu ToolBar.SaveAll <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
tmenu ToolBar.Print <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
tmenu ToolBar.Undo <20><><EFBFBD><EFBFBD><EFBFBD>
tmenu ToolBar.Redo <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
tmenu ToolBar.Cut <20><><EFBFBD><EFBFBD><EFBFBD>
tmenu ToolBar.Copy <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
tmenu ToolBar.Undo <20><><EFBFBD><EFBFBD><EFBFBD>
tmenu ToolBar.Redo <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
tmenu ToolBar.Cut <20><><EFBFBD><EFBFBD><EFBFBD>
tmenu ToolBar.Copy <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
tmenu ToolBar.Paste <20><><EFBFBD><EFBFBD><EFBFBD>
tmenu ToolBar.Find <20><><EFBFBD><EFBFBD>
tmenu ToolBar.Find <20><><EFBFBD><EFBFBD>
tmenu ToolBar.FindNext <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
tmenu ToolBar.FindPrev <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
tmenu ToolBar.Replace <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
tmenu ToolBar.New <20><><EFBFBD><EFBFBD>
tmenu ToolBar.New <20><><EFBFBD><EFBFBD>
tmenu ToolBar.WinSplit <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
tmenu ToolBar.WinMax <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
tmenu ToolBar.WinMin <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
@@ -226,25 +253,25 @@ if has("toolbar")
tmenu ToolBar.LoadSesn <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
tmenu ToolBar.SaveSesn <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
tmenu ToolBar.RunScript <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
tmenu ToolBar.Make 'make'
tmenu ToolBar.Make 'make'
tmenu ToolBar.Shell <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
tmenu ToolBar.RunCtags <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
tmenu ToolBar.TagJump <20><><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
tmenu ToolBar.Help <20><><EFBFBD><EFBFBD><EFBFBD>
tmenu ToolBar.Help <20><><EFBFBD><EFBFBD><EFBFBD>
tmenu ToolBar.FindHelp <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
endfun
endif
" Syntax menu
menutrans &Syntax &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans &Show\ filetypes\ in\ menu <20><><EFBFBD><EFBFBD><EFBFBD>\ 'filetype'\ <20><EFBFBD>\ &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans Set\ '&syntax'\ only <20><><EFBFBD><EFBFBD>&<26><>\ 'syntax'\ <20><><EFBFBD><EFBFBD>
menutrans Set\ '&filetype'\ too <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ 'filetype'\ &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans &Off &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans &Show\ File\ Types\ in\ Menu <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <EFBFBD>\ &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans Set\ '&syntax'\ only <20><><EFBFBD><EFBFBD>&<26><>\ <20><><EFBFBD><EFBFBD>\ 'syntax'
menutrans Set\ '&filetype'\ too <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20>\ 'filetype'
menutrans &Off &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans &Manual &<26><><EFBFBD><EFBFBD><EFBFBD>
menutrans A&utomatic &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans A&utomatic &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans on/off\ for\ &This\ file <20><>/<EFBFBD><EFBFBD>\ <20><>\ <20><><EFBFBD>\ &<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
menutrans Co&lor\ test <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ &<26><><EFBFBD><EFBFBD>
menutrans Co&lor\ test <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ &<26><><EFBFBD><EFBFBD>
menutrans &Highlight\ test <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD>&<26><><EFBFBD><EFBFBD>
menutrans &Convert\ to\ HTML <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ &<26>\ HTML
@@ -257,9 +284,13 @@ let g:menutrans_tags_dialog = "
let g:menutrans_textwidth_dialog = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (0 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)"
let g:menutrans_fileformat_dialog = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
let g:menutrans_fileformat_dialog = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
let g:menutrans_fileformat_choices = "&Unix\n&Dos\n&Mac\n&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
let menutrans_no_file = "[<5B><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>]"
let &cpo = s:keepcpo
unlet s:keepcpo
" vim: tw=0 keymap=serbian

View File

@@ -1,6 +1,7 @@
" Menu Translations: Serbian
" Maintainer: Aleksandar Jelenak <ajelenak AT yahoo.com>
" Last Change: Fri, 30 May 2003 10:17:39 Eastern Daylight Time
" Adapted for VIM 8 by: Иван Пешић on 2017-12-28 12:05+0400
" Quit when menu translations have already been done.
if exists("did_menu_trans")
@@ -21,6 +22,7 @@ menutrans &Find &Нађи
menutrans &Credits &Заслуге
menutrans Co&pying П&реузимање
menutrans O&rphans &Сирочићи
menutrans &Sponsor/Register Спонзор/&Региструјте\ се
menutrans &Version &Верзија
menutrans &About &О\ програму
@@ -28,6 +30,7 @@ menutrans &About &О\ програму
menutrans &File &Датотека
menutrans &Open\.\.\.<Tab>:e &Отвори\.\.\.<Tab>:e
menutrans Sp&lit-Open\.\.\.<Tab>:sp &Подели-отвори\.\.\.<Tab>:sp
menutrans Open\ Tab\.\.\.<Tab>:tabnew Отвори\ картицу\.\.\.<Tab>:tabnew
menutrans &New<Tab>:enew &Нова<Tab>:enew
menutrans &Close<Tab>:close &Затвори<Tab>:close
menutrans &Save<Tab>:w &Сачувај<Tab>:w
@@ -54,24 +57,27 @@ menutrans &Select\ all<Tab>ggVG Изабери\ св&е<Tab>ggVG
menutrans &Find\.\.\. &Нађи\.\.\.
menutrans Find\ and\ Rep&lace\.\.\. Нађи\ и\ &замени\.\.\.
menutrans Settings\ &Window П&розор\ подешавања
menutrans Startup\ &Settings По&дешавања\ при\ покретању
menutrans &Global\ Settings Оп&шта\ подешавања
menutrans F&ile\ Settings Подешавања\ за\ да&тотеке
menutrans &Shiftwidth &Померај
menutrans Soft\ &Tabstop &Мека\ табулација
menutrans Te&xt\ Width\.\.\. &Ширина\ текста\.\.\.
menutrans &File\ Format\.\.\. &Врста\ датотеке\.\.\.
menutrans C&olor\ Scheme Бо&је
menutrans &Keymap Прес&ликавање\ тастатуре
menutrans Show\ C&olor\ Schemes\ in\ Menu Прикажи\ шеме\ бо&ја\ у\ менију
menutrans C&olor\ Scheme \Шеме\ бо&ја
menutrans Show\ &Keymaps\ in\ Menu Прикажи\ прес&ликавања\ тастатуре\ у\ менију
menutrans &Keymap Прес&ликавања\ тастатуре
menutrans Select\ Fo&nt\.\.\. Избор\ &фонта\.\.\.
" Edit/Global Settings
menutrans Toggle\ Pattern\ &Highlight<Tab>:set\ hls! Нагласи\ &образце\ (да/не)<Tab>:set\ hls!
menutrans Toggle\ &Ignore-case<Tab>:set\ ic! Занемари\ \величину\ &слова\ (да/не)<Tab>:set\ ic!
menutrans Toggle\ &Showmatch<Tab>:set\ sm! Провери\ пратећу\ &заграду\ (да/не)<Tab>:set\ sm!
menutrans Toggle\ &Ignoring\ Case<Tab>:set\ ic! Занемари\ величину\ &слова\ (да/не)<Tab>:set\ ic!
menutrans Toggle\ &Showing\ Matched\ Pairs<Tab>:set\ sm! Провери\ пратећу\ &заграду\ (да/не)<Tab>:set\ sm!
menutrans &Context\ lines Видљиви\ &редови
menutrans &Virtual\ Edit Виртуелно\ &уређивање
menutrans Toggle\ Insert\ &Mode<Tab>:set\ im! Режим\ у&носа\ (да/не)<Tab>:set\ im!
menutrans Toggle\ Vi\ C&ompatible<Tab>:set\ cp! '&Vi'\ сагласно\ (да/не)<Tab>:set\ cp!
menutrans Toggle\ Vi\ C&ompatibility<Tab>:set\ cp! '&Vi'\ сагласно\ (да/не)<Tab>:set\ cp!
menutrans Search\ &Path\.\.\. Путања\ &претраге\.\.\.
menutrans Ta&g\ Files\.\.\. &Датотеке\ ознака\.\.\.
menutrans Toggle\ &Toolbar Линија\ са\ &алаткама\ (да/не)
@@ -87,28 +93,30 @@ menutrans Block\ and\ Insert Блок\ и\ унос
menutrans Always Увек
" Edit/File Settings
menutrans Toggle\ Line\ &Numbering<Tab>:set\ nu! Редни\ &бројеви\ (да/не)<Tab>:set\ nu!
menutrans Toggle\ Line\ &Numbering<Tab>:set\ nu! Прикажи\ &нумерацију\ линија\ (да/не)<Tab>:set\ nu!
menutrans Toggle\ Relati&ve\ Line\ Numbering<Tab>:set\ rnu! Прикажи\ Релати&вну\ нумерацију\ линија\ (да/не)<Tab>:set\ rnu!
menutrans Toggle\ &List\ Mode<Tab>:set\ list! Режим\ &листе\ (да/не)<Tab>:set\ list!
menutrans Toggle\ Line\ &Wrap<Tab>:set\ wrap! Обавијање\ &редова\ (да/не)<Tab>:set\ wrap!
menutrans Toggle\ W&rap\ at\ word<Tab>:set\ lbr! Преломи\ &на\ реч\ (да/не)<Tab>:set\ lbr!
menutrans Toggle\ &expand-tab<Tab>:set\ et! Размаци\ уместо\ &табулације\ (да/не)<Tab>:set\ et!
menutrans Toggle\ &auto-indent<Tab>:set\ ai! Ауто-&увлачење\ (да/не)<Tab>:set\ ai!
menutrans Toggle\ &C-indenting<Tab>:set\ cin! &Це-увлачење\ (да/не)<Tab>:set\ cin!
menutrans Toggle\ Line\ &Wrapping<Tab>:set\ wrap! Обавијање\ &редова\ (да/не)<Tab>:set\ wrap!
menutrans Toggle\ W&rapping\ at\ Word<Tab>:set\ lbr! Преломи\ &на\ реч\ (да/не)<Tab>:set\ lbr!
menutrans Toggle\ Tab\ &Expanding<Tab>:set\ et! Размаци\ уместо\ &табулације\ (да/не)<Tab>:set\ et!
menutrans Toggle\ &Auto\ Indenting<Tab>:set\ ai! Ауто-&увлачење\ (да/не)<Tab>:set\ ai!
menutrans Toggle\ &C-Style\ Indenting<Tab>:set\ cin! &C-увлачење\ (да/не)<Tab>:set\ cin!
" Edit/Keymap
menutrans None Ниједан
menutrans None Без\ пресликавања
" Tools menu
menutrans &Tools &Алатке
menutrans &Jump\ to\ this\ tag<Tab>g^] Скочи\ на\ &ову\ ознаку<Tab>g^]
menutrans Jump\ &back<Tab>^T Скочи\ &натраг<Tab>^T
menutrans Build\ &Tags\ File Изгради\ &датотеку\ ознака
menutrans &Spelling Пра&вопис
menutrans &Folding &Подвијање
menutrans Create\ &Fold<Tab>zf С&твори\ подвијутак<Tab>zf
menutrans &Delete\ Fold<Tab>zd О&бриши\ подвијутак<Tab>zd
menutrans Delete\ &All\ Folds<Tab>zD Обриши\ све\ по&двијутке<Tab>zD
menutrans Fold\ column\ &width Ширина\ &реда\ подвијутка
menutrans &Diff &Упоређивање
"menutrans &Diff &Упоређивање
menutrans &Make<Tab>:make 'mak&е'<Tab>:make
menutrans &List\ Errors<Tab>:cl Списак\ &грешака<Tab>:cl
menutrans L&ist\ Messages<Tab>:cl! Сп&исак\ порука<Tab>:cl!
@@ -117,9 +125,25 @@ menutrans &Previous\ Error<Tab>:cp Пре&тходна\ грешка<Tab>:cp
menutrans &Older\ List<Tab>:cold Стари\ списа&к<Tab>:cold
menutrans N&ewer\ List<Tab>:cnew Но&ви\ списак<Tab>:cnew
menutrans Error\ &Window Прозор\ са\ г&решкама
menutrans &Set\ Compiler И&забери\ преводиоца
menutrans Se&t\ Compiler И&забери\ преводиоца
menutrans &Convert\ to\ HEX<Tab>:%!xxd Претвори\ у\ &ХЕКС<Tab>:%!xxd
menutrans Conve&rt\ back<Tab>:%!xxd\ -r Вр&ати\ у\ првобитан\ облик<Tab>:%!xxd\ -r
menutrans Show\ Compiler\ Se&ttings\ in\ Menu Прикажи\ поде&шавања\ преводиоца\ у\ менију
" Tools/Spelling
menutrans &Spell\ Check\ On &Укључи\ проверу\ правописа
menutrans Spell\ Check\ &Off &Искључи\ проверу\ правописа
menutrans To\ &Next\ Error<Tab>]s Иди\ на\ &следећу\ грешку<Tab>]s
menutrans To\ &Previous\ Error<Tab>[s Иди\ на\ &претходну\ грешку<Tab>[s
menutrans Suggest\ &Corrections<Tab>z= Предложи\ исп&равке<Tab>z=
menutrans &Repeat\ Correction<Tab>:spellrepall П&онови\ исправку<Tab>:spellrepall
menutrans Set\ Language\ to\ "en" Постави\ језик\ на\ "en"
menutrans Set\ Language\ to\ "en_au" Постави\ језик\ на\ "en_au"
menutrans Set\ Language\ to\ "en_ca" Постави\ језик\ на\ "en_ca"
menutrans Set\ Language\ to\ "en_gb" Постави\ језик\ на\ "en_gb"
menutrans Set\ Language\ to\ "en_nz" Постави\ језик\ на\ "en_nz"
menutrans Set\ Language\ to\ "en_us" Постави\ језик\ на\ "en_us"
menutrans &Find\ More\ Languages Пронађи\ још\ језика
" Tools/Folding
menutrans &Enable/Disable\ folds<Tab>zi &Омогући/прекини\ подвијање<Tab>zi
@@ -130,6 +154,7 @@ menutrans &Close\ all\ folds<Tab>zM Затвори\ с&ве\ подвијут
menutrans O&pen\ more\ folds<Tab>zr Отвори\ виш&е\ подвијутака<Tab>zr
menutrans &Open\ all\ folds<Tab>zR О&твори\ све\ подвијутке<Tab>zR
menutrans Fold\ Met&hod &Начин\ подвијања
menutrans Fold\ Col&umn\ Width Ширина\ колоне\ испред\ подвијутака
" Tools/Folding/Fold Method
menutrans M&anual &Ручно
@@ -141,8 +166,8 @@ menutrans Ma&rker &Ознака
" Tools/Diff
menutrans &Update &Ажурирај
menutrans &Get\ Block &Прихвати\ измену
menutrans &Put\ Block Пре&баци\ измену
menutrans &Get\ Block &Прихвати\ блок\ изменa
menutrans &Put\ Block Пре&баци\ блок\ измена
" Tools/Error Window
menutrans &Update<Tab>:cwin &Ажурирај<Tab>:cwin
@@ -190,8 +215,10 @@ menutrans Cu&t &Исеци
menutrans &Copy &Копирај
menutrans &Paste &Убаци
menutrans &Delete И&збриши
menutrans Select\ Blockwise Бирај\ &правоугаоно
menutrans Select\ Blockwise Бирај\ б&локовски
menutrans Select\ &Word Изабери\ &реч
menutrans Select\ &Sentence Изабери\ р&еченицу
menutrans Select\ Pa&ragraph Изабери\ &параграф
menutrans Select\ &Line Изабери\ р&ед
menutrans Select\ &Block Изабери\ &блок
menutrans Select\ &All Изабери\ &све
@@ -237,9 +264,9 @@ endif
" Syntax menu
menutrans &Syntax &Синтакса
menutrans &Show\ filetypes\ in\ menu Избор\ 'filetype'\ из\ &менија
menutrans Set\ '&syntax'\ only Поде&си\ 'syntax'\ само
menutrans Set\ '&filetype'\ too Подеси\ 'filetype'\ &такође
menutrans &Show\ File\ Types\ in\ Menu Прикажи\ типове\ датотека\ у\ &менију
menutrans Set\ '&syntax'\ only Поде&си\ само\ 'syntax'
menutrans Set\ '&filetype'\ too Подеси\ &такође\ и\ 'filetype'
menutrans &Off &Искључено
menutrans &Manual &Ручно
menutrans A&utomatic &Аутоматски
@@ -257,7 +284,9 @@ let g:menutrans_tags_dialog = "Унесите имена датотека са
let g:menutrans_textwidth_dialog = "Унесите нову ширину текста (0 спречава прелом)"
let g:menutrans_fileformat_dialog = "Изаберите врсту датотеке"
let g:menutrans_fileformat_dialog = "Изаберите формат записа датотеке"
let g:menutrans_fileformat_choices = "&Unix\n&Dos\n&Mac\n&Откажи"
let menutrans_no_file = "[Нема датотеке]"

View File

@@ -1,7 +1,7 @@
" These commands create the option window.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2017 Nov 21
" Last Change: 2018 Feb 27
" If there already is an option window, jump to that one.
let buf = bufnr('option-window')
@@ -122,11 +122,13 @@ fun! <SID>Update(lnum, line, local, thiswin)
endfun
" Reset 'title' and 'icon' to make it work faster.
" Reset 'undolevels' to avoid undo'ing until the buffer is empty.
let s:old_title = &title
let s:old_icon = &icon
let s:old_sc = &sc
let s:old_ru = &ru
set notitle noicon nosc noru
let s:old_ul = &ul
set notitle noicon nosc noru ul=-1
" If the current window is a help window, try finding a non-help window.
" Relies on syntax highlighting to be switched on.
@@ -756,7 +758,7 @@ call <SID>OptionG("km", &km)
call <SID>Header("editing text")
call append("$", "undolevels\tmaximum number of changes that can be undone")
call append("$", "\t(global or local to buffer)")
call append("$", " \tset ul=" . &ul)
call append("$", " \tset ul=" . s:old_ul)
call append("$", "undofile\tautomatically save and restore undo history")
call <SID>BinOptionG("udf", &udf)
call append("$", "undodir\tlist of directories for undo files")
@@ -802,6 +804,8 @@ if has("insert_expand")
call <SID>OptionG("cot", &cot)
call append("$", "pumheight\tmaximum height of the popup menu")
call <SID>OptionG("ph", &ph)
call append("$", "pumwidth\tminimum width of the popup menu")
call <SID>OptionG("pw", &pw)
call append("$", "completefunc\tuser defined function for Insert mode completion")
call append("$", "\t(local to buffer)")
call <SID>OptionL("cfu")
@@ -1354,10 +1358,18 @@ if exists("&pythondll")
call append("$", "pythondll\tname of the Python 2 dynamic library")
call <SID>OptionG("pythondll", &pythondll)
endif
if exists("&pythonhome")
call append("$", "pythonhome\tname of the Python 2 home directory")
call <SID>OptionG("pythonhome", &pythonhome)
endif
if exists("&pythonthreedll")
call append("$", "pythonthreedll\tname of the Python 3 dynamic library")
call <SID>OptionG("pythonthreedll", &pythonthreedll)
endif
if exists("&pythonthreehome")
call append("$", "pythonthreehome\tname of the Python 3 home directory")
call <SID>OptionG("pythonthreehome", &pythonthreehome)
endif
if exists("&rubydll")
call append("$", "rubydll\tname of the Ruby dynamic library")
call <SID>OptionG("rubydll", &rubydll)
@@ -1428,6 +1440,7 @@ let &icon = s:old_icon
let &ru = s:old_ru
let &sc = s:old_sc
let &cpo = s:cpo_save
unlet s:old_title s:old_icon s:old_ru s:old_sc s:cpo_save s:idx s:lnum
let &ul = s:old_ul
unlet s:old_title s:old_icon s:old_ru s:old_sc s:cpo_save s:idx s:lnum s:old_ul
" vim: ts=8 sw=2 sts=2

View File

@@ -105,14 +105,48 @@ func s:StartDebug(cmd)
let s:gdbwin = win_getid(winnr())
" Connect gdb to the communication pty, using the GDB/MI interface
" If you get an error "undefined command" your GDB is too old.
call term_sendkeys(s:gdbbuf, 'new-ui mi ' . commpty . "\r")
" Wait for the response to show up, users may not notice the error and wonder
" why the debugger doesn't work.
let try_count = 0
while 1
let response = ''
for lnum in range(1,20)
if term_getline(s:gdbbuf, lnum) =~ 'new-ui mi '
let response = term_getline(s:gdbbuf, lnum + 1)
if response =~ 'Undefined command'
echoerr 'Sorry, your gdb is too old, gdb 7.12 is required'
exe 'bwipe! ' . s:ptybuf
exe 'bwipe! ' . s:commbuf
return
endif
if response =~ 'New UI allocated'
" Success!
break
endif
endif
endfor
if response =~ 'New UI allocated'
break
endif
let try_count += 1
if try_count > 100
echoerr 'Cannot check if your gdb works, continuing anyway'
break
endif
sleep 10m
endwhile
" Interpret commands while the target is running. This should usualy only be
" exec-interrupt, since many commands don't work properly while the target is
" running.
call s:SendCommand('-gdb-set mi-async on')
" Disable pagination, it causes everything to stop at the gdb
" "Type <return> to continue" prompt.
call s:SendCommand('-gdb-set pagination off')
" Sign used to highlight the line where the program has stopped.
" There can be only one.
sign define debugPC linehl=debugPC
@@ -201,7 +235,7 @@ endfunc
" Install commands in the current window to control the debugger.
func s:InstallCommands()
command Break call s:SetBreakpoint()
command Delete call s:DeleteBreakpoint()
command Clear call s:ClearBreakpoint()
command Step call s:SendCommand('-exec-step')
command Over call s:SendCommand('-exec-next')
command Finish call s:SendCommand('-exec-finish')
@@ -212,24 +246,42 @@ func s:InstallCommands()
command -range -nargs=* Evaluate call s:Evaluate(<range>, <q-args>)
command Gdb call win_gotoid(s:gdbwin)
command Program call win_gotoid(s:ptywin)
command Winbar call s:InstallWinbar()
" TODO: can the K mapping be restored?
nnoremap K :Evaluate<CR>
if has('menu') && &mouse != ''
nnoremenu WinBar.Step :Step<CR>
nnoremenu WinBar.Next :Over<CR>
nnoremenu WinBar.Finish :Finish<CR>
nnoremenu WinBar.Cont :Continue<CR>
nnoremenu WinBar.Stop :Stop<CR>
nnoremenu WinBar.Eval :Evaluate<CR>
call s:InstallWinbar()
if !exists('g:termdebug_popup') || g:termdebug_popup != 0
let s:saved_mousemodel = &mousemodel
let &mousemodel = 'popup_setpos'
an 1.200 PopUp.-SEP3- <Nop>
an 1.210 PopUp.Set\ breakpoint :Break<CR>
an 1.220 PopUp.Clear\ breakpoint :Clear<CR>
an 1.230 PopUp.Evaluate :Evaluate<CR>
endif
endif
endfunc
let s:winbar_winids = []
" Install the window toolbar in the current window.
func s:InstallWinbar()
nnoremenu WinBar.Step :Step<CR>
nnoremenu WinBar.Next :Over<CR>
nnoremenu WinBar.Finish :Finish<CR>
nnoremenu WinBar.Cont :Continue<CR>
nnoremenu WinBar.Stop :Stop<CR>
nnoremenu WinBar.Eval :Evaluate<CR>
call add(s:winbar_winids, win_getid(winnr()))
endfunc
" Delete installed debugger commands in the current window.
func s:DeleteCommands()
delcommand Break
delcommand Delete
delcommand Clear
delcommand Step
delcommand Over
delcommand Finish
@@ -240,16 +292,34 @@ func s:DeleteCommands()
delcommand Evaluate
delcommand Gdb
delcommand Program
delcommand Winbar
nunmap K
if has('menu')
aunmenu WinBar.Step
aunmenu WinBar.Next
aunmenu WinBar.Finish
aunmenu WinBar.Cont
aunmenu WinBar.Stop
aunmenu WinBar.Eval
" Remove the WinBar entries from all windows where it was added.
let curwinid = win_getid(winnr())
for winid in s:winbar_winids
if win_gotoid(winid)
aunmenu WinBar.Step
aunmenu WinBar.Next
aunmenu WinBar.Finish
aunmenu WinBar.Cont
aunmenu WinBar.Stop
aunmenu WinBar.Eval
endif
endfor
call win_gotoid(curwinid)
let s:winbar_winids = []
if exists('s:saved_mousemodel')
let &mousemodel = s:saved_mousemodel
unlet s:saved_mousemodel
aunmenu PopUp.-SEP3-
aunmenu PopUp.Set\ breakpoint
aunmenu PopUp.Clear\ breakpoint
aunmenu PopUp.Evaluate
endif
endif
exe 'sign unplace ' . s:pc_id
@@ -278,8 +348,8 @@ func s:SetBreakpoint()
endif
endfunc
" :Delete - Delete a breakpoint at the cursor position.
func s:DeleteBreakpoint()
" :Clear - Delete a breakpoint at the cursor position.
func s:ClearBreakpoint()
let fname = fnameescape(expand('%:p'))
let lnum = line('.')
for [key, val] in items(s:breakpoints)
@@ -325,9 +395,11 @@ func s:Evaluate(range, arg)
else
let expr = expand('<cexpr>')
endif
let s:ignoreEvalError = 0
call s:SendEval(expr)
endfunc
let s:ignoreEvalError = 0
let s:evalFromBalloonExpr = 0
" Handle the result of data-evaluate-expression
@@ -347,6 +419,7 @@ func s:HandleEvaluate(msg)
if s:evalexpr[0] != '*' && value =~ '^0x' && value != '0x0' && value !~ '"$'
" Looks like a pointer, also display what it points to.
let s:ignoreEvalError = 1
call s:SendEval('*' . s:evalexpr)
else
let s:evalFromBalloonExpr = 0
@@ -359,19 +432,19 @@ func TermDebugBalloonExpr()
if v:beval_winid != s:startwin
return
endif
call s:SendEval(v:beval_text)
let s:evalFromBalloonExpr = 1
let s:evalFromBalloonExprResult = ''
let s:ignoreEvalError = 1
call s:SendEval(v:beval_text)
return ''
endfunc
" Handle an error.
func s:HandleError(msg)
if a:msg =~ 'No symbol .* in current context'
\ || a:msg =~ 'Cannot access memory at address '
\ || a:msg =~ 'Attempt to use a type name as an expression'
\ || a:msg =~ 'A syntax error in expression,'
if s:ignoreEvalError
" Result of s:SendEval() failed, ignore.
let s:ignoreEvalError = 0
let s:evalFromBalloonExpr = 0
return
endif
echoerr substitute(a:msg, '.*msg="\(.*\)"', '\1', '')

View File

@@ -1,29 +1,30 @@
" Vim plugin for using Vim as manpager.
" Maintainer: Enno Nagel <ennonagel+vim@gmail.com>
" Last Change: 2017 November 07
" Last Change: 2018 Feb 04
" $MAN_PN is supposed to be set by MANPAGER, see ":help manpager.vim".
if empty($MAN_PN)
finish
endif
command! -nargs=0 MANPAGER call s:ManPager() | delcommand MANPAGER
command! -nargs=0 MANPAGER call s:MANPAGER() | delcommand MANPAGER
function! s:MANPAGER()
let page_pattern = '\v\w[-_.:0-9A-Za-z]*'
let sec_pattern = '\v\w+%(\+\w+)*'
let pagesec_pattern = '\v(' . page_pattern . ')\((' . sec_pattern . ')\)'
if $MAN_PN is '1'
let manpage = tolower(matchstr( getline(nextnonblank(1)), '^' . pagesec_pattern ))
else
let manpage = expand($MAN_PN)
function! s:ManPager()
set nocompatible
if exists('+viminfofile')
set viminfofile=NONE
endif
set noswapfile
let page_sec = matchlist(manpage, '^' . pagesec_pattern . '$')
setlocal ft=man
runtime ftplugin/man.vim
setlocal buftype=nofile bufhidden=hide iskeyword+=: modifiable
bwipe!
" Emulate 'col -b'
silent keepj keepp %s/\v(.)\b\ze\1?//ge
setlocal filetype=man
exe 'Man' page_sec[2] page_sec[1]
" Remove empty lines above the header
call cursor(1, 1)
let n = search(".*(.*)", "c")
if n > 1
exe "1," . n-1 . "d"
endif
setlocal nomodified readonly
syntax on
endfunction

View File

@@ -1,7 +1,7 @@
" Vim support file to detect file types in scripts
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last change: 2017 Nov 11
" Last change: 2018 Feb 03
" 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
@@ -133,7 +133,7 @@ if s:line1 =~# "^#!"
set ft=ruby
" JavaScript
elseif s:name =~# 'node\(js\)\=\>' || s:name =~# 'rhino\>'
elseif s:name =~# 'node\(js\)\=\>\|js\>' || s:name =~# 'rhino\>'
set ft=javascript
" BC calculator
@@ -176,6 +176,10 @@ if s:line1 =~# "^#!"
elseif s:name =~# 'scala\>'
set ft=scala
" Clojure
elseif s:name =~# 'clojure'
set ft=clojure
endif
unlet s:name

142
runtime/spell/sr/main.aap Normal file
View File

@@ -0,0 +1,142 @@
# Aap recipe for Serbian Vim spell files.
# Use a freshly compiled Vim if it exists.
@if os.path.exists('../../../src/vim'):
VIM = ../../../src/vim
@else:
:progsearch VIM vim
SPELLDIR = ..
FILES = sr_RS.aff sr_RS.dic
'sr_RS@latin.aff' 'sr_RS@latin.dic'
all: $SPELLDIR/sr.utf-8.spl $SPELLDIR/'sr@latin.utf-8.spl' ../README_sr.txt
# Original files will be in the subfolder hunspell-sr after unpacking:
# sr.dic original cyrillic dictionary
# sr.aff original cyrillic affix file
# sr-Latn.dic original latin dictionary file
# sr-Latn.aff original latin affix file
# Just before using the dictionary files, the right ones are copied to
# sr_RS.aff
# sr_RS.dic
# and
# sr_RS@latin.aff
# sr_RS@latin.dic
$SPELLDIR/sr.utf-8.spl : $FILES
:sys env LANG=sr_RS.UTF-8
$VIM -u NONE -e -c "set enc=utf-8" -c "mkspell! $SPELLDIR/sr sr_RS" -c q
$SPELLDIR/"sr@latin.utf-8.spl" : $FILES
:sys env LANG=sr_RS@latin.UTF-8
$VIM -u NONE -e -c "set enc=utf-8" -c "mkspell! $SPELLDIR/sr@latin sr_RS@latin" -c q
../README_sr.txt : hunspell-sr/README_sr.txt README_sr_RS.txt
:cat README_sr_RS.txt >!$target
:print >>$target
:print ============================================================== >>$target
:print Следи оригинална README датотека: >>$target
:print >>$target
:cat hunspell-sr/README_sr.txt >>$target
#
# Used to fetch the files.
#
ZIPFILE = http://devbase.net/dict-sr/hunspell-sr-20130715.zip
:attr {fetch = $ZIPFILE} sr_RS.zip
# The files don't depend on the .zip file so that we can delete it.
# Only download the zip file if the targets don't exist.
sr_RS.aff sr_RS.dic: {buildcheck=}
:assertpkg unzip patch
:fetch sr_RS.zip
:sys $UNZIP sr_RS.zip
:delete sr_RS.zip
@if not os.path.exists('sr_RS.orig.aff'):
:copy hunspell-sr/sr.aff sr_RS.orig.aff
@if not os.path.exists('sr_RS.orig.dic'):
:copy hunspell-sr/sr.dic sr_RS.orig.dic
@if os.path.exists('sr_RS.diff'):
:sys patch <sr_RS.diff
:copy sr_RS.orig.aff sr_RS.aff
:copy sr_RS.orig.dic sr_RS.dic
# Remove the 3 misspelled words and update the word count
# :sys $VIM -u NONE -e -c "set enc=utf-8"
# -c "e sr_RS.orig.dic"
# -c "%g/ажуриранје/d"
# -c "%g/вишнја/d"
# -c "%g/вишнјевац/d"
# -c "%s/263909/263906/e"
# -c "w! sr_RS.dic"
# -c q
sr_RS@latin.aff sr_RS@latin.dic: {buildcheck=}
:assertpkg unzip patch
:fetch sr_RS.zip
:sys $UNZIP sr_RS.zip
:delete sr_RS.zip
@if not os.path.exists('sr_RS@latin.orig.aff'):
:copy hunspell-sr/sr-Latn.aff 'sr_RS@latin.orig.aff'
@if not os.path.exists('sr_RS@latin.orig.dic'):
:copy hunspell-sr/sr-Latn.dic 'sr_RS@latin.orig.dic'
@if os.path.exists('sr_RS@latin.diff'):
:sys patch <'sr_RS@latin.diff'
:copy 'sr_RS@latin.orig.aff' 'sr_RS@latin.aff'
:copy 'sr_RS@latin.orig.dic' 'sr_RS@latin.dic'
# Remove the 3 duplicated words and update the word count
# :sys $VIM -u NONE -e -c "set enc=utf-8"
# -c "e sr_RS@latin.orig.dic"
# -c "%g/\v(ažuriranje)(\_.*\1)@=/d"
# -c "%g/\v(višnja)(\_.*\1)@=/d"
# -c "%g/\v(višnjevac)(\_.*\1)@=/d"
# -c "%s/263909/263906/e"
# -c "w! sr_RS@latin.dic"
# -c q
# Generate diff files, so that others can get the files and apply
# the diffs to get the Vim versions.
diff:
:assertpkg diff
:sys {force} diff -a -C 1 sr_RS.orig.aff sr_RS.aff >sr_RS.diff
:sys {force} diff -a -C 1 sr_RS.orig.dic sr_RS.dic >>sr_RS.diff
:sys {force} diff -a -C 1 'sr_RS@latin.orig.aff' 'sr_RS@latin.aff' >'sr_RS@latin.diff'
:sys {force} diff -a -C 1 'sr_RS@latin.orig.dic' 'sr_RS@latin.dic' >>'sr_RS@latin.diff'
# Delete all the unpacked and generated files, including the "orig" files.
clean:
:delete {force} sr_RS.zip sr_RS.dic
sr_RS.orig.aff sr_RS.orig.dic
sr_RS.aff
'sr_RS@latin.dic' 'sr_RS@latin.aff'
'sr_RS@latin.orig.aff' 'sr_RS@latin.orig.dic'
:sys rm -f -r hunspell-sr/
# Check for updated OpenOffice spell files. When there are changes the
# ".new.aff" and ".new.dic" files are left behind for manual inspection.
#
#check:
# :assertpkg unzip diff
# :fetch fr_FR.zip
# :mkdir tmp
# :cd tmp
# @try:
# @import stat
# :sys $UNZIP ../fr_FR.zip
# :sys {force} diff ../fr_FR.orig.aff fr_FR.aff >d
# @if os.stat('d')[stat.ST_SIZE] > 0:
# :copy fr_FR.aff ../fr_FR.new.aff
# :sys {force} diff ../fr_FR.orig.dic fr_FR.dic >d
# @if os.stat('d')[stat.ST_SIZE] > 0:
# :copy fr_FR.dic ../fr_FR.new.dic
# @finally:
# :cd ..
# :delete {r}{f}{q} tmp
# :delete fr_FR.zip
vim: set sts=4 sw=4 :

View File

@@ -0,0 +1,68 @@
*** sr_RS.orig.aff Fri Feb 23 20:04:41 2018
--- sr_RS.aff Fri Feb 23 18:18:48 2018
***************
*** 1,10 ****
! SET UTF-8
! LANG sr
! TRY аиоенртсвумклпјдгзбшчцхћњљжфђџАИОЕНРТСВУМКЛПЈДГЗБШЧЦХЋЊЉЖФЂЏ
! KEY љњертжуиопшђж|асдфгхјклчћ|зџцвбнм|жшђ|ћшч|жчђ|ђћж|зж|љањседрфтгжхуј|јиколпч|азсџдцфвгбх|хнјмк
!
! MAP 4
! MAP цћ
! MAP цч
MAP зж
--- 1,5 ----
! SET utf-8
! MAP 3
! MAP цћч
MAP зж
***************
*** 12,14 ****
! REP 8
REP дј ђ
--- 7,11 ----
! MIDWORD -
!
! REP 4
REP дј ђ
***************
*** 17,28 ****
REP дж џ
- REP ц с # Ако хоћу да откуцам слово „С“ могу се залетети за ознаком на тастатури и уписати „Ц“ (C)
- REP п р # Ако хоћу да откуцам слово „В“ могу се залетети за ознаком и уписати „Б“ (B)
- REP џ х # Ако хоћу да откуцам слово „Р“ могу се залетети за ознаком и уписати „П“ (P)
- REP х н # Ако хоћу да откуцам слово „Х“ могу се залетети за ознаком и уписати „Џ“ (X)
- # Ако хоћу да откуцам слово „В“ могу се залетети за ознаком и уписати „Б“ (B) (покривено KEY паром „в - б“)
-
- ICONV 3
- ICONV ҵ тц
- ICONV ҥ нг
- ICONV ӕ ае
--- 14,15 ----
*** sr_RS.orig.dic Fri Feb 23 20:04:42 2018
--- sr_RS.dic Fri Feb 23 20:04:46 2018
***************
*** 1,2 ****
! 263909
а
--- 1,2 ----
! 263906
а
***************
*** 882,884 ****
ажурираних
- ажуриранје
ажурирано
--- 882,883 ----
***************
*** 22177,22180 ****
вишку
- вишнја
- вишнјевац
Вишну
--- 22176,22177 ----

View File

@@ -0,0 +1,66 @@
*** sr_RS@latin.orig.aff Fri Feb 23 20:08:28 2018
--- sr_RS@latin.aff Fri Feb 23 18:18:48 2018
***************
*** 1,10 ****
! SET UTF-8
! LANG sr-Latn
! TRY aioenrtsvumklpjdgzbščchćnjljžfđdžAIOENRTSVUMKLPJDGZBŠČCHĆNJLJŽFĐDŽ
! KEY qwertyuiopšđž|asdfghjklčć|zxcvbnm|žšđ|ćšč|žčđ|đćž|zy|qawsedrftgyhuj|jikolpč|azsxdcfvgbh|hnjmk
!
! MAP 4
! MAP cć
! MAP cč
MAP zž
--- 1,5 ----
! SET utf-8
! MAP 3
! MAP cćč
MAP zž
***************
*** 12,20 ****
! REP 1
! REP dj đ
! ICONV fi fi
! ICONV fl fl
! ICONV st st
! ICONV ij ij
! ICONV œ oe
--- 7,14 ----
! MIDWORD -
! REP 4
! REP dj đ
! REP fl fl
! REP ff ff
! REP fi fi
*** sr_RS@latin.orig.dic Fri Feb 23 20:08:28 2018
--- sr_RS@latin.dic Fri Feb 23 20:08:53 2018
***************
*** 1,2 ****
! 263909
a
--- 1,2 ----
! 263906
a
***************
*** 882,884 ****
ažuriranih
- ažuriranje
ažurirano
--- 882,883 ----
***************
*** 22177,22184 ****
višku
- višnja
- višnjevac
Višnu
višnja
višnjama
višnjare
višnje
--- 22176,22181 ----

View File

@@ -0,0 +1,77 @@
" Vim syntax file
" Language: Scheme (CHICKEN)
" Last Change: 2018-02-05
" Author: Evan Hanson <evhan@foldling.org>
" Maintainer: Evan Hanson <evhan@foldling.org>
" URL: https://foldling.org/vim/syntax/chicken.vim
" Notes: This is supplemental syntax, to be loaded after the core Scheme
" syntax file (syntax/scheme.vim). Enable it by setting b:is_chicken=1
" and filetype=scheme.
" Only to be used on top of the Scheme syntax.
if !exists('b:did_scheme_syntax')
finish
endif
" Lighten parentheses.
hi! def link schemeParentheses Comment
" foo#bar
syn match schemeExtraSyntax /[^ #'`\t\n()\[\]"|;]\+#[^ '`\t\n()\[\]"|;]\+/
" ##foo#bar
syn match schemeExtraSyntax /##[^ '`\t\n()\[\]"|;]\+/
" Heredocs.
syn region schemeString start=/#<[<#]\s*\z(.*\)/ end=/^\z1$/
" Keywords.
syn match schemeKeyword /#[!:][a-zA-Z0-9!$%&*+-./:<=>?@^_~#]\+/
syn match schemeKeyword /[a-zA-Z0-9!$%&*+-./:<=>?@^_~#]\+:\>/
" C/C++ syntax.
let s:c = globpath(&rtp, 'syntax/cpp.vim', 0, 1)
if len(s:c)
exe 'syn include @c ' s:c[0]
syn region c matchgroup=schemeComment start=/#>/ end=/<#/ contains=@c
endif
syn keyword schemeSyntax define-record
syn keyword schemeLibrarySyntax declare
syn keyword schemeLibrarySyntax module
syn keyword schemeLibrarySyntax reexport
syn keyword schemeLibrarySyntax require-library
syn keyword schemeTypeSyntax -->
syn keyword schemeTypeSyntax ->
syn keyword schemeTypeSyntax :
syn keyword schemeTypeSyntax assume
syn keyword schemeTypeSyntax compiler-typecase
syn keyword schemeTypeSyntax define-specialization
syn keyword schemeTypeSyntax define-type
syn keyword schemeTypeSyntax the
syn keyword schemeExtraSyntax and-let*
syn keyword schemeExtraSyntax match
syn keyword schemeExtraSyntax match-lambda
syn keyword schemeExtraSyntax match-lambda*
syn keyword schemeSpecialSyntax define-compiler-syntax
syn keyword schemeSpecialSyntax define-constant
syn keyword schemeSpecialSyntax define-external
syn keyword schemeSpecialSyntax define-inline
syn keyword schemeSpecialSyntax foreign-code
syn keyword schemeSpecialSyntax foreign-declare
syn keyword schemeSpecialSyntax foreign-lambda
syn keyword schemeSpecialSyntax foreign-lambda*
syn keyword schemeSpecialSyntax foreign-primitive
syn keyword schemeSpecialSyntax foreign-safe-lambda
syn keyword schemeSpecialSyntax foreign-safe-lambda*
syn keyword schemeSpecialSyntax foreign-value
syn keyword schemeSyntaxSyntax begin-for-syntax
syn keyword schemeSyntaxSyntax define-for-syntax
syn keyword schemeSyntaxSyntax er-macro-transformer
syn keyword schemeSyntaxSyntax ir-macro-transformer
syn keyword schemeSyntaxSyntax require-library-for-syntax

View File

@@ -1,9 +1,10 @@
" Vim syntax file
" Language: configure.in script: M4 with sh
" Maintainer: Christian Hammesr <ch@lathspell.westend.com>
" Last Change: 2015 Jan 14
" Former Maintainer: Christian Hammesr <ch@lathspell.westend.com>
" Last Change: 2018 Feb 03
" (patch from Yngve Inntjore Levinsen to detect AC_MSG)
" (patch from Khym Chanur to add @Spell)
" (patch from James McCoy to fix paren matching)
" Well, I actually even do not know much about m4. This explains why there
" is probably very much missing here, yet !
@@ -30,8 +31,8 @@ syn keyword configspecial cat rm eval
syn region configstring start=+\z(["'`]\)+ skip=+\\\z1+ end=+\z1+ contains=@Spell
" Anything inside AC_MSG_TYPE([...]) and AC_MSG_TYPE(...) is a string.
syn region configstring matchgroup=configfunction start="AC_MSG_[A-Z]*\ze(\[" matchgroup=configdelimiter end="\])" contains=configdelimiter,@Spell
syn region configstring matchgroup=configfunction start="AC_MSG_[A-Z]*\ze([^[]" matchgroup=configdelimiter end=")" contains=configdelimiter,@Spell
syn region configmsg matchgroup=configfunction start="AC_MSG_[A-Z]*\ze(\[" matchgroup=configdelimiter end="\])" contains=configdelimiter,@Spell
syn region configmsg matchgroup=configfunction start="AC_MSG_[A-Z]*\ze([^[]" matchgroup=configdelimiter end=")" contains=configdelimiter,@Spell
" Define the default highlighting.
" Only when an item doesn't have highlighting yet
@@ -45,6 +46,7 @@ hi def link confignumber Number
hi def link configkeyword Keyword
hi def link configspecial Special
hi def link configstring String
hi def link configmsg String
let b:current_syntax = "config"

View File

@@ -4,10 +4,10 @@
" Claudio Fleiner <claudio@fleiner.com> (Maintainer)
" Yeti (Add full CSS2, HTML4 support)
" Nikolai Weibull (Add CSS2 support)
" Maintainer: Jules Wang <w.jq0722@gmail.com>
" URL: https://github.com/JulesWang/css.vim
" Last Change: 2017 Jan 14
" cssClassName updated by Ryuichi Hayashida Jan 2016
" Maintainer: Jules Wang <w.jq0722@gmail.com>
" Last Change: 2018 Feb. 27
" cssClassName updated by Ryuichi Hayashida Jan 2016
" quit when a syntax file was already loaded
if !exists("main_syntax")
@@ -69,74 +69,12 @@ endtry
" digits
syn match cssValueInteger contained "[-+]\=\d\+" contains=cssUnitDecorators
syn match cssValueNumber contained "[-+]\=\d\+\(\.\d*\)\=" contains=cssUnitDecorators
syn match cssValueLength contained "[-+]\=\d\+\(\.\d*\)\=\(%\|mm\|cm\|in\|pt\|pc\|em\|ex\|px\|rem\|dpi\|dppx\|dpcm\)\>" contains=cssUnitDecorators
syn match cssValueLength contained "[-+]\=\d\+\(\.\d*\)\=\(mm\|cm\|in\|pt\|pc\|em\|ex\|px\|rem\|dpi\|dppx\|dpcm\)\>" contains=cssUnitDecorators
syn match cssValueLength contained "[-+]\=\d\+\(\.\d*\)\=%" contains=cssUnitDecorators
syn match cssValueAngle contained "[-+]\=\d\+\(\.\d*\)\=\(deg\|grad\|rad\)\>" contains=cssUnitDecorators
syn match cssValueTime contained "+\=\d\+\(\.\d*\)\=\(ms\|s\)\>" contains=cssUnitDecorators
syn match cssValueFrequency contained "+\=\d\+\(\.\d*\)\=\(Hz\|kHz\)\>" contains=cssUnitDecorators
syn match cssIncludeKeyword /@\(-[a-z]\+-\)\=\(media\|keyframes\|import\|charset\|namespace\|page\)/ contained
" @media
syn region cssInclude start=/@media\>/ end=/\ze{/ skipwhite skipnl contains=cssMediaProp,cssValueLength,cssMediaKeyword,cssValueInteger,cssMediaAttr,cssVendor,cssMediaType,cssIncludeKeyword,cssMediaComma,cssComment nextgroup=cssMediaBlock
syn keyword cssMediaType contained screen print aural braille embossed handheld projection tty tv speech all contained skipwhite skipnl
syn keyword cssMediaKeyword only not and contained
syn region cssMediaBlock transparent matchgroup=cssBraces start='{' end='}' contains=css.*Attr,css.*Prop,cssComment,cssValue.*,cssColor,cssURL,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssVendor,cssDefinition,cssTagName,cssClassName,cssIdentifier,cssPseudoClass,cssSelectorOp,cssSelectorOp2,cssAttributeSelector fold
syn match cssMediaComma "," skipwhite skipnl contained
" Reference: http://www.w3.org/TR/css3-mediaqueries/
syn keyword cssMediaProp contained width height orientation scan grid
syn match cssMediaProp contained /\(\(max\|min\)-\)\=\(\(device\)-\)\=aspect-ratio/
syn match cssMediaProp contained /\(\(max\|min\)-\)\=device-pixel-ratio/
syn match cssMediaProp contained /\(\(max\|min\)-\)\=device-\(height\|width\)/
syn match cssMediaProp contained /\(\(max\|min\)-\)\=\(height\|width\|resolution\|monochrome\|color\(-index\)\=\)/
syn keyword cssMediaAttr contained portrait landscape progressive interlace
" @page
" http://www.w3.org/TR/css3-page/
syn match cssPage "@page\>[^{]*{\@=" contains=cssPagePseudo,cssIncludeKeyword nextgroup=cssPageWrap transparent skipwhite skipnl
syn match cssPagePseudo /:\(left\|right\|first\|blank\)/ contained skipwhite skipnl
syn region cssPageWrap contained transparent matchgroup=cssBraces start="{" end="}" contains=cssPageMargin,cssPageProp,cssAttrRegion,css.*Prop,cssComment,cssValue.*,cssColor,cssURL,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssVendor,cssDefinition,cssHacks
syn match cssPageMargin /@\(\(top\|left\|right\|bottom\)-\(left\|center\|right\|middle\|bottom\)\)\(-corner\)\=/ contained nextgroup=cssDefinition skipwhite skipnl
syn keyword cssPageProp contained content size
" http://www.w3.org/TR/CSS2/page.html#break-inside
syn keyword cssPageProp contained orphans widows
" @keyframe
" http://www.w3.org/TR/css3-animations/#keyframes
syn match cssKeyFrame "@\(-[a-z]\+-\)\=keyframes\>[^{]*{\@=" nextgroup=cssKeyFrameWrap contains=cssVendor,cssIncludeKeyword skipwhite skipnl transparent
syn region cssKeyFrameWrap contained transparent matchgroup=cssBraces start="{" end="}" contains=cssKeyFrameSelector
syn match cssKeyFrameSelector /\(\d*%\|from\|to\)\=/ contained skipwhite skipnl nextgroup=cssDefinition
" @import
syn region cssInclude start=/@import\>/ end=/\ze;/ transparent contains=cssStringQ,cssStringQQ,cssUnicodeEscape,cssComment,cssIncludeKeyword,cssURL,cssMediaProp,cssValueLength,cssMediaKeyword,cssValueInteger,cssMediaAttr,cssVendor,cssMediaType
syn region cssInclude start=/@charset\>/ end=/\ze;/ transparent contains=cssStringQ,cssStringQQ,cssUnicodeEscape,cssComment,cssIncludeKeyword
syn region cssInclude start=/@namespace\>/ end=/\ze;/ transparent contains=cssStringQ,cssStringQQ,cssUnicodeEscape,cssComment,cssIncludeKeyword
" @font-face
" http://www.w3.org/TR/css3-fonts/#at-font-face-rule
syn match cssFontDescriptor "@font-face\>" nextgroup=cssFontDescriptorBlock skipwhite skipnl
syn region cssFontDescriptorBlock contained transparent matchgroup=cssBraces start="{" end="}" contains=cssComment,cssError,cssUnicodeEscape,cssCommonAttr,cssFontDescriptorProp,cssValue.*,cssFontDescriptorFunction,cssFontDescriptorAttr,cssNoise
syn match cssFontDescriptorProp contained "\<font-family\>"
syn keyword cssFontDescriptorProp contained src
syn match cssFontDescriptorProp contained "\<font-\(style\|weight\|stretch\)\>"
syn match cssFontDescriptorProp contained "\<unicode-range\>"
syn match cssFontDescriptorProp contained "\<font-\(variant\|feature-settings\)\>"
" src functions
syn region cssFontDescriptorFunction contained matchgroup=cssFunctionName start="\<\(uri\|url\|local\|format\)\s*(" end=")" contains=cssStringQ,cssStringQQ oneline keepend
" font-sytle and font-weight attributes
syn keyword cssFontDescriptorAttr contained normal italic oblique bold
" font-stretch attributes
syn match cssFontDescriptorAttr contained "\<\(\(ultra\|extra\|semi\)-\)\=\(condensed\|expanded\)\>"
" unicode-range attributes
syn match cssFontDescriptorAttr contained "U+[0-9A-Fa-f?]\+"
syn match cssFontDescriptorAttr contained "U+\x\+-\x\+"
" font-feature-settings attributes
syn keyword cssFontDescriptorAttr contained on off
" The 16 basic color names
syn keyword cssColor contained aqua black blue fuchsia gray green lime maroon navy olive purple red silver teal yellow
@@ -162,8 +100,8 @@ syn keyword cssColor contained midnightblue mintcream mistyrose moccasin navajow
syn keyword cssColor contained oldlace olivedrab orange orangered orchid
syn match cssColor contained /\<pale\(goldenrod\|green\|turquoise\|violetred\)\>/
syn keyword cssColor contained papayawhip peachpuff peru pink plum powderblue
syn keyword cssColor contained rosybrown royalblue saddlebrown salmon sandybrown
syn keyword cssColor contained seagreen seashell sienna skyblue slateblue
syn keyword cssColor contained rosybrown royalblue rebeccapurple saddlebrown salmon
syn keyword cssColor contained sandybrown seagreen seashell sienna skyblue slateblue
syn keyword cssColor contained slategray slategrey snow springgreen steelblue tan
syn keyword cssColor contained thistle tomato turquoise violet wheat
syn keyword cssColor contained whitesmoke yellowgreen
@@ -180,10 +118,11 @@ syn match cssImportant contained "!\s*important\>"
syn match cssColor contained "\<transparent\>"
syn match cssColor contained "\<currentColor\>"
syn match cssColor contained "\<white\>"
syn match cssColor contained "#[0-9A-Fa-f]\{3\}\>" contains=cssUnitDecorators
syn match cssColor contained "#[0-9A-Fa-f]\{6\}\>" contains=cssUnitDecorators
syn match cssColor contained "#\x\{3,4\}\>" contains=cssUnitDecorators
syn match cssColor contained "#\x\{6\}\>" contains=cssUnitDecorators
syn match cssColor contained "#\x\{8\}\>" contains=cssUnitDecorators
syn region cssURL contained matchgroup=cssFunctionName start="\<url\s*(" end=")" contains=cssStringQ,cssStringQQ oneline
syn region cssURL contained matchgroup=cssFunctionName start="\<\(uri\|url\|local\|format\)\s*(" end=")" contains=cssStringQ,cssStringQQ oneline
syn region cssFunction contained matchgroup=cssFunctionName start="\<\(rgb\|clip\|attr\|counter\|rect\|cubic-bezier\|steps\)\s*(" end=")" oneline contains=cssValueInteger,cssValueNumber,cssValueLength,cssFunctionComma
syn region cssFunction contained matchgroup=cssFunctionName start="\<\(rgba\|hsl\|hsla\|color-stop\|from\|to\)\s*(" end=")" oneline contains=cssColor,cssValueInteger,cssValueNumber,cssValueLength,cssFunctionComma,cssFunction
syn region cssFunction contained matchgroup=cssFunctionName start="\<\(linear-\|radial-\)\=\gradient\s*(" end=")" oneline contains=cssColor,cssValueInteger,cssValueNumber,cssValueLength,cssFunction,cssGradientAttr,cssFunctionComma
@@ -224,7 +163,6 @@ syn keyword cssBackgroundAttr contained left center right top bottom
" background-repeat attributes
syn match cssBackgroundAttr contained "\<no-repeat\>"
syn match cssBackgroundAttr contained "\<repeat\(-[xy]\)\=\>"
syn keyword cssBackgroundAttr contained space round
" background-size attributes
syn keyword cssBackgroundAttr contained cover contain
@@ -236,7 +174,7 @@ syn match cssBorderProp contained "\<box-decoration-break\>"
syn match cssBorderProp contained "\<box-shadow\>"
" border-image attributes
syn keyword cssBorderAttr contained stretch round space fill
syn keyword cssBorderAttr contained stretch round fill
" border-style attributes
syn keyword cssBorderAttr contained dotted dashed solid double groove ridge inset outset
@@ -264,14 +202,18 @@ syn match cssDimensionProp contained "\<\(min\|max\)-\(width\|height\)\>"
syn keyword cssDimensionProp contained height
syn keyword cssDimensionProp contained width
" shadow and sizing are in other property groups
syn match cssFlexibleBoxProp contained "\<box-\(align\|direction\|flex\|ordinal-group\|orient\|pack\|shadow\|sizing\)\>"
syn keyword cssFlexibleBoxAttr contained start end baseline
syn keyword cssFlexibleBoxAttr contained reverse
syn keyword cssFlexibleBoxAttr contained single multiple
syn keyword cssFlexibleBoxAttr contained horizontal
syn match cssFlexibleBoxAttr contained "\<vertical\(-align\)\@!\>" "escape vertical-align
syn match cssFlexibleBoxAttr contained "\<\(inline\|block\)-axis\>"
" CSS Flexible Box Layout Module Level 1
" http://www.w3.org/TR/css3-flexbox/
" CSS Box Alignment Module Level 3
" http://www.w3.org/TR/css-align-3/
syn match cssFlexibleBoxProp contained "\<flex\(-\(direction\|wrap\|flow\|grow\|shrink\|basis\)\)\=\>"
syn match cssFlexibleBoxProp contained "\<\(align\|justify\)\(-\(items\|self\|content\)\)\=\>"
syn keyword cssFlexibleBoxProp contained order
syn match cssFlexibleBoxAttr contained "\<\(row\|column\|wrap\)\(-reverse\)\=\>"
syn keyword cssFlexibleBoxAttr contained nowrap stretch baseline center
syn match cssFlexibleBoxAttr contained "\<flex\(-\(start\|end\)\)\=\>"
syn match cssFlexibleBoxAttr contained "\<space\(-\(between\|around\)\)\=\>"
" CSS Fonts Module Level 3
" http://www.w3.org/TR/css-fonts-3/
@@ -279,11 +221,11 @@ syn match cssFontProp contained "\<font\(-\(family\|\|feature-settings\|kerning\
" font attributes
syn keyword cssFontAttr contained icon menu caption
syn match cssFontAttr contained "\<small-\(caps\|caption\)\>"
syn match cssFontAttr contained "\<message-box\>"
syn match cssFontAttr contained "\<status-bar\>"
syn keyword cssFontAttr contained larger smaller
syn match cssFontAttr contained "\<\(x\{1,2\}-\)\=\(large\|small\)\>"
syn match cssFontAttr contained "\<small-\(caps\|caption\)\>"
" font-family attributes
syn match cssFontAttr contained "\<\(sans-\)\=serif\>"
syn keyword cssFontAttr contained Antiqua Arial Black Book Charcoal Comic Courier Dingbats Gadget Geneva Georgia Grande Helvetica Impact Linotype Lucida MS Monaco Neue New Palatino Roboto Roman Symbol Tahoma Times Trebuchet Verdana Webdings Wingdings York Zapf
@@ -312,12 +254,16 @@ syn match cssMultiColumnProp contained "\<break-\(after\|before\|inside\)\>"
syn match cssMultiColumnProp contained "\<column-\(count\|fill\|gap\|rule\(-\(color\|style\|width\)\)\=\|span\|width\)\>"
syn keyword cssMultiColumnProp contained columns
syn keyword cssMultiColumnAttr contained balance medium
syn keyword cssMultiColumnAttr contained always avoid left right page column
syn match cssMultiColumnAttr contained "\<avoid-\(page\|column\)\>"
syn keyword cssMultiColumnAttr contained always left right page column
syn match cssMultiColumnAttr contained "\<avoid\(-\(page\|column\)\)\=\>"
" http://www.w3.org/TR/css3-break/#page-break
syn match cssMultiColumnProp contained "\<page\(-break-\(before\|after\|inside\)\)\=\>"
" http://www.w3.org/TR/SVG11/interact.html
syn match cssInteractProp contained "\<pointer-events\>"
syn match cssInteractAttr contained "\<\(visible\)\=\(Painted\|Fill\|Stroke\)\=\>"
" TODO find following items in w3c docs.
syn keyword cssGeneratedContentProp contained quotes crop
syn match cssGeneratedContentProp contained "\<counter-\(reset\|increment\)\>"
@@ -325,7 +271,12 @@ syn match cssGeneratedContentProp contained "\<move-to\>"
syn match cssGeneratedContentProp contained "\<page-policy\>"
syn match cssGeneratedContentAttr contained "\<\(no-\)\=\(open\|close\)-quote\>"
syn match cssGridProp contained "\<grid-\(columns\|rows\)\>"
" https://www.w3.org/TR/css-grid-1/
syn match cssGridProp contained "\<grid\>"
syn match cssGridProp contained "\<grid\(-\(template\|auto\)\)\=\(-\(columns\|rows\|areas\)\)\>"
syn match cssGridProp contained "\<grid-\(column\|row\)\(-\(start\|end\|gap\)\)\=\>"
syn match cssGridProp contained "\<grid-\(area\|gap\)\>"
syn match cssGridProp contained "\<grid-auto-flow\>"
syn match cssHyerlinkProp contained "\<target\(-\(name\|new\|position\)\)\=\>"
@@ -339,14 +290,14 @@ syn keyword cssListAttr contained inside outside
syn keyword cssPositioningProp contained bottom clear clip display float left
syn keyword cssPositioningProp contained position right top visibility
syn match cssPositioningProp contained "\<z-index\>"
syn keyword cssPositioningAttr contained block compact
syn keyword cssPositioningAttr contained block compact grid
syn match cssPositioningAttr contained "\<table\(-\(row-group\|\(header\|footer\)-group\|row\|column\(-group\)\=\|cell\|caption\)\)\=\>"
syn keyword cssPositioningAttr contained left right both
syn match cssPositioningAttr contained "\<list-item\>"
syn match cssPositioningAttr contained "\<inline\(-\(block\|box\|table\)\)\=\>"
syn keyword cssPositioningAttr contained static relative absolute fixed
syn match cssPositioningAttr contained "\<inline\(-\(block\|box\|table\|grid\|flex\)\)\=\>"
syn keyword cssPositioningAttr contained static relative absolute fixed subgrid
syn keyword cssPrintAttr contained landscape portrait crop cross always avoid
syn keyword cssPrintAttr contained landscape portrait crop cross always
syn match cssTableProp contained "\<\(caption-side\|table-layout\|border-collapse\|border-spacing\|empty-cells\)\>"
syn keyword cssTableAttr contained fixed collapse separate show hide once always
@@ -419,17 +370,20 @@ syn keyword cssUIAttr contained both horizontal vertical
syn match cssUIProp contained "\<text-overflow\>"
syn keyword cssUIAttr contained clip ellipsis
" Already highlighted Props: font content
syn match cssUIProp contained "\<image-rendering\>"
syn keyword cssUIAttr contained pixellated
syn match cssUIAttr contained "\<crisp-edges\>"
"------------------------------------------------
" Webkit/iOS specific attributes
syn match cssUIAttr contained '\(preserve-3d\)'
syn match cssUIAttr contained '\<preserve-3d\>'
" IE specific attributes
syn match cssIEUIAttr contained '\(bicubic\)'
syn match cssIEUIAttr contained '\<bicubic\>'
" Webkit/iOS specific properties
syn match cssUIProp contained '\(tap-highlight-color\|user-select\|touch-callout\)'
syn match cssUIProp contained '\<tap-highlight-color\|user-select\|touch-callout\>'
" IE specific properties
syn match cssIEUIProp contained '\(interpolation-mode\|zoom\|filter\)'
syn match cssIEUIProp contained '\<interpolation-mode\|zoom\|filter\>'
" Webkit/Firebox specific properties/attributes
syn keyword cssUIProp contained appearance
@@ -454,11 +408,25 @@ syn keyword cssAuralAttr contained male female child code digits continuous
" mobile text
syn match cssMobileTextProp contained "\<text-size-adjust\>"
syn keyword cssMediaProp contained width height orientation scan grid
syn match cssMediaProp contained /\(\(max\|min\)-\)\=\(\(device\)-\)\=aspect-ratio/
syn match cssMediaProp contained /\(\(max\|min\)-\)\=device-pixel-ratio/
syn match cssMediaProp contained /\(\(max\|min\)-\)\=device-\(height\|width\)/
syn match cssMediaProp contained /\(\(max\|min\)-\)\=\(height\|width\|resolution\|monochrome\|color\(-index\)\=\)/
syn keyword cssMediaAttr contained portrait landscape progressive interlace
syn match cssKeyFrameProp /\d*%\|from\|to/ contained nextgroup=cssDefinition
syn match cssPageMarginProp /@\(\(top\|left\|right\|bottom\)-\(left\|center\|right\|middle\|bottom\)\)\(-corner\)\=/ contained nextgroup=cssDefinition
syn keyword cssPageProp contained content size
syn keyword cssPageProp contained orphans widows
syn keyword cssFontDescriptorProp contained src
syn match cssFontDescriptorProp contained "\<unicode-range\>"
" unicode-range attributes
syn match cssFontDescriptorAttr contained "U+[0-9A-Fa-f?]\+"
syn match cssFontDescriptorAttr contained "U+\x\+-\x\+"
syn match cssBraces contained "[{}]"
syn match cssError contained "{@<>"
syn region cssDefinition transparent matchgroup=cssBraces start='{' end='}' contains=cssAttrRegion,css.*Prop,cssComment,cssValue.*,cssColor,cssURL,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssVendor,cssDefinition,cssHacks,cssNoise fold
syn region cssDefinition transparent matchgroup=cssBraces start='{' end='}' contains=cssTagName,cssAttributeSelector,cssClassName,cssIdentifier,cssAtRule,cssAttrRegion,css.*Prop,cssComment,cssValue.*,cssColor,cssURL,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssVendor,cssDefinition,cssHacks,cssNoise fold
syn match cssBraceError "}"
syn match cssAttrComma ","
@@ -477,7 +445,7 @@ syn match cssPseudoClassId contained "\<focus\(-inner\)\=\>"
syn match cssPseudoClassId contained "\<\(input-\)\=placeholder\>"
" Misc highlight groups
syntax match cssUnitDecorators /\(#\|-\|%\|mm\|cm\|in\|pt\|pc\|em\|ex\|px\|ch\|rem\|vh\|vw\|vmin\|vmax\|dpi\|dppx\|dpcm\|Hz\|kHz\|s\|ms\|deg\|grad\|rad\)/ contained
syntax match cssUnitDecorators /\(#\|-\|+\|%\|mm\|cm\|in\|pt\|pc\|em\|ex\|px\|ch\|rem\|vh\|vw\|vmin\|vmax\|dpi\|dppx\|dpcm\|Hz\|kHz\|s\|ms\|deg\|grad\|rad\)/ contained
syntax match cssNoise contained /\(:\|;\|\/\)/
" Comment
@@ -490,7 +458,7 @@ syn region cssStringQQ start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=cssUnicodeEsc
syn region cssStringQ start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=cssUnicodeEscape,cssSpecialCharQ
" Vendor Prefix
syn match cssVendor contained "\(-\(webkit\|moz\|o\|ms\)-\)"
syn match cssVendor contained "-\(webkit\|moz\|o\|ms\)-"
" Various CSS Hack characters
" In earlier versions of IE (6 and 7), one can prefix property names
@@ -508,6 +476,34 @@ syn region cssAttrRegion start=/:/ end=/\ze\(;\|)\|}\)/ contained contains=css.*
" 'transition' has Props after ':'.
syn region cssAttrRegion start=/transition\s*:/ end=/\ze\(;\|)\|}\)/ contained contains=css.*Prop,css.*Attr,cssColor,cssImportant,cssValue.*,cssFunction,cssString.*,cssURL,cssComment,cssUnicodeEscape,cssVendor,cssError,cssAttrComma,cssNoise
syn match cssAtKeyword /@\(font-face\|media\|keyframes\|import\|charset\|namespace\|page\|supports\)/ contained
syn keyword cssAtRuleLogical only not and contained
" @media
" Reference: http://www.w3.org/TR/css3-mediaqueries/
syn region cssAtRule start=/@media\>/ end=/\ze{/ skipwhite skipnl matchgroup=cssAtKeyword contains=cssMediaProp,cssValueLength,cssAtRuleLogical,cssValueInteger,cssMediaAttr,cssVendor,cssMediaType,cssComment nextgroup=cssDefinition
syn keyword cssMediaType contained screen print aural braille embossed handheld projection tty tv speech all contained
" @page
" http://www.w3.org/TR/css3-page/
syn region cssAtRule start=/@page\>/ end=/\ze{/ skipwhite skipnl matchgroup=cssAtKeyword contains=cssPagePseudo,cssComment nextgroup=cssDefinition
syn match cssPagePseudo /:\(left\|right\|first\|blank\)/ contained skipwhite skipnl
" @keyframe
" http://www.w3.org/TR/css3-animations/#keyframes
syn region cssAtRule start=/@\(-[a-z]\+-\)\=keyframes\>/ end=/\ze{/ skipwhite skipnl matchgroup=cssAtKeyword contains=cssVendor,cssComment nextgroup=cssDefinition
syn region cssAtRule start=/@import\>/ end=/\ze;/ contains=cssStringQ,cssStringQQ,cssUnicodeEscape,cssComment,cssAtKeyword,cssURL,cssMediaProp,cssValueLength,cssAtRuleLogical,cssValueInteger,cssMediaAttr,cssMediaType
syn region cssAtRule start=/@charset\>/ end=/\ze;/ contains=cssStringQ,cssStringQQ,cssUnicodeEscape,cssComment,cssAtKeyword
syn region cssAtRule start=/@namespace\>/ end=/\ze;/ contains=cssStringQ,cssStringQQ,cssUnicodeEscape,cssComment,cssAtKeyword
" @font-face
" http://www.w3.org/TR/css3-fonts/#at-font-face-rule
syn match cssAtRule "@font-face\>" nextgroup=cssFontDescriptorBlock
" @supports
" https://www.w3.org/TR/css3-conditional/#at-supports
syn region cssAtRule start=/@supports\>/ end=/\ze{/ skipwhite skipnl contains=cssAtRuleLogical,cssAttrRegion,css.*Prop,cssValue.*,cssVendor,cssAtKeyword,cssComment nextgroup=cssDefinition
if main_syntax == "css"
syn sync minlines=10
@@ -537,6 +533,7 @@ hi def link cssFontProp cssProp
hi def link cssGeneratedContentProp cssProp
hi def link cssGridProp cssProp
hi def link cssHyerlinkProp cssProp
hi def link cssInteractProp cssProp
hi def link cssLineboxProp cssProp
hi def link cssListProp cssProp
hi def link cssMarqueeProp cssProp
@@ -567,6 +564,7 @@ hi def link cssFontAttr cssAttr
hi def link cssGeneratedContentAttr cssAttr
hi def link cssGridAttr cssAttr
hi def link cssHyerlinkAttr cssAttr
hi def link cssInteractAttr cssAttr
hi def link cssLineboxAttr cssAttr
hi def link cssListAttr cssAttr
hi def link cssMarginAttr cssAttr
@@ -603,8 +601,8 @@ hi def link cssFunctionName Function
hi def link cssFunctionComma Function
hi def link cssColor Constant
hi def link cssIdentifier Function
hi def link cssInclude Include
hi def link cssIncludeKeyword atKeyword
hi def link cssAtRule Include
hi def link cssAtKeyword PreProc
hi def link cssImportant Special
hi def link cssBraces Function
hi def link cssBraceError Error
@@ -613,20 +611,16 @@ hi def link cssUnicodeEscape Special
hi def link cssStringQQ String
hi def link cssStringQ String
hi def link cssAttributeSelector String
hi def link cssMedia atKeyword
hi def link cssMediaType Special
hi def link cssMediaComma Normal
hi def link cssMediaKeyword Statement
hi def link cssAtRuleLogical Statement
hi def link cssMediaProp cssProp
hi def link cssMediaAttr cssAttr
hi def link cssPage atKeyword
hi def link cssPagePseudo PreProc
hi def link cssPageMargin atKeyword
hi def link cssPageMarginProp cssAtKeyword
hi def link cssPageProp cssProp
hi def link cssKeyFrame atKeyword
hi def link cssKeyFrameSelector Constant
hi def link cssKeyFrameProp Constant
hi def link cssFontDescriptor Special
hi def link cssFontDescriptorFunction Constant
hi def link cssFontDescriptorProp cssProp
hi def link cssFontDescriptorAttr cssAttr
hi def link cssUnicodeRange Constant
@@ -636,7 +630,6 @@ hi def link cssProp StorageClass
hi def link cssAttr Constant
hi def link cssUnitDecorators Number
hi def link cssNoise Noise
hi def link atKeyword PreProc
let b:current_syntax = "css"

View File

@@ -1,15 +1,15 @@
" Vim syntax file
" Language: CUDA (NVIDIA Compute Unified Device Architecture)
" Maintainer: Timothy B. Terriberry <tterribe@users.sourceforge.net>
" Last Change: 2007 Oct 13
" Last Change: 2018 Feb 06
" quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
" Read the C syntax to start with
runtime! syntax/c.vim
" Read the C++ syntax to start with
runtime! syntax/cpp.vim
" CUDA extentions
syn keyword cudaStorageClass __device__ __global__ __host__

View File

@@ -1,10 +1,10 @@
" Vim syntax file
" Language: Debian changelog files
" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
" Maintainer: Debian Vim Maintainers
" Former Maintainers: Gerfried Fuchs <alfie@ist.org>
" Wichert Akkerman <wakkerma@debian.org>
" Last Change: 2017 Apr 23
" URL: https://anonscm.debian.org/cgit/pkg-vim/vim.git/plain/runtime/syntax/debchangelog.vim
" Last Change: 2018 Jan 06
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debchangelog.vim
" Standard syntax initialization
if exists("b:current_syntax")
@@ -21,7 +21,7 @@ let s:binNMU='binary-only=yes'
syn match debchangelogName contained "^[[:alnum:]][[:alnum:].+-]\+ "
exe 'syn match debchangelogFirstKV contained "; \('.s:urgency.'\|'.s:binNMU.'\)"'
exe 'syn match debchangelogOtherKV contained ", \('.s:urgency.'\|'.s:binNMU.'\)"'
syn match debchangelogTarget contained "\v %(frozen|unstable|sid|%(testing|%(old)=stable)%(-proposed-updates|-security)=|experimental|squeeze-%(backports%(-sloppy)=|volatile|lts|security)|%(wheezy|jessie)%(-backports%(-sloppy)=|-security)=|stretch%(-backports|-security)=|%(devel|precise|trusty|vivid|wily|xenial|yakkety|zesty|artful)%(-%(security|proposed|updates|backports|commercial|partner))=)+"
syn match debchangelogTarget contained "\v %(frozen|unstable|sid|%(testing|%(old)=stable)%(-proposed-updates|-security)=|experimental|squeeze-%(backports%(-sloppy)=|volatile|lts|security)|%(wheezy|jessie)%(-backports%(-sloppy)=|-security)=|stretch%(-backports|-security)=|%(devel|precise|trusty|vivid|wily|xenial|yakkety|zesty|artful|bionic)%(-%(security|proposed|updates|backports|commercial|partner))=)+"
syn match debchangelogVersion contained "(.\{-})"
syn match debchangelogCloses contained "closes:\_s*\(bug\)\=#\=\_s\=\d\+\(,\_s*\(bug\)\=#\=\_s\=\d\+\)*"
syn match debchangelogLP contained "\clp:\s\+#\d\+\(,\s*#\d\+\)*"

View File

@@ -1,10 +1,10 @@
" Vim syntax file
" Language: Debian control files
" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
" Maintainer: Debian Vim Maintainers
" Former Maintainers: Gerfried Fuchs <alfie@ist.org>
" Wichert Akkerman <wakkerma@debian.org>
" Last Change: 2017 Nov 04
" URL: https://anonscm.debian.org/cgit/pkg-vim/vim.git/plain/runtime/syntax/debcontrol.vim
" Last Change: 2018 Jan 06
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debcontrol.vim
" Standard syntax initialization
if exists("b:current_syntax")
@@ -52,7 +52,7 @@ let s:sections = [
\, 'devel', 'doc', 'editors', 'education', 'electronics', 'embedded'
\, 'fonts', 'games', 'gnome', 'gnustep', 'gnu-r', 'golang', 'graphics'
\, 'hamradio', 'haskell', 'httpd', 'interpreters', 'introspection'
\, 'java', 'javascript', 'kde', 'kernel', 'libs', 'libdevel', 'lisp'
\, 'java\%(script\)\=', 'kde', 'kernel', 'libs', 'libdevel', 'lisp'
\, 'localization', 'mail', 'math', 'metapackages', 'misc', 'net'
\, 'news', 'ocaml', 'oldlibs', 'otherosfs', 'perl', 'php', 'python'
\, 'ruby', 'rust', 'science', 'shells', 'sound', 'text', 'tex'
@@ -87,44 +87,29 @@ syn match debcontrolComment "^#.*$" contains=@Spell
syn case ignore
" List of all legal keys, in order, from deb-src-control(5)
" Source fields
syn match debcontrolKey contained "^\%(Source\|Maintainer\|Uploaders\|Standards-Version\|Description\|Homepage\|Bugs\|Rules-Requires-Root\): *"
syn match debcontrolKey contained "^\%(XS-\)\=Vcs-\%(Arch\|Bzr\|Cvs\|Darcs\|Git\|Hg\|Mtn\|Svn\|Browser\): *"
syn match debcontrolKey contained "^\%(Origin\|Section\|Priority\): *"
syn match debcontrolKey contained "^Build-\%(Depends\|Conflicts\)\%(-Arch\|-Indep\)\=: *"
" Binary fields
syn match debcontrolKey contained "^\%(Package\%(-Type\)\=\|Architecture\|Build-Profiles\): *"
syn match debcontrolKey contained "^\%(\%(Build-\)\=Essential\|Multi-Arch\|Tag\): *"
syn match debcontrolKey contained "^\%(\%(Pre-\)\=Depends\|Recommends\|Suggests\|Breaks\|Enhances\|Replaces\|Conflicts\|Provides\|Built-Using\): *"
syn match debcontrolKey contained "^\%(Subarchitecture\|Kernel-Version\|Installer-Menu-Item\): *"
" User-defined fields
syn match debcontrolKey contained "^X[SBC]\{0,3\}\%(-Private\)\=-[-a-zA-Z0-9]\+: *"
syn match debcontrolDeprecatedKey contained "^\%(\%(XS-\)\=DM-Upload-Allowed\): *"
" Handle all fields from deb-src-control(5)
" Fields for which we do strict syntax checking
syn region debcontrolStrictField start="^Architecture" end="$" contains=debcontrolKey,debcontrolArchitecture,debcontrolSpace oneline
syn region debcontrolStrictField start="^Multi-Arch" end="$" contains=debcontrolKey,debcontrolMultiArch oneline
syn region debcontrolStrictField start="^\%(Package\|Source\)" end="$" contains=debcontrolKey,debcontrolName oneline
syn region debcontrolStrictField start="^Priority" end="$" contains=debcontrolKey,debcontrolPriority oneline
syn region debcontrolStrictField start="^Section" end="$" contains=debcontrolKey,debcontrolSection oneline
syn region debcontrolStrictField start="^\%(XC-\)\=Package-Type" end="$" contains=debcontrolKey,debcontrolPackageType oneline
syn region debcontrolStrictField start="^Homepage" end="$" contains=debcontrolKey,debcontrolHTTPUrl oneline keepend
syn region debcontrolStrictField start="^\%(XS-\)\=Vcs-\%(Browser\|Arch\|Bzr\|Darcs\|Hg\)" end="$" contains=debcontrolKey,debcontrolHTTPUrl oneline keepend
syn region debcontrolStrictField start="^\%(XS-\)\=Vcs-Svn" end="$" contains=debcontrolKey,debcontrolVcsSvn,debcontrolHTTPUrl oneline keepend
syn region debcontrolStrictField start="^\%(XS-\)\=Vcs-Cvs" end="$" contains=debcontrolKey,debcontrolVcsCvs oneline keepend
syn region debcontrolStrictField start="^\%(XS-\)\=Vcs-Git" end="$" contains=debcontrolKey,debcontrolVcsGit oneline keepend
syn region debcontrolStrictField start="^\%(XS-\)\=DM-Upload-Allowed" end="$" contains=debcontrolDeprecatedKey,debcontrolDmUpload oneline
syn region debcontrolStrictField start="^Rules-Requires-Root" end="$" contains=debcontrolKey,debcontrolR3 oneline
syn region debcontrolStrictField start="^\%(Build-\)\=Essential" end="$" contains=debcontrolKey,debcontrolYesNo oneline
syn region debcontrolStrictField matchgroup=debcontrolKey start="^Architecture: *" end="$" contains=debcontrolArchitecture,debcontrolSpace oneline
syn region debcontrolStrictField matchgroup=debcontrolKey start="^Multi-Arch: *" end="$" contains=debcontrolMultiArch oneline
syn region debcontrolStrictField matchgroup=debcontrolKey start="^\%(Package\|Source\): *" end="$" contains=debcontrolName oneline
syn region debcontrolStrictField matchgroup=debcontrolKey start="^Priority: *" end="$" contains=debcontrolPriority oneline
syn region debcontrolStrictField matchgroup=debcontrolKey start="^Section: *" end="$" contains=debcontrolSection oneline
syn region debcontrolStrictField matchgroup=debcontrolKey start="^\%(XC-\)\=Package-Type: *" end="$" contains=debcontrolPackageType oneline
syn region debcontrolStrictField matchgroup=debcontrolKey start="^Homepage: *" end="$" contains=debcontrolHTTPUrl oneline keepend
syn region debcontrolStrictField matchgroup=debcontrolKey start="^\%(XS-\)\=Vcs-\%(Browser\|Arch\|Bzr\|Darcs\|Hg\): *" end="$" contains=debcontrolHTTPUrl oneline keepend
syn region debcontrolStrictField matchgroup=debcontrolKey start="^\%(XS-\)\=Vcs-Svn: *" end="$" contains=debcontrolVcsSvn,debcontrolHTTPUrl oneline keepend
syn region debcontrolStrictField matchgroup=debcontrolKey start="^\%(XS-\)\=Vcs-Cvs: *" end="$" contains=debcontrolVcsCvs oneline keepend
syn region debcontrolStrictField matchgroup=debcontrolKey start="^\%(XS-\)\=Vcs-Git: *" end="$" contains=debcontrolVcsGit oneline keepend
syn region debcontrolStrictField matchgroup=debcontrolKey start="^Rules-Requires-Root: *" end="$" contains=debcontrolR3 oneline
syn region debcontrolStrictField matchgroup=debcontrolKey start="^\%(Build-\)\=Essential: *" end="$" contains=debcontrolYesNo oneline
syn region debcontrolStrictField matchgroup=debcontrolDeprecatedKey start="^\%(XS-\)\=DM-Upload-Allowed: *" end="$" contains=debcontrolDmUpload oneline
" Catch-all for the other legal fields
syn region debcontrolField start="^\%(\%(XSBC-Original-\)\=Maintainer\|Standards-Version\|Bugs\|Origin\|X[SB]-Python-Version\|\%(XS-\)\=Vcs-Mtn\|\%(XS-\)\=Testsuite\|Build-Profiles\|Tag\|Subarchitecture\|Kernel-Version\|Installer-Menu-Item\):" end="$" contains=debcontrolKey,debcontrolVariable,debcontrolEmail oneline
syn region debcontrolMultiField start="^\%(Build-\%(Conflicts\|Depends\)\%(-Arch\|-Indep\)\=\|\%(Pre-\)\=Depends\|Recommends\|Suggests\|Breaks\|Enhances\|Replaces\|Conflicts\|Provides\|Built-Using\|Uploaders\|X[SBC]\{0,3\}\%(Private-\)\=-[-a-zA-Z0-9]\+\):" skip="^[ \t]" end="^$"me=s-1 end="^[^ \t#]"me=s-1 contains=debcontrolKey,debcontrolEmail,debcontrolVariable,debcontrolComment
syn region debcontrolMultiFieldSpell start="^\%(Description\):" skip="^[ \t]" end="^$"me=s-1 end="^[^ \t#]"me=s-1 contains=debcontrolKey,debcontrolEmail,debcontrolVariable,debcontrolComment,@Spell
syn region debcontrolField matchgroup=debcontrolKey start="^\%(\%(XSBC-Original-\)\=Maintainer\|Standards-Version\|Bugs\|Origin\|X[SB]-Python-Version\|\%(XS-\)\=Vcs-Mtn\|\%(XS-\)\=Testsuite\%(-Triggers\)\=\|Build-Profiles\|Tag\|Subarchitecture\|Kernel-Version\|Installer-Menu-Item\): " end="$" contains=debcontrolVariable,debcontrolEmail oneline
syn region debcontrolMultiField matchgroup=debcontrolKey start="^\%(Build-\%(Conflicts\|Depends\)\%(-Arch\|-Indep\)\=\|\%(Pre-\)\=Depends\|Recommends\|Suggests\|Breaks\|Enhances\|Replaces\|Conflicts\|Provides\|Built-Using\|Uploaders\|X[SBC]\{0,3\}\%(Private-\)\=-[-a-zA-Z0-9]\+\): *" skip="^[ \t]" end="^$"me=s-1 end="^[^ \t#]"me=s-1 contains=debcontrolEmail,debcontrolVariable,debcontrolComment
syn region debcontrolMultiFieldSpell matchgroup=debcontrolKey start="^Description: *" skip="^[ \t]" end="^$"me=s-1 end="^[^ \t#]"me=s-1 contains=debcontrolEmail,debcontrolVariable,debcontrolComment,@Spell
" Associate our matches and regions with pretty colours
hi def link debcontrolKey Keyword

View File

@@ -1,9 +1,9 @@
" Vim syntax file
" Language: Debian sources.list
" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
" Maintainer: Debian Vim Maintainers
" Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl>
" Last Change: 2017 Oct 28
" URL: https://anonscm.debian.org/cgit/pkg-vim/vim.git/plain/runtime/syntax/debsources.vim
" Last Change: 2018 Jan 06
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debsources.vim
" Standard syntax initialization
if exists("b:current_syntax")

View File

@@ -2,7 +2,7 @@
" Language: dircolors(1) input file
" Maintainer: Jan Larres <jan@majutsushi.net>
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2013-08-17
" Latest Revision: 2018-02-19
if exists("b:current_syntax")
finish
@@ -135,6 +135,12 @@ function! s:preview_color(linenr) abort
elseif item >= 40 && item <= 47
" ANSI SGR background color
let hi_str .= s:get_hi_str(item - 40, 'bg')
elseif item >= 90 && item <= 97
" ANSI SGR+8 foreground color (xterm 16-color support)
let hi_str .= s:get_hi_str(item - 82, 'fg')
elseif item >= 100 && item <= 107
" ANSI SGR+8 background color (xterm 16-color support)
let hi_str .= s:get_hi_str(item - 92, 'bg')
elseif item == 38
" Foreground for terminals with 88/256 color support
let color = s:get_256color(colors)

View File

@@ -1,84 +1,10 @@
" Vim syntax file
" Language: FORTH
" Maintainer: Christian V. J. Br<42>ssow <cvjb@cvjb.de>
" Last Change: So 27 Mai 2012 15:56:28 CEST
" Current Maintainer: Johan Kotlinski <kotlinski@gmail.com>
" Previous Maintainer: Christian V. J. Br<42>ssow <cvjb@cvjb.de>
" Last Change: 2018-03-29
" Filenames: *.fs,*.ft
" URL: http://www.cvjb.de/comp/vim/forth.vim
" $Id: forth.vim,v 1.14 2012/05/27 15:57:22 bruessow Exp $
" The list of keywords is incomplete, compared with the official ANS
" wordlist. If you use this language, please improve it, and send me
" the patches.
"
" Before sending me patches, please download the newest version of this file
" from http://www.cvjb.de/comp/vim/forth.vim or http://www.vim.org/ (search
" for forth.vim).
" Many Thanks to...
"
" 2012-05-13:
" Dominique Pell<6C> <dominique dot pelle at gmail dot com> for sending the
" patch to allow spellchecking of strings, comments, ...
"
" 2012-01-07:
" Thilo Six <T.Six at gmx dot de> send a patch for cpoptions.
" See the discussion at http://thread.gmane.org/gmane.editors.vim.devel/32151
"
" 2009-06-28:
" Josh Grams send a patch to allow the parenthesis comments at the
" beginning of a line. That patch also fixed a typo in one of the
" comments.
"
" 2008-02-09:
" Shawn K. Quinn <sjquinn at speakeasy dot net> send a big patch with
" new words commonly used in Forth programs or defined by GNU Forth.
"
" 2007-07-11:
" Benjamin Krill <ben at codiert dot org> send me a patch
" to highlight space errors.
" You can toggle this feature on through setting the
" flag forth_space_errors in you vimrc. If you have switched it on,
" you can turn off highlighting of trailing spaces in comments by
" setting forth_no_trail_space_error in your vimrc. If you do not want
" the highlighting of a tabulator following a space in comments, you
" can turn this off by setting forth_no_tab_space_error.
"
" 2006-05-25:
" Bill McCarthy <WJMc@...> and Ilya Sher <ilya-vim@...>
" Who found a bug in the ccomment line in 2004!!!
" I'm really very sorry, that it has taken two years to fix that
" in the official version of this file. Shame on me.
" I think my face will be red the next ten years...
"
" 2006-05-21:
" Thomas E. Vaughan <tevaugha at ball dot com> send me a patch
" for the parenthesis comment word, so words with a trailing
" parenthesis will not start the highlighting for such comments.
"
" 2003-05-10:
" Andrew Gaul <andrew at gaul.org> send me a patch for
" forthOperators.
"
" 2003-04-03:
" Ron Aaron <ron at ronware dot org> made updates for an
" improved Win32Forth support.
"
" 2002-04-22:
" Charles Shattuck <charley at forth dot org> helped me to settle up with the
" binary and hex number highlighting.
"
" 2002-04-20:
" Charles Shattuck <charley at forth dot org> send me some code for correctly
" highlighting char and [char] followed by an opening paren. He also added
" some words for operators, conditionals, and definitions; and added the
" highlighting for s" and c".
"
" 2000-03-28:
" John Providenza <john at probo dot com> made improvements for the
" highlighting of strings, and added the code for highlighting hex numbers.
"
" URL: https://github.com/jkotlinski/forth.vim
" quit when a syntax file was already loaded
if exists("b:current_syntax")
@@ -129,7 +55,10 @@ syn keyword forthOperators F~REL F~ABS F~
syn keyword forthOperators 0< 0<= 0<> 0= 0> 0>= < <= <> = > >= U< U<=
syn keyword forthOperators U> U>= D0< D0<= D0<> D0= D0> D0>= D< D<= D<>
syn keyword forthOperators D= D> D>= DU< DU<= DU> DU>= WITHIN ?NEGATE
syn keyword forthOperators ?DNEGATE
syn keyword forthOperators ?DNEGATE TRUE FALSE
" various words that take an input and do something with it
syn keyword forthFunction . U. .R U.R
" stack manipulations
syn keyword forthStack DROP NIP DUP OVER TUCK SWAP ROT -ROT ?DUP PICK ROLL
@@ -141,7 +70,7 @@ syn keyword forthRstack 4>R 4R> 4R@ 4RDROP
syn keyword forthFStack FDROP FNIP FDUP FOVER FTUCK FSWAP FROT
" stack pointer manipulations
syn keyword forthSP SP@ SP! FP@ FP! RP@ RP! LP@ LP!
syn keyword forthSP SP@ SP! FP@ FP! RP@ RP! LP@ LP! DEPTH
" address operations
syn keyword forthMemory @ ! +! C@ C! 2@ 2! F@ F! SF@ SF! DF@ DF!
@@ -150,7 +79,7 @@ syn keyword forthAdrArith FLOAT+ FLOAT FALIGN FALIGNED SFLOATS SFLOAT+
syn keyword forthAdrArith SFALIGN SFALIGNED DFLOATS DFLOAT+ DFALIGN DFALIGNED
syn keyword forthAdrArith MAXALIGN MAXALIGNED CFALIGN CFALIGNED
syn keyword forthAdrArith ADDRESS-UNIT-BITS ALLOT ALLOCATE HERE
syn keyword forthMemBlks MOVE ERASE CMOVE CMOVE> FILL BLANK
syn keyword forthMemBlks MOVE ERASE CMOVE CMOVE> FILL BLANK UNUSED
" conditionals
syn keyword forthCond IF ELSE ENDIF THEN CASE OF ENDOF ENDCASE ?DUP-IF
@@ -159,7 +88,7 @@ syn keyword forthCond ?DUP-0=-IF AHEAD CS-PICK CS-ROLL CATCH THROW WITHIN
" iterations
syn keyword forthLoop BEGIN WHILE REPEAT UNTIL AGAIN
syn keyword forthLoop ?DO LOOP I J K +DO U+DO -DO U-DO DO +LOOP -LOOP
syn keyword forthLoop UNLOOP LEAVE ?LEAVE EXIT DONE FOR NEXT
syn keyword forthLoop UNLOOP LEAVE ?LEAVE EXIT DONE FOR NEXT RECURSE
" new words
syn match forthClassDef '\<:class\s*[^ \t]\+\>'
@@ -174,8 +103,8 @@ syn keyword forthDefine COMPILE-ONLY COMPILE RESTRICT INTERPRET POSTPONE EXECUTE
syn keyword forthDefine LITERAL CREATE-INTERPRET/COMPILE INTERPRETATION>
syn keyword forthDefine <INTERPRETATION COMPILATION> <COMPILATION ] LASTXT
syn keyword forthDefine COMP' POSTPONE, FIND-NAME NAME>INT NAME?INT NAME>COMP
syn keyword forthDefine NAME>STRING STATE C; CVARIABLE
syn keyword forthDefine , 2, F, C,
syn keyword forthDefine NAME>STRING STATE C; CVARIABLE BUFFER: MARKER
syn keyword forthDefine , 2, F, C, COMPILE,
syn match forthDefine "\[IFDEF]"
syn match forthDefine "\[IFUNDEF]"
syn match forthDefine "\[THEN]"
@@ -196,6 +125,7 @@ syn match forthDefine "'"
syn match forthDefine '\<\[\>'
syn match forthDefine "\[']"
syn match forthDefine '\[COMPILE]'
syn match forthDefine '\[CHAR]'
" debugging
syn keyword forthDebug PRINTDEBUGDATA PRINTDEBUGLINE
@@ -206,7 +136,7 @@ syn keyword forthAssembler ASSEMBLER CODE END-CODE ;CODE FLUSH-ICACHE C,
" basic character operations
syn keyword forthCharOps (.) CHAR EXPECT FIND WORD TYPE -TRAILING EMIT KEY
syn keyword forthCharOps KEY? TIB CR
syn keyword forthCharOps KEY? TIB CR BL COUNT SPACE SPACES
" recognize 'char (' or '[char] (' correctly, so it doesn't
" highlight everything after the paren as a comment till a closing ')'
syn match forthCharOps '\<char\s\S\s'
@@ -216,12 +146,15 @@ syn region forthCharOps start=+."\s+ skip=+\\"+ end=+"+
" char-number conversion
syn keyword forthConversion <<# <# # #> #>> #S (NUMBER) (NUMBER?) CONVERT D>F
syn keyword forthConversion D>S DIGIT DPL F>D HLD HOLD NUMBER S>D SIGN >NUMBER
syn keyword forthConversion F>S S>F
syn keyword forthConversion F>S S>F HOLDS
" interpreter, wordbook, compiler
syn keyword forthForth (LOCAL) BYE COLD ABORT >BODY >NEXT >LINK CFA >VIEW HERE
syn keyword forthForth PAD WORDS VIEW VIEW> N>LINK NAME> LINK> L>NAME FORGET
syn keyword forthForth BODY> ASSERT( ASSERT0( ASSERT1( ASSERT2( ASSERT3( )
syn keyword forthForth >IN ACCEPT ENVIRONMENT? EVALUATE QUIT SOURCE ACTION-OF
syn keyword forthForth DEFER! DEFER@ PARSE PARSE-NAME REFILL RESTORE-INPUT
syn keyword forthForth SAVE-INPUT SOURCE-ID
syn region forthForth start=+ABORT"\s+ skip=+\\"+ end=+"+
" vocabularies
@@ -236,16 +169,17 @@ syn keyword forthFileWords KEY?-FILE WRITE-FILE WRITE-LINE EMIT-FILE
syn keyword forthFileWords FLUSH-FILE FILE-STATUS FILE-POSITION
syn keyword forthFileWords REPOSITION-FILE FILE-SIZE RESIZE-FILE
syn keyword forthFileWords SLURP-FILE SLURP-FID STDIN STDOUT STDERR
syn keyword forthFileWords INCLUDE-FILE INCLUDED REQUIRED
syn keyword forthBlocks OPEN-BLOCKS USE LOAD --> BLOCK-OFFSET
syn keyword forthBlocks GET-BLOCK-FID BLOCK-POSITION LIST SCR BLOCK
syn keyword forthBlocks BUFER EMPTY-BUFFERS EMPTY-BUFFER UPDATE UPDATED?
syn keyword forthBlocks SAVE-BUFFERS SAVE-BUFFER FLUSH THRU +LOAD +THRU
syn keyword forthBlocks BLOCK-INCLUDED
syn keyword forthBlocks BLOCK-INCLUDED BLK
" numbers
syn keyword forthMath DECIMAL HEX BASE
syn match forthInteger '\<-\=[0-9.]*[0-9.]\+\>'
syn match forthInteger '\<&-\=[0-9.]*[0-9.]\+\>'
syn match forthInteger '\<-\=[0-9]\+.\=\>'
syn match forthInteger '\<&-\=[0-9]\+.\=\>'
" recognize hex and binary numbers, the '$' and '%' notation is for gforth
syn match forthInteger '\<\$\x*\x\+\>' " *1* --- dont't mess
syn match forthInteger '\<\x*\d\x*\>' " *2* --- this order!
@@ -253,28 +187,29 @@ syn match forthInteger '\<%[0-1]*[0-1]\+\>'
syn match forthFloat '\<-\=\d*[.]\=\d\+[DdEe]\d\+\>'
syn match forthFloat '\<-\=\d*[.]\=\d\+[DdEe][-+]\d\+\>'
" XXX If you find this overkill you can remove it. This has to come after the
" XXX If you find this overkill you can remove it. this has to come after the
" highlighting for numbers otherwise it has no effect.
syn region forthComment start='0 \[if\]' end='\[endif\]' end='\[then\]' contains=forthTodo
" Strings
syn region forthString start=+\.*\"+ end=+"+ end=+$+ contains=@Spell
syn region forthString start=+\.*\"+ end=+"+ end=+$+
" XXX
syn region forthString start=+s\"+ end=+"+ end=+$+ contains=@Spell
syn region forthString start=+c\"+ end=+"+ end=+$+ contains=@Spell
syn region forthString start=+s\"+ end=+"+ end=+$+
syn region forthString start=+s\\\"+ end=+"+ end=+$+
syn region forthString start=+c\"+ end=+"+ end=+$+
" Comments
syn match forthComment '\\\s.*$' contains=@Spell,forthTodo,forthSpaceError
syn region forthComment start='\\S\s' end='.*' contains=@Spell,forthTodo,forthSpaceError
syn match forthComment '\.(\s[^)]*)' contains=@Spell,forthTodo,forthSpaceError
syn region forthComment start='\(^\|\s\)\zs(\s' skip='\\)' end=')' contains=@Spell,forthTodo,forthSpaceError
syn region forthComment start='/\*' end='\*/' contains=@Spell,forthTodo,forthSpaceError
syn match forthComment '\\\s.*$' contains=forthTodo,forthSpaceError
syn region forthComment start='\\S\s' end='.*' contains=forthTodo,forthSpaceError
syn match forthComment '\.(\s[^)]*)' contains=forthTodo,forthSpaceError
syn region forthComment start='\(^\|\s\)\zs(\s' skip='\\)' end=')' contains=forthTodo,forthSpaceError
syn region forthComment start='/\*' end='\*/' contains=forthTodo,forthSpaceError
" Include files
syn match forthInclude '^INCLUDE\s\+\k\+'
syn match forthInclude '^require\s\+\k\+'
syn match forthInclude '^fload\s\+'
syn match forthInclude '^needs\s\+'
syn match forthInclude '^REQUIRE\s\+\k\+'
syn match forthInclude '^FLOAD\s\+'
syn match forthInclude '^NEEDS\s\+'
" Locals definitions
syn region forthLocals start='{\s' start='{$' end='\s}' end='^}'
@@ -282,9 +217,6 @@ syn match forthLocals '{ }' " otherwise, at least two spaces between
syn region forthDeprecated start='locals|' end='|'
" Define the default highlighting.
" Only when an item doesn't have highlighting yet
" The default methods for highlighting. Can be overridden later.
hi def link forthTodo Todo
hi def link forthOperators Operator
hi def link forthMath Number
@@ -318,11 +250,11 @@ hi def link forthInclude Include
hi def link forthLocals Type " nothing else uses type and locals must stand out
hi def link forthDeprecated Error " if you must, change to Type
hi def link forthFileMode Function
hi def link forthFunction Function
hi def link forthFileWords Statement
hi def link forthBlocks Statement
hi def link forthSpaceError Error
let b:current_syntax = "forth"
let &cpo = s:cpo_save

View File

@@ -1,7 +1,7 @@
" Vim syntax file
" Language: Haskell
" Maintainer: Haskell Cafe mailinglist <haskell-cafe@haskell.org>
" Last Change: 2017 Dec 16
" Last Change: 2018 Mar 29 by Marcin Szamotulski
" Original Author: John Williams <jrw@pobox.com>
"
" Thanks to Ryan Crumley for suggestions and John Meacham for
@@ -38,8 +38,8 @@ if exists("b:current_syntax")
endif
" (Qualified) identifiers (no default highlighting)
syn match ConId "\(\<[A-Z][a-zA-Z0-9_']*\.\)\=\<[A-Z][a-zA-Z0-9_']*\>"
syn match VarId "\(\<[A-Z][a-zA-Z0-9_']*\.\)\=\<[a-z][a-zA-Z0-9_']*\>"
syn match ConId "\(\<[A-Z][a-zA-Z0-9_']*\.\)\=\<[A-Z][a-zA-Z0-9_']*\>" contains=@NoSpell
syn match VarId "\(\<[A-Z][a-zA-Z0-9_']*\.\)\=\<[a-z][a-zA-Z0-9_']*\>" contains=@NoSpell
" Infix operators--most punctuation characters and any (qualified) identifier
" enclosed in `backquotes`. An operator starting with : is a constructor,
@@ -56,7 +56,7 @@ syn match hsDelimiter "(\|)\|\[\|\]\|,\|;\|_\|{\|}"
syn match hsSpecialChar contained "\\\([0-9]\+\|o[0-7]\+\|x[0-9a-fA-F]\+\|[\"\\'&\\abfnrtv]\|^[A-Z^_\[\\\]]\)"
syn match hsSpecialChar contained "\\\(NUL\|SOH\|STX\|ETX\|EOT\|ENQ\|ACK\|BEL\|BS\|HT\|LF\|VT\|FF\|CR\|SO\|SI\|DLE\|DC1\|DC2\|DC3\|DC4\|NAK\|SYN\|ETB\|CAN\|EM\|SUB\|ESC\|FS\|GS\|RS\|US\|SP\|DEL\)"
syn match hsSpecialCharError contained "\\&\|'''\+"
syn region hsString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=hsSpecialChar
syn region hsString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=hsSpecialChar,@NoSpell
syn match hsCharacter "[^a-zA-Z0-9_']'\([^\\]\|\\[^']\+\|\\'\)'"lc=1 contains=hsSpecialChar,hsSpecialCharError
syn match hsCharacter "^'\([^\\]\|\\[^']\+\|\\'\)'" contains=hsSpecialChar,hsSpecialCharError
syn match hsNumber "\v<[0-9]%(_*[0-9])*>|<0[xX]_*[0-9a-fA-F]%(_*[0-9a-fA-F])*>|<0[oO]_*%(_*[0-7])*>|<0[bB]_*[01]%(_*[01])*>"
@@ -66,8 +66,8 @@ syn match hsFloat "\v<[0-9]%(_*[0-9])*\.[0-9]%(_*[0-9])*%(_*[eE][-+]?[0-9]%(_
" because otherwise they would match as keywords at the start of a
" "literate" comment (see lhs.vim).
syn match hsModule "\<module\>"
syn match hsImport "\<import\>.*"he=s+6 contains=hsImportMod,hsLineComment,hsBlockComment
syn match hsImportMod contained "\<\(as\|qualified\|hiding\)\>"
syn match hsImport "\<import\>.*"he=s+6 contains=hsImportMod,hsLineComment,hsBlockComment,@NoSpell
syn match hsImportMod contained "\<\(as\|qualified\|hiding\)\>" contains=@NoSpell
syn match hsInfix "\<\(infix\|infixl\|infixr\)\>"
syn match hsStructure "\<\(class\|data\|deriving\|instance\|default\|where\)\>"
syn match hsTypedef "\<\(type\|newtype\)\>"
@@ -97,8 +97,8 @@ endif
" Comments
syn match hsLineComment "---*\([^-!#$%&\*\+./<=>\?@\\^|~].*\)\?$"
syn region hsBlockComment start="{-" end="-}" contains=hsBlockComment
syn match hsLineComment "---*\([^-!#$%&\*\+./<=>\?@\\^|~].*\)\?$" contains=@Spell
syn region hsBlockComment start="{-" end="-}" contains=hsBlockComment,@Spell
syn region hsPragma start="{-#" end="#-}"
" C Preprocessor directives. Shamelessly ripped from c.vim and trimmed

View File

@@ -1,328 +1,464 @@
" Vim syntax file
" Language: Scheme (R5RS + some R6RS extras)
" Last Change: 2016 May 23
" Maintainer: Sergey Khorev <sergey.khorev@gmail.com>
" Original author: Dirk van Deun <dirk@igwe.vub.ac.be>
" Language: Scheme (R7RS)
" Last Change: 2018-01-06
" Author: Evan Hanson <evhan@foldling.org>
" Maintainer: Evan Hanson <evhan@foldling.org>
" Previous Author: Dirk van Deun <dirk@igwe.vub.ac.be>
" Previous Maintainer: Sergey Khorev <sergey.khorev@gmail.com>
" URL: https://foldling.org/vim/syntax/scheme.vim
" This script incorrectly recognizes some junk input as numerals:
" parsing the complete system of Scheme numerals using the pattern
" language is practically impossible: I did a lax approximation.
" MzScheme extensions can be activated with setting is_mzscheme variable
" Suggestions and bug reports are solicited by the author.
" Initializing:
" quit when a syntax file was already loaded
if exists("b:current_syntax")
if exists('b:current_syntax')
finish
endif
let s:cpo_save = &cpo
let s:cpo = &cpo
set cpo&vim
syn case ignore
syn match schemeParentheses "[^ '`\t\n()\[\]";]\+"
syn match schemeParentheses "[)\]]"
" Fascist highlighting: everything that doesn't fit the rules is an error...
syn match schemeIdentifier /[^ '`\t\n()\[\]"|;][^ '`\t\n()\[\]"|;]*/
syn match schemeError ![^ \t()\[\]";]*!
syn match schemeError ")"
syn region schemeQuote matchgroup=schemeData start=/'[`']*/ end=/[ \t\n()\[\]";]/me=e-1
syn region schemeQuote matchgroup=schemeData start=/'['`]*"/ skip=/\\[\\"]/ end=/"/
syn region schemeQuote matchgroup=schemeData start=/'['`]*|/ skip=/\\[\\|]/ end=/|/
syn region schemeQuote matchgroup=schemeData start=/'['`]*#\?(/ end=/)/ contains=ALLBUT,schemeQuasiquote,schemeQuasiquoteForm,schemeUnquote,schemeForm,schemeDatumCommentForm,schemeImport,@schemeImportCluster,@schemeSyntaxCluster
" Quoted and backquoted stuff
syn region schemeQuasiquote matchgroup=schemeData start=/`['`]*/ end=/[ \t\n()\[\]";]/me=e-1
syn region schemeQuasiquote matchgroup=schemeData start=/`['`]*#\?(/ end=/)/ contains=ALLBUT,schemeQuote,schemeQuoteForm,schemeForm,schemeDatumCommentForm,schemeImport,@schemeImportCluster,@schemeSyntaxCluster
syn region schemeQuoted matchgroup=Delimiter start="['`]" end=![ \t()\[\]";]!me=e-1 contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc
syn region schemeUnquote matchgroup=schemeParentheses start=/,/ end=/[ `'\t\n\[\]()";]/me=e-1 contained contains=ALLBUT,schemeDatumCommentForm,@schemeImportCluster
syn region schemeUnquote matchgroup=schemeParentheses start=/,@/ end=/[ `'\t\n\[\]()";]/me=e-1 contained contains=ALLBUT,schemeDatumCommentForm,@schemeImportCluster
syn region schemeUnquote matchgroup=schemeParentheses start=/,(/ end=/)/ contained contains=ALLBUT,schemeDatumCommentForm,@schemeImportCluster
syn region schemeUnquote matchgroup=schemeParentheses start=/,@(/ end=/)/ contained contains=ALLBUT,schemeDatumCommentForm,@schemeImportCluster
syn region schemeQuoted matchgroup=Delimiter start="['`](" matchgroup=Delimiter end=")" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc
syn region schemeQuoted matchgroup=Delimiter start="['`]#(" matchgroup=Delimiter end=")" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc
syn region schemeQuoteForm matchgroup=schemeData start=/(/ end=/)/ contained contains=ALLBUT,schemeQuasiquote,schemeQuasiquoteForm,schemeUnquote,schemeForm,schemeDatumCommentForm,schemeImport,@schemeImportCluster,@schemeSyntaxCluster
syn region schemeQuasiquoteForm matchgroup=schemeData start=/(/ end=/)/ contained contains=ALLBUT,schemeQuote,schemeForm,schemeDatumCommentForm,schemeImport,@schemeImportCluster,@schemeSyntaxCluster
syn region schemeStrucRestricted matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc
syn region schemeStrucRestricted matchgroup=Delimiter start="#(" matchgroup=Delimiter end=")" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc
syn region schemeString start=/\(\\\)\@<!"/ skip=/\\[\\"]/ end=/"/
syn region schemeSymbol start=/\(\\\)\@<!|/ skip=/\\[\\|]/ end=/|/
" Popular Scheme extension:
" using [] as well as ()
syn region schemeStrucRestricted matchgroup=Delimiter start="\[" matchgroup=Delimiter end="\]" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc
syn region schemeStrucRestricted matchgroup=Delimiter start="#\[" matchgroup=Delimiter end="\]" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc
syn match schemeNumber /\(#[dbeio]\)*[+\-]*\([0-9]\+\|inf.0\|nan.0\)\(\/\|\.\)\?[0-9+\-@\ilns]*\>/
syn match schemeNumber /#x[+\-]*[0-9a-fA-F]\+\>/
syn region schemeUnquote matchgroup=Delimiter start="," end=![ \t\[\]()";]!me=e-1 contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc
syn region schemeUnquote matchgroup=Delimiter start=",@" end=![ \t\[\]()";]!me=e-1 contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc
syn match schemeBoolean /#t\(rue\)\?/
syn match schemeBoolean /#f\(alse\)\?/
syn region schemeUnquote matchgroup=Delimiter start=",(" end=")" contains=ALL
syn region schemeUnquote matchgroup=Delimiter start=",@(" end=")" contains=ALL
syn match schemeCharacter /#\\.[^ `'\t\n\[\]()]*/
syn match schemeCharacter /#\\x[0-9a-fA-F]\+/
syn region schemeUnquote matchgroup=Delimiter start=",#(" end=")" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc
syn region schemeUnquote matchgroup=Delimiter start=",@#(" end=")" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc
syn match schemeComment /;.*$/
syn region schemeUnquote matchgroup=Delimiter start=",\[" end="\]" contains=ALL
syn region schemeUnquote matchgroup=Delimiter start=",@\[" end="\]" contains=ALL
syn region schemeMultilineComment start=/#|/ end=/|#/ contains=schemeMultilineComment
syn region schemeUnquote matchgroup=Delimiter start=",#\[" end="\]" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc
syn region schemeUnquote matchgroup=Delimiter start=",@#\[" end="\]" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc
syn region schemeForm matchgroup=schemeParentheses start="(" end=")" contains=ALLBUT,schemeUnquote,schemeDatumCommentForm,@schemeImportCluster
syn region schemeForm matchgroup=schemeParentheses start="\[" end="\]" contains=ALLBUT,schemeUnquote,schemeDatumCommentForm,@schemeImportCluster
" R5RS Scheme Functions and Syntax:
syn region schemeVector matchgroup=schemeData start="#(" end=")" contains=ALLBUT,schemeQuasiquote,schemeQuasiquoteForm,schemeUnquote,schemeForm,schemeDatumCommentForm,schemeImport,@schemeImportCluster,@schemeSyntaxCluster
syn region schemeVector matchgroup=schemeData start="#[fsu]\d\+(" end=")" contains=schemeNumber,schemeComment,schemeDatumComment
setlocal iskeyword=33,35-39,42-58,60-90,94,95,97-122,126,_
syn keyword schemeSyntax lambda and or if cond case define let let* letrec
syn keyword schemeSyntax begin do delay set! else =>
syn keyword schemeSyntax quote quasiquote unquote unquote-splicing
syn keyword schemeSyntax define-syntax let-syntax letrec-syntax syntax-rules
" R6RS
syn keyword schemeSyntax define-record-type fields protocol
syn keyword schemeFunc not boolean? eq? eqv? equal? pair? cons car cdr set-car!
syn keyword schemeFunc set-cdr! caar cadr cdar cddr caaar caadr cadar caddr
syn keyword schemeFunc cdaar cdadr cddar cdddr caaaar caaadr caadar caaddr
syn keyword schemeFunc cadaar cadadr caddar cadddr cdaaar cdaadr cdadar cdaddr
syn keyword schemeFunc cddaar cddadr cdddar cddddr null? list? list length
syn keyword schemeFunc append reverse list-ref memq memv member assq assv assoc
syn keyword schemeFunc symbol? symbol->string string->symbol number? complex?
syn keyword schemeFunc real? rational? integer? exact? inexact? = < > <= >=
syn keyword schemeFunc zero? positive? negative? odd? even? max min + * - / abs
syn keyword schemeFunc quotient remainder modulo gcd lcm numerator denominator
syn keyword schemeFunc floor ceiling truncate round rationalize exp log sin cos
syn keyword schemeFunc tan asin acos atan sqrt expt make-rectangular make-polar
syn keyword schemeFunc real-part imag-part magnitude angle exact->inexact
syn keyword schemeFunc inexact->exact number->string string->number char=?
syn keyword schemeFunc char-ci=? char<? char-ci<? char>? char-ci>? char<=?
syn keyword schemeFunc char-ci<=? char>=? char-ci>=? char-alphabetic? char?
syn keyword schemeFunc char-numeric? char-whitespace? char-upper-case?
syn keyword schemeFunc char-lower-case?
syn keyword schemeFunc char->integer integer->char char-upcase char-downcase
syn keyword schemeFunc string? make-string string string-length string-ref
syn keyword schemeFunc string-set! string=? string-ci=? string<? string-ci<?
syn keyword schemeFunc string>? string-ci>? string<=? string-ci<=? string>=?
syn keyword schemeFunc string-ci>=? substring string-append vector? make-vector
syn keyword schemeFunc vector vector-length vector-ref vector-set! procedure?
syn keyword schemeFunc apply map for-each call-with-current-continuation
syn keyword schemeFunc call-with-input-file call-with-output-file input-port?
syn keyword schemeFunc output-port? current-input-port current-output-port
syn keyword schemeFunc open-input-file open-output-file close-input-port
syn keyword schemeFunc close-output-port eof-object? read read-char peek-char
syn keyword schemeFunc write display newline write-char call/cc
syn keyword schemeFunc list-tail string->list list->string string-copy
syn keyword schemeFunc string-fill! vector->list list->vector vector-fill!
syn keyword schemeFunc force with-input-from-file with-output-to-file
syn keyword schemeFunc char-ready? load transcript-on transcript-off eval
syn keyword schemeFunc dynamic-wind port? values call-with-values
syn keyword schemeFunc scheme-report-environment null-environment
syn keyword schemeFunc interaction-environment
" R6RS
syn keyword schemeFunc make-eq-hashtable make-eqv-hashtable make-hashtable
syn keyword schemeFunc hashtable? hashtable-size hashtable-ref hashtable-set!
syn keyword schemeFunc hashtable-delete! hashtable-contains? hashtable-update!
syn keyword schemeFunc hashtable-copy hashtable-clear! hashtable-keys
syn keyword schemeFunc hashtable-entries hashtable-equivalence-function hashtable-hash-function
syn keyword schemeFunc hashtable-mutable? equal-hash string-hash string-ci-hash symbol-hash
syn keyword schemeFunc find for-all exists filter partition fold-left fold-right
syn keyword schemeFunc remp remove remv remq memp assp cons*
" ... so that a single + or -, inside a quoted context, would not be
" interpreted as a number (outside such contexts, it's a schemeFunc)
syn match schemeDelimiter !\.[ \t\[\]()";]!me=e-1
syn match schemeDelimiter !\.$!
" ... and a single dot is not a number but a delimiter
" This keeps all other stuff unhighlighted, except *stuff* and <stuff>:
syn match schemeOther ,[a-z!$%&*/:<=>?^_~+@#%-][-a-z!$%&*/:<=>?^_~0-9+.@#%]*,
syn match schemeError ,[a-z!$%&*/:<=>?^_~+@#%-][-a-z!$%&*/:<=>?^_~0-9+.@#%]*[^-a-z!$%&*/:<=>?^_~0-9+.@ \t\[\]()";]\+[^ \t\[\]()";]*,
syn match schemeOther "\.\.\."
syn match schemeError !\.\.\.[^ \t\[\]()";]\+!
" ... a special identifier
syn match schemeConstant ,\*[-a-z!$%&*/:<=>?^_~0-9+.@]\+\*[ \t\[\]()";],me=e-1
syn match schemeConstant ,\*[-a-z!$%&*/:<=>?^_~0-9+.@]\+\*$,
syn match schemeError ,\*[-a-z!$%&*/:<=>?^_~0-9+.@]*\*[^-a-z!$%&*/:<=>?^_~0-9+.@ \t\[\]()";]\+[^ \t\[\]()";]*,
syn match schemeConstant ,<[-a-z!$%&*/:<=>?^_~0-9+.@]*>[ \t\[\]()";],me=e-1
syn match schemeConstant ,<[-a-z!$%&*/:<=>?^_~0-9+.@]*>$,
syn match schemeError ,<[-a-z!$%&*/:<=>?^_~0-9+.@]*>[^-a-z!$%&*/:<=>?^_~0-9+.@ \t\[\]()";]\+[^ \t\[\]()";]*,
" Non-quoted lists, and strings:
syn region schemeStruc matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" contains=ALL
syn region schemeStruc matchgroup=Delimiter start="#(" matchgroup=Delimiter end=")" contains=ALL
syn region schemeStruc matchgroup=Delimiter start="\[" matchgroup=Delimiter end="\]" contains=ALL
syn region schemeStruc matchgroup=Delimiter start="#\[" matchgroup=Delimiter end="\]" contains=ALL
" Simple literals:
syn region schemeString start=+\%(\\\)\@<!"+ skip=+\\[\\"]+ end=+"+ contains=@Spell
" Comments:
syn match schemeComment ";.*$" contains=@Spell
" Writing out the complete description of Scheme numerals without
" using variables is a day's work for a trained secretary...
syn match schemeOther ![+-][ \t\[\]()";]!me=e-1
syn match schemeOther ![+-]$!
"
" This is a useful lax approximation:
syn match schemeNumber "[-#+.]\=[0-9][-#+/0-9a-f@i.boxesfdl]*"
syn match schemeError ![-#+0-9.][-#+/0-9a-f@i.boxesfdl]*[^-#+/0-9a-f@i.boxesfdl \t\[\]()";][^ \t\[\]()";]*!
syn match schemeBoolean "#[tf]"
syn match schemeError !#[tf][^ \t\[\]()";]\+!
syn match schemeCharacter "#\\"
syn match schemeCharacter "#\\."
syn match schemeError !#\\.[^ \t\[\]()";]\+!
syn match schemeCharacter "#\\space"
syn match schemeError !#\\space[^ \t\[\]()";]\+!
syn match schemeCharacter "#\\newline"
syn match schemeError !#\\newline[^ \t\[\]()";]\+!
" R6RS
syn match schemeCharacter "#\\x[0-9a-fA-F]\+"
if exists("b:is_mzscheme") || exists("is_mzscheme")
" MzScheme extensions
" multiline comment
syn region schemeComment start="#|" end="|#" contains=@Spell
" #%xxx are the special MzScheme identifiers
syn match schemeOther "#%[-a-z!$%&*/:<=>?^_~0-9+.@#%]\+"
" anything limited by |'s is identifier
syn match schemeOther "|[^|]\+|"
syn match schemeCharacter "#\\\%(return\|tab\)"
" Modules require stmt
syn keyword schemeExtSyntax module require dynamic-require lib prefix all-except prefix-all-except rename
" modules provide stmt
syn keyword schemeExtSyntax provide struct all-from all-from-except all-defined all-defined-except
" Other from MzScheme
syn keyword schemeExtSyntax with-handlers when unless instantiate define-struct case-lambda syntax-case
syn keyword schemeExtSyntax free-identifier=? bound-identifier=? module-identifier=? syntax-object->datum
syn keyword schemeExtSyntax datum->syntax-object
syn keyword schemeExtSyntax let-values let*-values letrec-values set!-values fluid-let parameterize begin0
syn keyword schemeExtSyntax error raise opt-lambda define-values unit unit/sig define-signature
syn keyword schemeExtSyntax invoke-unit/sig define-values/invoke-unit/sig compound-unit/sig import export
syn keyword schemeExtSyntax link syntax quasisyntax unsyntax with-syntax
syn keyword schemeExtFunc format system-type current-extension-compiler current-extension-linker
syn keyword schemeExtFunc use-standard-linker use-standard-compiler
syn keyword schemeExtFunc find-executable-path append-object-suffix append-extension-suffix
syn keyword schemeExtFunc current-library-collection-paths current-extension-compiler-flags make-parameter
syn keyword schemeExtFunc current-directory build-path normalize-path current-extension-linker-flags
syn keyword schemeExtFunc file-exists? directory-exists? delete-directory/files delete-directory delete-file
syn keyword schemeExtFunc system compile-file system-library-subpath getenv putenv current-standard-link-libraries
syn keyword schemeExtFunc remove* file-size find-files fold-files directory-list shell-execute split-path
syn keyword schemeExtFunc current-error-port process/ports process printf fprintf open-input-string open-output-string
syn keyword schemeExtFunc get-output-string
" exceptions
syn keyword schemeExtFunc exn exn:application:arity exn:application:continuation exn:application:fprintf:mismatch
syn keyword schemeExtFunc exn:application:mismatch exn:application:type exn:application:mismatch exn:break exn:i/o:filesystem exn:i/o:port
syn keyword schemeExtFunc exn:i/o:port:closed exn:i/o:tcp exn:i/o:udp exn:misc exn:misc:application exn:misc:unsupported exn:module exn:read
syn keyword schemeExtFunc exn:read:non-char exn:special-comment exn:syntax exn:thread exn:user exn:variable exn:application:mismatch
syn keyword schemeExtFunc exn? exn:application:arity? exn:application:continuation? exn:application:fprintf:mismatch? exn:application:mismatch?
syn keyword schemeExtFunc exn:application:type? exn:application:mismatch? exn:break? exn:i/o:filesystem? exn:i/o:port? exn:i/o:port:closed?
syn keyword schemeExtFunc exn:i/o:tcp? exn:i/o:udp? exn:misc? exn:misc:application? exn:misc:unsupported? exn:module? exn:read? exn:read:non-char?
syn keyword schemeExtFunc exn:special-comment? exn:syntax? exn:thread? exn:user? exn:variable? exn:application:mismatch?
" Command-line parsing
syn keyword schemeExtFunc command-line current-command-line-arguments once-any help-labels multi once-each
" syntax quoting, unquoting and quasiquotation
syn region schemeUnquote matchgroup=Delimiter start="#," end=![ \t\[\]()";]!me=e-1 contains=ALL
syn region schemeUnquote matchgroup=Delimiter start="#,@" end=![ \t\[\]()";]!me=e-1 contains=ALL
syn region schemeUnquote matchgroup=Delimiter start="#,(" end=")" contains=ALL
syn region schemeUnquote matchgroup=Delimiter start="#,@(" end=")" contains=ALL
syn region schemeUnquote matchgroup=Delimiter start="#,\[" end="\]" contains=ALL
syn region schemeUnquote matchgroup=Delimiter start="#,@\[" end="\]" contains=ALL
syn region schemeQuoted matchgroup=Delimiter start="#['`]" end=![ \t()\[\]";]!me=e-1 contains=ALL
syn region schemeQuoted matchgroup=Delimiter start="#['`](" matchgroup=Delimiter end=")" contains=ALL
" Identifiers are very liberal in MzScheme/Racket
syn match schemeOther ![^()[\]{}",'`;#|\\ ]\+!
" Language setting
syn match schemeLang "#lang [-+_/A-Za-z0-9]\+\>"
" Various number forms
syn match schemeNumber "[-+]\=[0-9]\+\(\.[0-9]*\)\=\(e[-+]\=[0-9]\+\)\=\>"
syn match schemeNumber "[-+]\=\.[0-9]\+\(e[-+]\=[0-9]\+\)\=\>"
syn match schemeNumber "[-+]\=[0-9]\+/[0-9]\+\>"
syn match schemeNumber "\([-+]\=\([0-9]\+\(\.[0-9]*\)\=\(e[-+]\=[0-9]\+\)\=\|\.[0-9]\+\(e[-+]\=[0-9]\+\)\=\|[0-9]\+/[0-9]\+\)\)\=[-+]\([0-9]\+\(\.[0-9]*\)\=\(e[-+]\=[0-9]\+\)\=\|\.[0-9]\+\(e[-+]\=[0-9]\+\)\=\|[0-9]\+/[0-9]\+\)\=i\>"
if exists('g:is_chicken') || exists('b:is_chicken')
syn region schemeImport matchgroup=schemeImport start="\(([ \t\n]*\)\@<=\(import\|import-syntax\|use\|require-extension\)\(-for-syntax\)\?\>" end=")"me=e-1 contained contains=schemeImportForm,schemeIdentifier,schemeComment,schemeDatumComment
else
syn region schemeImport matchgroup=schemeImport start="\(([ \t\n]*\)\@<=\(import\)\>" end=")"me=e-1 contained contains=schemeImportForm,schemeIdentifier,schemeComment,schemeDatumComment
endif
syn match schemeImportKeyword "\(([ \t\n]*\)\@<=\(except\|only\|prefix\|rename\|srfi\)\>"
syn region schemeImportForm matchgroup=schemeParentheses start="(" end=")" contained contains=schemeIdentifier,schemeComment,schemeDatumComment,@schemeImportCluster
syn cluster schemeImportCluster contains=schemeImportForm,schemeImportKeyword
if exists("b:is_chicken") || exists("is_chicken")
" multiline comment
syntax region schemeMultilineComment start=/#|/ end=/|#/ contains=@Spell,schemeMultilineComment
syn region schemeDatumComment matchgroup=schemeDatumComment start=/#;[ \t\n`']*/ end=/[ \t\n()\[\]";]/me=e-1
syn region schemeDatumComment matchgroup=schemeDatumComment start=/#;[ \t\n`']*"/ skip=/\\[\\"]/ end=/"/
syn region schemeDatumComment matchgroup=schemeDatumComment start=/#;[ \t\n`']*|/ skip=/\\[\\|]/ end=/|/
syn region schemeDatumComment matchgroup=schemeDatumComment start=/#;[ \t\n`']*\(#\([usf]\d\+\)\?\)\?(/ end=/)/ contains=schemeDatumCommentForm
syn region schemeDatumCommentForm start="(" end=")" contained contains=schemeDatumCommentForm
syn match schemeOther "##[-a-z!$%&*/:<=>?^_~0-9+.@#%]\+"
syn match schemeExtSyntax "#:[-a-z!$%&*/:<=>?^_~0-9+.@#%]\+"
syn cluster schemeSyntaxCluster contains=schemeFunction,schemeKeyword,schemeSyntax,schemeExtraSyntax,schemeLibrarySyntax,schemeSyntaxSyntax
syn keyword schemeExtSyntax unit uses declare hide foreign-declare foreign-parse foreign-parse/spec
syn keyword schemeExtSyntax foreign-lambda foreign-lambda* define-external define-macro load-library
syn keyword schemeExtSyntax let-values let*-values letrec-values ->string require-extension
syn keyword schemeExtSyntax let-optionals let-optionals* define-foreign-variable define-record
syn keyword schemeExtSyntax pointer tag-pointer tagged-pointer? define-foreign-type
syn keyword schemeExtSyntax require require-for-syntax cond-expand and-let* receive argc+argv
syn keyword schemeExtSyntax fixnum? fx= fx> fx< fx>= fx<= fxmin fxmax
syn keyword schemeExtFunc ##core#inline ##sys#error ##sys#update-errno
syn keyword schemeLibrarySyntax define-library
syn keyword schemeLibrarySyntax export
syn keyword schemeLibrarySyntax include
syn keyword schemeLibrarySyntax include-ci
syn keyword schemeLibrarySyntax include-library-declarations
syn keyword schemeLibrarySyntax library
syn keyword schemeLibrarySyntax cond-expand
" here-string
syn region schemeString start=+#<<\s*\z(.*\)+ end=+^\z1$+ contains=@Spell
syn keyword schemeSyntaxSyntax define-syntax
syn keyword schemeSyntaxSyntax let-syntax
syn keyword schemeSyntaxSyntax letrec-syntax
syn keyword schemeSyntaxSyntax syntax-rules
if filereadable(expand("<sfile>:p:h")."/cpp.vim")
unlet! b:current_syntax
syn include @ChickenC <sfile>:p:h/cpp.vim
syn region ChickenC matchgroup=schemeOther start=+(\@<=foreign-declare "+ end=+")\@=+ contains=@ChickenC
syn region ChickenC matchgroup=schemeComment start=+foreign-declare\s*#<<\z(.*\)$+hs=s+15 end=+^\z1$+ contains=@ChickenC
syn region ChickenC matchgroup=schemeOther start=+(\@<=foreign-parse "+ end=+")\@=+ contains=@ChickenC
syn region ChickenC matchgroup=schemeComment start=+foreign-parse\s*#<<\z(.*\)$+hs=s+13 end=+^\z1$+ contains=@ChickenC
syn region ChickenC matchgroup=schemeOther start=+(\@<=foreign-parse/spec "+ end=+")\@=+ contains=@ChickenC
syn region ChickenC matchgroup=schemeComment start=+foreign-parse/spec\s*#<<\z(.*\)$+hs=s+18 end=+^\z1$+ contains=@ChickenC
syn region ChickenC matchgroup=schemeComment start=+#>+ end=+<#+ contains=@ChickenC
syn region ChickenC matchgroup=schemeComment start=+#>?+ end=+<#+ contains=@ChickenC
syn region ChickenC matchgroup=schemeComment start=+#>!+ end=+<#+ contains=@ChickenC
syn region ChickenC matchgroup=schemeComment start=+#>\$+ end=+<#+ contains=@ChickenC
syn region ChickenC matchgroup=schemeComment start=+#>%+ end=+<#+ contains=@ChickenC
endif
syn keyword schemeSyntax =>
syn keyword schemeSyntax and
syn keyword schemeSyntax begin
syn keyword schemeSyntax case
syn keyword schemeSyntax case-lambda
syn keyword schemeSyntax cond
syn keyword schemeSyntax define
syn keyword schemeSyntax define-record-type
syn keyword schemeSyntax define-values
syn keyword schemeSyntax delay
syn keyword schemeSyntax delay-force
syn keyword schemeSyntax do
syn keyword schemeSyntax else
syn keyword schemeSyntax guard
syn keyword schemeSyntax if
syn keyword schemeSyntax lambda
syn keyword schemeSyntax let
syn keyword schemeSyntax let*
syn keyword schemeSyntax let*-values
syn keyword schemeSyntax let-values
syn keyword schemeSyntax letrec
syn keyword schemeSyntax letrec*
syn keyword schemeSyntax or
syn keyword schemeSyntax parameterize
syn keyword schemeSyntax quasiquote
syn keyword schemeSyntax quote
syn keyword schemeSyntax set!
syn keyword schemeSyntax unless
syn keyword schemeSyntax unquote
syn keyword schemeSyntax unquote-splicing
syn keyword schemeSyntax when
" suggested by Alex Queiroz
syn match schemeExtSyntax "#![-a-z!$%&*/:<=>?^_~0-9+.@#%]\+"
syn region schemeString start=+#<#\s*\z(.*\)+ end=+^\z1$+ contains=@Spell
syn keyword schemeFunction *
syn keyword schemeFunction +
syn keyword schemeFunction -
syn keyword schemeFunction /
syn keyword schemeFunction <
syn keyword schemeFunction <=
syn keyword schemeFunction =
syn keyword schemeFunction >
syn keyword schemeFunction >=
syn keyword schemeFunction abs
syn keyword schemeFunction acos
syn keyword schemeFunction acos
syn keyword schemeFunction angle
syn keyword schemeFunction append
syn keyword schemeFunction apply
syn keyword schemeFunction asin
syn keyword schemeFunction assoc
syn keyword schemeFunction assq
syn keyword schemeFunction assv
syn keyword schemeFunction atan
syn keyword schemeFunction binary-port?
syn keyword schemeFunction boolean=?
syn keyword schemeFunction boolean?
syn keyword schemeFunction bytevector
syn keyword schemeFunction bytevector-append
syn keyword schemeFunction bytevector-append
syn keyword schemeFunction bytevector-copy
syn keyword schemeFunction bytevector-copy!
syn keyword schemeFunction bytevector-length
syn keyword schemeFunction bytevector-u8-ref
syn keyword schemeFunction bytevector-u8-set!
syn keyword schemeFunction bytevector?
syn keyword schemeFunction caaaar
syn keyword schemeFunction caaadr
syn keyword schemeFunction caaar
syn keyword schemeFunction caadar
syn keyword schemeFunction caaddr
syn keyword schemeFunction caadr
syn keyword schemeFunction caar
syn keyword schemeFunction cadaar
syn keyword schemeFunction cadadr
syn keyword schemeFunction cadar
syn keyword schemeFunction caddar
syn keyword schemeFunction cadddr
syn keyword schemeFunction caddr
syn keyword schemeFunction cadr
syn keyword schemeFunction call-with-current-continuation
syn keyword schemeFunction call-with-input-file
syn keyword schemeFunction call-with-output-file
syn keyword schemeFunction call-with-port
syn keyword schemeFunction call-with-values
syn keyword schemeFunction call/cc
syn keyword schemeFunction car
syn keyword schemeFunction cdaaar
syn keyword schemeFunction cdaadr
syn keyword schemeFunction cdaar
syn keyword schemeFunction cdadar
syn keyword schemeFunction cdaddr
syn keyword schemeFunction cdadr
syn keyword schemeFunction cdar
syn keyword schemeFunction cddaar
syn keyword schemeFunction cddadr
syn keyword schemeFunction cddar
syn keyword schemeFunction cdddar
syn keyword schemeFunction cddddr
syn keyword schemeFunction cdddr
syn keyword schemeFunction cddr
syn keyword schemeFunction cdr
syn keyword schemeFunction ceiling
syn keyword schemeFunction char->integer
syn keyword schemeFunction char-alphabetic?
syn keyword schemeFunction char-ci<=?
syn keyword schemeFunction char-ci<?
syn keyword schemeFunction char-ci=?
syn keyword schemeFunction char-ci>=?
syn keyword schemeFunction char-ci>?
syn keyword schemeFunction char-downcase
syn keyword schemeFunction char-foldcase
syn keyword schemeFunction char-lower-case?
syn keyword schemeFunction char-numeric?
syn keyword schemeFunction char-ready?
syn keyword schemeFunction char-upcase
syn keyword schemeFunction char-upper-case?
syn keyword schemeFunction char-whitespace?
syn keyword schemeFunction char<=?
syn keyword schemeFunction char<?
syn keyword schemeFunction char=?
syn keyword schemeFunction char>=?
syn keyword schemeFunction char>?
syn keyword schemeFunction char?
syn keyword schemeFunction close-input-port
syn keyword schemeFunction close-output-port
syn keyword schemeFunction close-port
syn keyword schemeFunction command-line
syn keyword schemeFunction complex?
syn keyword schemeFunction cons
syn keyword schemeFunction cos
syn keyword schemeFunction current-error-port
syn keyword schemeFunction current-input-port
syn keyword schemeFunction current-jiffy
syn keyword schemeFunction current-output-port
syn keyword schemeFunction current-second
syn keyword schemeFunction delete-file
syn keyword schemeFunction denominator
syn keyword schemeFunction digit-value
syn keyword schemeFunction display
syn keyword schemeFunction dynamic-wind
syn keyword schemeFunction emergency-exit
syn keyword schemeFunction environment
syn keyword schemeFunction eof-object
syn keyword schemeFunction eof-object?
syn keyword schemeFunction eq?
syn keyword schemeFunction equal?
syn keyword schemeFunction eqv?
syn keyword schemeFunction error
syn keyword schemeFunction error-object-irritants
syn keyword schemeFunction error-object-message
syn keyword schemeFunction error-object?
syn keyword schemeFunction eval
syn keyword schemeFunction even?
syn keyword schemeFunction exact
syn keyword schemeFunction exact->inexact
syn keyword schemeFunction exact-integer-sqrt
syn keyword schemeFunction exact-integer?
syn keyword schemeFunction exact?
syn keyword schemeFunction exit
syn keyword schemeFunction exp
syn keyword schemeFunction expt
syn keyword schemeFunction features
syn keyword schemeFunction file-error?
syn keyword schemeFunction file-exists?
syn keyword schemeFunction finite?
syn keyword schemeFunction floor
syn keyword schemeFunction floor-quotient
syn keyword schemeFunction floor-remainder
syn keyword schemeFunction floor/
syn keyword schemeFunction flush-output-port
syn keyword schemeFunction for-each
syn keyword schemeFunction force
syn keyword schemeFunction gcd
syn keyword schemeFunction get-environment-variable
syn keyword schemeFunction get-environment-variables
syn keyword schemeFunction get-output-bytevector
syn keyword schemeFunction get-output-string
syn keyword schemeFunction imag-part
syn keyword schemeFunction inexact
syn keyword schemeFunction inexact->exact
syn keyword schemeFunction inexact?
syn keyword schemeFunction infinite?
syn keyword schemeFunction input-port-open?
syn keyword schemeFunction input-port?
syn keyword schemeFunction integer->char
syn keyword schemeFunction integer?
syn keyword schemeFunction interaction-environment
syn keyword schemeFunction jiffies-per-second
syn keyword schemeFunction lcm
syn keyword schemeFunction length
syn keyword schemeFunction list
syn keyword schemeFunction list->string
syn keyword schemeFunction list->vector
syn keyword schemeFunction list-copy
syn keyword schemeFunction list-ref
syn keyword schemeFunction list-set!
syn keyword schemeFunction list-tail
syn keyword schemeFunction list?
syn keyword schemeFunction load
syn keyword schemeFunction log
syn keyword schemeFunction magnitude
syn keyword schemeFunction make-bytevector
syn keyword schemeFunction make-list
syn keyword schemeFunction make-parameter
syn keyword schemeFunction make-polar
syn keyword schemeFunction make-promise
syn keyword schemeFunction make-rectangular
syn keyword schemeFunction make-string
syn keyword schemeFunction make-vector
syn keyword schemeFunction map
syn keyword schemeFunction max
syn keyword schemeFunction member
syn keyword schemeFunction memq
syn keyword schemeFunction memv
syn keyword schemeFunction min
syn keyword schemeFunction modulo
syn keyword schemeFunction nan?
syn keyword schemeFunction negative?
syn keyword schemeFunction newline
syn keyword schemeFunction not
syn keyword schemeFunction null-environment
syn keyword schemeFunction null?
syn keyword schemeFunction number->string
syn keyword schemeFunction number?
syn keyword schemeFunction numerator
syn keyword schemeFunction odd?
syn keyword schemeFunction open-binary-input-file
syn keyword schemeFunction open-binary-output-file
syn keyword schemeFunction open-input-bytevector
syn keyword schemeFunction open-input-file
syn keyword schemeFunction open-input-string
syn keyword schemeFunction open-output-bytevector
syn keyword schemeFunction open-output-file
syn keyword schemeFunction open-output-string
syn keyword schemeFunction output-port-open?
syn keyword schemeFunction output-port?
syn keyword schemeFunction pair?
syn keyword schemeFunction peek-char
syn keyword schemeFunction peek-u8
syn keyword schemeFunction port?
syn keyword schemeFunction positive?
syn keyword schemeFunction procedure?
syn keyword schemeFunction promise?
syn keyword schemeFunction quotient
syn keyword schemeFunction raise
syn keyword schemeFunction raise-continuable
syn keyword schemeFunction rational?
syn keyword schemeFunction rationalize
syn keyword schemeFunction read
syn keyword schemeFunction read-bytevector
syn keyword schemeFunction read-bytevector!
syn keyword schemeFunction read-char
syn keyword schemeFunction read-error?
syn keyword schemeFunction read-line
syn keyword schemeFunction read-string
syn keyword schemeFunction read-u8
syn keyword schemeFunction real-part
syn keyword schemeFunction real?
syn keyword schemeFunction remainder
syn keyword schemeFunction reverse
syn keyword schemeFunction round
syn keyword schemeFunction scheme-report-environment
syn keyword schemeFunction set-car!
syn keyword schemeFunction set-cdr!
syn keyword schemeFunction sin
syn keyword schemeFunction sqrt
syn keyword schemeFunction square
syn keyword schemeFunction string
syn keyword schemeFunction string->list
syn keyword schemeFunction string->number
syn keyword schemeFunction string->symbol
syn keyword schemeFunction string->utf8
syn keyword schemeFunction string->vector
syn keyword schemeFunction string-append
syn keyword schemeFunction string-ci<=?
syn keyword schemeFunction string-ci<?
syn keyword schemeFunction string-ci=?
syn keyword schemeFunction string-ci>=?
syn keyword schemeFunction string-ci>?
syn keyword schemeFunction string-copy
syn keyword schemeFunction string-copy!
syn keyword schemeFunction string-downcase
syn keyword schemeFunction string-fill!
syn keyword schemeFunction string-foldcase
syn keyword schemeFunction string-for-each
syn keyword schemeFunction string-length
syn keyword schemeFunction string-map
syn keyword schemeFunction string-ref
syn keyword schemeFunction string-set!
syn keyword schemeFunction string-upcase
syn keyword schemeFunction string<=?
syn keyword schemeFunction string<?
syn keyword schemeFunction string=?
syn keyword schemeFunction string>=?
syn keyword schemeFunction string>?
syn keyword schemeFunction string?
syn keyword schemeFunction substring
syn keyword schemeFunction symbol->string
syn keyword schemeFunction symbol=?
syn keyword schemeFunction symbol?
syn keyword schemeFunction syntax-error
syn keyword schemeFunction tan
syn keyword schemeFunction textual-port?
syn keyword schemeFunction transcript-off
syn keyword schemeFunction transcript-on
syn keyword schemeFunction truncate
syn keyword schemeFunction truncate-quotient
syn keyword schemeFunction truncate-remainder
syn keyword schemeFunction truncate/
syn keyword schemeFunction u8-ready?
syn keyword schemeFunction utf8->string
syn keyword schemeFunction values
syn keyword schemeFunction vector
syn keyword schemeFunction vector->list
syn keyword schemeFunction vector->string
syn keyword schemeFunction vector-append
syn keyword schemeFunction vector-copy
syn keyword schemeFunction vector-copy!
syn keyword schemeFunction vector-fill!
syn keyword schemeFunction vector-for-each
syn keyword schemeFunction vector-length
syn keyword schemeFunction vector-map
syn keyword schemeFunction vector-ref
syn keyword schemeFunction vector-set!
syn keyword schemeFunction vector?
syn keyword schemeFunction with-exception-handler
syn keyword schemeFunction with-input-from-file
syn keyword schemeFunction with-output-to-file
syn keyword schemeFunction write
syn keyword schemeFunction write-bytevector
syn keyword schemeFunction write-char
syn keyword schemeFunction write-shared
syn keyword schemeFunction write-simple
syn keyword schemeFunction write-string
syn keyword schemeFunction write-u8
syn keyword schemeFunction zero?
hi def link schemeBoolean Boolean
hi def link schemeCharacter Character
hi def link schemeComment Comment
hi def link schemeConstant Constant
hi def link schemeData Delimiter
hi def link schemeDatumComment Comment
hi def link schemeDatumCommentForm Comment
hi def link schemeDelimiter Delimiter
hi def link schemeError Error
hi def link schemeExtraSyntax Underlined
hi def link schemeFunction Function
hi def link schemeIdentifier Normal
hi def link schemeImport PreProc
hi def link schemeImportKeyword PreProc
hi def link schemeKeyword Type
hi def link schemeLibrarySyntax PreProc
hi def link schemeMultilineComment Comment
hi def link schemeNumber Number
hi def link schemeParentheses Normal
hi def link schemeQuasiquote Delimiter
hi def link schemeQuote Delimiter
hi def link schemeSpecialSyntax Special
hi def link schemeString String
hi def link schemeSymbol Normal
hi def link schemeSyntax Statement
hi def link schemeSyntaxSyntax PreProc
hi def link schemeTypeSyntax Type
let b:did_scheme_syntax = 1
if exists('b:is_chicken') || exists('g:is_chicken')
exe 'ru! syntax/chicken.vim'
endif
" Synchronization and the wrapping up...
syn sync match matchPlace grouphere NONE "^[^ \t]"
" ... i.e. synchronize on a line that starts at the left margin
" Define the default highlighting.
" Only when an item doesn't have highlighting yet
hi def link schemeSyntax Statement
hi def link schemeFunc Function
hi def link schemeString String
hi def link schemeCharacter Character
hi def link schemeNumber Number
hi def link schemeBoolean Boolean
hi def link schemeDelimiter Delimiter
hi def link schemeConstant Constant
hi def link schemeComment Comment
hi def link schemeMultilineComment Comment
hi def link schemeError Error
hi def link schemeExtSyntax Type
hi def link schemeExtFunc PreProc
hi def link schemeLang PreProc
let b:current_syntax = "scheme"
let &cpo = s:cpo_save
unlet s:cpo_save
unlet b:did_scheme_syntax
let b:current_syntax = 'scheme'
let &cpo = s:cpo
unlet s:cpo

View File

@@ -66,7 +66,7 @@ syn keyword vimErrSetting contained bioskey biosk conskey consk autoprint beauti
" AutoCmd Events {{{2
syn case ignore
syn keyword vimAutoEvent contained BufAdd BufCreate BufDelete BufEnter BufFilePost BufFilePre BufHidden BufLeave BufNew BufNewFile BufRead BufReadCmd BufReadPost BufReadPre BufUnload BufWinEnter BufWinLeave BufWipeout BufWrite BufWriteCmd BufWritePost BufWritePre CmdlineEnter CmdlineLeave CmdUndefined CmdwinEnter CmdwinLeave ColorScheme CompleteDone CursorHold CursorHoldI CursorMoved CursorMovedI EncodingChanged FileAppendCmd FileAppendPost FileAppendPre FileChangedRO FileChangedShell FileChangedShellPost FileEncoding FileReadCmd FileReadPost FileReadPre FileType FileWriteCmd FileWritePost FileWritePre FilterReadPost FilterReadPre FilterWritePost FilterWritePre FocusGained FocusLost FuncUndefined GUIEnter GUIFailed InsertChange InsertCharPre InsertEnter InsertLeave MenuPopup OptionSet QuickFixCmdPost QuickFixCmdPre QuitPre RemoteReply SessionLoadPost ShellCmdPost ShellFilterPost SourceCmd SourcePre SpellFileMissing StdinReadPost StdinReadPre SwapExists Syntax TabClosed TabEnter TabLeave TabNew TermChanged TermResponse TextChanged TextChangedI User VimEnter VimLeave VimLeavePre VimResized WinEnter WinLeave WinNew
syn keyword vimAutoEvent contained BufAdd BufCreate BufDelete BufEnter BufFilePost BufFilePre BufHidden BufLeave BufNew BufNewFile BufRead BufReadCmd BufReadPost BufReadPre BufUnload BufWinEnter BufWinLeave BufWipeout BufWrite BufWriteCmd BufWritePost BufWritePre CmdlineEnter CmdlineLeave CmdUndefined CmdwinEnter CmdwinLeave ColorScheme CompleteDone CursorHold CursorHoldI CursorMoved CursorMovedI EncodingChanged FileAppendCmd FileAppendPost FileAppendPre FileChangedRO FileChangedShell FileChangedShellPost FileEncoding FileReadCmd FileReadPost FileReadPre FileType FileWriteCmd FileWritePost FileWritePre FilterReadPost FilterReadPre FilterWritePost FilterWritePre FocusGained FocusLost FuncUndefined GUIEnter GUIFailed InsertChange InsertCharPre InsertEnter InsertLeave MenuPopup OptionSet QuickFixCmdPost QuickFixCmdPre QuitPre RemoteReply SessionLoadPost ShellCmdPost ShellFilterPost SourceCmd SourcePre SpellFileMissing StdinReadPost StdinReadPre SwapExists Syntax TabClosed TabEnter TabLeave TabNew TermChanged TermResponse TextChanged TextChangedI TextChangedP User VimEnter VimLeave VimLeavePre VimResized WinEnter WinLeave WinNew
" Highlight commonly used Groupnames {{{2
syn keyword vimGroup contained Comment Constant String Character Number Boolean Float Identifier Function Statement Conditional Repeat Label Operator Keyword Exception PreProc Include Define Macro PreCondit Type StorageClass Structure Typedef Special SpecialChar Tag Delimiter SpecialComment Debug Underlined Ignore Error Todo

View File

@@ -18,7 +18,7 @@
use. That means that you need to execute the commands to learn them
properly. If you only read the text, you will forget the commands!
Now, make sure that your Shift-Lock key is NOT depressed and press
Now, make sure that your Caps-Lock key is NOT depressed and press
the j key enough times to move the cursor so that Lesson 1.1
completely fills the screen.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@@ -17,7 +17,7 @@
To znamen<EFBFBD>, <EFBFBD>e je pot<EFBFBD>eba si p<EFBFBD><EFBFBD>kazy vyzkou<EFBFBD>et pro jejich spr<EFBFBD>vn<EFBFBD>
nau<EFBFBD>en<EFBFBD>. Pokud si jen <EFBFBD>te<EFBFBD> text, p<EFBFBD><EFBFBD>kazy zapomene<EFBFBD>!
Nyn<EFBFBD> se p<EFBFBD>esv<EFBFBD>d<EFBFBD>te, <EFBFBD>e Shift-Lock NEN<EFBFBD> stla<EFBFBD>en<EFBFBD> a n<EFBFBD>kolikr<EFBFBD>t stiskn<EFBFBD>te
Nyn<EFBFBD> se p<EFBFBD>esv<EFBFBD>d<EFBFBD>te, <EFBFBD>e Caps-Lock NEN<EFBFBD> stla<EFBFBD>en<EFBFBD> a n<EFBFBD>kolikr<EFBFBD>t stiskn<EFBFBD>te
kl<EFBFBD>vesu j aby se kurzor posunul natolik, <EFBFBD>e lekce 1.1 zapln<EFBFBD> celou
obrazovku.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@@ -17,7 +17,7 @@
To znamen<65>, <20>e je pot<6F>eba si p<><70>kazy vyzkou<6F>et pro jejich spr<70>vn<76>
nau<61>en<65>. Pokud si jen <20>te<74> text, p<><70>kazy zapomene<6E>!
Nyn<79> se p<>esv<73>d<EFBFBD>te, <20>e Shift-Lock NEN<45> stla<6C>en<65> a n<>kolikr<6B>t stiskn<6B>te
Nyn<79> se p<>esv<73>d<EFBFBD>te, <20>e Caps-Lock NEN<45> stla<6C>en<65> a n<>kolikr<6B>t stiskn<6B>te
kl<6B>vesu j aby se kurzor posunul natolik, <20>e lekce 1.1 zapln<6C> celou
obrazovku.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@@ -17,7 +17,7 @@
To znamená, že je potřeba si příkazy vyzkoušet pro jejich správné
naučení. Pokud si jen čteš text, příkazy zapomeneš!
Nyní se přesvědčte, že Shift-Lock NENÍ stlačený a několikrát stiskněte
Nyní se přesvědčte, že Caps-Lock NENÍ stlačený a několikrát stiskněte
klávesu j aby se kurzor posunul natolik, že lekce 1.1 zaplní celou
obrazovku.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@@ -20,7 +20,7 @@
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Shift-Lock <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Caps-Lock <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> j <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1.1 <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.

View File

@@ -20,7 +20,7 @@
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><> <20><><EFBFBD> <20><EFBFBD><E19F9C> <20><EFBFBD>. <20><> <20><><EFBFBD><EFBFBD><EFBFBD><E19D9C> <20><20><>
<20><><EFBFBD><E5A39C>, <20><> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><E1A99C>!
<20>騘, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>嫜 櫠 <20><> <20><><EFBFBD><E3A1AB> Shift-Lock <20><><EFBFBD> <20><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><20><><EFBFBD>
<20>騘, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>嫜 櫠 <20><> <20><><EFBFBD><E3A1AB> Caps-Lock <20><><EFBFBD> <20><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><20><><EFBFBD>
<20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><E3A1AB> j <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E3A99C> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><>
<> <20><> <20><EFBFBD><E19F9E> 1.1 <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><>椞.

View File

@@ -20,7 +20,7 @@
εκτελείτε τις εντολές για να τις μάθετε σωστά. Αν διαβάζετε μόνο το
κείμενο, θα τις ξεχάσετε!
Τώρα, βεβαιωθείτε ότι το πλήκτρο Shift-Lock ΔΕΝ είναι πατημένο και
Τώρα, βεβαιωθείτε ότι το πλήκτρο Caps-Lock ΔΕΝ είναι πατημένο και
πατήστε το πλήκτρο j αρκετές φορές για να μετακινήσετε τον δρομέα έτσι
ώστε το Μάθημα 1.1 να γεμίσει πλήρως την οθόνη.

View File

@@ -18,7 +18,7 @@
pou<6F><75>van<61>m. To znamen<65>, <20>e je potrebn<62> si pr<70>kazy vysk<73><6B>a<EFBFBD>, aby bolo
u<>enie spr<70>vne. Ak len <20>itas text, pr<70>kazy zabudne<6E>!
Presved<65> sa, <20>e Shift-Lock NIEJE stla<6C>en<65> a stla<6C>t kl<6B>vesu
Presved<65> sa, <20>e Caps-Lock NIEJE stla<6C>en<65> a stla<6C>t kl<6B>vesu
j nieko<6B>ko kr<6B>t, aby sa kurzor posunul nato<74>ko, <20>e lekcia 1.1
celkom zapln<6C> obrazovku.

View File

@@ -18,7 +18,7 @@
pou<6F><75>van<61>m. To znamen<65>, <20>e je potrebn<62> si pr<70>kazy vysk<73><6B>a<EFBFBD>, aby bolo
u<>enie spr<70>vne. Ak len <20>itas text, pr<70>kazy zabudne<6E>!
Presved<65> sa, <20>e Shift-Lock NIEJE stla<6C>en<65> a stla<6C>t kl<6B>vesu
Presved<65> sa, <20>e Caps-Lock NIEJE stla<6C>en<65> a stla<6C>t kl<6B>vesu
j nieko<6B>ko kr<6B>t, aby sa kurzor posunul nato<74>ko, <20>e lekcia 1.1
celkom zapln<6C> obrazovku.

View File

@@ -18,7 +18,7 @@
používaním. To znamená, že je potrebné si príkazy vyskúšať, aby bolo
učenie správne. Ak len čitas text, príkazy zabudneš!
Presvedč sa, že Shift-Lock NIEJE stlačený a stlačt klávesu
Presvedč sa, že Caps-Lock NIEJE stlačený a stlačt klávesu
j niekoľko krát, aby sa kurzor posunul natoľko, že lekcia 1.1
celkom zaplní obrazovku.

View File

@@ -18,7 +18,7 @@
anlama gelir; komutlar<61> <20><>renmek i<>in do<64>ru bir <20>ekilde <20>al<61><6C>t<EFBFBD>rman<61>z gerekir.
E<>er sadece yaz<61>lanlar<61> okursan<61>z komutlar<61> unutursunuz.
<20>imdi Shift-Lock tu<74>lar<61>n<EFBFBD>z<EFBFBD>n bas<61>l<EFBFBD> olmad<61><64><EFBFBD>na emin olun ve Ders 1.1'in
<20>imdi Caps-Lock tu<74>lar<61>n<EFBFBD>z<EFBFBD>n bas<61>l<EFBFBD> olmad<61><64><EFBFBD>na emin olun ve Ders 1.1'in
ekran<61> tamamen doldurmas<61> i<>in j tu<74>una yeterli miktarda bas<61>n.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ders 1.1: <20>MLEC<45> HAREKET ETT<54>RMEK

View File

@@ -18,7 +18,7 @@
anlama gelir; komutları öğrenmek için doğru bir şekilde çalıştırmanız gerekir.
Eğer sadece yazılanları okursanız komutları unutursunuz.
Şimdi Shift-Lock tuşlarınızın basılı olmadığına emin olun ve Ders 1.1'in
Şimdi Caps-Lock tuşlarınızın basılı olmadığına emin olun ve Ders 1.1'in
ekranı tamamen doldurması için j tuşuna yeterli miktarda basın.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ders 1.1: İMLECİ HAREKET ETTİRMEK

View File

@@ -18,7 +18,7 @@
use. That means that you need to execute the commands to learn them
properly. If you only read the text, you will forget the commands!
Now, make sure that your Shift-Lock key is NOT depressed and press
Now, make sure that your Caps-Lock key is NOT depressed and press
the j key enough times to move the cursor so that Lesson 1.1
completely fills the screen.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@@ -20,7 +20,7 @@
#
# "make upx" makes *compressed* versions of the 32 bit GUI and console EXEs,
# using the excellent UPX compressor:
# http://upx.sourceforge.net/
# https://upx.github.io/
# "make mpress" uses the MPRESS compressor for 32- and 64-bit EXEs:
# http://www.matcode.com/mpress.htm
#
@@ -34,9 +34,9 @@ DEBUG=no
OPTIMIZE=MAXSPEED
# set to yes to make gvim, no for vim
GUI=yes
# set to yes if you want to use DirectWrite (DirectX)
# set to no if you do not want to use DirectWrite (DirectX)
# MinGW-w64 is needed, and ARCH should be set to i686 or x86-64.
DIRECTX=no
DIRECTX=yes
# FEATURES=[TINY | SMALL | NORMAL | BIG | HUGE]
# Set to TINY to make minimal version (few features).
FEATURES=HUGE

View File

@@ -26,7 +26,7 @@
# GUI interface: GUI=yes (default is no)
#
# GUI with DirectWrite (DirectX): DIRECTX=yes
# (default is no, requires GUI=yes and MBYTE=yes)
# (default is yes if GUI=yes, requires GUI=yes and MBYTE=yes)
#
# Color emoji support: COLOR_EMOJI=yes
# (default is yes if DIRECTX=yes, requires WinSDK 8.1 or later.)
@@ -180,6 +180,10 @@
TARGETOS = WINNT
!ifndef DIRECTX
DIRECTX = $(GUI)
!endif
# Select one of eight object code directories, depends on GUI, OLE, DEBUG and
# interfaces.
# If you change something else, do "make clean" first!
@@ -289,7 +293,8 @@ MSVC_MAJOR = ($(MSVCVER) / 100 - 6)
MSVCRT_VER = ($(MSVCVER) / 10 - 60)
# Visual C++ 2017 needs special handling
# it has an _MSC_VER of 1910->14.1, but is actually v15 with runtime v140
!elseif $(MSVCVER) == 1910
# TODO: what's the maximum value?
!elseif $(MSVCVER) >= 1910
MSVC_MAJOR = 15
MSVCRT_VER = 140
!else
@@ -1153,7 +1158,9 @@ LINK_PDB = /PDB:$(VIM).pdb -debug
# CFLAGS with /Fo$(OUTDIR)/
CFLAGS_OUTDIR=$(CFLAGS) /Fo$(OUTDIR)/
conflags = /nologo /subsystem:$(SUBSYSTEM)
# Add /opt:ref to remove unreferenced functions and data even when /DEBUG is
# added.
conflags = /nologo /subsystem:$(SUBSYSTEM) /opt:ref
PATHDEF_SRC = $(OUTDIR)\pathdef.c
@@ -1179,6 +1186,13 @@ LINKARGS1 = $(LINKARGS1) /LTCG:STATUS
!endif
!endif
!if $(MSVC_MAJOR) >= 11 && "$(CPU)" == "AMD64" && "$(GUI)" == "yes"
# This option is required for VC2012 or later so that 64-bit gvim can
# accept D&D from 32-bit applications. NOTE: This disables 64-bit ASLR,
# therefore the security level becomes as same as VC2010.
LINKARGS1 = $(LINKARGS1) /HIGHENTROPYVA:NO
!endif
all: $(VIM).exe \
vimrun.exe \
install.exe \

View File

@@ -651,12 +651,16 @@ LINT_OPTIONS = -beprxzF
# PROFILING - Uncomment the next two lines to do profiling with gcc and gprof.
# Might not work with GUI or Perl.
# For unknown reasons adding "-lc" fixes a linking problem with some versions
# of GCC. That's probably a bug in the "-pg" implementation.
# After running Vim see the profile result with: gprof vim gmon.out | vim -
# Need to recompile everything after changing this: "make clean" "make".
#PROFILE_CFLAGS = -pg -g -DWE_ARE_PROFILING
#PROFILE_LIBS = -pg
# GCC 5 and later need the -no-pie argument.
#PROFILE_LIBS = -pg -no-pie
# For unknown reasons adding "-lc" fixes a linking problem with some versions
# of GCC. That's probably a bug in the "-pg" implementation.
#PROFILE_LIBS = -pg -lc
@@ -1392,6 +1396,8 @@ TERM_DEPS = \
libvterm/src/utf8.h \
libvterm/src/vterm_internal.h
TERM_SRC = libvterm/src/*.c
### Command to create dependencies based on #include "..."
### prototype headers are ignored due to -DPROTO, system
### headers #include <...> are ignored if we use the -MM option, as
@@ -2036,7 +2042,7 @@ notags:
# Motif and Athena GUI
# You can ignore error messages for missing files.
tags TAGS: notags
$(TAGPRG) $(TAGS_SRC) $(TAGS_INCL)
$(TAGPRG) $(TAGS_SRC) $(TAGS_INCL) $(TERM_SRC) $(TERM_DEPS)
# Make a highlight file for types. Requires Exuberant ctags and awk
types: types.vim
@@ -2101,10 +2107,10 @@ run_message_test: $(MESSAGE_TEST_TARGET)
# These do not depend on the executable, compile it when needed.
test1 \
test_eval \
test3 test11 test14 test15 test17 \
test29 test30 test36 test37 test39 \
test3 test11 test14 test17 \
test29 test30 test37 test39 \
test42 test44 test48 test49 \
test50 test52 test59 \
test52 test59 \
test64 test69 \
test70 test72 \
test85 test86 test87 test88 \
@@ -2127,6 +2133,7 @@ test_arglist \
test_cd \
test_cdo \
test_changedtick \
test_changelist \
test_channel \
test_charsearch \
test_charsearch_utf8 \
@@ -2150,6 +2157,7 @@ test_arglist \
test_eval_stuff \
test_ex_undo \
test_ex_z \
test_exit \
test_exec_while_if \
test_execute_func \
test_exists \
@@ -2198,6 +2206,7 @@ test_arglist \
test_job_fails \
test_join \
test_json \
test_jumplist \
test_jumps \
test_lambda \
test_langmap \
@@ -2879,6 +2888,7 @@ shadow: runtime pixmaps
../../testdir/pyxfile \
../../testdir/sautest \
../../testdir/samples \
../../testdir/dumps \
../../testdir/test83-tags? \
../../testdir/*.ok .

View File

@@ -8,8 +8,8 @@ You might also want to read ":help development".
JUMPING AROUND
First of all, use ":make tags" to generate a tags file, so that you can use
the ":tag" command to jump around the source code.
First of all, use ":make tags" to generate a tags file, so that you can jump
around in the source code.
To jump to a function or variable definition, move the cursor on the name and
use the CTRL-] command. Use CTRL-T or CTRL-O to jump back.
@@ -43,6 +43,21 @@ Most code can be found in a file with an obvious name (incomplete list):
window.c handling split windows
DEBUGGING
If you have a reasonable recent version of gdb, you can use the :Termdebug
command to debug Vim. See ":help :Termdebug".
When something is time critical or stepping through code is a hassle, use the
channel logging to create a time-stamped log file. Add lines to the code like
this:
ch_log(NULL, "Value is now %02x", value);
After compiling and starting Vim, do:
:call ch_logfile('debuglog', 'w')
And edit "debuglog" to see what happens. The channel functions already have
ch_log() calls, thus you always see that in the log.
IMPORTANT VARIABLES
The current mode is stored in "State". The values it can have are NORMAL,

View File

@@ -137,7 +137,7 @@ get_beval_info(
* Show a balloon with "mesg" or "list".
*/
void
post_balloon(BalloonEval *beval UNUSED, char_u *mesg, list_T *list)
post_balloon(BalloonEval *beval UNUSED, char_u *mesg, list_T *list UNUSED)
{
# ifdef FEAT_BEVAL_TERM
# ifdef FEAT_GUI

File diff suppressed because it is too large Load Diff

View File

@@ -317,8 +317,8 @@ channel_still_useful(channel_T *channel)
/* If there is no callback then nobody can get readahead. If the fd is
* closed and there is no readahead then the callback won't be called. */
has_sock_msg = channel->ch_part[PART_SOCK].ch_fd != INVALID_FD
|| channel->ch_part[PART_SOCK].ch_head.rq_next != NULL
|| channel->ch_part[PART_SOCK].ch_json_head.jq_next != NULL;
|| channel->ch_part[PART_SOCK].ch_head.rq_next != NULL
|| channel->ch_part[PART_SOCK].ch_json_head.jq_next != NULL;
has_out_msg = channel->ch_part[PART_OUT].ch_fd != INVALID_FD
|| channel->ch_part[PART_OUT].ch_head.rq_next != NULL
|| channel->ch_part[PART_OUT].ch_json_head.jq_next != NULL;
@@ -2207,14 +2207,7 @@ channel_exe_cmd(channel_T *channel, ch_part_T part, typval_T *argv)
ex_redraw(&ea);
showruler(FALSE);
setcursor();
out_flush();
#ifdef FEAT_GUI
if (gui.in_use)
{
gui_update_cursor(TRUE, FALSE);
gui_mch_flush();
}
#endif
out_flush_cursor(TRUE, FALSE);
}
else if (STRCMP(cmd, "expr") == 0 || STRCMP(cmd, "call") == 0)
{
@@ -2985,8 +2978,7 @@ channel_clear_one(channel_T *channel, ch_part_T part)
channel_clear(channel_T *channel)
{
ch_log(channel, "Clearing channel");
vim_free(channel->ch_hostname);
channel->ch_hostname = NULL;
VIM_CLEAR(channel->ch_hostname);
channel_clear_one(channel, PART_SOCK);
channel_clear_one(channel, PART_OUT);
channel_clear_one(channel, PART_ERR);
@@ -4158,8 +4150,9 @@ channel_select_check(int ret_in, void *rfds_in, void *wfds_in)
if (ret > 0 && in_part->ch_fd != INVALID_FD
&& FD_ISSET(in_part->ch_fd, wfds))
{
channel_write_input(channel);
/* Clear the flag first, ch_fd may change in channel_write_input(). */
FD_CLR(in_part->ch_fd, wfds);
channel_write_input(channel);
--ret;
}
}
@@ -4466,7 +4459,7 @@ get_job_options(typval_T *tv, jobopt_T *opt, int supported, int supported2)
return OK;
if (tv->v_type != VAR_DICT)
{
EMSG(_(e_invarg));
EMSG(_(e_dictreq));
return FAIL;
}
dict = tv->vval.v_dict;
@@ -4549,7 +4542,7 @@ get_job_options(typval_T *tv, jobopt_T *opt, int supported, int supported2)
opt->jo_io_buf[part] = get_tv_number(item);
if (opt->jo_io_buf[part] <= 0)
{
EMSG2(_(e_invarg2), get_tv_string(item));
EMSG3(_(e_invargNval), hi->hi_key, get_tv_string(item));
return FAIL;
}
if (buflist_findnr(opt->jo_io_buf[part]) == NULL)
@@ -4598,7 +4591,7 @@ get_job_options(typval_T *tv, jobopt_T *opt, int supported, int supported2)
*lp = get_tv_number(item);
if (*lp < 0)
{
EMSG2(_(e_invarg2), get_tv_string(item));
EMSG3(_(e_invargNval), hi->hi_key, get_tv_string(item));
return FAIL;
}
}
@@ -4609,7 +4602,7 @@ get_job_options(typval_T *tv, jobopt_T *opt, int supported, int supported2)
opt->jo_set |= JO_CHANNEL;
if (item->v_type != VAR_CHANNEL)
{
EMSG2(_(e_invarg2), "channel");
EMSG2(_(e_invargval), "channel");
return FAIL;
}
opt->jo_channel = item->vval.v_channel;
@@ -4622,7 +4615,7 @@ get_job_options(typval_T *tv, jobopt_T *opt, int supported, int supported2)
opt->jo_callback = get_callback(item, &opt->jo_partial);
if (opt->jo_callback == NULL)
{
EMSG2(_(e_invarg2), "callback");
EMSG2(_(e_invargval), "callback");
return FAIL;
}
}
@@ -4634,7 +4627,7 @@ get_job_options(typval_T *tv, jobopt_T *opt, int supported, int supported2)
opt->jo_out_cb = get_callback(item, &opt->jo_out_partial);
if (opt->jo_out_cb == NULL)
{
EMSG2(_(e_invarg2), "out_cb");
EMSG2(_(e_invargval), "out_cb");
return FAIL;
}
}
@@ -4646,7 +4639,7 @@ get_job_options(typval_T *tv, jobopt_T *opt, int supported, int supported2)
opt->jo_err_cb = get_callback(item, &opt->jo_err_partial);
if (opt->jo_err_cb == NULL)
{
EMSG2(_(e_invarg2), "err_cb");
EMSG2(_(e_invargval), "err_cb");
return FAIL;
}
}
@@ -4658,7 +4651,7 @@ get_job_options(typval_T *tv, jobopt_T *opt, int supported, int supported2)
opt->jo_close_cb = get_callback(item, &opt->jo_close_partial);
if (opt->jo_close_cb == NULL)
{
EMSG2(_(e_invarg2), "close_cb");
EMSG2(_(e_invargval), "close_cb");
return FAIL;
}
}
@@ -4671,7 +4664,7 @@ get_job_options(typval_T *tv, jobopt_T *opt, int supported, int supported2)
never = TRUE;
else if (STRCMP(val, "auto") != 0)
{
EMSG2(_(e_invarg2), "drop");
EMSG3(_(e_invargNval), "drop", val);
return FAIL;
}
opt->jo_drop_never = never;
@@ -4684,7 +4677,7 @@ get_job_options(typval_T *tv, jobopt_T *opt, int supported, int supported2)
opt->jo_exit_cb = get_callback(item, &opt->jo_exit_partial);
if (opt->jo_exit_cb == NULL)
{
EMSG2(_(e_invarg2), "exit_cb");
EMSG2(_(e_invargval), "exit_cb");
return FAIL;
}
}
@@ -4697,7 +4690,7 @@ get_job_options(typval_T *tv, jobopt_T *opt, int supported, int supported2)
opt->jo_term_name = get_tv_string_chk(item);
if (opt->jo_term_name == NULL)
{
EMSG2(_(e_invarg2), "term_name");
EMSG2(_(e_invargval), "term_name");
return FAIL;
}
}
@@ -4708,7 +4701,7 @@ get_job_options(typval_T *tv, jobopt_T *opt, int supported, int supported2)
val = get_tv_string(item);
if (STRCMP(val, "open") != 0 && STRCMP(val, "close") != 0)
{
EMSG2(_(e_invarg2), val);
EMSG3(_(e_invargNval), "term_finish", val);
return FAIL;
}
opt->jo_set2 |= JO2_TERM_FINISH;
@@ -4732,7 +4725,7 @@ get_job_options(typval_T *tv, jobopt_T *opt, int supported, int supported2)
}
if (p == NULL)
{
EMSG2(_(e_invarg2), "term_opencmd");
EMSG2(_(e_invargval), "term_opencmd");
return FAIL;
}
}
@@ -4746,7 +4739,7 @@ get_job_options(typval_T *tv, jobopt_T *opt, int supported, int supported2)
p = opt->jo_eof_chars = get_tv_string_chk(item);
if (p == NULL)
{
EMSG2(_(e_invarg2), "term_opencmd");
EMSG2(_(e_invargval), "eof_chars");
return FAIL;
}
}
@@ -4754,43 +4747,57 @@ get_job_options(typval_T *tv, jobopt_T *opt, int supported, int supported2)
{
if (!(supported2 & JO2_TERM_ROWS))
break;
opt->jo_set |= JO2_TERM_ROWS;
opt->jo_set2 |= JO2_TERM_ROWS;
opt->jo_term_rows = get_tv_number(item);
}
else if (STRCMP(hi->hi_key, "term_cols") == 0)
{
if (!(supported2 & JO2_TERM_COLS))
break;
opt->jo_set |= JO2_TERM_COLS;
opt->jo_set2 |= JO2_TERM_COLS;
opt->jo_term_cols = get_tv_number(item);
}
else if (STRCMP(hi->hi_key, "vertical") == 0)
{
if (!(supported2 & JO2_VERTICAL))
break;
opt->jo_set |= JO2_VERTICAL;
opt->jo_set2 |= JO2_VERTICAL;
opt->jo_vertical = get_tv_number(item);
}
else if (STRCMP(hi->hi_key, "curwin") == 0)
{
if (!(supported2 & JO2_CURWIN))
break;
opt->jo_set |= JO2_CURWIN;
opt->jo_set2 |= JO2_CURWIN;
opt->jo_curwin = get_tv_number(item);
}
else if (STRCMP(hi->hi_key, "hidden") == 0)
{
if (!(supported2 & JO2_HIDDEN))
break;
opt->jo_set |= JO2_HIDDEN;
opt->jo_set2 |= JO2_HIDDEN;
opt->jo_hidden = get_tv_number(item);
}
else if (STRCMP(hi->hi_key, "norestore") == 0)
{
if (!(supported2 & JO2_NORESTORE))
break;
opt->jo_set2 |= JO2_NORESTORE;
opt->jo_term_norestore = get_tv_number(item);
}
else if (STRCMP(hi->hi_key, "term_kill") == 0)
{
if (!(supported2 & JO2_TERM_KILL))
break;
opt->jo_set2 |= JO2_TERM_KILL;
opt->jo_term_kill = get_tv_string_chk(item);
}
#endif
else if (STRCMP(hi->hi_key, "env") == 0)
{
if (!(supported2 & JO2_ENV))
break;
opt->jo_set |= JO2_ENV;
opt->jo_set2 |= JO2_ENV;
opt->jo_env = item->vval.v_dict;
++item->vval.v_dict->dv_refcount;
}
@@ -4801,10 +4808,10 @@ get_job_options(typval_T *tv, jobopt_T *opt, int supported, int supported2)
opt->jo_cwd = get_tv_string_buf_chk(item, opt->jo_cwd_buf);
if (opt->jo_cwd == NULL || !mch_isdir(opt->jo_cwd))
{
EMSG2(_(e_invarg2), "cwd");
EMSG2(_(e_invargval), "cwd");
return FAIL;
}
opt->jo_set |= JO2_CWD;
opt->jo_set2 |= JO2_CWD;
}
else if (STRCMP(hi->hi_key, "waittime") == 0)
{
@@ -4846,7 +4853,7 @@ get_job_options(typval_T *tv, jobopt_T *opt, int supported, int supported2)
opt->jo_part = PART_OUT;
else
{
EMSG2(_(e_invarg2), val);
EMSG3(_(e_invargNval), "part", val);
return FAIL;
}
}
@@ -4866,7 +4873,7 @@ get_job_options(typval_T *tv, jobopt_T *opt, int supported, int supported2)
opt->jo_soe_buf);
if (opt->jo_stoponexit == NULL)
{
EMSG2(_(e_invarg2), "stoponexit");
EMSG2(_(e_invargval), "stoponexit");
return FAIL;
}
}
@@ -5377,11 +5384,13 @@ job_check_ended(void)
/*
* Create a job and return it. Implements job_start().
* "argv_arg" is only for Unix.
* When "argv_arg" is NULL then "argvars" is used.
* The returned job has a refcount of one.
* Returns NULL when out of memory.
*/
job_T *
job_start(typval_T *argvars, jobopt_T *opt_arg)
job_start(typval_T *argvars, char **argv_arg, jobopt_T *opt_arg)
{
job_T *job;
char_u *cmd = NULL;
@@ -5468,6 +5477,13 @@ job_start(typval_T *argvars, jobopt_T *opt_arg)
job_set_options(job, &opt);
#ifdef USE_ARGV
if (argv_arg != NULL)
{
argv = argv_arg;
}
else
#endif
if (argvars[0].v_type == VAR_STRING)
{
/* Command is a string. */
@@ -5478,6 +5494,7 @@ job_start(typval_T *argvars, jobopt_T *opt_arg)
goto theend;
}
#ifdef USE_ARGV
/* This will modify "cmd". */
if (mch_parse_cmd(cmd, FALSE, &argv, &argc) == FAIL)
goto theend;
argv[argc] = NULL;
@@ -5544,7 +5561,8 @@ job_start(typval_T *argvars, jobopt_T *opt_arg)
theend:
#ifdef USE_ARGV
vim_free(argv);
if (argv != argv_arg)
vim_free(argv);
#else
vim_free(ga.ga_data);
#endif

View File

@@ -1787,7 +1787,6 @@ skiptowhite(char_u *p)
return p;
}
#if defined(FEAT_LISTCMDS) || defined(FEAT_SIGNS) || defined(PROTO)
/*
* skiptowhite_esc: Like skiptowhite(), but also skip escaped chars
*/
@@ -1802,7 +1801,6 @@ skiptowhite_esc(char_u *p)
}
return p;
}
#endif
/*
* Getdigits: Get a number from a string and skip over it.

View File

@@ -118,6 +118,9 @@ static cryptmethod_T cryptmethods[CRYPT_M_COUNT] = {
NULL, NULL,
crypt_blowfish_encode, crypt_blowfish_decode,
},
/* NOTE: when adding a new method, use some random bytes for the magic key,
* to avoid that a text file is recognized as encrypted. */
};
#define CRYPT_MAGIC_LEN 12 /* cannot change */
@@ -349,10 +352,7 @@ crypt_create_for_writing(
state = crypt_create(method_nr, key, salt, salt_len, seed, seed_len);
if (state == NULL)
{
vim_free(*header);
*header = NULL;
}
VIM_CLEAR(*header);
return state;
}

View File

@@ -1,7 +1,7 @@
# Python script to get both the data and resource fork from a BinHex encoded
# file.
# Author: MURAOKA Taro <koron.kaoriya@gmail.com>
# Last Change: 2012 Jun 29
# Last Change: 2018 Mar 27
#
# Copyright (C) 2003,12 MURAOKA Taro <koron.kaoriya@gmail.com>
# THIS FILE IS DISTRIBUTED UNDER THE VIM LICENSE.
@@ -15,11 +15,13 @@ info = conv.FInfo
out = conv.FName
out_data = out
out_rsrc = out + '.rsrcfork'
#print 'out_rsrc=' + out_rsrc
print 'In file: ' + input
# This uses the print statement on Python 2, print function on Python 3.
#print('out_rsrc=' + out_rsrc)
print('In file: ' + input)
outfile = open(out_data, 'wb')
print ' Out data fork: ' + out_data
print(' Out data fork: ' + out_data)
while 1:
d = conv.read(128000)
if not d: break
@@ -29,7 +31,7 @@ conv.close_data()
d = conv.read_rsrc(128000)
if d:
print ' Out rsrc fork: ' + out_rsrc
print(' Out rsrc fork: ' + out_rsrc)
outfile = open(out_rsrc, 'wb')
outfile.write(d)
while 1:

View File

@@ -872,13 +872,9 @@ diff_file(
(diff_flags & DIFF_ICASE) ? "-i " : "",
tmp_orig, tmp_new);
append_redir(cmd, (int)len, p_srr, tmp_diff);
#ifdef FEAT_AUTOCMD
block_autocmds(); /* Avoid ShellCmdPost stuff */
#endif
(void)call_shell(cmd, SHELL_FILTER|SHELL_SILENT|SHELL_DOOUT);
#ifdef FEAT_AUTOCMD
unblock_autocmds();
#endif
vim_free(cmd);
}
}
@@ -984,13 +980,9 @@ ex_diffpatch(exarg_T *eap)
* cooked mode to allow the user to respond to prompts. */
vim_snprintf((char *)buf, buflen, "patch -o %s %s < %s",
tmp_new, tmp_orig, esc_name);
#ifdef FEAT_AUTOCMD
block_autocmds(); /* Avoid ShellCmdPost stuff */
#endif
(void)call_shell(buf, SHELL_FILTER | SHELL_COOKED);
#ifdef FEAT_AUTOCMD
unblock_autocmds();
#endif
}
#ifdef UNIX
@@ -1052,11 +1044,9 @@ ex_diffpatch(exarg_T *eap)
eap->arg = newname;
ex_file(eap);
#ifdef FEAT_AUTOCMD
/* Do filetype detection with the new name. */
if (au_has_group((char_u *)"filetypedetect"))
do_cmdline_cmd((char_u *)":doau filetypedetect BufRead");
#endif
}
}
}
@@ -1170,16 +1160,12 @@ diff_win_options(
# endif
/* Use 'scrollbind' and 'cursorbind' when available */
#ifdef FEAT_SCROLLBIND
if (!wp->w_p_diff)
wp->w_p_scb_save = wp->w_p_scb;
wp->w_p_scb = TRUE;
#endif
#ifdef FEAT_CURSORBIND
if (!wp->w_p_diff)
wp->w_p_crb_save = wp->w_p_crb;
wp->w_p_crb = TRUE;
#endif
if (!wp->w_p_diff)
wp->w_p_wrap_save = wp->w_p_wrap;
wp->w_p_wrap = FALSE;
@@ -1209,10 +1195,8 @@ diff_win_options(
/* make sure topline is not halfway a fold */
changed_window_setting_win(wp);
# endif
#ifdef FEAT_SCROLLBIND
if (vim_strchr(p_sbo, 'h') == NULL)
do_cmdline_cmd((char_u *)"set sbo+=hor");
#endif
/* Save the current values, to be restored in ex_diffoff(). */
wp->w_p_diff_saved = TRUE;
@@ -1231,9 +1215,7 @@ diff_win_options(
ex_diffoff(exarg_T *eap)
{
win_T *wp;
#ifdef FEAT_SCROLLBIND
int diffwin = FALSE;
#endif
FOR_ALL_WINDOWS(wp)
{
@@ -1247,14 +1229,10 @@ ex_diffoff(exarg_T *eap)
if (wp->w_p_diff_saved)
{
#ifdef FEAT_SCROLLBIND
if (wp->w_p_scb)
wp->w_p_scb = wp->w_p_scb_save;
#endif
#ifdef FEAT_CURSORBIND
if (wp->w_p_crb)
wp->w_p_crb = wp->w_p_crb_save;
#endif
if (!wp->w_p_wrap)
wp->w_p_wrap = wp->w_p_wrap_save;
#ifdef FEAT_FOLDING
@@ -1286,20 +1264,16 @@ ex_diffoff(exarg_T *eap)
/* Note: 'sbo' is not restored, it's a global option. */
diff_buf_adjust(wp);
}
#ifdef FEAT_SCROLLBIND
diffwin |= wp->w_p_diff;
#endif
}
/* Also remove hidden buffers from the list. */
if (eap->forceit)
diff_buf_clear();
#ifdef FEAT_SCROLLBIND
/* Remove "hor" from from 'scrollopt' if there are no diff windows left. */
if (!diffwin && vim_strchr(p_sbo, 'h') != NULL)
do_cmdline_cmd((char_u *)"set sbo-=hor");
#endif
}
/*

View File

@@ -1974,6 +1974,41 @@ do_digraph(int c)
return c;
}
/*
* Find a digraph for "val". If found return the string to display it.
* If not found return NULL.
*/
char_u *
get_digraph_for_char(val)
int val;
{
int i;
int use_defaults;
digr_T *dp;
static char_u r[3];
for (use_defaults = 0; use_defaults <= 1; use_defaults++)
{
if (use_defaults == 0)
dp = (digr_T *)user_digraphs.ga_data;
else
dp = digraphdefault;
for (i = 0; use_defaults ? dp->char1 != NUL
: i < user_digraphs.ga_len; ++i)
{
if (dp->result == val)
{
r[0] = dp->char1;
r[1] = dp->char2;
r[2] = NUL;
return r;
}
++dp;
}
}
return NULL;
}
/*
* Get a digraph. Used after typing CTRL-K on the command line or in normal
* mode.

View File

@@ -1200,8 +1200,8 @@ install_vimrc(int idx)
/* If the path has a space: When using cmd.exe (Win NT/2000/XP) put
* quotes around the diff command and rely on the default value of
* shellxquote to solve the quoting problem for the whole command.
*
* shellxquote to solve the quoting problem for the whole command.
*
* Otherwise put a double quote just before the space and at the
* end of the command. Putting quotes around the whole thing
* doesn't work on Win 95/98/ME. This is mostly guessed! */

View File

@@ -17,39 +17,41 @@
/*
* definitions used for CTRL-X submode
*/
#define CTRL_X_WANT_IDENT 0x100
# define CTRL_X_WANT_IDENT 0x100
#define CTRL_X_NOT_DEFINED_YET 1
#define CTRL_X_SCROLL 2
#define CTRL_X_WHOLE_LINE 3
#define CTRL_X_FILES 4
#define CTRL_X_TAGS (5 + CTRL_X_WANT_IDENT)
#define CTRL_X_PATH_PATTERNS (6 + CTRL_X_WANT_IDENT)
#define CTRL_X_PATH_DEFINES (7 + CTRL_X_WANT_IDENT)
#define CTRL_X_FINISHED 8
#define CTRL_X_DICTIONARY (9 + CTRL_X_WANT_IDENT)
#define CTRL_X_THESAURUS (10 + CTRL_X_WANT_IDENT)
#define CTRL_X_CMDLINE 11
#define CTRL_X_FUNCTION 12
#define CTRL_X_OMNI 13
#define CTRL_X_SPELL 14
#define CTRL_X_LOCAL_MSG 15 /* only used in "ctrl_x_msgs" */
#define CTRL_X_EVAL 16 /* for builtin function complete() */
# define CTRL_X_NORMAL 0 /* CTRL-N CTRL-P completion, default */
# define CTRL_X_NOT_DEFINED_YET 1
# define CTRL_X_SCROLL 2
# define CTRL_X_WHOLE_LINE 3
# define CTRL_X_FILES 4
# define CTRL_X_TAGS (5 + CTRL_X_WANT_IDENT)
# define CTRL_X_PATH_PATTERNS (6 + CTRL_X_WANT_IDENT)
# define CTRL_X_PATH_DEFINES (7 + CTRL_X_WANT_IDENT)
# define CTRL_X_FINISHED 8
# define CTRL_X_DICTIONARY (9 + CTRL_X_WANT_IDENT)
# define CTRL_X_THESAURUS (10 + CTRL_X_WANT_IDENT)
# define CTRL_X_CMDLINE 11
# define CTRL_X_FUNCTION 12
# define CTRL_X_OMNI 13
# define CTRL_X_SPELL 14
# define CTRL_X_LOCAL_MSG 15 /* only used in "ctrl_x_msgs" */
# define CTRL_X_EVAL 16 /* for builtin function complete() */
#define CTRL_X_MSG(i) ctrl_x_msgs[(i) & ~CTRL_X_WANT_IDENT]
#define CTRL_X_MODE_LINE_OR_EVAL(m) (m == CTRL_X_WHOLE_LINE || m == CTRL_X_EVAL)
# define CTRL_X_MSG(i) ctrl_x_msgs[(i) & ~CTRL_X_WANT_IDENT]
# define CTRL_X_MODE_LINE_OR_EVAL(m) ((m) == CTRL_X_WHOLE_LINE || (m) == CTRL_X_EVAL)
/* Message for CTRL-X mode, index is ctrl_x_mode. */
static char *ctrl_x_msgs[] =
{
N_(" Keyword completion (^N^P)"), /* ctrl_x_mode == 0, ^P/^N compl. */
N_(" Keyword completion (^N^P)"), /* CTRL_X_NORMAL, ^P/^N compl. */
N_(" ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)"),
NULL,
NULL, /* CTRL_X_SCROLL: depends on state */
N_(" Whole line completion (^L^N^P)"),
N_(" File name completion (^F^N^P)"),
N_(" Tag completion (^]^N^P)"),
N_(" Path pattern completion (^N^P)"),
N_(" Definition completion (^D^N^P)"),
NULL,
NULL, /* CTRL_X_FINISHED */
N_(" Dictionary completion (^K^N^P)"),
N_(" Thesaurus completion (^T^N^P)"),
N_(" Command-line completion (^V^N^P)"),
@@ -61,10 +63,10 @@ static char *ctrl_x_msgs[] =
};
static char e_hitend[] = N_("Hit end of paragraph");
#ifdef FEAT_COMPL_FUNC
# ifdef FEAT_COMPL_FUNC
static char e_complwin[] = N_("E839: Completion function changed window");
static char e_compldel[] = N_("E840: Completion function deleted text");
#endif
# endif
/*
* Structure used to store one match for insert completion.
@@ -83,8 +85,8 @@ struct compl_S
int cp_number; /* sequence number */
};
#define ORIGINAL_TEXT (1) /* the original text when the expansion begun */
#define FREE_FNAME (2)
# define ORIGINAL_TEXT (1) /* the original text when the expansion begun */
# define FREE_FNAME (2)
/*
* All the current matches are stored in a list.
@@ -127,6 +129,9 @@ static int compl_restarting = FALSE; /* don't insert match */
* FALSE the word to be completed must be located. */
static int compl_started = FALSE;
/* Which Ctrl-X mode are we in? */
static int ctrl_x_mode = CTRL_X_NORMAL;
/* Set when doing something for completion that may call edit() recursively,
* which is not allowed. */
static int compl_busy = FALSE;
@@ -174,10 +179,10 @@ static void ins_compl_addfrommatch(void);
static int ins_compl_prep(int c);
static void ins_compl_fixRedoBufForLeader(char_u *ptr_arg);
static buf_T *ins_compl_next_buf(buf_T *buf, int flag);
#if defined(FEAT_COMPL_FUNC) || defined(FEAT_EVAL)
# if defined(FEAT_COMPL_FUNC) || defined(FEAT_EVAL)
static void ins_compl_add_list(list_T *list);
static void ins_compl_add_dict(dict_T *dict);
#endif
# endif
static int ins_compl_get_exp(pos_T *ini);
static void ins_compl_delete(void);
static void ins_compl_insert(int in_compl_func);
@@ -268,7 +273,7 @@ static int ins_ctrl_ey(int tc);
static void ins_try_si(int c);
#endif
static colnr_T get_nolist_virtcol(void);
#ifdef FEAT_AUTOCMD
#if defined(FEAT_EVAL)
static char_u *do_insert_char_pre(int c);
#endif
@@ -383,7 +388,6 @@ edit(
ins_compl_clear(); /* clear stuff for CTRL-X mode */
#endif
#ifdef FEAT_AUTOCMD
/*
* Trigger InsertEnter autocommands. Do not do this for "r<CR>" or "grx".
*/
@@ -391,7 +395,7 @@ edit(
{
pos_T save_cursor = curwin->w_cursor;
# ifdef FEAT_EVAL
#ifdef FEAT_EVAL
if (cmdchar == 'R')
ptr = (char_u *)"r";
else if (cmdchar == 'V')
@@ -400,7 +404,7 @@ edit(
ptr = (char_u *)"i";
set_vim_var_string(VV_INSERTMODE, ptr, 1);
set_vim_var_string(VV_CHAR, NULL, -1); /* clear v:char */
# endif
#endif
apply_autocmds(EVENT_INSERTENTER, NULL, NULL, FALSE, curbuf);
/* Make sure the cursor didn't move. Do call check_cursor_col() in
@@ -410,9 +414,9 @@ edit(
* line number is still valid (lines may have been deleted).
* Do not restore if v:char was set to a non-empty string. */
if (!EQUAL_POS(curwin->w_cursor, save_cursor)
# ifdef FEAT_EVAL
#ifdef FEAT_EVAL
&& *get_vim_var_str(VV_CHAR) == NUL
# endif
#endif
&& save_cursor.lnum <= curbuf->b_ml.ml_line_count)
{
int save_state = State;
@@ -423,7 +427,6 @@ edit(
State = save_state;
}
}
#endif
#ifdef FEAT_CONCEAL
/* Check if the cursor line needs redrawing before changing State. If
@@ -516,7 +519,7 @@ edit(
*/
if (curbuf->b_p_iminsert == B_IMODE_LMAP)
State |= LANGMAP;
#ifdef FEAT_MBYTE
#ifdef HAVE_INPUT_METHOD
im_set_active(curbuf->b_p_iminsert == B_IMODE_IM);
#endif
@@ -761,15 +764,11 @@ edit(
*/
ins_redraw(TRUE);
#ifdef FEAT_SCROLLBIND
if (curwin->w_p_scb)
do_check_scrollbind(TRUE);
#endif
#ifdef FEAT_CURSORBIND
if (curwin->w_p_crb)
do_check_cursorbind();
#endif
update_curswant();
old_topline = curwin->w_topline;
#ifdef FEAT_DIFF
@@ -800,10 +799,8 @@ edit(
c = safe_vgetc();
} while (c == K_IGNORE || c == K_NOP);
#ifdef FEAT_AUTOCMD
/* Don't want K_CURSORHOLD for the second key, e.g., after CTRL-V. */
did_cursorhold = TRUE;
#endif
#ifdef FEAT_RIGHTLEFT
if (p_hkmap && KeyTyped)
@@ -851,7 +848,7 @@ edit(
* completion: Add to "compl_leader". */
if (ins_compl_accept_char(c))
{
#ifdef FEAT_AUTOCMD
#if defined(FEAT_EVAL)
/* Trigger InsertCharPre. */
char_u *str = do_insert_char_pre(c);
char_u *p;
@@ -1025,12 +1022,10 @@ doESCkey:
if (ins_esc(&count, cmdchar, nomove))
{
#ifdef FEAT_AUTOCMD
if (cmdchar != 'r' && cmdchar != 'v')
apply_autocmds(EVENT_INSERTLEAVE, NULL, NULL,
FALSE, curbuf);
did_cursorhold = FALSE;
#endif
return (c == Ctrl_O);
}
continue;
@@ -1229,12 +1224,10 @@ doESCkey:
case K_IGNORE: /* Something mapped to nothing */
break;
#ifdef FEAT_AUTOCMD
case K_CURSORHOLD: /* Didn't type something for a while. */
apply_autocmds(EVENT_CURSORHOLDI, NULL, NULL, FALSE, curbuf);
did_cursorhold = TRUE;
break;
#endif
#ifdef FEAT_GUI_W32
/* On Win32 ignore <M-F4>, we get it when closing the window was
@@ -1449,7 +1442,8 @@ doESCkey:
/* if 'complete' is empty then plain ^P is no longer special,
* but it is under other ^X modes */
if (*curbuf->b_p_cpt == NUL
&& ctrl_x_mode != 0
&& (ctrl_x_mode == CTRL_X_NORMAL
|| ctrl_x_mode == CTRL_X_WHOLE_LINE)
&& !(compl_cont_status & CONT_LOCAL))
goto normalchar;
@@ -1482,7 +1476,7 @@ normalchar:
/*
* Insert a normal character.
*/
#ifdef FEAT_AUTOCMD
#if defined(FEAT_EVAL)
if (!p_paste)
{
/* Trigger InsertCharPre. */
@@ -1559,16 +1553,14 @@ normalchar:
break;
} /* end of switch (c) */
#ifdef FEAT_AUTOCMD
/* If typed something may trigger CursorHoldI again. */
if (c != K_CURSORHOLD
# ifdef FEAT_COMPL_FUNC
/* but not in CTRL-X mode, a script can't restore the state */
&& ctrl_x_mode == 0
# endif
#ifdef FEAT_COMPL_FUNC
/* but not in CTRL-X mode, a script can't restore the state */
&& ctrl_x_mode == CTRL_X_NORMAL
#endif
)
did_cursorhold = FALSE;
#endif
/* If the cursor was moved we didn't just insert a space */
if (arrow_used)
@@ -1577,7 +1569,7 @@ normalchar:
#ifdef FEAT_CINDENT
if (can_cindent && cindent_on()
# ifdef FEAT_INS_EXPAND
&& ctrl_x_mode == 0
&& ctrl_x_mode == CTRL_X_NORMAL
# endif
)
{
@@ -1618,25 +1610,17 @@ ins_redraw(
if (char_avail())
return;
#if defined(FEAT_AUTOCMD) || defined(FEAT_CONCEAL)
#if defined(FEAT_CONCEAL)
/* Trigger CursorMoved if the cursor moved. Not when the popup menu is
* visible, the command might delete it. */
if (ready && (
# ifdef FEAT_AUTOCMD
has_cursormovedI()
# endif
# if defined(FEAT_AUTOCMD) && defined(FEAT_CONCEAL)
||
# endif
# ifdef FEAT_CONCEAL
curwin->w_p_cole > 0
if (ready && (has_cursormovedI()
# if defined(FEAT_CONCEAL)
|| curwin->w_p_cole > 0
# endif
)
# ifdef FEAT_AUTOCMD
&& !EQUAL_POS(last_cursormoved, curwin->w_cursor)
# endif
&& !EQUAL_POS(last_cursormoved, curwin->w_cursor)
# ifdef FEAT_INS_EXPAND
&& !pum_visible()
&& !pum_visible()
# endif
)
{
@@ -1648,7 +1632,6 @@ ins_redraw(
if (syntax_present(curwin) && must_redraw)
update_screen(0);
# endif
# ifdef FEAT_AUTOCMD
if (has_cursormovedI())
{
/* Make sure curswant is correct, an autocommand may call
@@ -1656,36 +1639,40 @@ ins_redraw(
update_curswant();
apply_autocmds(EVENT_CURSORMOVEDI, NULL, NULL, FALSE, curbuf);
}
# endif
# ifdef FEAT_CONCEAL
if (curwin->w_p_cole > 0)
{
# ifdef FEAT_AUTOCMD
conceal_old_cursor_line = last_cursormoved.lnum;
# endif
conceal_new_cursor_line = curwin->w_cursor.lnum;
conceal_update_lines = TRUE;
}
# endif
# ifdef FEAT_AUTOCMD
last_cursormoved = curwin->w_cursor;
# endif
}
#endif
#ifdef FEAT_AUTOCMD
/* Trigger TextChangedI if b_changedtick differs. */
if (ready && has_textchangedI()
&& last_changedtick != CHANGEDTICK(curbuf)
# ifdef FEAT_INS_EXPAND
&& curbuf->b_last_changedtick != CHANGEDTICK(curbuf)
#ifdef FEAT_INS_EXPAND
&& !pum_visible()
# endif
#endif
)
{
if (last_changedtick_buf == curbuf)
apply_autocmds(EVENT_TEXTCHANGEDI, NULL, NULL, FALSE, curbuf);
last_changedtick_buf = curbuf;
last_changedtick = CHANGEDTICK(curbuf);
apply_autocmds(EVENT_TEXTCHANGEDI, NULL, NULL, FALSE, curbuf);
curbuf->b_last_changedtick = CHANGEDTICK(curbuf);
}
#ifdef FEAT_INS_EXPAND
/* Trigger TextChangedP if b_changedtick differs. When the popupmenu closes
* TextChangedI will need to trigger for backwards compatibility, thus use
* different b_last_changedtick* variables. */
if (ready && has_textchangedP()
&& curbuf->b_last_changedtick_pum != CHANGEDTICK(curbuf)
&& pum_visible())
{
apply_autocmds(EVENT_TEXTCHANGEDP, NULL, NULL, FALSE, curbuf);
curbuf->b_last_changedtick_pum = CHANGEDTICK(curbuf);
}
#endif
@@ -2241,6 +2228,24 @@ ins_ctrl_x(void)
}
}
/*
* Whether other than default completion has been selected.
*/
int
ctrl_x_mode_not_default(void)
{
return ctrl_x_mode != CTRL_X_NORMAL;
}
/*
* Whether CTRL-X was typed without a following character.
*/
int
ctrl_x_mode_not_defined_yet(void)
{
return ctrl_x_mode == CTRL_X_NOT_DEFINED_YET;
}
/*
* Return TRUE if the 'dict' or 'tsr' option can be used.
*/
@@ -2254,7 +2259,7 @@ has_compl_option(int dict_opt)
)
: (*curbuf->b_p_tsr == NUL && *p_tsr == NUL))
{
ctrl_x_mode = 0;
ctrl_x_mode = CTRL_X_NORMAL;
edit_submode = NULL;
msg_attr(dict_opt ? (char_u *)_("'dictionary' option is empty")
: (char_u *)_("'thesaurus' option is empty"),
@@ -2830,7 +2835,7 @@ set_completion(colnr_T startcol, list_T *list)
int save_w_leftcol = curwin->w_leftcol;
/* If already doing completions stop it. */
if (ctrl_x_mode != 0)
if (ctrl_x_mode != CTRL_X_NORMAL)
ins_compl_prep(' ');
ins_compl_clear();
ins_compl_free();
@@ -2904,8 +2909,7 @@ ins_compl_del_pum(void)
if (compl_match_array != NULL)
{
pum_undisplay();
vim_free(compl_match_array);
compl_match_array = NULL;
VIM_CLEAR(compl_match_array);
}
}
@@ -3407,10 +3411,8 @@ ins_compl_free(void)
compl_T *match;
int i;
vim_free(compl_pattern);
compl_pattern = NULL;
vim_free(compl_leader);
compl_leader = NULL;
VIM_CLEAR(compl_pattern);
VIM_CLEAR(compl_leader);
if (compl_first_match == NULL)
return;
@@ -3442,16 +3444,13 @@ ins_compl_clear(void)
compl_cont_status = 0;
compl_started = FALSE;
compl_matches = 0;
vim_free(compl_pattern);
compl_pattern = NULL;
vim_free(compl_leader);
compl_leader = NULL;
VIM_CLEAR(compl_pattern);
VIM_CLEAR(compl_leader);
edit_submode_extra = NULL;
vim_free(compl_orig_text);
compl_orig_text = NULL;
VIM_CLEAR(compl_orig_text);
compl_enter_selects = FALSE;
/* clear v:completed_item */
set_vim_var_dict(VV_COMPLETED_ITEM, dict_alloc());
set_vim_var_dict(VV_COMPLETED_ITEM, dict_alloc_lock(VAR_FIXED));
}
/*
@@ -3553,8 +3552,7 @@ ins_compl_new_leader(void)
{
/* Show the cursor after the match, not after the redrawn text. */
setcursor();
out_flush();
gui_update_cursor(FALSE, FALSE);
out_flush_cursor(FALSE, FALSE);
}
#endif
compl_restarting = TRUE;
@@ -3737,7 +3735,7 @@ ins_compl_prep(int c)
/* Set "compl_get_longest" when finding the first matches. */
if (ctrl_x_mode == CTRL_X_NOT_DEFINED_YET
|| (ctrl_x_mode == 0 && !compl_started))
|| (ctrl_x_mode == CTRL_X_NORMAL && !compl_started))
{
compl_get_longest = (strstr((char *)p_cot, "longest") != NULL);
compl_used_match = TRUE;
@@ -3842,19 +3840,19 @@ ins_compl_prep(int c)
else
compl_cont_mode = CTRL_X_NOT_DEFINED_YET;
}
ctrl_x_mode = 0;
ctrl_x_mode = CTRL_X_NORMAL;
edit_submode = NULL;
showmode();
break;
}
}
else if (ctrl_x_mode != 0)
else if (ctrl_x_mode != CTRL_X_NORMAL)
{
/* We're already in CTRL-X mode, do we stay in it? */
if (!vim_is_ctrl_x_key(c))
{
if (ctrl_x_mode == CTRL_X_SCROLL)
ctrl_x_mode = 0;
ctrl_x_mode = CTRL_X_NORMAL;
else
ctrl_x_mode = CTRL_X_FINISHED;
edit_submode = NULL;
@@ -3868,8 +3866,8 @@ ins_compl_prep(int c)
* 'Pattern not found') until another key is hit, then go back to
* showing what mode we are in. */
showmode();
if ((ctrl_x_mode == 0 && c != Ctrl_N && c != Ctrl_P && c != Ctrl_R
&& !ins_compl_pum_key(c))
if ((ctrl_x_mode == CTRL_X_NORMAL && c != Ctrl_N && c != Ctrl_P
&& c != Ctrl_R && !ins_compl_pum_key(c))
|| ctrl_x_mode == CTRL_X_FINISHED)
{
/* Get here when we have finished typing a sequence of ^N and
@@ -3952,7 +3950,7 @@ ins_compl_prep(int c)
compl_matches = 0;
if (!shortmess(SHM_COMPLETIONMENU))
msg_clr_cmdline(); /* necessary for "noshowmode" */
ctrl_x_mode = 0;
ctrl_x_mode = CTRL_X_NORMAL;
compl_enter_selects = FALSE;
if (edit_submode != NULL)
{
@@ -3973,19 +3971,15 @@ ins_compl_prep(int c)
if (want_cindent && in_cinkeys(KEY_COMPLETE, ' ', inindent(0)))
do_c_expr_indent();
#endif
#ifdef FEAT_AUTOCMD
/* Trigger the CompleteDone event to give scripts a chance to act
* upon the completion. */
apply_autocmds(EVENT_COMPLETEDONE, NULL, NULL, FALSE, curbuf);
#endif
}
}
#ifdef FEAT_AUTOCMD
else if (ctrl_x_mode == CTRL_X_LOCAL_MSG)
/* Trigger the CompleteDone event to give scripts a chance to act
* upon the (possibly failed) completion. */
apply_autocmds(EVENT_COMPLETEDONE, NULL, NULL, FALSE, curbuf);
#endif
/* reset continue_* if we left expansion-mode, if we stay they'll be
* (re)set properly in ins_complete() */
@@ -4219,6 +4213,8 @@ ins_compl_add_tv(typval_T *tv, int dir)
(char_u *)"kind", FALSE);
cptext[CPT_INFO] = get_dict_string(tv->vval.v_dict,
(char_u *)"info", FALSE);
cptext[CPT_USER_DATA] = get_dict_string(tv->vval.v_dict,
(char_u *)"user_data", FALSE);
if (get_dict_string(tv->vval.v_dict, (char_u *)"icase", FALSE) != NULL)
icase = get_dict_number(tv->vval.v_dict, (char_u *)"icase");
if (get_dict_string(tv->vval.v_dict, (char_u *)"dup", FALSE) != NULL)
@@ -4293,7 +4289,8 @@ ins_compl_get_exp(pos_T *ini)
/* For ^N/^P pick a new entry from e_cpt if compl_started is off,
* or if found_all says this entry is done. For ^X^L only use the
* entries from 'complete' that look in loaded buffers. */
if ((ctrl_x_mode == 0 || CTRL_X_MODE_LINE_OR_EVAL(ctrl_x_mode))
if ((ctrl_x_mode == CTRL_X_NORMAL
|| CTRL_X_MODE_LINE_OR_EVAL(ctrl_x_mode))
&& (!compl_started || found_all))
{
found_all = FALSE;
@@ -4305,7 +4302,7 @@ ins_compl_get_exp(pos_T *ini)
first_match_pos = *ini;
/* Move the cursor back one character so that ^N can match the
* word immediately after the cursor. */
if (ctrl_x_mode == 0 && dec(&first_match_pos) < 0)
if (ctrl_x_mode == CTRL_X_NORMAL && dec(&first_match_pos) < 0)
{
/* Move the cursor to after the last character in the
* buffer, so that word at start of buffer is found
@@ -4438,8 +4435,8 @@ ins_compl_get_exp(pos_T *ini)
/* Find up to TAG_MANY matches. Avoids that an enormous number
* of matches is found when compl_pattern is empty */
if (find_tags(compl_pattern, &num_matches, &matches,
TAG_REGEXP | TAG_NAMES | TAG_NOIC |
TAG_INS_COMP | (ctrl_x_mode ? TAG_VERBOSE : 0),
TAG_REGEXP | TAG_NAMES | TAG_NOIC | TAG_INS_COMP
| (ctrl_x_mode != CTRL_X_NORMAL ? TAG_VERBOSE : 0),
TAG_MANY, curbuf->b_ffname) == OK && num_matches > 0)
{
ins_compl_add_matches(num_matches, matches, p_ic);
@@ -4634,8 +4631,10 @@ ins_compl_get_exp(pos_T *ini)
found_new_match = OK;
/* break the loop for specialized modes (use 'complete' just for the
* generic ctrl_x_mode == 0) or when we've found a new match */
if ((ctrl_x_mode != 0 && !CTRL_X_MODE_LINE_OR_EVAL(ctrl_x_mode))
* generic ctrl_x_mode == CTRL_X_NORMAL) or when we've found a new
* match */
if ((ctrl_x_mode != CTRL_X_NORMAL
&& !CTRL_X_MODE_LINE_OR_EVAL(ctrl_x_mode))
|| found_new_match != FAIL)
{
if (got_int)
@@ -4644,7 +4643,8 @@ ins_compl_get_exp(pos_T *ini)
if (type != -1)
ins_compl_check_keys(0, FALSE);
if ((ctrl_x_mode != 0 && !CTRL_X_MODE_LINE_OR_EVAL(ctrl_x_mode))
if ((ctrl_x_mode != CTRL_X_NORMAL
&& !CTRL_X_MODE_LINE_OR_EVAL(ctrl_x_mode))
|| compl_interrupted)
break;
compl_started = TRUE;
@@ -4660,13 +4660,13 @@ ins_compl_get_exp(pos_T *ini)
}
compl_started = TRUE;
if ((ctrl_x_mode == 0 || CTRL_X_MODE_LINE_OR_EVAL(ctrl_x_mode))
if ((ctrl_x_mode == CTRL_X_NORMAL || CTRL_X_MODE_LINE_OR_EVAL(ctrl_x_mode))
&& *e_cpt == NUL) /* Got to end of 'complete' */
found_new_match = FAIL;
i = -1; /* total of matches, unknown */
if (found_new_match == FAIL
|| (ctrl_x_mode != 0 && !CTRL_X_MODE_LINE_OR_EVAL(ctrl_x_mode)))
if (found_new_match == FAIL || (ctrl_x_mode != CTRL_X_NORMAL
&& !CTRL_X_MODE_LINE_OR_EVAL(ctrl_x_mode)))
i = ins_compl_make_cyclic();
if (compl_old_match != NULL)
@@ -4704,7 +4704,7 @@ ins_compl_delete(void)
* flicker, thus we can't do that. */
changed_cline_bef_curs();
/* clear v:completed_item */
set_vim_var_dict(VV_COMPLETED_ITEM, dict_alloc());
set_vim_var_dict(VV_COMPLETED_ITEM, dict_alloc_lock(VAR_FIXED));
}
/*
@@ -4724,7 +4724,7 @@ ins_compl_insert(int in_compl_func)
/* Set completed item. */
/* { word, abbr, menu, kind, info } */
dict = dict_alloc();
dict = dict_alloc_lock(VAR_FIXED);
if (dict != NULL)
{
dict_add_nr_str(dict, "word", 0L,
@@ -4737,6 +4737,8 @@ ins_compl_insert(int in_compl_func)
EMPTY_IF_NULL(compl_shown_match->cp_text[CPT_KIND]));
dict_add_nr_str(dict, "info", 0L,
EMPTY_IF_NULL(compl_shown_match->cp_text[CPT_INFO]));
dict_add_nr_str(dict, "user_data", 0L,
EMPTY_IF_NULL(compl_shown_match->cp_text[CPT_USER_DATA]));
}
set_vim_var_dict(VV_COMPLETED_ITEM, dict);
if (!in_compl_func)
@@ -4936,8 +4938,7 @@ ins_compl_next(
{
/* Show the cursor after the match, not after the redrawn text. */
setcursor();
out_flush();
gui_update_cursor(FALSE, FALSE);
out_flush_cursor(FALSE, FALSE);
}
#endif
@@ -5001,12 +5002,12 @@ ins_compl_next(
ins_compl_check_keys(int frequency, int in_compl_func)
{
static int count = 0;
int c;
int c;
/* Don't check when reading keys from a script. That would break the test
* scripts */
if (using_script())
/* Don't check when reading keys from a script, :normal or feedkeys().
* That would break the test scripts. But do check for keys when called
* from complete_check(). */
if (!in_compl_func && (using_script() || ex_normal_busy))
return;
/* Only do this at regular intervals */
@@ -5168,8 +5169,9 @@ ins_complete(int c, int enable_pum)
* it is a continued search
*/
compl_cont_status &= ~CONT_INTRPT; /* remove INTRPT */
if (ctrl_x_mode == 0 || ctrl_x_mode == CTRL_X_PATH_PATTERNS
|| ctrl_x_mode == CTRL_X_PATH_DEFINES)
if (ctrl_x_mode == CTRL_X_NORMAL
|| ctrl_x_mode == CTRL_X_PATH_PATTERNS
|| ctrl_x_mode == CTRL_X_PATH_DEFINES)
{
if (compl_startpos.lnum != curwin->w_cursor.lnum)
{
@@ -5221,7 +5223,8 @@ ins_complete(int c, int enable_pum)
if (!(compl_cont_status & CONT_ADDING)) /* normal expansion */
{
compl_cont_mode = ctrl_x_mode;
if (ctrl_x_mode != 0) /* Remove LOCAL if ctrl_x_mode != 0 */
if (ctrl_x_mode != CTRL_X_NORMAL)
/* Remove LOCAL if ctrl_x_mode != CTRL_X_NORMAL */
compl_cont_status = 0;
compl_cont_status |= CONT_N_ADDS;
compl_startpos = curwin->w_cursor;
@@ -5230,7 +5233,7 @@ ins_complete(int c, int enable_pum)
}
/* Work out completion pattern and original text -- webb */
if (ctrl_x_mode == 0 || (ctrl_x_mode & CTRL_X_WANT_IDENT))
if (ctrl_x_mode == CTRL_X_NORMAL || (ctrl_x_mode & CTRL_X_WANT_IDENT))
{
if ((compl_cont_status & CONT_SOL)
|| ctrl_x_mode == CTRL_X_PATH_DEFINES)
@@ -5447,7 +5450,7 @@ ins_complete(int c, int enable_pum)
return FAIL;
if (col == -3)
{
ctrl_x_mode = 0;
ctrl_x_mode = CTRL_X_NORMAL;
edit_submode = NULL;
if (!shortmess(SHM_COMPLETIONMENU))
msg_clr_cmdline();
@@ -5547,10 +5550,8 @@ ins_complete(int c, int enable_pum)
if (compl_orig_text == NULL || ins_compl_add(compl_orig_text,
-1, p_ic, NULL, NULL, 0, ORIGINAL_TEXT, FALSE) != OK)
{
vim_free(compl_pattern);
compl_pattern = NULL;
vim_free(compl_orig_text);
compl_orig_text = NULL;
VIM_CLEAR(compl_pattern);
VIM_CLEAR(compl_orig_text);
return FAIL;
}
@@ -5606,7 +5607,7 @@ ins_complete(int c, int enable_pum)
* (such as M in M'exico) if not tried already. -- Acevedo */
if ( compl_length > 1
|| (compl_cont_status & CONT_ADDING)
|| (ctrl_x_mode != 0
|| (ctrl_x_mode != CTRL_X_NORMAL
&& ctrl_x_mode != CTRL_X_PATH_PATTERNS
&& ctrl_x_mode != CTRL_X_PATH_DEFINES))
compl_cont_status &= ~CONT_N_ADDS;
@@ -6189,10 +6190,7 @@ insertchar(
#ifdef FEAT_RIGHTLEFT
&& !p_ri
#endif
#ifdef FEAT_AUTOCMD
&& !has_insertcharpre()
#endif
)
&& !has_insertcharpre())
{
#define INPUT_BUFLEN 100
char_u buf[INPUT_BUFLEN + 1];
@@ -7179,11 +7177,9 @@ set_last_insert(int c)
void
free_last_insert(void)
{
vim_free(last_insert);
last_insert = NULL;
VIM_CLEAR(last_insert);
# ifdef FEAT_INS_EXPAND
vim_free(compl_orig_text);
compl_orig_text = NULL;
VIM_CLEAR(compl_orig_text);
# endif
}
#endif
@@ -7811,8 +7807,7 @@ mb_replace_pop_ins(int cc)
static void
replace_flush(void)
{
vim_free(replace_stack);
replace_stack = NULL;
VIM_CLEAR(replace_stack);
replace_stack_len = 0;
replace_stack_nr = 0;
}
@@ -8372,7 +8367,7 @@ ins_reg(void)
++no_u_sync;
if (regname == '=')
{
# ifdef FEAT_MBYTE
# ifdef HAVE_INPUT_METHOD
int im_on = im_get_status();
# endif
/* Sync undo when evaluating the expression calls setline() or
@@ -8380,7 +8375,7 @@ ins_reg(void)
u_sync_once = 2;
regname = get_expr_register();
# ifdef FEAT_MBYTE
# ifdef HAVE_INPUT_METHOD
/* Restore the Input Method. */
if (im_on)
im_set_active(TRUE);
@@ -8509,12 +8504,12 @@ ins_ctrl_hat(void)
{
curbuf->b_p_iminsert = B_IMODE_LMAP;
State |= LANGMAP;
#ifdef FEAT_MBYTE
#ifdef HAVE_INPUT_METHOD
im_set_active(FALSE);
#endif
}
}
#ifdef FEAT_MBYTE
#ifdef HAVE_INPUT_METHOD
else
{
/* There are no ":lmap" mappings, toggle IM */
@@ -8661,7 +8656,7 @@ ins_esc(
}
}
#ifdef FEAT_MBYTE
#ifdef HAVE_INPUT_METHOD
/* Disable IM to allow typing English directly for Normal mode commands.
* When ":lmap" is enabled don't change 'iminsert' (IM can be enabled as
* well). */
@@ -8811,7 +8806,6 @@ ins_insert(int replaceState)
}
#endif
#ifdef FEAT_AUTOCMD
# ifdef FEAT_EVAL
set_vim_var_string(VV_INSERTMODE,
(char_u *)((State & REPLACE_FLAG) ? "i" :
@@ -8821,7 +8815,6 @@ ins_insert(int replaceState)
"r"), 1);
# endif
apply_autocmds(EVENT_INSERTCHANGE, NULL, NULL, FALSE, curbuf);
#endif
if (State & REPLACE_FLAG)
State = INSERT | (State & LANGMAP);
else
@@ -8914,7 +8907,17 @@ ins_del(void)
|| do_join(2, FALSE, TRUE, FALSE, FALSE) == FAIL)
vim_beep(BO_BS);
else
{
curwin->w_cursor.col = temp;
#ifdef FEAT_VREPLACE
/* Adjust orig_line_count in case more lines have been deleted than
* have been added. That makes sure, that open_line() later
* can access all buffer lines correctly */
if (State & VREPLACE_FLAG &&
orig_line_count > curbuf->b_ml.ml_line_count)
orig_line_count = curbuf->b_ml.ml_line_count;
#endif
}
}
else if (del_char(FALSE) == FAIL) /* delete char under cursor */
vim_beep(BO_BS);
@@ -10541,7 +10544,7 @@ get_nolist_virtcol(void)
return curwin->w_virtcol;
}
#ifdef FEAT_AUTOCMD
#if defined(FEAT_EVAL)
/*
* Handle the InsertCharPre autocommand.
* "c" is the character that was typed.
@@ -10558,11 +10561,11 @@ do_insert_char_pre(int c)
if (!has_insertcharpre())
return NULL;
#ifdef FEAT_MBYTE
# ifdef FEAT_MBYTE
if (has_mbyte)
buf[(*mb_char2bytes)(c, buf)] = NUL;
else
#endif
# endif
{
buf[0] = c;
buf[1] = NUL;

View File

@@ -361,10 +361,7 @@ eval_clear(void)
{
p = &vimvars[i];
if (p->vv_di.di_tv.v_type == VAR_STRING)
{
vim_free(p->vv_str);
p->vv_str = NULL;
}
VIM_CLEAR(p->vv_str);
else if (p->vv_di.di_tv.v_type == VAR_LIST)
{
list_unref(p->vv_list);
@@ -569,14 +566,11 @@ var_redir_stop(void)
}
/* free the collected output */
vim_free(redir_ga.ga_data);
redir_ga.ga_data = NULL;
VIM_CLEAR(redir_ga.ga_data);
vim_free(redir_lval);
redir_lval = NULL;
VIM_CLEAR(redir_lval);
}
vim_free(redir_varname);
redir_varname = NULL;
VIM_CLEAR(redir_varname);
}
# if defined(FEAT_MBYTE) || defined(PROTO)
@@ -1009,10 +1003,7 @@ eval_expr(char_u *arg, char_u **nextcmd)
tv = (typval_T *)alloc(sizeof(typval_T));
if (tv != NULL && eval0(arg, tv, nextcmd, TRUE) == FAIL)
{
vim_free(tv);
tv = NULL;
}
VIM_CLEAR(tv);
return tv;
}
@@ -3213,8 +3204,7 @@ get_user_var_name(expand_T *xp, int idx)
if (vidx < VV_LEN)
return cat_prefix_varname('v', (char_u *)vimvars[vidx++].vv_name);
vim_free(varnamebuf);
varnamebuf = NULL;
VIM_CLEAR(varnamebuf);
varnamebuflen = 0;
return NULL;
}
@@ -3246,22 +3236,6 @@ pattern_match(char_u *pat, char_u *text, int ic)
return matches;
}
/*
* types for expressions.
*/
typedef enum
{
TYPE_UNKNOWN = 0
, TYPE_EQUAL /* == */
, TYPE_NEQUAL /* != */
, TYPE_GREATER /* > */
, TYPE_GEQUAL /* >= */
, TYPE_SMALLER /* < */
, TYPE_SEQUAL /* <= */
, TYPE_MATCH /* =~ */
, TYPE_NOMATCH /* !~ */
} exptype_T;
/*
* The "evaluate" argument: When FALSE, the argument is only parsed but not
* executed. The function may return OK, but the rettv will be of type
@@ -3541,9 +3515,6 @@ eval4(char_u **arg, typval_T *rettv, int evaluate)
exptype_T type = TYPE_UNKNOWN;
int type_is = FALSE; /* TRUE for "is" and "isnot" */
int len = 2;
varnumber_T n1, n2;
char_u *s1, *s2;
char_u buf1[NUMBUFLEN], buf2[NUMBUFLEN];
int ic;
/*
@@ -3625,197 +3596,12 @@ eval4(char_u **arg, typval_T *rettv, int evaluate)
clear_tv(rettv);
return FAIL;
}
if (evaluate)
{
if (type_is && rettv->v_type != var2.v_type)
{
/* For "is" a different type always means FALSE, for "notis"
* it means TRUE. */
n1 = (type == TYPE_NEQUAL);
}
else if (rettv->v_type == VAR_LIST || var2.v_type == VAR_LIST)
{
if (type_is)
{
n1 = (rettv->v_type == var2.v_type
&& rettv->vval.v_list == var2.vval.v_list);
if (type == TYPE_NEQUAL)
n1 = !n1;
}
else if (rettv->v_type != var2.v_type
|| (type != TYPE_EQUAL && type != TYPE_NEQUAL))
{
if (rettv->v_type != var2.v_type)
EMSG(_("E691: Can only compare List with List"));
else
EMSG(_("E692: Invalid operation for List"));
clear_tv(rettv);
clear_tv(&var2);
return FAIL;
}
else
{
/* Compare two Lists for being equal or unequal. */
n1 = list_equal(rettv->vval.v_list, var2.vval.v_list,
ic, FALSE);
if (type == TYPE_NEQUAL)
n1 = !n1;
}
}
int ret = typval_compare(rettv, &var2, type, type_is, ic);
else if (rettv->v_type == VAR_DICT || var2.v_type == VAR_DICT)
{
if (type_is)
{
n1 = (rettv->v_type == var2.v_type
&& rettv->vval.v_dict == var2.vval.v_dict);
if (type == TYPE_NEQUAL)
n1 = !n1;
}
else if (rettv->v_type != var2.v_type
|| (type != TYPE_EQUAL && type != TYPE_NEQUAL))
{
if (rettv->v_type != var2.v_type)
EMSG(_("E735: Can only compare Dictionary with Dictionary"));
else
EMSG(_("E736: Invalid operation for Dictionary"));
clear_tv(rettv);
clear_tv(&var2);
return FAIL;
}
else
{
/* Compare two Dictionaries for being equal or unequal. */
n1 = dict_equal(rettv->vval.v_dict, var2.vval.v_dict,
ic, FALSE);
if (type == TYPE_NEQUAL)
n1 = !n1;
}
}
else if (rettv->v_type == VAR_FUNC || var2.v_type == VAR_FUNC
|| rettv->v_type == VAR_PARTIAL || var2.v_type == VAR_PARTIAL)
{
if (type != TYPE_EQUAL && type != TYPE_NEQUAL)
{
EMSG(_("E694: Invalid operation for Funcrefs"));
clear_tv(rettv);
clear_tv(&var2);
return FAIL;
}
if ((rettv->v_type == VAR_PARTIAL
&& rettv->vval.v_partial == NULL)
|| (var2.v_type == VAR_PARTIAL
&& var2.vval.v_partial == NULL))
/* when a partial is NULL assume not equal */
n1 = FALSE;
else if (type_is)
{
if (rettv->v_type == VAR_FUNC && var2.v_type == VAR_FUNC)
/* strings are considered the same if their value is
* the same */
n1 = tv_equal(rettv, &var2, ic, FALSE);
else if (rettv->v_type == VAR_PARTIAL
&& var2.v_type == VAR_PARTIAL)
n1 = (rettv->vval.v_partial == var2.vval.v_partial);
else
n1 = FALSE;
}
else
n1 = tv_equal(rettv, &var2, ic, FALSE);
if (type == TYPE_NEQUAL)
n1 = !n1;
}
#ifdef FEAT_FLOAT
/*
* If one of the two variables is a float, compare as a float.
* When using "=~" or "!~", always compare as string.
*/
else if ((rettv->v_type == VAR_FLOAT || var2.v_type == VAR_FLOAT)
&& type != TYPE_MATCH && type != TYPE_NOMATCH)
{
float_T f1, f2;
if (rettv->v_type == VAR_FLOAT)
f1 = rettv->vval.v_float;
else
f1 = get_tv_number(rettv);
if (var2.v_type == VAR_FLOAT)
f2 = var2.vval.v_float;
else
f2 = get_tv_number(&var2);
n1 = FALSE;
switch (type)
{
case TYPE_EQUAL: n1 = (f1 == f2); break;
case TYPE_NEQUAL: n1 = (f1 != f2); break;
case TYPE_GREATER: n1 = (f1 > f2); break;
case TYPE_GEQUAL: n1 = (f1 >= f2); break;
case TYPE_SMALLER: n1 = (f1 < f2); break;
case TYPE_SEQUAL: n1 = (f1 <= f2); break;
case TYPE_UNKNOWN:
case TYPE_MATCH:
case TYPE_NOMATCH: break; /* avoid gcc warning */
}
}
#endif
/*
* If one of the two variables is a number, compare as a number.
* When using "=~" or "!~", always compare as string.
*/
else if ((rettv->v_type == VAR_NUMBER || var2.v_type == VAR_NUMBER)
&& type != TYPE_MATCH && type != TYPE_NOMATCH)
{
n1 = get_tv_number(rettv);
n2 = get_tv_number(&var2);
switch (type)
{
case TYPE_EQUAL: n1 = (n1 == n2); break;
case TYPE_NEQUAL: n1 = (n1 != n2); break;
case TYPE_GREATER: n1 = (n1 > n2); break;
case TYPE_GEQUAL: n1 = (n1 >= n2); break;
case TYPE_SMALLER: n1 = (n1 < n2); break;
case TYPE_SEQUAL: n1 = (n1 <= n2); break;
case TYPE_UNKNOWN:
case TYPE_MATCH:
case TYPE_NOMATCH: break; /* avoid gcc warning */
}
}
else
{
s1 = get_tv_string_buf(rettv, buf1);
s2 = get_tv_string_buf(&var2, buf2);
if (type != TYPE_MATCH && type != TYPE_NOMATCH)
i = ic ? MB_STRICMP(s1, s2) : STRCMP(s1, s2);
else
i = 0;
n1 = FALSE;
switch (type)
{
case TYPE_EQUAL: n1 = (i == 0); break;
case TYPE_NEQUAL: n1 = (i != 0); break;
case TYPE_GREATER: n1 = (i > 0); break;
case TYPE_GEQUAL: n1 = (i >= 0); break;
case TYPE_SMALLER: n1 = (i < 0); break;
case TYPE_SEQUAL: n1 = (i <= 0); break;
case TYPE_MATCH:
case TYPE_NOMATCH:
n1 = pattern_match(s2, s1, ic);
if (type == TYPE_NOMATCH)
n1 = !n1;
break;
case TYPE_UNKNOWN: break; /* avoid gcc warning */
}
}
clear_tv(rettv);
clear_tv(&var2);
rettv->v_type = VAR_NUMBER;
rettv->vval.v_number = n1;
return ret;
}
}
@@ -5339,11 +5125,9 @@ garbage_collect(int testing)
FOR_ALL_TAB_WINDOWS(tp, wp)
abort = abort || set_ref_in_item(&wp->w_winvar.di_tv, copyID,
NULL, NULL);
#ifdef FEAT_AUTOCMD
if (aucmd_win != NULL)
abort = abort || set_ref_in_item(&aucmd_win->w_winvar.di_tv, copyID,
NULL, NULL);
#endif
/* tabpage-local variables */
FOR_ALL_TABPAGES(tp)
@@ -6096,10 +5880,7 @@ get_env_tv(char_u **arg, typval_T *rettv, int evaluate)
/* next try expanding things like $VIM and ${HOME} */
string = expand_env_save(name - 1);
if (string != NULL && *string == '$')
{
vim_free(string);
string = NULL;
}
VIM_CLEAR(string);
}
name[len] = cc;
@@ -6777,7 +6558,6 @@ v_throwpoint(char_u *oldval)
return NULL;
}
#if defined(FEAT_AUTOCMD) || defined(PROTO)
/*
* Set v:cmdarg.
* If "eap" != NULL, use "eap" to generate the value and return the old value.
@@ -6835,7 +6615,7 @@ set_cmdarg(exarg_T *eap, char_u *oldarg)
if (eap->force_ff != 0)
sprintf((char *)newval + STRLEN(newval), " ++ff=%s",
eap->cmd + eap->force_ff);
# ifdef FEAT_MBYTE
#ifdef FEAT_MBYTE
if (eap->force_enc != 0)
sprintf((char *)newval + STRLEN(newval), " ++enc=%s",
eap->cmd + eap->force_enc);
@@ -6845,15 +6625,14 @@ set_cmdarg(exarg_T *eap, char_u *oldarg)
STRCPY(newval + STRLEN(newval), " ++bad=drop");
else if (eap->bad_char != 0)
sprintf((char *)newval + STRLEN(newval), " ++bad=%c", eap->bad_char);
# endif
#endif
vimvars[VV_CMDARG].vv_str = newval;
return oldval;
}
#endif
/*
* Get the value of internal variable "name".
* Return OK or FAIL.
* Return OK or FAIL. If OK is returned "rettv" must be cleared.
*/
int
get_var_tv(
@@ -7116,8 +6895,7 @@ clear_tv(typval_T *varp)
func_unref(varp->vval.v_string);
/* FALLTHROUGH */
case VAR_STRING:
vim_free(varp->vval.v_string);
varp->vval.v_string = NULL;
VIM_CLEAR(varp->vval.v_string);
break;
case VAR_PARTIAL:
partial_unref(varp->vval.v_partial);
@@ -8433,7 +8211,7 @@ ex_execute(exarg_T *eap)
win_T *
find_win_by_nr(
typval_T *vp,
tabpage_T *tp UNUSED) /* NULL for current tab page */
tabpage_T *tp) /* NULL for current tab page */
{
win_T *wp;
int nr;
@@ -9051,6 +8829,75 @@ assert_equal_common(typval_T *argvars, assert_type_T atype)
}
}
void
assert_equalfile(typval_T *argvars)
{
char_u buf1[NUMBUFLEN];
char_u buf2[NUMBUFLEN];
char_u *fname1 = get_tv_string_buf_chk(&argvars[0], buf1);
char_u *fname2 = get_tv_string_buf_chk(&argvars[1], buf2);
garray_T ga;
FILE *fd1;
FILE *fd2;
if (fname1 == NULL || fname2 == NULL)
return;
IObuff[0] = NUL;
fd1 = mch_fopen((char *)fname1, READBIN);
if (fd1 == NULL)
{
vim_snprintf((char *)IObuff, IOSIZE, (char *)e_notread, fname1);
}
else
{
fd2 = mch_fopen((char *)fname2, READBIN);
if (fd2 == NULL)
{
fclose(fd1);
vim_snprintf((char *)IObuff, IOSIZE, (char *)e_notread, fname2);
}
else
{
int c1, c2;
long count = 0;
for (;;)
{
c1 = fgetc(fd1);
c2 = fgetc(fd2);
if (c1 == EOF)
{
if (c2 != EOF)
STRCPY(IObuff, "first file is shorter");
break;
}
else if (c2 == EOF)
{
STRCPY(IObuff, "second file is shorter");
break;
}
else if (c1 != c2)
{
vim_snprintf((char *)IObuff, IOSIZE,
"difference at byte %ld", count);
break;
}
++count;
}
fclose(fd1);
fclose(fd2);
}
}
if (IObuff[0] != NUL)
{
prepare_assert_error(&ga);
ga_concat(&ga, IObuff);
assert_error(&ga);
ga_clear(&ga);
}
}
void
assert_match_common(typval_T *argvars, assert_type_T atype)
{
@@ -9165,6 +9012,29 @@ assert_exception(typval_T *argvars)
}
}
void
assert_beeps(typval_T *argvars)
{
char_u *cmd = get_tv_string_chk(&argvars[0]);
garray_T ga;
called_vim_beep = FALSE;
suppress_errthrow = TRUE;
emsg_silent = FALSE;
do_cmdline_cmd(cmd);
if (!called_vim_beep)
{
prepare_assert_error(&ga);
ga_concat(&ga, (char_u *)"command did not beep: ");
ga_concat(&ga, cmd);
assert_error(&ga);
ga_clear(&ga);
}
suppress_errthrow = FALSE;
emsg_on_display = FALSE;
}
void
assert_fails(typval_T *argvars)
{
@@ -9292,6 +9162,258 @@ fill_assert_error(
}
}
/*
* Compare "typ1" and "typ2". Put the result in "typ1".
*/
int
typval_compare(
typval_T *typ1, /* first operand */
typval_T *typ2, /* second operand */
exptype_T type, /* operator */
int type_is, /* TRUE for "is" and "isnot" */
int ic) /* ignore case */
{
int i;
varnumber_T n1, n2;
char_u *s1, *s2;
char_u buf1[NUMBUFLEN], buf2[NUMBUFLEN];
if (type_is && typ1->v_type != typ2->v_type)
{
/* For "is" a different type always means FALSE, for "notis"
* it means TRUE. */
n1 = (type == TYPE_NEQUAL);
}
else if (typ1->v_type == VAR_LIST || typ2->v_type == VAR_LIST)
{
if (type_is)
{
n1 = (typ1->v_type == typ2->v_type
&& typ1->vval.v_list == typ2->vval.v_list);
if (type == TYPE_NEQUAL)
n1 = !n1;
}
else if (typ1->v_type != typ2->v_type
|| (type != TYPE_EQUAL && type != TYPE_NEQUAL))
{
if (typ1->v_type != typ2->v_type)
EMSG(_("E691: Can only compare List with List"));
else
EMSG(_("E692: Invalid operation for List"));
clear_tv(typ1);
return FAIL;
}
else
{
/* Compare two Lists for being equal or unequal. */
n1 = list_equal(typ1->vval.v_list, typ2->vval.v_list,
ic, FALSE);
if (type == TYPE_NEQUAL)
n1 = !n1;
}
}
else if (typ1->v_type == VAR_DICT || typ2->v_type == VAR_DICT)
{
if (type_is)
{
n1 = (typ1->v_type == typ2->v_type
&& typ1->vval.v_dict == typ2->vval.v_dict);
if (type == TYPE_NEQUAL)
n1 = !n1;
}
else if (typ1->v_type != typ2->v_type
|| (type != TYPE_EQUAL && type != TYPE_NEQUAL))
{
if (typ1->v_type != typ2->v_type)
EMSG(_("E735: Can only compare Dictionary with Dictionary"));
else
EMSG(_("E736: Invalid operation for Dictionary"));
clear_tv(typ1);
return FAIL;
}
else
{
/* Compare two Dictionaries for being equal or unequal. */
n1 = dict_equal(typ1->vval.v_dict, typ2->vval.v_dict,
ic, FALSE);
if (type == TYPE_NEQUAL)
n1 = !n1;
}
}
else if (typ1->v_type == VAR_FUNC || typ2->v_type == VAR_FUNC
|| typ1->v_type == VAR_PARTIAL || typ2->v_type == VAR_PARTIAL)
{
if (type != TYPE_EQUAL && type != TYPE_NEQUAL)
{
EMSG(_("E694: Invalid operation for Funcrefs"));
clear_tv(typ1);
return FAIL;
}
if ((typ1->v_type == VAR_PARTIAL
&& typ1->vval.v_partial == NULL)
|| (typ2->v_type == VAR_PARTIAL
&& typ2->vval.v_partial == NULL))
/* when a partial is NULL assume not equal */
n1 = FALSE;
else if (type_is)
{
if (typ1->v_type == VAR_FUNC && typ2->v_type == VAR_FUNC)
/* strings are considered the same if their value is
* the same */
n1 = tv_equal(typ1, typ2, ic, FALSE);
else if (typ1->v_type == VAR_PARTIAL
&& typ2->v_type == VAR_PARTIAL)
n1 = (typ1->vval.v_partial == typ2->vval.v_partial);
else
n1 = FALSE;
}
else
n1 = tv_equal(typ1, typ2, ic, FALSE);
if (type == TYPE_NEQUAL)
n1 = !n1;
}
#ifdef FEAT_FLOAT
/*
* If one of the two variables is a float, compare as a float.
* When using "=~" or "!~", always compare as string.
*/
else if ((typ1->v_type == VAR_FLOAT || typ2->v_type == VAR_FLOAT)
&& type != TYPE_MATCH && type != TYPE_NOMATCH)
{
float_T f1, f2;
if (typ1->v_type == VAR_FLOAT)
f1 = typ1->vval.v_float;
else
f1 = get_tv_number(typ1);
if (typ2->v_type == VAR_FLOAT)
f2 = typ2->vval.v_float;
else
f2 = get_tv_number(typ2);
n1 = FALSE;
switch (type)
{
case TYPE_EQUAL: n1 = (f1 == f2); break;
case TYPE_NEQUAL: n1 = (f1 != f2); break;
case TYPE_GREATER: n1 = (f1 > f2); break;
case TYPE_GEQUAL: n1 = (f1 >= f2); break;
case TYPE_SMALLER: n1 = (f1 < f2); break;
case TYPE_SEQUAL: n1 = (f1 <= f2); break;
case TYPE_UNKNOWN:
case TYPE_MATCH:
case TYPE_NOMATCH: break; /* avoid gcc warning */
}
}
#endif
/*
* If one of the two variables is a number, compare as a number.
* When using "=~" or "!~", always compare as string.
*/
else if ((typ1->v_type == VAR_NUMBER || typ2->v_type == VAR_NUMBER)
&& type != TYPE_MATCH && type != TYPE_NOMATCH)
{
n1 = get_tv_number(typ1);
n2 = get_tv_number(typ2);
switch (type)
{
case TYPE_EQUAL: n1 = (n1 == n2); break;
case TYPE_NEQUAL: n1 = (n1 != n2); break;
case TYPE_GREATER: n1 = (n1 > n2); break;
case TYPE_GEQUAL: n1 = (n1 >= n2); break;
case TYPE_SMALLER: n1 = (n1 < n2); break;
case TYPE_SEQUAL: n1 = (n1 <= n2); break;
case TYPE_UNKNOWN:
case TYPE_MATCH:
case TYPE_NOMATCH: break; /* avoid gcc warning */
}
}
else
{
s1 = get_tv_string_buf(typ1, buf1);
s2 = get_tv_string_buf(typ2, buf2);
if (type != TYPE_MATCH && type != TYPE_NOMATCH)
i = ic ? MB_STRICMP(s1, s2) : STRCMP(s1, s2);
else
i = 0;
n1 = FALSE;
switch (type)
{
case TYPE_EQUAL: n1 = (i == 0); break;
case TYPE_NEQUAL: n1 = (i != 0); break;
case TYPE_GREATER: n1 = (i > 0); break;
case TYPE_GEQUAL: n1 = (i >= 0); break;
case TYPE_SMALLER: n1 = (i < 0); break;
case TYPE_SEQUAL: n1 = (i <= 0); break;
case TYPE_MATCH:
case TYPE_NOMATCH:
n1 = pattern_match(s2, s1, ic);
if (type == TYPE_NOMATCH)
n1 = !n1;
break;
case TYPE_UNKNOWN: break; /* avoid gcc warning */
}
}
clear_tv(typ1);
typ1->v_type = VAR_NUMBER;
typ1->vval.v_number = n1;
return OK;
}
char_u *
typval_tostring(arg)
typval_T *arg;
{
char_u *tofree;
char_u numbuf[NUMBUFLEN];
char_u *ret = NULL;
if (arg == NULL)
return vim_strsave((char_u *)"(does not exist)");
ret = tv2string(arg, &tofree, numbuf, 0);
/* Make a copy if we have a value but it's not in allocated memory. */
if (ret != NULL && tofree == NULL)
ret = vim_strsave(ret);
return ret;
}
int
var_exists(char_u *var)
{
char_u *name;
char_u *tofree;
typval_T tv;
int len = 0;
int n = FALSE;
/* get_name_len() takes care of expanding curly braces */
name = var;
len = get_name_len(&var, &tofree, TRUE, FALSE);
if (len > 0)
{
if (tofree != NULL)
name = tofree;
n = (get_var_tv(name, len, &tv, NULL, FALSE, TRUE) == OK);
if (n)
{
/* handle d.key, l[idx], f(expr) */
n = (handle_subscript(&var, &tv, TRUE, FALSE) == OK);
if (n)
clear_tv(&tv);
}
}
if (*var != NUL)
n = FALSE;
vim_free(tofree);
return n;
}
#endif /* FEAT_EVAL */

View File

@@ -44,7 +44,9 @@ static void f_argc(typval_T *argvars, typval_T *rettv);
static void f_argidx(typval_T *argvars, typval_T *rettv);
static void f_arglistid(typval_T *argvars, typval_T *rettv);
static void f_argv(typval_T *argvars, typval_T *rettv);
static void f_assert_beeps(typval_T *argvars, typval_T *rettv);
static void f_assert_equal(typval_T *argvars, typval_T *rettv);
static void f_assert_equalfile(typval_T *argvars, typval_T *rettv);
static void f_assert_exception(typval_T *argvars, typval_T *rettv);
static void f_assert_fails(typval_T *argvars, typval_T *rettv);
static void f_assert_false(typval_T *argvars, typval_T *rettv);
@@ -164,6 +166,7 @@ static void f_get(typval_T *argvars, typval_T *rettv);
static void f_getbufinfo(typval_T *argvars, typval_T *rettv);
static void f_getbufline(typval_T *argvars, typval_T *rettv);
static void f_getbufvar(typval_T *argvars, typval_T *rettv);
static void f_getchangelist(typval_T *argvars, typval_T *rettv);
static void f_getchar(typval_T *argvars, typval_T *rettv);
static void f_getcharmod(typval_T *argvars, typval_T *rettv);
static void f_getcharsearch(typval_T *argvars, typval_T *rettv);
@@ -180,6 +183,7 @@ static void f_getfperm(typval_T *argvars, typval_T *rettv);
static void f_getfsize(typval_T *argvars, typval_T *rettv);
static void f_getftime(typval_T *argvars, typval_T *rettv);
static void f_getftype(typval_T *argvars, typval_T *rettv);
static void f_getjumplist(typval_T *argvars, typval_T *rettv);
static void f_getline(typval_T *argvars, typval_T *rettv);
static void f_getloclist(typval_T *argvars UNUSED, typval_T *rettv UNUSED);
static void f_getmatches(typval_T *argvars, typval_T *rettv);
@@ -193,6 +197,7 @@ static void f_gettabinfo(typval_T *argvars, typval_T *rettv);
static void f_gettabvar(typval_T *argvars, typval_T *rettv);
static void f_gettabwinvar(typval_T *argvars, typval_T *rettv);
static void f_getwininfo(typval_T *argvars, typval_T *rettv);
static void f_getwinpos(typval_T *argvars, typval_T *rettv);
static void f_getwinposx(typval_T *argvars, typval_T *rettv);
static void f_getwinposy(typval_T *argvars, typval_T *rettv);
static void f_getwinvar(typval_T *argvars, typval_T *rettv);
@@ -425,6 +430,7 @@ static void f_timer_stopall(typval_T *argvars, typval_T *rettv);
static void f_tolower(typval_T *argvars, typval_T *rettv);
static void f_toupper(typval_T *argvars, typval_T *rettv);
static void f_tr(typval_T *argvars, typval_T *rettv);
static void f_trim(typval_T *argvars, typval_T *rettv);
#ifdef FEAT_FLOAT
static void f_trunc(typval_T *argvars, typval_T *rettv);
#endif
@@ -482,7 +488,9 @@ static struct fst
#ifdef FEAT_FLOAT
{"asin", 1, 1, f_asin}, /* WJMc */
#endif
{"assert_beeps", 1, 2, f_assert_beeps},
{"assert_equal", 2, 3, f_assert_equal},
{"assert_equalfile", 2, 2, f_assert_equalfile},
{"assert_exception", 1, 2, f_assert_exception},
{"assert_fails", 1, 2, f_assert_fails},
{"assert_false", 1, 2, f_assert_false},
@@ -604,6 +612,7 @@ static struct fst
{"getbufinfo", 0, 1, f_getbufinfo},
{"getbufline", 2, 3, f_getbufline},
{"getbufvar", 2, 3, f_getbufvar},
{"getchangelist", 1, 1, f_getchangelist},
{"getchar", 0, 1, f_getchar},
{"getcharmod", 0, 0, f_getcharmod},
{"getcharsearch", 0, 0, f_getcharsearch},
@@ -621,6 +630,7 @@ static struct fst
{"getfsize", 1, 1, f_getfsize},
{"getftime", 1, 1, f_getftime},
{"getftype", 1, 1, f_getftype},
{"getjumplist", 0, 2, f_getjumplist},
{"getline", 1, 2, f_getline},
{"getloclist", 1, 2, f_getloclist},
{"getmatches", 0, 0, f_getmatches},
@@ -633,6 +643,7 @@ static struct fst
{"gettabvar", 2, 3, f_gettabvar},
{"gettabwinvar", 3, 4, f_gettabwinvar},
{"getwininfo", 0, 1, f_getwininfo},
{"getwinpos", 0, 1, f_getwinpos},
{"getwinposx", 0, 0, f_getwinposx},
{"getwinposy", 0, 0, f_getwinposy},
{"getwinvar", 2, 3, f_getwinvar},
@@ -730,7 +741,7 @@ static struct fst
{"pow", 2, 2, f_pow},
#endif
{"prevnonblank", 1, 1, f_prevnonblank},
{"printf", 2, 19, f_printf},
{"printf", 1, 19, f_printf},
{"pumvisible", 0, 0, f_pumvisible},
#ifdef FEAT_PYTHON3
{"py3eval", 1, 1, f_py3eval},
@@ -841,6 +852,9 @@ static struct fst
#endif
{"tempname", 0, 0, f_tempname},
#ifdef FEAT_TERMINAL
{"term_dumpdiff", 2, 3, f_term_dumpdiff},
{"term_dumpload", 1, 2, f_term_dumpload},
{"term_dumpwrite", 2, 3, f_term_dumpwrite},
{"term_getaltscreen", 1, 1, f_term_getaltscreen},
{"term_getattr", 2, 2, f_term_getattr},
{"term_getcursor", 1, 1, f_term_getcursor},
@@ -854,6 +868,8 @@ static struct fst
{"term_list", 0, 0, f_term_list},
{"term_scrape", 2, 2, f_term_scrape},
{"term_sendkeys", 2, 2, f_term_sendkeys},
{"term_setkill", 2, 2, f_term_setkill},
{"term_setrestore", 2, 2, f_term_setrestore},
{"term_start", 1, 2, f_term_start},
{"term_wait", 1, 2, f_term_wait},
#endif
@@ -884,6 +900,7 @@ static struct fst
{"tolower", 1, 1, f_tolower},
{"toupper", 1, 1, f_toupper},
{"tr", 3, 3, f_tr},
{"trim", 1, 2, f_trim},
#ifdef FEAT_FLOAT
{"trunc", 1, 1, f_trunc},
#endif
@@ -1272,6 +1289,15 @@ f_argv(typval_T *argvars, typval_T *rettv)
alist_name(&ARGLIST[idx]), -1);
}
/*
* "assert_beeps(cmd [, error])" function
*/
static void
f_assert_beeps(typval_T *argvars, typval_T *rettv UNUSED)
{
assert_beeps(argvars);
}
/*
* "assert_equal(expected, actual[, msg])" function
*/
@@ -1281,6 +1307,15 @@ f_assert_equal(typval_T *argvars, typval_T *rettv UNUSED)
assert_equal_common(argvars, ASSERT_EQUAL);
}
/*
* "assert_equalfile(fname-one, fname-two)" function
*/
static void
f_assert_equalfile(typval_T *argvars, typval_T *rettv UNUSED)
{
assert_equalfile(argvars);
}
/*
* "assert_notequal(expected, actual[, msg])" function
*/
@@ -1447,6 +1482,8 @@ f_balloon_split(typval_T *argvars, typval_T *rettv UNUSED)
/* Skip the first and last item, they are always empty. */
for (i = 1; i < size - 1; ++i)
list_append_string(rettv->vval.v_list, array[i].pum_text, -1);
while (size > 0)
vim_free(array[--size].pum_text);
vim_free(array);
}
}
@@ -2635,9 +2672,7 @@ f_delete(typval_T *argvars, typval_T *rettv)
static void
f_did_filetype(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
{
#ifdef FEAT_AUTOCMD
rettv->vval.v_number = did_filetype;
#endif
}
/*
@@ -2987,9 +3022,7 @@ f_exepath(typval_T *argvars, typval_T *rettv)
f_exists(typval_T *argvars, typval_T *rettv)
{
char_u *p;
char_u *name;
int n = FALSE;
int len = 0;
p = get_tv_string(&argvars[0]);
if (*p == '$') /* environment variable */
@@ -3022,38 +3055,14 @@ f_exists(typval_T *argvars, typval_T *rettv)
}
else if (*p == '#')
{
#ifdef FEAT_AUTOCMD
if (p[1] == '#')
n = autocmd_supported(p + 2);
else
n = au_exists(p + 1);
#endif
}
else /* internal variable */
{
char_u *tofree;
typval_T tv;
/* get_name_len() takes care of expanding curly braces */
name = p;
len = get_name_len(&p, &tofree, TRUE, FALSE);
if (len > 0)
{
if (tofree != NULL)
name = tofree;
n = (get_var_tv(name, len, &tv, NULL, FALSE, TRUE) == OK);
if (n)
{
/* handle d.key, l[idx], f(expr) */
n = (handle_subscript(&p, &tv, TRUE, FALSE) == OK);
if (n)
clear_tv(&tv);
}
}
if (*p != NUL)
n = FALSE;
vim_free(tofree);
n = var_exists(p);
}
rettv->vval.v_number = n;
@@ -4355,6 +4364,61 @@ f_getbufvar(typval_T *argvars, typval_T *rettv)
--emsg_off;
}
/*
* "getchangelist()" function
*/
static void
f_getchangelist(typval_T *argvars, typval_T *rettv)
{
#ifdef FEAT_JUMPLIST
buf_T *buf;
int i;
list_T *l;
dict_T *d;
#endif
if (rettv_list_alloc(rettv) != OK)
return;
#ifdef FEAT_JUMPLIST
(void)get_tv_number(&argvars[0]); /* issue errmsg if type error */
++emsg_off;
buf = get_buf_tv(&argvars[0], FALSE);
--emsg_off;
if (buf == NULL)
return;
l = list_alloc();
if (l == NULL)
return;
if (list_append_list(rettv->vval.v_list, l) == FAIL)
return;
/*
* The current window change list index tracks only the position in the
* current buffer change list. For other buffers, use the change list
* length as the current index.
*/
list_append_number(rettv->vval.v_list,
(varnumber_T)((buf == curwin->w_buffer)
? curwin->w_changelistidx : buf->b_changelistlen));
for (i = 0; i < buf->b_changelistlen; ++i)
{
if (buf->b_changelist[i].lnum == 0)
continue;
if ((d = dict_alloc()) == NULL)
return;
if (list_append_dict(l, d) == FAIL)
return;
dict_add_nr_str(d, "lnum", (long)buf->b_changelist[i].lnum, NULL);
dict_add_nr_str(d, "col", (long)buf->b_changelist[i].col, NULL);
# ifdef FEAT_VIRTUALEDIT
dict_add_nr_str(d, "coladd", (long)buf->b_changelist[i].coladd, NULL);
# endif
}
#endif
}
/*
* "getchar()" function
*/
@@ -4613,16 +4677,21 @@ f_getcwd(typval_T *argvars, typval_T *rettv)
{
win_T *wp = NULL;
char_u *cwd;
int global = FALSE;
rettv->v_type = VAR_STRING;
rettv->vval.v_string = NULL;
wp = find_tabwin(&argvars[0], &argvars[1]);
if (wp != NULL)
if (argvars[0].v_type == VAR_NUMBER && argvars[0].vval.v_number == -1)
global = TRUE;
else
wp = find_tabwin(&argvars[0], &argvars[1]);
if (wp != NULL && wp->w_localdir != NULL)
rettv->vval.v_string = vim_strsave(wp->w_localdir);
else if (wp != NULL || global)
{
if (wp->w_localdir != NULL)
rettv->vval.v_string = vim_strsave(wp->w_localdir);
else if (globaldir != NULL)
if (globaldir != NULL)
rettv->vval.v_string = vim_strsave(globaldir);
else
{
@@ -4833,6 +4902,60 @@ f_getftype(typval_T *argvars, typval_T *rettv)
rettv->vval.v_string = type;
}
/*
* "getjumplist()" function
*/
static void
f_getjumplist(typval_T *argvars, typval_T *rettv)
{
#ifdef FEAT_JUMPLIST
win_T *wp;
int i;
list_T *l;
dict_T *d;
#endif
if (rettv_list_alloc(rettv) != OK)
return;
#ifdef FEAT_JUMPLIST
wp = find_tabwin(&argvars[0], &argvars[1]);
if (wp == NULL)
return;
l = list_alloc();
if (l == NULL)
return;
if (list_append_list(rettv->vval.v_list, l) == FAIL)
return;
list_append_number(rettv->vval.v_list, (varnumber_T)wp->w_jumplistidx);
cleanup_jumplist(wp, TRUE);
for (i = 0; i < wp->w_jumplistlen; ++i)
{
if (wp->w_jumplist[i].fmark.mark.lnum == 0)
continue;
if ((d = dict_alloc()) == NULL)
return;
if (list_append_dict(l, d) == FAIL)
return;
dict_add_nr_str(d, "lnum", (long)wp->w_jumplist[i].fmark.mark.lnum,
NULL);
dict_add_nr_str(d, "col", (long)wp->w_jumplist[i].fmark.mark.col,
NULL);
# ifdef FEAT_VIRTUALEDIT
dict_add_nr_str(d, "coladd", (long)wp->w_jumplist[i].fmark.mark.coladd,
NULL);
# endif
dict_add_nr_str(d, "bufnr", (long)wp->w_jumplist[i].fmark.fnum, NULL);
if (wp->w_jumplist[i].fname != NULL)
dict_add_nr_str(d, "filename", 0L, wp->w_jumplist[i].fname);
}
#endif
}
/*
* "getline(lnum, [end])" function
*/
@@ -5405,6 +5528,38 @@ f_win_screenpos(typval_T *argvars, typval_T *rettv)
list_append_number(rettv->vval.v_list, wp == NULL ? 0 : wp->w_wincol + 1);
}
/*
* "getwinpos({timeout})" function
*/
static void
f_getwinpos(typval_T *argvars UNUSED, typval_T *rettv)
{
int x = -1;
int y = -1;
if (rettv_list_alloc(rettv) == FAIL)
return;
#ifdef FEAT_GUI
if (gui.in_use)
(void)gui_mch_get_winpos(&x, &y);
# if defined(HAVE_TGETENT) && defined(FEAT_TERMRESPONSE)
else
# endif
#endif
#if defined(HAVE_TGETENT) && defined(FEAT_TERMRESPONSE)
{
varnumber_T timeout = 100;
if (argvars[0].v_type != VAR_UNKNOWN)
timeout = get_tv_number(&argvars[0]);
term_get_winpos(&x, &y, timeout);
}
#endif
list_append_number(rettv->vval.v_list, (varnumber_T)x);
list_append_number(rettv->vval.v_list, (varnumber_T)y);
}
/*
* "getwinposx()" function
*/
@@ -5426,7 +5581,7 @@ f_getwinposx(typval_T *argvars UNUSED, typval_T *rettv)
{
int x, y;
if (term_get_winpos(&x, &y) == OK)
if (term_get_winpos(&x, &y, (varnumber_T)100) == OK)
rettv->vval.v_number = x;
}
#endif
@@ -5453,7 +5608,7 @@ f_getwinposy(typval_T *argvars UNUSED, typval_T *rettv)
{
int x, y;
if (term_get_winpos(&x, &y) == OK)
if (term_get_winpos(&x, &y, (varnumber_T)100) == OK)
rettv->vval.v_number = y;
}
#endif
@@ -5605,11 +5760,11 @@ f_has(typval_T *argvars, typval_T *rettv)
"beos",
#endif
#ifdef MACOS_X
"mac", /* Mac OS X (and, once, Mac OS Classic) */
"osx", /* Mac OS X */
"mac", /* Mac OS X (and, once, Mac OS Classic) */
"osx", /* Mac OS X */
# ifdef MACOS_X_DARWIN
"macunix", /* Mac OS X, with the darwin feature */
"osxdarwin", /* synonym for macunix */
"macunix", /* Mac OS X, with the darwin feature */
"osxdarwin", /* synonym for macunix */
# endif
#endif
#ifdef __QNX__
@@ -5642,9 +5797,7 @@ f_has(typval_T *argvars, typval_T *rettv)
#ifdef FEAT_ARABIC
"arabic",
#endif
#ifdef FEAT_AUTOCMD
"autocmd",
#endif
#ifdef FEAT_AUTOSERVERNAME
"autoservername",
#endif
@@ -5703,9 +5856,7 @@ f_has(typval_T *argvars, typval_T *rettv)
#ifdef FEAT_CSCOPE
"cscope",
#endif
#ifdef FEAT_CURSORBIND
"cursorbind",
#endif
#ifdef CURSOR_SHAPE
"cursorshape",
#endif
@@ -5829,9 +5980,7 @@ f_has(typval_T *argvars, typval_T *rettv)
#ifdef FEAT_LISP
"lispindent",
#endif
#ifdef FEAT_LISTCMDS
"listcmds",
#endif
#ifdef FEAT_LOCALMAP
"localmap",
#endif
@@ -5955,9 +6104,7 @@ f_has(typval_T *argvars, typval_T *rettv)
#if defined(FEAT_RUBY) && !defined(DYNAMIC_RUBY)
"ruby",
#endif
#ifdef FEAT_SCROLLBIND
"scrollbind",
#endif
#ifdef FEAT_CMDL_INFO
"showcmd",
"cmdline_info",
@@ -6051,6 +6198,9 @@ f_has(typval_T *argvars, typval_T *rettv)
#ifdef FEAT_VREPLACE
"vreplace",
#endif
#ifdef FEAT_VTP
"vtp",
#endif
#ifdef FEAT_WILDIGN
"wildignore",
#endif
@@ -6202,9 +6352,9 @@ f_has(typval_T *argvars, typval_T *rettv)
else if (STRICMP(name, "syntax_items") == 0)
n = syntax_present(curwin);
#endif
#if defined(WIN3264)
else if (STRICMP(name, "win95") == 0)
n = FALSE; /* Win9x is no more supported. */
#ifdef FEAT_VTP
else if (STRICMP(name, "vcon") == 0)
n = has_vtp_working();
#endif
#ifdef FEAT_NETBEANS_INTG
else if (STRICMP(name, "netbeans_enabled") == 0)
@@ -6882,7 +7032,7 @@ f_job_start(typval_T *argvars, typval_T *rettv)
rettv->v_type = VAR_JOB;
if (check_restricted() || check_secure())
return;
rettv->vval.v_job = job_start(argvars, NULL);
rettv->vval.v_job = job_start(argvars, NULL, NULL);
}
/*
@@ -7977,7 +8127,7 @@ f_mode(typval_T *argvars, typval_T *rettv)
#ifdef FEAT_INS_EXPAND
if (ins_compl_active())
buf[1] = 'c';
else if (ctrl_x_mode == 1)
else if (ctrl_x_mode_not_defined_yet())
buf[1] = 'x';
#endif
}
@@ -9215,10 +9365,7 @@ f_resolve(typval_T *argvars, typval_T *rettv)
if (*q != NUL)
STRMOVE(remain, q - 1);
else
{
vim_free(remain);
remain = NULL;
}
VIM_CLEAR(remain);
}
/* If the result is a relative path name, make it explicitly relative to
@@ -13056,6 +13203,72 @@ error:
rettv->vval.v_string = ga.ga_data;
}
/*
* "trim({expr})" function
*/
static void
f_trim(typval_T *argvars, typval_T *rettv)
{
char_u buf1[NUMBUFLEN];
char_u buf2[NUMBUFLEN];
char_u *head = get_tv_string_buf_chk(&argvars[0], buf1);
char_u *mask = NULL;
char_u *tail;
char_u *prev;
char_u *p;
int c1;
rettv->v_type = VAR_STRING;
if (head == NULL)
{
rettv->vval.v_string = NULL;
return;
}
if (argvars[1].v_type == VAR_STRING)
mask = get_tv_string_buf_chk(&argvars[1], buf2);
while (*head != NUL)
{
c1 = PTR2CHAR(head);
if (mask == NULL)
{
if (c1 > ' ' && c1 != 0xa0)
break;
}
else
{
for (p = mask; *p != NUL; MB_PTR_ADV(p))
if (c1 == PTR2CHAR(p))
break;
if (*p == NUL)
break;
}
MB_PTR_ADV(head);
}
for (tail = head + STRLEN(head); tail > head; tail = prev)
{
prev = tail;
MB_PTR_BACK(head, prev);
c1 = PTR2CHAR(prev);
if (mask == NULL)
{
if (c1 > ' ' && c1 != 0xa0)
break;
}
else
{
for (p = mask; *p != NUL; MB_PTR_ADV(p))
if (c1 == PTR2CHAR(p))
break;
if (*p == NUL)
break;
}
}
rettv->vval.v_string = vim_strnsave(head, (int)(tail - head));
}
#ifdef FEAT_FLOAT
/*
* "trunc({float})" function

View File

@@ -28,9 +28,7 @@ static int read_viminfo_up_to_marks(vir_T *virp, int forceit, int writing);
#endif
static int check_readonly(int *forceit, buf_T *buf);
#ifdef FEAT_AUTOCMD
static void delbuf_msg(char_u *name);
#endif
static int
#ifdef __BORLANDC__
_RTLENTRYF
@@ -49,6 +47,9 @@ do_ascii(exarg_T *eap UNUSED)
char buf1[20];
char buf2[20];
char_u buf3[7];
#ifdef FEAT_DIGRAPHS
char_u *dig;
#endif
#ifdef FEAT_MBYTE
int cc[MAX_MCO];
int ci = 0;
@@ -94,7 +95,15 @@ do_ascii(exarg_T *eap UNUSED)
else
#endif
buf2[0] = NUL;
vim_snprintf((char *)IObuff, IOSIZE,
#ifdef FEAT_DIGRAPHS
dig = get_digraph_for_char(cval);
if (dig != NULL)
vim_snprintf((char *)IObuff, IOSIZE,
_("<%s>%s%s %d, Hex %02x, Oct %03o, Digr %s"),
transchar(c), buf1, buf2, cval, cval, cval, dig);
else
#endif
vim_snprintf((char *)IObuff, IOSIZE,
_("<%s>%s%s %d, Hex %02x, Octal %03o"),
transchar(c), buf1, buf2, cval, cval, cval);
#ifdef FEAT_MBYTE
@@ -121,9 +130,19 @@ do_ascii(exarg_T *eap UNUSED)
)
IObuff[len++] = ' '; /* draw composing char on top of a space */
len += (*mb_char2bytes)(c, IObuff + len);
vim_snprintf((char *)IObuff + len, IOSIZE - len,
c < 0x10000 ? _("> %d, Hex %04x, Octal %o")
: _("> %d, Hex %08x, Octal %o"), c, c, c);
#ifdef FEAT_DIGRAPHS
dig = get_digraph_for_char(c);
if (dig != NULL)
vim_snprintf((char *)IObuff + len, IOSIZE - len,
c < 0x10000 ? _("> %d, Hex %04x, Oct %o, Digr %s")
: _("> %d, Hex %08x, Oct %o, Digr %s"),
c, c, c, dig);
else
#endif
vim_snprintf((char *)IObuff + len, IOSIZE - len,
c < 0x10000 ? _("> %d, Hex %04x, Octal %o")
: _("> %d, Hex %08x, Octal %o"),
c, c, c);
if (ci == MAX_MCO)
break;
if (enc_utf8)
@@ -1127,9 +1146,7 @@ do_bang(
/* Careful: This may recursively call do_bang() again! (because of
* autocommands) */
do_filter(line1, line2, eap, newcmd, do_in, do_out);
#ifdef FEAT_AUTOCMD
apply_autocmds(EVENT_SHELLFILTERPOST, NULL, NULL, FALSE, curbuf);
#endif
}
if (free_newcmd)
vim_free(newcmd);
@@ -1165,9 +1182,7 @@ do_filter(
linenr_T read_linecount;
pos_T cursor_save;
char_u *cmd_buf;
#ifdef FEAT_AUTOCMD
buf_T *old_curbuf = curbuf;
#endif
int shell_flags = 0;
if (*cmd == NUL) /* no filter command */
@@ -1238,16 +1253,14 @@ do_filter(
{
msg_putchar('\n'); /* keep message from buf_write() */
--no_wait_return;
#if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL)
#if defined(FEAT_EVAL)
if (!aborting())
#endif
(void)EMSG2(_(e_notcreate), itmp); /* will call wait_return */
goto filterend;
}
#ifdef FEAT_AUTOCMD
if (curbuf != old_curbuf)
goto filterend;
#endif
if (!do_out)
msg_putchar('\n');
@@ -1313,7 +1326,7 @@ do_filter(
if (readfile(otmp, NULL, line2, (linenr_T)0, (linenr_T)MAXLNUM,
eap, READ_FILTER) != OK)
{
#if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL)
#if defined(FEAT_EVAL)
if (!aborting())
#endif
{
@@ -1322,10 +1335,8 @@ do_filter(
}
goto error;
}
#ifdef FEAT_AUTOCMD
if (curbuf != old_curbuf)
goto filterend;
#endif
}
read_linecount = curbuf->b_ml.ml_line_count - read_linecount;
@@ -1405,13 +1416,11 @@ error:
filterend:
#ifdef FEAT_AUTOCMD
if (curbuf != old_curbuf)
{
--no_wait_return;
EMSG(_("E135: *Filter* Autocommands must not change current buffer"));
}
#endif
if (itmp != NULL)
mch_remove(itmp);
if (otmp != NULL)
@@ -1461,9 +1470,7 @@ do_shell(
* avoid having to type return below.
*/
msg_putchar('\r'); /* put cursor at start of line */
#ifdef FEAT_AUTOCMD
if (!autocmd_busy)
#endif
{
#ifdef MSWIN
if (!winstart)
@@ -1476,11 +1483,7 @@ do_shell(
msg_putchar('\n'); /* may shift screen one line up */
/* warning message before calling the shell */
if (p_warn
#ifdef FEAT_AUTOCMD
&& !autocmd_busy
#endif
&& msg_silent == 0)
if (p_warn && !autocmd_busy && msg_silent == 0)
FOR_ALL_BUFFERS(buf)
if (bufIsChangedNotTerm(buf))
{
@@ -1515,14 +1518,12 @@ do_shell(
msg_col = 0;
}
#ifdef FEAT_AUTOCMD
if (autocmd_busy)
{
if (msg_silent == 0)
redraw_later_clear();
}
else
#endif
{
/*
* For ":sh" there is no need to call wait_return(), just redraw.
@@ -1591,9 +1592,7 @@ do_shell(
/* display any error messages now */
display_errors();
#ifdef FEAT_AUTOCMD
apply_autocmds(EVENT_SHELLCMDPOST, NULL, NULL, FALSE, curbuf);
#endif
}
/*
@@ -1957,8 +1956,7 @@ write_viminfo(char_u *file, int forceit)
if (!shortname && st_new.st_dev == st_old.st_dev
&& st_new.st_ino == st_old.st_ino)
{
vim_free(tempname);
tempname = NULL;
VIM_CLEAR(tempname);
shortname = TRUE;
break;
}
@@ -2959,16 +2957,14 @@ rename_buffer(char_u *new_fname)
char_u *fname, *sfname, *xfname;
buf_T *buf;
#ifdef FEAT_AUTOCMD
buf = curbuf;
apply_autocmds(EVENT_BUFFILEPRE, NULL, NULL, FALSE, curbuf);
/* buffer changed, don't change name now */
if (buf != curbuf)
return FAIL;
# ifdef FEAT_EVAL
#ifdef FEAT_EVAL
if (aborting()) /* autocmds may abort script processing */
return FAIL;
# endif
#endif
/*
* The name of the current buffer will be changed.
@@ -2997,9 +2993,8 @@ rename_buffer(char_u *new_fname)
}
vim_free(fname);
vim_free(sfname);
#ifdef FEAT_AUTOCMD
apply_autocmds(EVENT_BUFFILEPOST, NULL, NULL, FALSE, curbuf);
#endif
/* Change directories when the 'acd' option is set. */
DO_AUTOCHDIR
return OK;
@@ -3178,22 +3173,20 @@ do_write(exarg_T *eap)
{
if (eap->cmdidx == CMD_saveas && alt_buf != NULL)
{
#ifdef FEAT_AUTOCMD
buf_T *was_curbuf = curbuf;
apply_autocmds(EVENT_BUFFILEPRE, NULL, NULL, FALSE, curbuf);
apply_autocmds(EVENT_BUFFILEPRE, NULL, NULL, FALSE, alt_buf);
# ifdef FEAT_EVAL
#ifdef FEAT_EVAL
if (curbuf != was_curbuf || aborting())
# else
#else
if (curbuf != was_curbuf)
# endif
#endif
{
/* buffer changed, don't change name now */
retval = FAIL;
goto theend;
}
#endif
/* Exchange the file names for the current and the alternate
* buffer. This makes it look like we are now editing the buffer
* under the new name. Must be done before buf_write(), because
@@ -3209,7 +3202,7 @@ do_write(exarg_T *eap)
alt_buf->b_sfname = curbuf->b_sfname;
curbuf->b_sfname = fname;
buf_name_changed(curbuf);
#ifdef FEAT_AUTOCMD
apply_autocmds(EVENT_BUFFILEPOST, NULL, NULL, FALSE, curbuf);
apply_autocmds(EVENT_BUFFILEPOST, NULL, NULL, FALSE, alt_buf);
if (!alt_buf->b_p_bl)
@@ -3217,11 +3210,11 @@ do_write(exarg_T *eap)
alt_buf->b_p_bl = TRUE;
apply_autocmds(EVENT_BUFADD, NULL, NULL, FALSE, alt_buf);
}
# ifdef FEAT_EVAL
#ifdef FEAT_EVAL
if (curbuf != was_curbuf || aborting())
# else
#else
if (curbuf != was_curbuf)
# endif
#endif
{
/* buffer changed, don't write the file */
retval = FAIL;
@@ -3240,7 +3233,6 @@ do_write(exarg_T *eap)
/* Autocommands may have changed buffer names, esp. when
* 'autochdir' is set. */
fname = curbuf->b_sfname;
#endif
}
name_was_missing = curbuf->b_ffname == NULL;
@@ -3429,6 +3421,14 @@ do_wqall(exarg_T *eap)
FOR_ALL_BUFFERS(buf)
{
#ifdef FEAT_TERMINAL
if (exiting && term_job_running(buf->b_term))
{
no_write_message_nobang(buf);
++error;
}
else
#endif
if (bufIsChanged(buf) && !bt_dontwrite(buf))
{
/*
@@ -3461,18 +3461,14 @@ do_wqall(exarg_T *eap)
}
else
{
#ifdef FEAT_AUTOCMD
bufref_T bufref;
set_bufref(&bufref, buf);
#endif
if (buf_write_all(buf, eap->forceit) == FAIL)
++error;
#ifdef FEAT_AUTOCMD
/* an autocommand may have deleted the buffer */
if (!bufref_valid(&bufref))
buf = firstbuf;
#endif
}
eap->forceit = save_forceit; /* check_overwrite() may set it */
}
@@ -3576,10 +3572,8 @@ getfile(
if (text_locked())
return GETFILE_ERROR;
#ifdef FEAT_AUTOCMD
if (curbuf_locked())
return GETFILE_ERROR;
#endif
if (fnum == 0)
{
@@ -3674,17 +3668,15 @@ do_ecmd(
{
int other_file; /* TRUE if editing another file */
int oldbuf; /* TRUE if using existing buffer */
#ifdef FEAT_AUTOCMD
int auto_buf = FALSE; /* TRUE if autocommands brought us
into the buffer unexpectedly */
char_u *new_name = NULL;
#if defined(FEAT_EVAL)
int did_set_swapcommand = FALSE;
#endif
buf_T *buf;
bufref_T bufref;
#if defined(FEAT_AUTOCMD) || defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
bufref_T old_curbuf;
#endif
char_u *free_fname = NULL;
#ifdef FEAT_BROWSE
char_u *browse_file = NULL;
@@ -3708,9 +3700,7 @@ do_ecmd(
if (eap != NULL)
command = eap->do_ecmd_cmd;
#if defined(FEAT_AUTOCMD) || defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
set_bufref(&old_curbuf, curbuf);
#endif
if (fnum != 0)
{
@@ -3723,11 +3713,10 @@ do_ecmd(
#ifdef FEAT_BROWSE
if (cmdmod.browse)
{
# ifdef FEAT_AUTOCMD
if (
# ifdef FEAT_GUI
# ifdef FEAT_GUI
!gui.in_use &&
# endif
# endif
au_has_group((char_u *)"FileExplorer"))
{
/* No browsing supported but we do have the file explorer:
@@ -3736,7 +3725,6 @@ do_ecmd(
ffname = (char_u *)".";
}
else
# endif
{
browse_file = do_browse(0, (char_u *)_("Edit File"), ffname,
NULL, NULL, NULL, curbuf);
@@ -3757,10 +3745,8 @@ do_ecmd(
fname_case(sfname, 0); /* set correct case for sfname */
#endif
#ifdef FEAT_LISTCMDS
if ((flags & ECMD_ADDBUF) && (ffname == NULL || *ffname == NUL))
goto theend;
#endif
if (ffname == NULL)
other_file = TRUE;
@@ -3810,7 +3796,7 @@ do_ecmd(
*/
reset_VIsual();
#ifdef FEAT_AUTOCMD
#if defined(FEAT_EVAL)
if ((command != NULL || newlnum > (linenr_T)0)
&& *get_vim_var_str(VV_SWAPCOMMAND) == NUL)
{
@@ -3842,9 +3828,7 @@ do_ecmd(
*/
if (other_file)
{
#ifdef FEAT_LISTCMDS
if (!(flags & ECMD_ADDBUF))
#endif
{
if (!cmdmod.keepalt)
curwin->w_alt_fnum = curbuf->b_fnum;
@@ -3856,7 +3840,6 @@ do_ecmd(
buf = buflist_findnr(fnum);
else
{
#ifdef FEAT_LISTCMDS
if (flags & ECMD_ADDBUF)
{
linenr_T tlnum = 1L;
@@ -3870,15 +3853,13 @@ do_ecmd(
(void)buflist_new(ffname, sfname, tlnum, BLN_LISTED);
goto theend;
}
#endif
buf = buflist_new(ffname, sfname, 0L,
BLN_CURBUF | ((flags & ECMD_SET_HELP) ? 0 : BLN_LISTED));
#ifdef FEAT_AUTOCMD
/* autocommands may change curwin and curbuf */
if (oldwin != NULL)
oldwin = curwin;
set_bufref(&old_curbuf, curbuf);
#endif
}
if (buf == NULL)
goto theend;
@@ -3893,11 +3874,7 @@ do_ecmd(
(void)buf_check_timestamp(buf, FALSE);
/* Check if autocommands made the buffer invalid or changed the
* current buffer. */
if (!bufref_valid(&bufref)
#ifdef FEAT_AUTOCMD
|| curbuf != old_curbuf.br_buf
#endif
)
if (!bufref_valid(&bufref) || curbuf != old_curbuf.br_buf)
goto theend;
#ifdef FEAT_EVAL
if (aborting()) /* autocmds may abort script processing */
@@ -3922,7 +3899,6 @@ do_ecmd(
*/
if (buf != curbuf)
{
#ifdef FEAT_AUTOCMD
/*
* Be careful: The autocommands may delete any buffer and change
* the current buffer.
@@ -3943,13 +3919,13 @@ do_ecmd(
delbuf_msg(new_name); /* frees new_name */
goto theend;
}
# ifdef FEAT_EVAL
#ifdef FEAT_EVAL
if (aborting()) /* autocmds may abort script processing */
{
vim_free(new_name);
goto theend;
}
# endif
#endif
if (buf == curbuf) /* already in new buffer */
auto_buf = TRUE;
else
@@ -3962,7 +3938,6 @@ do_ecmd(
++buf->b_locked;
if (curbuf == old_curbuf.br_buf)
#endif
buf_copy_options(buf, BCO_ENTER);
/* Close the link to the current buffer. This will set
@@ -3971,18 +3946,17 @@ do_ecmd(
close_buffer(oldwin, curbuf,
(flags & ECMD_HIDE) ? 0 : DOBUF_UNLOAD, FALSE);
#ifdef FEAT_AUTOCMD
the_curwin->w_closing = FALSE;
--buf->b_locked;
# ifdef FEAT_EVAL
#ifdef FEAT_EVAL
/* autocmds may abort script processing */
if (aborting() && curwin->w_buffer != NULL)
{
vim_free(new_name);
goto theend;
}
# endif
#endif
/* Be careful again, like above. */
if (!bufref_valid(&au_new_curbuf))
{
@@ -3993,7 +3967,6 @@ do_ecmd(
if (buf == curbuf) /* already in new buffer */
auto_buf = TRUE;
else
#endif
{
#ifdef FEAT_SYN_HL
/*
@@ -4026,13 +3999,10 @@ do_ecmd(
#ifdef FEAT_SPELL
did_get_winopts = TRUE;
#endif
#ifdef FEAT_AUTOCMD
}
vim_free(new_name);
au_new_curbuf.br_buf = NULL;
au_new_curbuf.br_buf_free_count = 0;
#endif
}
curwin->w_pcmark.lnum = 1;
@@ -4040,11 +4010,7 @@ do_ecmd(
}
else /* !other_file */
{
if (
#ifdef FEAT_LISTCMDS
(flags & ECMD_ADDBUF) ||
#endif
check_fname() == FAIL)
if ((flags & ECMD_ADDBUF) || check_fname() == FAIL)
goto theend;
oldbuf = (flags & ECMD_OLDBUF);
@@ -4055,9 +4021,7 @@ do_ecmd(
++RedrawingDisabled;
did_inc_redrawing_disabled = TRUE;
#ifdef FEAT_AUTOCMD
buf = curbuf;
#endif
if ((flags & ECMD_SET_HELP) || keep_help_flag)
{
prepare_help_buffer();
@@ -4070,21 +4034,19 @@ do_ecmd(
set_buflisted(TRUE);
}
#ifdef FEAT_AUTOCMD
/* If autocommands change buffers under our fingers, forget about
* editing the file. */
if (buf != curbuf)
goto theend;
# ifdef FEAT_EVAL
#ifdef FEAT_EVAL
if (aborting()) /* autocmds may abort script processing */
goto theend;
# endif
#endif
/* Since we are starting to edit a file, consider the filetype to be
* unset. Helps for when an autocommand changes files and expects syntax
* highlighting to work in the other file. */
did_filetype = FALSE;
#endif
/*
* other_file oldbuf
@@ -4101,14 +4063,13 @@ do_ecmd(
newlnum = curwin->w_cursor.lnum;
solcol = curwin->w_cursor.col;
}
#ifdef FEAT_AUTOCMD
buf = curbuf;
if (buf->b_fname != NULL)
new_name = vim_strsave(buf->b_fname);
else
new_name = NULL;
set_bufref(&bufref, buf);
#endif
if (p_ur < 0 || curbuf->b_ml.ml_line_count <= p_ur)
{
/* Save all the text, so that the reload can be undone.
@@ -4117,9 +4078,7 @@ do_ecmd(
if (u_savecommon(0, curbuf->b_ml.ml_line_count + 1, 0, TRUE)
== FAIL)
{
#ifdef FEAT_AUTOCMD
vim_free(new_name);
#endif
goto theend;
}
u_unchanged(curbuf);
@@ -4130,7 +4089,7 @@ do_ecmd(
}
else
buf_freeall(curbuf, 0); /* free all things for buffer */
#ifdef FEAT_AUTOCMD
/* If autocommands deleted the buffer we were going to re-edit, give
* up and jump to the end. */
if (!bufref_valid(&bufref))
@@ -4145,10 +4104,9 @@ do_ecmd(
* the autocommands changed the buffer... */
if (buf != curbuf)
goto theend;
# ifdef FEAT_EVAL
#ifdef FEAT_EVAL
if (aborting()) /* autocmds may abort script processing */
goto theend;
# endif
#endif
buf_clear_file(curbuf);
curbuf->b_op_start.lnum = 0; /* clear '[ and '] marks */
@@ -4166,9 +4124,7 @@ do_ecmd(
*/
check_arg_idx(curwin);
#ifdef FEAT_AUTOCMD
if (!auto_buf)
#endif
{
/*
* Set cursor and init window before reading the file and executing
@@ -4209,7 +4165,7 @@ do_ecmd(
/*
* Open the buffer and read the file.
*/
#if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL)
#if defined(FEAT_EVAL)
if (should_abort(open_buffer(FALSE, eap, readfile_flags)))
retval = FAIL;
#else
@@ -4222,7 +4178,6 @@ do_ecmd(
handle_swap_exists(&old_curbuf);
#endif
}
#ifdef FEAT_AUTOCMD
else
{
/* Read the modelines, but only to set window-local options. Any
@@ -4236,7 +4191,6 @@ do_ecmd(
&retval);
}
check_arg_idx(curwin);
#endif
/* If autocommands change the cursor position or topline, we should
* keep it. Also when it moves within a line. */
@@ -4314,11 +4268,7 @@ do_ecmd(
* Did not read the file, need to show some info about the file.
* Do this after setting the cursor.
*/
if (oldbuf
#ifdef FEAT_AUTOCMD
&& !auto_buf
#endif
)
if (oldbuf && !auto_buf)
{
int msg_scroll_save = msg_scroll;
@@ -4358,9 +4308,7 @@ do_ecmd(
if (topline == 0 && command == NULL)
p_so = 999; /* force cursor halfway the window */
update_topline();
#ifdef FEAT_SCROLLBIND
curwin->w_scbind_pos = curwin->w_topline;
#endif
p_so = n;
redraw_curbuf_later(NOT_VALID); /* redraw this buffer later */
}
@@ -4368,8 +4316,22 @@ do_ecmd(
if (p_im)
need_start_insertmode = TRUE;
/* Change directories when the 'acd' option is set. */
DO_AUTOCHDIR
#ifdef FEAT_AUTOCHDIR
/* Change directories when the 'acd' option is set and we aren't already in
* that directory (should already be done above). Expect getcwd() to be
* faster than calling shorten_fnames() unnecessarily. */
if (p_acd && curbuf->b_ffname != NULL)
{
char_u curdir[MAXPATHL];
char_u filedir[MAXPATHL];
vim_strncpy(filedir, curbuf->b_ffname, MAXPATHL - 1);
*gettail_sep(filedir) = NUL;
if (mch_dirname(curdir, MAXPATHL) != FAIL
&& vim_fnamecmp(curdir, filedir) != 0)
do_autochdir();
}
#endif
#if defined(FEAT_SUN_WORKSHOP) || defined(FEAT_NETBEANS_INTG)
if (curbuf->b_ffname != NULL)
@@ -4388,7 +4350,7 @@ do_ecmd(
theend:
if (did_inc_redrawing_disabled)
--RedrawingDisabled;
#ifdef FEAT_AUTOCMD
#if defined(FEAT_EVAL)
if (did_set_swapcommand)
set_vim_var_string(VV_SWAPCOMMAND, NULL, -1);
#endif
@@ -4399,7 +4361,6 @@ theend:
return retval;
}
#ifdef FEAT_AUTOCMD
static void
delbuf_msg(char_u *name)
{
@@ -4409,7 +4370,6 @@ delbuf_msg(char_u *name)
au_new_curbuf.br_buf = NULL;
au_new_curbuf.br_buf_free_count = 0;
}
#endif
static int append_indent = 0; /* autoindent for first line */
@@ -5114,7 +5074,7 @@ do_sub(exarg_T *eap)
*/
line2 = eap->line2;
for (lnum = eap->line1; lnum <= line2 && !(got_quit
#if defined(FEAT_EVAL) && defined(FEAT_AUTOCMD)
#if defined(FEAT_EVAL)
|| aborting()
#endif
); ++lnum)
@@ -5211,8 +5171,7 @@ do_sub(exarg_T *eap)
lnum += regmatch.startpos[0].lnum;
sub_firstlnum += regmatch.startpos[0].lnum;
nmatch -= regmatch.startpos[0].lnum;
vim_free(sub_firstline);
sub_firstline = NULL;
VIM_CLEAR(sub_firstline);
}
if (sub_firstline == NULL)
@@ -5299,10 +5258,8 @@ do_sub(exarg_T *eap)
setmouse(); /* disable mouse in xterm */
#endif
curwin->w_cursor.col = regmatch.startpos[0].col;
#ifdef FEAT_CURSORBIND
if (curwin->w_p_crb)
do_check_cursorbind();
#endif
/* When 'cpoptions' contains "u" don't sync undo when
* asking for confirmation. */
@@ -5374,10 +5331,7 @@ do_sub(exarg_T *eap)
sub_firstline + copycol);
if (new_line == NULL)
{
vim_free(orig_line);
orig_line = NULL;
}
VIM_CLEAR(orig_line);
else
{
/* Position the cursor relative to the
@@ -5806,8 +5760,7 @@ skip:
if (did_sub)
++sub_nlines;
vim_free(new_start); /* for when substitute was cancelled */
vim_free(sub_firstline); /* free the copy of the original line */
sub_firstline = NULL;
VIM_CLEAR(sub_firstline); /* free the copy of the original line */
}
line_breakcheck();
@@ -6833,7 +6786,6 @@ fix_help_buffer(void)
char_u *rt;
int mustfree;
#ifdef FEAT_AUTOCMD
/* Set filetype to "help" if still needed. */
if (STRCMP(curbuf->b_p_ft, "help") != 0)
{
@@ -6841,7 +6793,6 @@ fix_help_buffer(void)
set_option_value((char_u *)"ft", 0L, (char_u *)"help", OPT_LOCAL);
--curbuf_lock;
}
#endif
#ifdef FEAT_SYN_HL
if (!syntax_present(curwin))
@@ -6910,7 +6861,7 @@ fix_help_buffer(void)
copy_option_part(&p, NameBuff, MAXPATHL, ",");
mustfree = FALSE;
rt = vim_getenv((char_u *)"VIMRUNTIME", &mustfree);
if (fullpathcmp(rt, NameBuff, FALSE) != FPC_SAME)
if (rt != NULL && fullpathcmp(rt, NameBuff, FALSE) != FPC_SAME)
{
int fcount;
char_u **fnames;
@@ -6961,8 +6912,7 @@ fix_help_buffer(void)
&& fnamecmp(e1, fname + 4) != 0)
{
/* Not .txt and not .abx, remove it. */
vim_free(fnames[i1]);
fnames[i1] = NULL;
VIM_CLEAR(fnames[i1]);
continue;
}
if (e1 - f1 != e2 - f2
@@ -6970,11 +6920,8 @@ fix_help_buffer(void)
continue;
if (fnamecmp(e1, ".txt") == 0
&& fnamecmp(e2, fname + 4) == 0)
{
/* use .abx instead of .txt */
vim_free(fnames[i1]);
fnames[i1] = NULL;
}
VIM_CLEAR(fnames[i1]);
}
}
#endif
@@ -8331,7 +8278,6 @@ ex_smile(exarg_T *eap UNUSED)
msg_clr_eos();
}
#if defined(FEAT_GUI) || defined(FEAT_CLIENTSERVER) || defined(PROTO)
/*
* ":drop"
* Opens the first argument in a window. When there are two or more arguments
@@ -8411,7 +8357,6 @@ ex_drop(exarg_T *eap)
ex_rewind(eap);
}
}
#endif
/*
* Skip over the pattern argument of ":vimgrep /pat/[g][j]".

View File

@@ -73,6 +73,16 @@ static void do_setdebugtracelevel(char_u *arg);
static void do_checkbacktracelevel(void);
static void do_showbacktrace(char_u *cmd);
static char_u *debug_oldval = NULL; /* old and newval for debug expressions */
static char_u *debug_newval = NULL;
static int debug_expr = 0; /* use debug_expr */
int
has_watchexpr(void)
{
return debug_expr;
}
/*
* do_debug(): Debug mode.
* Repeatedly get Ex commands, until told to continue normal execution.
@@ -135,13 +145,24 @@ do_debug(char_u *cmd)
if (!debug_did_msg)
MSG(_("Entering Debug mode. Type \"cont\" to continue."));
if (debug_oldval != NULL)
{
smsg((char_u *)_("Oldval = \"%s\""), debug_oldval);
vim_free(debug_oldval);
debug_oldval = NULL;
}
if (debug_newval != NULL)
{
smsg((char_u *)_("Newval = \"%s\""), debug_newval);
vim_free(debug_newval);
debug_newval = NULL;
}
if (sourcing_name != NULL)
msg(sourcing_name);
if (sourcing_lnum != 0)
smsg((char_u *)_("line %ld: %s"), (long)sourcing_lnum, cmd);
else
smsg((char_u *)_("cmd: %s"), cmd);
/*
* Repeat getting a command and executing it.
*/
@@ -528,11 +549,15 @@ dbg_check_skipped(exarg_T *eap)
struct debuggy
{
int dbg_nr; /* breakpoint number */
int dbg_type; /* DBG_FUNC or DBG_FILE */
char_u *dbg_name; /* function or file name */
int dbg_type; /* DBG_FUNC, DBG_FILE or DBG_EXPR */
char_u *dbg_name; /* function, expression or file name */
regprog_T *dbg_prog; /* regexp program */
linenr_T dbg_lnum; /* line number in function or file */
int dbg_forceit; /* ! used */
#ifdef FEAT_EVAL
typval_T *dbg_val; /* last result of watchexpression */
#endif
int dbg_level; /* stored nested level for expr */
};
static garray_T dbg_breakp = {0, 0, sizeof(struct debuggy), 4, NULL};
@@ -546,6 +571,7 @@ static garray_T prof_ga = {0, 0, sizeof(struct debuggy), 4, NULL};
#endif
#define DBG_FUNC 1
#define DBG_FILE 2
#define DBG_EXPR 3
static int dbg_parsearg(char_u *arg, garray_T *gap);
static linenr_T debuggy_find(int file,char_u *fname, linenr_T after, garray_T *gap, int *fp);
@@ -589,6 +615,12 @@ dbg_parsearg(
bp->dbg_type = DBG_FILE;
here = TRUE;
}
else if (
#ifdef FEAT_PROFILE
gap != &prof_ga &&
#endif
STRNCMP(p, "expr", 4) == 0)
bp->dbg_type = DBG_EXPR;
else
{
EMSG2(_(e_invarg2), p);
@@ -624,6 +656,12 @@ dbg_parsearg(
bp->dbg_name = vim_strsave(p);
else if (here)
bp->dbg_name = vim_strsave(curbuf->b_ffname);
else if (bp->dbg_type == DBG_EXPR)
{
bp->dbg_name = vim_strsave(p);
if (bp->dbg_name != NULL)
bp->dbg_val = eval_expr(bp->dbg_name, NULL);
}
else
{
/* Expand the file name in the same way as do_source(). This means
@@ -671,26 +709,35 @@ ex_breakadd(exarg_T *eap)
bp = &DEBUGGY(gap, gap->ga_len);
bp->dbg_forceit = eap->forceit;
pat = file_pat_to_reg_pat(bp->dbg_name, NULL, NULL, FALSE);
if (pat != NULL)
if (bp->dbg_type != DBG_EXPR)
{
bp->dbg_prog = vim_regcomp(pat, RE_MAGIC + RE_STRING);
vim_free(pat);
pat = file_pat_to_reg_pat(bp->dbg_name, NULL, NULL, FALSE);
if (pat != NULL)
{
bp->dbg_prog = vim_regcomp(pat, RE_MAGIC + RE_STRING);
vim_free(pat);
}
if (pat == NULL || bp->dbg_prog == NULL)
vim_free(bp->dbg_name);
else
{
if (bp->dbg_lnum == 0) /* default line number is 1 */
bp->dbg_lnum = 1;
#ifdef FEAT_PROFILE
if (eap->cmdidx != CMD_profile)
#endif
{
DEBUGGY(gap, gap->ga_len).dbg_nr = ++last_breakp;
++debug_tick;
}
++gap->ga_len;
}
}
if (pat == NULL || bp->dbg_prog == NULL)
vim_free(bp->dbg_name);
else
{
if (bp->dbg_lnum == 0) /* default line number is 1 */
bp->dbg_lnum = 1;
#ifdef FEAT_PROFILE
if (eap->cmdidx != CMD_profile)
#endif
{
DEBUGGY(gap, gap->ga_len).dbg_nr = ++last_breakp;
++debug_tick;
}
++gap->ga_len;
/* DBG_EXPR */
DEBUGGY(gap, gap->ga_len++).dbg_nr = ++last_breakp;
++debug_tick;
}
}
}
@@ -750,7 +797,7 @@ ex_breakdel(exarg_T *eap)
}
else
{
/* ":breakdel {func|file} [lnum] {name}" */
/* ":breakdel {func|file|expr} [lnum] {name}" */
if (dbg_parsearg(eap->arg, gap) == FAIL)
return;
bp = &DEBUGGY(gap, gap->ga_len);
@@ -778,6 +825,11 @@ ex_breakdel(exarg_T *eap)
while (gap->ga_len > 0)
{
vim_free(DEBUGGY(gap, todel).dbg_name);
#ifdef FEAT_EVAL
if (DEBUGGY(gap, todel).dbg_type == DBG_EXPR
&& DEBUGGY(gap, todel).dbg_val != NULL)
free_tv(DEBUGGY(gap, todel).dbg_val);
#endif
vim_regfree(DEBUGGY(gap, todel).dbg_prog);
--gap->ga_len;
if (todel < gap->ga_len)
@@ -814,11 +866,15 @@ ex_breaklist(exarg_T *eap UNUSED)
bp = &BREAKP(i);
if (bp->dbg_type == DBG_FILE)
home_replace(NULL, bp->dbg_name, NameBuff, MAXPATHL, TRUE);
smsg((char_u *)_("%3d %s %s line %ld"),
if (bp->dbg_type != DBG_EXPR)
smsg((char_u *)_("%3d %s %s line %ld"),
bp->dbg_nr,
bp->dbg_type == DBG_FUNC ? "func" : "file",
bp->dbg_type == DBG_FUNC ? bp->dbg_name : NameBuff,
(long)bp->dbg_lnum);
else
smsg((char_u *)_("%3d expr %s"),
bp->dbg_nr, bp->dbg_name);
}
}
@@ -889,7 +945,8 @@ debuggy_find(
/* Skip entries that are not useful or are for a line that is beyond
* an already found breakpoint. */
bp = &DEBUGGY(gap, i);
if (((bp->dbg_type == DBG_FILE) == file && (
if (((bp->dbg_type == DBG_FILE) == file &&
bp->dbg_type != DBG_EXPR && (
#ifdef FEAT_PROFILE
gap == &prof_ga ||
#endif
@@ -910,6 +967,63 @@ debuggy_find(
}
got_int |= prev_got_int;
}
#ifdef FEAT_EVAL
else if (bp->dbg_type == DBG_EXPR)
{
typval_T *tv;
int line = FALSE;
prev_got_int = got_int;
got_int = FALSE;
tv = eval_expr(bp->dbg_name, NULL);
if (tv != NULL)
{
if (bp->dbg_val == NULL)
{
debug_oldval = typval_tostring(NULL);
bp->dbg_val = tv;
debug_newval = typval_tostring(bp->dbg_val);
line = TRUE;
}
else
{
if (typval_compare(tv, bp->dbg_val, TYPE_EQUAL,
TRUE, FALSE) == OK
&& tv->vval.v_number == FALSE)
{
typval_T *v;
line = TRUE;
debug_oldval = typval_tostring(bp->dbg_val);
/* Need to evaluate again, typval_compare() overwrites
* "tv". */
v = eval_expr(bp->dbg_name, NULL);
debug_newval = typval_tostring(v);
free_tv(bp->dbg_val);
bp->dbg_val = v;
}
free_tv(tv);
}
}
else if (bp->dbg_val != NULL)
{
debug_oldval = typval_tostring(bp->dbg_val);
debug_newval = typval_tostring(NULL);
free_tv(bp->dbg_val);
bp->dbg_val = NULL;
line = TRUE;
}
if (line)
{
lnum = after > 0 ? after : 1;
break;
}
got_int |= prev_got_int;
}
#endif
}
if (name != fname)
vim_free(name);
@@ -1298,7 +1412,6 @@ check_due_timer(void)
if (this_due <= 1)
{
bevalexpr_due_set = FALSE;
if (balloonEval == NULL)
{
balloonEval = (BalloonEval *)alloc(sizeof(BalloonEval));
@@ -1932,17 +2045,15 @@ autowrite_all(void)
FOR_ALL_BUFFERS(buf)
if (bufIsChanged(buf) && !buf->b_p_ro)
{
#ifdef FEAT_AUTOCMD
bufref_T bufref;
set_bufref(&bufref, buf);
#endif
(void)buf_write_all(buf, FALSE);
#ifdef FEAT_AUTOCMD
/* an autocommand may have deleted the buffer */
if (!bufref_valid(&bufref))
buf = firstbuf;
#endif
}
}
@@ -1954,11 +2065,9 @@ autowrite_all(void)
check_changed(buf_T *buf, int flags)
{
int forceit = (flags & CCGD_FORCEIT);
#ifdef FEAT_AUTOCMD
bufref_T bufref;
set_bufref(&bufref, buf);
#endif
if ( !forceit
&& bufIsChanged(buf)
@@ -1980,24 +2089,22 @@ check_changed(buf_T *buf, int flags)
# endif
))
++count;
# ifdef FEAT_AUTOCMD
if (!bufref_valid(&bufref))
/* Autocommand deleted buffer, oops! It's not changed now. */
return FALSE;
# endif
dialog_changed(buf, count > 1);
# ifdef FEAT_AUTOCMD
if (!bufref_valid(&bufref))
/* Autocommand deleted buffer, oops! It's not changed now. */
return FALSE;
# endif
return bufIsChanged(buf);
}
#endif
if (flags & CCGD_EXCMD)
no_write_message();
else
no_write_message_nobang();
no_write_message_nobang(curbuf);
return TRUE;
}
return FALSE;
@@ -2084,11 +2191,9 @@ dialog_changed(
)
&& !buf2->b_p_ro)
{
#ifdef FEAT_AUTOCMD
bufref_T bufref;
set_bufref(&bufref, buf2);
#endif
#ifdef FEAT_BROWSE
/* May get file name, when there is none */
browse_save_fname(buf2);
@@ -2097,11 +2202,10 @@ dialog_changed(
buf2->b_fname, buf2->b_ffname, FALSE) == OK)
/* didn't hit Cancel */
(void)buf_write_all(buf2, FALSE);
#ifdef FEAT_AUTOCMD
/* an autocommand may have deleted the buffer */
if (!bufref_valid(&bufref))
buf2 = firstbuf;
#endif
}
}
}
@@ -2150,7 +2254,7 @@ add_bufnum(int *bufnrs, int *bufnump, int nr)
/*
* Return TRUE if any buffer was changed and cannot be abandoned.
* That changed buffer becomes the current buffer.
* When "unload" is true the current buffer is unloaded instead of making it
* When "unload" is TRUE the current buffer is unloaded instead of making it
* hidden. This is used for ":q!".
*/
int
@@ -2168,6 +2272,7 @@ check_changed_any(
tabpage_T *tp;
win_T *wp;
/* Make a list of all buffers, with the most important ones first. */
FOR_ALL_BUFFERS(buf)
++bufcount;
@@ -2180,17 +2285,19 @@ check_changed_any(
/* curbuf */
bufnrs[bufnum++] = curbuf->b_fnum;
/* buf in curtab */
/* buffers in current tab */
FOR_ALL_WINDOWS(wp)
if (wp->w_buffer != curbuf)
add_bufnum(bufnrs, &bufnum, wp->w_buffer->b_fnum);
/* buf in other tab */
/* buffers in other tabs */
FOR_ALL_TABPAGES(tp)
if (tp != curtab)
for (wp = tp->tp_firstwin; wp != NULL; wp = wp->w_next)
add_bufnum(bufnrs, &bufnum, wp->w_buffer->b_fnum);
/* any other buf */
/* any other buffer */
FOR_ALL_BUFFERS(buf)
add_bufnum(bufnrs, &bufnum, buf->b_fnum);
@@ -2204,6 +2311,14 @@ check_changed_any(
bufref_T bufref;
set_bufref(&bufref, buf);
#ifdef FEAT_TERMINAL
if (term_job_running(buf->b_term))
{
if (term_try_stop_job(buf) == FAIL)
break;
}
else
#endif
/* Try auto-writing the buffer. If this fails but the buffer no
* longer exists it's not changed, that's OK. */
if (check_changed(buf, (p_awa ? CCGD_AW : 0)
@@ -2216,6 +2331,7 @@ check_changed_any(
if (i >= bufnum)
goto theend;
/* Get here if "buf" cannot be abandoned. */
ret = TRUE;
exiting = FALSE;
#if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
@@ -2257,19 +2373,15 @@ check_changed_any(
FOR_ALL_TAB_WINDOWS(tp, wp)
if (wp->w_buffer == buf)
{
#ifdef FEAT_AUTOCMD
bufref_T bufref;
set_bufref(&bufref, buf);
#endif
goto_tabpage_win(tp, wp);
#ifdef FEAT_AUTOCMD
/* Paranoia: did autocms wipe out the buffer with changes? */
if (!bufref_valid(&bufref))
{
goto theend;
}
#endif
goto buf_found;
}
buf_found:
@@ -2307,20 +2419,16 @@ check_fname(void)
buf_write_all(buf_T *buf, int forceit)
{
int retval;
#ifdef FEAT_AUTOCMD
buf_T *old_curbuf = curbuf;
#endif
retval = (buf_write(buf, buf->b_ffname, buf->b_fname,
(linenr_T)1, buf->b_ml.ml_line_count, NULL,
FALSE, forceit, TRUE, FALSE));
#ifdef FEAT_AUTOCMD
if (curbuf != old_curbuf)
{
msg_source(HL_ATTR(HLF_W));
MSG(_("Warning: Entered other buffer unexpectedly (check autocommands)"));
}
#endif
return retval;
}
@@ -2332,9 +2440,7 @@ static char_u *do_one_arg(char_u *str);
static int do_arglist(char_u *str, int what, int after);
static void alist_check_arg_idx(void);
static int editing_arg_idx(win_T *win);
#ifdef FEAT_LISTCMDS
static int alist_add_list(int count, char_u **files, int after);
#endif
#define AL_SET 1
#define AL_ADD 2
#define AL_DEL 3
@@ -2433,7 +2539,6 @@ get_arglist_exp(
}
#endif
#if defined(FEAT_GUI) || defined(FEAT_CLIENTSERVER) || defined(PROTO)
/*
* Redefine the argument list.
*/
@@ -2442,7 +2547,6 @@ set_arglist(char_u *str)
{
do_arglist(str, AL_SET, 0);
}
#endif
/*
* "what" == AL_SET: Redefine the argument list to 'str'.
@@ -2461,10 +2565,8 @@ do_arglist(
int exp_count;
char_u **exp_files;
int i;
#ifdef FEAT_LISTCMDS
char_u *p;
int match;
#endif
int arg_escaped = TRUE;
/*
@@ -2484,7 +2586,6 @@ do_arglist(
if (get_arglist(&new_ga, str, arg_escaped) == FAIL)
return FAIL;
#ifdef FEAT_LISTCMDS
if (what == AL_DEL)
{
regmatch_T regmatch;
@@ -2531,7 +2632,6 @@ do_arglist(
ga_clear(&new_ga);
}
else
#endif
{
i = expand_wildcards(new_ga.ga_len, (char_u **)new_ga.ga_data,
&exp_count, &exp_files, EW_DIR|EW_FILE|EW_ADDSLASH|EW_NOTFOUND);
@@ -2542,14 +2642,12 @@ do_arglist(
return FAIL;
}
#ifdef FEAT_LISTCMDS
if (what == AL_ADD)
{
(void)alist_add_list(exp_count, exp_files, after);
vim_free(exp_files);
}
else /* what == AL_SET */
#endif
alist_set(ALIST(curwin), exp_count, exp_files, FALSE, NULL, 0);
}
@@ -2631,16 +2729,11 @@ ex_args(exarg_T *eap)
if (eap->cmdidx != CMD_args)
{
#if defined(FEAT_LISTCMDS)
alist_unlink(ALIST(curwin));
if (eap->cmdidx == CMD_argglobal)
ALIST(curwin) = &global_alist;
else /* eap->cmdidx == CMD_arglocal */
alist_new();
#else
ex_ni(eap);
return;
#endif
}
if (!ends_excmd(*eap->arg))
@@ -2651,10 +2744,7 @@ ex_args(exarg_T *eap)
*/
ex_next(eap);
}
else
#if defined(FEAT_LISTCMDS)
if (eap->cmdidx == CMD_args)
#endif
else if (eap->cmdidx == CMD_args)
{
/*
* ":args": list arguments.
@@ -2675,7 +2765,6 @@ ex_args(exarg_T *eap)
}
}
}
#if defined(FEAT_LISTCMDS)
else if (eap->cmdidx == CMD_arglocal)
{
garray_T *gap = &curwin->w_alist->al_ga;
@@ -2694,7 +2783,6 @@ ex_args(exarg_T *eap)
++gap->ga_len;
}
}
#endif
}
/*
@@ -2845,7 +2933,6 @@ ex_next(exarg_T *eap)
}
}
#if defined(FEAT_LISTCMDS) || defined(PROTO)
/*
* ":argedit"
*/
@@ -2942,7 +3029,7 @@ ex_listdo(exarg_T *eap)
tabpage_T *tp;
buf_T *buf = curbuf;
int next_fnum = 0;
#if defined(FEAT_AUTOCMD) && defined(FEAT_SYN_HL)
#if defined(FEAT_SYN_HL)
char_u *save_ei = NULL;
#endif
char_u *p_shm_save;
@@ -2960,7 +3047,7 @@ ex_listdo(exarg_T *eap)
}
#endif
#if defined(FEAT_AUTOCMD) && defined(FEAT_SYN_HL)
#if defined(FEAT_SYN_HL)
if (eap->cmdidx != CMD_windo && eap->cmdidx != CMD_tabdo)
/* Don't do syntax HL autocommands. Skipping the syntax file is a
* great speed improvement. */
@@ -3138,11 +3225,10 @@ ex_listdo(exarg_T *eap)
if (eap->cmdidx == CMD_windo)
{
validate_cursor(); /* cursor may have moved */
#ifdef FEAT_SCROLLBIND
/* required when 'scrollbind' has been set */
if (curwin->w_p_scb)
do_check_scrollbind(TRUE);
#endif
}
if (eap->cmdidx == CMD_windo || eap->cmdidx == CMD_tabdo)
@@ -3154,7 +3240,7 @@ ex_listdo(exarg_T *eap)
listcmd_busy = FALSE;
}
#if defined(FEAT_AUTOCMD) && defined(FEAT_SYN_HL)
#if defined(FEAT_SYN_HL)
if (save_ei != NULL)
{
au_event_restore(save_ei);
@@ -3207,7 +3293,21 @@ alist_add_list(
return -1;
}
#endif /* FEAT_LISTCMDS */
#if defined(FEAT_CMDL_COMPL) || defined(PROTO)
/*
* Function given to ExpandGeneric() to obtain the possible arguments of the
* argedit and argdelete commands.
*/
char_u *
get_arglist_name(expand_T *xp UNUSED, int idx)
{
if (idx >= ARGCOUNT)
return NULL;
return alist_name(&ARGLIST[idx]);
}
#endif
#ifdef FEAT_EVAL
/*
@@ -3549,6 +3649,8 @@ source_in_path(char_u *path, char_u *name, int flags)
}
#if defined(FEAT_EVAL) || defined(PROTO)
/*
* Expand wildcards in "pat" and invoke do_source() for each match.
*/
@@ -3567,13 +3669,11 @@ source_all_matches(char_u *pat)
}
}
/* used for "cookie" of add_pack_plugin() */
static int APP_ADD_DIR;
static int APP_LOAD;
static int APP_BOTH;
static void
add_pack_plugin(char_u *fname, void *cookie)
/*
* Add the package directory to 'runtimepath'.
*/
static int
add_pack_dir_to_rtp(char_u *fname)
{
char_u *p4, *p3, *p2, *p1, *p;
char_u *insp;
@@ -3582,125 +3682,152 @@ add_pack_plugin(char_u *fname, void *cookie)
int keep;
size_t oldlen;
size_t addlen;
char_u *afterdir;
char_u *afterdir = NULL;
size_t afterlen = 0;
char_u *ffname = fix_fname(fname);
char_u *ffname = NULL;
size_t fname_len;
char_u *buf = NULL;
char_u *rtp_ffname;
int match;
int retval = FAIL;
p4 = p3 = p2 = p1 = get_past_head(fname);
for (p = p1; *p; MB_PTR_ADV(p))
if (vim_ispathsep_nocolon(*p))
{
p4 = p3; p3 = p2; p2 = p1; p1 = p;
}
/* now we have:
* rtp/pack/name/start/name
* p4 p3 p2 p1
*
* find the part up to "pack" in 'runtimepath' */
c = *++p4; /* append pathsep in order to expand symlink */
*p4 = NUL;
ffname = fix_fname(fname);
*p4 = c;
if (ffname == NULL)
return;
if (cookie != &APP_LOAD && strstr((char *)p_rtp, (char *)ffname) == NULL)
return FAIL;
/* Find "ffname" in "p_rtp", ignoring '/' vs '\' differences. */
fname_len = STRLEN(ffname);
insp = p_rtp;
buf = alloc(MAXPATHL);
if (buf == NULL)
goto theend;
while (*insp != NUL)
{
/* directory is not yet in 'runtimepath', add it */
p4 = p3 = p2 = p1 = get_past_head(ffname);
for (p = p1; *p; MB_PTR_ADV(p))
if (vim_ispathsep_nocolon(*p))
{
p4 = p3; p3 = p2; p2 = p1; p1 = p;
}
/* now we have:
* rtp/pack/name/start/name
* p4 p3 p2 p1
*
* find the part up to "pack" in 'runtimepath' */
c = *p4;
*p4 = NUL;
/* Find "ffname" in "p_rtp", ignoring '/' vs '\' differences. */
fname_len = STRLEN(ffname);
insp = p_rtp;
buf = alloc(MAXPATHL);
if (buf == NULL)
copy_option_part(&insp, buf, MAXPATHL, ",");
add_pathsep(buf);
rtp_ffname = fix_fname(buf);
if (rtp_ffname == NULL)
goto theend;
while (*insp != NUL)
{
copy_option_part(&insp, buf, MAXPATHL, ",");
add_pathsep(buf);
rtp_ffname = fix_fname(buf);
if (rtp_ffname == NULL)
goto theend;
match = vim_fnamencmp(rtp_ffname, ffname, fname_len) == 0;
vim_free(rtp_ffname);
if (match)
break;
}
if (*insp == NUL)
/* not found, append at the end */
insp = p_rtp + STRLEN(p_rtp);
else
/* append after the matching directory. */
--insp;
*p4 = c;
/* check if rtp/pack/name/start/name/after exists */
afterdir = concat_fnames(ffname, (char_u *)"after", TRUE);
if (afterdir != NULL && mch_isdir(afterdir))
afterlen = STRLEN(afterdir) + 1; /* add one for comma */
oldlen = STRLEN(p_rtp);
addlen = STRLEN(ffname) + 1; /* add one for comma */
new_rtp = alloc((int)(oldlen + addlen + afterlen + 1));
/* add one for NUL */
if (new_rtp == NULL)
goto theend;
keep = (int)(insp - p_rtp);
mch_memmove(new_rtp, p_rtp, keep);
new_rtp[keep] = ',';
mch_memmove(new_rtp + keep + 1, ffname, addlen);
if (p_rtp[keep] != NUL)
mch_memmove(new_rtp + keep + addlen, p_rtp + keep,
oldlen - keep + 1);
if (afterlen > 0)
{
STRCAT(new_rtp, ",");
STRCAT(new_rtp, afterdir);
}
set_option_value((char_u *)"rtp", 0L, new_rtp, 0);
vim_free(new_rtp);
vim_free(afterdir);
match = vim_fnamencmp(rtp_ffname, ffname, fname_len) == 0;
vim_free(rtp_ffname);
if (match)
break;
}
if (cookie != &APP_ADD_DIR)
if (*insp == NUL)
/* not found, append at the end */
insp = p_rtp + STRLEN(p_rtp);
else
/* append after the matching directory. */
--insp;
/* check if rtp/pack/name/start/name/after exists */
afterdir = concat_fnames(fname, (char_u *)"after", TRUE);
if (afterdir != NULL && mch_isdir(afterdir))
afterlen = STRLEN(afterdir) + 1; /* add one for comma */
oldlen = STRLEN(p_rtp);
addlen = STRLEN(fname) + 1; /* add one for comma */
new_rtp = alloc((int)(oldlen + addlen + afterlen + 1));
/* add one for NUL */
if (new_rtp == NULL)
goto theend;
keep = (int)(insp - p_rtp);
mch_memmove(new_rtp, p_rtp, keep);
new_rtp[keep] = ',';
mch_memmove(new_rtp + keep + 1, fname, addlen);
if (p_rtp[keep] != NUL)
mch_memmove(new_rtp + keep + addlen, p_rtp + keep, oldlen - keep + 1);
if (afterlen > 0)
{
static char *plugpat = "%s/plugin/**/*.vim";
static char *ftpat = "%s/ftdetect/*.vim";
int len;
char_u *pat;
len = (int)STRLEN(ffname) + (int)STRLEN(ftpat);
pat = alloc(len);
if (pat == NULL)
goto theend;
vim_snprintf((char *)pat, len, plugpat, ffname);
source_all_matches(pat);
#ifdef FEAT_AUTOCMD
{
char_u *cmd = vim_strsave((char_u *)"g:did_load_filetypes");
/* If runtime/filetype.vim wasn't loaded yet, the scripts will be
* found when it loads. */
if (cmd != NULL && eval_to_number(cmd) > 0)
{
do_cmdline_cmd((char_u *)"augroup filetypedetect");
vim_snprintf((char *)pat, len, ftpat, ffname);
source_all_matches(pat);
do_cmdline_cmd((char_u *)"augroup END");
}
vim_free(cmd);
}
#endif
vim_free(pat);
STRCAT(new_rtp, ",");
STRCAT(new_rtp, afterdir);
}
set_option_value((char_u *)"rtp", 0L, new_rtp, 0);
vim_free(new_rtp);
retval = OK;
theend:
vim_free(buf);
vim_free(ffname);
vim_free(afterdir);
return retval;
}
/*
* Load scripts in "plugin" and "ftdetect" directories of the package.
*/
static int
load_pack_plugin(char_u *fname)
{
static char *plugpat = "%s/plugin/**/*.vim";
static char *ftpat = "%s/ftdetect/*.vim";
int len;
char_u *ffname = fix_fname(fname);
char_u *pat = NULL;
int retval = FAIL;
if (ffname == NULL)
return FAIL;
len = (int)STRLEN(ffname) + (int)STRLEN(ftpat);
pat = alloc(len);
if (pat == NULL)
goto theend;
vim_snprintf((char *)pat, len, plugpat, ffname);
source_all_matches(pat);
{
char_u *cmd = vim_strsave((char_u *)"g:did_load_filetypes");
/* If runtime/filetype.vim wasn't loaded yet, the scripts will be
* found when it loads. */
if (cmd != NULL && eval_to_number(cmd) > 0)
{
do_cmdline_cmd((char_u *)"augroup filetypedetect");
vim_snprintf((char *)pat, len, ftpat, ffname);
source_all_matches(pat);
do_cmdline_cmd((char_u *)"augroup END");
}
vim_free(cmd);
}
vim_free(pat);
retval = OK;
theend:
vim_free(ffname);
return retval;
}
/* used for "cookie" of add_pack_plugin() */
static int APP_ADD_DIR;
static int APP_LOAD;
static int APP_BOTH;
static void
add_pack_plugin(char_u *fname, void *cookie)
{
if (cookie != &APP_LOAD && strstr((char *)p_rtp, (char *)fname) == NULL)
/* directory is not yet in 'runtimepath', add it */
if (add_pack_dir_to_rtp(fname) == FAIL)
return;
if (cookie != &APP_ADD_DIR)
load_pack_plugin(fname);
}
/*
@@ -3773,8 +3900,9 @@ ex_packadd(exarg_T *eap)
vim_free(pat);
}
}
#endif
#if defined(FEAT_EVAL) && defined(FEAT_AUTOCMD)
#if defined(FEAT_EVAL) || defined(PROTO)
/*
* ":options"
*/
@@ -4170,23 +4298,21 @@ do_source(
goto theend;
}
#ifdef FEAT_AUTOCMD
/* Apply SourceCmd autocommands, they should get the file and source it. */
if (has_autocmd(EVENT_SOURCECMD, fname_exp, NULL)
&& apply_autocmds(EVENT_SOURCECMD, fname_exp, fname_exp,
FALSE, curbuf))
{
# ifdef FEAT_EVAL
#ifdef FEAT_EVAL
retval = aborting() ? FAIL : OK;
# else
#else
retval = OK;
# endif
#endif
goto theend;
}
/* Apply SourcePre autocommands, they may get the file. */
apply_autocmds(EVENT_SOURCEPRE, fname_exp, fname_exp, FALSE, curbuf);
#endif
#ifdef USE_FOPEN_NOINH
cookie.fp = fopen_noinh_readbin((char *)fname_exp);
@@ -5048,7 +5174,6 @@ source_finished(
}
#endif
#if defined(FEAT_LISTCMDS) || defined(PROTO)
/*
* ":checktime [buffer]"
*/
@@ -5069,7 +5194,6 @@ ex_checktime(exarg_T *eap)
}
no_check_timestamps = save_no_check_timestamps;
}
#endif
#if (defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \
&& (defined(FEAT_EVAL) || defined(FEAT_MULTI_LANG))
@@ -5462,8 +5586,7 @@ free_locales(void)
{
for (i = 0; locales[i] != NULL; i++)
vim_free(locales[i]);
vim_free(locales);
locales = NULL;
VIM_CLEAR(locales);
}
}
# endif

View File

@@ -81,15 +81,8 @@ static void ex_abclear(exarg_T *eap);
# define ex_menu ex_ni
# define ex_menutranslate ex_ni
#endif
#ifdef FEAT_AUTOCMD
static void ex_autocmd(exarg_T *eap);
static void ex_doautocmd(exarg_T *eap);
#else
# define ex_autocmd ex_ni
# define ex_doautocmd ex_ni
# define ex_doautoall ex_ni
#endif
#ifdef FEAT_LISTCMDS
static void ex_bunload(exarg_T *eap);
static void ex_buffer(exarg_T *eap);
static void ex_bmodified(exarg_T *eap);
@@ -97,20 +90,6 @@ static void ex_bnext(exarg_T *eap);
static void ex_bprevious(exarg_T *eap);
static void ex_brewind(exarg_T *eap);
static void ex_blast(exarg_T *eap);
#else
# define ex_bunload ex_ni
# define ex_buffer ex_ni
# define ex_bmodified ex_ni
# define ex_bnext ex_ni
# define ex_bprevious ex_ni
# define ex_brewind ex_ni
# define ex_blast ex_ni
# define buflist_list ex_ni
# define ex_checktime ex_ni
#endif
#if !defined(FEAT_LISTCMDS)
# define ex_buffer_all ex_ni
#endif
static char_u *getargcmd(char_u **);
static char_u *skip_cmd_arg(char_u *p, int rembs);
static int getargopt(exarg_T *eap);
@@ -190,20 +169,11 @@ static void ex_goto(exarg_T *eap);
static void ex_shell(exarg_T *eap);
static void ex_preserve(exarg_T *eap);
static void ex_recover(exarg_T *eap);
#ifndef FEAT_LISTCMDS
# define ex_argedit ex_ni
# define ex_argadd ex_ni
# define ex_argdelete ex_ni
# define ex_listdo ex_ni
#endif
static void ex_mode(exarg_T *eap);
static void ex_wrongmodifier(exarg_T *eap);
static void ex_find(exarg_T *eap);
static void ex_open(exarg_T *eap);
static void ex_edit(exarg_T *eap);
#if !defined(FEAT_GUI) && !defined(FEAT_CLIENTSERVER)
# define ex_drop ex_ni
#endif
#ifndef FEAT_GUI
# define ex_gui ex_nogui
static void ex_nogui(exarg_T *eap);
@@ -213,7 +183,8 @@ static void ex_tearoff(exarg_T *eap);
#else
# define ex_tearoff ex_ni
#endif
#if (defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_GTK)) && defined(FEAT_MENU)
#if (defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_GTK) \
|| defined(FEAT_TERM_POPUP_MENU)) && defined(FEAT_MENU)
static void ex_popup(exarg_T *eap);
#else
# define ex_popup ex_ni
@@ -237,6 +208,10 @@ static void ex_popup(exarg_T *eap);
# define ex_syntax ex_ni
# define ex_ownsyntax ex_ni
#endif
#ifndef FEAT_EVAL
# define ex_packadd ex_ni
# define ex_packloadall ex_ni
#endif
#if !defined(FEAT_SYN_HL) || !defined(FEAT_PROFILE)
# define ex_syntime ex_ni
#endif
@@ -393,13 +368,8 @@ static void ex_viminfo(exarg_T *eap);
# define ex_viminfo ex_ni
#endif
static void ex_behave(exarg_T *eap);
#ifdef FEAT_AUTOCMD
static void ex_filetype(exarg_T *eap);
static void ex_setfiletype(exarg_T *eap);
#else
# define ex_filetype ex_ni
# define ex_setfiletype ex_ni
#endif
#ifndef FEAT_DIFF
# define ex_diffoff ex_ni
# define ex_diffpatch ex_ni
@@ -410,7 +380,7 @@ static void ex_setfiletype(exarg_T *eap);
#endif
static void ex_digraphs(exarg_T *eap);
static void ex_set(exarg_T *eap);
#if !defined(FEAT_EVAL) || !defined(FEAT_AUTOCMD)
#if !defined(FEAT_EVAL)
# define ex_options ex_ni
#endif
#ifdef FEAT_SEARCH_EXTRA
@@ -868,8 +838,7 @@ do_cmdline(
{
/* Each '|' separated command is stored separately in lines_ga, to
* be able to jump to it. Don't use next_cmdline now. */
vim_free(cmdline_copy);
cmdline_copy = NULL;
VIM_CLEAR(cmdline_copy);
/* Check if a function has returned or, unless it has an unclosed
* try conditional, aborted. */
@@ -1084,8 +1053,7 @@ do_cmdline(
if (next_cmdline == NULL)
{
vim_free(cmdline_copy);
cmdline_copy = NULL;
VIM_CLEAR(cmdline_copy);
#ifdef FEAT_CMDHIST
/*
* If the command was typed, remember it for the ':' register.
@@ -1176,6 +1144,13 @@ do_cmdline(
}
}
/* Check for the next breakpoint after a watchexpression */
if (breakpoint != NULL && has_watchexpr())
{
*breakpoint = dbg_find_breakpoint(FALSE, fname, sourcing_lnum);
*dbg_tick = debug_tick;
}
/*
* When not inside any ":while" loop, clear remembered lines.
*/
@@ -1759,11 +1734,8 @@ do_one_cmd(
/* avoid that a function call in 'statusline' does this */
&& !getline_equal(fgetline, cookie, get_func_line)
#endif
#ifdef FEAT_AUTOCMD
/* avoid that an autocommand, e.g. QuitPre, does this */
&& !getline_equal(fgetline, cookie, getnextac)
#endif
)
&& !getline_equal(fgetline, cookie, getnextac))
--quitmore;
/*
@@ -1910,7 +1882,6 @@ do_one_cmd(
case 'n': if (checkforcmd(&ea.cmd, "noautocmd", 3))
{
#ifdef FEAT_AUTOCMD
if (cmdmod.save_ei == NULL)
{
/* Set 'eventignore' to "all". Restore the
@@ -1919,7 +1890,6 @@ do_one_cmd(
set_string_option_direct((char_u *)"ei", -1,
(char_u *)"all", OPT_FREE, SID_NONE);
}
#endif
continue;
}
if (!checkforcmd(&ea.cmd, "noswapfile", 3))
@@ -2300,7 +2270,6 @@ do_one_cmd(
goto doend;
}
#ifdef FEAT_AUTOCMD
/* If this looks like an undefined user command and there are CmdUndefined
* autocommands defined, trigger the matching autocommands. */
if (p != NULL && ea.cmdidx == CMD_SIZE && !ea.skip
@@ -2317,9 +2286,12 @@ do_one_cmd(
vim_free(p);
/* If the autocommands did something and didn't cause an error, try
* finding the command again. */
p = (ret && !aborting()) ? find_command(&ea, NULL) : ea.cmd;
}
p = (ret
#ifdef FEAT_EVAL
&& !aborting()
#endif
) ? find_command(&ea, NULL) : ea.cmd;
}
#ifdef FEAT_USR_CMDS
if (p == NULL)
@@ -2419,7 +2391,6 @@ do_one_cmd(
errormsg = (char_u *)_(get_text_locked_msg());
goto doend;
}
#ifdef FEAT_AUTOCMD
/* Disallow editing another buffer when "curbuf_lock" is set.
* Do allow ":edit" (check for argument later).
* Do allow ":checktime" (it's postponed). */
@@ -2429,7 +2400,6 @@ do_one_cmd(
&& !IS_USER_CMDIDX(ea.cmdidx)
&& curbuf_locked())
goto doend;
#endif
if (!ni && !(ea.argt & RANGE) && ea.addr_count > 0)
{
@@ -2847,7 +2817,6 @@ do_one_cmd(
goto doend;
}
#ifdef FEAT_LISTCMDS
/*
* Accept buffer name. Cannot be used at the same time with a buffer
* number. Don't do this for a user command.
@@ -2876,10 +2845,19 @@ do_one_cmd(
ea.addr_count = 1;
ea.arg = skipwhite(p);
}
#endif
/* The :try command saves the emsg_silent flag, reset it here when
* ":silent! try" was used, it should only apply to :try itself. */
if (ea.cmdidx == CMD_try && did_esilent > 0)
{
emsg_silent -= did_esilent;
if (emsg_silent < 0)
emsg_silent = 0;
did_esilent = 0;
}
/*
* 7. Switch on command name.
* 7. Execute the command.
*
* The "ea" structure holds the arguments that can be used.
*/
@@ -2959,7 +2937,7 @@ doend:
if (verbose_save >= 0)
p_verbose = verbose_save;
#ifdef FEAT_AUTOCMD
if (cmdmod.save_ei != NULL)
{
/* Restore 'eventignore' to the value before ":noautocmd". */
@@ -2967,7 +2945,7 @@ doend:
OPT_FREE, SID_NONE);
free_string_option(cmdmod.save_ei);
}
#endif
if (cmdmod.filter_regmatch.regprog != NULL)
vim_regfree(cmdmod.filter_regmatch.regprog);
@@ -4013,14 +3991,12 @@ set_one_cmd_context(
}
}
break;
#ifdef FEAT_AUTOCMD
case CMD_autocmd:
return set_context_in_autocmd(xp, arg, FALSE);
case CMD_doautocmd:
case CMD_doautoall:
return set_context_in_autocmd(xp, arg, TRUE);
#endif
case CMD_set:
set_context_in_set_cmd(xp, arg, 0);
break;
@@ -4109,7 +4085,6 @@ set_one_cmd_context(
set_context_in_sign_cmd(xp, arg);
break;
#endif
#ifdef FEAT_LISTCMDS
case CMD_bdelete:
case CMD_bwipeout:
case CMD_bunload:
@@ -4122,7 +4097,6 @@ set_one_cmd_context(
xp->xp_context = EXPAND_BUFFERS;
xp->xp_pattern = arg;
break;
#endif
#ifdef FEAT_USR_CMDS
case CMD_USER:
case CMD_USER_BUF:
@@ -4294,6 +4268,13 @@ set_one_cmd_context(
break;
#endif
case CMD_argdelete:
while ((xp->xp_pattern = vim_strchr(arg, ' ')) != NULL)
arg = xp->xp_pattern + 1;
xp->xp_context = EXPAND_ARGLIST;
xp->xp_pattern = arg;
break;
#endif /* FEAT_CMDL_COMPL */
default:
@@ -5488,7 +5469,6 @@ ex_abclear(exarg_T *eap)
map_clear(eap->cmd, eap->arg, TRUE, TRUE);
}
#if defined(FEAT_AUTOCMD) || defined(PROTO)
static void
ex_autocmd(exarg_T *eap)
{
@@ -5522,9 +5502,7 @@ ex_doautocmd(exarg_T *eap)
if (call_do_modelines && did_aucmd)
do_modelines(0);
}
#endif
#ifdef FEAT_LISTCMDS
/*
* :[N]bunload[!] [N] [bufname] unload buffer
* :[N]bdelete[!] [N] [bufname] delete buffer from buffer list
@@ -5623,7 +5601,6 @@ ex_blast(exarg_T *eap)
if (eap->do_ecmd_cmd != NULL)
do_cmdline_cmd(eap->do_ecmd_cmd);
}
#endif
int
ends_excmd(int c)
@@ -5802,11 +5779,9 @@ uc_add_command(
goto fail;
}
vim_free(cmd->uc_rep);
cmd->uc_rep = NULL;
VIM_CLEAR(cmd->uc_rep);
#if defined(FEAT_EVAL) && defined(FEAT_CMDL_COMPL)
vim_free(cmd->uc_compl_arg);
cmd->uc_compl_arg = NULL;
VIM_CLEAR(cmd->uc_compl_arg);
#endif
break;
}
@@ -5884,6 +5859,7 @@ static struct
char *name;
} command_complete[] =
{
{EXPAND_ARGLIST, "arglist"},
{EXPAND_AUGROUP, "augroup"},
{EXPAND_BEHAVE, "behave"},
{EXPAND_BUFFERS, "buffer"},
@@ -7192,8 +7168,35 @@ not_exiting(void)
settmode(TMODE_RAW);
}
static int
before_quit_autocmds(win_T *wp, int quit_all, int forceit)
{
apply_autocmds(EVENT_QUITPRE, NULL, NULL, FALSE, wp->w_buffer);
/* Bail out when autocommands closed the window.
* Refuse to quit when the buffer in the last window is being closed (can
* only happen in autocommands). */
if (!win_valid(wp)
|| curbuf_locked()
|| (wp->w_buffer->b_nwindows == 1 && wp->w_buffer->b_locked > 0))
return TRUE;
if (quit_all || (check_more(FALSE, forceit) == OK && only_one_window()))
{
apply_autocmds(EVENT_EXITPRE, NULL, NULL, FALSE, curbuf);
/* Refuse to quit when locked or when the buffer in the last window is
* being closed (can only happen in autocommands). */
if (curbuf_locked()
|| (curbuf->b_nwindows == 1 && curbuf->b_locked > 0))
return TRUE;
}
return FALSE;
}
/*
* ":quit": quit current window, quit Vim if the last window is closed.
* ":{nr}quit": quit window {nr}
*/
static void
ex_quit(exarg_T *eap)
@@ -7224,18 +7227,13 @@ ex_quit(exarg_T *eap)
else
wp = curwin;
#ifdef FEAT_AUTOCMD
/* Refuse to quit when locked. */
if (curbuf_locked())
return;
apply_autocmds(EVENT_QUITPRE, NULL, NULL, FALSE, wp->w_buffer);
/* Bail out when autocommands closed the window.
* Refuse to quit when the buffer in the last window is being closed (can
* only happen in autocommands). */
if (!win_valid(wp)
|| (wp->w_buffer->b_nwindows == 1 && wp->w_buffer->b_locked > 0))
/* Trigger QuitPre and maybe ExitPre */
if (before_quit_autocmds(wp, FALSE, eap->forceit))
return;
#endif
#ifdef FEAT_NETBEANS_INTG
netbeansForcedQuit = eap->forceit;
@@ -7308,13 +7306,9 @@ ex_quit_all(exarg_T *eap)
text_locked_msg();
return;
}
#ifdef FEAT_AUTOCMD
apply_autocmds(EVENT_QUITPRE, NULL, NULL, FALSE, curbuf);
/* Refuse to quit when locked or when the buffer in the last window is
* being closed (can only happen in autocommands). */
if (curbuf_locked() || (curbuf->b_nwindows == 1 && curbuf->b_locked > 0))
if (before_quit_autocmds(curwin, TRUE, eap->forceit))
return;
#endif
exiting = TRUE;
if (eap->forceit || !check_changed_any(FALSE, FALSE))
@@ -7335,11 +7329,7 @@ ex_close(exarg_T *eap)
cmdwin_result = Ctrl_C;
else
#endif
if (!text_locked()
#ifdef FEAT_AUTOCMD
&& !curbuf_locked()
#endif
)
if (!text_locked() && !curbuf_locked())
{
if (eap->addr_count == 0)
ex_win_close(eap->forceit, curwin, NULL);
@@ -7555,11 +7545,7 @@ ex_tabclose(exarg_T *eap)
tabpage_close_other(tp, eap->forceit);
return;
}
else if (!text_locked()
#ifdef FEAT_AUTOCMD
&& !curbuf_locked()
#endif
)
else if (!text_locked() && !curbuf_locked())
tabpage_close(eap->forceit);
}
}
@@ -7652,9 +7638,7 @@ tabpage_close_other(tabpage_T *tp, int forceit)
break;
}
#ifdef FEAT_AUTOCMD
apply_autocmds(EVENT_TABCLOSED, NULL, NULL, FALSE, curbuf);
#endif
redraw_tabline = TRUE;
if (h != tabline_height())
@@ -7762,7 +7746,7 @@ ex_stop(exarg_T *eap)
}
/*
* ":exit", ":xit" and ":wq": Write file and exit Vim.
* ":exit", ":xit" and ":wq": Write file and quite the current window.
*/
static void
ex_exit(exarg_T *eap)
@@ -7780,13 +7764,9 @@ ex_exit(exarg_T *eap)
text_locked_msg();
return;
}
#ifdef FEAT_AUTOCMD
apply_autocmds(EVENT_QUITPRE, NULL, NULL, FALSE, curbuf);
/* Refuse to quit when locked or when the buffer in the last window is
* being closed (can only happen in autocommands). */
if (curbuf_locked() || (curbuf->b_nwindows == 1 && curbuf->b_locked > 0))
if (before_quit_autocmds(curwin, FALSE, eap->forceit))
return;
#endif
/*
* if more files or windows we won't exit
@@ -7891,10 +7871,9 @@ handle_drop(
/* Postpone this while editing the command line. */
if (text_locked())
return;
#ifdef FEAT_AUTOCMD
if (curbuf_locked())
return;
#endif
/* When the screen is being updated we should not change buffers and
* windows structures, it may cause freed memory to be used. */
if (updating_screen)
@@ -7982,7 +7961,6 @@ alist_unlink(alist_T *al)
}
}
#if defined(FEAT_LISTCMDS) || defined(HAVE_DROP_FILE) || defined(PROTO)
/*
* Create a new argument list and use it for the current window.
*/
@@ -8002,7 +7980,6 @@ alist_new(void)
alist_init(curwin->w_alist);
}
}
#endif
#if !defined(UNIX) || defined(PROTO)
/*
@@ -8058,6 +8035,14 @@ alist_set(
int fnum_len)
{
int i;
static int recursive = 0;
if (recursive)
{
EMSG(_(e_au_recursive));
return;
}
++recursive;
alist_clear(al);
if (ga_grow(&al->al_ga, count) == OK)
@@ -8087,6 +8072,8 @@ alist_set(
FreeWild(count, files);
if (al == &global_alist)
arg_had_last = FALSE;
--recursive;
}
/*
@@ -8229,11 +8216,10 @@ ex_splitview(exarg_T *eap)
&& eap->cmdidx != CMD_vnew
&& eap->cmdidx != CMD_new)
{
# ifdef FEAT_AUTOCMD
if (
# ifdef FEAT_GUI
# ifdef FEAT_GUI
!gui.in_use &&
# endif
# endif
au_has_group((char_u *)"FileExplorer"))
{
/* No browsing supported but we do have the file explorer:
@@ -8242,7 +8228,6 @@ ex_splitview(exarg_T *eap)
eap->arg = (char_u *)".";
}
else
# endif
{
fname = do_browse(0, (char_u *)_("Edit File in new window"),
eap->arg, NULL, NULL, NULL, curbuf);
@@ -8278,20 +8263,18 @@ ex_splitview(exarg_T *eap)
else if (win_split(eap->addr_count > 0 ? (int)eap->line2 : 0,
*eap->cmd == 'v' ? WSP_VERT : 0) != FAIL)
{
# ifdef FEAT_SCROLLBIND
/* Reset 'scrollbind' when editing another file, but keep it when
* doing ":split" without arguments. */
if (*eap->arg != NUL
# ifdef FEAT_BROWSE
# ifdef FEAT_BROWSE
|| cmdmod.browse
# endif
# endif
)
{
RESET_BINDING(curwin);
}
else
do_check_scrollbind(FALSE);
# endif
do_exedit(eap, old_curwin);
}
@@ -8646,12 +8629,11 @@ do_exedit(
#endif
)
{
#ifdef FEAT_AUTOCMD
/* Can't edit another file when "curbuf_lock" is set. Only ":edit"
* can bring us here, others are stopped earlier. */
if (*eap->arg != NUL && curbuf_locked())
return;
#endif
n = readonlymode;
if (eap->cmdidx == CMD_view || eap->cmdidx == CMD_sview)
readonlymode = TRUE;
@@ -8669,9 +8651,7 @@ do_exedit(
+ (eap->forceit ? ECMD_FORCEIT : 0)
/* after a split we can use an existing buffer */
+ (old_curwin != NULL ? ECMD_OLDBUF : 0)
#ifdef FEAT_LISTCMDS
+ (eap->cmdidx == CMD_badd ? ECMD_ADDBUF : 0 )
#endif
, old_curwin == NULL ? curwin : NULL) == FAIL)
{
/* Editing the file failed. If the window was split, close it. */
@@ -8680,7 +8660,7 @@ do_exedit(
need_hide = (curbufIsChanged() && curbuf->b_nwindows <= 1);
if (!need_hide || buf_hide(curbuf))
{
#if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL)
#if defined(FEAT_EVAL)
cleanup_T cs;
/* Reset the error/interrupt/exception state here so that
@@ -8692,7 +8672,7 @@ do_exedit(
#endif
win_close(curwin, !need_hide && !buf_hide(curbuf));
#if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL)
#if defined(FEAT_EVAL)
/* Restore the error/interrupt/exception state if not
* discarded by a new aborting error, interrupt, or
* uncaught exception. */
@@ -8759,11 +8739,21 @@ ex_tearoff(exarg_T *eap)
}
#endif
#if (defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_GTK)) && defined(FEAT_MENU)
#if (defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_GTK) \
|| defined(FEAT_TERM_POPUP_MENU)) && defined(FEAT_MENU)
static void
ex_popup(exarg_T *eap)
{
gui_make_popup(eap->arg, eap->forceit);
# if defined(FEAT_GUI_MSWIN) || defined(FEAT_GUI_GTK)
if (gui.in_use)
gui_make_popup(eap->arg, eap->forceit);
# ifdef FEAT_TERM_POPUP_MENU
else
# endif
# endif
# ifdef FEAT_TERM_POPUP_MENU
pum_make_popup(eap->arg, eap->forceit);
# endif
}
#endif
@@ -8784,7 +8774,6 @@ ex_swapname(exarg_T *eap UNUSED)
static void
ex_syncbind(exarg_T *eap UNUSED)
{
#ifdef FEAT_SCROLLBIND
win_T *wp;
win_T *save_curwin = curwin;
buf_T *save_curbuf = curbuf;
@@ -8852,7 +8841,6 @@ ex_syncbind(exarg_T *eap UNUSED)
ins_typebuf(ctrl_o, REMAP_NONE, 0, TRUE, FALSE);
}
}
#endif
}
@@ -8905,7 +8893,7 @@ ex_read(exarg_T *eap)
}
if (i != OK)
{
#if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL)
#if defined(FEAT_EVAL)
if (!aborting())
#endif
EMSG2(_(e_notopen), eap->arg);
@@ -8940,11 +8928,8 @@ static char_u *prev_dir = NULL;
void
free_cd_dir(void)
{
vim_free(prev_dir);
prev_dir = NULL;
vim_free(globaldir);
globaldir = NULL;
VIM_CLEAR(prev_dir);
VIM_CLEAR(globaldir);
}
#endif
@@ -8955,8 +8940,7 @@ free_cd_dir(void)
void
post_chdir(int local)
{
vim_free(curwin->w_localdir);
curwin->w_localdir = NULL;
VIM_CLEAR(curwin->w_localdir);
if (local)
{
/* If still in global directory, need to remember current
@@ -8971,8 +8955,7 @@ post_chdir(int local)
{
/* We are now in the global directory, no need to remember its
* name. */
vim_free(globaldir);
globaldir = NULL;
VIM_CLEAR(globaldir);
}
shorten_fnames(TRUE);
@@ -8996,10 +8979,8 @@ ex_cd(exarg_T *eap)
else
#endif
{
#ifdef FEAT_AUTOCMD
if (allbuf_locked())
return;
#endif
if (vim_strchr(p_cpo, CPO_CHDIR) != NULL && curbufIsChanged()
&& !eap->forceit)
{
@@ -9048,11 +9029,17 @@ ex_cd(exarg_T *eap)
EMSG(_(e_failed));
else
{
post_chdir(eap->cmdidx == CMD_lcd || eap->cmdidx == CMD_lchdir);
int is_local_chdir = eap->cmdidx == CMD_lcd
|| eap->cmdidx == CMD_lchdir;
post_chdir(is_local_chdir);
/* Echo the new current directory if the command was typed. */
if (KeyTyped || p_verbose >= 5)
ex_pwd(eap);
apply_autocmds(EVENT_DIRCHANGED,
is_local_chdir ? (char_u *)"window" : (char_u *)"global",
new_dir, FALSE, curbuf);
}
vim_free(tofree);
}
@@ -9932,7 +9919,7 @@ ex_mkrc(
*dirnow = NUL;
if (*dirnow != NUL && (ssop_flags & SSOP_SESDIR))
{
if (vim_chdirfile(fname) == OK)
if (vim_chdirfile(fname, NULL) == OK)
shorten_fnames(TRUE);
}
else if (*dirnow != NUL
@@ -10563,21 +10550,15 @@ find_cmdline_var(char_u *src, int *usedlen)
#define SPEC_SFILE (SPEC_CFILE + 1)
"<slnum>", /* ":so" file line number */
#define SPEC_SLNUM (SPEC_SFILE + 1)
#ifdef FEAT_AUTOCMD
"<afile>", /* autocommand file name */
# define SPEC_AFILE (SPEC_SLNUM + 1)
#define SPEC_AFILE (SPEC_SLNUM + 1)
"<abuf>", /* autocommand buffer number */
# define SPEC_ABUF (SPEC_AFILE + 1)
#define SPEC_ABUF (SPEC_AFILE + 1)
"<amatch>", /* autocommand match name */
# define SPEC_AMATCH (SPEC_ABUF + 1)
#endif
#define SPEC_AMATCH (SPEC_ABUF + 1)
#ifdef FEAT_CLIENTSERVER
"<client>"
# ifdef FEAT_AUTOCMD
# define SPEC_CLIENT (SPEC_AMATCH + 1)
# else
# define SPEC_CLIENT (SPEC_SLNUM + 1)
# endif
# define SPEC_CLIENT (SPEC_AMATCH + 1)
#endif
};
@@ -10776,7 +10757,6 @@ eval_vars(
break;
#endif
#ifdef FEAT_AUTOCMD
case SPEC_AFILE: /* file name for autocommand */
result = autocmd_fname;
if (result != NULL && !autocmd_fname_full)
@@ -10815,7 +10795,6 @@ eval_vars(
}
break;
#endif
case SPEC_SFILE: /* file name for ":so" command */
result = sourcing_name;
if (result == NULL)
@@ -10951,7 +10930,6 @@ arg_all(void)
return retval;
}
#if defined(FEAT_AUTOCMD) || defined(PROTO)
/*
* Expand the <sfile> string in "arg".
*
@@ -11013,7 +10991,6 @@ expand_sfile(char_u *arg)
return result;
}
#endif
#ifdef FEAT_SESSION
static int ses_winsizes(FILE *fd, int restore_size,
@@ -11115,6 +11092,11 @@ makeopens(
{
if (!(only_save_windows && buf->b_nwindows == 0)
&& !(buf->b_help && !(ssop_flags & SSOP_HELP))
#ifdef FEAT_TERMINAL
/* skip terminal buffers: finished ones are not useful, others
* will be resurrected and result in a new buffer */
&& !bt_terminal(buf)
#endif
&& buf->b_fname != NULL
&& buf->b_p_bl)
{
@@ -11325,7 +11307,8 @@ makeopens(
/*
* Wipe out an empty unnamed buffer we started in.
*/
if (put_line(fd, "if exists('s:wipebuf')") == FAIL)
if (put_line(fd, "if exists('s:wipebuf') && s:wipebuf != bufnr('%')")
== FAIL)
return FAIL;
if (put_line(fd, " silent exe 'bwipe ' . s:wipebuf") == FAIL)
return FAIL;
@@ -11485,6 +11468,12 @@ ses_do_frame(frame_T *fr)
static int
ses_do_win(win_T *wp)
{
#ifdef FEAT_TERMINAL
if (bt_terminal(wp->w_buffer))
return !term_is_finished(wp->w_buffer)
&& (ssop_flags & SSOP_TERMINAL)
&& term_should_restore(wp->w_buffer);
#endif
if (wp->w_buffer->b_fname == NULL
#ifdef FEAT_QUICKFIX
/* When 'buftype' is "nofile" can't restore the window contents. */
@@ -11550,13 +11539,21 @@ put_view(
/* Edit the file. Skip this when ":next" already did it. */
if (add_edit && (!did_next || wp->w_arg_idx_invalid))
{
# ifdef FEAT_TERMINAL
if (bt_terminal(wp->w_buffer))
{
if (term_write_session(fd, wp) == FAIL)
return FAIL;
}
else
# endif
/*
* Load the file.
*/
if (wp->w_buffer->b_ffname != NULL
#ifdef FEAT_QUICKFIX
# ifdef FEAT_QUICKFIX
&& !bt_nofile(wp->w_buffer)
#endif
# endif
)
{
/*
@@ -11574,8 +11571,7 @@ put_view(
|| fputs(" | else | edit ", fd) < 0
|| ses_fname(fd, wp->w_buffer, flagp, FALSE) == FAIL
|| fputs(" | endif", fd) < 0
||
put_eol(fd) == FAIL)
|| put_eol(fd) == FAIL)
return FAIL;
}
else
@@ -12045,7 +12041,6 @@ get_mapclear_arg(expand_T *xp UNUSED, int idx)
return NULL;
}
#ifdef FEAT_AUTOCMD
static int filetype_detect = FALSE;
static int filetype_plugin = FALSE;
static int filetype_indent = FALSE;
@@ -12159,7 +12154,6 @@ ex_setfiletype(exarg_T *eap)
did_filetype = FALSE;
}
}
#endif
static void
ex_digraphs(exarg_T *eap UNUSED)
@@ -12183,7 +12177,7 @@ ex_set(exarg_T *eap)
flags = OPT_LOCAL;
else if (eap->cmdidx == CMD_setglobal)
flags = OPT_GLOBAL;
#if defined(FEAT_EVAL) && defined(FEAT_AUTOCMD) && defined(FEAT_BROWSE)
#if defined(FEAT_EVAL) && defined(FEAT_BROWSE)
if (cmdmod.browse && flags == 0)
ex_options(eap);
else

View File

@@ -146,7 +146,6 @@ static void set_search_match(pos_T *t);
#endif
#ifdef FEAT_AUTOCMD
static void
trigger_cmd_autocmd(int typechar, int evt)
{
@@ -156,7 +155,6 @@ trigger_cmd_autocmd(int typechar, int evt)
typestr[1] = NUL;
apply_autocmds(evt, typestr, typestr, FALSE, curbuf);
}
#endif
/*
* Abandon the command line.
@@ -164,8 +162,7 @@ trigger_cmd_autocmd(int typechar, int evt)
static void
abandon_cmdline(void)
{
vim_free(ccline.cmdbuff);
ccline.cmdbuff = NULL;
VIM_CLEAR(ccline.cmdbuff);
if (msg_scrolled == 0)
compute_cmdrow();
MSG("");
@@ -267,9 +264,7 @@ getcmdline(
* custom status line may invoke ":normal". */
struct cmdline_info save_ccline;
#endif
#ifdef FEAT_AUTOCMD
int cmdline_type;
#endif
#ifdef FEAT_EVAL
if (firstc == -1)
@@ -377,11 +372,11 @@ getcmdline(
b_im_ptr = &curbuf->b_p_imsearch;
if (*b_im_ptr == B_IMODE_LMAP)
State |= LANGMAP;
#ifdef FEAT_MBYTE
#ifdef HAVE_INPUT_METHOD
im_set_active(*b_im_ptr == B_IMODE_IM);
#endif
}
#ifdef FEAT_MBYTE
#ifdef HAVE_INPUT_METHOD
else if (p_imcmdline)
im_set_active(TRUE);
#endif
@@ -397,11 +392,9 @@ getcmdline(
* terminal mode set to cooked. Need to set raw mode here then. */
settmode(TMODE_RAW);
#ifdef FEAT_AUTOCMD
/* Trigger CmdlineEnter autocommands. */
cmdline_type = firstc == NUL ? '-' : firstc;
trigger_cmd_autocmd(cmdline_type, EVENT_CMDLINEENTER);
#endif
#ifdef FEAT_CMDHIST
init_history();
@@ -500,10 +493,7 @@ getcmdline(
&& c != K_KPAGEDOWN && c != K_KPAGEUP
&& c != K_LEFT && c != K_RIGHT
&& (xpc.xp_numfiles > 0 || (c != Ctrl_P && c != Ctrl_N)))
{
vim_free(lookfor);
lookfor = NULL;
}
VIM_CLEAR(lookfor);
#endif
/*
@@ -1096,8 +1086,7 @@ getcmdline(
)
goto cmdline_not_changed;
vim_free(ccline.cmdbuff); /* no commandline to return */
ccline.cmdbuff = NULL;
VIM_CLEAR(ccline.cmdbuff); /* no commandline to return */
if (!cmd_silent)
{
#ifdef FEAT_RIGHTLEFT
@@ -1137,7 +1126,7 @@ getcmdline(
{
/* ":lmap" mappings exists, toggle use of mappings. */
State ^= LANGMAP;
#ifdef FEAT_MBYTE
#ifdef HAVE_INPUT_METHOD
im_set_active(FALSE); /* Disable input method */
#endif
if (b_im_ptr != NULL)
@@ -1148,7 +1137,7 @@ getcmdline(
*b_im_ptr = B_IMODE_NONE;
}
}
#ifdef FEAT_MBYTE
#ifdef HAVE_INPUT_METHOD
else
{
/* There are no ":lmap" mappings, toggle IM. When
@@ -1951,6 +1940,9 @@ cmdline_not_changed:
#endif
cmdline_changed:
/* Trigger CmdlineChanged autocommands. */
trigger_cmd_autocmd(cmdline_type, EVENT_CMDLINECHANGED);
#ifdef FEAT_SEARCH_EXTRA
/*
* 'incsearch' highlighting.
@@ -2160,13 +2152,11 @@ returncmd:
if (some_key_typed)
need_wait_return = FALSE;
#ifdef FEAT_AUTOCMD
/* Trigger CmdlineLeave autocommands. */
trigger_cmd_autocmd(cmdline_type, EVENT_CMDLINELEAVE);
#endif
State = save_State;
#ifdef FEAT_MBYTE
#ifdef HAVE_INPUT_METHOD
if (b_im_ptr != NULL && *b_im_ptr != B_IMODE_LMAP)
im_save_status(b_im_ptr);
im_set_active(FALSE);
@@ -2266,7 +2256,6 @@ get_text_locked_msg(void)
return e_secure;
}
#if defined(FEAT_AUTOCMD) || defined(PROTO)
/*
* Check if "curbuf_lock" or "allbuf_lock" is set and return TRUE when it is
* and give an error message.
@@ -2296,7 +2285,6 @@ allbuf_locked(void)
}
return FALSE;
}
#endif
static int
cmdline_charsize(int idx)
@@ -3678,10 +3666,7 @@ nextwild(
|| ccline.cmdbuff[i + j] == '?')
break;
if ((int)STRLEN(p2) < j)
{
vim_free(p2);
p2 = NULL;
}
VIM_CLEAR(p2);
}
}
}
@@ -3827,8 +3812,7 @@ ExpandOne(
{
FreeWild(xp->xp_numfiles, xp->xp_files);
xp->xp_numfiles = -1;
vim_free(orig_save);
orig_save = NULL;
VIM_CLEAR(orig_save);
}
findex = 0;
@@ -4987,10 +4971,8 @@ ExpandFromContext(
{EXPAND_SYNTIME, get_syntime_arg, TRUE, TRUE},
#endif
{EXPAND_HIGHLIGHT, get_highlight_name, TRUE, TRUE},
#ifdef FEAT_AUTOCMD
{EXPAND_EVENTS, get_event_name, TRUE, TRUE},
{EXPAND_AUGROUP, get_augroup_name, TRUE, TRUE},
#endif
#ifdef FEAT_CSCOPE
{EXPAND_CSCOPE, get_cscope_name, TRUE, TRUE},
#endif
@@ -5007,6 +4989,7 @@ ExpandFromContext(
#endif
{EXPAND_ENV_VARS, get_env_name, TRUE, TRUE},
{EXPAND_USER, get_users, TRUE, FALSE},
{EXPAND_ARGLIST, get_arglist_name, TRUE, FALSE},
};
int i;
@@ -5319,8 +5302,9 @@ ExpandUserDefined(
char_u *retstr;
char_u *s;
char_u *e;
char_u keep;
int keep;
garray_T ga;
int skip;
retstr = call_user_expand_func(call_func_retstr, xp, num_file, file);
if (retstr == NULL)
@@ -5333,23 +5317,19 @@ ExpandUserDefined(
if (e == NULL)
e = s + STRLEN(s);
keep = *e;
*e = 0;
*e = NUL;
if (xp->xp_pattern[0] && vim_regexec(regmatch, s, (colnr_T)0) == 0)
skip = xp->xp_pattern[0] && vim_regexec(regmatch, s, (colnr_T)0) == 0;
*e = keep;
if (!skip)
{
*e = keep;
if (*e != NUL)
++e;
continue;
if (ga_grow(&ga, 1) == FAIL)
break;
((char_u **)ga.ga_data)[ga.ga_len] = vim_strnsave(s, (int)(e - s));
++ga.ga_len;
}
if (ga_grow(&ga, 1) == FAIL)
break;
((char_u **)ga.ga_data)[ga.ga_len] = vim_strnsave(s, (int)(e - s));
++ga.ga_len;
*e = keep;
if (*e != NUL)
++e;
}
@@ -6732,8 +6712,7 @@ finish_viminfo_history(vir_T *virp)
else
concat_history(type);
vim_free(viminfo_history[type]);
viminfo_history[type] = NULL;
VIM_CLEAR(viminfo_history[type]);
viminfo_hisidx[type] = 0;
}
}
@@ -6857,8 +6836,7 @@ write_viminfo_history(FILE *fp, int merge)
for (i = 0; i < viminfo_hisidx[type]; ++i)
if (viminfo_history[type] != NULL)
vim_free(viminfo_history[type][i].hisstr);
vim_free(viminfo_history[type]);
viminfo_history[type] = NULL;
VIM_CLEAR(viminfo_history[type]);
viminfo_hisidx[type] = 0;
}
}
@@ -6939,10 +6917,9 @@ open_cmdwin(void)
/* Save current window sizes. */
win_size_save(&winsizes);
# ifdef FEAT_AUTOCMD
/* Don't execute autocommands while creating the window. */
block_autocmds();
# endif
/* don't use a new tab page */
cmdmod.tab = 0;
cmdmod.noswapfile = 1;
@@ -6951,9 +6928,7 @@ open_cmdwin(void)
if (win_split((int)p_cwh, WSP_BOT) == FAIL)
{
beep_flush();
# ifdef FEAT_AUTOCMD
unblock_autocmds();
# endif
return K_IGNORE;
}
cmdwin_type = get_cmdline_type();
@@ -6972,12 +6947,10 @@ open_cmdwin(void)
# endif
RESET_BINDING(curwin);
# ifdef FEAT_AUTOCMD
/* Do execute autocommands for setting the filetype (load syntax). */
unblock_autocmds();
/* But don't allow switching to another buffer. */
++curbuf_lock;
# endif
/* Showing the prompt may have set need_wait_return, reset it. */
need_wait_return = FALSE;
@@ -6992,9 +6965,7 @@ open_cmdwin(void)
}
set_option_value((char_u *)"ft", 0L, (char_u *)"vim", OPT_LOCAL);
}
# ifdef FEAT_AUTOCMD
--curbuf_lock;
# endif
/* Reset 'textwidth' after setting 'filetype' (the Vim filetype plugin
* sets 'textwidth' to 78). */
@@ -7040,12 +7011,10 @@ open_cmdwin(void)
setmouse();
# endif
# ifdef FEAT_AUTOCMD
/* Trigger CmdwinEnter autocommands. */
trigger_cmd_autocmd(cmdwin_type, EVENT_CMDWINENTER);
if (restart_edit != 0) /* autocmd with ":startinsert" */
stuffcharReadbuff(K_NOP);
# endif
i = RedrawingDisabled;
RedrawingDisabled = 0;
@@ -7058,20 +7027,16 @@ open_cmdwin(void)
RedrawingDisabled = i;
# ifdef FEAT_AUTOCMD
# ifdef FEAT_FOLDING
# ifdef FEAT_FOLDING
save_KeyTyped = KeyTyped;
# endif
# endif
/* Trigger CmdwinLeave autocommands. */
trigger_cmd_autocmd(cmdwin_type, EVENT_CMDWINLEAVE);
# ifdef FEAT_FOLDING
# ifdef FEAT_FOLDING
/* Restore KeyTyped in case it is modified by autocommands */
KeyTyped = save_KeyTyped;
# endif
# endif
/* Restore the command line info. */
@@ -7089,7 +7054,7 @@ open_cmdwin(void)
}
else
{
# if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL)
# if defined(FEAT_EVAL)
/* autocmds may abort script processing */
if (aborting() && cmdwin_result != K_IGNORE)
cmdwin_result = Ctrl_C;
@@ -7150,10 +7115,8 @@ open_cmdwin(void)
}
}
# ifdef FEAT_AUTOCMD
/* Don't execute autocommands while deleting the window. */
block_autocmds();
# endif
# ifdef FEAT_CONCEAL
/* Avoid command-line window first character being concealed. */
curwin->w_p_cole = 0;
@@ -7171,9 +7134,7 @@ open_cmdwin(void)
/* Restore window sizes. */
win_size_restore(&winsizes);
# ifdef FEAT_AUTOCMD
unblock_autocmds();
# endif
}
ga_clear(&winsizes);

View File

@@ -100,15 +100,6 @@
* +vertsplit Vertically split windows.
*/
/*
* +listcmds Vim commands for the buffer list and the argument
* list. Without this there is no ":buffer" ":bnext",
* ":bdel", ":argdelete", etc.
*/
#ifdef FEAT_NORMAL
# define FEAT_LISTCMDS
#endif
/*
* +cmdhist Command line history.
*/
@@ -439,18 +430,11 @@
# define FEAT_MODIFY_FNAME
#endif
/*
* +autocmd ":autocmd" command
*/
#ifdef FEAT_NORMAL
# define FEAT_AUTOCMD
#endif
/*
* +diff Displaying diffs in a nice way.
* Requires +windows and +autocmd.
*/
#if defined(FEAT_NORMAL) && defined(FEAT_AUTOCMD)
#if defined(FEAT_NORMAL)
# define FEAT_DIFF
#endif
@@ -702,20 +686,6 @@
# define FEAT_LIBCALL
#endif
/*
* +scrollbind synchronization of split windows
*/
#if defined(FEAT_NORMAL)
# define FEAT_SCROLLBIND
#endif
/*
* +cursorbind synchronization of split windows
*/
#if defined(FEAT_NORMAL)
# define FEAT_CURSORBIND
#endif
/*
* +menu ":menu" command
*/
@@ -726,6 +696,13 @@
# endif
#endif
/*
* popup menu in a terminal
*/
#if defined(FEAT_MENU) && !defined(ALWAYS_USE_GUI) && defined(FEAT_INS_EXPAND)
# define FEAT_TERM_POPUP_MENU
#endif
/* There are two ways to use XPM. */
#if (defined(HAVE_XM_XPMP_H) && defined(FEAT_GUI_MOTIF)) \
|| defined(HAVE_X11_XPM_H)
@@ -1266,10 +1243,9 @@
#endif
/*
* The Netbeans feature requires +listcmds and +eval.
* The Netbeans feature requires +eval.
*/
#if (!defined(FEAT_LISTCMDS) || !defined(FEAT_EVAL)) \
&& defined(FEAT_NETBEANS_INTG)
#if !defined(FEAT_EVAL) && defined(FEAT_NETBEANS_INTG)
# undef FEAT_NETBEANS_INTG
#endif
@@ -1332,7 +1308,8 @@
/*
* +balloon_eval_term Allow balloon expression evaluation in the terminal.
*/
#if defined(FEAT_HUGE) && defined(UNIX) && defined(FEAT_TIMERS)
#if defined(FEAT_HUGE) && defined(FEAT_TIMERS) && \
(defined(UNIX) || (defined(WIN32) && !defined(FEAT_GUI_W32)))
# define FEAT_BEVAL_TERM
#endif
@@ -1394,3 +1371,10 @@
|| (defined(WIN3264) && defined(FEAT_GUI_W32))
# define FEAT_FILTERPIPE
#endif
/*
* +vtp: Win32 virtual console.
*/
#if !defined(FEAT_GUI) && defined(WIN3264)
# define FEAT_VTP
#endif

View File

@@ -47,14 +47,12 @@ static int msg_add_fileformat(int eol_type);
static void msg_add_eol(void);
static int check_mtime(buf_T *buf, stat_T *s);
static int time_differs(long t1, long t2);
#ifdef FEAT_AUTOCMD
static int apply_autocmds_exarg(event_T event, char_u *fname, char_u *fname_io, int force, buf_T *buf, exarg_T *eap);
static int au_find_group(char_u *name);
# define AUGROUP_DEFAULT -1 /* default autocmd group */
# define AUGROUP_ERROR -2 /* erroneous autocmd group */
# define AUGROUP_ALL -3 /* all autocmd groups */
#endif
#if defined(FEAT_CRYPT) || defined(FEAT_MBYTE)
# define HAS_BW_FLAGS
@@ -135,11 +133,8 @@ static int move_lines(buf_T *frombuf, buf_T *tobuf);
#ifdef TEMPDIRNAMES
static void vim_settempdir(char_u *tempdir);
#endif
#ifdef FEAT_AUTOCMD
static char *e_auchangedbuf = N_("E812: Autocommands changed buffer or buffer name");
#endif
#ifdef FEAT_AUTOCMD
/*
* Set by the apply_autocmds_group function if the given event is equal to
* EVENT_FILETYPE. Used by the readfile function in order to determine if
@@ -149,7 +144,6 @@ static char *e_auchangedbuf = N_("E812: Autocommands changed buffer or buffer na
* apply_autocmds_group.
*/
static int au_did_filetype INIT(= FALSE);
#endif
void
filemess(
@@ -307,17 +301,13 @@ readfile(
char_u conv_rest[CONV_RESTLEN];
int conv_restlen = 0; /* nr of bytes in conv_rest[] */
#endif
#ifdef FEAT_AUTOCMD
buf_T *old_curbuf;
char_u *old_b_ffname;
char_u *old_b_fname;
int using_b_ffname;
int using_b_fname;
#endif
#ifdef FEAT_AUTOCMD
au_did_filetype = FALSE; /* reset before triggering any autocommands */
#endif
curbuf->b_no_eol_lnum = 0; /* in case it was set by the previous read */
@@ -337,7 +327,6 @@ readfile(
return FAIL;
}
#ifdef FEAT_AUTOCMD
/* Remember the initial values of curbuf, curbuf->b_ffname and
* curbuf->b_fname to detect whether they are altered as a result of
* executing nasty autocommands. Also check if "fname" and "sfname"
@@ -348,7 +337,6 @@ readfile(
using_b_ffname = (fname == curbuf->b_ffname)
|| (sfname == curbuf->b_ffname);
using_b_fname = (fname == curbuf->b_fname) || (sfname == curbuf->b_fname);
#endif
/* After reading a file the cursor line changes but we don't want to
* display the line. */
@@ -369,7 +357,6 @@ readfile(
fname = sfname;
#endif
#ifdef FEAT_AUTOCMD
/*
* The BufReadCmd and FileReadCmd events intercept the reading process by
* executing the associated commands instead.
@@ -404,7 +391,6 @@ readfile(
curbuf->b_op_start = pos;
}
#endif
if ((shortmess(SHM_OVER) || curbuf->b_help) && p_verbose == 0)
msg_scroll = FALSE; /* overwrite previous file message */
@@ -613,7 +599,6 @@ readfile(
#endif
{
check_need_swap(newfile);
#ifdef FEAT_AUTOCMD
/* SwapExists autocommand may mess things up */
if (curbuf != old_curbuf
|| (using_b_ffname
@@ -624,7 +609,6 @@ readfile(
EMSG(_(e_auchangedbuf));
return FAIL;
}
#endif
}
if (dir_of_file_exists(fname))
filemess(curbuf, sfname, (char_u *)_("[New File]"), 0);
@@ -641,14 +625,12 @@ readfile(
if (eap != NULL)
set_forced_fenc(eap);
#endif
#ifdef FEAT_AUTOCMD
apply_autocmds_exarg(EVENT_BUFNEWFILE, sfname, sfname,
FALSE, curbuf, eap);
#endif
/* remember the current fileformat */
save_file_ff(curbuf);
#if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL)
#if defined(FEAT_EVAL)
if (aborting()) /* autocmds may abort script processing */
return FAIL;
#endif
@@ -701,7 +683,6 @@ readfile(
#endif
{
check_need_swap(newfile);
#ifdef FEAT_AUTOCMD
if (!read_stdin && (curbuf != old_curbuf
|| (using_b_ffname && (old_b_ffname != curbuf->b_ffname))
|| (using_b_fname && (old_b_fname != curbuf->b_fname))))
@@ -711,7 +692,6 @@ readfile(
close(fd);
return FAIL;
}
#endif
#ifdef UNIX
/* Set swap file protection bits after creating it. */
if (swap_mode > 0 && curbuf->b_ml.ml_mfp != NULL
@@ -764,7 +744,6 @@ readfile(
try_dos = (vim_strchr(p_ffs, 'd') != NULL);
try_unix = (vim_strchr(p_ffs, 'x') != NULL);
#ifdef FEAT_AUTOCMD
if (!read_buffer)
{
int m = msg_scroll;
@@ -834,7 +813,6 @@ readfile(
return FAIL;
}
}
#endif /* FEAT_AUTOCMD */
/* Autocommands may add lines to the file, need to check if it is empty */
wasempty = (curbuf->b_ml.ml_flags & ML_EMPTY);
@@ -1073,8 +1051,7 @@ retry:
if (tmpname != NULL)
{
mch_remove(tmpname); /* delete converted file */
vim_free(tmpname);
tmpname = NULL;
VIM_CLEAR(tmpname);
}
}
@@ -2602,8 +2579,7 @@ failed:
#endif
msg_add_lines(c, (long)linecnt, filesize);
vim_free(keep_msg);
keep_msg = NULL;
VIM_CLEAR(keep_msg);
msg_scrolled_ign = TRUE;
#ifdef ALWAYS_USE_GUI
/* Don't show the message when reading stdin, it would end up in a
@@ -2706,7 +2682,6 @@ failed:
}
#endif
#ifdef FEAT_AUTOCMD
if (!read_stdin && !read_fifo && (!read_buffer || sfname != NULL))
{
int m = msg_scroll;
@@ -2748,7 +2723,6 @@ failed:
return FAIL;
# endif
}
#endif
if (recoverymode && error)
return FAIL;
@@ -2955,8 +2929,7 @@ readfile_charconvert(
if (tmpname != NULL)
{
mch_remove(tmpname); /* delete converted file */
vim_free(tmpname);
tmpname = NULL;
VIM_CLEAR(tmpname);
}
}
@@ -3200,9 +3173,7 @@ buf_write(
#endif
/* writing everything */
int whole = (start == 1 && end == buf->b_ml.ml_line_count);
#ifdef FEAT_AUTOCMD
linenr_T old_line_count = buf->b_ml.ml_line_count;
#endif
int attr;
int fileformat;
int write_bin;
@@ -3322,7 +3293,6 @@ buf_write(
buf->b_op_end.lnum = end;
buf->b_op_end.col = 0;
#ifdef FEAT_AUTOCMD
{
aco_save_T aco;
int buf_ffname = FALSE;
@@ -3512,7 +3482,6 @@ buf_write(
if (buf_fname_s)
fname = buf->b_sfname;
}
#endif
#ifdef FEAT_NETBEANS_INTG
if (netbeans_active() && isNetbeansBuffer(buf))
@@ -3945,8 +3914,7 @@ buf_write(
if (st_new.st_dev == st_old.st_dev
&& st_new.st_ino == st_old.st_ino)
{
vim_free(backup);
backup = NULL; /* no backup file to delete */
VIM_CLEAR(backup); /* no backup file to delete */
/*
* may try again with 'shortname' set
*/
@@ -3980,10 +3948,7 @@ buf_write(
--*wp;
/* They all exist??? Must be something wrong. */
if (*wp == 'a')
{
vim_free(backup);
backup = NULL;
}
VIM_CLEAR(backup);
}
}
break;
@@ -4010,10 +3975,7 @@ buf_write(
(void)umask(umask_save);
#endif
if (bfd < 0)
{
vim_free(backup);
backup = NULL;
}
VIM_CLEAR(backup);
else
{
/* Set file protection same as original file, but
@@ -4156,10 +4118,7 @@ buf_write(
--*p;
/* They all exist??? Must be something wrong! */
if (*p == 'a')
{
vim_free(backup);
backup = NULL;
}
VIM_CLEAR(backup);
}
}
if (backup != NULL)
@@ -4177,8 +4136,7 @@ buf_write(
if (vim_rename(fname, backup) == 0)
break;
vim_free(backup); /* don't do the rename below */
backup = NULL;
VIM_CLEAR(backup); /* don't do the rename below */
}
}
if (backup == NULL && !forceit)
@@ -5034,13 +4992,10 @@ restore_backup:
)
{
unchanged(buf, TRUE);
#ifdef FEAT_AUTOCMD
/* b:changedtick is always incremented in unchanged() but that
* should not trigger a TextChanged event. */
if (last_changedtick + 1 == CHANGEDTICK(buf)
&& last_changedtick_buf == buf)
last_changedtick = CHANGEDTICK(buf);
#endif
if (buf->b_last_changedtick + 1 == CHANGEDTICK(buf))
buf->b_last_changedtick = CHANGEDTICK(buf);
u_unchanged(buf);
u_update_save_nr(buf);
}
@@ -5080,8 +5035,7 @@ restore_backup:
else if (mch_stat(org, &st) < 0)
{
vim_rename(backup, (char_u *)org);
vim_free(backup); /* don't delete the file */
backup = NULL;
VIM_CLEAR(backup); /* don't delete the file */
#ifdef UNIX
set_file_time((char_u *)org, st_old.st_atime, st_old.st_mtime);
#endif
@@ -5210,7 +5164,6 @@ nofail:
}
#endif
#ifdef FEAT_AUTOCMD
#ifdef FEAT_EVAL
if (!should_abort(retval))
#else
@@ -5248,7 +5201,6 @@ nofail:
retval = FALSE;
#endif
}
#endif
got_int |= prev_got_int;
@@ -5262,37 +5214,34 @@ nofail:
static int
set_rw_fname(char_u *fname, char_u *sfname)
{
#ifdef FEAT_AUTOCMD
buf_T *buf = curbuf;
/* It's like the unnamed buffer is deleted.... */
if (curbuf->b_p_bl)
apply_autocmds(EVENT_BUFDELETE, NULL, NULL, FALSE, curbuf);
apply_autocmds(EVENT_BUFWIPEOUT, NULL, NULL, FALSE, curbuf);
# ifdef FEAT_EVAL
#ifdef FEAT_EVAL
if (aborting()) /* autocmds may abort script processing */
return FAIL;
# endif
#endif
if (curbuf != buf)
{
/* We are in another buffer now, don't do the renaming. */
EMSG(_(e_auchangedbuf));
return FAIL;
}
#endif
if (setfname(curbuf, fname, sfname, FALSE) == OK)
curbuf->b_flags |= BF_NOTEDITED;
#ifdef FEAT_AUTOCMD
/* ....and a new named one is created */
apply_autocmds(EVENT_BUFNEW, NULL, NULL, FALSE, curbuf);
if (curbuf->b_p_bl)
apply_autocmds(EVENT_BUFADD, NULL, NULL, FALSE, curbuf);
# ifdef FEAT_EVAL
#ifdef FEAT_EVAL
if (aborting()) /* autocmds may abort script processing */
return FAIL;
# endif
#endif
/* Do filetype detection now if 'filetype' is empty. */
if (*curbuf->b_p_ft == NUL)
@@ -5301,7 +5250,6 @@ set_rw_fname(char_u *fname, char_u *sfname)
(void)do_doautocmd((char_u *)"filetypedetect BufRead", FALSE, NULL);
do_modelines(0);
}
#endif
return OK;
}
@@ -6121,8 +6069,6 @@ make_bom(char_u *buf, char_u *name)
}
#endif
#if defined(FEAT_VIMINFO) || defined(FEAT_BROWSE) || \
defined(FEAT_QUICKFIX) || defined(FEAT_AUTOCMD) || defined(PROTO)
/*
* Try to find a shortname by comparing the fullname with the current
* directory.
@@ -6146,7 +6092,6 @@ shorten_fname1(char_u *full_path)
vim_free(dirname);
return p;
}
#endif
/*
* Try to find a shortname by comparing the fullname with the current
@@ -6228,8 +6173,7 @@ shorten_fnames(int force)
|| buf->b_sfname == NULL
|| mch_isFullName(buf->b_sfname)))
{
vim_free(buf->b_sfname);
buf->b_sfname = NULL;
VIM_CLEAR(buf->b_sfname);
p = shorten_fname(buf->b_ffname, dirname);
if (p != NULL)
{
@@ -6798,10 +6742,7 @@ check_timestamps(
}
if (!stuff_empty() || global_busy || !typebuf_typed()
#ifdef FEAT_AUTOCMD
|| autocmd_busy || curbuf_lock > 0 || allbuf_lock > 0
#endif
)
|| autocmd_busy || curbuf_lock > 0 || allbuf_lock > 0)
need_check_timestamps = TRUE; /* check later */
else
{
@@ -6915,14 +6856,14 @@ buf_check_timestamp(
#ifdef FEAT_GUI
int save_mouse_correct = need_mouse_correct;
#endif
#ifdef FEAT_AUTOCMD
static int busy = FALSE;
int n;
#ifdef FEAT_EVAL
char_u *s;
#endif
bufref_T bufref;
set_bufref(&bufref, buf);
#endif
/* If there is no file name, the buffer is not loaded, 'buftype' is
* set, we are in the middle of a save or being called recursively: ignore
@@ -6931,9 +6872,7 @@ buf_check_timestamp(
|| buf->b_ml.ml_mfp == NULL
|| *buf->b_p_bt != NUL
|| buf->b_saving
#ifdef FEAT_AUTOCMD
|| busy
#endif
#ifdef FEAT_NETBEANS_INTG
|| isNetbeansBuffer(buf)
#endif
@@ -6994,17 +6933,16 @@ buf_check_timestamp(
else
reason = "time";
#ifdef FEAT_AUTOCMD
/*
* Only give the warning if there are no FileChangedShell
* autocommands.
* Avoid being called recursively by setting "busy".
*/
busy = TRUE;
# ifdef FEAT_EVAL
#ifdef FEAT_EVAL
set_vim_var_string(VV_FCS_REASON, (char_u *)reason, -1);
set_vim_var_string(VV_FCS_CHOICE, (char_u *)"", -1);
# endif
#endif
++allbuf_lock;
n = apply_autocmds(EVENT_FILECHANGEDSHELL,
buf->b_fname, buf->b_fname, FALSE, buf);
@@ -7014,18 +6952,17 @@ buf_check_timestamp(
{
if (!bufref_valid(&bufref))
EMSG(_("E246: FileChangedShell autocommand deleted buffer"));
# ifdef FEAT_EVAL
#ifdef FEAT_EVAL
s = get_vim_var_str(VV_FCS_CHOICE);
if (STRCMP(s, "reload") == 0 && *reason != 'd')
reload = TRUE;
else if (STRCMP(s, "ask") == 0)
n = FALSE;
else
# endif
#endif
return 2;
}
if (!n)
#endif
{
if (*reason == 'd')
mesg = _("E211: File \"%s\" no longer available");
@@ -7117,9 +7054,7 @@ buf_check_timestamp(
}
else
{
# ifdef FEAT_AUTOCMD
if (!autocmd_busy)
# endif
{
msg_start();
msg_puts_attr(tbuf, HL_ATTR(HLF_E) + MSG_HIST);
@@ -7131,9 +7066,9 @@ buf_check_timestamp(
if (emsg_silent == 0)
{
out_flush();
# ifdef FEAT_GUI
#ifdef FEAT_GUI
if (!focus)
# endif
#endif
/* give the user some time to think about it */
ui_delay(1000L, TRUE);
@@ -7168,12 +7103,10 @@ buf_check_timestamp(
#endif
}
#ifdef FEAT_AUTOCMD
/* Trigger FileChangedShell when the file was changed in any way. */
if (bufref_valid(&bufref) && retval != 0)
(void)apply_autocmds(EVENT_FILECHANGEDSHELLPOST,
buf->b_fname, buf->b_fname, FALSE, buf);
#endif
#ifdef FEAT_GUI
/* restore this in case an autocommand has set it; it would break
* 'mousefocus' */
@@ -7257,14 +7190,12 @@ buf_reload(buf_T *buf, int orig_mode)
if (saved == OK)
{
curbuf->b_flags |= BF_CHECK_RO; /* check for RO again */
#ifdef FEAT_AUTOCMD
keep_filetype = TRUE; /* don't detect 'filetype' */
#endif
if (readfile(buf->b_ffname, buf->b_fname, (linenr_T)0,
(linenr_T)0,
(linenr_T)MAXLNUM, &ea, flags) != OK)
{
#if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL)
#if defined(FEAT_EVAL)
if (!aborting())
#endif
EMSG2(_("E321: Could not reload \"%s\""), buf->b_fname);
@@ -7313,9 +7244,7 @@ buf_reload(buf_T *buf, int orig_mode)
curwin->w_cursor = old_cursor;
check_cursor();
update_topline();
#ifdef FEAT_AUTOCMD
keep_filetype = FALSE;
#endif
#ifdef FEAT_FOLDING
{
win_T *wp;
@@ -7428,8 +7357,7 @@ vim_deltempdir(void)
/* remove the trailing path separator */
gettail(vim_tempdir)[-1] = NUL;
delete_recursive(vim_tempdir);
vim_free(vim_tempdir);
vim_tempdir = NULL;
VIM_CLEAR(vim_tempdir);
}
}
@@ -7690,12 +7618,8 @@ forward_slash(char_u *fname)
/*
* Code for automatic commands.
*
* Only included when "FEAT_AUTOCMD" has been defined.
*/
#if defined(FEAT_AUTOCMD) || defined(PROTO)
/*
* The autocommands are stored in a list for each event.
* Autocommands for the same pattern, that are consecutive, are joined
@@ -7786,6 +7710,7 @@ static struct event_name
{"BufWritePost", EVENT_BUFWRITEPOST},
{"BufWritePre", EVENT_BUFWRITEPRE},
{"BufWriteCmd", EVENT_BUFWRITECMD},
{"CmdlineChanged", EVENT_CMDLINECHANGED},
{"CmdlineEnter", EVENT_CMDLINEENTER},
{"CmdlineLeave", EVENT_CMDLINELEAVE},
{"CmdwinEnter", EVENT_CMDWINENTER},
@@ -7797,7 +7722,9 @@ static struct event_name
{"CursorHoldI", EVENT_CURSORHOLDI},
{"CursorMoved", EVENT_CURSORMOVED},
{"CursorMovedI", EVENT_CURSORMOVEDI},
{"DirChanged", EVENT_DIRCHANGED},
{"EncodingChanged", EVENT_ENCODINGCHANGED},
{"ExitPre", EVENT_EXITPRE},
{"FileEncoding", EVENT_ENCODINGCHANGED},
{"FileAppendPost", EVENT_FILEAPPENDPOST},
{"FileAppendPre", EVENT_FILEAPPENDPRE},
@@ -7846,9 +7773,11 @@ static struct event_name
{"TabEnter", EVENT_TABENTER},
{"TabLeave", EVENT_TABLEAVE},
{"TermChanged", EVENT_TERMCHANGED},
{"TerminalOpen", EVENT_TERMINALOPEN},
{"TermResponse", EVENT_TERMRESPONSE},
{"TextChanged", EVENT_TEXTCHANGED},
{"TextChangedI", EVENT_TEXTCHANGEDI},
{"TextChangedP", EVENT_TEXTCHANGEDP},
{"User", EVENT_USER},
{"VimEnter", EVENT_VIMENTER},
{"VimLeave", EVENT_VIMLEAVE},
@@ -7929,9 +7858,7 @@ static int au_get_grouparg(char_u **argp);
static int do_autocmd_event(event_T event, char_u *pat, int nested, char_u *cmd, int forceit, int group);
static int apply_autocmds_group(event_T event, char_u *fname, char_u *fname_io, int force, int group, buf_T *buf, exarg_T *eap);
static void auto_next_pat(AutoPatCmd *apc, int stop_at_last);
#if defined(FEAT_AUTOCMD) || defined(FEAT_WILDIGN)
static int match_file_pat(char_u *pattern, regprog_T **prog, char_u *fname, char_u *sfname, char_u *tail, int allow_dirs);
#endif
static event_T last_event;
@@ -8016,8 +7943,7 @@ show_autocmd(AutoPat *ap, event_T event)
static void
au_remove_pat(AutoPat *ap)
{
vim_free(ap->pat);
ap->pat = NULL;
VIM_CLEAR(ap->pat);
ap->buflocal_nr = -1;
au_need_clean = TRUE;
}
@@ -8031,10 +7957,7 @@ au_remove_cmds(AutoPat *ap)
AutoCmd *ac;
for (ac = ap->cmds; ac != NULL; ac = ac->next)
{
vim_free(ac->cmd);
ac->cmd = NULL;
}
VIM_CLEAR(ac->cmd);
au_need_clean = TRUE;
}
@@ -9033,7 +8956,6 @@ check_nomodeline(char_u **argp)
* Search for a visible window containing the current buffer. If there isn't
* one then use "aucmd_win".
* Set "curbuf" and "curwin" to match "buf".
* When FEAT_AUTOCMD is not defined another version is used, see below.
*/
void
aucmd_prepbuf(
@@ -9086,14 +9008,15 @@ aucmd_prepbuf(
aco->use_aucmd_win = 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_enter_ext(). */
vim_free(aucmd_win->w_localdir);
aucmd_win->w_localdir = NULL;
VIM_CLEAR(aucmd_win->w_localdir);
aco->globaldir = globaldir;
globaldir = NULL;
@@ -9128,7 +9051,6 @@ aucmd_prepbuf(
/*
* Cleanup after executing autocommands for a (hidden) buffer.
* Restore the window as it was (if possible).
* When FEAT_AUTOCMD is not defined another version is used, see below.
*/
void
aucmd_restbuf(
@@ -9374,6 +9296,15 @@ has_textchangedI(void)
return (first_autopat[(int)EVENT_TEXTCHANGEDI] != NULL);
}
/*
* Return TRUE when there is a TextChangedP autocommand defined.
*/
int
has_textchangedP(void)
{
return (first_autopat[(int)EVENT_TEXTCHANGEDP] != NULL);
}
/*
* Return TRUE when there is an InsertCharPre autocommand defined.
*/
@@ -9417,13 +9348,13 @@ has_textyankpost(void)
static int
apply_autocmds_group(
event_T event,
char_u *fname, /* NULL or empty means use actual file name */
char_u *fname_io, /* fname to use for <afile> on cmdline, NULL means
char_u *fname, /* NULL or empty means use actual file name */
char_u *fname_io, /* fname to use for <afile> on cmdline, NULL means
use fname */
int force, /* when TRUE, ignore autocmd_busy */
int group, /* group ID, or AUGROUP_ALL */
buf_T *buf, /* buffer for <abuf> */
exarg_T *eap) /* command arguments */
int force, /* when TRUE, ignore autocmd_busy */
int group, /* group ID, or AUGROUP_ALL */
buf_T *buf, /* buffer for <abuf> */
exarg_T *eap UNUSED) /* command arguments */
{
char_u *sfname = NULL; /* short file name */
char_u *tail;
@@ -9587,7 +9518,7 @@ apply_autocmds_group(
{
sfname = vim_strsave(fname);
/* Don't try expanding FileType, Syntax, FuncUndefined, WindowID,
* ColorScheme or QuickFixCmd* */
* ColorScheme, QuickFixCmd* or DirChanged */
if (event == EVENT_FILETYPE
|| event == EVENT_SYNTAX
|| event == EVENT_FUNCUNDEFINED
@@ -9596,7 +9527,8 @@ apply_autocmds_group(
|| event == EVENT_QUICKFIXCMDPRE
|| event == EVENT_COLORSCHEME
|| event == EVENT_OPTIONSET
|| event == EVENT_QUICKFIXCMDPOST)
|| event == EVENT_QUICKFIXCMDPOST
|| event == EVENT_DIRCHANGED)
fname = vim_strsave(fname);
else
fname = FullName_save(fname, FALSE);
@@ -9865,8 +9797,7 @@ auto_next_pat(
char_u *name;
char *s;
vim_free(sourcing_name);
sourcing_name = NULL;
VIM_CLEAR(sourcing_name);
for (ap = apc->curpat; ap != NULL && !got_int; ap = ap->next)
{
@@ -10221,43 +10152,7 @@ theend:
return retval;
}
#else /* FEAT_AUTOCMD */
/*
* Prepare for executing commands for (hidden) buffer "buf".
* This is the non-autocommand version, it simply saves "curbuf" and sets
* "curbuf" and "curwin" to match "buf".
*/
void
aucmd_prepbuf(
aco_save_T *aco, /* structure to save values in */
buf_T *buf) /* new curbuf */
{
aco->save_curbuf = curbuf;
--curbuf->b_nwindows;
curbuf = buf;
curwin->w_buffer = buf;
++curbuf->b_nwindows;
}
/*
* Restore after executing commands for a (hidden) buffer.
* This is the non-autocommand version.
*/
void
aucmd_restbuf(
aco_save_T *aco) /* structure holding saved values */
{
--curbuf->b_nwindows;
curbuf = aco->save_curbuf;
curwin->w_buffer = curbuf;
++curbuf->b_nwindows;
}
#endif /* FEAT_AUTOCMD */
#if defined(FEAT_AUTOCMD) || defined(FEAT_WILDIGN) || defined(PROTO)
/*
* Try matching a filename with a "pattern" ("prog" is NULL), or use the
* precompiled regprog "prog" ("pattern" is NULL). That avoids calling
@@ -10303,7 +10198,6 @@ match_file_pat(
vim_regfree(regmatch.regprog);
return result;
}
#endif
#if defined(FEAT_WILDIGN) || defined(PROTO)
/*
@@ -10549,8 +10443,7 @@ file_pat_to_reg_pat(
EMSG(_("E219: Missing {."));
else
EMSG(_("E220: Missing }."));
vim_free(reg_pat);
reg_pat = NULL;
VIM_CLEAR(reg_pat);
}
return reg_pat;
}

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