Compare commits

...

249 Commits

Author SHA1 Message Date
4efe73b478 patch 8.1.0601: a few compiler warnings
Problem:    A few compiler warnings.
Solution:   Add type casts. (Mike Williams)
2018-12-16 14:37:39 +01:00
d80232be54 patch 8.1.0600: channel test is flaky
Problem:    Channel test is flaky.
Solution:   Add test to list of flaky tests.
2018-12-15 17:46:23 +01:00
eeed665b0e patch 8.1.0599: without the +eval feature the indent tests don't work
Problem:    Without the +eval feature the indent tests don't work.
Solution:   Skip the body of the tests.
2018-12-15 17:43:42 +01:00
72846cfa76 patch 8.1.0598: indent tests may use the wrong Vim binary
Problem:    Indent tests may use the wrong Vim binary.
Solution:   Pass in the just built Vim binary.
2018-12-15 17:23:18 +01:00
acecb3b935 patch 8.1.0597: cannot run test_libvterm from the top directory
Problem:    Cannot run test_libvterm from the top directory.
Solution:   Add test target in toplevel Makefile.
2018-12-15 16:19:50 +01:00
21e551cce2 patch 8.1.0596: not all parts of printf() are tested
Problem:    Not all parts of printf() are tested.
Solution:   Add a few more test cases. (Dominique Pelle, closes #3691)
2018-12-15 16:08:56 +01:00
a9659e0da4 patch 8.1.0595: libvterm tests are not run with coverage
Problem:    Libvterm tests are not run with coverage.
Solution:   Adjust the Travis config.  Show the actually run commands.
2018-12-15 15:59:32 +01:00
8b321d6a52 patch 8.1.0594: libvterm tests fail to run on Mac
Problem:    Libvterm tests fail to run on Mac.
Solution:   Only run libvterm tests on Linux.
2018-12-15 15:39:28 +01:00
37e3edce20 patch 8.1.0593: illegal memory access in libvterm test
Problem:    Illegal memory access in libvterm test.
Solution:   Fix off-by-one error.
2018-12-15 14:49:34 +01:00
471f658135 patch 8.1.0592: the libvterm tests are not run as part of Vim tests
Problem:    The libvterm tests are not run as part of Vim tests.
Solution:   Add testing libvterm.
2018-12-15 14:24:39 +01:00
6c8dd39df9 patch 8.1.0591: channel sort test is flaky
Problem:    Channel sort test is flaky.
Solution:   Do not check if the job is running, it may have be done very fast.
2018-12-14 22:42:13 +01:00
cd1a62d468 patch 8.1.0590: when a job ends the closed channels are not handled
Problem:    When a job ends the closed channels are not handled.
Solution:   When a job is detected to have ended, check the channels again.
            (closes #3530)
2018-12-14 21:32:02 +01:00
142a975815 patch 8.1.0589: compilation error in gvimext.cpp
Problem:    Compilation error in gvimext.cpp.
Solution:   Return a value.  Also fix using uninitialized variable.
2018-12-14 19:54:39 +01:00
06b056e110 patch 8.1.0588: cannot define a sign with space in the text
Problem:    Cannot define a sign with space in the text.
Solution:   Allow for escaping characters. (Ben Jackson, closes #2967)
2018-12-14 19:37:08 +01:00
06d4c4c818 patch 8.1.0587: GvimExt: realloc() failing is not handled properly
Problem:    GvimExt: realloc() failing is not handled properly.
Solution:   Check for NULL return. (Jan-Jaap Korpershoek, closes #3689)
2018-12-14 19:20:02 +01:00
eae8ae1b2b patch 8.1.0586: :digraph output is not easy to read
Problem:    :digraph output is not easy to read.
Solution:   Add highlighting for :digraphs. (Marcin Szamotulski, closes #3572)
            Also add section headers for :digraphs!.
2018-12-14 18:53:02 +01:00
56242f2b08 patch 8.1.0585: undo test may fail on MS-Windows
Problem:    Undo test may fail on MS-Windows.
Solution:   Also handle lower case drive letters.
2018-12-14 15:48:48 +01:00
5f5e203c92 patch 8.1.0584: with search CTRL-L does not pick up composing characters
Problem:    With search CTRL-L does not pick up composing characters.
Solution:   Check for composing characters. (Christian Brabandt, closes #3682)
            [code change was accidentally included in 8.1.0579]
2018-12-14 15:47:03 +01:00
8f66717a1f patch 8.1.0583: using illogical name for get_dict_number()/get_dict_string()
Problem:    Using illogical name for get_dict_number()/get_dict_string().
Solution:   Rename to start with dict_.
2018-12-14 15:38:31 +01:00
fb95e212a2 patch 8.1.0582: text properties are not enabled
Problem:    Text properties are not enabled.
Solution:   Fix sizeof argument and re-enable the text properties feature.
            Fix memory leak.
2018-12-14 12:18:11 +01:00
ca79a5fc3b patch 8.1.0581: double free without the text properties feature
Problem:    Double free without the text properties feature.
Solution:   Reset the dirty flag.
2018-12-13 23:16:36 +01:00
2fa7fad831 patch 8.1.0580: invalid memory access when using text properties
Problem:    Invalid memory access when using text properties.
Solution:   Disable text properties for now.
2018-12-13 23:05:56 +01:00
98aefe7c32 patch 8.1.0579: cannot attach properties to text
Problem:    Cannot attach properties to text.
Solution:   First part of adding text properties.
2018-12-13 22:20:09 +01:00
5c5697f298 patch 8.1.0578: cannot disable arabic, rightleft and farsi in configure
Problem:    Cannot disable arabic, rightleft and farsi in configure.
Solution:   Add configur flags. (Diego Fernando Carrión, closes #1867)
2018-12-12 20:34:09 +01:00
295471920d patch 8.1.0577: tabpage right-click menu never shows "Close tab"
Problem:    Tabpage right-click menu never shows "Close tab".
Solution:   Always create the "Close tab" item but ignore the event if there
            is only one tab.
2018-12-11 20:39:19 +01:00
30700cd5ff patch 8.1.0576: indent script tests pick up installed scripts
Problem:    Indent script tests pick up installed scripts.
Solution:   Use current runtime indent scripts.
2018-12-10 21:36:56 +01:00
d47d52232b Update runtime files. 2018-12-09 20:43:55 +01:00
37402ed534 patch 8.1.0575: Termdebug: clearing multi-breakpoint does not work
Problem:    Termdebug: clearing multi-breakpoint does not work.
Solution:   Delete all X.Y breakpoints.  Keep more information about placed
            breakpoints. (Ozaki Kiichi, closes #3641)
2018-12-09 15:53:01 +01:00
4af7259b2b patch 8.1.0574: 'commentstring' not used when adding fold marker in C
Problem:    'commentstring' not used when adding fold marker in C.
Solution:   Require white space before middle comment part. (mostly by
            Hirohito Higashi)
2018-12-09 15:00:52 +01:00
55d4691308 patch 8.1.0573: cannot redefine user command without ! in same script
Problem:    Cannot redefine user command without ! in same script
Solution:   Allow redefining user command without ! in same script, like with
            functions.
2018-12-08 16:03:28 +01:00
76ab4fd619 patch 8.1.0572: stopping a job does not work properly on OpenBSD
Problem:    Stopping a job does not work properly on OpenBSD.
Solution:   Do not use getpgid() to check the process group of the job
            processs ID, always pass the negative process ID to kill().
            (George Koehler, closes #3656)
2018-12-08 14:39:05 +01:00
446e7a3cd3 patch 8.1.0571: non-silent execute() resets display column to zero
Problem:    Non-silent execute() resets display column to zero.
Solution:   Keep the display column as-is.
2018-12-08 13:57:42 +01:00
539328197c patch 8.1.0570: 'commentstring' not used when adding fold marker
Problem:    'commentstring' not used when adding fold marker. (Maxim Kim)
Solution:   Only use empty 'comments' middle when leader is empty. (Christian
            Brabandt, closes #3670)
2018-12-07 21:08:49 +01:00
10ccaa17ec patch 8.1.0569: execute() always resets display column to zero
Problem:    Execute() always resets display column to zero. (Sha Liu)
Solution:   Don't reset it to zero, restore the previous value. (closes #3669)
2018-12-07 16:38:23 +01:00
9a8534673a patch 8.1.0568: error message for NUL byte in ScreenLines breaks Travis CI
Problem:    Error message for NUL byte in ScreenLines breaks Travis CI.
Solution:   Use a normal message fornow.
2018-12-07 14:10:37 +01:00
4087bfd96d patch 8.1.0567: error for NUL byte in ScreenLines goes unnoticed
Problem:    Error for NUL byte in ScreenLines goes unnoticed.
Solution:   Add an internal error message.
2018-12-07 13:26:39 +01:00
20091c18c4 patch 8.1.0566: SGR not enabled for mintty because $TERM is "xterm"
Problem:    SGR not enabled for mintty because $TERM is "xterm".
Solution:   Detect mintty by the termresponse. (Ken Takata, closes #3667)
2018-12-07 13:18:19 +01:00
10600db772 patch 8.1.0565: asan complains about reading before allocated block
Problem:    Asan complains about reading before allocated block.
Solution:   Workaround: Avoid offset from becoming negative.
2018-12-05 19:46:07 +01:00
88b53fd052 patch 8.1.0564: setting v:errors to wrong type still possible
Problem:    Setting v:errors to wrong type still possible.
Solution:   Return after giving an error message. (Christian Brabandt)
2018-12-05 18:43:28 +01:00
74ea88c170 patch 8.1.0563: setting v:errors to a string give confusing error
Problem:    Setting v:errors to a string give confusing error. (Christian
            Brabandt)
Solution:   Change internal error into normal error message.
2018-12-04 22:37:49 +01:00
b6fc72851c patch 8.1.0562: parsing of 'diffopt' is slightly wrong
Problem:    Parsing of 'diffopt' is slightly wrong.
Solution:   Fix the parsing and add a test. (Jason Franklin, Christian
            Brabandt)
2018-12-04 22:24:16 +01:00
9719568533 patch 8.1.0561: MSCV error format has changed
Problem:    MSCV error format has changed.
Solution:   Make the space between the line number and colon optional.
2018-12-03 20:50:02 +01:00
51a7454cd2 patch 8.1.0560: cannot use address type "other" with with user command
Problem:    Cannot use address type "other" with with user command.
Solution:   Add "other" to the list. (Daniel Hahler, closes #3655)  Also
            reject "%" for commands with "other".  Add some more tests.
2018-12-02 18:21:49 +01:00
b513d3079b patch 8.1.0559: command line completion not sufficiently tested
Problem:    Command line completion not sufficiently tested.
Solution:   Add more tests. (Dominique Pelle, closes #3622)
2018-12-02 14:55:08 +01:00
d2ec51f399 patch 8.1.0558: some MS-Windows instructions are outdated
Problem:    Some MS-Windows instructions are outdated.
Solution:   Update the uninstall instructions and the NSIS README. (Ken
            Takata, closes #3614)  Also update remark about diff.exe.
2018-12-02 13:58:00 +01:00
5378e1cf0a patch 8.1.0557: Termdebug: gdb may use X.Y for breakpoint number
Problem:    Termdebug: gdb may use X.Y for breakpoint number.
Solution:   Handle X.Y breakpoint numbers. (Yasuhiro Matsumoto, close #3641)
2018-12-02 13:47:03 +01:00
ed8bc78d23 patch 8.1.0556: saving/restoring search patterns share saved last_idx
Problem:    Saving/restoring search patterns share saved last_idx.
Solution:   Use a separate saved last_idx for saving search patterns for
            functions and incremental search.
2018-12-01 21:08:21 +01:00
2fb8f684d8 patch 8.1.0555: crash when last search pat is set but not last substitute pat
Problem:    Crash when last search pat is set but not last substitute pat.
Solution:   Do not mix up last search pattern and last subtitute pattern.
            (closes #3647)
2018-12-01 13:14:45 +01:00
614ab8aa00 patch 8.1.0554: popup menu overlaps with preview window
Problem:    Popup menu overlaps with preview window.
Solution:   Adjust the height computation. (Hirohito Higashi, closes #3414)
2018-12-01 11:59:00 +01:00
07dc18ffa4 patch 8.1.0553: it is not easy to edit a script that was sourced
Problem:    It is not easy to edit a script that was sourced.
Solution:   Add a count to ":scriptnames", so that ":script 40" edits the
            script with script ID 40.
2018-11-30 22:48:32 +01:00
01a060da74 patch 8.1.0552: saved last search pattern may not be restored
Problem:    Saved last search pattern may not be restored.
Solution:   Call restore_last_search_pattern().  Add a check for balancing
            saving and restoring the last search pattern.
2018-11-30 21:57:55 +01:00
8ff5af9544 patch 8.1.0551: expression evaluation may repeat an error message
Problem:    Expression evaluation may repeat an error message. (Jason
            Franklin)
Solution:   Check for the value of did_emsg when giving an error
            for the :execute command.
2018-11-28 21:20:38 +01:00
76a6345433 patch 8.1.0550: expression evaluation may repeat an error message
Problem:    Expression evaluation may repeat an error message. (Jason
            Franklin)
Solution:   Increment did_emsg and check for the value when giving an error
            for the echo command.
2018-11-28 20:38:37 +01:00
10efcd5b02 patch 8.1.0549: netbeans test depends on README.txt contents
Problem:    Netbeans test depends on README.txt contents.
Solution:   Use a generated file instead.
2018-11-26 21:22:07 +01:00
1341024e08 patch 8.1.0548: crash when job callback unloads a buffer
Problem:    Crash when job callback unloads a buffer. (James McCoy)
Solution:   Don't round up the wait time to 10 msec in ui_inchar().
2018-11-26 21:19:11 +01:00
3067a4dd0d patch 8.1.0547: modeline test with keymap still fails
Problem:    Modeline test with keymap still fails.
Solution:   Check that the keymap feature is available for the failure assert.
2018-11-25 05:06:48 +01:00
4ace6ab7e7 patch 8.1.0546: modeline test with keymap fails
Problem:    Modeline test with keymap fails.
Solution:   Check that the keymap feature is available.
2018-11-25 04:25:58 +01:00
dc2f73a698 patch 8.1.0545: when executing indent tests user preferences interfere
Problem:    When executing indent tests user preferences interfere.
Solution:   Add "--clean".
2018-11-25 04:03:09 +01:00
b730f0c7ba Update runtime files 2018-11-25 03:56:26 +01:00
916a818cea patch 8.1.0544: setting 'filetype' in a modeline causes an error
Problem:    Setting 'filetype' in a modeline causes an error (Hirohito
            Higashi).
Solution:   Don't add the P_INSECURE flag when setting 'filetype' from a
            modeline.  Also for 'syntax'.
2018-11-25 02:18:29 +01:00
4e303c8ba8 patch 8.1.0543: Coverity warns for leaking memory and using wrong struct
Problem:    Coverity warns for leaking memory and using wrong struct.
Solution:   Free pointer when allocation fails. Change "boff" to "loff".
            (closes #3634)
2018-11-24 14:27:44 +01:00
f951416a83 patch 8.1.0542: shiftwidth() does not take 'vartabstop' into account
Problem:    shiftwidth() does not take 'vartabstop' into account.
Solution:   Use the cursor position or a position explicitly passed.
            Also make >> and << work better with 'vartabstop'. (Christian
            Brabandt)
2018-11-22 03:08:29 +01:00
2b84949ad8 patch 8.1.0541: help message in dosinst.c is outdated
Problem:    Help message in dosinst.c is outdated.
Solution:   Update the comment. (Ken Takata, closes #3626)
2018-11-21 13:58:35 +01:00
247bb7e43b patch 8.1.0540: may evaluate insecure value when appending to option
Problem:    May evaluate insecure value when appending to option.
Solution:   Set the secure flag when changing an option that was previously
            set insecurely.  Also allow numbers for the characters from
            'spelllang' that are used for LANG.vim.
2018-11-20 14:27:07 +01:00
82e8c92ebe patch 8.1.0539: cannot build without the sandbox
Problem:    Cannot build without the sandbox.
Solution:   Set the secure option instead of using the sandbox.  Also restrict
            the characters from 'spelllang' that are used for LANG.vim.
            (suggested by Yasuhiro Matsumoto)
2018-11-20 13:32:36 +01:00
5958f95a40 patch 8.1.0538: evaluating a modeline might invoke using a shell command
Problem:    Evaluating a modeline might invoke using a shell command. (Paul
            Huber)
Solution:   Set the sandbox flag when setting options from a modeline.
2018-11-20 04:25:21 +01:00
48d23bb4de patch 8.1.0537: ui_breakcheck() may be called recursively
Problem:    ui_breakcheck() may be called recursively, which doesn't work.
Solution:   When called recursively, just return. (James McCoy, closes #3617)
2018-11-20 02:42:43 +01:00
addc156c38 patch 8.1.0536: file time test fails when using NFS
Problem:    File time test fails when using NFS.
Solution:   Use three file times instead of localtim(). (James McCoy,
            closes #3618)
2018-11-18 12:25:09 +01:00
6b731886ca patch 8.1.0535: increment/decrement might get interrupted by updating folds
Problem:    Increment/decrement might get interrupted by updating folds.
Solution:   Disable fold updating for a moment. (Christian Brabandt,
            closes #3599)
2018-11-16 20:54:47 +01:00
25a494ce60 patch 8.1.0534: MS-Windows installer uses different $HOME than Vim
Problem:    MS-Windows installer uses different $HOME than Vim.
Solution:   Use the Vim logic also in the MS-Windows installer. (Ken Takata,
            closes #3564)
2018-11-16 19:39:50 +01:00
447f6ce8bd patch 8.1.0533: screendump tests can be flaky
Problem:    Screendump tests can be flaky.
Solution:   Add VerifyScreenDump to the pattern of flaky tests.
2018-11-16 18:50:19 +01:00
2d67d307ee patch 8.1.0532: cannot distinguish between quickfix and location list
Problem:    Cannot distinguish between quickfix and location list.
Solution:   Add an explicit type variable. (Yegappan Lakshmanan)
2018-11-16 18:46:02 +01:00
dbc0d2163a patch 8.1.0531: flaky tests often fail with a common error message
Problem:    Flaky tests often fail with a common error message.
Solution:   Add a pattern to match an error message indicating a flaky test.
2018-11-16 18:22:45 +01:00
c0f05d0bd1 patch 8.1.0530: channel and terminal tests that start a server can be flaky
Problem:    Channel and terminal tests that start a server can be flaky.
Solution:   Add all channel and terminal tests that start a server to the list
            of flaky tests.
2018-11-16 17:44:48 +01:00
f77af0e613 patch 8.1.0529: flaky test sometimes fails in different ways
Problem:    Flaky test sometimes fails in different ways.
Solution:   When the second run gives a different error, try running the test
            again, up to five times.
2018-11-16 16:52:16 +01:00
c4568ab37e patch 8.1.0528: various typos in comments
Problem:    Various typos in comments.
Solution:   Fix the typos.
2018-11-16 16:21:05 +01:00
f0d58efc9d Update runtime files. 2018-11-16 16:13:44 +01:00
0c27cbcacf patch 8.1.0527: using 'shiftwidth' from wrong buffer for folding
Problem:    Using 'shiftwidth' from wrong buffer for folding.
Solution:   Use "buf" instead of "curbuf". (Christian Brabandt)
2018-11-14 21:45:32 +01:00
61fb8d8c67 patch 8.1.0526: running out of signal stack in RealWaitForChar
Problem:    Running out of signal stack in RealWaitForChar. (Vladimir Marek)
Solution:   Make the fd_set variables static.
2018-11-12 21:45:08 +01:00
d3471e5785 patch 8.1.0525: terminal test skips part on Windows
Problem:    Terminal test skips part on Windows.
Solution:   Fix Test_terminal_does_not_truncate_last_newlines(). (Hirohito
            Higashi, closes #3606)
2018-11-12 21:42:24 +01:00
c2c02574ec patch 8.1.0524: terminal test fails on Windows
Problem:    Terminal test fails on Windows.
Solution:   Skip Test_terminal_does_not_truncate_last_newlines() for now.
2018-11-11 23:14:54 +01:00
b244373bec patch 8.1.0523: opening window from quickfix leaves empty buffer behind
Problem:    Opening window from quickfix leaves empty buffer behind.
Solution:   Add qf_jump_newwin(). (Yegappan Lakshmanan, closes #2574)
2018-11-11 22:50:27 +01:00
f3aea59afa patch 8.1.0522: :terminal does not show trailing empty lines
Problem:    :terminal does not show trailing empty lines.
Solution:   Add empty lines. (Hirohito Higashi, closes #3605)
2018-11-11 22:18:21 +01:00
883ba68cda patch 8.1.0521: cannot build with +eval but without +quickfix
Problem:    Cannot build with +eval but without +quickfix.
Solution:   Remove #ifdef for e_stringreq. (John Marriott)
2018-11-11 21:22:57 +01:00
218959bc91 patch 8.1.0520: screen diff test sometimes fails
Problem:    Screen diff test sometimes fails.
Solution:   Add to list of flaky tests.
2018-11-11 18:51:42 +01:00
f49cc60aa8 patch 8.1.0519: cannot save and restore the tag stack
Problem:    Cannot save and restore the tag stack.
Solution:   Add gettagstack() and settagstack(). (Yegappan Lakshmanan,
            closes #3604)
2018-11-11 15:21:05 +01:00
8617b40159 patch 8.1.0518: Test_window_split_edit_bufnr() fails on AppVeyor
Problem:    Test_window_split_edit_bufnr() fails on AppVeyor.
Solution:   Disable the failing part for now.
2018-11-10 20:47:48 +01:00
d42333d8e9 patch 8.1.0517: Test_window_split_edit_alternate() fails on AppVeyor
Problem:    Test_window_split_edit_alternate() fails on AppVeyor.
Solution:   Disable the failing part for now.
2018-11-10 20:28:19 +01:00
ddd1f9183b patch 8.1.0516: :move command marks buffer modified when nothing changed
Problem:    :move command marks buffer modified when nothing changed.
Solution:   Do not set 'modified'.  Add a test. (Jason Franklin)
2018-11-10 19:19:36 +01:00
ded5f1bed7 patch 8.1.0515: reloading a script gives errors for existing functions
Problem:    Reloading a script gives errors for existing functions.
Solution:   Allow redefining a function once when reloading a script.
2018-11-10 17:33:29 +01:00
1bbb619483 patch 8.1.0514: CTRL-W ^ does not work when alternate buffer has no name
Problem:    CTRL-W ^ does not work when alternate buffer has no name.
Solution:   Use another method to split and edit the alternate buffer. (Jason
            Franklin)
2018-11-10 16:02:01 +01:00
d0721058f4 patch 8.1.0513: no error for set diffopt+=algorithm:
Problem:    No error for set diffopt+=algorithm:.
Solution:   Check for missing argument. (Hirohito Higashi, closes #3598)
2018-11-05 21:21:33 +01:00
389ab7122b patch 8.1.0512: 'helplang' default is inconsistent for C and C.UTF-8
Problem:    'helplang' default is inconsistent for C and C.UTF-8.
Solution:   Don't accept a value unless it starts with two letters.
2018-11-05 20:25:52 +01:00
9e353b5265 patch 8.1.0511: ml_get error when calling a function with a range
Problem:    ml_get error when calling a function with a range.
Solution:   Don't position the cursor after the last line.
2018-11-04 23:39:38 +01:00
ba3ff53930 Update runtime files 2018-11-04 14:45:49 +01:00
dcd71cbaed patch 8.1.0510: filter test fails when $LANG is C.UTF-8
Problem:    Filter test fails when $LANG is C.UTF-8.
Solution:   Set 'helplang' to "en" for any C language. (Christian Brabandt,
            closes #3577)
2018-11-04 14:40:47 +01:00
0b38f54730 patch 8.1.0509: checking cwd not accessible fails for root
Problem:    Checking cwd not accessible fails for root. (James McCoy)
Solution:   Skip this part of the test for root. (closes #3595)
2018-11-03 21:47:16 +01:00
0f62cf5b33 patch 8.1.0508: suspend test fails when run by root
Problem:    Suspend test fails when run by root.
Solution:   Accept both '$' and '#' for the prompt. (James McCoy, closes #3590)
2018-11-03 21:09:15 +01:00
da1c11c641 patch 8.1.0507: .raml files not properly detected
Problem:    .raml files not properly detected.
Solution:   Recognize .raml as raml instead of yaml. (closes #3594)
2018-11-03 19:52:15 +01:00
9691f82f86 patch 8.1.0506: modeline test fails when run by root
Problem:    Modeline test fails when run by root.
Solution:   Set 'modeline' for the test. (James McCoy, closes #3592)
2018-11-03 19:06:25 +01:00
bd9a0c611c patch 8.1.0505: filter command test may fail if helplang is not set
Problem:    Filter command test may fail if helplang is not set.
Solution:   Set 'helplang' for the test. (James McCoy, closes #3591)
2018-11-03 19:00:14 +01:00
4dbc262764 patch 8.1.0504: when CTRL-C is mapped it triggers InsertLeave
Problem:    When CTRL-C is mapped it triggers InsertLeave.
Solution:   Make CTRL-C behave the same way when typed or used in a mapping.
2018-11-02 11:59:15 +01:00
f7acf2b63c patch 8.1.0503: missing change to diff test
Problem:    Missing change to diff test. (Hirohito Higashi)
Solution:   Add the missing test function.
2018-11-01 21:14:53 +01:00
f080d70a82 patch 8.1.0502: internal diff fails when diffing a context diff
Problem:    Internal diff fails when diffing a context diff. (Hirohito Higashi)
Solution:   Only use callback calls with one line. (closes #3581)
2018-10-31 22:57:26 +01:00
a9a8e04eab patch 8.1.0501: cppcheck warns for using array index before bounds check
Problem:    Cppcheck warns for using array index before bounds check.
Solution:   Swap the conditions. (Dominique Pelle)
2018-10-30 22:15:55 +01:00
833e5dab14 patch 8.1.0500: cleaning up in src/tee may not always work
Problem:    Cleaning up in src/tee may not always work.
Solution:   Use "rm" when appropriate. (Michael Soyka, closes #3571)
2018-10-28 15:43:58 +01:00
1c29943416 patch 8.1.0499: :2vimgrep causes an ml_get error
Problem:    :2vimgrep causes an ml_get error
Solution:   Pass tomatch pointer instead of value. (Yegappan Lakshmanan)
2018-10-28 14:36:09 +01:00
d474686a09 patch 8.1.0498: /etc/gitconfig not recognized at a gitconfig file
Problem:    /etc/gitconfig not recognized at a gitconfig file.
Solution:   Add pattern to filetype detection. (closes #3568)
2018-10-27 14:27:20 +02:00
5f57bdcab7 patch 8.1.0497: :%diffput changes order of lines
Problem:    :%diffput changes order of lines. (Markus Braun)
Solution:   Do adjust marks when using internal diff.
2018-10-25 17:52:23 +02:00
c0fe4978f2 patch 8.1.0496: no tests for indent files
Problem:    No tests for indent files.
Solution:   Add a mechanism for running indent file tests.  Add a first test
            for Vim indenting.
2018-10-25 16:53:19 +02:00
f86db78fed patch 8.1.0495: :filter only supports some commands
Problem:    :filter only supports some commands.
Solution:   Add :filter support for more commands. (Marcin Szamotulski,
            closes #2856)
2018-10-25 13:31:37 +02:00
babfcf54ae patch 8.1.0494: functions do not check for a window ID in other tabs
Problem:    Functions do not check for a window ID in other tabs.
Solution:   Also find the window ID in other than the current tab.
2018-10-25 13:11:16 +02:00
e6e3989c1b patch 8.1.0493: argv() and argc() only work on the current argument list
Problem:    argv() and argc() only work on the current argument list.
Solution:   Add a window ID argument. (Yegappan Lakshmanan, closes #832)
2018-10-25 12:32:11 +02:00
bf9679ae46 patch 8.1.0492: "Edit with existing Vim" list can get long
Problem:    "Edit with existing Vim" list can get long.
Solution:   Move the list to a submenu. (Ken Takata, closes #3561)
2018-10-25 11:25:53 +02:00
0fd6be77de patch 8.1.0491: if a terminal dump has CR it is considered corrupt
Problem:    If a terminal dump has CR it is considered corrupt.
Solution:   Ignore CR characters. (Nobuhiro Takasaki, closes #3558)
2018-10-23 21:42:59 +02:00
eda9e9c2fe patch 8.1.0490: MS-Windows: doesn't handle missing glibwinpthread-1.dll
Problem:    MS-Windows: doesn't handle missing glibwinpthread-1.dll.
Solution:   Adjust Cygwin/MinGW build file. (Ken Takata, closes #2827)
2018-10-21 22:45:43 +02:00
b6f1480a6a patch 8.1.0489: crash when autocmd clears vimpgrep location list
Problem:    Crash when autocmd clears vimpgrep location list.
Solution:   Return from qf_jump_edit_buffer() early. (Yegappan Lakshmanan)
2018-10-21 18:47:43 +02:00
9f84ded38b patch 8.1.0488: using freed memory in quickfix code
Problem:    Using freed memory in quickfix code. (Dominique Pelle)
Solution:   Add the quickfix_busy() flag to postpone deleting quickfix lists
            until it is safe. (Yegappan Lakshmanan, closes #3538)
2018-10-20 20:54:02 +02:00
4c5d815256 patch 8.1.0487: no menus specifically for the terminal window
Problem:    No menus specifically for the terminal window.
Solution:   Add :tlmenu. (Yee Cheng Chin, closes #3439) Add a menu test.
2018-10-19 22:36:53 +02:00
42a4ea10af patch 8.1.0486: can't build in MS-Windows
Problem:    Can't build in MS-Windows.
Solution:   Put mch_access() call inside #ifdef
2018-10-19 17:36:01 +02:00
839e81e12d patch 8.1.0485: term_start() does not check if directory is accessible
Problem:    term_start() does not check if directory is accessible.
Solution:   Add mch_access() call. (Jason Franklin)
2018-10-19 16:53:39 +02:00
38654503b0 patch 8.1.0484: some file types are not recognized
Problem:    Some file types are not recognized.
Solution:   Update the file type detection.
2018-10-19 16:27:31 +02:00
2c64ca1802 Update runtime files 2018-10-19 16:22:31 +02:00
04c86d27fe patch 8.1.0483: MinGW does not build tee.exe
Problem:    MinGW does not build tee.exe.
Solution:   Add build instructions. (Yasuhiro Matsumoto, closes #3548)
2018-10-17 22:45:54 +02:00
115510f0bd patch 8.1.0482: MinGW "make clean" deletes all .exe files
Problem:    MinGW "make clean" deletes all .exe files.
Solution:   Only delete .exe files that it builds. (Ken takata)
2018-10-17 22:12:14 +02:00
29e7fe55be patch 8.1.0481: when "Terminal" highlight is reverted cursor doesn't show
Problem:    When "Terminal" highlight is reverted cursor doesn't show.
Solution:   Get the colors of the "Terminal" group. (closes #3546)
2018-10-16 22:13:00 +02:00
b361db077f patch 8.1.0480: MinGW build file uses different -I flags than MVC
Problem:    MinGW build file uses different -I flags than MVC.
Solution:   Add -I to $CFLAGS. (Ken takata)
2018-10-16 21:13:14 +02:00
64f410742f patch 8.1.0479: failure when setting 'varsofttabstop' to end in a comma
Problem:    Failure when setting 'varsofttabstop' to end in a comma. (Ralf
            Schandl)
Solution:   Reject value with trailing command.  Add test for invalid values
            (closes #3544)
2018-10-15 22:51:50 +02:00
65dc12143a patch 8.1.0478: cannot build with perl using MinGW
Problem:    Cannot build with perl using MinGW.
Solution:   Add -I. (Ken takata, Cesar Romani)
2018-10-15 20:11:18 +02:00
d95c3c253c patch 8.1.0477: tiny build fails
Problem:    Tiny build fails.
Solution:   Add a dummy declaration for funccal_entry_T.
2018-10-14 22:38:09 +02:00
a2aad02830 patch 8.1.0476: memory leaks in test_escaped_glob
Problem:    Memory leaks in test_escaped_glob.
Solution:   Avoid failure when running the shell, use the sandbox.
2018-10-14 22:03:56 +02:00
27e80c885b patch 8.1.0475: memory not freed on exit when quit in autocmd
Problem:    Memory not freed on exit when quit in autocmd.
Solution:   Remember funccal stack when executing autocmd.
2018-10-14 21:41:01 +02:00
a16bc54503 patch 8.1.0474: directory where if_perl.c is written is inconsistent
Problem:    Directory where if_perl.c is written is inconsistent.
Solution:   use auto/if_perl.c for MS-Windows. (Ken Takata, closes #3540)
2018-10-14 16:25:10 +02:00
d6105cb408 patch 8.1.0473: user doesn't notice file does not exist when swap file does
Problem:    User doesn't notice file does not exist when swap file does.
Solution:   Add a note that the file cannot be found.  Make the "still
            running" notice stand out.
2018-10-13 19:06:27 +02:00
6cdb2c9811 patch 8.1.0472: dosinst command has a few flaws
Problem:    Dosinst command has a few flaws.
Solution:   Register DisplayIcon, DisplayVersion and Publisher for the
            uninstaller. (closes #3485)  Don't set 'diffexpr' if internal diff
            is supported. Allow for using Vi compatible from the command line.
            Remove needless sleeps.  Add comments in the generated _vimrc.
            (Ken Takata, closes #3525)
2018-10-13 17:25:27 +02:00
453ce7c16b patch 8.1.0471: some tests are flaky or fail on some systems
Problem:    Some tests are flaky or fail on some systems.
Solution:   Increase waiting time for port number. Use "cmd /c" to execute
            "echo" on win32. (Ken Takata, closes #3534)
2018-10-12 22:15:12 +02:00
3d6014f033 patch 8.1.0470: pointer ownership around fname_expand() is unclear
Problem:    Pointer ownership around fname_expand() is unclear.
Solution:   Allow b_ffname and b_sfname to point to the same allocated memory,
            only free one.  Update comments.
2018-10-11 19:27:47 +02:00
108e7b422b patch 8.1.0469: too often indexing in qf_lists[]
Problem:    Too often indexing in qf_lists[].
Solution:   Use a qf_list_T pointer. (Yegappan Lakshmanan)
2018-10-11 17:39:12 +02:00
0664089ecc patch 8.1.0468: MS-Windows: filter command with pipe character fails
Problem:    MS-Windows: Filter command with pipe character fails. (Johannes
            Riecken)
Solution:   Find the pipe character outside of quotes. (Yasuhiro Matsumoto,
            closes #1743, closes #3523)
2018-10-09 21:49:33 +02:00
1d3dbcf743 patch 8.1.0467: cannot build with Mac OS X 10.5
Problem:    Cannot build with Mac OS X 10.5.
Solution:   Change #ifdef into #if. (Akshay Hegde, closes #3022)
2018-10-08 20:07:39 +02:00
6a2633b00b patch 8.1.0466: autocmd test fails
Problem:    Autocmd test fails.
Solution:   Do call inchar() when flushing typeahead.
2018-10-07 23:16:36 +02:00
95ba5c364f patch 8.1.0465: client-server test fails
Problem:    Client-server test fails.
Solution:   Change logic in EnumWindows().
2018-10-07 22:47:07 +02:00
1df2fa47b4 patch 8.1.0464: MS-Windows: job_info() has cmd without backslashes
Problem:    MS-Windows: job_info() has cmd without backslashes. (Daniel
            Hahler)
Solution:   Use rem_backslash(). (closes #3517, closes #3404)
2018-10-07 21:36:11 +02:00
798184cc67 patch 8.1.0463: "simalt ~x" in .vimrc blocks swap file prompt
Problem:    "simalt ~x" in .vimrc blocks swap file prompt.
Solution:   Flush buffers before prompting. (Yasuhiro Matsumoto,
            closes #3518, closes #2192)
2018-10-07 20:48:39 +02:00
c0543e145f patch 8.1.0462: when using ConPTY Vim can be a child process
Problem:    When using ConPTY Vim can be a child process.
Solution:   To find a Vim window use both EnumWindows() and
            EnumChildWindows(). (Nobuhiro Takasaki, closes #3521)
2018-10-07 20:35:12 +02:00
00bf8cd211 patch 8.1.0461: quickfix code uses too many /* */ comments
Problem:    Quickfix code uses too many /* */ comments.
Solution:   Change to // comments. (Yegappan Lakshmanan)
2018-10-07 20:26:20 +02:00
1307d1c003 patch 8.1.0460: assert_fails() does not take a message argument
Problem:    assert_fails() does not take a message argument
Solution:   Add the argument.
2018-10-07 20:16:49 +02:00
a05a0d325c patch 8.1.0459: Test_executable fails when there is a dog in the system
Problem:    Test_executable fails when there is a dog in the system.
Solution:   Rename the dog. (Hirohito Higashi)
2018-10-07 18:43:05 +02:00
df77cef92e patch 8.1.0458: ml_get error and crash when using "do"
Problem:    Ml_get error and crash when using "do".
Solution:   Adjust cursor position also when diffupdate is not needed.
            (Hirohito Higashi)
2018-10-07 17:46:42 +02:00
0cc7b2d6cc patch 8.1.0457: win32 console: key mappings don't work
Problem:    Win32 console: key mappings don't work.
Solution:   Use another solution for the keypad keys that doesn't break
            mappings. Some values will be negative. (Mike Williams)
2018-10-07 15:49:56 +02:00
d8f27b30d6 patch 8.1.0456: running test hangs when the input file is being edited
Problem:    Running test hangs when the input file is being edited.
Solution:   Use a SwapExists autocommand to ignore editing the test script.
2018-10-07 15:42:07 +02:00
019dfe6855 patch 8.1.0455: checking for empty quickfix stack is not consistent
Problem:    Checking for empty quickfix stack is not consistent.
Solution:   Use qf_stack_empty(). (Yegappan Lakshmanan)
2018-10-07 14:38:49 +02:00
2610990709 patch 8.1.0454: resolve() was not tested with a symlink cycle
Problem:    resolve() was not tested with a symlink cycle.
Solution:   Add a test. (Dominique Pelle, closes #3513)
2018-10-06 15:43:17 +02:00
8295666dc2 patch 8.1.0453: MS-Windows: executable() is not reliable
Problem:    MS-Windows: executable() is not reliable.
Solution:   Use $PATHEXT properly. (Yasuhiro Matsumoto, closes #3412)
2018-10-06 15:18:45 +02:00
7554c548a4 patch 8.1.0452: MS-Windows: not finding intl.dll
Problem:    MS-Windows: not finding intl.dll.
Solution:   Also find intl.dll next to libintl.dll. (Ken Takata)
2018-10-06 15:03:15 +02:00
2bc152ab53 patch 8.1.0451: Win32 console: keypad keys don't work
Problem:    Win32 console: keypad keys don't work.
Solution:   Use numbers instead of characters to avoid the value becoming
            negative. (Mike Williams)
2018-10-03 20:44:20 +02:00
0e9deefb4f patch 8.1.0450: build failure without the +fold feature
Problem:    Build failure without the +fold feature.
Solution:   Add #ifdef.
2018-10-02 21:48:34 +02:00
7701f30856 patch 8.1.0449: when 'rnu' is set folded lines are not displayed correctly
Problem:    When 'rnu' is set folded lines are not displayed correctly.
            (Vitaly Yashin)
Solution:   When only redrawing line numbers do draw folded lines.
            (closes #3484)
2018-10-02 21:20:32 +02:00
4a5abbd613 patch 8.1.0448: cursorline not removed when using 'cursorbind'
Problem:    Cursorline not removed when using 'cursorbind'. (Justin Keyes)
Solution:   Store the last cursor line per window. (closes #3488)
2018-10-02 18:26:10 +02:00
586c70cdfe patch 8.1.0447: GUI scrollbar test fails with Athena and Motif
Problem:    GUI scrollbar test fails with Athena and Motif.
Solution:   When not using on-the-fly scrolling call normal_cmd().
2018-10-02 16:23:58 +02:00
4f88875725 patch 8.1.0446: options test fails in the GUI
Problem:    Options test fails in the GUI.
Solution:   Don't try changing 'term' in the GUI.
2018-10-02 15:06:40 +02:00
35bc7d6c52 patch 8.1.0445: setting 'term' does not store location for termcap options
Problem:    Setting 'term' does not store location for termcap options.
Solution:   Set the script context for termcap options that are changed when
            'term' is set.
2018-10-02 14:45:10 +02:00
54ade9f7e3 patch 8.1.0444: unnecessary check for NULL pointer
Problem:    Unnecessary check for NULL pointer.
Solution:   Remove check and call vim_free() directly.
2018-10-02 14:15:12 +02:00
95bafa296a Update runtime files. 2018-10-02 13:26:25 +02:00
6dff58f15c patch 8.1.0443: unnecessary static function prototypes
Problem:    Unnecessary static function prototypes.
Solution:   Remove unnecessary prototypes.
2018-09-30 21:43:26 +02:00
f45d747ebf patch 8.1.0442: GUI: cursor not drawn after ":redraw | sleep"
Problem:    GUI: Cursor not drawn after ":redraw | sleep".
Solution:   Flush the output. (closes #3496)
2018-09-30 18:22:26 +02:00
d3dc062160 patch 8.1.0441: build failure without command line history
Problem:    Build failure without command line history.
Solution:   Move cmdline_init() outside of #ifdef.
2018-09-30 17:45:30 +02:00
2bfddfc508 patch 8.1.0440: remove() with a range not sufficiently tested
Problem:    remove() with a range not sufficiently tested.
Solution:   Add a test. (Dominique Pelle, closes #3497)
2018-09-30 17:16:25 +02:00
438d176e35 patch 8.1.0439: recursive use of getcmdline() still not protected
Problem:    Recursive use of getcmdline() still not protected.
Solution:   Instead of saving the command buffer when making a call which may
            cause recursiveness, save the buffer when actually being called
            recursively.
2018-09-30 17:11:48 +02:00
b434ae2a1f patch 8.1.0438: the ex_make() function is too long
Problem:    The ex_make() function is too long.
Solution:   Split it into several functions. (Yegappan Lakshmanan)
2018-09-28 23:09:55 +02:00
95892c27b2 patch 8.1.0437: may access freed memory when syntax HL times out
Problem:    May access freed memory when syntax HL times out. (Philipp Gesang)
Solution:   Clear b_sst_first when clearing b_sst_array.
2018-09-28 22:26:54 +02:00
ee91c33570 patch 8.1.0436: can get the text of inputsecret() with getcmdline()
Problem:    Can get the text of inputsecret() with getcmdline(). (Tommy Allen)
Solution:   Don't return the text.
2018-09-25 22:27:35 +02:00
8c63e0ec31 patch 8.1.0435: cursorline highlight not removed in some situation
Problem:    Cursorline highlight not removed in some situation. (Vitaly
            Yashin)
Solution:   Reset last_cursorline when resetting 'cursorline'. (Christian
            Brabandt, closes #3481)
2018-09-25 22:17:54 +02:00
09037503ea patch 8.1.0434: copy_loclist() is too long
Problem:    copy_loclist() is too long.
Solution:   Split in multiple functions. (Yegappan Lakshmanan)
2018-09-25 22:08:14 +02:00
31cbadf74b patch 8.1.0433: mapping can obtain text from inputsecret()
Problem:    Mapping can obtain text from inputsecret(). (Tommy Allen)
Solution:   Disallow CTRL-R = and CTRL-\ e when using inputsecret().
2018-09-25 20:48:57 +02:00
45c5c86e63 patch 8.1.0432: compiler warning for signed/unsigned
Problem:    Compiler warning for signed/unsigned.
Solution:   Add type cast. (Mike Williams)
2018-09-25 18:59:21 +02:00
6dae96ef7a patch 8.1.0431: the qf_jump() function is too long
Problem:    The qf_jump() function is too long.
Solution:   Refactor to split it into several functions. (Yegappan Lakshmanan)
2018-09-24 21:50:12 +02:00
d339828b4b patch 8.1.0430: Xargadd file left behind after running test
Problem:    Xargadd file left behind after running test.
Solution:   Delete the file. (Dominique Pelle)
2018-09-24 21:32:11 +02:00
c75878c923 patch 8.1.0429: no test for :lcd with 'shellslash'
Problem:    No test for :lcd with 'shellslash'.
Solution:   Add a test. (Daniel Hahler, closes #3475)
2018-09-23 19:36:15 +02:00
3b30168f04 patch 8.1.0428: the :suspend command is not tested
Problem:    The :suspend command is not tested.
Solution:   Add a test. (Dominique Pelle, closes #3472)
2018-09-22 21:37:39 +02:00
7ff8a3cfb6 patch 8.1.0427: MS-Windows GUI: using invalid encoded file name
Problem:    MS-Windows GUI: using invalid encoded file name.
Solution:   Drop the file name and return NULL. (Ken Takata, closes #3467)
2018-09-22 14:39:15 +02:00
4841a7ccae patch 8.1.0426: accessing invalid memory in SmcOpenConnection()
Problem:    Accessing invalid memory in SmcOpenConnection().
Solution:   Reduce size of errorstring by one. (Dominique Pelle, closes #3469)
2018-09-22 14:08:49 +02:00
9cea87c577 patch 8.1.0425: ml_get error and crash with appendbufline()
Problem:    ml_get error and crash with appendbufline(). (Masashi Iizuka)
Solution:   Set per-window buffer info. (Hirohito Higashi, closes #3455)
2018-09-21 16:59:45 +02:00
e76d7a63df patch 8.1.0424: test output is very verbose, loading CI log is slow
Problem:    Test output is very verbose, loading CI log is slow.
Solution:   Redirect output to /dev/null. (Ken Takata, closes #3456)
2018-09-21 16:37:25 +02:00
0bd4051732 patch 8.1.0423: MS-Windows: using dup-close for flushing a file
Problem:    MS-Windows: using dup-close for flushing a file.
Solution:   Use _commit(). (Ken Takata, closes #3463)
2018-09-21 14:48:53 +02:00
4ff4290de1 patch 8.1.0422: cannot create map file with MinGW
Problem:    Cannot create map file with MinGW.
Solution:   Add support for $MAP. (Ken Takata, closes #3460)
2018-09-21 14:43:10 +02:00
76c612a166 patch 8.1.0421: MS-Windows: Ruby path is wrong for Ruby 1.9 and later
Problem:    MS-Windows: Ruby path is wrong for Ruby 1.9 and later.
Solution:   Let -I argument depend on Ruby version. (Ken Takata, closes #3461)
2018-09-21 14:31:51 +02:00
1f402806b8 patch 8.1.0420: generating vim.lib when using ActivePerl 5.20.3 or later
Problem:    Generating vim.lib when using ActivePerl 5.20.3 or later.
Solution:   Redefine XS_EXTERNAL(). (Ken Takata, closes #3462)
2018-09-21 14:01:27 +02:00
de2bd37bec patch 8.1.0419: Cygwin: running cproto fails with -O2
Problem:    Cygwin: running cproto fails with -O2.
Solution:   Strip -O2 for cproto. (Ken Takata, closes #3465)
2018-09-21 13:56:25 +02:00
b872e63fc6 patch 8.1.0418: MS-Windows: cannot separate Lua include and library dirs
Problem:    MS-Windows: cannot separate Lua include and library directories.
Solution:   Add LUA_LIBDIR and LUA_INCDIR. (Ken Takata, closes #3464)
2018-09-21 13:44:09 +02:00
036b09ca78 patch 8.1.0417: several command line arguments are not tested
Problem:    Several command line arguments are not tested.
Solution:   Add tests for -m, -M, -R and -Vfile. (Dominique Pelle,
            closes #3458)
2018-09-21 12:54:06 +02:00
b0e982bf05 patch 8.1.0416: sort doesn't report deleted lines
Problem:    Sort doesn't report deleted lines.
Solution:   Call msgmore(). (Christian Brabandt, closes #3454)
2018-09-21 12:46:22 +02:00
d4f73438bb patch 8.1.0415: not actually using 16 colors with vtp
Problem:    Not actually using 16 colors with vtp.
Solution:   Always use 256 colors when vtp is used. (Nobuhiro Takasaki,
            closes #3432)
2018-09-21 12:24:12 +02:00
3f3fb0b147 patch 8.1.0414: v:option_old is cleared when using :set in OptionSet autocmd
Problem:    v:option_old and v:option_new are cleared when using :set in
            OptionSet autocmd. (Gary Johnson)
Solution:   Don't trigger OptionSet recursively.
2018-09-21 11:59:32 +02:00
933bef779a patch 8.1.0413: test output is duplicated or missing
Problem:    Test output is duplicated or missing.
Solution:   Adjust the MS-Windows and Unix test makefiles. (Ken Takata,
            closes #3452)
2018-09-20 21:39:33 +02:00
92cbf62b87 patch 8.1.0412: cannot build with GTK 2.4
Problem:    Cannot build with GTK 2.4.
Solution:   Add back a few #ifdefs. (Ken Takata, closes #3447)
            Also support older GTK. (Tom Christensen)
2018-09-19 22:40:03 +02:00
cec12cd661 patch 8.1.0411: renamed file missing from distribution
Problem:    Renamed file missing from distribution.
Solution:   Rename screen.c to termscreen.c (Zdenek Dohnal, closes #3449)
2018-09-19 22:00:30 +02:00
476c0db002 patch 8.1.0410: the ex_copen() function is too long
Problem:    The ex_copen() function is too long.
Solution:   Refactor to split off two functions. (Yegappan Lakshmanan)
2018-09-19 21:56:02 +02:00
4b1c9a91b5 patch 8.1.0409: startup test fails on MS-Windows
Problem:    Startup test fails on MS-Windows.
Solution:   Do the Arabic test in silent Ex mode.  Loosen the check for -V2.
2018-09-19 21:06:31 +02:00
a87f8fd3fe patch 8.1.0408: MSVC: cannot use the "x64" native compiler option
Problem:    MSVC: cannot use the "x64" native compiler option.
Solution:   Ignore case for %Platform%.  Improve documentation. (Ken Takata)
2018-09-18 22:58:41 +02:00
fe15b7dfa6 patch 8.1.0407: quickfix code mixes using the stack and a list pointer
Problem:    Quickfix code mixes using the stack and a list pointer.
Solution:   Use a list pointer in more places. (Yegappan Lakshmanan,
            closes #3443)
2018-09-18 22:50:06 +02:00
9e81db9742 patch 8.1.0406: several command line arguments are not tested
Problem:    Several command line arguments are not tested.
Solution:   Add tests for -A, -F, -H, -p and -V. (Dominique Pelle,
            closes #3446)
2018-09-18 22:37:31 +02:00
664323e7c8 patch 8.1.0405: too many #ifdefs for GTK
Problem:    Too many #ifdefs for GTK.
Solution:   Define macros instead of using #ifdef. (Ken Takata, closes #3436)
2018-09-18 22:30:07 +02:00
e961cba3cb patch 8.1.0404: accessing invalid memory with long argument name
Problem:    Accessing invalid memory with long argument name.
Solution:   Use item_count instead of checking for a terminating NULL.
            (Dominique Pelle, closes #3444)
2018-09-18 21:51:47 +02:00
cc3a997746 patch 8.1.0403: header file missing from distribution
Problem:    Header file missing from distribution.
Solution:   Add src/protodef.h.
2018-09-18 21:41:47 +02:00
198fa066b2 patch 8.1.0402: the DiffUpdate event isn't triggered for :diffput
Problem:    The DiffUpdate event isn't triggered for :diffput.
Solution:   Also trigger DiffUpdate for :diffget and :diffput.
2018-09-18 21:20:26 +02:00
110bd60985 patch 8.1.0401: can't get swap name of another buffer
Problem:    Can't get swap name of another buffer.
Solution:   Add swapname(). (Ozaki Kiichi, closes #3441)
2018-09-16 18:46:59 +02:00
d2b58c0a2c patch 8.1.0400: using freed memory with :diffget
Problem:    Using freed memory with :diffget.
Solution:   Skip ex_diffupdate() while updating diffs. (closes #3442)
2018-09-16 18:10:48 +02:00
65985ac998 patch 8.1.0399: 'hlsearch' highlight remains in other window
Problem:    'hlsearch' highlight remains in other window after cancelling
            command.
Solution:   Redraw all windows. Also remove unnecessary delays. (closes #3437)
2018-09-16 17:08:04 +02:00
8f4499b816 patch 8.1.0398: no test for -o and -O command line arguments
Problem:    No test for -o and -O command line arguments.
Solution:   Add a test. (Dominique Pelle, closes #3438)
2018-09-16 16:28:11 +02:00
e8fa05b5bc patch 8.1.0397: no event triggered after updating diffs
Problem:    No event triggered after updating diffs.
Solution:   Add the DiffUpdated event.
2018-09-16 15:48:06 +02:00
42c63356d7 patch 8.1.0396: another compiler warning on 64-bit MS-Windows
Problem:    Another compiler warning on 64-bit MS-Windows.
Solution:   Add type cast. (Mike Williams)
2018-09-16 15:14:18 +02:00
6e272acc82 patch 8.1.0395: compiler warning on 64-bit MS-Windows
Problem:    Compiler warning on 64-bit MS-Windows.
Solution:   Add type cast. (Mike Williams)
2018-09-16 14:51:36 +02:00
e3521d9cbb patch 8.1.0394: diffs are not always updated correctly
Problem:    Diffs are not always updated correctly.
Solution:   When using internal diff update for any changes properly.
2018-09-16 14:10:31 +02:00
785fc6567f patch 8.1.0393: not all white space difference options available
Problem:    Not all white space difference options available.
Solution:   Add "iblank", "iwhiteall" and "iwhiteeol" to 'diffopt'.
2018-09-15 19:17:38 +02:00
50eb16c3b2 patch 8.1.0392: error while typing :/foo/s// with 'incsearch' enabled
Problem:    Error while typing :/foo/s// with 'incsearch' enabled.
Solution:   Do not give search errors when highlighting matches.
2018-09-15 15:42:40 +02:00
ac49f61a20 patch 8.1.0391: building in a shadow directory fails
Problem:    Building in a shadow directory fails.
Solution:   Don't link the xdiff directory but what's in it. (closes #3428)
2018-09-15 15:08:52 +02:00
ab18673731 patch 8.1.0390: scrollbars are not tested
Problem:    Scrollbars are not tested.
Solution:   Add test_scrollbar() and a test.
2018-09-14 21:27:06 +02:00
da1f71d75f patch 8.1.0389: :behave command is not tested
Problem:    :behave command is not tested.
Solution:   Add a test. (Dominique Pelle, closes #3429)
2018-09-14 20:10:32 +02:00
bf1c1b8513 patch 8.1.0388: Coverity complains about possible NULL pointer use
Problem:    Coverity complains about possible NULL pointer use.
Solution:   Use get_tv_string() instead of get_tv_string_chk().
2018-09-13 21:30:05 +02:00
24839edc54 patch 8.1.0387: no test for 'ambiwidth' detection
Problem:    No test for 'ambiwidth' detection.
Solution:   Add a test.
2018-09-13 20:46:52 +02:00
fe8ef98dd1 patch 8.1.0386: cannot test with non-default option value
Problem:    Cannot test with non-default option value.
Solution:   Add test_option_not_set().
2018-09-13 20:31:54 +02:00
c91c500348 patch 8.1.0385: Coveralls badge doesn't update
Problem:    Coveralls badge doesn't update.
Solution:   Update the URL
2018-09-13 19:04:48 +02:00
8aeb504fc6 patch 8.1.0384: sign ordering depends on +netbeans feature
Problem:    Sign ordering depends on +netbeans feature.
Solution:   Also order signs without +netbeans. (Christian Brabandt,
            closes #3224)
2018-09-13 18:33:05 +02:00
a214079008 patch 8.1.0383: missing source file rename
Problem:    Missing source file rename.
Solution:   Update the dependency.
2018-09-13 18:05:48 +02:00
0f7683f973 patch 8.1.0382: some make programs can't handle "xdiff/../"
Problem:    Some make programs can't handle dependency on "xdiff/../".
Solution:   Strip it out.
2018-09-13 18:01:31 +02:00
5c6f574bd1 patch 8.1.0381: variable declaration not at start of block
Problem:    Variable declaration not at start of block.
Solution:   Fix line ordering.
2018-09-13 17:32:07 +02:00
32d19c1820 patch 8.1.0380: "make proto" doesn't work well
Problem:    "make proto" doesn't work well.
Solution:   Define a few more types for cproto.  Update proto files.  Fix that
            workshop didn't build.
2018-09-13 17:26:54 +02:00
78dcd4f002 patch 8.1.0379: build dependencies are incomplete
Problem:    Build dependencies are incomplete.
Solution:   Update the build dependencies, mainly for xdiff.  Adjust object
            directory for libvterm and xdiff.
2018-09-13 17:23:28 +02:00
0d5f21c3df patch 8.1.0378: CI build failure
Problem:    CI build failure.
Solution:   Include vim.h as ../vim.h.  Fix compiler warning.
2018-09-13 15:58:58 +02:00
42335f50bc patch 8.1.0377: xdiff doesn't use the Vim memory allocation functions
Problem:    Xdiff doesn't use the Vim memory allocation functions.
Solution:   Change the xdl_ defines.  Check for out-of-memory.  Rename
            "ignored" to "vim_ignored".
2018-09-13 15:33:43 +02:00
c787539747 patch 8.1.0376: compiler warning for uninitialized variable
Problem:    Compiler warning for uninitialized variable. (Tony Mechelynck)
Solution:   Initialize the variable.
2018-09-13 14:57:41 +02:00
3b8defd0a5 patch 8.1.0375: cannot use diff mode with Cygwin diff.exe
Problem:    Cannot use diff mode with Cygwin diff.exe. (Igor Forca)
Solution:   Skip over unrecognized lines in the diff output.
2018-09-13 13:03:11 +02:00
bd9a53c06c patch 8.1.0374: moving the cursor is slow when 'relativenumber' is set
Problem:    Moving the cursor is slow when 'relativenumber' is set.
Solution:   Only redraw the number column, not all lines.
2018-09-12 23:15:48 +02:00
1b7fefcbce patch 8.1.0373: screen updating still slow when 'cursorline' is set
Problem:    Screen updating still slow when 'cursorline' is set.
Solution:   Fix setting last_cursorline.
2018-09-12 22:27:15 +02:00
90a997987d patch 8.1.0372: screen updating slow when 'cursorline' is set
Problem:    Screen updating slow when 'cursorline' is set.
Solution:   Only redraw the old and new cursor line, not all lines.
2018-09-12 21:52:18 +02:00
643b614087 patch 8.1.0371: argument types for select() may be wrong
Problem:    Argument types for select() may be wrong.
Solution:   Use a configure macro. (Tobias Ulmer)
2018-09-12 20:29:09 +02:00
274cea35c6 patch 8.1.0370: not using internal diff if 'diffopt' is not changed
Problem:    Not using internal diff if 'diffopt' is not changed.
Solution:   Correct initialization of diff_flags. (Christian Brabandt)
2018-09-12 18:00:12 +02:00
67f8ab8299 patch 8.1.0369: continuation lines cannot contain comments
Problem:    Continuation lines cannot contain comments.
Solution:   Support using "\ .
2018-09-11 22:37:29 +02:00
25328e39d2 patch 8.1.0368: GTK code has too many #ifdefs and GTK 2.10 building fails
Problem:    GTK code has too many #ifdefs and building fails with GTK 2.10.
Solution:   Always use gtk_widget_get_window() and define it for older GTK
            versions. (Ken Takata, closes #3421)
2018-09-11 21:30:09 +02:00
84d9390480 patch 8.1.0367: getchar(1) no longer processes pending messages
Problem:    getchar(1) no longer processes pending messages. (Yasuhiro
            Matsumoto)
Solution:   Call parse_queued_messages().
2018-09-11 20:10:20 +02:00
007921611b patch 8.1.0366: pieces of the xdiff code are not used
Problem:    Pieces of the xdiff code are not used.
Solution:   Add "#if 0" to omit unused code.
2018-09-10 22:18:52 +02:00
4c7b08f640 patch 8.1.0365: function profile doesn't specify where it was defined
Problem:    Function profile doesn't specify where it was defined.
Solution:   Show the script name and line number.
2018-09-10 22:03:40 +02:00
e797abf3c7 patch 8.1.0364: compiler warning in xdiff code
Problem:    Compiler warning in xdiff code. (Yegappan Lakshmanan)
Solution:   Initialize directly.
2018-09-10 21:22:15 +02:00
c93262b2e3 patch 8.1.0363: internal diff isn't used by default as advertised
Problem:    Internal diff isn't used by default as advertised.
Solution:   Add "internal" to the default value of 'diffopt'.
            Also add couple of files missing from the distribution.
2018-09-10 21:15:40 +02:00
f29c1c6aa3 patch 8.1.0362: cannot get the script line number when executing a function
Problem:    Cannot get the script line number when executing a function.
Solution:   Store the line number besides the script ID. (Ozaki Kiichi,
            closes #3362)  Also display the line number with ":verbose set".
2018-09-10 21:05:02 +02:00
6b0b83f768 patch 8.1.0361: remote user not used for completion
Problem:    Remote user not used for completion. (Stucki)
Solution:   Use $USER too. (Dominique Pelle, closes #3407)
2018-09-10 19:03:05 +02:00
e828b7621c patch 8.1.0360: using an external diff program is slow and inflexible
Problem:    Using an external diff program is slow and inflexible.
Solution:   Include the xdiff library. (Christian Brabandt, closes #2732)
            Use it by default.
2018-09-10 17:51:58 +02:00
93a1df2c20 Update runtime files. 2018-09-10 11:51:50 +02:00
363 changed files with 19221 additions and 7368 deletions

View File

@ -15,7 +15,7 @@ env:
- BUILD=yes TEST=test SANITIZER_CFLAGS="-g -O1 -DABORT_ON_INTERNAL_ERROR -DEXITFREE -fsanitize=address -fno-omit-frame-pointer"
FEATURES=huge SRCDIR=./src CHECK_AUTOCONF=no ASAN_OPTIONS="print_stacktrace=1 log_path=asan" LSAN_OPTIONS="suppressions=$TRAVIS_BUILD_DIR/src/testdir/lsan-suppress.txt"
"CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-rubyinterp --enable-luainterp --enable-tclinterp'"
- BUILD=yes TEST=scripttests COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
- BUILD=yes TEST="scripttests test_libvterm" COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
"CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-python3interp --enable-rubyinterp --enable-luainterp --enable-tclinterp'"
- BUILD=no TEST=unittests COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=yes
- BUILD=yes TEST=test COVERAGE=no FEATURES=normal CONFOPT= SHADOWOPT="-C src/shadow" SRCDIR=./src/shadow CHECK_AUTOCONF=no
@ -26,7 +26,7 @@ env:
sudo: false
# instead of a 2*2*8 matrix (2*os + 2*compiler + 8*env),
# instead of a 2*2*7 matrix (2*os + 2*compiler + 7*env),
# exclude some builds on mac os x and linux
# linux: 2*compiler + 5*env + mac: 2*compiler + 2*env
matrix:
@ -38,7 +38,7 @@ matrix:
- os: osx
env: BUILD=yes TEST=test COVERAGE=no FEATURES=small CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
- os: osx
env: BUILD=yes TEST=scripttests COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
env: BUILD=yes TEST="scripttests test_libvterm" COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
"CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-python3interp --enable-rubyinterp --enable-luainterp --enable-tclinterp'"
- os: osx
env: BUILD=yes TEST=test SANITIZER_CFLAGS="-g -O1 -DABORT_ON_INTERNAL_ERROR -DEXITFREE -fsanitize=address -fno-omit-frame-pointer"
@ -109,7 +109,7 @@ script:
- if [ -n "$err" ]; then exit 1; fi
after_success:
- if [ "$COVERAGE" = "yes" ]; then ~/.local/bin/coveralls -b ${SRCDIR} -x .xs -e ${SRCDIR}/xxd -e ${SRCDIR}/if_perl.c --encodings utf-8 latin-1 EUC-KR; fi
- if [ "$COVERAGE" = "yes" ]; then ~/.local/bin/coveralls -b ${SRCDIR} -x .xs -e ${SRCDIR}/if_perl.c -e ${SRCDIR}/xxd -e ${SRCDIR}/libvterm/src --encodings utf-8 latin-1 EUC-KR; fi
- if [ "$COVERAGE" = "yes" ]; then cd ${SRCDIR} && bash <(curl -s https://codecov.io/bash) ; fi
# vim:set sts=2 sw=2 tw=0 et:

View File

@ -91,6 +91,7 @@ SRC_ALL = \
src/terminal.c \
src/term.h \
src/termlib.c \
src/textprop.c \
src/ui.c \
src/undo.c \
src/userfunc.c \
@ -141,6 +142,7 @@ SRC_ALL = \
src/testdir/if_ver*.vim \
src/testdir/color_ramp.vim \
src/proto.h \
src/protodef.h \
src/proto/arabic.pro \
src/proto/beval.pro \
src/proto/blowfish.pro \
@ -197,6 +199,7 @@ SRC_ALL = \
src/proto/term.pro \
src/proto/terminal.pro \
src/proto/termlib.pro \
src/proto/textprop.pro \
src/proto/ui.pro \
src/proto/undo.pro \
src/proto/userfunc.pro \
@ -227,7 +230,7 @@ SRC_ALL = \
src/libvterm/src/parser.c \
src/libvterm/src/pen.c \
src/libvterm/src/rect.h \
src/libvterm/src/screen.c \
src/libvterm/src/termscreen.c \
src/libvterm/src/state.c \
src/libvterm/src/unicode.c \
src/libvterm/src/utf8.h \
@ -273,6 +276,22 @@ SRC_ALL = \
src/libvterm/t/92lp1640917.test \
src/libvterm/t/harness.c \
src/libvterm/t/run-test.pl \
src/xdiff/COPYING \
src/xdiff/README.txt \
src/xdiff/xdiff.h \
src/xdiff/xdiffi.c \
src/xdiff/xdiffi.h \
src/xdiff/xemit.c \
src/xdiff/xemit.h \
src/xdiff/xhistogram.c \
src/xdiff/xinclude.h \
src/xdiff/xmacros.h \
src/xdiff/xpatience.c \
src/xdiff/xprepare.c \
src/xdiff/xprepare.h \
src/xdiff/xtypes.h \
src/xdiff/xutils.c \
src/xdiff/xutils.h \
# source files for Unix only
@ -674,6 +693,11 @@ RT_SCRIPTS = \
runtime/compiler/README.txt \
runtime/indent/*.vim \
runtime/indent/README.txt \
runtime/indent/Makefile \
runtime/indent/testdir/README.txt \
runtime/indent/testdir/*.vim \
runtime/indent/testdir/*.in \
runtime/indent/testdir/*.ok \
runtime/ftplugin/*.vim \
runtime/ftplugin/logtalk.dict \
runtime/ftplugin/README.txt \

View File

@ -32,14 +32,26 @@ first:
# Some make programs use the last target for the $@ default; put the other
# targets separately to always let $@ expand to "first" by default.
all install uninstall tools config configure reconfig proto depend lint tags types test scripttests unittests testclean clean distclean:
all install uninstall tools config configure reconfig proto depend lint tags types test scripttests test_libvterm unittests testclean clean distclean:
@if test ! -f src/auto/config.mk; then \
cp src/config.mk.dist src/auto/config.mk; \
fi
@echo "Starting make in the src directory."
@echo "If there are problems, cd to the src directory and run make there"
cd src && $(MAKE) $@
# When the target is "test" also run the indent tests.
@if test "$@" = "test"; then \
$(MAKE) indenttest; \
fi
# Executable used for running the indent tests.
VIM_FOR_INDENTTEST = ../../src/vim
indenttest:
cd runtime/indent && \
$(MAKE) clean VIM="$(VIM_FOR_INDENTTEST)" && \
$(MAKE) test VIM="$(VIM_FOR_INDENTTEST)"
#########################################################################
# 2. Creating the various distribution files.

View File

@ -2,7 +2,7 @@
[![Build Status](https://travis-ci.org/vim/vim.svg?branch=master)](https://travis-ci.org/vim/vim)
[![Coverage Status](https://codecov.io/gh/vim/vim/coverage.svg?branch=master)](https://codecov.io/gh/vim/vim?branch=master)
[![Coverage Status](https://coveralls.io/repos/vim/vim/badge.svg?branch=master&service=github)](https://coveralls.io/github/vim/vim?branch=master)
[![Coverage Status](https://coveralls.io/repos/github/vim/vim/badge.svg?branch=master)](https://coveralls.io/github/vim/vim?branch=master)
[![Appveyor Build status](https://ci.appveyor.com/api/projects/status/o2qht2kjm02sgghk?svg=true)](https://ci.appveyor.com/project/chrisbra/vim)
[![Coverity Scan](https://scan.coverity.com/projects/241/badge.svg)](https://scan.coverity.com/projects/vim)
[![Language Grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/vim/vim.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/vim/vim/context:cpp)

View File

@ -1,4 +1,4 @@
README_zOS.txt for version 8.1 of Vim: Vi IMproved.
README_os390.txt for version 8.1 of Vim: Vi IMproved.
This readme explains how to build Vim on z/OS. Formerly called OS/390.
See "README.txt" for general information about Vim.

View File

@ -15,6 +15,7 @@ To build the installable .exe:
vimrun.exe,
install.exe,
uninstal.exe,
tee/tee.exe,
xxd/xxd.exe,
Then execute tools/rename.bat to rename the executables. (mv command is
@ -29,14 +30,15 @@ To build the installable .exe:
4. Go to the VisVim directory and build VisVim.dll (or get it from a binary
archive).
5. Go to the OleVim directory and build OpenWithVim.exe and SendToVim.exe (or
get them from a binary archive).
6. Get a "diff.exe" program and put it in the "../.." directory (above the
"vim80" directory, it's the same for all Vim versions).
5. Get a "diff.exe" program. If you skip this the built-in diff will always
be used (which is fine for most users). If you do have your own
"diff.exe" put it in the "../.." directory (above the "vim81" directory,
it's the same for all Vim versions).
You can find one in previous Vim versions or in this archive:
http://www.mossbayeng.com/~ron/vim/diffutils.tar.gz
Also put winpty32.dll and winpty-agent.exe there.
6 Also put winpty32.dll and winpty-agent.exe in "../.." (above the "vim81"
directory). This is required for the terminal window.
7. Do "make uganda.nsis.txt" in runtime/doc. This requires sed, you may have
to do this on Unix. Make sure the file is in DOS file format!

View File

@ -126,7 +126,7 @@ endfunc
" This function checks if one of the first ten lines start with a '@'. In
" that case it is probably a change file.
" If the first line starts with # or ! it's probably a ch file.
" If a line has "main", "include", "//" ir "/*" it's probably ch.
" If a line has "main", "include", "//" or "/*" it's probably ch.
" Otherwise CHILL is assumed.
func dist#ft#FTchange()
let lnum = 1

View File

@ -3,7 +3,7 @@
" Maintainer: Dávid Szabó ( complex857 AT gmail DOT com )
" Previous Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
" URL: https://github.com/shawncplus/phpcomplete.vim
" Last Change: 2016 Oct 10
" Last Change: 2018 Oct 10
"
" OPTIONS:
"
@ -146,6 +146,8 @@ function! phpcomplete#CompletePHP(findstart, base) " {{{
end
try
let eventignore = &eventignore
let &eventignore = 'all'
let winheight = winheight(0)
let winnr = winnr()
@ -216,6 +218,7 @@ function! phpcomplete#CompletePHP(findstart, base) " {{{
endif
finally
silent! exec winnr.'resize '.winheight
let &eventignore = eventignore
endtry
endfunction
" }}}
@ -1393,23 +1396,28 @@ function! phpcomplete#GetCallChainReturnType(classname_candidate, class_candidat
for classstructure in classcontents
let docblock_target_pattern = 'function\s\+&\?'.method.'\>\|\(public\|private\|protected\|var\).\+\$'.method.'\>\|@property.\+\$'.method.'\>'
let doc_str = phpcomplete#GetDocBlock(split(classstructure.content, '\n'), docblock_target_pattern)
if doc_str != ''
let return_type_hint = phpcomplete#GetFunctionReturnTypeHint(split(classstructure.content, '\n'), 'function\s\+&\?'.method.'\>')
if doc_str != '' || return_type_hint != ''
break
endif
endfor
if doc_str != ''
if doc_str != '' || return_type_hint != ''
let docblock = phpcomplete#ParseDocBlock(doc_str)
if has_key(docblock.return, 'type') || has_key(docblock.var, 'type') || len(docblock.properties) > 0
let type = has_key(docblock.return, 'type') ? docblock.return.type : has_key(docblock.var, 'type') ? docblock.var.type : ''
if has_key(docblock.return, 'type') || has_key(docblock.var, 'type') || len(docblock.properties) > 0 || return_type_hint != ''
if return_type_hint == ''
let type = has_key(docblock.return, 'type') ? docblock.return.type : has_key(docblock.var, 'type') ? docblock.var.type : ''
if type == ''
for property in docblock.properties
if property.description =~? method
let type = property.type
break
endif
endfor
endif
if type == ''
for property in docblock.properties
if property.description =~? method
let type = property.type
break
endif
endfor
endif
else
let type = return_type_hint
end
" there's a namespace in the type, threat the type as FQCN
if type =~ '\\'
@ -1483,7 +1491,7 @@ function! phpcomplete#GetMethodStack(line) " {{{
continue
endif
" if it's looks like a string
" if it looks like a string
if current_char == "'" || current_char == '"'
" and it is not escaped
if prev_char != '\' || (prev_char == '\' && prev_prev_char == '\')
@ -1587,9 +1595,11 @@ function! phpcomplete#GetClassName(start_line, context, current_namespace, impor
elseif function_file != '' && filereadable(function_file)
let file_lines = readfile(function_file)
let docblock_str = phpcomplete#GetDocBlock(file_lines, 'function\s*&\?\<'.function_name.'\>')
let return_type_hint = phpcomplete#GetFunctionReturnTypeHint(file_lines, 'function\s*&\?'.function_name.'\>')
let docblock = phpcomplete#ParseDocBlock(docblock_str)
if has_key(docblock.return, 'type')
let classname_candidate = docblock.return.type
let type = has_key(docblock.return, 'type') ? docblock.return.type : return_type_hint
if type != ''
let classname_candidate = type
let [class_candidate_namespace, function_imports] = phpcomplete#GetCurrentNameSpace(file_lines)
" try to expand the classname of the returned type with the context got from the function's source file
@ -1821,9 +1831,11 @@ function! phpcomplete#GetClassName(start_line, context, current_namespace, impor
elseif function_file != '' && filereadable(function_file)
let file_lines = readfile(function_file)
let docblock_str = phpcomplete#GetDocBlock(file_lines, 'function\s*&\?\<'.function_name.'\>')
let return_type_hint = phpcomplete#GetFunctionReturnTypeHint(file_lines, 'function\s*&\?'.function_name.'\>')
let docblock = phpcomplete#ParseDocBlock(docblock_str)
if has_key(docblock.return, 'type')
let classname_candidate = docblock.return.type
let type = has_key(docblock.return, 'type') ? docblock.return.type : return_type_hint
if type != ''
let classname_candidate = type
let [class_candidate_namespace, function_imports] = phpcomplete#GetCurrentNameSpace(file_lines)
" try to expand the classname of the returned type with the context got from the function's source file
let [classname_candidate, class_candidate_namespace] = phpcomplete#ExpandClassName(classname_candidate, class_candidate_namespace, function_imports)
@ -2413,6 +2425,44 @@ function! phpcomplete#ParseDocBlock(docblock) " {{{
endfunction
" }}}
function! phpcomplete#GetFunctionReturnTypeHint(sccontent, search)
let i = 0
let l = 0
let function_line_start = -1
let function_line_end = -1
let sccontent_len = len(a:sccontent)
let return_type = ''
while (i < sccontent_len)
let line = a:sccontent[i]
" search for a function declaration
if line =~? a:search
let l = i
let function_line_start = i
" now search for the first { where the function body starts
while l < sccontent_len
let line = a:sccontent[l]
if line =~? '\V{'
let function_line_end = l
break
endif
let l += 1
endwhile
break
endif
let i += 1
endwhile
" now grab the lines that holds the function declaration line
if function_line_start != -1 && function_line_end != -1
let function_line = join(a:sccontent[function_line_start :function_line_end], " ")
let class_name_pattern = '[a-zA-Z_\x7f-\xff\\][a-zA-Z_0-9\x7f-\xff\\]*'
let return_type = matchstr(function_line, '\c\s*:\s*\zs'.class_name_pattern.'\ze\s*{')
endif
return return_type
endfunction
function! phpcomplete#GetTypeFromDocBlockParam(docblock_type) " {{{
if a:docblock_type !~ '|'
return a:docblock_type
@ -2572,7 +2622,7 @@ function! phpcomplete#GetCurrentNameSpace(file_lines) " {{{
" find kind flags from tags or built in methods for the objects we extracted
" they can be either classes, interfaces or namespaces, no other thing is importable in php
for [key, import] in items(imports)
" if theres a \ in the name we have it's definetly not a built in thing, look for tags
" if theres a \ in the name we have it's definitely not a built in thing, look for tags
if import.name =~ '\\'
let patched_ctags_detected = 0
let [classname, namespace_for_classes] = phpcomplete#ExpandClassName(import.name, '\', {})

View File

@ -1,6 +1,6 @@
" Vim autoload file for the tohtml plugin.
" Maintainer: Ben Fritz <fritzophrenic@gmail.com>
" Last Change: 2013 Sep 03
" Last Change: 2018 Nov 11
"
" Additional contributors:
"
@ -544,12 +544,16 @@ func! tohtml#Diff2HTML(win_list, buf_list) "{{{
" add required javascript in reverse order so we can just call append again
" and again without adjusting {{{
" insert script closing tag
call append(style_start, [
\ '',
\ s:settings.use_xhtml ? '//]]>' : '-->',
\ "</script>"
\ ])
let s:uses_script = s:settings.dynamic_folds || s:settings.line_ids || !empty(s:settings.prevent_copy)
" insert script closing tag if needed
if s:uses_script
call append(style_start, [
\ '',
\ s:settings.use_xhtml ? '//]]>' : '-->',
\ "</script>"
\ ])
endif
" insert script which corrects the size of small input elements in
" prevent_copy mode. See 2html.vim for details on why this is needed and how
@ -575,55 +579,61 @@ func! tohtml#Diff2HTML(win_list, buf_list) "{{{
\ '}'
\ ])
endif
"
" insert javascript to get IDs from line numbers, and to open a fold before
" jumping to any lines contained therein
call append(style_start, [
\ " /* Always jump to new location even if the line was hidden inside a fold, or",
\ " * we corrected the raw number to a line ID.",
\ " */",
\ " if (lineElem) {",
\ " lineElem.scrollIntoView(true);",
\ " }",
\ " return true;",
\ "}",
\ "if ('onhashchange' in window) {",
\ " window.onhashchange = JumpToLine;",
\ "}"
\ ])
if s:settings.dynamic_folds
if s:settings.line_ids
call append(style_start, [
\ " /* Always jump to new location even if the line was hidden inside a fold, or",
\ " * we corrected the raw number to a line ID.",
\ " */",
\ " if (lineElem) {",
\ " lineElem.scrollIntoView(true);",
\ " }",
\ " return true;",
\ "}",
\ "if ('onhashchange' in window) {",
\ " window.onhashchange = JumpToLine;",
\ "}"
\ ])
if s:settings.dynamic_folds
call append(style_start, [
\ "",
\ " /* navigate upwards in the DOM tree to open all folds containing the line */",
\ " var node = lineElem;",
\ " while (node && node.id != 'vimCodeElement".s:settings.id_suffix."')",
\ " {",
\ " if (node.className == 'closed-fold')",
\ " {",
\ " /* toggle open the fold ID (remove window ID) */",
\ " toggleFold(node.id.substr(4));",
\ " }",
\ " node = node.parentNode;",
\ " }",
\ ])
endif
endif
if s:settings.line_ids
call append(style_start, [
\ "",
\ " /* navigate upwards in the DOM tree to open all folds containing the line */",
\ " var node = lineElem;",
\ " while (node && node.id != 'vimCodeElement".s:settings.id_suffix."')",
\ " {",
\ " if (node.className == 'closed-fold')",
\ " {",
\ " /* toggle open the fold ID (remove window ID) */",
\ " toggleFold(node.id.substr(4));",
\ " }",
\ " node = node.parentNode;",
\ "/* function to open any folds containing a jumped-to line before jumping to it */",
\ "function JumpToLine()",
\ "{",
\ " var lineNum;",
\ " lineNum = window.location.hash;",
\ " lineNum = lineNum.substr(1); /* strip off '#' */",
\ "",
\ " if (lineNum.indexOf('L') == -1) {",
\ " lineNum = 'L'+lineNum;",
\ " }",
\ " if (lineNum.indexOf('W') == -1) {",
\ " lineNum = 'W1'+lineNum;",
\ " }",
\ " var lineElem = document.getElementById(lineNum);"
\ ])
endif
call append(style_start, [
\ "",
\ "/* function to open any folds containing a jumped-to line before jumping to it */",
\ "function JumpToLine()",
\ "{",
\ " var lineNum;",
\ " lineNum = window.location.hash;",
\ " lineNum = lineNum.substr(1); /* strip off '#' */",
\ "",
\ " if (lineNum.indexOf('L') == -1) {",
\ " lineNum = 'L'+lineNum;",
\ " }",
\ " if (lineNum.indexOf('W') == -1) {",
\ " lineNum = 'W1'+lineNum;",
\ " }",
\ " lineElem = document.getElementById(lineNum);"
\ ])
" Insert javascript to toggle matching folds open and closed in all windows,
" if dynamic folding is active.
@ -648,11 +658,13 @@ func! tohtml#Diff2HTML(win_list, buf_list) "{{{
\ ])
endif
" insert script tag; javascript is always needed for the line number
" normalization for URL hashes
call append(style_start, [
\ "<script type='text/javascript'>",
\ s:settings.use_xhtml ? '//<![CDATA[' : "<!--"])
if s:uses_script
" insert script tag; javascript is always needed for the line number
" normalization for URL hashes
call append(style_start, [
\ "<script type='text/javascript'>",
\ s:settings.use_xhtml ? '//<![CDATA[' : "<!--"])
endif
" Insert styles from all the generated html documents and additional styles
" for the table-based layout of the side-by-side diff. The diff should take
@ -767,7 +779,7 @@ func! tohtml#GetUserSettings() "{{{
if user_settings.no_pre == 0
call tohtml#GetOption(user_settings,
\ 'expand_tabs',
\ &expandtab || &ts != 8 || user_settings.number_lines ||
\ &expandtab || &ts != 8 || &vts != '' || user_settings.number_lines ||
\ (user_settings.dynamic_folds && !user_settings.no_foldcolumn))
else
let user_settings.expand_tabs = 1

View File

@ -1,9 +1,9 @@
" Vim plugin for formatting XML
" Last Change: Thu, 22 May 2018 21:26:55 +0100
" Version: 0.1
" Author: Christian Brabandt <cb@256bit.org>
" Repository: https://github.com/chrisbra/vim-xml-ftplugin
" License: VIM License
" Last Change: Thu, 07 Dec 2018
" Version: 0.1
" Author: Christian Brabandt <cb@256bit.org>
" Repository: https://github.com/chrisbra/vim-xml-ftplugin
" License: VIM License
" Documentation: see :h xmlformat.txt (TODO!)
" ---------------------------------------------------------------------
" Load Once: {{{1
@ -85,7 +85,11 @@ func! s:Trim(item)
endfunc
" Check if tag is a new opening tag <tag> {{{1
func! s:StartTag(tag)
return a:tag =~? '^\s*<[^/?]'
let is_comment = s:IsComment(a:tag)
return a:tag =~? '^\s*<[^/?]' && !is_comment
endfunc
func! s:IsComment(tag)
return a:tag =~? '<!--'
endfunc
" Remove one level of indentation {{{1
func! s:DecreaseIndent()

View File

@ -5,6 +5,7 @@
" Last Change: 2001 May 27
aunmenu *
tlunmenu *
silent! unlet did_install_default_menus
silent! unlet did_install_syntax_menu

View File

@ -102,6 +102,7 @@ DOCS = \
tagsrch.txt \
term.txt \
terminal.txt \
textprop.txt \
tips.txt \
todo.txt \
uganda.txt \
@ -238,6 +239,7 @@ HTMLS = \
tagsrch.html \
term.html \
terminal.html \
textprop.html \
tips.html \
todo.html \
uganda.html \

View File

@ -301,6 +301,7 @@ Name triggered by ~
|FileChangedShellPost| After handling a file changed since editing started
|FileChangedRO| before making the first change to a read-only file
|DiffUpdated| after diffs have been updated
|DirChanged| after the working directory has changed
|ShellCmdPost| after executing a shell command
@ -656,6 +657,11 @@ 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.
*DiffUpdated*
DiffUpdated After diffs have been updated. Depending on
what kind of diff is being used (internal or
external) this can be triggered on every
change or when doing |:diffupdate|.
*DirChanged*
DirChanged The working directory has changed in response
to the |:cd| or |:lcd| commands, or as a
@ -829,13 +835,14 @@ MenuPopup Just before showing the popup menu (under the
right mouse button). Useful for adjusting the
menu for what is under the cursor or mouse
pointer.
The pattern is matched against a single
character representing the mode:
The pattern is matched against one or two
characters representing the mode:
n Normal
v Visual
o Operator-pending
i Insert
c Command line
tl Terminal
*OptionSet*
OptionSet After setting an option. The pattern is
matched against the long option name.
@ -859,6 +866,9 @@ OptionSet After setting an option. The pattern is
plugin. You can always use `:noa` to prevent
triggering this autocommand.
When using |:set| in the autocommand the event
is not triggered again.
*QuickFixCmdPre*
QuickFixCmdPre Before a quickfix command is run (|:make|,
|:lmake|, |:grep|, |:lgrep|, |:grepadd|,

View File

@ -476,6 +476,10 @@ SHIFTING LINES LEFT OR RIGHT *shift-left-right*
*<*
<{motion} Shift {motion} lines one 'shiftwidth' leftwards.
If the 'vartabstop' feature is enabled, and the
'shiftwidth' option is set to zero, the amount of
indent is calculated at the first non-blank character
in the line.
*<<*
<< Shift [count] lines one 'shiftwidth' leftwards.
@ -487,6 +491,10 @@ SHIFTING LINES LEFT OR RIGHT *shift-left-right*
*>*
>{motion} Shift {motion} lines one 'shiftwidth' rightwards.
If the 'vartabstop' feature is enabled, and the
'shiftwidth' option is set to zero, the amount of
indent is calculated at the first non-blank character
in the line.
*>>*
>> Shift [count] lines one 'shiftwidth' rightwards.
@ -708,6 +716,7 @@ The flags that you can use for the substitute commands:
search pattern.
{not in Vi: highlighting of the match, other responses than 'y' or 'n'}
*:s_e*
[e] When the search pattern fails, do not issue an error message and, in
particular, continue in maps as if no error occurred. This is most
useful to prevent the "No match" error from breaking a mapping. Vim
@ -719,6 +728,7 @@ The flags that you can use for the substitute commands:
Interrupted
{not in Vi}
*:s_g*
[g] Replace all occurrences in the line. Without this argument,
replacement occurs only for the first occurrence in each line. If
the 'edcompatible' option is on, Vim remembers this flag and toggles
@ -726,26 +736,30 @@ The flags that you can use for the substitute commands:
pattern. If the 'gdefault' option is on, this flag is on by default
and the [g] argument switches it off.
*:s_i*
[i] Ignore case for the pattern. The 'ignorecase' and 'smartcase' options
are not used.
{not in Vi}
*:s_I*
[I] Don't ignore case for the pattern. The 'ignorecase' and 'smartcase'
options are not used.
{not in Vi}
*:s_n*
[n] Report the number of matches, do not actually substitute. The [c]
flag is ignored. The matches are reported as if 'report' is zero.
Useful to |count-items|.
If \= |sub-replace-expression| is used, the expression will be
evaluated in the |sandbox| at every match.
[p] Print the line containing the last substitute.
[p] Print the line containing the last substitute. *:s_p*
[#] Like [p] and prepend the line number.
[#] Like [p] and prepend the line number. *:s_#*
[l] Like [p] but print the text like |:list|.
[l] Like [p] but print the text like |:list|. *:s_l*
*:s_r*
[r] Only useful in combination with `:&` or `:s` without arguments. `:&r`
works the same way as `:~`: When the search pattern is empty, use the
previously used search pattern instead of the search pattern from the
@ -844,7 +858,7 @@ the |substitute()| function with the following exceptions:
- magic is always set without regard to 'magic'.
- A ~ inserts a tilde literally.
- <CR> and \r inserts a carriage-return (CTRL-M).
- \<CR> does not have a special meaning. it's just one of \x.
- \<CR> does not have a special meaning. It's just one of \x.
Examples: >
:s/a\|b/xxx\0xxx/g modifies "a b" to "xxxaxxx xxxbxxx"

View File

@ -534,8 +534,45 @@ after a command causes the rest of the line to be ignored. This can be used
to add comments. Example: >
:set ai "set 'autoindent' option
It is not possible to add a comment to a shell command ":!cmd" or to the
":map" command and a few others, because they see the '"' as part of their
argument. This is mentioned where the command is explained.
":map" command and a few others (mainly commands that expect expressions)
that see the '"' as part of their argument:
:argdo
:autocmd
:bufdo
:cexpr (and the like)
:cdo (and the like)
:command
:cscope (and the like)
:debug
:display
:echo (and the like)
:elseif
:execute
:folddoopen
:folddoclosed
:for
:grep (and the like)
:help (and the like)
:if
:let
:make
:map (and the like including :abbrev commands)
:menu (and the like)
:mkspell
:normal
:ownsyntax
:popup
:promptfind (and the like)
:registers
:return
:sort
:syntax
:tabdo
:tearoff
:vimgrep (and the like)
:while
:windo
*:bar* *:\bar*
'|' can be used to separate commands, so you can give multiple commands in one
@ -832,11 +869,12 @@ it, no matter how many backslashes.
\\# \#
Also see |`=|.
*:<cword>* *:<cWORD>* *:<cfile>* *<cfile>*
*:<sfile>* *<sfile>* *:<afile>* *<afile>*
*:<abuf>* *<abuf>* *:<amatch>* *<amatch>*
*:<cexpr>* *<cexpr>*
*<slnum>* *E495* *E496* *E497* *E499* *E500*
*:<cword>* *<cword>* *:<cWORD>* *<cWORD>*
*:<cexpr>* *<cexpr>* *:<cfile>* *<cfile>*
*:<afile>* *<afile>* *:<abuf>* *<abuf>*
*:<amatch>* *<amatch>*
*:<sfile>* *<sfile>* *:<slnum>* *<slnum>*
*:<sflnum>* *<sflnum>* *E499* *E500*
Note: these are typed literally, they are not special keys!
<cword> is replaced with the word under the cursor (like |star|)
<cWORD> is replaced with the WORD under the cursor (see |WORD|)
@ -849,15 +887,16 @@ Note: these are typed literally, they are not special keys!
|gf| uses)
<afile> When executing autocommands, is replaced with the file name
of the buffer being manipulated, or the file for a read or
write.
write. *E495*
<abuf> When executing autocommands, is replaced with the currently
effective buffer number (for ":r file" and ":so file" it is
the current buffer, the file being read/sourced is not in a
buffer).
buffer). *E496*
<amatch> When executing autocommands, is replaced with the match for
which this autocommand was executed. It differs from
<afile> only when the file name isn't used to match with
(for FileType, Syntax and SpellFileMissing events).
which this autocommand was executed. *E497*
It differs from <afile> only when the file name isn't used
to match with (for FileType, Syntax and SpellFileMissing
events).
<sfile> When executing a ":source" command, is replaced with the
file name of the sourced file. *E498*
When executing a function, is replaced with:
@ -867,9 +906,12 @@ Note: these are typed literally, they are not special keys!
Note that filename-modifiers are useless when <sfile> is
used inside a function.
<slnum> When executing a ":source" command, is replaced with the
line number. *E842*
line number. *E842*
When executing a function it's the line number relative to
the start of the function.
<sflnum> When executing a script, is replaced with the line number.
It differs from <slnum> in that <sflnum> is replaced with
the script line number in any situation. *E961*
*filename-modifiers*
*:_%:* *::8* *::p* *::.* *::~* *::h* *::t* *::r* *::e* *::s* *::gs* *::S*

View File

@ -39,7 +39,9 @@ The second and following arguments may also be a directory name. Vim will
then append the file name of the first argument to the directory name to find
the file.
This only works when a standard "diff" command is available. See 'diffexpr'.
By default an internal diff library will be used. When 'diffopt' or
'diffexpr' has been set an external "diff" command will be used. This only
works when such a diff program is available.
Diffs are local to the current tab page |tab-page|. You can't see diffs with
a window in another tab page. This does make it possible to have several
@ -344,8 +346,9 @@ between file1 and file2: >
The ">" is replaced with the value of 'shellredir'.
The output of "diff" must be a normal "ed" style diff. Do NOT use a context
diff. This example explains the format that Vim expects: >
The output of "diff" must be a normal "ed" style diff or a unified diff. Do
NOT use a context diff. This example explains the format that Vim expects for
the "ed" style diff: >
1a2
> bbb

View File

@ -24,7 +24,9 @@ An alternative is using the 'keymap' option.
1. Defining digraphs *digraphs-define*
*:dig* *:digraphs*
:dig[raphs] show currently defined digraphs.
:dig[raphs][!] Show currently defined digraphs.
With [!] headers are used to make it a bit easier to
find a specific character.
*E104* *E39*
:dig[raphs] {char1}{char2} {number} ...
Add digraph {char1}{char2} to the list. {number} is
@ -111,11 +113,14 @@ this, you will have to type <BS> e again. To avoid this don't set the
You may have problems using Vim with characters which have a value above 128.
For example: You insert ue (u-umlaut) and the editor echoes \334 in Insert
mode. After leaving the Insert mode everything is fine. Note that fmt
removes all characters with a value above 128 from the text being formatted.
On some Unix systems this means you have to define the environment-variable
LC_CTYPE. If you are using csh, then put the following line in your .cshrc: >
setenv LC_CTYPE iso_8859_1
mode. After leaving the Insert mode everything is fine. On some Unix systems
this means you have to define the environment-variable LC_CTYPE. If you are
using csh, then put the following line in your .cshrc: >
setenv LC_CTYPE en_US.utf8
(or similar for a different language or country). The value must be a valid
locale on your system, i.e. on Unix-like systems it must be present in the
output of >
locale -a
==============================================================================
3. Default digraphs *digraphs-default*

View File

@ -1,4 +1,4 @@
*eval.txt* For Vim version 8.1. Last change: 2018 May 17
*eval.txt* For Vim version 8.1. Last change: 2018 Dec 13
VIM REFERENCE MANUAL by Bram Moolenaar
@ -180,10 +180,10 @@ function() or funcref(). When calling the function the Dictionary and/or
arguments will be passed to the function. Example: >
let Cb = function('Callback', ['foo'], myDict)
call Cb()
call Cb('bar')
This will invoke the function as if using: >
call myDict.Callback('foo')
call myDict.Callback('foo', 'bar')
This is very useful when passing a function around, e.g. in the arguments of
|ch_open()|.
@ -518,7 +518,7 @@ To loop over the values use the |values()| function: >
:endfor
If you want both the key and the value use the |items()| function. It returns
a List in which each item is a List with two items, the key and the value: >
a List in which each item is a List with two items, the key and the value: >
:for [key, value] in items(mydict)
: echo key . ': ' . value
:endfor
@ -1088,11 +1088,6 @@ These are INVALID:
3. empty {M}
1e40 missing .{M}
*float-pi* *float-e*
A few useful values to copy&paste: >
:let pi = 3.14159265359
:let e = 2.71828182846
Rationale:
Before floating point was introduced, the text "123.456" was interpreted as
the two numbers "123" and "456", both converted to a string and concatenated,
@ -1101,6 +1096,15 @@ could not find it intentionally being used in Vim scripts, this backwards
incompatibility was accepted in favor of being able to use the normal notation
for floating point numbers.
*float-pi* *float-e*
A few useful values to copy&paste: >
:let pi = 3.14159265359
:let e = 2.71828182846
Or, if you don't want to write them in as floating-point literals, you can
also use functions, like the following: >
:let pi = acos(-1.0)
:let e = exp(1.0)
<
*floating-point-precision*
The precision and range of floating points numbers depends on what "double"
means in the library Vim was compiled with. There is no way to change this at
@ -1438,7 +1442,9 @@ Note that this means that filetype plugins don't get a different set of script
variables for each buffer. Use local buffer variables instead |b:var|.
Predefined Vim variables: *vim-variable* *v:var* *v:*
PREDEFINED VIM VARIABLES *vim-variable* *v:var* *v:*
*E963*
Some variables can be set by the user, but the type cannot be changed.
*v:beval_col* *beval_col-variable*
v:beval_col The number of the column, over which the mouse pointer is.
@ -2022,13 +2028,15 @@ abs({expr}) Float or Number absolute value of {expr}
acos({expr}) Float arc cosine of {expr}
add({list}, {item}) List append {item} to |List| {list}
and({expr}, {expr}) Number bitwise AND
append({lnum}, {string}) Number append {string} below line {lnum}
append({lnum}, {list}) Number append lines {list} below line {lnum}
argc() Number number of files in the argument list
append({lnum}, {text}) Number append {text} below line {lnum}
appendbufline({expr}, {lnum}, {text})
Number append {text} below line {lnum}
in buffer {expr}
argc([{winid}]) Number number of files in the argument list
argidx() Number current index in the argument list
arglistid([{winnr} [, {tabnr}]]) Number argument list id
argv({nr}) String {nr} entry of the argument list
argv() List the argument list
argv({nr} [, {winid}]) String {nr} entry of the argument list
argv([-1, {winid}]) List the argument list
assert_beeps({cmd}) Number assert {cmd} causes a beep
assert_equal({exp}, {act} [, {msg}])
Number assert {exp} is equal to {act}
@ -2036,7 +2044,8 @@ assert_equalfile({fname-one}, {fname-two})
Number assert file contents is equal
assert_exception({error} [, {msg}])
Number assert {error} is in v:exception
assert_fails({cmd} [, {error}]) Number assert {cmd} fails
assert_fails({cmd} [, {error} [, {msg}]])
Number assert {cmd} fails
assert_false({actual} [, {msg}])
Number assert {actual} is false
assert_inrange({lower}, {upper}, {actual} [, {msg}])
@ -2108,8 +2117,8 @@ confirm({msg} [, {choices} [, {default} [, {type}]]])
copy({expr}) any make a shallow copy of {expr}
cos({expr}) Float cosine of {expr}
cosh({expr}) Float hyperbolic cosine of {expr}
count({list}, {expr} [, {ic} [, {start}]])
Number count how many {expr} are in {list}
count({comp}, {expr} [, {ic} [, {start}]])
Number count how many {expr} are in {comp}
cscope_connection([{num}, {dbpath} [, {prepend}]])
Number checks existence of cscope connection
cursor({lnum}, {col} [, {off}])
@ -2203,6 +2212,7 @@ gettabvar({nr}, {varname} [, {def}])
any variable {varname} in tab {nr} or {def}
gettabwinvar({tabnr}, {winnr}, {name} [, {def}])
any {name} in {winnr} in tab page {tabnr}
gettagstack([{nr}]) Dict get the tag stack of window {nr}
getwininfo([{winid}]) List list of info about each window
getwinpos([{timeout}]) List X and Y coord in pixels of the Vim window
getwinposx() Number X coord in pixels of the Vim window
@ -2304,10 +2314,25 @@ perleval({expr}) any evaluate |Perl| expression
pow({x}, {y}) Float {x} to the power of {y}
prevnonblank({lnum}) Number line nr of non-blank line <= {lnum}
printf({fmt}, {expr1}...) String format text
prompt_addtext({buf}, {expr}) none add text to a prompt buffer
prompt_setcallback({buf}, {expr}) none set prompt callback function
prompt_setinterrupt({buf}, {text}) none set prompt interrupt function
prompt_setprompt({buf}, {text}) none set prompt text
prop_add({lnum}, {col}, {props}) none add a text property
prop_clear({lnum} [, {lnum_end} [, {bufnr}]])
none remove all text properties
prop_find({props} [, {direction}])
Dict search for a text property
prop_list({lnum} [, {props}) List text properties in {lnum}
prop_remove({props} [, {lnum} [, {lnum_end}]])
Number remove a text property
prop_type_add({name}, {props}) none define a new property type
prop_type_change({name}, {props})
none change an existing property type
prop_type_delete({name} [, {props}])
none delete a property type
prop_type_get([{name} [, {props}])
Dict get property type values
prop_type_list([{props}]) List get list of property types
pumvisible() Number whether popup menu is visible
pyeval({expr}) any evaluate |Python| expression
py3eval({expr}) any evaluate |python3| expression
@ -2331,7 +2356,6 @@ remote_read({serverid} [, {timeout}])
remote_send({server}, {string} [, {idvar}])
String send key sequence
remote_startserver({name}) none become server {name}
String send key sequence
remove({list}, {idx} [, {end}]) any remove items {idx}-{end} from {list}
remove({dict}, {key}) any remove entry {key} from {dict}
rename({from}, {to}) Number rename (move) file from {from} to {to}
@ -2356,8 +2380,8 @@ searchpos({pattern} [, {flags} [, {stopline} [, {timeout}]]])
server2client({clientid}, {string})
Number send reply string
serverlist() String get a list of available servers
setbufline({expr}, {lnum}, {line})
Number set line {lnum} to {line} in buffer
setbufline({expr}, {lnum}, {text})
Number set line {lnum} to {text} in buffer
{expr}
setbufvar({expr}, {varname}, {val})
none set {varname} in buffer {expr} to {val}
@ -2376,12 +2400,14 @@ settabvar({nr}, {varname}, {val}) none set {varname} in tab page {nr} to {val}
settabwinvar({tabnr}, {winnr}, {varname}, {val})
none set {varname} in window {winnr} in tab
page {tabnr} to {val}
settagstack({nr}, {dict} [, {action}])
Number modify tag stack using {dict}
setwinvar({nr}, {varname}, {val}) none set {varname} in window {nr} to {val}
sha256({string}) String SHA256 checksum of {string}
shellescape({string} [, {special}])
String escape {string} for use as shell
command argument
shiftwidth() Number effective value of 'shiftwidth'
shiftwidth([{col}]) Number effective value of 'shiftwidth'
simplify({filename}) String simplify filename as much as possible
sin({expr}) Float sine of {expr}
sinh({expr}) Float hyperbolic sine of {expr}
@ -2417,6 +2443,7 @@ submatch({nr} [, {list}]) String or List
substitute({expr}, {pat}, {sub}, {flags})
String all {pat} in {expr} replaced with {sub}
swapinfo({fname}) Dict information about swap file {fname}
swapname({expr}) String swap file of buffer {expr}
synID({lnum}, {col}, {trans}) Number syntax ID at {lnum} and {col}
synIDattr({synID}, {what} [, {mode}])
String attribute {what} of syntax ID {synID}
@ -2459,12 +2486,12 @@ term_setkill({buf}, {how}) none set signal to stop job in terminal
term_setrestore({buf}, {command}) none set command to restore terminal
term_setsize({buf}, {rows}, {cols})
none set the size of a terminal
term_start({cmd}, {options}) Job open a terminal window and run a job
term_start({cmd}, {options}) Number 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})
none make memory allocation fail
test_autochdir() none enable 'autochdir' during startup
test_feedinput() none add key sequence to input buffer
test_feedinput({string}) none add key sequence to input buffer
test_garbagecollect_now() none free memory right now for testing
test_ignore_error({expr}) none ignore a specific error
test_null_channel() Channel null value for testing
@ -2473,7 +2500,10 @@ test_null_job() Job null value for testing
test_null_list() List null value for testing
test_null_partial() Funcref null value for testing
test_null_string() String null value for testing
test_override({expr}, {val}) none test with Vim internal overrides
test_option_not_set({name}) none reset flag indicating option was set
test_override({expr}, {val}) none test with Vim internal overrides
test_scrollbar({which}, {value}, {dragging})
none scroll in the GUI for testing
test_settime({expr}) none set current time for testing
timer_info([{id}]) List information about timers
timer_pause({id}, {pause}) none pause or unpause a timer
@ -2563,10 +2593,10 @@ and({expr}, {expr}) *and()*
:let flag = and(bits, 0x80)
append({lnum}, {expr}) *append()*
When {expr} is a |List|: Append each item of the |List| as a
append({lnum}, {text}) *append()*
When {text} is a |List|: Append each item of the |List| as a
text line below line {lnum} in the current buffer.
Otherwise append {expr} as one text line below line {lnum} in
Otherwise append {text} as one text line below line {lnum} in
the current buffer.
{lnum} can be zero to insert a line before the first one.
Returns 1 for failure ({lnum} out of range or out of memory),
@ -2590,8 +2620,15 @@ appendbufline({expr}, {lnum}, {text}) *appendbufline()*
:let failed = appendbufline(13, 0, "# THE START")
<
*argc()*
argc() The result is the number of files in the argument list of the
current window. See |arglist|.
argc([{winid}])
The result is the number of files in the argument list. See
|arglist|.
If {winid} is not supplied, the argument list of the current
window is used.
If {winid} is -1, the global argument list is used.
Otherwise {winid} specifies the window of which the argument
list is used: either the window number or the window ID.
Returns -1 if the {winid} argument is invalid.
*argidx()*
argidx() The result is the current index in the argument list. 0 is
@ -2602,7 +2639,7 @@ arglistid([{winnr} [, {tabnr}]])
Return the argument list ID. This is a number which
identifies the argument list being used. Zero is used for the
global argument list. See |arglist|.
Return -1 if the arguments are invalid.
Returns -1 if the arguments are invalid.
Without arguments use the current window.
With {winnr} only use this window in the current tab page.
@ -2611,17 +2648,19 @@ arglistid([{winnr} [, {tabnr}]])
{winnr} can be the window number or the |window-ID|.
*argv()*
argv([{nr}]) The result is the {nr}th file in the argument list of the
current window. See |arglist|. "argv(0)" is the first one.
Example: >
argv([{nr} [, {winid}])
The result is the {nr}th file in the argument list. See
|arglist|. "argv(0)" is the first one. Example: >
:let i = 0
:while i < argc()
: let f = escape(fnameescape(argv(i)), '.')
: exe 'amenu Arg.' . f . ' :e ' . f . '<CR>'
: let i = i + 1
:endwhile
< Without the {nr} argument a |List| with the whole |arglist| is
returned.
< Without the {nr} argument, or when {nr} is -1, a |List| with
the whole |arglist| is returned.
The {winid} argument specifies the window ID, see |argc()|.
assert_beeps({cmd}) *assert_beeps()*
Run {cmd} and add an error message to |v:errors| if it does
@ -2666,7 +2705,7 @@ assert_exception({error} [, {msg}]) *assert_exception()*
call assert_exception('E492:')
endtry
assert_fails({cmd} [, {error}]) *assert_fails()*
assert_fails({cmd} [, {error} [, {msg}]]) *assert_fails()*
Run {cmd} and add an error message to |v:errors| if it does
NOT produce an error. Also see |assert-return|.
When {error} is given it must match in |v:errmsg|.
@ -2796,15 +2835,15 @@ balloon_show({expr}) *balloon_show()*
When showing a balloon is not possible nothing happens, no
error message.
{only available when compiled with the +balloon_eval or
+balloon_eval_term feature}
{only available when compiled with the |+balloon_eval| or
|+balloon_eval_term| feature}
balloon_split({msg}) *balloon_split()*
Split {msg} into lines to be displayed in a balloon. The
splits are made for the current window size and optimize to
show debugger output.
Returns a |List| with the split lines.
{only available when compiled with the +balloon_eval_term
{only available when compiled with the |+balloon_eval_term|
feature}
*browse()*
@ -3119,8 +3158,9 @@ ch_logfile({fname} [, {mode}]) *ch_logfile()*
When {mode} is omitted or "a" append to the file.
When {mode} is "w" start with an empty file.
The file is flushed after every message, on Unix you can use
"tail -f" to see what is going on in real time.
Use |ch_log()| to write log messages. The file is flushed
after every message, on Unix you can use "tail -f" to see what
is going on in real time.
This function is not available in the |sandbox|.
NOTE: the channel communication is stored in the file, be
@ -3545,7 +3585,7 @@ deletebufline({expr}, {first} [, {last}]) *deletebufline()*
For the use of {expr}, see |bufname()| above.
{first} and {last} are used like with |setline()|. Note that
{first} and {last} are used like with |getline()|. Note that
when using |line()| this refers to the current buffer. Use "$"
to refer to the last line in buffer {expr}.
@ -3798,7 +3838,10 @@ expand({expr} [, {nosuf} [, {list}]]) *expand()*
<abuf> autocmd buffer number (as a String!)
<amatch> autocmd matched name
<sfile> sourced script file or function name
<slnum> sourced script file line number
<slnum> sourced script line number or function
line number
<sflnum> script file line number, also when in
a function
<cword> word under the cursor
<cWORD> WORD under the cursor
<client> the {clientid} of the last received
@ -4497,6 +4540,8 @@ getcmdline() *getcmdline()*
Example: >
:cmap <F7> <C-\>eescape(getcmdline(), ' \')<CR>
< Also see |getcmdtype()|, |getcmdpos()| and |setcmdpos()|.
Returns an empty string when entering a password or using
|inputsecret()|.
getcmdpos() *getcmdpos()*
Return the position of the cursor in the command line as a
@ -4594,7 +4639,6 @@ getcurpos() Get the position of the cursor. This is like getpos('.'), but
getcwd([{winnr} [, {tabnr}]])
The result is a String, which is the name of the current
working directory.
Without arguments, for the current window.
With {winnr} return the local current directory of this window
in the current tab page. {winnr} can be the window number or
@ -4952,6 +4996,34 @@ gettabwinvar({tabnr}, {winnr}, {varname} [, {def}]) *gettabwinvar()*
To obtain all window-local variables use: >
gettabwinvar({tabnr}, {winnr}, '&')
gettagstack([{nr}]) *gettagstack()*
The result is a Dict, which is the tag stack of window {nr}.
{nr} can be the window number or the |window-ID|.
When {nr} is not specified, the current window is used.
When window {nr} doesn't exist, an empty Dict is returned.
The returned dictionary contains the following entries:
curidx Current index in the stack. When at
top of the stack, set to (length + 1).
Index of bottom of the stack is 1.
items List of items in the stack. Each item
is a dictionary containing the
entries described below.
length Number of entries in the stack.
Each item in the stack is a dictionary with the following
entries:
bufnr buffer number of the current jump
from cursor position before the tag jump.
See |getpos()| for the format of the
returned list.
matchnr current matching tag number. Used when
multiple matching tags are found for a
name.
tagname name of the tag
See |tagstack| for more information about the tag stack.
getwininfo([{winid}]) *getwininfo()*
Returns information about windows as a List with Dictionaries.
@ -5931,6 +6003,7 @@ maparg({name} [, {mode} [, {abbr} [, {dict}]]]) *maparg()*
(|mapmode-ic|)
"sid" The script local ID, used for <sid> mappings
(|<SID>|).
"lnum" The line number in "sid", zero if unknown.
"nowait" Do not wait for other, longer mappings.
(|:map-<nowait>|).
@ -5978,11 +6051,14 @@ match({expr}, {pat} [, {start} [, {count}]]) *match()*
When {expr} is a |List| then this returns the index of the
first item where {pat} matches. Each item is used as a
String, |Lists| and |Dictionaries| are used as echoed.
Otherwise, {expr} is used as a String. The result is a
Number, which gives the index (byte offset) in {expr} where
{pat} matches.
A match at the first character or |List| item returns zero.
If there is no match -1 is returned.
For getting submatches see |matchlist()|.
Example: >
:echo match("testing", "ing") " results in 4
@ -6597,6 +6673,191 @@ prompt_setprompt({buf}, {text}) *prompt_setprompt()*
The result is only visible if {buf} has 'buftype' set to
"prompt". Example: >
call prompt_setprompt(bufnr(''), 'command: ')
<
*prop_add()* *E965*
prop_add({lnum}, {col}, {props})
Attach a text property at position {lnum}, {col}. Use one for
the first column.
If {lnum} is invalid an error is given. *E966*
If {col} is invalid an error is given. *E964*
{props} is a dictionary with these fields:
"length" - length of text in characters, can only be
used for a property that does not
continue in another line
"end_lnum" - line number for end of text
"end_col" - column for end of text; not used when
"length" is present
"bufnr - buffer to add the property to; when
omitted the current buffer is used
"id" - user defined ID for the property; when
omitted zero is used
"type" - name of the text property type
All fields except "type" are optional.
It is an error when both "length" and "end_lnum" or "end_col"
are passed. Either use "length" or "end_col" for a property
within one line, or use "end_lnum" and "end_col" for a
property that spans more than one line.
When neither "length" or "end_col" are passed the property
will apply to one character.
"type" will first be looked up in the buffer the property is
added to. When not found, the global property types are used.
If not found an error is given.
See |text-properties| for information about text properties.
prop_clear({lnum} [, {lnum_end} [, {props}]]) *prop_clear()*
Remove all text properties from line {lnum}.
When {lnum_end} is given, remove all text properties from line
{lnum} to {lnum_end} (inclusive).
When {props} contains a "bufnr" item use this buffer,
otherwise use the current buffer.
See |text-properties| for information about text properties.
*prop_find()*
prop_find({props} [, {direction}])
NOT IMPLEMENTED YET
Search for a text property as specified with {props}:
"id" property with this ID
"type" property with this type name
"bufnr buffer to search in; when present a
start position with "lnum" and "col"
must be given; when omitted the
current buffer is used
"lnum" start in this line (when omitted start
at the cursor)
"col" start at this column (when omitted
and "lnum" is given: use column 1,
otherwise start at the cursor)
"skipstart" do not look for a match at the start
position
{direction} can be "f" for forward and "b" for backward. When
omitted forward search is performed.
If a match is found then a Dict is returned with the entries
as with prop_list(), and additionally an "lnum" entry.
If no match is found then an empty Dict is returned.
See |text-properties| for information about text properties.
prop_list({lnum} [, {props}]) *prop_list()*
Return a List with all text properties in line {lnum}.
When {props} contains a "bufnr" item, use this buffer instead
of the current buffer.
The properties are ordered by starting column and priority.
Each property is a Dict with these entries:
"col" starting column
"length" length in bytes
"id" property ID
"type" name of the property type, omitted if
the type was deleted
"start" when TRUE property starts in this line
"end" when TRUE property ends in this line
When "start" is zero the property started in a previous line,
the current one is a continuation.
When "end" is zero the property continues in the next line.
The line break after this line is included.
See |text-properties| for information about text properties.
*prop_remove()* *E968*
prop_remove({props} [, {lnum} [, {lnum_end}]])
Remove a matching text property from line {lnum}. When
{lnum_end} is given, remove matching text properties from line
{lnum} to {lnum_end} (inclusive).
When {lnum} is omitted remove matching text properties from
all lines.
{props} is a dictionary with these fields:
"id" - remove text properties with this ID
"type" - remove text properties with this type name
"bufnr" - use this buffer instead of the current one
"all" - when TRUE remove all matching text
properties, not just the first one
A property matches when either "id" or "type" matches.
Returns the number of properties that were removed.
See |text-properties| for information about text properties.
prop_type_add({name}, {props}) *prop_type_add()* *E969* *E970*
Add a text property type {name}. If a property type with this
name already exists an error is given.
{props} is a dictionary with these optional fields:
"bufnr" - define the property only for this
buffer; this avoids name collisions and
automatically clears the property types
when the buffer is deleted.
"highlight" - name of highlight group to use
"priority" - when a character has multiple text
properties the one with the highest
priority will be used; negative values
can be used, the default priority is
zero
"start_incl" - when TRUE inserts at the start
position will be included in the text
property
"end_incl" - when TRUE inserts at the end
position will be included in the text
property
See |text-properties| for information about text properties.
prop_type_change({name}, {props}) *prop_type_change()*
Change properties of an existing text property type. If a
property with this name does not exist an error is given.
The {props} argument is just like |prop_type_add()|.
See |text-properties| for information about text properties.
prop_type_delete({name} [, {props}]) *prop_type_delete()*
Remove the text property type {name}. When text properties
using the type {name} are still in place, they will not have
an effect and can no longer be removed by name.
{props} can contain a "bufnr" item. When it is given, delete
a property type from this buffer instead of from the global
property types.
When text property type {name} is not found there is no error.
See |text-properties| for information about text properties.
prop_type_get([{name} [, {props}]) *prop_type_get()*
Returns the properties of property type {name}. This is a
dictionary with the same fields as was given to
prop_type_add().
When the property type {name} does not exist, an empty
dictionary is returned.
{props} can contain a "bufnr" item. When it is given, use
this buffer instead of the global property types.
See |text-properties| for information about text properties.
prop_type_list([{props}]) *prop_type_list()*
Returns a list with all property type names.
{props} can contain a "bufnr" item. When it is given, use
this buffer instead of the global property types.
See |text-properties| for information about text properties.
pumvisible() *pumvisible()*
@ -7512,6 +7773,37 @@ settabwinvar({tabnr}, {winnr}, {varname}, {val}) *settabwinvar()*
:call settabwinvar(3, 2, "myvar", "foobar")
< This function is not available in the |sandbox|.
settagstack({nr}, {dict} [, {action}]) *settagstack()*
Modify the tag stack of the window {nr} using {dict}.
{nr} can be the window number or the |window-ID|.
For a list of supported items in {dict}, refer to
|gettagstack()|
*E962*
If {action} is not present or is set to 'r', then the tag
stack is replaced. If {action} is set to 'a', then new entries
from {dict} are pushed onto the tag stack.
Returns zero for success, -1 for failure.
Examples:
Set current index of the tag stack to 4: >
call settagstack(1005, {'curidx' : 4})
< Empty the tag stack of window 3: >
call settagstack(3, {'items' : []})
< Push a new item onto the tag stack: >
let pos = [bufnr('myfile.txt'), 10, 1, 0]
let newtag = [{'tagname' : 'mytag', 'from' : pos}]
call settagstack(2, {'items' : newtag}, 'a')
< Save and restore the tag stack: >
let stack = gettagstack(1003)
" do something else
call settagstack(1003, stack)
unlet stack
<
setwinvar({nr}, {varname}, {val}) *setwinvar()*
Like |settabwinvar()| for the current tab page.
Examples: >
@ -7554,11 +7846,17 @@ shellescape({string} [, {special}]) *shellescape()*
< See also |::S|.
shiftwidth() *shiftwidth()*
shiftwidth([{col}]) *shiftwidth()*
Returns the effective value of 'shiftwidth'. This is the
'shiftwidth' value unless it is zero, in which case it is the
'tabstop' value. This function was introduced with patch
7.3.694 in 2012, everybody should have it by now.
7.3.694 in 2012, everybody should have it by now (however it
did not allow for the optional {col} argument until 8.1.542).
When there is one argument {col} this is used as column number
for which to return the 'shiftwidth' value. This matters for the
'vartabstop' feature. If the 'vartabstop' setting is enabled and
no {col} argument is given, column 1 will be assumed.
simplify({filename}) *simplify()*
@ -7755,7 +8053,8 @@ str2float({expr}) *str2float()*
as when using a floating point number in an expression, see
|floating-point-format|. But it's a bit more permissive.
E.g., "1e40" is accepted, while in an expression you need to
write "1.0e40".
write "1.0e40". The hexadecimal form "0x123" is also
accepted, but not others, like binary or octal.
Text after the number is silently ignored.
The decimal point is always '.', no matter what the locale is
set to. A comma ends the number: "12,345.67" is converted to
@ -8016,11 +8315,11 @@ substitute({expr}, {pat}, {sub}, {flags}) *substitute()*
swapinfo({fname}) *swapinfo()*
The result is a dictionary, which holds information about the
swapfile {fname}. The available fields are:
version VIM version
version Vim version
user user name
host host name
fname original file name
pid PID of the VIM process that created the swap
pid PID of the Vim process that created the swap
file
mtime last modification time in seconds
inode Optional: INODE number of the file
@ -8032,6 +8331,13 @@ swapinfo({fname}) *swapinfo()*
Not a swap file: does not contain correct block ID
Magic number mismatch: Info in first block is invalid
swapname({expr}) *swapname()*
The result is the swap file path of the buffer {expr}.
For the use of {expr}, see |bufname()| above.
If buffer {expr} is the current buffer, the result is equal to
|:swapname| (unless no swap file).
If buffer {expr} has no swap file, returns an empty string.
synID({lnum}, {col}, {trans}) *synID()*
The result is a Number, which is the syntax ID at the position
{lnum} and {col} in the current window.
@ -8113,7 +8419,7 @@ synconcealed({lnum}, {col}) *synconcealed()*
concealable region if there are two consecutive regions
with the same replacement character. For an example, if
the text is "123456" and both "23" and "45" are concealed
and replace by the character "X", then:
and replaced by the character "X", then:
call returns ~
synconcealed(lnum, 1) [0, '', 0]
synconcealed(lnum, 2) [1, 'X', 1]
@ -8341,7 +8647,7 @@ term_dumpdiff({filename}, {filename} [, {options}])
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.
The parts are separated by a line of equals.
If the {options} argument is present, it must be a Dict with
these possible members:
@ -8386,7 +8692,9 @@ 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*
If the job in the terminal already finished an error is given:
*E958*
If {filename} already exists an error is given: *E953*
Also see |terminal-diff|.
{options} is a dictionary with these optional entries:
@ -8432,8 +8740,8 @@ term_getcursor({buf}) *term_getcursor()*
"dict" can have these members:
"visible" one when the cursor is visible, zero when it
is hidden.
"blink" one when the cursor is visible, zero when it
is hidden.
"blink" one when the cursor is blinking, zero when it
is not blinking.
"shape" 1 for a block cursor, 2 for underline and 3
for a vertical bar.
@ -8465,7 +8773,7 @@ term_getscrolled({buf}) *term_getscrolled()*
used for |term_getline()| and |getline()|, so that: >
term_getline(buf, N)
< is equal to: >
`getline(N + term_getscrolled(buf))
getline(N + term_getscrolled(buf))
< (if that line exists).
{buf} is used as with |term_getsize()|.
@ -8728,6 +9036,15 @@ test_null_partial() *test_null_partial()*
test_null_string() *test_null_string()*
Return a String that is null. Only useful for testing.
test_option_not_set({name}) *test_option_not_set()*
Reset the flag that indicates option {name} was set. Thus it
looks like it still has the default value. Use like this: >
set ambiwidth=double
call test_option_not_set('ambiwidth')
< Now the 'ambiwidth' option behaves like it was never changed,
even though the value is "double".
Only to be used for testing!
test_override({name}, {val}) *test_override()*
Overrides certain parts of Vims internal processing to be able
to run tests. Only to be used for testing Vim!
@ -8754,6 +9071,23 @@ test_override({name}, {val}) *test_override()*
< The value of "starting" is saved. It is restored by: >
call test_override('starting', 0)
test_scrollbar({which}, {value}, {dragging}) *test_scrollbar()*
Pretend using scrollbar {which} to move it to position
{value}. {which} can be:
left Left scrollbar of the current window
right Right scrollbar of the current window
hor Horizontal scrollbar
For the vertical scrollbars {value} can be 1 to the
line-count of the buffer. For the horizontal scrollbar the
{value} can be between 1 and the maximum line length, assuming
'wrap' is not set.
When {dragging} is non-zero it's like dragging the scrollbar,
otherwise it's like clicking in the scrollbar.
Only works when the {which} scrollbar actually exists,
obviously only when using the GUI.
test_settime({expr}) *test_settime()*
Set the time Vim uses internally. Currently only used for
timestamps in the history, as they are used in viminfo, and
@ -9069,7 +9403,7 @@ win_getid([{win} [, {tab}]]) *win_getid()*
Get the |window-ID| for the specified window.
When {win} is missing use the current window.
With {win} this is the window number. The top window has
number 1. Use `win_getid(winnr())` for the current window.
number 1.
Without {tab} use the current tab, otherwise the tab with
number {tab}. The first tab has number one.
Return zero if the window cannot be found.
@ -9477,6 +9811,7 @@ terminal Compiled with |terminal| support.
terminfo Compiled with terminfo instead of termcap.
termresponse Compiled with support for |t_RV| and |v:termresponse|.
textobjects Compiled with support for |text-objects|.
textprop Compiled with support for |text-properties|.
tgetent Compiled with tgetent support, able to use a termcap
or terminfo file.
timers Compiled with |timer_start()| support.
@ -9615,9 +9950,13 @@ See |:verbose-cmd| for more information.
deleted if there are no more references to it.
*E127* *E122*
When a function by this name already exists and [!] is
not used an error message is given. When [!] is used,
an existing function is silently replaced. Unless it
is currently being executed, that is an error.
not used an error message is given. There is one
exception: When sourcing a script again, a function
that was previously defined in that script will be
silently replaced.
When [!] is used, an existing function is silently
replaced. Unless it is currently being executed, that
is an error.
NOTE: Use ! wisely. If used without care it can cause
an existing function to be replaced unexpectedly,
which is hard to debug.

View File

@ -547,15 +547,16 @@ floating menus that do not appear on the main menu bar.
5.2 Creating New Menus *creating-menus*
*:me* *:menu* *:noreme* *:noremenu*
*:am* *:amenu* *:an* *:anoremenu*
*:nme* *:nmenu* *:nnoreme* *:nnoremenu*
*:ome* *:omenu* *:onoreme* *:onoremenu*
*:vme* *:vmenu* *:vnoreme* *:vnoremenu*
*:xme* *:xmenu* *:xnoreme* *:xnoremenu*
*:sme* *:smenu* *:snoreme* *:snoremenu*
*:ime* *:imenu* *:inoreme* *:inoremenu*
*:cme* *:cmenu* *:cnoreme* *:cnoremenu*
*:me* *:menu* *:noreme* *:noremenu*
*:am* *:amenu* *:an* *:anoremenu*
*:nme* *:nmenu* *:nnoreme* *:nnoremenu*
*:ome* *:omenu* *:onoreme* *:onoremenu*
*:vme* *:vmenu* *:vnoreme* *:vnoremenu*
*:xme* *:xmenu* *:xnoreme* *:xnoremenu*
*:sme* *:smenu* *:snoreme* *:snoremenu*
*:ime* *:imenu* *:inoreme* *:inoremenu*
*:cme* *:cmenu* *:cnoreme* *:cnoremenu*
*:tlm* *:tlmenu* *:tln* *:tlnoremenu*
*E330* *E327* *E331* *E336* *E333*
*E328* *E329* *E337* *E792*
To create a new menu item, use the ":menu" commands. They are mostly like
@ -571,6 +572,10 @@ the mouse button down on this will pop up a menu containing the item
"Big Changes", which is a sub-menu containing the item "Delete All Spaces",
which when selected, performs the operation.
To create a menu for terminal mode, use |:tlmenu| instead of |:tmenu| unlike
key mapping (|:tmap|). This is because |:tmenu| is already used for defining
tooltips for menus. See |terminal-typing|.
Special characters in a menu name:
& The next character is the shortcut key. Make sure each
@ -589,9 +594,9 @@ With the shortcut "F" (while keeping the <Alt> key pressed), and then "O",
this menu can be used. The second part is shown as "Open :e". The ":e"
is right aligned, and the "O" is underlined, to indicate it is the shortcut.
The ":amenu" command can be used to define menu entries for all modes at once.
To make the command work correctly, a character is automatically inserted for
some modes:
The ":amenu" command can be used to define menu entries for all modes at once,
except for Terminal mode. To make the command work correctly, a character is
automatically inserted for some modes:
mode inserted appended ~
Normal nothing nothing
Visual <C-C> <C-\><C-G>
@ -865,6 +870,16 @@ be used to complete the name of the menu item.
insert-mode menu Eg: >
:emenu File.Exit
:[range]em[enu] {mode} {menu} Like above, but execute the menu for {mode}:
'n': |:nmenu| Normal mode
'v': |:vmenu| Visual mode
's': |:smenu| Select mode
'o': |:omenu| Operator-pending mode
't': |:tlmenu| Terminal mode
'i': |:imenu| Insert mode
'c': |:cmenu| Cmdline mode
If the console-mode vim has been compiled with WANT_MENU defined, you can
use :emenu to access useful menu items you may have got used to from GUI
mode. See 'wildmenu' for an option that works well with this. See
@ -885,6 +900,7 @@ using the last visual selection.
*:sunme* *:sunmenu*
*:iunme* *:iunmenu*
*:cunme* *:cunmenu*
*:tlu* *:tlunmenu*
To delete a menu item or a whole submenu, use the unmenu commands, which are
analogous to the unmap commands. Eg: >
:unmenu! Edit.Paste
@ -951,6 +967,8 @@ See section |42.4| in the user manual.
:tu[nmenu] {menupath} Remove a tip for a menu or tool.
{only in X11 and Win32 GUI}
Note: To create menus for terminal mode, use |:tlmenu| instead.
When a tip is defined for a menu item, it appears in the command-line area
when the mouse is over that item, much like a standard Windows menu hint in
the status bar. (Except when Vim is in Command-line mode, when of course

View File

@ -496,7 +496,7 @@ unexpectedly less attractive or even deteriorates their usability. Keep this
in mind always when you try improving a theme.
Example 3. border color
Example 3. border color ~
To eliminate borders when maximized: >

View File

@ -225,4 +225,4 @@ will try to find help for it. Especially for options in single quotes, e.g.
'compatible'.
------------------------------------------------------------------------------
vim:tw=78:fo=tcq2:isk=!-~,^*,^\|,^\":ts=8:noet:ft=help:norl:
vim:tw=78:isk=!-~,^*,^\|,^\":ts=8:noet:ft=help:norl:

View File

@ -45,8 +45,8 @@ The Perl patches for Vim were made by:
Matt Gerassimof
Perl for MS-Windows (and other platforms) can be found at:
http://www.perl.org/ The ActiveState one should work, Strawberry Perl is a
good alternative.
http://www.perl.org/
The ActiveState one should work, Strawberry Perl is a good alternative.
==============================================================================
3. Using the Perl interface *perl-using*

View File

@ -60,9 +60,10 @@ Example: >
endfunction
To see what version of Python you have: >
:python import sys
:python print(sys.version)
There is no need to import sys, it's done by default.
Note: Python is very sensitive to the indenting. Make sure the "class" line
and "EOF" do not have any indent.
@ -110,7 +111,6 @@ Python commands cannot be used in the |sandbox|.
To pass arguments you need to set sys.argv[] explicitly. Example: >
:python import sys
:python sys.argv = ["foo", "bar"]
:pyfile myscript.py

View File

@ -588,8 +588,9 @@ The basics for using flexible indenting are explained in section |30.3| of the
user manual.
If you want to write your own indent file, it must set the 'indentexpr'
option. Setting the 'indentkeys' option is often useful. See the
$VIMRUNTIME/indent directory for examples.
option. Setting the 'indentkeys' option is often useful.
See the $VIMRUNTIME/indent/README.txt file for hints.
See the $VIMRUNTIME/indent directory for examples.
REMARKS ABOUT SPECIFIC INDENT FILES ~
@ -602,14 +603,14 @@ the use of square and curly brackets, and otherwise by community convention.
These conventions are not universally followed, so the Clojure indent script
offers a few configurable options, listed below.
If the current vim does not include searchpairpos(), the indent script falls
If the current vim does not include |searchpairpos()|, the indent script falls
back to normal 'lisp' indenting, and the following options are ignored.
*g:clojure_maxlines*
Set maximum scan distance of searchpairpos(). Larger values trade performance
for correctness when dealing with very long forms. A value of 0 will scan
without limits.
Set maximum scan distance of |searchpairpos()|. Larger values trade
performance for correctness when dealing with very long forms. A value of 0
will scan without limits.
>
" Default
let g:clojure_maxlines = 100
@ -935,11 +936,16 @@ given are the defaults. Note that the variables are set to an expression, so
that you can change the value of 'shiftwidth' later.
Indent after an open paren: >
let g:pyindent_open_paren = '&sw * 2'
let g:pyindent_open_paren = 'shiftwidth() * 2'
Indent after a nested paren: >
let g:pyindent_nested_paren = '&sw'
let g:pyindent_nested_paren = 'shiftwidth()'
Indent for a continuation line: >
let g:pyindent_continue = '&sw * 2'
let g:pyindent_continue = 'shiftwidth() * 2'
The method uses |searchpair()| to look back for unclosed parenthesis. This
can sometimes be slow, thus it timeouts after 150 msec. If you notice the
indenting isn't correct, you can set a larger timeout in msec: >
let g:pyindent_searchpair_timeout = 500
R *ft-r-indent*
@ -1033,7 +1039,7 @@ Furthermore, setting the variable b:verilog_indent_width to change the
indenting width (default is 'shiftwidth'): >
let b:verilog_indent_width = 4
let b:verilog_indent_width = &sw * 2
let b:verilog_indent_width = shiftwidth() * 2
In addition, you can turn the verbose mode for debug issue: >
@ -1156,7 +1162,7 @@ VIM *ft-vim-indent*
For indenting Vim scripts there is one variable that specifies the amount of
indent for a continuation line, a line that starts with a backslash: >
:let g:vim_indent_cont = &sw * 3
:let g:vim_indent_cont = shiftwidth() * 3
Three times shiftwidth is the default value.

View File

@ -1583,6 +1583,9 @@ tag command action ~
|:tjump| :tj[ump] like ":tselect", but jump directly when there
is only one match
|:tlast| :tl[ast] jump to last matching tag
|:tlmenu| :tlm[enu] add menu for Terminal-Job mode
|:tlnoremenu| :tln[oremenu] like ":noremenu" but for Terminal-Job mode
|:tlunmenu| :tlu[nmenu] remove menu for Terminal-Job mode
|:tmapclear| :tmapc[lear] remove all mappings for Terminal-Job mode
|:tmap| :tma[p] like ":map" but for Terminal-Job mode
|:tmenu| :tm[enu] define menu tooltip

View File

@ -1,4 +1,4 @@
*map.txt* For Vim version 8.1. Last change: 2018 May 13
*map.txt* For Vim version 8.1. Last change: 2018 Dec 08
VIM REFERENCE MANUAL by Bram Moolenaar
@ -371,8 +371,9 @@ job running in the terminal. See |terminal-typing|.
*omap-info*
Operator-pending mappings can be used to define a movement command that can be
used with any operator. Simple example: ":omap { w" makes "y{" work like "yw"
and "d{" like "dw".
used with any operator. Simple example: >
:omap { w
makes "y{" work like "yw" and "d{" like "dw".
To ignore the starting cursor position and select different text, you can have
the omap start Visual mode to select the text to be operated upon. Example
@ -383,9 +384,11 @@ Normal mode commands find the first '(' character and select the first word
before it. That usually is the function name.
To enter a mapping for Normal and Visual mode, but not Operator-pending mode,
first define it for all three modes, then unmap it for Operator-pending mode:
first define it for all three modes, then unmap it for
Operator-pending mode: >
:map xx something-difficult
:ounmap xx
Likewise for a mapping for Visual and Operator-pending mode or Normal and
Operator-pending mode.
@ -1220,6 +1223,10 @@ See |:verbose-cmd| for more information.
attributes (see below) are {attr}. If the command
already exists, an error is reported, unless a ! is
specified, in which case the command is redefined.
There is one exception: When sourcing a script again,
a command that was previously defined in that script
will be silently replaced.
:delc[ommand] {cmd} *:delc* *:delcommand* *E184*
Delete the user-defined command {cmd}.
@ -1227,7 +1234,8 @@ See |:verbose-cmd| for more information.
:comc[lear] *:comc* *:comclear*
Delete all user-defined commands.
Command attributes
Command attributes ~
User-defined commands are treated by Vim just like any other Ex commands. They
can have arguments, or have a range specified. Arguments are subject to
@ -1238,8 +1246,9 @@ There are a number of attributes, split into four categories: argument
handling, completion behavior, range handling, and special cases. The
attributes are described below, by category.
Argument handling *E175* *E176* *:command-nargs*
Argument handling ~
*E175* *E176* *:command-nargs*
By default, a user defined command will take no arguments (and an error is
reported if any are supplied). However, it is possible to specify that the
command can take arguments, using the -nargs attribute. Valid cases are:
@ -1268,8 +1277,10 @@ defined, not where it is invoked! Example:
Executing script2.vim will result in "None" being echoed. Not what you
intended! Calling a function may be an alternative.
Completion behavior *:command-completion* *E179*
*E180* *E181* *:command-complete*
Completion behavior ~
*:command-completion* *E179* *E180* *E181*
*:command-complete*
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:
@ -1314,9 +1325,9 @@ completion can be enabled:
Note: That some completion methods might expand environment variables.
Custom completion *:command-completion-custom*
*:command-completion-customlist*
*E467* *E468*
Custom completion ~
*:command-completion-custom*
*:command-completion-customlist* *E467* *E468*
It is possible to define customized completion schemes via the "custom,{func}"
or the "customlist,{func}" completion argument. The {func} part should be a
function with the following signature: >
@ -1361,8 +1372,8 @@ the 'path' option: >
This example does not work for file names with spaces!
Range handling *E177* *E178* *:command-range*
*:command-count*
Range handling ~
*E177* *E178* *:command-range* *:command-count*
By default, user-defined commands do not accept a line number range. However,
it is possible to specify that the command does take a range (the -range
attribute), or that it takes an arbitrary count value, either in the line
@ -1396,8 +1407,11 @@ Possible values are:
-addr=loaded_buffers Range for loaded buffers
-addr=windows Range for windows
-addr=tabs Range for tab pages
-addr=other other kind of range
Special cases *:command-bang* *:command-bar*
Special cases ~
*:command-bang* *:command-bar*
*:command-register* *:command-buffer*
There are some special cases as well:
@ -1415,7 +1429,8 @@ replacement text separately.
Note that these arguments can be abbreviated, but that is a deprecated
feature. Use the full name for new scripts.
Replacement text
Replacement text ~
The replacement text for a user defined command is scanned for special escape
sequences, using <...> notation. Escape sequences are replaced with values

View File

@ -102,8 +102,10 @@ Or:
This also contains tools xgettext, msgformat and others.
libintl.dll should be placed in same directory with (g)vim.exe, or some
place where PATH environment value describe. Vim also finds libintl-8.dll.
libintl.dll should be placed in same directory as (g)vim.exe, or one of the
directories listed in the PATH environment value. Vim also looks for the
alternate names "libintl-8.dll" and "intl.dll".
Message files (vim.mo) have to be placed in "$VIMRUNTIME/lang/xx/LC_MESSAGES",
where "xx" is the abbreviation of the language (mostly two letters).

View File

@ -1025,7 +1025,7 @@ remembered. You can return to that position with the "''" and "``" command,
unless the line containing that position was changed or deleted. The
following commands are "jump" commands: "'", "`", "G", "/", "?", "n", "N",
"%", "(", ")", "[[", "]]", "{", "}", ":s", ":tag", "L", "M", "H" and the
commands that start editing a new file.
commands that start editing a new file.
*CTRL-O*
CTRL-O Go to [count] Older cursor position in jump list

View File

@ -120,10 +120,10 @@ and the following arguments will be ignored.
When 'verbose' is non-zero, displaying an option value will also tell where it
was last set. Example: >
:verbose set shiftwidth cindent?
< shiftwidth=4 ~
Last set from modeline ~
cindent ~
Last set from /usr/local/share/vim/vim60/ftplugin/c.vim ~
< shiftwidth=4 ~
Last set from modeline line 1 ~
cindent ~
Last set from /usr/local/share/vim/vim60/ftplugin/c.vim line 30 ~
This is only done when specific option values are requested, not for ":verbose
set all" or ":verbose set" without an argument.
When the option was set by hand there is no "Last set" message.
@ -132,7 +132,7 @@ autocommand, the script in which it was defined is reported.
Note that an option may also have been set as a side effect of setting
'compatible'.
A few special texts:
Last set from modeline ~
Last set from modeline line 1 ~
Option was set in a |modeline|.
Last set from --cmd argument ~
Option was set with command line argument |--cmd| or +.
@ -846,7 +846,7 @@ A jump table for the options with a short description can be found at |Q_op|.
'{A-Z0-9}, or `{A-Z0-9} command takes one to another file.
Note that for some commands the 'autowrite' option is not used, see
'autowriteall' for that.
Some buffers will not be written, specifically when 'buttype' is
Some buffers will not be written, specifically when 'buftype' is
"nowrite", "nofile", "terminal" or "prompt".
*'autowriteall'* *'awa'* *'noautowriteall'* *'noawa'*
@ -1057,9 +1057,9 @@ A jump table for the options with a short description can be found at |Q_op|.
- To include a comma in a directory name precede it with a backslash.
- A directory name may end in an '/'.
- For Unix and Win32, if a directory ends in two path separators "//",
the swap file name will be built from the complete path to the file
with all path separators changed to percent '%' signs. This will
ensure file name uniqueness in the backup directory.
the backup file name will be built from the complete path to the
file with all path separators changed to percent '%' signs. This
will ensure file name uniqueness in the backup directory.
On Win32, it is also possible to end with "\\". However, When a
separating comma is following, you must use "//", since "\\" will
include the comma in the file name. Therefore it is recommended to
@ -1638,10 +1638,10 @@ A jump table for the options with a short description can be found at |Q_op|.
area extended, Vim tries to become the owner of the
windowing system's global selection or put the
selected text on the clipboard used by the selection
register "*. See |guioptions_a| and |quotestar| for
details. When the GUI is active, the 'a' flag in
'guioptions' is used, when the GUI is not active, this
"autoselect" flag is used.
register "*. See |'go-a'| and |quotestar| for details.
When the GUI is active, the 'a' flag in 'guioptions'
is used, when the GUI is not active, this "autoselect"
flag is used.
Also applies to the modeless selection.
*clipboard-autoselectplus*
@ -1999,8 +1999,8 @@ A jump table for the options with a short description can be found at |Q_op|.
displayed. E.g., when moving vertically it may change column.
'conceallevel' 'cole' *'conceallevel'* *'cole'*
number (default 0)
*'conceallevel'* *'cole'*
'conceallevel' 'cole' number (default 0)
local to window
{not in Vi}
{not available when compiled without the |+conceal|
@ -2609,13 +2609,13 @@ A jump table for the options with a short description can be found at |Q_op|.
{not in Vi}
{not available when compiled without the |+diff|
feature}
Expression which is evaluated to obtain an ed-style diff file from two
versions of a file. See |diff-diffexpr|.
Expression which is evaluated to obtain a diff file (either ed-style
or unified-style) from two versions of a file. See |diff-diffexpr|.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
*'dip'* *'diffopt'*
'diffopt' 'dip' string (default "filler")
'diffopt' 'dip' string (default "internal,filler")
global
{not in Vi}
{not available when compiled without the |+diff|
@ -2634,6 +2634,15 @@ A jump table for the options with a short description can be found at |Q_op|.
When omitted a context of six lines is used.
See |fold-diff|.
iblank Ignore changes where lines are all blank. Adds
the "-B" flag to the "diff" command if
'diffexpr' is empty. Check the documentation
of the "diff" command for what this does
exactly.
NOTE: the diff windows will get out of sync,
because no differences between blank lines are
taken into account.
icase Ignore changes in case of text. "a" and "A"
are considered the same. Adds the "-i" flag
to the "diff" command if 'diffexpr' is empty.
@ -2645,6 +2654,18 @@ A jump table for the options with a short description can be found at |Q_op|.
exactly. It should ignore adding trailing
white space, but not leading white space.
iwhiteall Ignore all white space changes. Adds
the "-w" flag to the "diff" command if
'diffexpr' is empty. Check the documentation
of the "diff" command for what this does
exactly.
iwhiteeol Ignore white space changes at end of line.
Adds the "-Z" flag to the "diff" command if
'diffexpr' is empty. Check the documentation
of the "diff" command for what this does
exactly.
horizontal Start diff mode with horizontal splits (unless
explicitly specified otherwise).
@ -2657,11 +2678,31 @@ A jump table for the options with a short description can be found at |Q_op|.
foldcolumn:{n} Set the 'foldcolumn' option to {n} when
starting diff mode. Without this 2 is used.
Examples: >
internal Use the internal diff library. This is
ignored when 'diffexpr' is set. *E960*
When running out of memory when writing a
buffer this item will be ignored for diffs
involving that buffer. Set the 'verbose'
option to see when this happens.
:set diffopt=filler,context:4
indent-heuristic
Use the indent heuristic for the internal
diff library.
algorithm:{text} Use the specified diff algorithm with the
internal diff engine. Currently supported
algorithms are:
myers the default algorithm
minimal spend extra time to generate the
smallest possible diff
patience patience diff algorithm
histogram histogram diff algorithm
Examples: >
:set diffopt=internal,filler,context:4
:set diffopt=
:set diffopt=filler,foldcolumn:3
:set diffopt=internal,filler,foldcolumn:3
:set diffopt-=internal " do NOT use the internal diff parser
<
*'digraph'* *'dg'* *'nodigraph'* *'nodg'*
'digraph' 'dg' boolean (default off)
@ -3854,8 +3895,8 @@ A jump table for the options with a short description can be found at |Q_op|.
screen.
*'guioptions'* *'go'*
'guioptions' 'go' string (default "egmrLtT" (MS-Windows, "t" is
removed in |defaults.vim|),
'guioptions' 'go' string (default "egmrLtT" (MS-Windows,
"t" is removed in |defaults.vim|),
"aegimrLtT" (GTK, Motif and Athena),
)
global
@ -3875,7 +3916,7 @@ A jump table for the options with a short description can be found at |Q_op|.
terminal to list the command output.
The terminal window will be positioned at the bottom, and grow
upwards as needed.
*guioptions_a* *'go-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
the windowing system's global selection. This means that the
@ -4678,7 +4719,7 @@ A jump table for the options with a short description can be found at |Q_op|.
Identifiers are used in recognizing environment variables and after a
match of the 'define' option. It is also used for "\i" in a
|pattern|. See 'isfname' for a description of the format of this
option.
option. For '@' only characters up to 255 are used.
Careful: If you change this option, it might break expanding
environment variables. E.g., when '/' is included and Vim tries to
expand "$HOME/.viminfo". Maybe you should change 'iskeyword' instead.
@ -4692,8 +4733,9 @@ A jump table for the options with a short description can be found at |Q_op|.
{not in Vi}
Keywords are used in searching and recognizing with many commands:
"w", "*", "[i", etc. It is also used for "\k" in a |pattern|. See
'isfname' for a description of the format of this option. For C
programs you could use "a-z,A-Z,48-57,_,.,-,>".
'isfname' for a description of the format of this option. For '@'
characters above 255 check the "word" character class.
For C programs you could use "a-z,A-Z,48-57,_,.,-,>".
For a help file it is set to all non-blank printable characters except
'*', '"' and '|' (so that CTRL-] on a command finds the help for that
command).
@ -5404,7 +5446,7 @@ A jump table for the options with a short description can be found at |Q_op|.
h all previous modes when editing a help file
a all previous modes
r for |hit-enter| and |more-prompt| prompt
Normally you would enable the mouse in all four modes with: >
Normally you would enable the mouse in all five modes with: >
:set mouse=a
< When the mouse is not enabled, the GUI will still use the mouse for
modeless selection. This doesn't move the text cursor.
@ -5926,7 +5968,7 @@ A jump table for the options with a short description can be found at |Q_op|.
security reasons.
*'printencoding'* *'penc'*
'printencoding' 'penc' String (default empty, except for some systems)
'printencoding' 'penc' string (default empty, except for some systems)
global
{not in Vi}
{only available when compiled with the |+printer|
@ -5935,7 +5977,7 @@ A jump table for the options with a short description can be found at |Q_op|.
See |penc-option|.
*'printexpr'* *'pexpr'*
'printexpr' 'pexpr' String (default: see below)
'printexpr' 'pexpr' string (default: see below)
global
{not in Vi}
{only available when compiled with the |+printer|
@ -7297,8 +7339,8 @@ A jump table for the options with a short description can be found at |Q_op|.
After this option has been set successfully, Vim will source the files
"spell/LANG.vim" in 'runtimepath'. "LANG" is the value of 'spelllang'
up to the first comma, dot or underscore.
Also see |set-spc-auto|.
up to the first character that is not an ASCII letter or number and
not a dash. Also see |set-spc-auto|.
*'spellsuggest'* *'sps'*
@ -8078,13 +8120,18 @@ 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}
List of file names, separated by commas, that are used to lookup words
for thesaurus completion commands |i_CTRL-X_CTRL-T|. Each line in
the file should contain words with similar meaning, separated by
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?]
ftp://ftp.ox.ac.uk/pub/wordlists/ First get the README file.
for thesaurus completion commands |i_CTRL-X_CTRL-T|.
Each line in the file should contain words with similar meaning,
separated by non-keyword characters (white space is preferred).
Maximum line length is 510 bytes.
An English word list was added to this github issue:
https://github.com/vim/vim/issues/629#issuecomment-443293282
Unpack thesaurus_pkg.zip, put the thesaurus.txt file somewhere, e.g.
~/.vim/thesaurus/english.txt, and the 'thesaurus' option to this file
name.
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
name. See |option-backslash| about using backslashes.
@ -8389,8 +8436,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|t_RV| is set to the escape sequence to request the xterm version
number, more intelligent detection process runs.
The "xterm2" value will be set if the xterm version is reported to be
from 95 to 276. The "sgr" value will be set if the xterm version is
277 or higher and when Vim detects Mac Terminal.app or iTerm2.
from 95 to 276. The "sgr" value will be set if Vim detects Mac
Terminal.app, iTerm2 or mintty, and when the xterm version is 277 or
higher.
If you do not want 'ttymouse' to be set to "xterm2" or "sgr"
automatically, set t_RV to an empty string: >
:set t_RV=

View File

@ -83,10 +83,10 @@ There is no solution for this yet.
ctags out there, that does it right, but we can't be sure. So this seems to
be a permanent restriction.
- The cscope interface (|cscope|) doesn't work for the version of cscope
that we use on our mainframe. We have a copy of version 15.0b12, and it
causes Vim to hang when using the "cscope add" command. I'm guessing that
the binary format of the cscope database isn't quite what Vim is expecting.
- The cscope interface (|cscope|) doesn't work for the version of cscope that
we use on our mainframe. We have a copy of version 15.0b12, and it causes
Vim to hang when using the "cscope add" command. I'm guessing that the
binary format of the cscope database isn't quite what Vim is expecting.
I've tried to port the current version of cscope (15.3) to z/OS, without
much success. If anyone is interested in trying, drop me a line if you
make any progress.
@ -131,4 +131,4 @@ Also look at:
------------------------------------------------------------------------------
vim:tw=78:fo=tcq2:ts=8:noet:ft=help:norl:
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -303,4 +303,4 @@ A. Yes, place your favorite icon in bitmaps/vim.ico in a directory of
'runtimepath'. For example ~/vimfiles/bitmaps/vim.ico.
vim:tw=78:fo=tcq2:ts=8:noet:ft=help:norl:
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -295,7 +295,7 @@ the "*" is under your right hand middle finger (search to the right and down).
*E956*
In very rare cases a regular expression is used recursively. This can happen
when executing a pattern takes a long time and when checkig for messages on
when executing a pattern takes a long time and when checking for messages on
channels a callback is invoked that also uses a pattern or an autocommand is
triggered. In most cases this should be fine, but if a pattern is in use when
it's used again it fails. Usually this means there is something wrong with

View File

@ -898,7 +898,7 @@ commands can be combined to create a NewGrep command: >
'smartcase' is not used.
If {pattern} is empty (e.g. // is specified), the last
used search pattern is used. |last-pattern|
:{count}vim[grep] ...
When a number is put before the command this is used
as the maximum number of matches to find. Use
":1vimgrep pattern file" to find only the first.
@ -1551,7 +1551,7 @@ The backslashes before the pipe character are required to avoid it to be
recognized as a command separator. The backslash before each space is
required for the set command.
*cfilter-plugin*
*cfilter-plugin* *Cfilter* *Lfilter*
If you have too many matching messages, you can use the cfilter plugin to
reduce the number of entries. Load the plugin with: >
packadd cfilter

View File

@ -28,6 +28,9 @@ You can see the name of the current swap file being used with the command:
:sw[apname] *:sw* *:swapname*
Or you can use the |swapname()| function, which also allows for seeing the
swap file name of other buffers.
The name of the swap file is normally the same as the file you are editing,
with the extension ".swp".
- On Unix, a '.' is prepended to swap file names in the same directory as the

View File

@ -334,6 +334,9 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
{not in Vi} {not available when compiled without the
|+eval| feature}
:scr[iptnames][!] {scriptId} *:script*
Edit script {scriptId}. Suggested name is ":script".
*:fini* *:finish* *E168*
:fini[sh] Stop sourcing a script. Can only be used in a Vim
script file. This is a quick way to skip the rest of
@ -465,6 +468,16 @@ flag when defining the function, it is not relevant when executing it. >
.
:endfunction
:set cpo-=C
<
*line-continuation-comment*
To add a comment in between the lines start with '"\ '. Notice the space
after the backslash. Example: >
let array = [
"\ first entry comment
\ 'first',
"\ second entry comment
\ 'second',
\ ]
Rationale:
Most programs work with a trailing backslash to indicate line
@ -473,6 +486,14 @@ Rationale:
:map xx asdf\
< Therefore the unusual leading backslash is used.
Starting a comment in a continuation line results in all following
continuation lines to be part of the comment. Since it was like this
for a long time, when making it possible to add a comment halfway a
sequence of continuation lines, it was not possible to use \", since
that was a valid continuation line. Using '"\ ' comes closest, even
though it may look a bit weird. Requiring the space after the
backslash is to make it very unlikely this is a normal comment line.
==============================================================================
5. Using Vim packages *packages*

View File

@ -515,7 +515,7 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
--clean Similar to "-u DEFAULTS -U NONE -i NONE":
- initializations from files and environment variables is
skipped
-'runtimepath'and 'packpath' are set to exclude home
- 'runtimepath' and 'packpath' are set to exclude home
directory entries (does not happen with -u DEFAULTS).
- the |defaults.vim| script is loaded, which implies
'nocompatible': use Vim defaults

View File

@ -671,12 +671,12 @@ the rendered page generated by 2html.vim.
:let g:html_no_pre = 1
<
*g:html_expand_tabs*
Default: 1 if 'tabstop' is 8, 'expandtab' is 0, and no fold column or line
numbers occur in the generated HTML;
0 otherwise.
When 0, <Tab> characters in the buffer text are replaced with an appropriate
Default: 0 if 'tabstop' is 8, 'expandtab' is 0, 'vartabstop' is not in use,
and no fold column or line numbers occur in the generated HTML;
1 otherwise.
When 1, <Tab> characters in the buffer text are replaced with an appropriate
number of space characters, or &nbsp; references if |g:html_no_pre| is 1.
When 1, if |g:html_no_pre| is 0 or unset, <Tab> characters in the buffer text
When 0, if |g:html_no_pre| is 0 or unset, <Tab> characters in the buffer text
are included as-is in the generated HTML. This is useful for when you want to
allow copy and paste from a browser without losing the actual whitespace in
the source document. Note that this can easily break text alignment and
@ -939,6 +939,9 @@ to the respective variable. Example: >
To disable them use ":unlet". Example: >
:unlet c_comment_strings
An alternative is to switch to the C++ highlighting: >
:set filetype=cpp
Variable Highlight ~
*c_gnu* GNU gcc specific items
*c_comment_strings* strings and numbers inside a comment
@ -3211,6 +3214,12 @@ by syntax/tex.vim. Please consider uploading any extensions that you write,
which typically would go in $HOME/after/syntax/tex/[pkgname].vim, to
http://vim.sf.net/.
I've included some support for various popular packages on my website: >
http://www.drchip.org/astronaut/vim/index.html#LATEXPKGS
<
The syntax files there go into your .../after/syntax/tex/ directory.
*tex-error* *g:tex_no_error*
Tex: Excessive Error Highlighting? ~

View File

@ -1932,6 +1932,8 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:<cfile> cmdline.txt /*:<cfile>*
:<cword> cmdline.txt /*:<cword>*
:<sfile> cmdline.txt /*:<sfile>*
:<sflnum> cmdline.txt /*:<sflnum>*
:<slnum> cmdline.txt /*:<slnum>*
:= various.txt /*:=*
:> change.txt /*:>*
:? cmdline.txt /*:?*
@ -2872,8 +2874,17 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:sN windows.txt /*:sN*
:sNext windows.txt /*:sNext*
:s\= change.txt /*:s\\=*
:s_# change.txt /*:s_#*
:s_I change.txt /*:s_I*
:s_c change.txt /*:s_c*
:s_e change.txt /*:s_e*
:s_flags change.txt /*:s_flags*
:s_g change.txt /*:s_g*
:s_i change.txt /*:s_i*
:s_l change.txt /*:s_l*
:s_n change.txt /*:s_n*
:s_p change.txt /*:s_p*
:s_r change.txt /*:s_r*
:sa windows.txt /*:sa*
:sal windows.txt /*:sal*
:sall windows.txt /*:sall*
@ -3174,6 +3185,12 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:tjump tagsrch.txt /*:tjump*
:tl tagsrch.txt /*:tl*
:tlast tagsrch.txt /*:tlast*
:tlm gui.txt /*:tlm*
:tlmenu gui.txt /*:tlmenu*
:tln gui.txt /*:tln*
:tlnoremenu gui.txt /*:tlnoremenu*
:tlu gui.txt /*:tlu*
:tlunmenu gui.txt /*:tlunmenu*
:tm gui.txt /*:tm*
:tma map.txt /*:tma*
:tmap map.txt /*:tmap*
@ -3462,10 +3479,12 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
<bang> map.txt /*<bang>*
<buffer=N> autocmd.txt /*<buffer=N>*
<buffer=abuf> autocmd.txt /*<buffer=abuf>*
<cWORD> cmdline.txt /*<cWORD>*
<cexpr> cmdline.txt /*<cexpr>*
<cfile> cmdline.txt /*<cfile>*
<character> intro.txt /*<character>*
<count> map.txt /*<count>*
<cword> cmdline.txt /*<cword>*
<f-args> map.txt /*<f-args>*
<k0> term.txt /*<k0>*
<k1> term.txt /*<k1>*
@ -3497,6 +3516,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
<reg> map.txt /*<reg>*
<register> map.txt /*<register>*
<sfile> cmdline.txt /*<sfile>*
<sflnum> cmdline.txt /*<sflnum>*
<slnum> cmdline.txt /*<slnum>*
<xCSI> intro.txt /*<xCSI>*
<xDown> term.txt /*<xDown>*
@ -3695,6 +3715,7 @@ CTRL-\_CTRL-N intro.txt /*CTRL-\\_CTRL-N*
CTRL-] tagsrch.txt /*CTRL-]*
CTRL-^ editing.txt /*CTRL-^*
CTRL-{char} intro.txt /*CTRL-{char}*
Cfilter quickfix.txt /*Cfilter*
Channel eval.txt /*Channel*
Channels eval.txt /*Channels*
Chinese mbyte.txt /*Chinese*
@ -3727,6 +3748,7 @@ DOS-format-write editing.txt /*DOS-format-write*
Dictionaries eval.txt /*Dictionaries*
Dictionary eval.txt /*Dictionary*
Dictionary-function eval.txt /*Dictionary-function*
DiffUpdated autocmd.txt /*DiffUpdated*
Digraphs digraph.txt /*Digraphs*
DirChanged autocmd.txt /*DirChanged*
E motion.txt /*E*
@ -4626,7 +4648,11 @@ E954 options.txt /*E954*
E955 eval.txt /*E955*
E956 pattern.txt /*E956*
E957 eval.txt /*E957*
E958 eval.txt /*E958*
E96 diff.txt /*E96*
E960 options.txt /*E960*
E961 cmdline.txt /*E961*
E962 eval.txt /*E962*
E97 diff.txt /*E97*
E98 diff.txt /*E98*
E99 diff.txt /*E99*
@ -4701,6 +4727,7 @@ KVim gui_x11.txt /*KVim*
Kibaale uganda.txt /*Kibaale*
Korean mbyte.txt /*Korean*
L motion.txt /*L*
Lfilter quickfix.txt /*Lfilter*
Linux-backspace options.txt /*Linux-backspace*
List eval.txt /*List*
Lists eval.txt /*Lists*
@ -5463,6 +5490,7 @@ channel-drop channel.txt /*channel-drop*
channel-functions usr_41.txt /*channel-functions*
channel-mode channel.txt /*channel-mode*
channel-more channel.txt /*channel-more*
channel-noblock channel.txt /*channel-noblock*
channel-open channel.txt /*channel-open*
channel-open-options channel.txt /*channel-open-options*
channel-raw channel.txt /*channel-raw*
@ -6665,6 +6693,7 @@ getscript-start pi_getscript.txt /*getscript-start*
gettabinfo() eval.txt /*gettabinfo()*
gettabvar() eval.txt /*gettabvar()*
gettabwinvar() eval.txt /*gettabwinvar()*
gettagstack() eval.txt /*gettagstack()*
getwininfo() eval.txt /*getwininfo()*
getwinpos() eval.txt /*getwinpos()*
getwinposx() eval.txt /*getwinposx()*
@ -6784,7 +6813,6 @@ gui_w32.txt gui_w32.txt /*gui_w32.txt*
gui_x11.txt gui_x11.txt /*gui_x11.txt*
guifontwide_gtk options.txt /*guifontwide_gtk*
guifontwide_win_mbyte options.txt /*guifontwide_win_mbyte*
guioptions_a options.txt /*guioptions_a*
guu change.txt /*guu*
gv visual.txt /*gv*
gview starting.txt /*gview*
@ -7183,6 +7211,7 @@ job-err_io channel.txt /*job-err_io*
job-exit_cb channel.txt /*job-exit_cb*
job-functions usr_41.txt /*job-functions*
job-in_io channel.txt /*job-in_io*
job-noblock channel.txt /*job-noblock*
job-options channel.txt /*job-options*
job-out_cb channel.txt /*job-out_cb*
job-out_io channel.txt /*job-out_io*
@ -7270,6 +7299,7 @@ lifelines.vim syntax.txt /*lifelines.vim*
limits vi_diff.txt /*limits*
line() eval.txt /*line()*
line-continuation repeat.txt /*line-continuation*
line-continuation-comment repeat.txt /*line-continuation-comment*
line2byte() eval.txt /*line2byte()*
linefeed intro.txt /*linefeed*
linewise motion.txt /*linewise*
@ -8407,6 +8437,7 @@ setqflist-examples quickfix.txt /*setqflist-examples*
setreg() eval.txt /*setreg()*
settabvar() eval.txt /*settabvar()*
settabwinvar() eval.txt /*settabwinvar()*
settagstack() eval.txt /*settagstack()*
setting-guifont gui.txt /*setting-guifont*
setting-guitablabel tabpage.txt /*setting-guitablabel*
setting-tabline tabpage.txt /*setting-tabline*
@ -8661,6 +8692,7 @@ swapchoice-variable eval.txt /*swapchoice-variable*
swapcommand-variable eval.txt /*swapcommand-variable*
swapfile-changed version4.txt /*swapfile-changed*
swapinfo() eval.txt /*swapinfo()*
swapname() eval.txt /*swapname()*
swapname-variable eval.txt /*swapname-variable*
sybase ft_sql.txt /*sybase*
syn-sync-grouphere syntax.txt /*syn-sync-grouphere*
@ -9074,7 +9106,9 @@ test_null_job() eval.txt /*test_null_job()*
test_null_list() eval.txt /*test_null_list()*
test_null_partial() eval.txt /*test_null_partial()*
test_null_string() eval.txt /*test_null_string()*
test_option_not_set() eval.txt /*test_option_not_set()*
test_override() eval.txt /*test_override()*
test_scrollbar() eval.txt /*test_scrollbar()*
test_settime() eval.txt /*test_settime()*
testing eval.txt /*testing*
testing-variable eval.txt /*testing-variable*

View File

@ -179,6 +179,9 @@ commands explained above the tag stack will look like this:
1 1 main 1 harddisk2:text/vim/test
2 1 FuncB 59 harddisk2:text/vim/src/main.c
The |gettagstack()| function returns the tag stack of a specified window. The
|settagstack()| function modifies the tag stack of a window.
*E73*
When you try to use the tag stack while it doesn't contain anything you will
get an error message.

View File

@ -110,10 +110,13 @@ 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: >
break (cursor keys start with an Esc, so they may break): >
tnoremap <Esc> <C-W>N
set notimeout ttimeout timeoutlen=100
You can also create menus similar to terminal mode mappings, but you have to
use |:tlmenu| instead of |:tmenu|.
< *options-in-terminal*
After opening the terminal window and setting 'buftype' to "terminal" the
TerminalOpen autocommand event is triggered. This makes it possible to set
@ -617,7 +620,18 @@ This will open a window consisting of three parts:
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.
relate it to the position in the first or second dump. Letters indicate the
kind of difference:
X different character
> cursor in first but not in second
< cursor in second but not in first
w character width differs (single vs double width)
f foreground color differs
b background color differs
a attribute differs (bold, underline, reverse, etc.)
? character missing in both
+ character missing in first
- character missing in second
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.

114
runtime/doc/textprop.txt Normal file
View File

@ -0,0 +1,114 @@
*textprop.txt* For Vim version 8.1. Last change: 2018 Dec 13
VIM REFERENCE MANUAL by Bram Moolenaar
Displaying text with properties attached. *text-properties*
THIS IS UNDER DEVELOPMENT - ANYTHING MAY STILL CHANGE *E967*
What is not working yet:
- Adjusting column/length when inserting text
- Text properties spanning more than one line
- prop_find()
- callbacks when text properties are outdated
1. Introduction |text-prop-intro|
2. Functions |text-prop-functions|
{Vi does not have text properties}
{not able to use text properties when the |+textprop| feature was
disabled at compile time}
==============================================================================
1. Introduction *text-prop-intro*
Text properties can be attached to text in a buffer. They will move with the
text: If lines are deleted or inserted the properties move with the text they
are attached to. Also when inserting/deleting text in the line before the
text property. And when inserting/deleting text inside the text property, it
will increase/decrease in size.
The main use for text properties is to highlight text. This can be seen as a
replacement for syntax highlighting. Instead of defining patterns to match
the text, the highlighting is set by a script, possibly using the output of an
external parser. This only needs to be done once, not every time when
redrawing the screen, thus can be much faster, after the initial cost of
attaching the text properties.
Text properties can also be used for other purposes to identify text. For
example, add a text property on a function name, so that a search can be
defined to jump to the next/previous function.
A text property is attached at a specific line and column, and has a specified
length. The property can span multiple lines.
A text property has these fields:
"id" a number to be used as desired
"type" the name of a property type
Property Types ~
*E971*
A text property normally has the name of a property type, which defines
how to highlight the text. The property type can have these entries:
"highlight" name of the highlight group to use
"priority" when properties overlap, the one with the highest
priority will be used.
"start_incl" when TRUE inserts at the start position will be
included in the text property
"end_incl" when TRUE inserts at the end position will be
included in the text property
Example ~
Suppose line 11 in a buffer has this text (excluding the indent):
The number 123 is smaller than 4567.
To highlight the numbers: >
call prop_type_add('number', {'highlight': 'Constant'})
call prop_add(11, 12, {'length': 3, 'type': 'number})
call prop_add(11, 32, {'length': 4, 'type': 'number})
Setting "start_incl" and "end_incl" is useful when white space surrounds the
text, e.g. for a function name. Using false is useful when the text starts
and/or ends with a specific character, such as the quote surrounding a string.
func FuncName(arg) ~
^^^^^^^^ property with start_incl and end_incl set
var = "text"; ~
^^^^^^ property with start_incl and end_incl not set
Nevertheless, when text is inserted or deleted the text may need to be parsed
and the text properties updated. But this can be done asynchrnously.
==============================================================================
2. Functions *text-prop-functions*
Manipulating text property types:
prop_type_add({name}, {props}) define a new property type
prop_type_change({name}, {props}) change an existing property type
prop_type_delete({name} [, {props}]) delete a property type
prop_type_get([{name} [, {props}]) get property type values
prop_type_list([{props}]) get list of property types
Manipulating text properties:
prop_add({lnum}, {col}, {props}) add a text property
prop_clear({lnum} [, {lnum_end} [, {bufnr}]])
remove all text properties
prop_find({props} [, {direction}]) search for a text property
prop_list({lnum} [, {props}) text properties in {lnum}
prop_remove({props} [, {lnum} [, {lnum_end}]])
remove a text property
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -1,4 +1,4 @@
*todo.txt* For Vim version 8.1. Last change: 2018 May 17
*todo.txt* For Vim version 8.1. Last change: 2018 Dec 09
VIM REFERENCE MANUAL by Bram Moolenaar
@ -39,9 +39,10 @@ browser use: https://github.com/vim/vim/issues/1234
-------------------- Known bugs and current work -----------------------
'incsearch' with :s: (#3321)
- :/foo/s//<Esc> changes last search pattern. Also E486.
- :s/foo using CTRL-G moves to another line, should not happen, or use the
correct line (it uses the last but one line) (Lifepillar, Aug 18, #3345)
- :s@pat/tern@ doesn't include "/" in the pattern. (Takahiro Yoshihara, #3637)
pass delim to do_search() ?
- Also support range: :/foo/,/bar/delete
- Also support for user command, e.g. Cfilter
- :%s/foo should take the first match below the cursor line, unless there
@ -51,17 +52,28 @@ browser use: https://github.com/vim/vim/issues/1234
Prompt buffer:
- Add a command line history.
- delay next prompt until plugin gives OK?
- add prompt_addtext({buf}, {expr}) none add text to a prompt buffer
Terminal debugger:
- Make prompt-buffer variant work better.
- If breakpoints are deleted with "delete" in gdb the response is not parsed
properly and the breakpoints in Vim are not removed.
- Add option to not open the program window. It's not used when attaching to
an already running program. (M. Kelly)
- When only gdb window exists, on "quit" edit another buffer.
- Termdebug does not work when Vim was build with mzscheme: gdb hangs just
after "run". Everything else works, including communication channel. Not
initializing mzscheme avoid the problem, thus it's not some #ifdef.
- Add support for lldb? #3565
- Could we do something similar for debugging Vim scripts? At least see the
script while stepping through it. Simple version would use an extra window.
More complete solution would actually run Vim in a Terminal an control it
with another Vim instance.
Terminal emulator window:
- GUI: When using ":set go+=!" a system() call causes the hit-enter prompt.
(#3327)
- GUI: hang until key typed. (#3530)
- When the job in the terminal doesn't use mouse events, let the scroll wheel
scroll the scrollback, like a terminal does at the shell prompt. #2490
And use modeless selection. #2962
@ -89,69 +101,137 @@ Terminal emulator window:
- When 'encoding' is not utf-8, or the job is using another encoding, setup
conversions.
Not possible to have a comment in between line continuation. Use |\":
let array = [
\ item,
|\" comment
\ item,
\ ]
":function" can now silently overwrite the function from the same script.
Do the same for ":command" ?
Update for German spell files: https://github.com/chrisbra/vim/compare/5e021c990f8817a50d3264782a5...3b27c92f297540761ebbd92d04fb3
(Christian Brabandt, 2018 Nov 4)
Problem with Visual yank when 'linebreak' and 'showbreak' are set.
Patch with tests, but it's not clear how it is supposed to work. (tommm, 2018
Nov 17)
Patch to add configure flags to skip rtl, farsi and arabic support.
(Diego Carrión, #1867)
Key mapping times out when using a timer in Gvim. (Michael Henry, 2018 Sep 9,
#3417)
Does not build with MinGW out of the box:
- _stat64 is not defined, need to use "struct stat" in vim.h
- WINVER conflict, should use 0x0600 by default?
Crash in terminal with long multi-byte sequence. (2018 Nov 17, #3619)
Dominique cannot reproduce. Update Nov 18.
Suggested solution by Yasuhiro Matsumoto, 2018 Nov 18.
Crash when mixing matchadd and substitute()? (Max Christian Pohle, 2018 May
13, #2910) Can't reproduce?
Patch to simplify nsis installer. (Ken Takata, 2018 Sep 24, was #3479)
Now included in #3501, using MUI2. Use the zip file to get the binary files:
https://github.com/vim/vim/files/2475621/nsis-icons.zip
Ready to include now.
Patch to add blob type support. (Yasuhiro Matsumoto, 2018 Nov 26, #3638)
Not done yet.
Errors found with random data:
heap-buffer-overflow in alist_add (#2472)
Win32 key codes are messy. Mike Williams tried to fix that, but now old
mappings no longer work. Create a new terminal for the better solution?
Patch to fix that appending makes items to be "recognized".
(Yegappan, 2018 Nov 23). Reported by Daniel Hahler, #3633.
Patch to define and manipulate signs with functions. Adds sign groups and
priority. (Yegappan Lakshmanan, #3652)
Improve fallback for menu translations, to avoid having to create lots of
files that source the actual file. E.g. menu_da_de -> menu_da
Include part of #3242?
When a terminal exit_cb closes the window, a following typed key is lost, if
it's in a mapping. (2018 Oct 6, #2302, #3522)
Patch to add FOR_ALL_FRAMES. (Yegappan, 2018 Nov 18)
Patch to resize to fit parent position when using ---windowid. ( Agorgianitis
Loukas, 2018 Nov 17, #3616)
Completion mixes results from the current buffer with tags and other files.
Happens when typing CTRL-N while still search for results. E.g., type "b_" in
terminal.c and then CTRL-N twice.
Should do current file first and not split it up when more results are found.
(Also #1890)
Internal diff doesn't handle binary file like external diff does. (Mike
Williams, 2018 Oct 30)
Problem with :tlmenu: Detach item added with all modes? Issue #3563.
C syntax: {} inside () causes following {} to be highlighted as error.
(Michalis Giannakidis, 2006 Jun 1)
More warnings from static analysis:
https://lgtm.com/projects/g/vim/vim/alerts/?mode=list
Patch for this: (Aron Widforss, 2018 Oct 13, #3539)
missing a test.
7 Make 'scrolloff' a global-local option, so that it can be different in the
quickfix window, for example. (Gary Holloway)
Also do 'sidescrolloff'.
Patch for ConPTY support, #3474: What is the status?
Pasting foo} causes Vim to behave weird. (John Little, 2018 Jun 17)
Related to bracketed paste. I cannot reproduce it.
Using CTRL-L to add a character to the search string doesn't work for the last
character in the file. (Smylers, 2018 Nov 17, #3620)
Suggested patch by Hirohito Higashi, 2018 Nov 18.
Using CTRL-L to add a character to the search string that contains \v,
punctiuation is repeated. (Smylers, 2018 Nov 17, #3621)
":mksession" cannot handle a very long 'runtimepath'. (Timothy Madden, 21 Sep
2018, #3466) Patch from Christian, 2018 Oct 30 (with comments).
Patch to add functions for signs. (Yegappan Lakshmanan, 2018 Nov 24)
obsolete: Patch to add functions for signs. (Christian Brabandt, 2013 Jan 27)
Patch in pull request #2967: Allow white space in sign text. (Ben Jackson)
Test fails in AppVeyor.
Patch to add script line number to script ID. (ichizok, Ozaki Kiichi, 2018 Aug
24, #3362)
ml_get error: (Israel Chauca Fuentes, 2018 Oct 17, #3550).
Removing flags from 'cpoptions' breaks the Winbar buttons in termdebug.
(Dominique Pelle, 2018 Jul 16)
Patch to convert temp file name. (Yasuhiro Matsumoto, #3520)
Not ready to include yet.
Problem with two buffers with the same name a/b, if it didn't exist before and
is created outside of Vim. (dskloetg, 2018 Jul 16, #3219)
Memory leak in test_assert:
==19127== by 0x2640D7: alloc (misc2.c:874)
==19127== by 0x2646D6: vim_strsave (misc2.c:1315)
==19127== by 0x1B68D2: f_getcwd (evalfunc.c:4950)
And:
==19127== by 0x2640D7: alloc (misc2.c:874)
==19127== by 0x1A9477: set_var (eval.c:7601)
==19127== by 0x19F96F: set_var_lval (eval.c:2233)
==19127== by 0x19EA3A: ex_let_one (eval.c:1810)
==19127== by 0x19D737: ex_let_vars (eval.c:1294)
==19127== by 0x19D6B4: ex_let (eval.c:1259)
Invalid memory access with old regexp engine. (Dominique Pelle, 2018 Sep 3,
#3405) Introduced by 8.0.1517, which was fixing another memory access error.
(Sep 8)
Add function to make use of internal diff, working on two lists and returning
unified diff (list of lines).
Patch to implement 'diffref' option. (#3535)
Easier to use a 'diffmaster' option, is the extra complexity needed?
Patch to fix that bracketed paste remains after Vim exits. (2018 Oct 30, #3579)
Patch for lnext/lprev work in specific cases. (Yegappan Lakshmanan, 2018 Dec
4, #3633)
cursorline highlighting not removed after yanking in Visual mode.
(Matéo Zanibelli, 2018 Oct 30, #3578)
Patch by Christian, Oct 30.
Memory leaks in test_channel? (or is it because of fork())
Using uninitialized value in test_crypt.
Memory leaks in test_escaped_glob
==20651== by 0x2640D7: alloc (misc2.c:874)
==20651== by 0x2646D6: vim_strsave (misc2.c:1315)
==20651== by 0x3741EA: get_function_args (userfunc.c:131)
==20651== by 0x378779: ex_function (userfunc.c:2036)
Memory leak in test_terminal:
==23530== by 0x2640D7: alloc (misc2.c:874)
==23530== by 0x2646D6: vim_strsave (misc2.c:1315)
@ -165,47 +245,67 @@ Memory leak in test_terminal:
gethostbyname() is old, use getaddrinfo() if available. (#3227)
Delete the src/main.aap file?
Patch to add match count and current index "3/44" when using "n" command.
(Christian Brabandt, on issue #453). Only when search string was typed?
matchaddpos() gets slow with many matches. Proposal by Rick Howe, 2018 Jul
19.
Sourceforge Vim pages still have content, redirect from empty page.
Check for PHP errors. (Wayne Davison, 2018 Oct 26)
Patch to support ":tag <tagkind> <tagname>". (emmrk, 2018 May 7, #2871)
Use something like ":tag {kind}/{tagname}".
Not ready to include.
:pedit resets the 'buflisted' option unexpectedly. (Wang Shidong, 2018 Oct 12,
#3536)
home_replace() uses $HOME instead of "homedir". (Cesar Martins, 2018 Aug 9)
When the status line uses term_gettitle(), it does not get updated when the
terminal title changes. (Josh Triplett, 2018 Sep 9, #3418)
How would we know that the status line needs to be updated?
Adjust windows installer explanation of behavior. (scootergrisen, #3310)
Set g:actual_curbuf when evaluating 'statusline', not just with an expression.
(Daniel Hahler, 2018 Aug 8, #3299)
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. Unfinished Patch from Christian Brabandt,
2018 Mar 20, #2732)
ml_get error. (Dominique Pelle, 2018 Sep 14, #3434)
Patch to use forward slash for completion even when 'shellslash' is set.
Adds 'completepathslash'. (Yasuhiro Matsumoto, 2018 Nov 15, #3612)
Only output t_Cs when t_Ce is also set. do not use Cs and Ce termcap entries. (Daniel Hahler, 2018 Sep 25)
Add t_cS and t_cR for cursor color select and reset. Use Cs and Cr terminfo
values.
Further xdiff changes:
- More options, e.g. different kind of whitespace diff.
- when editing text, update the surrounding diff blocks.
- omit diff.exe from distribution
- Can we make this show differences within a line?
- add option to use external diff above a certain size.
Difference between two regexp engines: #3373
Patch to add arguments to argc() and argv(). (Yegappan Lakshmanan, 2016 Jan
24, #832) Also need a way to get the global arg list? Update later on Jan 24
Update Mar 5. Update Apr 7. Update Jun 5.
Patch to add ch_listen() (Yasuhiro Matsumoto, 2018 Nov 26, #3639)
What is the practical use for this?
When the last line wraps, selecting with the mouse below that line only
includes the first screen line. (2018 Aug 23, #3368)
Refactored HTML indent file. (Michael Lee, #1821)
Ask to write a test first.
Patch to add getregpoint() and setreg() with an option to set "".
(Andy Massimino, 2018 Aug 24, #3370)
Better name?
MS-Windows: .lnk file not resolved properly when 'encoding' is set.
(lkintact, 2018 Sep 22, #3473)
Script generated by :mksession does not work well if there are windows with
modified buffers
change "silent only" into "silent only!"
@ -222,6 +322,16 @@ Compiler warnings (geeknik, 2017 Oct 26):
Win32 console: <F11> and <F12> typed in Insert mode don't result in normal
characters. (#3246)
'foldtext' is evaluated too often. (Daniel Hahler, #2773)
Add Native language protocol server (LSP) support. (Yegappan Lakshmanan, 2018
Oct 28)
ml_get error when using a Python script. (Yggdroot, 2017 Jun 1, #1737)
Lemonboy can reproduce (2017 Jun 5)
Also reproduced by Benjamin Doherty, 2018 Oct 4.
Simpler way: Ken Takata, Oct 6.
Height of quickfix window is not retained with vertical splits. (Lifepillar,
2018 Aug 24, #2998)
@ -232,11 +342,24 @@ Tests failing for "make testgui" with GTK:
- Test_setbufvar_options()
- Test_exit_callback_interval()
Get a "No Name" buffer when 'hidden' is set and opening a new window from the
quickfix list. (bfrg, 2018 Jan 22, #2574)
Tracked down by Jason Franklin, 2018 Oct 30.
Suggested patch by Yegappan, Nov 1.
When using CTRL-W CR in the quickfix window, the jumplist in the opened window
is cleared, to avoid going back to the list of errors buffer (would have two
windows with it). Can we just remove the jump list entries for the quickfix
buffer?
Patch to fix that executable() may fail on very long filename in MS-Windows.
(Ken Takata, 2016 Feb 1, update 2018 Oct 7)
Patch to be able to use hex numbers with :digraph. (Lcd, 2015 Sep 6)
Update Sep 7. Update by Christian Brabandt, 2015 Sep 8, 2016 Feb 1.
Patch to be able to disable default digraphs (incomplete) (Eric Pruitt, 2018
Nov 22).
Make balloon_show() work outside of 'balloonexpr'? Users expect it to work:
#2948. (related to #1512?)
On Win32 it stops showing, because showState is already ShS_SHOWING.
@ -244,9 +367,13 @@ 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.
Should also be possible to add highlighting, like in the status line?
balloonexpr() on MS-Windows GUI doesn't handle accented chars? (nivaemail,
2018 Sep 14)
Patch to fix that executable() may fail on very long filename in MS-Windows.
(Ken Takata, 2016 Feb 1)
Add v:motion_force. (Kana Natsuno, 2008 Dec 6)
Maybe call it v:motiontype. Update in #3490.
Alternative: add the force flag to mode(), after "no".
Patch ready to include?
Try out background make plugin:
https://github.com/AndrewVos/vim-make-background
@ -254,7 +381,7 @@ or asyncmake:
https://github.com/yegappan/asyncmake
Add a ModeChanged autocommand that has an argument indicating the old and new
mode. Also used for switching Terminal mode.
mode, as what's returned from mode(). Also used for switching Terminal mode.
Add an option with file patterns, to be used when unloading a buffer: If there
is a match, remove entries for the buffer from marks, jumplist, etc. To be
@ -265,6 +392,10 @@ Cursor in wrong position when line wraps. (#2540)
Patch to parse ":line" in tags file and use it for search. (Daniel Hahler,
#2546) Fixes #1057. Missing a test.
Setting 'columns' in a BufEnter autocommand causes a second tab width to
behave strangely, as if there is a gap and a vertical window separator.
(Michael Soyka, 2018 Sep 23, #3477)
Make {skip} argument of searchpair() consistent with other places where we
pass an expression to evaluate. Allow passing zero for "never skip".
@ -285,6 +416,11 @@ If 'readonly' is not set but the file appears to be readonly later, try again
(wait a little while).
CreateFile() returns ERROR_SHARING_VIOLATION (Linwei, 2018 May 5)
Using --remote to open a file in which a # appears does not work on
MS-Windows. Perhaps in \# the \ is seen as a path separator. (Axel Bender,
2017 Feb 9) Can we expand wildcards first and send the path literally to the
receiving Vim? Or make an exception for #, it's not useful remotely.
Should add a test for every command line argument. Check coverage for what is
missing: --nofork, -A , -b, -h, etc.
@ -295,7 +431,7 @@ Quickfix window height is not kept with a vertical split. (Lifepillar, 2018
Jun 10, #2998)
Improve the installer for MS-Windows. There are a few alternatives:
- Add silent install option. (Shane Lee, #751)
- mui2 installer improved by Ken Takata (2018 Sep 29)
- Installer from Cream (Steve Hall).
- Modern UI 2.0 for the Nsis installer. (Guopeng Wen)
https://github.com/gpwen/vim-installer-mui2
@ -309,13 +445,9 @@ How to test that it works well for all Vim users?
Alternative manpager.vim. (Enno, 2018 Jan 5, #2529)
Delete all the speficic stuff for the Borland compiler? (#3374)
Delete all the specific stuff for the Borland compiler? (#3374)
Patch in #3377 (Thomas Dziedzic)
Does setting 'cursorline' cause syntax highlighting to slow down? Perhaps is
mess up the cache? (Mike Lee Williams, 2018 Jan 27, #2539)
Also: 'foldtext' is evaluated too often. (Daniel Hahler, #2773)
With 'foldmethod' "indent" and appending an empty line, what follows isn't
included in the existing fold. Deleting the empty line and undo fixes it.
(Oleg Koshovetc, 2018 Jul 15, #3214)
@ -348,13 +480,6 @@ 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 in between, which may cause
a deadlock if the reading side is waiting for the write to finish. (Nate
Bosch, 2018 Jan 13, #2548)
Perhaps just make chunks of 1024 bytes?
Probably better: Make the write non-blocking
Also a problem on MS-Windows: #2828.
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.
@ -399,14 +524,15 @@ option_save({list}) *option_save()*
values are handled and the script ID is restored, so that
`:verbose set` will show where the option was originally set,
not where it was restored.
Alternatively: save and restore ALL options. Implementation needs to use
copy-on-write. Return an ID from option_save(), when
option_restore(ID) is called give an error if another option_save()
was called in the mean time, they must be balanced.
"gvim --remote" from a directory with non-word characters changes the current
directory (Paulo Marcel Coelho Arabic, 2017 Oct 30, #2266)
Also see #1689.
ml_get error when using a Python script. (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)
@ -425,9 +551,6 @@ Add script number to profile? (#3330 breaks tests).
A function defined locally and lambda's are not easily recognized.
Mention where they were defined somewhere.
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)
Invalid range error when using BufWinLeave for closing terminal.
@ -481,6 +604,9 @@ Problem with 'delcombine'. (agguser, 2017 Nov 10, #2313)
MS-Windows: buffer completion doesn't work when using backslash (or slash)
for a path separator. (xtal8, #2201)
Would be nice for insert mode completion to highlight the text that was added
(and may change when picking another completion).
Test runtime files.
Start with filetype detection: testdir/test_filetype.vim
@ -587,9 +713,6 @@ stack trace. (Yggdroot, 2017 Jul 28, #1887)
Profile of a dict function is lost when the dict is deleted. Would it be
possible to collect this? (Daniel Hahler, #2350)
Add `:filter` support for various commands (Marcin Szamotulski, 2017 Nov 12
#2322) Patch now in #2856.
When checking if a bufref is valid, also check the buffer number, to catch the
case of :bwipe followed by :new.
@ -641,9 +764,6 @@ Is it possible to keep the complete menu open when calling complete()?
Memory leak in test97? The string is actually freed. Weird.
Patch to add configure flags to skip rtl, farsi and arabic support.
(Diego Carrión, #1867)
assert_fails() can only check for the first error. Make it possible to have
it catch multiple errors and check all of them.
@ -764,11 +884,6 @@ Or point to nightly builds: https://github.com/vim/vim-win32-installer/releases
Problem passing non-UTF-8 strings to Python 3. (Björn Linse, 2016 Sep 11,
#1053) With patch, does it work?
Using --remote to open a file in which a # appears does not work on
MS-Windows. Perhaps in \# the \ is seen as a path separator. (Axel Bender,
2017 Feb 9) Can we expand wildcards first and send the path literally to the
receiving Vim? Or make an exception for #, it's not useful remotely.
":sbr" docs state it respects 'switchbuf', but "vsplit" does not cause a
vertical split. (Haldean Brown, 2017 Mar 1)
@ -1104,9 +1219,6 @@ Patch to avoid redrawing tabline when the popup menu is visible.
Patch to add {skip} argument to search(). (Christian Brabandt, 2016 Feb 24)
Update 2016 Jun 10, #861
Patch to be able to use hex numbers with :digraph. (Lcd, 2015 Sep 6)
Update Sep 7. Update by Christian Brabandt, 2015 Sep 8, 2016 Feb 1.
Patch to show search statistics. (Christian Brabandt, 2016 Jul 22)
When the CursorMovedI event triggers, and CTRL-X was typed, a script cannot
@ -1544,8 +1656,6 @@ Or use expand('<sid>')?
Patch to make confirm() display colors. (Christian Brabandt, 2012 Nov 9)
Patch to add functions for signs. (Christian Brabandt, 2013 Jan 27)
Patch to remove flicker from popup menu. (Yasuhiro Matsumoto, 2013 Aug 15)
Problem with refresh:always in completion. (Tyler Wade, 2013 Mar 17)
@ -2175,16 +2285,11 @@ still delete them. Also convert all buffer file names?
"gqip" in Insert mode has an off-by-one error, causing it to reflow text.
(Raul Coronado, 2009 Nov 2)
Update src/testdir/main.aap.
Something wrong with session that has "cd" commands and "badd", in such a way
that Vim doesn't find the edited file in the buffer list, causing the
ATTENTION message? (Tony Mechelynck, 2008 Dec 1)
Also: swap files are in ~/tmp/ One has relative file name ".mozilla/...".
Add v:motion_force. (Kana Natsuno, 2008 Dec 6)
Maybe call it v:motiontype.
MS-Windows: editing the first, empty buffer, 'ffs' set to "unix,dos", ":enew"
doesn't set 'ff' to "unix". (Ben Fritz, 2008 Dec 5) Reusing the old buffer
probably causes this.
@ -2374,9 +2479,6 @@ Syntax highlighting wrong for transparent region. (Doug Kearns, 2007 Feb 26)
Bug in using a transparent syntax region. (Hanlen in vim-dev maillist, 2007
Jul 31)
C syntax: {} inside () causes following {} to be highlighted as error.
(Michalis Giannakidis, 2006 Jun 1)
When 'diffopt' has "context:0" a single deleted line causes two folds to merge
and mess up syncing. (Austin Jennings, 2008 Jan 31)
@ -2839,8 +2941,6 @@ More patches:
- Another patch for Javascript indenting. (Hari Kumar, 2010 Jul 11)
Needs a few tests.
- Add 'cscopeignorecase' option. (Liang Wenzhi, 2006 Sept 3)
- Load intl.dll too, not only libintl.dll. (Mike Williams, 2006 May 9, docs
patch May 10)
- Extra argument to strtrans() to translate special keys to their name (Eric
Arnold, 2006 May 22)
- 'threglookexp' option: only match with first word in thesaurus file.
@ -3664,6 +3764,7 @@ Most interesting new features to be added when all bugs have been fixed:
Alternative: Make a function for Ex commands: cmd_edit().
- Add COLUMN NUMBERS to ":" commands ":line1,line2[col1,col2]cmd". Block
can be selected with CTRL-V. Allow '$' (end of line) for col2.
(issue #3292)
- ECLIPSE plugin. Problem is: the interface is very complicated. Need to
implement part in Java and then connect to Vim. Some hints from Alexandru
Roman, 2004 Dec 15. Should then also work with Oracle Jdeveloper, see JSR
@ -5536,9 +5637,6 @@ Options:
that marks if the option was set. Useful to keep the effect of setting
'compatible' after ":syntax on" has been used.
7 There is 'titleold', why is there no 'iconold'? (Chazelas)
7 Make 'scrolloff' a global-local option, so that it can be different in the
quickfix window, for example. (Gary Holloway)
Also do 'sidescrolloff'.
External commands:

View File

@ -208,15 +208,17 @@ encryption key, just like the "-x" argument did: >
LIMITS ON ENCRYPTION
The encryption algorithm used by Vim is weak. It is good enough to keep out
the casual prowler, but not good enough to keep out a cryptology expert with
lots of time on his hands. Also you should be aware that the swap file is not
encrypted; so while you are editing, people with superuser privileges can read
the unencrypted text from this file.
One way to avoid letting people read your swap file is to avoid using one.
If the -n argument is supplied on the command line, no swap file is used
(instead, Vim puts everything in memory). For example, to edit the encrypted
file "file.txt" without a swap file use the following command: >
The encryption algorithm used by Vim is not very strong. It is good enough to
keep out the casual prowler, but not good enough to keep out a cryptology
expert with lots of time on his hands. The text in the swap file and the undo
file is also encrypted. However, this is done block-by-block and may reduce
the time needed to crack a password. You can disable the swap file, but then
a crash will cause you to lose your work, since Vim keeps all the text in
memory only. The undo file can be disabled with the only disadvantage that
you can't undo after unloading the buffer.
To avoid using a swap file, supply the -n argument on the command line.
For example, to edit the encrypted file "file.txt" without a swap file use the
following command: >
vim -x -n file.txt

View File

@ -612,6 +612,7 @@ String manipulation: *string-functions*
repeat() repeat a string multiple times
eval() evaluate a string expression
execute() execute an Ex command and get the output
trim() trim characters from a string
List manipulation: *list-functions*
get() get an item without error for wrong index
@ -799,6 +800,9 @@ Buffers, windows and the argument list:
bufwinnr() get the window number of a specific buffer
winbufnr() get the buffer number of a specific window
getbufline() get a list of lines from the specified buffer
setbufline() replace a line in the specified buffer
appendbufline() append a list of lines in the specified buffer
deletebufline() delete lines from a specified buffer
win_findbuf() find windows containing a buffer
win_getid() get window ID of a window
win_gotoid() go to window with ID
@ -810,6 +814,7 @@ Buffers, windows and the argument list:
getchangelist() get a list of change list entries
getjumplist() get a list of jump list entries
swapinfo() information about a swap file
swapname() get the swap file path of a buffer
Command line: *command-line-functions*
getcmdline() get the current command line
@ -907,6 +912,7 @@ Window size and position: *window-size-functions*
winheight() get height of a specific window
winwidth() get width of a specific window
win_screenpos() get screen position of a window
winlayout() get layout of windows in a tab page
winrestcmd() return command to restore window sizes
winsaveview() get view of current window
winrestview() restore saved view of current window
@ -919,6 +925,7 @@ Mappings: *mapping-functions*
Testing: *test-functions*
assert_equal() assert that two expressions values are equal
assert_equalfile() assert that two file contents are equal
assert_notequal() assert that two expressions values are not equal
assert_inrange() assert that an expression is inside a range
assert_match() assert that a pattern matches the value
@ -941,6 +948,9 @@ Testing: *test-functions*
test_null_partial() return a null Partial function
test_null_string() return a null String
test_settime() set the time Vim uses internally
test_feedinput() add key sequence to input buffer
test_option_not_set() reset flag indicating option was set
test_scrollbar() simulate scrollbar movement in the GUI
Inter-process communication: *channel-functions*
ch_canread() check if there is something to read
@ -991,6 +1001,12 @@ Terminal window: *terminal-functions*
term_gettty() get the tty name of a terminal
term_setansicolors() set 16 ANSI colors, used for GUI
term_getansicolors() get 16 ANSI colors, used for GUI
term_dumpdiff() display difference between two screen dumps
term_dumpload() load a terminal screen dump in a window
term_dumpwrite() dump contents of a terminal screen to a file
term_setkill() set signal to stop job in a terminal
term_setrestore() set command to restore a terminal
term_setsize() set the size of a terminal
Timers: *timer-functions*
timer_start() create a timer
@ -999,6 +1015,17 @@ Timers: *timer-functions*
timer_stopall() stop all timers
timer_info() get information about timers
Tags: *tag-functions*
taglist() get list of matching tags
tagfiles() get a list of tags files
gettagstack() get the tag stack of a window
settagstack() modify the tag stack of a window
Prompt Buffer: *promptbuffer-functions*
prompt_setcallback() set prompt callback for a buffer
prompt_setinterrupt() set interrupt callback for a buffer
prompt_setprompt() set the prompt text for a buffer
Various: *various-functions*
mode() get current editing mode
visualmode() last visual mode used
@ -1026,15 +1053,13 @@ Various: *various-functions*
wordcount() get byte/word/char count of buffer
taglist() get list of matching tags
tagfiles() get a list of tags files
luaeval() evaluate Lua expression
mzeval() evaluate |MzScheme| expression
perleval() evaluate Perl expression (|+perl|)
py3eval() evaluate Python expression (|+python3|)
pyeval() evaluate Python expression (|+python|)
pyxeval() evaluate |python_x| expression
debugbreak() interrupt a program being debugged
==============================================================================
*41.7* Defining a function

View File

@ -150,7 +150,8 @@ like the variations on the ":map" command:
:menu! Insert and Command-line mode
:imenu Insert mode
:cmenu Command-line mode
:amenu All modes
:tlmenu Terminal mode
:amenu All modes (except for Terminal mode)
To avoid that the commands of a menu item are being mapped, use the command
":noremenu", ":nnoremenu", ":anoremenu", etc.

View File

@ -565,7 +565,18 @@ N *+X11* Unix only: can restore window title |X11|
The pattern is matched against the relevant part of
the output, not necessarily the whole line. Only some
commands support filtering, try it out to check if it
works.
works. Some of the commands that support filtering:
|:#| - filter whole line
|:command| - filter by command name
|:files| - filter by file name
|:highlight| - filter by highlight group
|:jumps| - filter by file name
|:let| - filter by variable name
|:list| - filter whole line
|:llist| - filter by file name or module name
|:oldfiles| - filter by file name
|:clist| - filter by file name or module name
|:set| - filter by variable name
Only normal messages are filtered, error messages are
not.

View File

@ -321,13 +321,13 @@ N
.TP
\-R
Skrivebeskyttet tilstand.
'readonly'-valgmuligheden s<>ttes.
\&'readonly'-valgmuligheden s<>ttes.
Du kan stadig redigere bufferen, men vil v<>re forhindret i
fejlagtigt at overskrive en fil.
Hvis du vil overskrive en fil, s<> tilf<6C>j et
udr<EFBFBD>bstegn til Ex-kommandoen, som i ":w!".
\-R-tilvalget indeb<65>rer ogs<67> \-n-tilvalget (se ovenfor).
'readonly'-valgmuligheden kan sl<73>s fra med ":set noro".
\&'readonly'-valgmuligheden kan sl<73>s fra med ":set noro".
Se ":help 'readonly'".
.TP
\-r

View File

@ -321,13 +321,13 @@ Når N udelades, så åbnes én fanebladsside pr. fil.
.TP
\-R
Skrivebeskyttet tilstand.
'readonly'-valgmuligheden sættes.
\&'readonly'-valgmuligheden sættes.
Du kan stadig redigere bufferen, men vil være forhindret i
fejlagtigt at overskrive en fil.
Hvis du vil overskrive en fil, så tilføj et
udråbstegn til Ex-kommandoen, som i ":w!".
\-R-tilvalget indebærer også \-n-tilvalget (se ovenfor).
'readonly'-valgmuligheden kan slås fra med ":set noro".
\&'readonly'-valgmuligheden kan slås fra med ":set noro".
Se ":help 'readonly'".
.TP
\-r

View File

@ -81,6 +81,10 @@ will not change within a Vim session. The |win_getid()| and |win_id2tabwin()|
functions can be used to convert between the window/tab number and the
identifier. There is also the window number, which may change whenever
windows are opened or closed, see |winnr()|.
The window number is only valid in one specific tab. The window ID is valid
across tabs. For most functions that take a window ID or a window number, the
window number only applies to the current tab, while the window ID can refer
to a window in any tab.
Each buffer has a unique number and the number will not change within a Vim
session. The |bufnr()| and |bufname()| functions can be used to convert
@ -218,9 +222,11 @@ CTRL-W CTRL_N *CTRL-W_CTRL-N*
|:find|. Doesn't split if {file} is not found.
CTRL-W CTRL-^ *CTRL-W_CTRL-^* *CTRL-W_^*
CTRL-W ^ Does ":split #", split window in two and edit alternate file.
When a count is given, it becomes ":split #N", split window
and edit buffer N.
CTRL-W ^ Split the current window in two and edit the alternate file.
When a count N is given, split the current window and edit
buffer N. Similar to ":sp #" and ":sp #N", but it allows the
other buffer to be unnamed. This command matches the behavior
of |CTRL-^|, except that it splits a window first.
*CTRL-W_:*
CTRL-W : Does the same as typing |:| - enter a command line. Useful in a

View File

@ -258,7 +258,7 @@ ligne.
.br
0000030: 2e5c 220a 2e5c 2220 3231 7374 .\"..\" 21st
.br
000003c: 204d 6179 2031 3939 360a 2e5c May 1996..\
000003c: 204d 6179 2031 3939 360a 2e5c May 1996..\\
.br
0000048: 2220 4d61 6e20 7061 6765 2061 " Man page a
.br

View File

@ -258,7 +258,7 @@ ligne.
.br
0000030: 2e5c 220a 2e5c 2220 3231 7374 .\"..\" 21st
.br
000003c: 204d 6179 2031 3939 360a 2e5c May 1996..\
000003c: 204d 6179 2031 3939 360a 2e5c May 1996..\\
.br
0000048: 2220 4d61 6e20 7061 6765 2061 " Man page a
.br

View File

@ -257,15 +257,15 @@ Stampa i primi 120 byte della pagina di manuale vim.1 a 12 byte per linea.
.br
0000018: 224d 616e 7561 6c20 7061 6765 "Manual page
.br
0000024: 2066 6f72 2078 7864 220a 2e5c for xxd"..\
0000024: 2066 6f72 2078 7864 220a 2e5c for xxd"..\\
.br
0000030: 220a 2e5c 2220 3231 7374 204d "..\" 21st M
0000030: 220a 2e5c 2220 3231 7374 204d "..\\" 21st M
.br
000003c: 6179 2031 3939 360a 2e5c 2220 ay 1996..\"
000003c: 6179 2031 3939 360a 2e5c 2220 ay 1996..\\"
.br
0000048: 4d61 6e20 7061 6765 2061 7574 Man page aut
.br
0000054: 686f 723a 0a2e 5c22 2020 2020 hor:..\"
0000054: 686f 723a 0a2e 5c22 2020 2020 hor:..\\"
.br
0000060: 546f 6e79 204e 7567 656e 7420 Tony Nugent
.br

View File

@ -257,15 +257,15 @@ Stampa i primi 120 byte della pagina di manuale vim.1 a 12 byte per linea.
.br
0000018: 224d 616e 7561 6c20 7061 6765 "Manual page
.br
0000024: 2066 6f72 2078 7864 220a 2e5c for xxd"..\
0000024: 2066 6f72 2078 7864 220a 2e5c for xxd"..\\
.br
0000030: 220a 2e5c 2220 3231 7374 204d "..\" 21st M
0000030: 220a 2e5c 2220 3231 7374 204d "..\\" 21st M
.br
000003c: 6179 2031 3939 360a 2e5c 2220 ay 1996..\"
000003c: 6179 2031 3939 360a 2e5c 2220 ay 1996..\\"
.br
0000048: 4d61 6e20 7061 6765 2061 7574 Man page aut
.br
0000054: 686f 723a 0a2e 5c22 2020 2020 hor:..\"
0000054: 686f 723a 0a2e 5c22 2020 2020 hor:..\\"
.br
0000060: 546f 6e79 204e 7567 656e 7420 Tony Nugent
.br

View File

@ -613,12 +613,12 @@ au BufNewFile,BufRead *.mo,*.gdmo setf gdmo
au BufNewFile,BufRead *.ged,lltxxxxx.txt setf gedcom
" Git
au BufNewFile,BufRead COMMIT_EDITMSG,MERGE_MSG,TAG_EDITMSG setf gitcommit
au BufNewFile,BufRead *.git/config,.gitconfig,.gitmodules setf gitconfig
au BufNewFile,BufRead *.git/modules/*/config setf gitconfig
au BufNewFile,BufRead */.config/git/config setf gitconfig
au BufNewFile,BufRead COMMIT_EDITMSG,MERGE_MSG,TAG_EDITMSG setf gitcommit
au BufNewFile,BufRead *.git/config,.gitconfig,/etc/gitconfig setf gitconfig
au BufNewFile,BufRead */.config/git/config setf gitconfig
au BufNewFile,BufRead .gitmodules,*.git/modules/*/config setf gitconfig
if !empty($XDG_CONFIG_HOME)
au BufNewFile,BufRead $XDG_CONFIG_HOME/git/config setf gitconfig
au BufNewFile,BufRead $XDG_CONFIG_HOME/git/config setf gitconfig
endif
au BufNewFile,BufRead git-rebase-todo setf gitrebase
au BufRead,BufNewFile .gitsendemail.msg.?????? setf gitsendemail
@ -1129,7 +1129,7 @@ au BufNewFile,BufRead *.dpr setf pascal
" PDF
au BufNewFile,BufRead *.pdf setf pdf
" PCMK - HAE - crm configure edit
" PCMK - HAE - crm configure edit
au BufNewFile,BufRead *.pcmk setf pcmk
" Perl
@ -1263,9 +1263,9 @@ au BufNewFile,BufRead */etc/protocols setf protocols
" Pyrex
au BufNewFile,BufRead *.pyx,*.pxd setf pyrex
" Python, Python Shell Startup Files
" Python, Python Shell Startup and Python Stub Files
" Quixote (Python-based web framework)
au BufNewFile,BufRead *.py,*.pyw,.pythonstartup,.pythonrc,*.ptl setf python
au BufNewFile,BufRead *.py,*.pyw,.pythonstartup,.pythonrc,*.ptl,*.pyi setf python
" Radiance
au BufNewFile,BufRead *.rad,*.mat setf radiance
@ -1414,8 +1414,8 @@ au BufNewFile,BufRead *.sdl,*.pr setf sdl
" sed
au BufNewFile,BufRead *.sed setf sed
" Sieve (RFC 3028)
au BufNewFile,BufRead *.siv setf sieve
" Sieve (RFC 3028, 5228)
au BufNewFile,BufRead *.siv,*.sieve setf sieve
" Sendmail
au BufNewFile,BufRead sendmail.cf setf sm
@ -1893,8 +1893,11 @@ au BufNewFile,BufRead *.yy,*.yxx,*.y++ setf yacc
" Yacc or racc
au BufNewFile,BufRead *.y call dist#ft#FTy()
" Yaml or Raml
au BufNewFile,BufRead *.yaml,*.yml,*.raml setf yaml
" Yaml
au BufNewFile,BufRead *.yaml,*.yml setf yaml
" Raml
au BufNewFile,BufRead *.raml setf raml
" yum conf (close enough to dosini)
au BufNewFile,BufRead */etc/yum.conf setf dosini
@ -2107,7 +2110,7 @@ au BufNewFile,BufRead zsh*,zlog* call s:StarSetf('zsh')
au BufNewFile,BufRead *.text,README setf text
" Help files match *.txt but should have a last line that is a modeline.
au BufNewFile,BufRead *.txt
au BufNewFile,BufRead *.txt
\ if getline('$') !~ 'vim:.*ft=help'
\| setf text
\| endif

View File

@ -67,10 +67,10 @@ if !exists("no_plugin_maps") && !exists("no_vim_maps")
vnoremap <silent><buffer> [[ m':<C-U>exe "normal! gv"<Bar>call search('^\s*fu\%[nction]\>', "bW")<CR>
nnoremap <silent><buffer> ]] m':call search('^\s*fu\%[nction]\>', "W")<CR>
vnoremap <silent><buffer> ]] m':<C-U>exe "normal! gv"<Bar>call search('^\s*fu\%[nction]\>', "W")<CR>
nnoremap <silent><buffer> [] m':call search('^\s*endf*\%[unction]\>', "bW")<CR>
vnoremap <silent><buffer> [] m':<C-U>exe "normal! gv"<Bar>call search('^\s*endf*\%[unction]\>', "bW")<CR>
nnoremap <silent><buffer> ][ m':call search('^\s*endf*\%[unction]\>', "W")<CR>
vnoremap <silent><buffer> ][ m':<C-U>exe "normal! gv"<Bar>call search('^\s*endf*\%[unction]\>', "W")<CR>
nnoremap <silent><buffer> [] m':call search('^\s*endf\%[unction]\>', "bW")<CR>
vnoremap <silent><buffer> [] m':<C-U>exe "normal! gv"<Bar>call search('^\s*endf\%[unction]\>', "bW")<CR>
nnoremap <silent><buffer> ][ m':call search('^\s*endf\%[unction]\>', "W")<CR>
vnoremap <silent><buffer> ][ m':<C-U>exe "normal! gv"<Bar>call search('^\s*endf\%[unction]\>', "W")<CR>
" Move around comments
nnoremap <silent><buffer> ]" :call search('^\(\s*".*\n\)\@<!\(\s*"\)', "W")<CR>
@ -87,8 +87,7 @@ if exists("loaded_matchit")
\ '\<\(wh\%[ile]\|for\)\>:\<brea\%[k]\>:\<con\%[tinue]\>:\<end\(w\%[hile]\|fo\%[r]\)\>,' .
\ '\<if\>:\<el\%[seif]\>:\<en\%[dif]\>,' .
\ '\<try\>:\<cat\%[ch]\>:\<fina\%[lly]\>:\<endt\%[ry]\>,' .
\ '\<aug\%[roup]\s\+\%(END\>\)\@!\S:\<aug\%[roup]\s\+END\>,' .
\ '(:)'
\ '\<aug\%[roup]\s\+\%(END\>\)\@!\S:\<aug\%[roup]\s\+END\>,'
" Ignore syntax region commands and settings, any 'en*' would clobber
" if-endif.
" - set spl=de,en

View File

@ -1,8 +1,8 @@
" Vim filetype plugin file
" Language: xml
" Maintainer: Christian Brabandt <cb@256bit.org>
" Last Changed: May 08th, 2018
" Repository: https://github.com/chrisbra/vim-xml-ftplugin
" Language: xml
" Maintainer: Christian Brabandt <cb@256bit.org>
" Last Changed: Dec 07th, 2018
" Repository: https://github.com/chrisbra/vim-xml-ftplugin
" Previous Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net>
" URL: http://dwsharp.users.sourceforge.net/vim/ftplugin

14
runtime/indent/Makefile Normal file
View File

@ -0,0 +1,14 @@
# Portable Makefile for running indent tests.
VIM = vim
VIMRUNTIME = ..
# Run the tests that didn't run yet or failed previously.
# If a test succeeds a testdir/*.out file will be written.
# If a test fails a testdir/*.fail file will be written.
test:
VIMRUNTIME=$(VIMRUNTIME) $(VIM) --clean --not-a-term -u testdir/runtest.vim
clean:
VIMRUNTIME=$(VIMRUNTIME) $(VIM) --clean --not-a-term -u testdir/cleantest.vim

View File

@ -43,3 +43,5 @@ running. Add a test if the function exists and use ":finish", like this:
The user may have several options set unlike you, try to write the file such
that it works with any option settings. Also be aware of certain features not
being compiled in.
To test the indent file, see testdir/README.txt.

View File

@ -1,15 +1,73 @@
" Vim indent file
" Language: C#
" Maintainer: Johannes Zellner <johannes@zellner.org>
" Last Change: Fri, 15 Mar 2002 07:53:54 CET
" Language: C#
" Maintainer: Nick Jensen <nickspoon@gmail.com>
" Former Maintainers: Aquila Deus
" Johannes Zellner <johannes@zellner.org>
" Last Change: 2018-11-21
" Filenames: *.cs
" License: Vim (see :h license)
" Repository: https://github.com/nickspoons/vim-cs
"
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
finish
if exists('b:did_indent')
finish
endif
let b:did_indent = 1
" C# is like indenting C
setlocal cindent
let s:save_cpo = &cpoptions
set cpoptions&vim
let b:undo_indent = "setl cin<"
setlocal indentexpr=GetCSIndent(v:lnum)
function! s:IsCompilerDirective(line)
return a:line =~? '^\s*#'
endf
function! s:IsAttributeLine(line)
return a:line =~? '^\s*\[[A-Za-z]' && a:line =~? '\]$'
endf
function! s:FindPreviousNonCompilerDirectiveLine(start_lnum)
for delta in range(0, a:start_lnum)
let lnum = a:start_lnum - delta
let line = getline(lnum)
let is_directive = s:IsCompilerDirective(line)
if !is_directive
return lnum
endif
endfor
return 0
endf
function! GetCSIndent(lnum) abort
" Hit the start of the file, use zero indent.
if a:lnum == 0
return 0
endif
let this_line = getline(a:lnum)
" Compiler directives use zero indent if so configured.
let is_first_col_macro = s:IsCompilerDirective(this_line) && stridx(&l:cinkeys, '0#') >= 0
if is_first_col_macro
return cindent(a:lnum)
endif
let lnum = s:FindPreviousNonCompilerDirectiveLine(a:lnum - 1)
let previous_code_line = getline(lnum)
if s:IsAttributeLine(previous_code_line)
let ind = indent(lnum)
return ind
else
return cindent(a:lnum)
endif
endfunction
let b:undo_indent = 'setlocal indentexpr<'
let &cpoptions = s:save_cpo
unlet s:save_cpo
" vim:et:sw=2:sts=2

View File

@ -216,8 +216,9 @@ 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). Known self-closing tags:
" 'p', 'img', 'source'.
" the matching <p>, but not the other way around).
" Known self-closing tags: " 'p', 'img', 'source', 'area', 'keygen', 'track',
" 'wbr'.
" Old HTML tags:
call s:AddITags(s:indent_tags, [
\ 'a', 'abbr', 'acronym', 'address', 'b', 'bdo', 'big',
@ -232,11 +233,11 @@ call s:AddITags(s:indent_tags, [
" New HTML5 elements:
call s:AddITags(s:indent_tags, [
\ 'area', 'article', 'aside', 'audio', 'bdi', 'canvas',
\ 'command', 'data', 'datalist', 'details', 'embed', 'figcaption',
\ 'figure', 'footer', 'header', 'keygen', 'main', 'mark', 'meter',
\ 'nav', 'output', 'picture', 'progress', 'rp', 'rt', 'ruby', 'section',
\ 'summary', 'svg', 'time', 'track', 'video', 'wbr'])
\ 'article', 'aside', 'audio', 'bdi', 'canvas', 'command', 'data',
\ 'datalist', 'details', 'dialog', 'embed', 'figcaption', 'figure',
\ 'footer', 'header', 'hgroup', 'main', 'mark', 'meter', 'nav', 'output',
\ 'picture', 'progress', 'rp', 'rt', 'ruby', 'section', 'summary',
\ 'svg', 'time', 'video'])
" Tags added for web components:
call s:AddITags(s:indent_tags, [
@ -625,7 +626,7 @@ func! s:CSSIndent()
return eval(b:hi_css1indent)
endif
" If the current line starts with "}" align with it's match.
" If the current line starts with "}" align with its match.
if curtext =~ '^\s*}'
call cursor(v:lnum, 1)
try
@ -934,7 +935,7 @@ func! s:InsideTag(foundHtmlString)
let idx = match(text, '<' . s:tagname . '\s\+\zs\w')
endif
if idx == -1
" after just <tag indent one level more
" after just "<tag" indent one level more
let idx = match(text, '<' . s:tagname . '$')
if idx >= 0
call cursor(lnum, idx)

View File

@ -2,6 +2,7 @@
" Maintainer : Gergely Kontra <kgergely@mcl.hu>
" Revised on : 2002.02.18. 23:34:05
" Language : Prolog
" Last change by: Takuya Fujiwara, 2018 Sep 23
" TODO:
" checking with respect to syntax highlighting
@ -37,10 +38,18 @@ function! GetPrologIndent()
let ind = indent(pnum)
" Previous line was comment -> use previous line's indent
if pline =~ '^\s*%'
retu ind
return ind
endif
" Previous line was the start of block comment -> +1 after '/*' comment
if pline =~ '^\s*/\*'
return ind + 1
endif
" Previous line was the end of block comment -> -1 after '*/' comment
if pline =~ '^\s*\*/'
return ind - 1
endif
" Check for clause head on previous line
if pline =~ ':-\s*\(%.*\)\?$'
if pline =~ '\%(:-\|-->\)\s*\(%.*\)\?$'
let ind = ind + shiftwidth()
" Check for end of clause on previous line
elseif pline =~ '\.\s*\(%.*\)\?$'

View File

@ -53,6 +53,11 @@ function GetPythonIndent(lnum)
return 0
endif
" searchpair() can be slow sometimes, limit the time to 100 msec or what is
" put in g:pyindent_searchpair_timeout
let searchpair_stopline = 0
let searchpair_timeout = get(g:, 'pyindent_searchpair_timeout', 150)
" If the previous line is inside parenthesis, use the indent of the starting
" line.
" Trick: use the non-existing "dummy" variable to break out of the loop when
@ -61,7 +66,8 @@ function GetPythonIndent(lnum)
let parlnum = searchpair('(\|{\|\[', '', ')\|}\|\]', 'nbW',
\ "line('.') < " . (plnum - s:maxoff) . " ? dummy :"
\ . " synIDattr(synID(line('.'), col('.'), 1), 'name')"
\ . " =~ '\\(Comment\\|Todo\\|String\\)$'")
\ . " =~ '\\(Comment\\|Todo\\|String\\)$'",
\ searchpair_stopline, searchpair_timeout)
if parlnum > 0
let plindent = indent(parlnum)
let plnumstart = parlnum
@ -80,14 +86,16 @@ function GetPythonIndent(lnum)
let p = searchpair('(\|{\|\[', '', ')\|}\|\]', 'bW',
\ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :"
\ . " synIDattr(synID(line('.'), col('.'), 1), 'name')"
\ . " =~ '\\(Comment\\|Todo\\|String\\)$'")
\ . " =~ '\\(Comment\\|Todo\\|String\\)$'",
\ searchpair_stopline, searchpair_timeout)
if p > 0
if p == plnum
" When the start is inside parenthesis, only indent one 'shiftwidth'.
let pp = searchpair('(\|{\|\[', '', ')\|}\|\]', 'bW',
\ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :"
\ . " synIDattr(synID(line('.'), col('.'), 1), 'name')"
\ . " =~ '\\(Comment\\|Todo\\|String\\)$'")
\ . " =~ '\\(Comment\\|Todo\\|String\\)$'",
\ searchpair_stopline, searchpair_timeout)
if pp > 0
return indent(plnum) + (exists("g:pyindent_nested_paren") ? eval(g:pyindent_nested_paren) : shiftwidth())
endif

12
runtime/indent/raml.vim Normal file
View File

@ -0,0 +1,12 @@
" Vim indent file
" Language: RAML (RESTful API Modeling Language)
" Maintainer: mucheng <leisurelicht@gmail.com>
" License: VIM LICENSE
" Latest Revision: 2018-11-03
if exists("b:did_indent")
finish
endif
" Same as yaml indenting.
runtime! indent/yaml.vim

View File

@ -1,7 +1,8 @@
" Vim indent file
" Language: Tcl
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2006-12-20
" Language: Tcl
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Update: Chris Heithoff <chrisheithoff@gmail.com>
" Latest Revision: 2018-12-05
if exists("b:did_indent")
finish
@ -28,6 +29,15 @@ function s:prevnonblanknoncomment(lnum)
return lnum
endfunction
function s:ends_with_backslash(lnum)
let line = getline(a:lnum)
if line =~ '\\\s*$'
return 1
else
return 0
endif
endfunction
function s:count_braces(lnum, count_open)
let n_open = 0
let n_close = 0
@ -53,23 +63,39 @@ endfunction
function GetTclIndent()
let line = getline(v:lnum)
if line =~ '^\s*\*'
return cindent(v:lnum)
elseif line =~ '^\s*}'
return indent(v:lnum) - shiftwidth()
endif
" Get the line number of the previous non-blank or non-comment line.
let pnum = s:prevnonblanknoncomment(v:lnum - 1)
if pnum == 0
return 0
endif
let ind = indent(pnum) + s:count_braces(pnum, 1) * shiftwidth()
" ..and the previous line before the previous line.
let pnum2 = s:prevnonblanknoncomment(pnum-1)
let pline = getline(pnum)
if pline =~ '}\s*$'
let ind -= (s:count_braces(pnum, 0) - (pline =~ '^\s*}' ? 1 : 0)) * shiftwidth()
" Default indentation is to preserve the previous indentation.
let ind = indent(pnum)
" ...but if previous line introduces an open brace, then increase current line's indentation
if s:count_braces(pnum, 1) > 0
let ind += shiftwidth()
else
" Look for backslash line continuation on the previous two lines.
let slash1 = s:ends_with_backslash(pnum)
let slash2 = s:ends_with_backslash(pnum2)
if slash1 && !slash2
" If the previous line begins a line continuation.
let ind += shiftwidth()
elseif !slash1 && slash2
" If two lines ago was the end of a line continuation group of lines.
let ind -= shiftwidth()
endif
endif
" If the current line begins with a closed brace, then decrease the indentation by one.
if line =~ '^\s*}'
let ind -= shiftwidth()
endif
return ind
endfunction

View File

@ -0,0 +1,97 @@
TESTING INDENT SCRIPTS
We'll use FILETYPE for the filetype name here.
FORMAT OF THE FILETYPE.IN FILE
First of all, create a FILETYPE.in file. It should contain:
- A modeline setting the 'filetype' and any other option values.
This must work like a comment for FILETYPE. E.g. for vim:
" vim: set ft=vim sw=4 :
- At least one block of lines to indent, prefixed with START_INDENT and
followed by END_INDENT. These lines must also look like a comment for your
FILETYPE. You would normally leave out all indent, so that the effect of
the indent command results in adding indent. Example:
" START_INDENT
func Some()
let x = 1
endfunc
" END_INDENT
If you just want to test normal indenting with default options, you can make
this a large number of lines. Just add all kinds of language constructs,
nested statements, etc. with valid syntax.
- Optionally, add lines with INDENT_EXE after START_INDENT, followed by a Vim
command. This will be executed before indenting the lines. Example:
" START_INDENT
" INDENT_EXE let g:vim_indent_cont = 6
let cmd =
\ 'some '
\ 'string'
" END_INDENT
Note that the command is not undone, you may need to reverse the effect for
the next block of lines.
- Alternatively to indenting all the lines between START_INDENT and
END_INDENT, use an INDENT_AT line, which specifies a pattern to find the
line to indent. Example:
" START_INDENT
" INDENT_AT this-line
func Some()
let f = x " this-line
endfunc
" END_INDENT
Alternatively you can use INDENT_NEXT to indent the line below the matching
pattern. Keep in mind that quite often it will indent relative to the
matching line:
" START_INDENT
" INDENT_NEXT next-line
func Some()
" next-line
let f = x
endfunc
" END_INDENT
Or use INDENT_PREV to indent the line above the matching pattern:
" START_INDENT
" INDENT_PREV prev-line
func Some()
let f = x
" prev-line
endfunc
" END_INDENT
It's best to keep the whole file valid for FILETYPE, so that syntax
highlighting works normally, and any indenting that depends on the syntax
highlighting also works.
RUNNING THE TEST
Before running the test, create a FILETYPE.ok file. You can leave it empty at
first.
Now run "make test". After Vim has done the indenting you will see a
FILETYPE.fail file. This contains the actual result of indenting, and it's
different from the FILETYPE.ok file.
Check the contents of the FILETYPE.fail file. If it is perfectly OK, then
rename it to overwrite the FILETYPE.ok file. If you now run "make test" again,
the test will pass and create a FILETYPE.out file, which is identical to the
FILETYPE.ok file. The FILETYPE.fail file will be deleted.
If you try to run "make test" again you will notice that nothing happens,
because the FILETYPE.out file already exists. Delete it, or do "make clean",
so that the text runs again. If you edit the FILETYPE.in file, so that it's
newer than the FILETYPE.out file, the test will also run.

View File

@ -0,0 +1,11 @@
" Only do this with the +eval feature
if 1
" Deletes all the test output files: *.fail and *.out
for fname in glob('testdir/*.out', 1, 1) + glob('testdir/*.fail', 1, 1)
call delete(fname)
endfor
endif
quit

View File

@ -0,0 +1,26 @@
" vim: set ft=html sw=4 :
" START_INDENT
<div>
<div>
text
</div>
</div>
<div
class="foo bar">
text
</div>
<div class="foo bar"
data="something">
text
</div>
<div class="foo
bar">
text
</div>
" END_INDENT

View File

@ -0,0 +1,26 @@
" vim: set ft=html sw=4 :
" START_INDENT
<div>
<div>
text
</div>
</div>
<div
class="foo bar">
text
</div>
<div class="foo bar"
data="something">
text
</div>
<div class="foo
bar">
text
</div>
" END_INDENT

View File

@ -0,0 +1,17 @@
% vim: set ft=matlab sw=4 :
% START_INDENT
if true
disp foo
elseif false
disp bar
end
% END_INDENT
% START_INDENT
try
statements
catch exception
statements
end
% END_INDENT

View File

@ -0,0 +1,17 @@
% vim: set ft=matlab sw=4 :
% START_INDENT
if true
disp foo
elseif false
disp bar
end
% END_INDENT
% START_INDENT
try
statements
catch exception
statements
end
% END_INDENT

View File

@ -0,0 +1,125 @@
" Runs all the indent tests for which there is no .out file.
"
" Current directory must be runtime/indent.
" Only do this with the +eval feature
if 1
set nocp
filetype indent on
set nowrapscan
au! SwapExists * call HandleSwapExists()
func HandleSwapExists()
" Ignore finding a swap file for the test input and output, the user might be
" editing them and that's OK.
if expand('<afile>') =~ '.*\.\(in\|out\|fail\|ok\)'
let v:swapchoice = 'e'
endif
endfunc
for fname in glob('testdir/*.in', 1, 1)
let root = substitute(fname, '\.in', '', '')
" Execute the test if the .out file does not exist of when the .in file is
" newer.
let in_time = getftime(fname)
let out_time = getftime(root . '.out')
if out_time < 0 || in_time > out_time
call delete(root . '.fail')
call delete(root . '.out')
set sw& ts& filetype=
exe 'split ' . fname
let did_some = 0
let failed = 0
let end = 1
while 1
" Indent all the lines between "START_INDENT" and "END_INDENT"
exe end
let start = search('\<START_INDENT\>')
let end = search('\<END_INDENT\>')
if start <= 0 || end <= 0 || end <= start
if did_some == 0
call append(0, 'ERROR: START_INDENT and/or END_INDENT not found')
let failed = 1
endif
break
else
let did_some = 1
" Execute all commands marked with INDENT_EXE and find any pattern.
let lnum = start
let pattern = ''
let at = ''
while 1
exe lnum + 1
let lnum_exe = search('\<INDENT_EXE\>')
exe lnum + 1
let indent_at = search('\<INDENT_\(AT\|NEXT\|PREV\)\>')
if lnum_exe > 0 && lnum_exe < end && (indent_at <= 0 || lnum_exe < indent_at)
exe substitute(getline(lnum_exe), '.*INDENT_EXE', '', '')
let lnum = lnum_exe
let start = lnum
elseif indent_at > 0 && indent_at < end
if pattern != ''
call append(indent_at, 'ERROR: duplicate pattern')
let failed = 1
break
endif
let text = getline(indent_at)
let pattern = substitute(text, '.*INDENT_\S*\s*', '', '')
let at = substitute(text, '.*INDENT_\(\S*\).*', '\1', '')
let lnum = indent_at
let start = lnum
else
break
endif
endwhile
exe start + 1
if pattern == ''
exe 'normal =' . (end - 1) . 'G'
else
let lnum = search(pattern)
if lnum <= 0
call append(indent_at, 'ERROR: pattern not found: ' . pattern)
let failed = 1
break
endif
if at == 'AT'
exe lnum
elseif at == 'NEXT'
exe lnum + 1
else
exe lnum - 1
endif
normal ==
endif
endif
endwhile
if !failed
" Check the resulting text equals the .ok file.
if getline(1, '$') != readfile(root . '.ok')
let failed = 1
endif
endif
if failed
exe 'write ' . root . '.fail'
echoerr 'Test ' . fname . ' FAILED!'
sleep 2
else
exe 'write ' . root . '.out'
endif
quit! " close the indented file
endif
endfor
" Matching "if 1" at the start.
endif
qall!

View File

@ -0,0 +1,19 @@
# vim: set filetype=tcl shiftwidth=4 tabstop=4:
# START_INDENT
proc abc {} {
set a 5
if {[some_cmd]==1} {
foreach i [list {1 2 3}] {
# Does this comment affect anything?
puts $i
}
}
}
command_with_a_long_time -arg1 "First" \
-arg2 "Second" \
-arg3 "Third"
puts "Move indent back after line continuation is complete"
# END_INDENT

View File

@ -0,0 +1,19 @@
# vim: set filetype=tcl shiftwidth=4 tabstop=4:
# START_INDENT
proc abc {} {
set a 5
if {[some_cmd]==1} {
foreach i [list {1 2 3}] {
# Does this comment affect anything?
puts $i
}
}
}
command_with_a_long_time -arg1 "First" \
-arg2 "Second" \
-arg3 "Third"
puts "Move indent back after line continuation is complete"
# END_INDENT

View File

@ -0,0 +1,46 @@
" vim: set ft=vim sw=4 :
" START_INDENT
func Some()
let x = 1
endfunc
let cmd =
\ 'some '
\ 'string'
" END_INDENT
" START_INDENT
" INDENT_EXE let g:vim_indent_cont = 6
let cmd =
\ 'some '
\ 'string'
" END_INDENT
" START_INDENT
" INDENT_EXE unlet g:vim_indent_cont
" INDENT_AT this-line
func Some()
let f = x " this-line
endfunc
" END_INDENT
" START_INDENT
" INDENT_NEXT next-line
func Some()
" next-line
let f = x
endfunc
" END_INDENT
" START_INDENT
" INDENT_PREV prev-line
func Some()
let f = x
" prev-line
endfunc
" END_INDENT

View File

@ -0,0 +1,46 @@
" vim: set ft=vim sw=4 :
" START_INDENT
func Some()
let x = 1
endfunc
let cmd =
\ 'some '
\ 'string'
" END_INDENT
" START_INDENT
" INDENT_EXE let g:vim_indent_cont = 6
let cmd =
\ 'some '
\ 'string'
" END_INDENT
" START_INDENT
" INDENT_EXE unlet g:vim_indent_cont
" INDENT_AT this-line
func Some()
let f = x " this-line
endfunc
" END_INDENT
" START_INDENT
" INDENT_NEXT next-line
func Some()
" next-line
let f = x
endfunc
" END_INDENT
" START_INDENT
" INDENT_PREV prev-line
func Some()
let f = x
" prev-line
endfunc
" END_INDENT

View File

@ -0,0 +1,32 @@
<!-- vim: set ft=xml ts=2 sw=0 sts=-1 et : -->
<!-- START_INDENT -->
<?xml version="1.0" encoding="utf-8"?>
<tag0>
<tag1>
<!-- comment -->
<tag2>
<tag3/>
</tag2>
<!-- text comment -->
<!--
text comment
-->
</tag1>
<!--
text comment
end coment -->
</tag0>
<!-- END_INDENT -->
<!-- START_INDENT -->
<?xml version="1.0" encoding="utf-8"?>
<tag0>
<tag1>
<!-- comment -->
<tag2>
<tag3/>
</tag2>
</tag1>
</tag0>
<!-- END_INDENT -->

View File

@ -0,0 +1,32 @@
<!-- vim: set ft=xml ts=2 sw=0 sts=-1 et : -->
<!-- START_INDENT -->
<?xml version="1.0" encoding="utf-8"?>
<tag0>
<tag1>
<!-- comment -->
<tag2>
<tag3/>
</tag2>
<!-- text comment -->
<!--
text comment
-->
</tag1>
<!--
text comment
end coment -->
</tag0>
<!-- END_INDENT -->
<!-- START_INDENT -->
<?xml version="1.0" encoding="utf-8"?>
<tag0>
<tag1>
<!-- comment -->
<tag2>
<tag3/>
</tag2>
</tag1>
</tag0>
<!-- END_INDENT -->

View File

@ -10,7 +10,7 @@ endif
let b:did_indent = 1
setlocal indentexpr=GetVimIndent()
setlocal indentkeys+==end,=else,=cat,=fina,=END,0\\
setlocal indentkeys+==end,=else,=cat,=fina,=END,0\\,0=\"\\\
let b:undo_indent = "setl indentkeys< indentexpr<"
@ -31,15 +31,17 @@ function GetVimIndent()
endtry
endfunc
let s:lineContPat = '^\s*\(\\\|"\\ \)'
function GetVimIndentIntern()
" Find a non-blank line above the current line.
let lnum = prevnonblank(v:lnum - 1)
" If the current line doesn't start with '\' and below a line that starts
" with '\', use the indent of the line above it.
" If the current line doesn't start with '\' or '"\ ' and below a line that
" starts with '\' or '"\ ', use the indent of the line above it.
let cur_text = getline(v:lnum)
if cur_text !~ '^\s*\\'
while lnum > 0 && getline(lnum) =~ '^\s*\\'
if cur_text !~ s:lineContPat
while lnum > 0 && getline(lnum) =~ s:lineContPat
let lnum = lnum - 1
endwhile
endif
@ -51,10 +53,10 @@ function GetVimIndentIntern()
let prev_text = getline(lnum)
" Add a 'shiftwidth' after :if, :while, :try, :catch, :finally, :function
" and :else. Add it three times for a line that starts with '\' after
" a line that doesn't (or g:vim_indent_cont if it exists).
" and :else. Add it three times for a line that starts with '\' or '"\ '
" after a line that doesn't (or g:vim_indent_cont if it exists).
let ind = indent(lnum)
if cur_text =~ '^\s*\\' && v:lnum > 1 && prev_text !~ '^\s*\\'
if cur_text =~ s:lineContPat && v:lnum > 1 && prev_text !~ s:lineContPat
if exists("g:vim_indent_cont")
let ind = ind + g:vim_indent_cont
else

View File

@ -2,7 +2,9 @@
" Repository: https://github.com/chrisbra/vim-xml-ftplugin
" Maintainer: Christian Brabandt <cb@256bit.org>
" Previous Maintainer: Johannes Zellner <johannes@zellner.org>
" Last Change: 20180724 - Correctly indent xml comments https://github.com/vim/vim/issues/3200
" Last Change: 20181022 - Do not overwrite indentkeys setting
" https://github.com/chrisbra/vim-xml-ftplugin/issues/1
" 20180724 - Correctly indent xml comments https://github.com/vim/vim/issues/3200
" Notes: 1) does not indent pure non-xml code (e.g. embedded scripts)
" 2) will be confused by unbalanced tags in comments
" or CDATA sections.
@ -19,7 +21,7 @@ set cpo&vim
" [-- local settings (must come before aborting the script) --]
setlocal indentexpr=XmlIndentGet(v:lnum,1)
setlocal indentkeys=o,O,*<Return>,<>>,<<>,/,{,}
setlocal indentkeys=o,O,*<Return>,<>>,<<>,/,{,},!^F
if !exists('b:xml_indent_open')
let b:xml_indent_open = '.\{-}<\a'

View File

@ -2,9 +2,9 @@
"
" Menu Translations: Japanese (EUC-JP)
" Last Translator: MURAOKA Taro <koron.kaoriya@gmail.com>
" Last Change: 28-Jan-2016.
" Last Change: 18-Jul-2018.
"
" Copyright (C) 2001-2016 MURAOKA Taro <koron.kaoriya@gmail.com>,
" Copyright (C) 2001-2018 MURAOKA Taro <koron.kaoriya@gmail.com>,
" vim-jp <http://vim-jp.org/>
"
" THIS FILE IS DISTRIBUTED UNDER THE VIM LICENSE.

View File

@ -2,9 +2,9 @@
"
" Menu Translations: Japanese (UTF-8)
" Last Translator: MURAOKA Taro <koron.kaoriya@gmail.com>
" Last Change: 28-Jan-2016.
" Last Change: 18-Jul-2018.
"
" Copyright (C) 2001-2016 MURAOKA Taro <koron.kaoriya@gmail.com>,
" Copyright (C) 2001-2018 MURAOKA Taro <koron.kaoriya@gmail.com>,
" vim-jp <http://vim-jp.org/>
"
" THIS FILE IS DISTRIBUTED UNDER THE VIM LICENSE.

View File

@ -2,9 +2,9 @@
"
" Menu Translations: Japanese (CP932)
" Last Translator: MURAOKA Taro <koron.kaoriya@gmail.com>
" Last Change: 28-Jan-2016.
" Last Change: 18-Jul-2018.
"
" Copyright (C) 2001-2016 MURAOKA Taro <koron.kaoriya@gmail.com>,
" Copyright (C) 2001-2018 MURAOKA Taro <koron.kaoriya@gmail.com>,
" vim-jp <http://vim-jp.org/>
"
" THIS FILE IS DISTRIBUTED UNDER THE VIM LICENSE.

View File

@ -138,7 +138,7 @@ map ,Id1 o# X .`a22lr 
map ,Il0 o#XX .`a22lr 
map ,Id0 o# .`a22lr 
"
" Patterns used to replace a germ with it's next generation
" Patterns used to replace a germ with its next generation
map ,Iaa o=AB =BC =CD =DE =EF =FG =GH =HI =IJ =JK =KL =LM =MN =NO =OP =PQ =QR
map ,Iab o=RS =ST =TU =UV =VW =WX =XY =YZ =Z 
"
@ -232,7 +232,7 @@ map ,m p
map ,m p
"
" Delete the character under the cursor
map ,n x
map ,n x
"
" Replace a character by its next, A --> B, B --> C, etc.
map ,a `a,jGi?=,ma

View File

@ -160,6 +160,9 @@ vnoremenu 20.350 &Edit.&Copy<Tab>"+y "+y
cnoremenu 20.350 &Edit.&Copy<Tab>"+y <C-Y>
nnoremenu 20.360 &Edit.&Paste<Tab>"+gP "+gP
cnoremenu &Edit.&Paste<Tab>"+gP <C-R>+
if exists(':tlmenu')
tlnoremenu &Edit.&Paste<Tab>"+gP <C-W>"+
endif
exe 'vnoremenu <script> &Edit.&Paste<Tab>"+gP ' . paste#paste_cmd['v']
exe 'inoremenu <script> &Edit.&Paste<Tab>"+gP ' . paste#paste_cmd['i']
nnoremenu 20.370 &Edit.Put\ &Before<Tab>[p [p

View File

@ -1,9 +1,9 @@
" Set options and add mapping such that Vim behaves a lot like MS-Windows
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last change: 2017 Oct 28
" Last Change: 2018 Dec 07
" bail out if this isn't wanted (mrsvim.vim uses this).
" Bail out if this isn't wanted.
if exists("g:skip_loading_mswin") && g:skip_loading_mswin
finish
endif

View File

@ -73,6 +73,13 @@ let s:pc_id = 12
let s:break_id = 13 " breakpoint number is added to this
let s:stopped = 1
" Take a breakpoint number as used by GDB and turn it into an integer.
" The breakpoint may contain a dot: 123.4 -> 123004
" The main breakpoint has a zero subid.
func s:Breakpoint2SignNumber(id, subid)
return s:break_id + a:id * 1000 + a:subid
endfunction
func s:Highlight(init, old, new)
let default = a:init ? 'default ' : ''
if a:new ==# 'light' && a:old !=# 'light'
@ -138,9 +145,9 @@ endfunc
func s:StartDebug_term(dict)
" Open a terminal window without a job, to run the debugged program in.
let s:ptybuf = term_start('NONE', {
\ 'term_name': 'debugged program',
\ 'vertical': s:vertical,
\ })
\ 'term_name': 'debugged program',
\ 'vertical': s:vertical,
\ })
if s:ptybuf == 0
echoerr 'Failed to open the program terminal window'
return
@ -155,10 +162,10 @@ func s:StartDebug_term(dict)
" Create a hidden terminal window to communicate with gdb
let s:commbuf = term_start('NONE', {
\ 'term_name': 'gdb communication',
\ 'out_cb': function('s:CommOutput'),
\ 'hidden': 1,
\ })
\ 'term_name': 'gdb communication',
\ 'out_cb': function('s:CommOutput'),
\ 'hidden': 1,
\ })
if s:commbuf == 0
echoerr 'Failed to open the communication terminal window'
exe 'bwipe! ' . s:ptybuf
@ -174,9 +181,9 @@ func s:StartDebug_term(dict)
let cmd = [g:termdebugger, '-quiet', '-tty', pty] + gdb_args
call ch_log('executing "' . join(cmd) . '"')
let s:gdbbuf = term_start(cmd, {
\ 'exit_cb': function('s:EndTermDebug'),
\ 'term_finish': 'close',
\ })
\ 'exit_cb': function('s:EndTermDebug'),
\ 'term_finish': 'close',
\ })
if s:gdbbuf == 0
echoerr 'Failed to open the gdb terminal window'
exe 'bwipe! ' . s:ptybuf
@ -200,18 +207,18 @@ func s:StartDebug_term(dict)
let response = ''
for lnum in range(1,200)
if term_getline(s:gdbbuf, lnum) =~ 'new-ui mi '
" response can be in the same line or the next line
let response = term_getline(s:gdbbuf, lnum) . 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
" response can be in the same line or the next line
let response = term_getline(s:gdbbuf, lnum) . 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'
@ -268,9 +275,9 @@ func s:StartDebug_prompt(dict)
call ch_log('executing "' . join(cmd) . '"')
let s:gdbjob = job_start(cmd, {
\ 'exit_cb': function('s:EndPromptDebug'),
\ 'out_cb': function('s:GdbOutCallback'),
\ })
\ 'exit_cb': function('s:EndPromptDebug'),
\ 'out_cb': function('s:GdbOutCallback'),
\ })
if job_status(s:gdbjob) != "run"
echoerr 'Failed to start gdb'
exe 'bwipe! ' . s:promptbuf
@ -295,8 +302,8 @@ func s:StartDebug_prompt(dict)
" Unix: Run the debugged program in a terminal window. Open it below the
" gdb window.
belowright let s:ptybuf = term_start('NONE', {
\ 'term_name': 'debugged program',
\ })
\ 'term_name': 'debugged program',
\ })
if s:ptybuf == 0
echoerr 'Failed to open the program terminal window'
call job_stop(s:gdbjob)
@ -353,9 +360,19 @@ func s:StartDebugCommon(dict)
endif
endif
" Contains breakpoints that have been placed, key is the number.
" Contains breakpoints that have been placed, key is a string with the GDB
" breakpoint number.
" Each entry is a dict, containing the sub-breakpoints. Key is the subid.
" For a breakpoint that is just a number the subid is zero.
" For a breakpoint "123.4" the id is "123" and subid is "4".
" Example, when breakpoint "44", "123", "123.1" and "123.2" exist:
" {'44': {'0': entry}, '123': {'0': entry, '1': entry, '2': entry}}
let s:breakpoints = {}
" Contains breakpoints by file/lnum. The key is "fname:lnum".
" Each entry is a list of breakpoint IDs at that position.
let s:breakpoint_locations = {}
augroup TermDebug
au BufRead * call s:BufRead()
au BufUnload * call s:BufUnloaded()
@ -466,9 +483,9 @@ func s:DecodeMessage(quotedText)
if a:quotedText[i] == '\'
let i += 1
if a:quotedText[i] == 'n'
" drop \n
let i += 1
continue
" drop \n
let i += 1
continue
endif
endif
let result .= a:quotedText[i]
@ -479,6 +496,9 @@ endfunc
" Extract the "name" value from a gdb message with fullname="name".
func s:GetFullname(msg)
if a:msg !~ 'fullname'
return ''
endif
let name = s:DecodeMessage(substitute(a:msg, '.*fullname=', '', ''))
if has('win32') && name =~ ':\\\\'
" sometimes the name arrives double-escaped
@ -549,17 +569,17 @@ func s:CommOutput(chan, msg)
endif
if msg != ''
if msg =~ '^\(\*stopped\|\*running\|=thread-selected\)'
call s:HandleCursor(msg)
call s:HandleCursor(msg)
elseif msg =~ '^\^done,bkpt=' || msg =~ '^=breakpoint-created,'
call s:HandleNewBreakpoint(msg)
call s:HandleNewBreakpoint(msg)
elseif msg =~ '^=breakpoint-deleted,'
call s:HandleBreakpointDelete(msg)
call s:HandleBreakpointDelete(msg)
elseif msg =~ '^=thread-group-started'
call s:HandleProgramRun(msg)
call s:HandleProgramRun(msg)
elseif msg =~ '^\^done,value='
call s:HandleEvaluate(msg)
call s:HandleEvaluate(msg)
elseif msg =~ '^\^error,msg='
call s:HandleError(msg)
call s:HandleError(msg)
endif
endif
endfor
@ -650,12 +670,12 @@ func s:DeleteCommands()
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
aunmenu WinBar.Step
aunmenu WinBar.Next
aunmenu WinBar.Finish
aunmenu WinBar.Cont
aunmenu WinBar.Stop
aunmenu WinBar.Eval
endif
endfor
call win_gotoid(curwinid)
@ -672,10 +692,13 @@ func s:DeleteCommands()
endif
exe 'sign unplace ' . s:pc_id
for key in keys(s:breakpoints)
exe 'sign unplace ' . (s:break_id + key)
for [id, entries] in items(s:breakpoints)
for subid in keys(entries)
exe 'sign unplace ' . s:Breakpoint2SignNumber(id, subid)
endfor
endfor
unlet s:breakpoints
unlet s:breakpoint_locations
sign undefine debugPC
for val in s:BreakpointSigns
@ -700,7 +723,7 @@ func s:SetBreakpoint()
endif
" Use the fname:lnum format, older gdb can't handle --source.
call s:SendCommand('-break-insert '
\ . fnameescape(expand('%:p')) . ':' . line('.'))
\ . fnameescape(expand('%:p')) . ':' . line('.'))
if do_continue
call s:SendCommand('-exec-continue')
endif
@ -710,15 +733,27 @@ endfunc
func s:ClearBreakpoint()
let fname = fnameescape(expand('%:p'))
let lnum = line('.')
for [key, val] in items(s:breakpoints)
if val['fname'] == fname && val['lnum'] == lnum
call s:SendCommand('-break-delete ' . key)
" Assume this always wors, the reply is simply "^done".
exe 'sign unplace ' . (s:break_id + key)
unlet s:breakpoints[key]
break
let bploc = printf('%s:%d', fname, lnum)
if has_key(s:breakpoint_locations, bploc)
let idx = 0
for id in s:breakpoint_locations[bploc]
if has_key(s:breakpoints, id)
" Assume this always works, the reply is simply "^done".
call s:SendCommand('-break-delete ' . id)
for subid in keys(s:breakpoints[id])
exe 'sign unplace ' . s:Breakpoint2SignNumber(id, subid)
endfor
unlet s:breakpoints[id]
unlet s:breakpoint_locations[bploc][idx]
break
else
let idx += 1
endif
endfor
if empty(s:breakpoint_locations[bploc])
unlet s:breakpoint_locations[bploc]
endif
endfor
endif
endfunc
func s:Run(args)
@ -839,14 +874,14 @@ func s:HandleCursor(msg)
if lnum =~ '^[0-9]*$'
call s:GotoSourcewinOrCreateIt()
if expand('%:p') != fnamemodify(fname, ':p')
if &modified
" TODO: find existing window
exe 'split ' . fnameescape(fname)
let s:sourcewin = win_getid(winnr())
call s:InstallWinbar()
else
exe 'edit ' . fnameescape(fname)
endif
if &modified
" TODO: find existing window
exe 'split ' . fnameescape(fname)
let s:sourcewin = win_getid(winnr())
call s:InstallWinbar()
else
exe 'edit ' . fnameescape(fname)
endif
endif
exe lnum
exe 'sign unplace ' . s:pc_id
@ -862,13 +897,18 @@ endfunc
let s:BreakpointSigns = []
func s:CreateBreakpoint(nr)
if index(s:BreakpointSigns, a:nr) == -1
call add(s:BreakpointSigns, a:nr)
exe "sign define debugBreakpoint" . a:nr . " text=" . a:nr . " texthl=debugBreakpoint"
func s:CreateBreakpoint(id, subid)
let nr = printf('%d.%d', a:id, a:subid)
if index(s:BreakpointSigns, nr) == -1
call add(s:BreakpointSigns, nr)
exe "sign define debugBreakpoint" . nr . " text=" . substitute(nr, '\..*', '', '') . " texthl=debugBreakpoint"
endif
endfunc
func! s:SplitMsg(s)
return split(a:s, '{.\{-}}\zs')
endfunction
" Handle setting a breakpoint
" Will update the sign that shows the breakpoint
func s:HandleNewBreakpoint(msg)
@ -876,49 +916,71 @@ func s:HandleNewBreakpoint(msg)
" a watch does not have a file name
return
endif
for msg in s:SplitMsg(a:msg)
let fname = s:GetFullname(msg)
if empty(fname)
continue
endif
let nr = substitute(msg, '.*number="\([0-9.]*\)\".*', '\1', '')
if empty(nr)
return
endif
let nr = substitute(a:msg, '.*number="\([0-9]*\)".*', '\1', '') + 0
if nr == 0
return
endif
call s:CreateBreakpoint(nr)
" If "nr" is 123 it becomes "123.0" and subid is "0".
" If "nr" is 123.4 it becomes "123.4.0" and subid is "4"; "0" is discarded.
let [id, subid; _] = map(split(nr . '.0', '\.'), 'v:val + 0')
call s:CreateBreakpoint(id, subid)
if has_key(s:breakpoints, nr)
let entry = s:breakpoints[nr]
else
let entry = {}
let s:breakpoints[nr] = entry
endif
if has_key(s:breakpoints, id)
let entries = s:breakpoints[id]
else
let entries = {}
let s:breakpoints[id] = entries
endif
if has_key(entries, subid)
let entry = entries[subid]
else
let entry = {}
let entries[subid] = entry
endif
let fname = s:GetFullname(a:msg)
let lnum = substitute(a:msg, '.*line="\([^"]*\)".*', '\1', '')
let entry['fname'] = fname
let entry['lnum'] = lnum
let lnum = substitute(msg, '.*line="\([^"]*\)".*', '\1', '')
let entry['fname'] = fname
let entry['lnum'] = lnum
if bufloaded(fname)
call s:PlaceSign(nr, entry)
endif
let bploc = printf('%s:%d', fname, lnum)
if !has_key(s:breakpoint_locations, bploc)
let s:breakpoint_locations[bploc] = []
endif
let s:breakpoint_locations[bploc] += [id]
if bufloaded(fname)
call s:PlaceSign(id, subid, entry)
endif
endfor
endfunc
func s:PlaceSign(nr, entry)
exe 'sign place ' . (s:break_id + a:nr) . ' line=' . a:entry['lnum'] . ' name=debugBreakpoint' . a:nr . ' file=' . a:entry['fname']
func s:PlaceSign(id, subid, entry)
let nr = printf('%d.%d', a:id, a:subid)
exe 'sign place ' . s:Breakpoint2SignNumber(a:id, a:subid) . ' line=' . a:entry['lnum'] . ' name=debugBreakpoint' . nr . ' file=' . a:entry['fname']
let a:entry['placed'] = 1
endfunc
" Handle deleting a breakpoint
" Will remove the sign that shows the breakpoint
func s:HandleBreakpointDelete(msg)
let nr = substitute(a:msg, '.*id="\([0-9]*\)\".*', '\1', '') + 0
if nr == 0
let id = substitute(a:msg, '.*id="\([0-9]*\)\".*', '\1', '') + 0
if empty(id)
return
endif
if has_key(s:breakpoints, nr)
let entry = s:breakpoints[nr]
if has_key(entry, 'placed')
exe 'sign unplace ' . (s:break_id + nr)
unlet entry['placed']
endif
unlet s:breakpoints[nr]
if has_key(s:breakpoints, id)
for [subid, entry] in items(s:breakpoints[id])
if has_key(entry, 'placed')
exe 'sign unplace ' . s:Breakpoint2SignNumber(id, subid)
unlet entry['placed']
endif
endfor
unlet s:breakpoints[id]
endif
endfunc
@ -936,20 +998,24 @@ endfunc
" Handle a BufRead autocommand event: place any signs.
func s:BufRead()
let fname = expand('<afile>:p')
for [nr, entry] in items(s:breakpoints)
if entry['fname'] == fname
call s:PlaceSign(nr, entry)
endif
for [id, entries] in items(s:breakpoints)
for [subid, entry] in items(entries)
if entry['fname'] == fname
call s:PlaceSign(id, subid, entry)
endif
endfor
endfor
endfunc
" Handle a BufUnloaded autocommand event: unplace any signs.
func s:BufUnloaded()
let fname = expand('<afile>:p')
for [nr, entry] in items(s:breakpoints)
if entry['fname'] == fname
let entry['placed'] = 0
endif
for [id, entries] in items(s:breakpoints)
for [subid, entry] in items(entries)
if entry['fname'] == fname
let entry['placed'] = 0
endif
endfor
endfor
endfunc

View File

@ -1,82 +1,33 @@
" Vim plugin for converting a syntax highlighted file to HTML.
" Maintainer: Ben Fritz <fritzophrenic@gmail.com>
" Last Change: 2015 Sep 08
" Last Change: 2018 Nov 11
"
" The core of the code is in $VIMRUNTIME/autoload/tohtml.vim and
" $VIMRUNTIME/syntax/2html.vim
"
" TODO: {{{
" * Options for generating the CSS in external style sheets. New :TOcss
" command to convert the current color scheme into a (mostly) generic CSS
" stylesheet which can be re-used. Alternate stylesheet support? Good start
" by Erik Falor
" ( https://groups.google.com/d/topic/vim_use/7XTmC4D22dU/discussion ).
" * Add optional argument to :TOhtml command to specify mode (gui, cterm,
" term) to use for the styling. Suggestion by "nacitar".
" * Add way to override or specify which RGB colors map to the color numbers
" in cterm. Get better defaults than just guessing? Suggestion by "nacitar".
" * Disable filetype detection until after all processing is done.
" * Add option for not generating the hyperlink on stuff that looks like a
" URL? Or just color the link to fit with the colorscheme (and only special
" when hovering)?
" * Bug: Opera does not allow printing more than one page if uncopyable
" regions is turned on. Possible solution: Add normal text line numbers with
" display:none, set to display:inline for print style sheets, and hide
" <input> elements for print, to allow Opera printing multiple pages (and
" other uncopyable areas?). May need to make the new text invisible to IE
" with conditional comments to prevent copying it, IE for some reason likes
" to copy hidden text. Other browsers too?
" * Bug: still a 1px gap throughout the fold column when html_prevent_copy is
" "fn" in some browsers. Specifically, in Chromium on Ubuntu (but not Chrome
" on Windows). Perhaps it is font related?
" * Bug: still some gaps in the fold column when html_prevent_copy contains
" 'd' and showing the whole diff (observed in multiple browsers). Only gaps
" on diff lines though.
" * Undercurl support via CSS3, with fallback to dotted or something:
" https://groups.google.com/d/topic/vim_use/BzXA6He1pHg/discussion
" * Redo updates for modified default foldtext (v11) when/if the patch is
" accepted to modify it.
" * Test case +diff_one_file-dynamic_folds+expand_tabs-hover_unfold
" +ignore_conceal-ignore_folding+no_foldcolumn+no_pre+no_progress
" +number_lines-pre_wrap-use_css+use_xhtml+whole_filler.xhtml
" does not show the whole diff filler as it is supposed to?
" * Bug: when 'isprint' is wrong for the current encoding, will generate
" invalid content. Can/should anything be done about this? Maybe a separate
" plugin to correct 'isprint' based on encoding?
" * Check to see if the windows-125\d encodings actually work in Unix without
" the 8bit- prefix. Add prefix to autoload dictionaries for Unix if not.
" * Font auto-detection similar to
" http://www.vim.org/scripts/script.php?script_id=2384 but for a variety of
" platforms.
" * Error thrown when sourcing 2html.vim directly when plugins are not loaded.
" * Pull in code from http://www.vim.org/scripts/script.php?script_id=3113 :
" - listchars support
" - full-line background highlight
" - other?
" * Make it so deleted lines in a diff don't create side-scrolling (get it
" free with full-line background highlight above).
" * Restore open/closed folds and cursor position after processing each file
" with option not to restore for speed increase.
" * Add extra meta info (generation time, etc.)?
" * Tidy up so we can use strict doctype in even more situations
" * Implementation detail: add threshold for writing the lines to the html
" buffer before we're done (5000 or so lines should do it)
" * TODO comments for code cleanup scattered throughout
"}}}
if exists('g:loaded_2html_plugin')
finish
endif
let g:loaded_2html_plugin = 'vim7.4_v2'
let g:loaded_2html_plugin = 'vim8.1_v1'
"
" Changelog: {{{
" 7.4_v2 (this version): Fix error raised when converting a diff containing
" 8.1_v1 (this version): Fix Bitbucket issue #6: Don't generate empty script
" tag.
" Fix Bitbucket issue #5: javascript should
" declare variables with "var".
" Fix Bitbucket issue #13: errors thrown sourcing
" 2html.vim directly when plugins not loaded.
" Fix Bitbucket issue #16: support 'vartabstop'.
"
" 7.4 updates: {{{
" 7.4_v2 (Vim 7.4.0899): Fix error raised when converting a diff containing
" an empty buffer. Jan Stocker: allow g:html_font to
" take a list so it is easier to specfiy fallback
" fonts in the generated CSS.
" 7.4_v1 (Vim 7.4.0000): Fix modeline mangling for new "Vim:" format, and
" also for version-specific modelines like "vim>703:".
"}}}
"
" 7.3 updates: {{{
" 7.3_v14 (Vim 7.3.1246): Allow suppressing line number anchors using
@ -170,9 +121,69 @@ let g:loaded_2html_plugin = 'vim7.4_v2'
"}}}
"}}}
" TODO: {{{
" * Check the issue tracker:
" https://bitbucket.org/fritzophrenic/vim-tohtml/issues?status=new&status=open
" * Options for generating the CSS in external style sheets. New :TOcss
" command to convert the current color scheme into a (mostly) generic CSS
" stylesheet which can be re-used. Alternate stylesheet support? Good start
" by Erik Falor
" ( https://groups.google.com/d/topic/vim_use/7XTmC4D22dU/discussion ).
" * Add optional argument to :TOhtml command to specify mode (gui, cterm,
" term) to use for the styling. Suggestion by "nacitar".
" * Add way to override or specify which RGB colors map to the color numbers
" in cterm. Get better defaults than just guessing? Suggestion by "nacitar".
" * Disable filetype detection until after all processing is done.
" * Add option for not generating the hyperlink on stuff that looks like a
" URL? Or just color the link to fit with the colorscheme (and only special
" when hovering)?
" * Bug: Opera does not allow printing more than one page if uncopyable
" regions is turned on. Possible solution: Add normal text line numbers with
" display:none, set to display:inline for print style sheets, and hide
" <input> elements for print, to allow Opera printing multiple pages (and
" other uncopyable areas?). May need to make the new text invisible to IE
" with conditional comments to prevent copying it, IE for some reason likes
" to copy hidden text. Other browsers too?
" * Bug: still a 1px gap throughout the fold column when html_prevent_copy is
" "fn" in some browsers. Specifically, in Chromium on Ubuntu (but not Chrome
" on Windows). Perhaps it is font related?
" * Bug: still some gaps in the fold column when html_prevent_copy contains
" 'd' and showing the whole diff (observed in multiple browsers). Only gaps
" on diff lines though.
" * Undercurl support via CSS3, with fallback to dotted or something:
" https://groups.google.com/d/topic/vim_use/BzXA6He1pHg/discussion
" * Redo updates for modified default foldtext (v11) when/if the patch is
" accepted to modify it.
" * Test case +diff_one_file-dynamic_folds+expand_tabs-hover_unfold
" +ignore_conceal-ignore_folding+no_foldcolumn+no_pre+no_progress
" +number_lines-pre_wrap-use_css+use_xhtml+whole_filler.xhtml
" does not show the whole diff filler as it is supposed to?
" * Bug: when 'isprint' is wrong for the current encoding, will generate
" invalid content. Can/should anything be done about this? Maybe a separate
" plugin to correct 'isprint' based on encoding?
" * Check to see if the windows-125\d encodings actually work in Unix without
" the 8bit- prefix. Add prefix to autoload dictionaries for Unix if not.
" * Font auto-detection similar to
" http://www.vim.org/scripts/script.php?script_id=2384 but for a variety of
" platforms.
" * Pull in code from http://www.vim.org/scripts/script.php?script_id=3113 :
" - listchars support
" - full-line background highlight
" - other?
" * Make it so deleted lines in a diff don't create side-scrolling (get it
" free with full-line background highlight above).
" * Restore open/closed folds and cursor position after processing each file
" with option not to restore for speed increase.
" * Add extra meta info (generation time, etc.)?
" * Tidy up so we can use strict doctype in even more situations
" * Implementation detail: add threshold for writing the lines to the html
" buffer before we're done (5000 or so lines should do it)
" * TODO comments for code cleanup scattered throughout
"}}}
" Define the :TOhtml command when:
" - 'compatible' is not set
" - this plugin was not already loaded
" - this plugin or user override was not already loaded
" - user commands are available. {{{
if !&cp && !exists(":TOhtml") && has("user_commands")
command -range=% -bar TOhtml :call tohtml#Convert2HTML(<line1>, <line2>)

View File

@ -1,6 +1,6 @@
" Vim syntax support file
" Maintainer: Ben Fritz <fritzophrenic@gmail.com>
" Last Change: 2015 Sep 08
" Last Change: 2018 Nov 11
"
" Additional contributors:
"
@ -633,6 +633,45 @@ if s:current_syntax == ''
let s:current_syntax = 'none'
endif
" If the user is sourcing this script directly then the plugin version isn't
" known because the main plugin script didn't load. In the usual case where the
" user still has the full Vim runtime installed, or has this full plugin
" installed in a package or something, then we can extract the version from the
" main plugin file at it's usual spot relative to this file. Otherwise the user
" is assembling their runtime piecemeal and we have no idea what versions of
" other files may be present so don't even try to make a guess or assume the
" presence of other specific files with specific meaning.
"
" We don't want to actually source the main plugin file here because the user
" may have a good reason not to (e.g. they define their own TOhtml command or
" something).
"
" If this seems way too complicated and convoluted, it is. Probably I should
" have put the version information in the autoload file from the start. But the
" version has been in the global variable for so long that changing it could
" break a lot of user scripts.
if exists("g:loaded_2html_plugin")
let s:pluginversion = g:loaded_2html_plugin
else
if !exists("g:unloaded_tohtml_plugin")
let s:main_plugin_path = expand("<sfile>:p:h:h")."/plugin/tohtml.vim"
if filereadable(s:main_plugin_path)
let s:lines = readfile(s:main_plugin_path, "", 20)
call filter(s:lines, 'v:val =~ "loaded_2html_plugin = "')
if empty(s:lines)
let g:unloaded_tohtml_plugin = "unknown"
else
let g:unloaded_tohtml_plugin = substitute(s:lines[0], '.*loaded_2html_plugin = \([''"]\)\(\%(\1\@!.\)\+\)\1', '\2', '')
endif
unlet s:lines
else
let g:unloaded_tohtml_plugin = "unknown"
endif
unlet s:main_plugin_path
endif
let s:pluginversion = g:unloaded_tohtml_plugin
endif
" Split window to create a buffer with the HTML file.
let s:orgbufnr = winbufnr(0)
let s:origwin_stl = &l:stl
@ -721,7 +760,7 @@ endif
call extend(s:lines, [
\ ("<title>".expand("%:p:~")."</title>"),
\ ("<meta name=\"Generator\" content=\"Vim/".v:version/100.".".v:version%100.'"'.s:tag_close),
\ ("<meta name=\"plugin-version\" content=\"".g:loaded_2html_plugin.'"'.s:tag_close)
\ ("<meta name=\"plugin-version\" content=\"".s:pluginversion.'"'.s:tag_close)
\ ])
call add(s:lines, '<meta name="syntax" content="'.s:current_syntax.'"'.s:tag_close)
call add(s:lines, '<meta name="settings" content="'.
@ -807,12 +846,15 @@ if s:settings.use_css
endif
endif
" insert script tag; javascript is always needed for the line number
" normalization for URL hashes
call extend(s:lines, [
\ "",
\ "<script type='text/javascript'>",
\ s:settings.use_xhtml ? '//<![CDATA[' : "<!--"])
let s:uses_script = s:settings.dynamic_folds || s:settings.line_ids || !empty(s:settings.prevent_copy)
" insert script tag if needed
if s:uses_script
call extend(s:lines, [
\ "",
\ "<script type='text/javascript'>",
\ s:settings.use_xhtml ? '//<![CDATA[' : "<!--"])
endif
" insert javascript to toggle folds open and closed
if s:settings.dynamic_folds
@ -849,8 +891,9 @@ if s:settings.line_ids
\ " if (lineNum.indexOf('L') == -1) {",
\ " lineNum = 'L'+lineNum;",
\ " }",
\ " lineElem = document.getElementById(lineNum);"
\ " var lineElem = document.getElementById(lineNum);"
\ ])
if s:settings.dynamic_folds
call extend(s:lines, [
\ "",
@ -940,12 +983,14 @@ if !empty(s:settings.prevent_copy)
\ ])
endif
" insert script closing tag
call extend(s:lines, [
\ '',
\ s:settings.use_xhtml ? '//]]>' : '-->',
\ "</script>"
\ ])
" insert script closing tag if needed
if s:uses_script
call extend(s:lines, [
\ '',
\ s:settings.use_xhtml ? '//]]>' : '-->',
\ "</script>"
\ ])
endif
call extend(s:lines, ["</head>"])
if !empty(s:settings.prevent_copy)
@ -1525,10 +1570,22 @@ while s:lnum <= s:end
if s:settings.expand_tabs
let s:offset = 0
let s:idx = stridx(s:expandedtab, "\t")
let s:tablist = split(&vts,',')
if empty(s:tablist)
let s:tablist = [ &ts ]
endif
let s:tabidx = 0
let s:tabwidth = 0
while s:idx >= 0
while s:startcol+s:idx > s:tabwidth + s:tablist[s:tabidx]
let s:tabwidth += s:tablist[s:tabidx]
if s:tabidx < len(s:tablist)-1
let s:tabidx = s:tabidx+1
endif
endwhile
if has("multi_byte_encoding")
if s:startcol + s:idx == 1
let s:i = &ts
let s:i = s:tablist[s:tabidx]
else
if s:idx == 0
let s:prevc = matchstr(s:line, '.\%' . (s:startcol + s:idx + s:offset) . 'c')
@ -1536,11 +1593,11 @@ while s:lnum <= s:end
let s:prevc = matchstr(s:expandedtab, '.\%' . (s:idx + 1) . 'c')
endif
let s:vcol = virtcol([s:lnum, s:startcol + s:idx + s:offset - len(s:prevc)])
let s:i = &ts - (s:vcol % &ts)
let s:i = s:tablist[s:tabidx] - (s:vcol - s:tabwidth)
endif
let s:offset -= s:i - 1
else
let s:i = &ts - ((s:idx + s:startcol - 1) % &ts)
let s:i = s:tablist[s:tabidx] - ((s:idx + s:startcol - 1) - s:tabwidth)
endif
let s:expandedtab = substitute(s:expandedtab, '\t', repeat(' ', s:i), '')
let s:idx = stridx(s:expandedtab, "\t")

View File

@ -3,7 +3,7 @@
" Maintainer: David Necas (Yeti) <yeti@physics.muni.cz>
" License: This file can be redistribued and/or modified under the same terms
" as Vim itself.
" Last Change: 2014-03-04
" Last Change: 2018-12-06
" Notes: Last synced with apache-2.2.3, version 1.x is no longer supported
" TODO: see particular FIXME's scattered through the file
" make it really linewise?
@ -159,7 +159,7 @@ syn keyword apacheOption inherit
syn keyword apacheDeclaration BrowserMatch BrowserMatchNoCase SetEnvIf SetEnvIfNoCase
syn keyword apacheDeclaration LoadFile LoadModule
syn keyword apacheDeclaration CheckSpelling CheckCaseOnly
syn keyword apacheDeclaration SSLCACertificateFile SSLCACertificatePath SSLCADNRequestFile SSLCADNRequestPath SSLCARevocationFile SSLCARevocationPath SSLCertificateChainFile SSLCertificateFile SSLCertificateKeyFile SSLCipherSuite SSLCryptoDevice SSLEngine SSLHonorCipherOrder SSLMutex SSLOptions SSLPassPhraseDialog SSLProtocol SSLProxyCACertificateFile SSLProxyCACertificatePath SSLProxyCARevocationFile SSLProxyCARevocationPath SSLProxyCipherSuite SSLProxyEngine SSLProxyMachineCertificateFile SSLProxyMachineCertificatePath SSLProxyProtocol SSLProxyVerify SSLProxyVerifyDepth SSLRandomSeed SSLRequire SSLRequireSSL SSLSessionCache SSLSessionCacheTimeout SSLUserName SSLVerifyClient SSLVerifyDepth
syn keyword apacheDeclaration SSLCACertificateFile SSLCACertificatePath SSLCADNRequestFile SSLCADNRequestPath SSLCARevocationFile SSLCARevocationPath SSLCertificateChainFile SSLCertificateFile SSLCertificateKeyFile SSLCipherSuite SSLCompression SSLCryptoDevice SSLEngine SSLFIPS SSLHonorCipherOrder SSLInsecureRenegotiation SSLMutex SSLOptions SSLPassPhraseDialog SSLProtocol SSLProxyCACertificateFile SSLProxyCACertificatePath SSLProxyCARevocationFile SSLProxyCARevocationPath SSLProxyCheckPeerCN SSLProxyCheckPeerExpire SSLProxyCipherSuite SSLProxyEngine SSLProxyMachineCertificateChainFile SSLProxyMachineCertificateFile SSLProxyMachineCertificatePath SSLProxyProtocol SSLProxyVerify SSLProxyVerifyDepth SSLRandomSeed SSLRenegBufferSize SSLRequire SSLRequireSSL SSLSessionCache SSLSessionCacheTimeout SSLSessionTicketKeyFile SSLSessionTickets SSLStrictSNIVHostCheck SSLUserName SSLVerifyClient SSLVerifyDepth
syn match apacheOption "[+-]\?\<\(StdEnvVars\|CompatEnvVars\|ExportCertData\|FakeBasicAuth\|StrictRequire\|OptRenegotiate\)\>"
syn keyword apacheOption builtin sem
syn match apacheOption "\(file\|exec\|egd\|dbm\|shm\):"

View File

@ -1,7 +1,7 @@
" Vim syntax file
" Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2017 Apr 30
" Last Change: 2018 Sep 21
" Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax")
@ -220,7 +220,7 @@ if exists("c_comment_strings")
syn match cCommentSkip contained "^\s*\*\($\|\s\+\)"
syn region cCommentString contained start=+L\=\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=cSpecial,cCommentSkip
syn region cComment2String contained start=+L\=\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=cSpecial
syn region cCommentL start="//" skip="\\$" end="$" keepend contains=@cCommentGroup,cComment2String,cCharacter,cNumbersCom,cSpaceError,@Spell
syn region cCommentL start="//" skip="\\$" end="$" keepend contains=@cCommentGroup,cComment2String,cCharacter,cNumbersCom,cSpaceError,cWrongComTail,@Spell
if exists("c_no_comment_fold")
" Use "extend" here to have preprocessor lines not terminate halfway a
" comment.
@ -239,6 +239,7 @@ endif
" keep a // comment separately, it terminates a preproc. conditional
syn match cCommentError display "\*/"
syn match cCommentStartError display "/\*"me=e-1 contained
syn match cWrongComTail display "\*/"
syn keyword cOperator sizeof
if exists("c_gnu")
@ -453,6 +454,7 @@ hi def link cErrInBracket cError
hi def link cCommentError cError
hi def link cCommentStartError cError
hi def link cSpaceError cError
hi def link cWrongComTail cError
hi def link cSpecialError cError
hi def link cCurlyError cError
hi def link cOperator Operator

View File

@ -3,7 +3,7 @@
" Maintainer: Nick Jensen <nickspoon@gmail.com>
" Former Maintainers: Anduin Withers <awithers@anduin.com>
" Johannes Zellner <johannes@zellner.org>
" Last Change: 2018-06-29
" Last Change: 2018-11-26
" Filenames: *.cs
" License: Vim (see :h license)
" Repository: https://github.com/nickspoons/vim-cs
@ -11,12 +11,12 @@
" REFERENCES:
" [1] ECMA TC39: C# Language Specification (WD13Oct01.doc)
if exists("b:current_syntax")
finish
if exists('b:current_syntax')
finish
endif
let s:cs_cpo_save = &cpo
set cpo&vim
let s:save_cpo = &cpoptions
set cpoptions&vim
syn keyword csType bool byte char decimal double float int long object sbyte short string T uint ulong ushort var void dynamic
@ -34,7 +34,7 @@ syn keyword csException try catch finally throw when
syn keyword csLinq ascending by descending equals from group in into join let on orderby select where
syn keyword csAsync async await
syn keyword csUnspecifiedStatement as base checked event fixed in is lock nameof operator out params ref sizeof stackalloc this typeof unchecked unsafe using
syn keyword csUnspecifiedStatement as base checked event fixed in is lock nameof operator out params ref sizeof stackalloc this unchecked unsafe using
syn keyword csUnsupportedStatement add remove value
syn keyword csUnspecifiedKeyword explicit implicit
@ -44,10 +44,16 @@ syn match csContextualStatement /\<partial[[:space:]\n]\+\(class\|struct\|interf
syn match csContextualStatement /\<\(get\|set\)\(;\|[[:space:]\n]*{\)/me=s+3
syn match csContextualStatement /\<where\>[^:]\+:/me=s+5
" Operators
syn keyword csTypeOf typeof contained
syn region csTypeOfStatement start="typeof(" end=")" contains=csType, csTypeOf
" Punctuation
syn match csBraces "[{}\[\]]" display
syn match csParens "[()]" display
syn match csOpSymbols "[+\-><=]\{1,2}" display
syn match csOpSymbols "[+\-=]\{1,2}" display
syn match csOpSymbols "[><]\{2}" display
syn match csOpSymbols "\s\zs[><]\ze\_s" display
syn match csOpSymbols "[!><+\-*/]=" display
syn match csOpSymbols "[!*/^]" display
syn match csOpSymbols "=>" display
@ -144,17 +150,18 @@ syn cluster csAll contains=csCharacter,csClassType,csComment,csContextualStateme
" The default highlighting.
hi def link csType Type
hi def link csNewType Type
hi def link csClassType Type
hi def link csIsType Type
hi def link csStorage StorageClass
hi def link csClass StorageClass
hi def link csStorage Structure
hi def link csClass Structure
hi def link csRepeat Repeat
hi def link csConditional Conditional
hi def link csLabel Label
hi def link csModifier StorageClass
hi def link csConstant Constant
hi def link csException Exception
hi def link csTypeOf Operator
hi def link csTypeOfStatement Typedef
hi def link csUnspecifiedStatement Statement
hi def link csUnsupportedStatement Statement
hi def link csUnspecifiedKeyword Keyword
@ -164,16 +171,12 @@ hi def link csIsAs Keyword
hi def link csAsync Keyword
hi def link csContextualStatement Statement
hi def link csOperatorError Error
hi def link csInterfaceDeclaration Include
hi def link csTodo Todo
hi def link csComment Comment
hi def link csEndColon Statement
hi def link csOpSymbols Operator
hi def link csLogicSymbols Boolean
hi def link csBraces Function
hi def link csParens Operator
hi def link csLogicSymbols Operator
hi def link csSpecialError Error
hi def link csSpecialCharError Error
@ -200,9 +203,9 @@ hi def link csXmlCommentLeader Comment
hi def link csXmlComment Comment
hi def link csXmlTag Statement
let b:current_syntax = "cs"
let b:current_syntax = 'cs'
let &cpo = s:cs_cpo_save
unlet s:cs_cpo_save
let &cpoptions = s:save_cpo
unlet s:save_cpo
" vim: vts=16,28

View File

@ -3,7 +3,7 @@
" Maintainer: Debian Vim Maintainers
" Former Maintainers: Gerfried Fuchs <alfie@ist.org>
" Wichert Akkerman <wakkerma@debian.org>
" Last Change: 2018 May 03
" Last Change: 2018 Oct 30
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debchangelog.vim
" Standard syntax initialization
@ -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|bionic|cosmic)%(-%(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|cosmic|disco)%(-%(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

@ -2,7 +2,7 @@
" Language: Debian sources.list
" Maintainer: Debian Vim Maintainers
" Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl>
" Last Change: 2018 Aug 11
" Last Change: 2018 Oct 30
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debsources.vim
" Standard syntax initialization
@ -25,7 +25,7 @@ let s:supported = [
\ 'oldstable', 'stable', 'testing', 'unstable', 'experimental',
\ 'wheezy', 'jessie', 'stretch', 'sid', 'rc-buggy',
\
\ 'trusty', 'xenial', 'bionic', 'cosmic', 'devel'
\ 'trusty', 'xenial', 'bionic', 'cosmic', 'disco', 'devel'
\ ]
let s:unsupported = [
\ 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato',

View File

@ -1,12 +1,12 @@
" Vim syntax file
" Language: Configuration File (ini file) for MSDOS/MS Windows
" Version: 2.1
" Version: 2.2
" Original Author: Sean M. McKee <mckee@misslink.net>
" Previous Maintainer: Nima Talebi <nima@it.net.au>
" Current Maintainer: Hong Xu <xuhdev@gmail.com>
" Current Maintainer: Hong Xu <hong@topbug.net>
" Homepage: http://www.vim.org/scripts/script.php?script_id=3747
" https://bitbucket.org/xuhdev/syntax-dosini.vim
" Last Change: 2011 Nov 8
" Repository: https://github.com/xuhdev/syntax-dosini.vim
" Last Change: 2018 Sep 11
" quit when a syntax file was already loaded
@ -17,10 +17,11 @@ endif
" shut case off
syn case ignore
syn match dosiniNumber "\<\d\+\>"
syn match dosiniNumber "\<\d*\.\d\+\>"
syn match dosiniNumber "\<\d\+e[+-]\=\d\+\>"
syn match dosiniLabel "^.\{-}="
syn match dosiniLabel "^.\{-}\ze\s*=" nextgroup=dosiniNumber,dosiniValue
syn match dosiniValue "=\zs.*"
syn match dosiniNumber "=\zs\s*\d\+\s*$"
syn match dosiniNumber "=\zs\s*\d*\.\d\+\s*$"
syn match dosiniNumber "=\zs\s*\d\+e[+-]\=\d\+\s*$"
syn region dosiniHeader start="^\s*\[" end="\]"
syn match dosiniComment "^[#;].*$"
@ -31,6 +32,7 @@ hi def link dosiniNumber Number
hi def link dosiniHeader Special
hi def link dosiniComment Comment
hi def link dosiniLabel Type
hi def link dosiniValue String
let b:current_syntax = "dosini"

View File

@ -1,7 +1,7 @@
" Vim syntax file
" Language: BIND configuration file
" Maintainer: Nick Hibma <nick@van-laarhoven.org>
" Last change: 2007-01-30
" Last Change: 2007-01-30
" Filenames: named.conf, rndc.conf
" Location: http://www.van-laarhoven.org/vim/syntax/named.vim
"

View File

@ -3,7 +3,7 @@
" Maintainer: Ken Takata
" URL: https://github.com/k-takata/vim-nsis
" Previous Maintainer: Alex Jakushev <Alex.Jakushev@kemek.lt>
" Last Change: 2018-02-07
" Last Change: 2018-10-02
" quit when a syntax file was already loaded
if exists("b:current_syntax")
@ -104,8 +104,8 @@ syn match nsisSysVar "$\$"
syn match nsisSysVar "$\\["'`]"
"LABELS (4.3)
syn match nsisLocalLabel contained "[^-+!$0-9;#. \t/*][^ \t:;#]*:\ze\%($\|[ \t;#]\|\/\*\)"
syn match nsisGlobalLabel contained "\.[^-+!$0-9;# \t/*][^ \t:;#]*:\ze\%($\|[ \t;#]\|\/\*\)"
syn match nsisLocalLabel contained "[^-+!$0-9;"'#. \t/*][^ \t:;#]*:\ze\%($\|[ \t;#]\|\/\*\)"
syn match nsisGlobalLabel contained "\.[^-+!$0-9;"'# \t/*][^ \t:;#]*:\ze\%($\|[ \t;#]\|\/\*\)"
"CONSTANTS
syn keyword nsisBoolean contained true false

106
runtime/syntax/raml.vim Normal file
View File

@ -0,0 +1,106 @@
" Vim syntax file
" Language: RAML (RESTful API Modeling Language)
" Maintainer: Eric Hopkins <eric.on.tech@gmail.com>
" URL: https://github.com/in3d/vim-raml
" License: Same as Vim
" Last Change: 2018-11-03
if exists("b:current_syntax")
finish
endif
let s:cpo_save = &cpo
set cpo&vim
syn keyword ramlTodo contained TODO FIXME XXX NOTE
syn region ramlComment display oneline start='\%(^\|\s\)#' end='$'
\ contains=ramlTodo,@Spell
syn region ramlVersion display oneline start='#%RAML' end='$'
syn match ramlNodeProperty '!\%(![^\\^% ]\+\|[^!][^:/ ]*\)'
syn match ramlAnchor '&.\+'
syn match ramlAlias '\*.\+'
syn match ramlDelimiter '[-,:]'
syn match ramlBlock '[\[\]{}>|]'
syn match ramlOperator '[?+-]'
syn match ramlKey '\h\+\(?\)\?\ze\s*:'
syn match ramlKey '\w\+\(\s\+\w\+\)*\(?\)\?\ze\s*:'
syn match routeKey '\/\w\+\(\s\+\w\+\)*\ze\s*:'
syn match routeKey 'application\/\w\+\ze\s*:'
syn match routeParamKey '\/{\w\+}*\ze\s*:'
syn region ramlString matchgroup=ramlStringDelimiter
\ start=+\s"+ skip=+\\"+ end=+"+
\ contains=ramlEscape
syn region ramlString matchgroup=ramlStringDelimiter
\ start=+\s'+ skip=+''+ end=+'+
\ contains=ramlStringEscape
syn region ramlParameter matchgroup=ramlParameterDelimiter
\ start=+<<+ skip=+''+ end=+>>+
syn match ramlEscape contained display +\\[\\"abefnrtv^0_ NLP]+
syn match ramlEscape contained display '\\x\x\{2}'
syn match ramlEscape contained display '\\u\x\{4}'
syn match ramlEscape contained display '\\U\x\{8}'
syn match ramlEscape display '\\\%(\r\n\|[\r\n]\)'
syn match ramlStringEscape contained +''+
syn match ramlNumber display
\ '\<[+-]\=\d\+\%(\.\d\+\%([eE][+-]\=\d\+\)\=\)\='
syn match ramlNumber display '0\o\+'
syn match ramlNumber display '0x\x\+'
syn match ramlNumber display '([+-]\=[iI]nf)'
syn match ramlNumber display '(NaN)'
syn match ramlConstant '\<[~yn]\>'
syn keyword ramlConstant true True TRUE false False FALSE
syn keyword ramlConstant yes Yes on ON no No off OFF
syn keyword ramlConstant null Null NULL nil Nil NIL
syn keyword httpVerbs get post put delete head patch options
syn keyword ramlTypes string number integer date boolean file
syn match ramlTimestamp '\d\d\d\d-\%(1[0-2]\|\d\)-\%(3[0-2]\|2\d\|1\d\|\d\)\%( \%([01]\d\|2[0-3]\):[0-5]\d:[0-5]\d.\d\d [+-]\%([01]\d\|2[0-3]\):[0-5]\d\|t\%([01]\d\|2[0-3]\):[0-5]\d:[0-5]\d.\d\d[+-]\%([01]\d\|2[0-3]\):[0-5]\d\|T\%([01]\d\|2[0-3]\):[0-5]\d:[0-5]\d.\dZ\)\='
syn region ramlDocumentHeader start='---' end='$' contains=ramlDirective
syn match ramlDocumentEnd '\.\.\.'
syn match ramlDirective contained '%[^:]\+:.\+'
hi def link ramlVersion String
hi def link routeInterpolation String
hi def link ramlInterpolation Constant
hi def link ramlTodo Todo
hi def link ramlComment Comment
hi def link ramlDocumentHeader PreProc
hi def link ramlDocumentEnd PreProc
hi def link ramlDirective Keyword
hi def link ramlNodeProperty Type
hi def link ramlAnchor Type
hi def link ramlAlias Type
hi def link ramlBlock Operator
hi def link ramlOperator Operator
hi def link routeParamKey SpecialChar
hi def link ramlKey Identifier
hi def link routeKey SpecialChar
hi def link ramlParameterDelimiter Type
hi def link ramlParameter Type
hi def link ramlString String
hi def link ramlStringDelimiter ramlString
hi def link ramlEscape SpecialChar
hi def link ramlStringEscape SpecialChar
hi def link ramlNumber Number
hi def link ramlConstant Constant
hi def link ramlTimestamp Number
hi def link httpVerbs Statement
hi def link ramlTypes Type
hi def link ramlDelimiter Delimiter
let b:current_syntax = "raml"
let &cpo = s:cpo_save
unlet s:cpo_save

View File

@ -2,8 +2,8 @@
" Language: shell (sh) Korn shell (ksh) bash (sh)
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
" Previous Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int>
" Last Change: Jul 31, 2018
" Version: 179
" Last Change: Nov 23, 2018
" Version: 185
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH
" For options and settings, please use: :help ft-sh-syntax
" This file includes many ideas from Eric Brunet (eric.brunet@ens.fr)
@ -144,13 +144,14 @@ endif
syn cluster shHereBeginList contains=@shCommandSubList
syn cluster shHereList contains=shBeginHere,shHerePayload
syn cluster shHereListDQ contains=shBeginHere,@shDblQuoteList,shHerePayload
syn cluster shIdList contains=shCommandSub,shCommandSubBQ,shWrapLineOperator,shSetOption,shComment,shDeref,shDerefSimple,shHereString,shRedir,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shCtrlSeq,shStringSpecial,shAtExpr
syn cluster shIdList contains=shCommandSub,shCommandSubBQ,shWrapLineOperator,shSetOption,shComment,shDeref,shDerefSimple,shHereString,shNumber,shOperator,shRedir,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shCtrlSeq,shStringSpecial,shAtExpr
syn cluster shIfList contains=@shLoopList,shDblBrace,shDblParen,shFunctionKey,shFunctionOne,shFunctionTwo
syn cluster shLoopList contains=@shCaseList,@shErrorList,shCaseEsac,shConditional,shDblBrace,shExpr,shFor,shForPP,shIf,shOption,shSet,shTest,shTestOpr,shTouch
syn cluster shPPSRightList contains=shComment,shDeref,shDerefSimple,shEscape,shPosnParm
syn cluster shSubShList contains=@shCommandSubList,shCommandSubBQ,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shIf,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq,shOperator
syn cluster shTestList contains=shCharClass,shCommandSub,shCommandSubBQ,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shSpecialDQ,shExDoubleQuote,shExpr,shExSingleQuote,shNumber,shOperator,shSingleQuote,shTest,shTestOpr
syn cluster shTestList contains=shArithmetic,shCharClass,shCommandSub,shCommandSubBQ,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shSpecialDQ,shExDoubleQuote,shExpr,shExSingleQuote,shNumber,shOperator,shSingleQuote,shTest,shTestOpr
syn cluster shNoZSList contains=shSpecialNoZS
syn cluster shForList contains=shTestOpr,shNumber,shDerefSimple,shDeref,shCommandSub,shCommandSubBQ,shArithmetic
" Echo: {{{1
" ====
@ -243,7 +244,7 @@ syn match shCharClass contained "\[:\(backspace\|escape\|return\|xdigit\|alnum
ShFoldIfDoFor syn region shDo transparent matchgroup=shConditional start="\<do\>" matchgroup=shConditional end="\<done\>" contains=@shLoopList
ShFoldIfDoFor syn region shIf transparent matchgroup=shConditional start="\<if\_s" matchgroup=shConditional skip=+-fi\>+ end="\<;\_s*then\>" end="\<fi\>" contains=@shIfList
ShFoldIfDoFor syn region shFor matchgroup=shLoop start="\<for\ze\_s\s*\%(((\)\@!" end="\<in\>" end="\<do\>"me=e-2 contains=@shLoopList,shDblParen skipwhite nextgroup=shCurlyIn
ShFoldIfDoFor syn region shForPP matchgroup=shLoop start='\<for\>\_s*((' end='))' contains=shTestOpr
ShFoldIfDoFor syn region shForPP matchgroup=shLoop start='\<for\>\_s*((' end='))' contains=@shForList
if exists("b:is_kornshell") || exists("b:is_bash") || exists("b:is_posix")
syn cluster shCaseList add=shRepeat
@ -290,8 +291,10 @@ endif
" Misc: {{{1
"======
syn match shWrapLineOperator "\\$"
syn region shCommandSubBQ start="`" skip="\\\\\|\\." end="`" contains=@shCommandSubList
syn match shEscape contained '\%(^\)\@!\%(\\\\\)*\\.' nextgroup=shSingleQuote,shDoubleQuote,shComment
syn region shCommandSubBQ start="`" skip="\\\\\|\\." end="`" contains=shBQComment,@shCommandSubList
"see ksh13
"syn match shEscape contained '\%(^\)\@!\%(\\\\\)*\\.' nextgroup=shSingleQuote,shDoubleQuote,shComment
syn match shEscape contained '\%(^\)\@!\%(\\\\\)*\\.' nextgroup=shComment
" $() and $(()): {{{1
" $(..) is not supported by sh (Bourne shell). However, apparently
@ -374,25 +377,26 @@ syn match shComment "^\s*\zs#.*$" contains=@shCommentGroup
syn match shComment "\s\zs#.*$" contains=@shCommentGroup
syn match shComment contained "#.*$" contains=@shCommentGroup
syn match shQuickComment contained "#.*$"
syn match shBQComment contained "#.\{-}\ze`" contains=@shCommentGroup
" Here Documents: {{{1
" =========================================
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc01 start="<<\s*\\\=\z([^ \t0-9|>]\+\)" matchgroup=shHereDoc01 end="^\z1\s*$" contains=@shDblQuoteList
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc02 start="<<\s*\"\z([^ \t|>]\+\)\"" matchgroup=shHereDoc02 end="^\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc03 start="<<-\s*\z([^ \t0-9|>]\+\)" matchgroup=shHereDoc03 end="^\s*\z1\s*$" contains=@shDblQuoteList
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc01 start="<<\s*\\\=\z([^ \t|>]\+\)" matchgroup=shHereDoc01 end="^\z1\s*$" contains=@shDblQuoteList
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc02 start="<<\s*\"\z([^"]\+\)\"" matchgroup=shHereDoc02 end="^\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc03 start="<<-\s*\z([^ \t|>]\+\)" matchgroup=shHereDoc03 end="^\s*\z1\s*$" contains=@shDblQuoteList
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc04 start="<<-\s*'\z([^']\+\)'" matchgroup=shHereDoc04 end="^\s*\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc05 start="<<\s*'\z([^']\+\)'" matchgroup=shHereDoc05 end="^\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc06 start="<<-\s*\"\z([^ \t|>]\+\)\"" matchgroup=shHereDoc06 end="^\s*\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc07 start="<<\s*\\\_$\_s*\z([^ \t0-9|>]\+\)" matchgroup=shHereDoc07 end="^\z1\s*$" contains=@shDblQuoteList
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc08 start="<<\s*\\\_$\_s*'\z([^ \t0-9|>]\+\)'" matchgroup=shHereDoc08 end="^\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc09 start="<<\s*\\\_$\_s*\"\z([^ \t0-9|>]\+\)\"" matchgroup=shHereDoc09 end="^\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc10 start="<<-\s*\\\_$\_s*\z([^ \t0-9|>]\+\)" matchgroup=shHereDoc10 end="^\s*\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc11 start="<<-\s*\\\_$\_s*\\\z([^ \t0-9|>]\+\)" matchgroup=shHereDoc11 end="^\s*\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc12 start="<<-\s*\\\_$\_s*'\z([^ \t|>]\+\)'" matchgroup=shHereDoc12 end="^\s*\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc13 start="<<-\s*\\\_$\_s*\"\z([^ \t|>]\+\)\"" matchgroup=shHereDoc13 end="^\s*\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc14 start="<<\\\z([^ \t0-9|>]\+\)" matchgroup=shHereDoc14 end="^\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc15 start="<<-\s*\\\z([^ \t0-9|>]\+\)" matchgroup=shHereDoc15 end="^\s*\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc16 start="<<-\s*\\\z([^ \t0-9|>]\+\)" matchgroup=shHereDoc15 end="^\s*\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc06 start="<<-\s*\"\z([^"]\+\)\"" matchgroup=shHereDoc06 end="^\s*\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc07 start="<<\s*\\\_$\_s*\z([^ \t|>]\+\)" matchgroup=shHereDoc07 end="^\z1\s*$" contains=@shDblQuoteList
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc08 start="<<\s*\\\_$\_s*'\z([^ \t|>]\+\)'" matchgroup=shHereDoc08 end="^\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc09 start="<<\s*\\\_$\_s*\"\z([^ \t|>]\+\)\"" matchgroup=shHereDoc09 end="^\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc10 start="<<-\s*\\\_$\_s*\z([^ \t|>]\+\)" matchgroup=shHereDoc10 end="^\s*\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc11 start="<<-\s*\\\_$\_s*\\\z([^ \t|>]\+\)" matchgroup=shHereDoc11 end="^\s*\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc12 start="<<-\s*\\\_$\_s*'\z([^']\+\)'" matchgroup=shHereDoc12 end="^\s*\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc13 start="<<-\s*\\\_$\_s*\"\z([^"]\+\)\"" matchgroup=shHereDoc13 end="^\s*\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc14 start="<<\\\z([^ \t|>]\+\)" matchgroup=shHereDoc14 end="^\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc15 start="<<-\s*\\\z([^ \t|>]\+\)" matchgroup=shHereDoc15 end="^\s*\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc16 start="<<-\s*\\\z([^ \t|>]\+\)" matchgroup=shHereDoc15 end="^\s*\z1\s*$"
" Here Strings: {{{1
" =============
@ -405,18 +409,19 @@ endif
"=============
syn match shSetOption "\s\zs[-+][a-zA-Z0-9]\+\>" contained
syn match shVariable "\<\([bwglsav]:\)\=[a-zA-Z0-9.!@_%+,]*\ze=" nextgroup=shVarAssign
syn match shVarAssign "=" contained nextgroup=shCmdParenRegion,shPattern,shDeref,shDerefSimple,shDoubleQuote,shExDoubleQuote,shSingleQuote,shExSingleQuote
syn match shVarAssign "=" contained nextgroup=shCmdParenRegion,shPattern,shDeref,shDerefSimple,shDoubleQuote,shExDoubleQuote,shSingleQuote,shExSingleQuote,shVar
syn match shVar contained "\h\w*"
syn region shAtExpr contained start="@(" end=")" contains=@shIdList
if exists("b:is_bash")
syn match shSet "^\s*set\ze\s*$"
syn region shSetList oneline matchgroup=shSet start="\<\(declare\|typeset\|local\|export\|unset\)\>\ze[^/]" end="$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+#\|=" contains=@shIdList
syn region shSetList oneline matchgroup=shSet start="\<set\>\ze[^/]" end="\ze[;|#)]\|$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+=" contains=@shIdList nextgroup=shComment
syn match shSet "^\s*set\ze\s\+$"
syn region shSetList oneline matchgroup=shSet start="\<\%(declare\|local\|export\)\>\ze[/a-zA-Z_]\@!" end="$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+#\|=" contains=@shIdList
syn region shSetList oneline matchgroup=shSet start="\<\%(set\|unset\)\>[/a-zA-Z_]\@!" end="\ze[;|#)]\|$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+=" contains=@shIdList nextgroup=shComment
elseif exists("b:is_kornshell") || exists("b:is_posix")
syn match shSet "^\s*set\ze\s*$"
syn region shSetList oneline matchgroup=shSet start="\<\(typeset\|export\|unset\)\>\ze[^/]" end="$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList
syn region shSetList oneline matchgroup=shSet start="\<set\>\ze[^/]" end="$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList
syn match shSet "^\s*set\ze\s\+$"
syn region shSetList oneline matchgroup=shSet start="\<\(export\)\>\ze[/]\@!" end="$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList
syn region shSetList oneline matchgroup=shSet start="\<\%(set\|unset\>\)\ze[/a-zA-Z_]\@!" end="\ze[;|#)]\|$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList nextgroup=shComment
else
syn region shSetList oneline matchgroup=shSet start="\<\(set\|export\|unset\)\>\ze[^/]" end="$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList
syn region shSetList oneline matchgroup=shSet start="\<\(set\|export\|unset\)\>\ze[/a-zA-Z_]\@!" end="\ze[;|#)]\|$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList
endif
" Functions: {{{1
@ -521,12 +526,12 @@ if exists("b:is_bash")
" bash : ${parameter//pattern/string}
" bash : ${parameter//pattern}
syn match shDerefPPS contained '/\{1,2}' nextgroup=shDerefPPSleft
syn region shDerefPPSleft contained start='.' skip=@\%(\\\\\)*\\/@ matchgroup=shDerefOp end='/' end='\ze}' nextgroup=shDerefPPSright contains=@shCommandSubList
syn region shDerefPPSright contained start='.' skip=@\%(\\\\\)\+@ end='\ze}' contains=@shPPSRightList
syn region shDerefPPSleft contained start='.' skip=@\%(\\\\\)*\\/@ matchgroup=shDerefOp end='/' end='\ze}' nextgroup=shDerefPPSright contains=@shCommandSubList
syn region shDerefPPSright contained start='.' skip=@\%(\\\\\)\+@ end='\ze}' contains=@shPPSRightList
" bash : ${parameter/#substring/replacement}
syn match shDerefPSR contained '/#' nextgroup=shDerefPSRleft
syn region shDerefPSRleft contained start='.' skip=@\%(\\\\\)*\\/@ matchgroup=shDerefOp end='/' end='\ze}' nextgroup=shDerefPSRright
syn match shDerefPSR contained '/#' nextgroup=shDerefPSRleft,shDoubleQuote,shSingleQuote
syn region shDerefPSRleft contained start='[^"']' skip=@\%(\\\\\)*\\/@ matchgroup=shDerefOp end='/' end='\ze}' nextgroup=shDerefPSRright
syn region shDerefPSRright contained start='.' skip=@\%(\\\\\)\+@ end='\ze}'
endif
@ -534,7 +539,7 @@ endif
"syn region shParen matchgroup=shArithRegion start='[^$]\zs(\%(\ze[^(]\|$\)' end=')' contains=@shArithParenList
syn region shParen matchgroup=shArithRegion start='\$\@!(\%(\ze[^(]\|$\)' end=')' contains=@shArithParenList
" Useful sh Keywords: {{{1
" Additional sh Keywords: {{{1
" ===================
syn keyword shStatement break cd chdir continue eval exec exit kill newgrp pwd read readonly return shift test trap ulimit umask wait
syn keyword shConditional contained elif else then
@ -542,23 +547,27 @@ if !exists("g:sh_no_error")
syn keyword shCondError elif else then
endif
" Useful ksh Keywords: {{{1
" ====================
if exists("b:is_kornshell") || exists("b:is_bash") || exists("b:is_posix")
syn keyword shStatement autoload bg false fc fg functions getopts hash history integer jobs let nohup printf r stop suspend times true type unalias whence
" Additional ksh Keywords and Aliases: {{{1
" ===================================
if exists("b:is_kornshell") || exists("b:is_posix")
syn keyword shStatement bg builtin disown enum export false fg getconf getopts hist jobs let printf sleep true unalias whence
syn keyword shStatement typeset skipwhite nextgroup=shSetOption
syn keyword shStatement autoload compound fc float functions hash history integer nameref nohup r redirect source stop suspend times type
if exists("b:is_posix")
syn keyword shStatement command
else
syn keyword shStatement time
endif
" Useful bash Keywords: {{{1
" Additional bash Keywords: {{{1
" =====================
if exists("b:is_bash")
syn keyword shStatement bind builtin dirs disown enable help logout popd pushd shopt source
else
syn keyword shStatement login newgrp
endif
elseif exists("b:is_bash")
syn keyword shStatement bg builtin disown export false fg getopts jobs let printf sleep true unalias
syn keyword shStatement typeset nextgroup=shSetOption
syn keyword shStatement fc hash history source suspend times type
syn keyword shStatement bind builtin caller compopt declare dirs disown enable export help logout mapfile popd pushd readarray shopt source typeset
else
syn keyword shStatement login newgrp
endif
" Synchronization: {{{1
@ -637,6 +646,7 @@ if !exists("skip_sh_syntax_inits")
hi def link shParen shArithmetic
hi def link shPosnParm shShellVariables
hi def link shQuickComment shComment
hi def link shBQComment shComment
hi def link shRange shOperator
hi def link shRedir shOperator
hi def link shSetListDelim shOperator

View File

@ -1,7 +1,7 @@
" Vim syntax file
" Language: TASM: turbo assembler by Borland
" Maintaner: FooLman of United Force <foolman@bigfoot.com>
" Last Change: 2012 Feb 03 by Thilo Six
" Last Change: 2012 Feb 03 by Thilo Six, and 2018 Nov 27.
" quit when a syntax file was already loaded
if exists("b:current_syntax")
@ -109,7 +109,7 @@ hi def link tasmComment Comment
hi def link tasmLabel Label
let b:curret_syntax = "tasm"
let b:current_syntax = "tasm"
let &cpo = s:cpo_save
unlet s:cpo_save

View File

@ -1,8 +1,8 @@
" Vim syntax file
" Language: TeX
" Maintainer: Charles E. Campbell <NdrchipO@ScampbellPfamily.AbizM>
" Last Change: Mar 30, 2018
" Version: 109
" Last Change: Nov 02, 2018
" Version: 111
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX
"
" Notes: {{{1
@ -159,9 +159,9 @@ syn cluster texFoldGroup contains=texAccent,texBadMath,texComment,texDefCmd,tex
syn cluster texBoldGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texInputFile,texLength,texLigature,texMatcher,texMathZoneV,texMathZoneW,texMathZoneX,texMathZoneY,texMathZoneZ,texNewCmd,texNewEnv,texOnlyMath,texOption,texParen,texRefZone,texSection,texBeginEnd,texSectionZone,texSpaceCode,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,@texMathZones,texTitle,texAbstract,texBoldStyle,texBoldItalStyle,texNoSpell
syn cluster texItalGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texInputFile,texLength,texLigature,texMatcher,texMathZoneV,texMathZoneW,texMathZoneX,texMathZoneY,texMathZoneZ,texNewCmd,texNewEnv,texOnlyMath,texOption,texParen,texRefZone,texSection,texBeginEnd,texSectionZone,texSpaceCode,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,@texMathZones,texTitle,texAbstract,texItalStyle,texItalBoldStyle,texNoSpell
if !s:tex_nospell
syn cluster texMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,@Spell
syn cluster texMatchNMGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcherNM,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,@Spell
syn cluster texStyleGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,texStyleStatement,@Spell,texStyleMatcher
syn cluster texMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texBoldStyle,texBoldItalStyle,texItalStyle,texItalBoldStyle,texZone,texInputFile,texOption,@Spell
syn cluster texMatchNMGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcherNM,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texBoldStyle,texBoldItalStyle,texItalStyle,texItalBoldStyle,texZone,texInputFile,texOption,@Spell
syn cluster texStyleGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texBoldStyle,texBoldItalStyle,texItalStyle,texItalBoldStyle,texZone,texInputFile,texOption,texStyleStatement,texStyleMatcher,@Spell
else
syn cluster texMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption
syn cluster texMatchNMGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcherNM,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption
@ -596,7 +596,6 @@ if s:tex_fast =~# 'v'
if exists("g:tex_verbspell") && g:tex_verbspell
syn region texZone start="\\begin{[vV]erbatim}" end="\\end{[vV]erbatim}\|%stopzone\>" contains=@Spell
" listings package:
syn region texZone start="\\begin{lstlisting}" end="\\end{lstlisting}\|%stopzone\>" contains=@Spell
if b:tex_stylish
syn region texZone start="\\verb\*\=\z([^\ta-zA-Z@]\)" end="\z1\|%stopzone\>" contains=@Spell
else
@ -683,13 +682,7 @@ if has("conceal") && &enc == 'utf-8'
\ ['approx' , '≈'],
\ ['ast' , ''],
\ ['asymp' , '≍'],
\ ['backepsilon' , '∍'],
\ ['backsimeq' , '≃'],
\ ['backslash' , ''],
\ ['barwedge' , '⊼'],
\ ['because' , '∵'],
\ ['beth' , 'ܒ'],
\ ['between' , '≬'],
\ ['bigcap' , '∩'],
\ ['bigcirc' , '○'],
\ ['bigcup' , ''],
@ -701,38 +694,18 @@ if has("conceal") && &enc == 'utf-8'
\ ['bigtriangleup' , '∆'],
\ ['bigvee' , ''],
\ ['bigwedge' , '⋀'],
\ ['blacksquare' , '∎'],
\ ['bot' , '⊥'],
\ ['bowtie' , '⋈'],
\ ['boxdot' , '⊡'],
\ ['boxminus' , '⊟'],
\ ['boxplus' , '⊞'],
\ ['boxtimes' , '⊠'],
\ ['Box' , '☐'],
\ ['bullet' , '•'],
\ ['bumpeq' , '≏'],
\ ['Bumpeq' , '≎'],
\ ['cap' , '∩'],
\ ['Cap' , '⋒'],
\ ['cdot' , '·'],
\ ['cdots' , '⋯'],
\ ['circ' , '∘'],
\ ['circeq' , '≗'],
\ ['circlearrowleft', '↺'],
\ ['circlearrowright', '↻'],
\ ['circledast' , '⊛'],
\ ['circledcirc' , '⊚'],
\ ['clubsuit' , '♣'],
\ ['complement' , '∁'],
\ ['cong' , '≅'],
\ ['coprod' , '∐'],
\ ['copyright' , '©'],
\ ['cup' , ''],
\ ['Cup' , '⋓'],
\ ['curlyeqprec' , '⋞'],
\ ['curlyeqsucc' , '⋟'],
\ ['curlyvee' , '⋎'],
\ ['curlywedge' , '⋏'],
\ ['dagger' , '†'],
\ ['dashv' , '⊣'],
\ ['ddagger' , '‡'],
@ -741,50 +714,27 @@ if has("conceal") && &enc == 'utf-8'
\ ['diamondsuit' , '♢'],
\ ['div' , '÷'],
\ ['doteq' , '≐'],
\ ['doteqdot' , '≑'],
\ ['dotplus' , '∔'],
\ ['dots' , '…'],
\ ['dotsb' , '⋯'],
\ ['dotsc' , '…'],
\ ['dotsi' , '⋯'],
\ ['dotso' , '…'],
\ ['doublebarwedge' , '⩞'],
\ ['downarrow' , '↓'],
\ ['Downarrow' , '⇓'],
\ ['ell' , ''],
\ ['emptyset' , '∅'],
\ ['eqcirc' , '≖'],
\ ['eqsim' , '≂'],
\ ['eqslantgtr' , '⪖'],
\ ['eqslantless' , '⪕'],
\ ['equiv' , '≡'],
\ ['eth' , 'ð'],
\ ['exists' , '∃'],
\ ['fallingdotseq' , '≒'],
\ ['flat' , '♭'],
\ ['forall' , '∀'],
\ ['frown' , '⁔'],
\ ['ge' , '≥'],
\ ['geq' , '≥'],
\ ['geqq' , '≧'],
\ ['gets' , '←'],
\ ['gimel' , 'ℷ'],
\ ['gg' , '⟫'],
\ ['gneqq' , '≩'],
\ ['gtrdot' , '⋗'],
\ ['gtreqless' , '⋛'],
\ ['gtrless' , '≷'],
\ ['gtrsim' , '≳'],
\ ['hbar' , 'ℏ'],
\ ['heartsuit' , '♡'],
\ ['hookleftarrow' , '↩'],
\ ['hookrightarrow' , '↪'],
\ ['iff' , '⇔'],
\ ['iiint' , '∭'],
\ ['iint' , '∬'],
\ ['Im' , ''],
\ ['imath' , 'ɩ'],
\ ['implies' , '⇒'],
\ ['in' , '∈'],
\ ['infty' , '∞'],
\ ['int' , '∫'],
@ -793,69 +743,33 @@ if has("conceal") && &enc == 'utf-8'
\ ['lceil' , '⌈'],
\ ['ldots' , '…'],
\ ['le' , '≤'],
\ ['leadsto' , '↝'],
\ ['left(' , '('],
\ ['left\[' , '['],
\ ['left\\{' , '{'],
\ ['leftarrow' , '←'],
\ ['Leftarrow' , '⇐'],
\ ['leftarrowtail' , '↢'],
\ ['leftharpoondown', '↽'],
\ ['leftharpoonup' , '↼'],
\ ['leftrightarrow' , '↔'],
\ ['Leftrightarrow' , '⇔'],
\ ['leftrightsquigarrow', '↭'],
\ ['leftthreetimes' , '⋋'],
\ ['leq' , '≤'],
\ ['leq' , '≤'],
\ ['leqq' , '≦'],
\ ['lessdot' , '⋖'],
\ ['lesseqgtr' , '⋚'],
\ ['lesssim' , '≲'],
\ ['lfloor' , '⌊'],
\ ['ll' , '≪'],
\ ['lmoustache' , '╭'],
\ ['lneqq' , '≨'],
\ ['lor' , ''],
\ ['ltimes' , '⋉'],
\ ['mapsto' , '↦'],
\ ['measuredangle' , '∡'],
\ ['mid' , ''],
\ ['models' , '╞'],
\ ['mp' , '∓'],
\ ['nabla' , '∇'],
\ ['natural' , '♮'],
\ ['ncong' , '≇'],
\ ['ne' , '≠'],
\ ['nearrow' , '↗'],
\ ['neg' , '¬'],
\ ['neq' , '≠'],
\ ['nexists' , '∄'],
\ ['ngeq' , '≱'],
\ ['ngeqq' , '≱'],
\ ['ngtr' , '≯'],
\ ['ni' , '∋'],
\ ['nleftarrow' , '↚'],
\ ['nLeftarrow' , '⇍'],
\ ['nLeftrightarrow', '⇎'],
\ ['nleq' , '≰'],
\ ['nleqq' , '≰'],
\ ['nless' , '≮'],
\ ['nmid' , '∤'],
\ ['notin' , '∉'],
\ ['nparallel' , '∦'],
\ ['nprec' , '⊀'],
\ ['nrightarrow' , '↛'],
\ ['nRightarrow' , '⇏'],
\ ['nsim' , '≁'],
\ ['nsucc' , '⊁'],
\ ['ntriangleleft' , '⋪'],
\ ['ntrianglelefteq', '⋬'],
\ ['ntriangleright' , '⋫'],
\ ['ntrianglerighteq', '⋭'],
\ ['nvdash' , '⊬'],
\ ['nvDash' , '⊭'],
\ ['nVdash' , '⊮'],
\ ['nwarrow' , '↖'],
\ ['odot' , '⊙'],
\ ['oint' , '∮'],
@ -868,15 +782,9 @@ if has("conceal") && &enc == 'utf-8'
\ ['parallel' , '║'],
\ ['partial' , '∂'],
\ ['perp' , '⊥'],
\ ['pitchfork' , '⋔'],
\ ['pm' , '±'],
\ ['prec' , '≺'],
\ ['precapprox' , '⪷'],
\ ['preccurlyeq' , '≼'],
\ ['preceq' , '⪯'],
\ ['precnapprox' , '⪹'],
\ ['precneqq' , '⪵'],
\ ['precsim' , '≾'],
\ ['prime' , ''],
\ ['prod' , '∏'],
\ ['propto' , '∝'],
@ -888,13 +796,8 @@ if has("conceal") && &enc == 'utf-8'
\ ['right\\}' , '}'],
\ ['rightarrow' , '→'],
\ ['Rightarrow' , '⇒'],
\ ['rightarrowtail' , '↣'],
\ ['rightleftharpoons', '⇌'],
\ ['rightsquigarrow', '↝'],
\ ['rightthreetimes', '⋌'],
\ ['risingdotseq' , '≓'],
\ ['rmoustache' , '╮'],
\ ['rtimes' , '⋊'],
\ ['S' , '§'],
\ ['searrow' , '↘'],
\ ['setminus' , ''],
@ -903,7 +806,6 @@ if has("conceal") && &enc == 'utf-8'
\ ['simeq' , '⋍'],
\ ['smile' , '‿'],
\ ['spadesuit' , '♠'],
\ ['sphericalangle' , '∢'],
\ ['sqcap' , '⊓'],
\ ['sqcup' , '⊔'],
\ ['sqsubset' , '⊏'],
@ -912,60 +814,30 @@ if has("conceal") && &enc == 'utf-8'
\ ['sqsupseteq' , '⊒'],
\ ['star' , '✫'],
\ ['subset' , '⊂'],
\ ['Subset' , '⋐'],
\ ['subseteq' , '⊆'],
\ ['subseteqq' , '⫅'],
\ ['subsetneq' , '⊊'],
\ ['subsetneqq' , '⫋'],
\ ['succ' , '≻'],
\ ['succapprox' , '⪸'],
\ ['succcurlyeq' , '≽'],
\ ['succeq' , '⪰'],
\ ['succnapprox' , '⪺'],
\ ['succneqq' , '⪶'],
\ ['succsim' , '≿'],
\ ['sum' , '∑'],
\ ['supset' , '⊃'],
\ ['Supset' , '⋑'],
\ ['supseteq' , '⊇'],
\ ['supseteqq' , '⫆'],
\ ['supsetneq' , '⊋'],
\ ['supsetneqq' , '⫌'],
\ ['surd' , '√'],
\ ['swarrow' , '↙'],
\ ['therefore' , '∴'],
\ ['times' , '×'],
\ ['to' , '→'],
\ ['top' , ''],
\ ['triangle' , '∆'],
\ ['triangleleft' , '⊲'],
\ ['trianglelefteq' , '⊴'],
\ ['triangleq' , '≜'],
\ ['triangleright' , '⊳'],
\ ['trianglerighteq', '⊵'],
\ ['twoheadleftarrow', '↞'],
\ ['twoheadrightarrow', '↠'],
\ ['ulcorner' , '⌜'],
\ ['uparrow' , '↑'],
\ ['Uparrow' , '⇑'],
\ ['updownarrow' , '↕'],
\ ['Updownarrow' , '⇕'],
\ ['urcorner' , '⌝'],
\ ['varnothing' , '∅'],
\ ['vartriangle' , '∆'],
\ ['vdash' , '⊢'],
\ ['vDash' , '⊨'],
\ ['Vdash' , '⊩'],
\ ['vdots' , '⋮'],
\ ['vee' , ''],
\ ['veebar' , '⊻'],
\ ['Vvdash' , '⊪'],
\ ['wedge' , '∧'],
\ ['wp' , '℘'],
\ ['wr' , '≀']]
" \ ['jmath' , 'X']
" \ ['uminus' , 'X']
" \ ['uplus' , 'X']
if &ambw == "double" || exists("g:tex_usedblwidth")
let s:texMathList= s:texMathList + [
\ ['right\\rangle' , '〉'],

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