Compare commits

...

87 Commits

Author SHA1 Message Date
Bram Moolenaar
1fca5f3e86 patch 8.2.4416: Vim9: using a script-local function requires using "s:"
Problem:    Vim9: using a script-local function requires using "s:" when
            setting 'completefunc'.
Solution:   Do not require "s:" in Vim9 script. (closes #9796)
2022-02-18 17:50:47 +00:00
Bram Moolenaar
b8fb5bb68d patch 8.2.4415: function argument name conflicts with C++ keyword
Problem:    Function argument name conflicts with C++ keyword.
Solution:   Rename the argument.
2022-02-18 13:56:38 +00:00
=?UTF-8?q?Dundar=20G=C3=B6c?=
97b231541d patch 8.2.4414: solidity files are not recognized
Problem:    Solidity files are not recognized.
Solution:   Add the *.sol pattern. (Dundar Goc, closes #9792)
2022-02-18 13:45:55 +00:00
Bram Moolenaar
56acd1f8ed patch 8.2.4413: Vim9: Coverity warns for using NULL pointer
Problem:    Vim9: Coverity warns for using NULL pointer.
Solution:   Give an internal error when funcref function can't be found.
2022-02-18 13:24:52 +00:00
Bram Moolenaar
0257599036 patch 8.2.4412: translation cleanup script does not remove empty lines at end
Problem:    Translation cleanup script does not remove empty lines at end.
Solution:   Remove empty lines at the end. (Ken Takata, closes #9794)
2022-02-18 11:28:29 +00:00
=?UTF-8?q?Dundar=20G=C3=B6c?=
8e5ba693ad patch 8.2.4411: bicep files are not recognized
Problem:    Bicep files are not recognized.
Solution:   Match *.bicep files. (Dundar Goc, closes #9791)
2022-02-17 21:30:26 +00:00
Bram Moolenaar
0c7f2610de patch 8.2.4410: Vim9: some code not covered by tests
Problem:    Vim9: some code not covered by tests.
Solution:   Add a few more tests. Remove dead code.
2022-02-17 19:44:07 +00:00
Bram Moolenaar
6296d1e60e patch 8.2.4409: Vim9: some code not covered by tests
Problem:    Vim9: some code not covered by tests.
Solution:   Add a few more tests.  Fix reported line number.
2022-02-17 16:30:11 +00:00
Bram Moolenaar
ea5c898b5f patch 8.2.4408: Vim9: some code not covered by tests
Problem:    Vim9: some code not covered by tests.
Solution:   Add a few more tests.  Correct error message.  Allow unlet on dict
            with a number key.
2022-02-17 14:42:02 +00:00
Bram Moolenaar
e08be09a08 patch 8.2.4407: Vim9: some code not covered by tests
Problem:    Vim9: some code not covered by tests.
Solution:   Add more tests.  Avoid giving two errors.  Remove dead code.
2022-02-17 13:08:26 +00:00
Yegappan Lakshmanan
2438430863 patch 8.2.4406: expand functions use confusing argument names
Problem:    Expand functions use confusing argument names.
Solution:   Rename "file" to "match".  Refactor some completion code.  Add a
            few more tests. (Yegappan Lakshmanan, closes #9790)
2022-02-17 11:26:42 +00:00
Bram Moolenaar
8329ab79b2 patch 8.2.4405: compiler warning for unused variable without +folding
Problem:    Compiler warning for unused variable without the +folding feature.
            (Tony Mechelynck)
Solution:   Add #ifdef.
2022-02-16 21:51:00 +00:00
Bram Moolenaar
cd1cda2f87 patch 8.2.4404: Vim9: some code not covered by tests
Problem:    Vim9: some code not covered by tests.
Solution:   Add a few specific test cases.
2022-02-16 21:48:25 +00:00
Bram Moolenaar
9437737833 patch 8.2.4403: ml_get error with nested folds and deleting lines
Problem:    ml_get error with nested folds and deleting lines.
Solution:   Correct the last line number before calling hasFoldingWin().
2022-02-16 20:30:52 +00:00
kylo252
ae6f1d8b14 patch 8.2.4402: missing parenthesis may cause unexpected problems
Problem:    Missing parenthesis may cause unexpected problems.
Solution:   Add more parenthesis is macros. (closes #9788)
2022-02-16 19:24:07 +00:00
Bram Moolenaar
d288eaad84 patch 8.2.4401: map listing does not clear the rest of the command line
Problem:    Map listing does not clear the rest of the command line.
Solution:   Call msg_clear_eos(). (closes #5623, closes #5962)
2022-02-16 18:27:55 +00:00
zeertzjq
646bb7247a patch 8.2.4400: MS-Windows: cannot use the mouse in the console with VIMDLL
Problem:    MS-Windows: cannot use the mouse in the console with VIMDLL.
Solution:   use add_char2buf() instead of fix_input_buffer(). (closes #9784,
            closes #9769)
2022-02-16 17:51:47 +00:00
Bram Moolenaar
f9435e49ef patch 8.2.4399: crash after ml_get error
Problem:    Crash after ml_get error.
Solution:   When returning "???" flush the line and set ml_line_lnum.
2022-02-16 16:33:28 +00:00
Yegappan Lakshmanan
b31aec3b93 patch 8.2.4398: some command completion functions are too long
Problem:    Some command completion functions are too long.
Solution:   Refactor code into separate functions.  Add a few more tests.
            (Yegappan Lakshmanan, closes #9785)
2022-02-16 12:44:29 +00:00
Bram Moolenaar
34f8117dec patch 8.2.4397: crash when using many composing characters in error message
Problem:    Crash when using many composing characters in error message.
Solution:   Use mb_cptr2char_adv() instead of mb_ptr2char_adv().
2022-02-16 12:16:19 +00:00
Bram Moolenaar
f5288c5895 patch 8.2.4396: Python3 test fails
Problem:    Python3 test fails.
Solution:   Remove "let".
2022-02-15 21:33:29 +00:00
Bram Moolenaar
8b716f5f22 patch 8.2.4395: some code lines not covered by tests
Problem:    Some code lines not covered by tests.
Solution:   Add a few more test cases.  Fix getting more than one error for
            invalid assignment.
2022-02-15 21:17:56 +00:00
Bram Moolenaar
9fdde7992a patch 8.2.4394: UTF8 select mode test fails on MS-Windows
Problem:    UTF8 select mode test fails on MS-Windows.
Solution:   Revert the #ifdef change.
2022-02-15 19:52:56 +00:00
Bram Moolenaar
6b43471da4 patch 8.2.4393: possible number overflow with nested folds
Problem:    Possible number overflow with nested folds.
Solution:   Avoid a negative line number.
2022-02-15 19:15:22 +00:00
Bram Moolenaar
64d95cfc56 patch 8.2.4392: MS-Windows with VIMDLL: Escaping CSI is wrong
Problem:    MS-Windows with VIMDLL: Escaping CSI is wrong.
Solution:   Put back #ifdef. (Ken Takata, closes #9769)
2022-02-15 17:17:18 +00:00
Bram Moolenaar
0e1f36fc59 patch 8.2.4391: command line executed when typing Esc in the GUI
Problem:    Command line executed when typing Esc in the GUI.
Solution:   Move saving/restoring KeyTyped to build_stl_str_hl().
            (closes #9783)
2022-02-15 16:17:44 +00:00
Bram Moolenaar
e88c6b7a5d patch 8.2.4390: Vim9: list from declaration with inferred type not set
Problem:    Vim9: list from declaration with inferred type does not set the
            type on the value.
Solution:   When inferring the type in a variable declaration also set the
            type of the list or dictionary. (closes #9705)  Do not set the
            type when the member is "any".
2022-02-15 15:37:11 +00:00
Bram Moolenaar
4556a2e868 patch 8.2.4389: screenpos() does not handle a position in a closed fold
Problem:    screenpos() does not handle a position in a closed fold.
Solution:   Check if the position is inside a closed fold. (closes #9778)
2022-02-15 13:40:17 +00:00
zeertzjq
7745f14ef3 patch 8.2.4388: dead code in op_insert()
Problem:    Dead code in op_insert().
Solution:   Remove condition and else block. (closes #9782)
2022-02-15 11:48:22 +00:00
Yegappan Lakshmanan
e3846cf1eb patch 8.2.4387: command line completion doesn't always work properly
Problem:    Command line completion doesn't always work properly.
Solution:   Adjust triggering after a "|".  Add more tests. (Yegappan
            Lakshmanan, closes #9779)
2022-02-15 11:35:54 +00:00
Bram Moolenaar
8991be2ab4 patch 8.2.4386: still cannot build tiny version
Problem:    Still cannot build tiny version.
Solution:   Adjust #ifdefs.
2022-02-14 21:51:46 +00:00
Bram Moolenaar
b5d2039e00 patch 8.2.4385: cannot build tiny version
Problem:    Cannot build tiny version.
Solution:   Adjust #ifdefs.
2022-02-14 21:42:15 +00:00
Bram Moolenaar
bc51006402 patch 8.2.4384: Vim9: error message not tested, some code not tested
Problem:    Vim9: error message not tested, some code not tested.
Solution:   Add a couple of test cases.  Give an error for a command modifier
            without a command.
2022-02-14 21:19:04 +00:00
Bram Moolenaar
7a3b802bab patch 8.2.4383: Vim9: unused code lines
Problem:    Vim9: unused code lines.
Solution:   Rely on either "cctx" or "cstack" to not be NULL.
2022-02-14 19:53:03 +00:00
Bram Moolenaar
e4835bf340 patch 8.2.4382: a custom 'tabline' may cause Esc to work like Enter
Problem:    A custom 'tabline' may cause Esc to work like Enter on the
            command line when the popup menu is displayed.
Solution:   Save and restore KeyTyped. (closes #9776)
2022-02-14 19:17:53 +00:00
Bram Moolenaar
0e76714e90 patch 8.2.4381: translation file listed twice
Problem:    Translation file listed twice.
Solution:   Remove one entry.
2022-02-14 15:59:05 +00:00
Ada
774e55702f patch 8.2.4380: small differences between Chinese translation files
Problem:    Small differences between Chinese translation files.
Solution:   Add rule for converting UTF-8 to gb2312. (closes #9773)
2022-02-14 15:04:55 +00:00
Bram Moolenaar
55737c2a31 patch 8.2.4379: an empty change is reported to a listener
Problem:    An empty change is reported to a listener.
Solution:   Do not report an empty change. (closes #9768)  Remove unused
            return value.
2022-02-14 14:51:22 +00:00
Christian Brabandt
6dd7424c7e patch 8.2.4378: incsearch HL broken when calling searchcount in 'tabLine'
Problem:    Incsearch highlight broken when calling searchcount() in 'tabLine'
            function. (Mirko Palmer)
Solution:   Save and restore the incsearch state. (Christian Brabandt,
            closes #9763, closes #9633)
2022-02-14 12:44:32 +00:00
ichizok
0cd3e94e2c patch 8.2.4377: CI steps for Windows are a bit unorganized
Problem:    CI steps for Windows are a bit unorganized.
Solution:   Organize CI test steps on Windows. (Ozaki Kiichi, closes #9764)
2022-02-14 11:36:57 +00:00
Yegappan Lakshmanan
9773db6f9b patch 8.2.4376: not enough tests for command line completion
Problem:    Not enough tests for command line completion.
Solution:   Add a few more tests. (Yegappan Lakshmanan, closes #9771)
2022-02-14 11:10:59 +00:00
Bram Moolenaar
4b1d963972 patch 8.2.4375: ctx_imports is not used
Problem:    ctx_imports is not used.
Solution:   Delete ctx_imports.  Add missing dependency.
2022-02-13 21:51:08 +00:00
Bram Moolenaar
0631bb4ed7 patch 8.2.4374: unreachable code
Problem:    Unreachable code.
Solution:   Remove outdated code lines.
2022-02-13 21:20:21 +00:00
Bram Moolenaar
c87aa34dfd patch 8.2.4373: expression test fails
Problem:    Expression test fails.
Solution:   Make the test work with latest Vim9 syntax.
2022-02-13 20:46:18 +00:00
Bram Moolenaar
299d8e5eec patch 8.2.4372: filetype detection from file contents is in legacy script
Problem:    Filetype detection from file contents is in legacy script.
Solution:   Use a compiled function for filetype detection.
2022-02-13 20:32:02 +00:00
Bram Moolenaar
75e27d78f5 patch 8.2.4371: Vim9: can create a script variable from a legacy function
Problem:    Vim9: can create a script variable from a legacy function.
Solution:   Disallow creating a script variable from a function.
2022-02-13 13:56:29 +00:00
Christian Brabandt
cf6ad8ea8c patch 8.2.4370: MS-Windows: libsodium.dll not included with the installer
Problem:    MS-Windows: libsodium.dll not included with the installer.
Solution:   Add the file to the installer if it exists. (Christian Brabandt,
            closes #9762)
2022-02-13 13:11:32 +00:00
ola.soder@axis.com
f7fbeed0ac patch 8.2.4369: redundant #ifdef argument
Problem:    Redundant #ifdef argument.
Solution:   Remove unused MSWIN. (Ola Söder, closes #9758)
2022-02-13 12:24:21 +00:00
ola.soder@axis.com
e131496ebf patch 8.2.4368: Amiga: a few compiler warnings
Problem:    Amiga: a few compiler warnings.
Solution:   Adjust #ifdefs. Add "UNUSED". (Ola Söder, closes #9756,
            closes #9757)
2022-02-13 12:13:38 +00:00
Bram Moolenaar
4525a57afb patch 8.2.4367: calling in_vim9script() multiple times
Problem:    Calling in_vim9script() multiple times.
Solution:   Call it once and keep the result.
2022-02-13 11:57:33 +00:00
Yegappan Lakshmanan
4d03d87000 patch 8.2.4366: not enough tests for command line completion
Problem:    Not enough tests for command line completion.
Solution:   Add a few more tests. (Yegappan Lakshmanan, closes #9760)
2022-02-13 11:45:09 +00:00
Bram Moolenaar
cdf0485969 patch 8.2.4365: sticky command modifiers are too sticky
Problem:    sticky command modifiers are too sticky.
Solution:   Do not apply command modifiers to a called function. (closes #9751)
2022-02-12 22:13:06 +00:00
Bram Moolenaar
4549166078 patch 8.2.4364: MS-Windows: still running out of memory for a very long line
Problem:    MS-Windows: still running out of memory for a very long line.
Solution:   Check for negative length.
2022-02-12 21:59:51 +00:00
Bram Moolenaar
8e38555ece patch 8.2.4363: MS-Windows: running out of memory for a very long line
Problem:    MS-Windows: running out of memory for a very long line.
Solution:   Use a 32 bit value for MAXCOL also when ints are 64 bits.
2022-02-12 21:16:21 +00:00
Bram Moolenaar
33f3c59854 patch 8.2.4362: :retab may allocate too much memory
Problem:    :retab may allocate too much memory.
Solution:   Bail out when allocating more than MAXCOL bytes.
2022-02-12 20:46:15 +00:00
Bram Moolenaar
62b191c387 patch 8.2.4361: Vim9: some tests fail
Problem:    Vim9: some tests fail.
Solution:   Fix the tests, mostly by removing "s:".
2022-02-12 20:34:50 +00:00
Bram Moolenaar
a749a42ed2 patch 8.2.4360: Vim9: allowing use of "s:" leads to inconsistencies
Problem:    Vim9: allowing use of "s:" leads to inconsistencies.
Solution:   Disallow using "s:" in Vim9 script at the script level.
2022-02-12 19:52:25 +00:00
Bram Moolenaar
6e28703a8e patch 8.2.4359: crash when repeatedly using :retab
Problem:    crash when repeatedly using :retab.
Solution:   Bail out when the line is getting too long.
2022-02-12 15:42:18 +00:00
Bram Moolenaar
90a57168a4 patch 8.2.4358: Vim9: line number of exception is not set
Problem:    Vim9: line number of exception is not set.
Solution:   Set the line number before throwing an exception. (closes #9755)
2022-02-12 14:23:17 +00:00
Bram Moolenaar
2a9b62dfa2 patch 8.2.4357: sticky command modifiers are too sticky
Problem:    sticky command modifiers are too sticky.
Solution:   Do not apply command modifiers to a sourced script. (closes #9751)
2022-02-12 13:30:17 +00:00
Yegappan Lakshmanan
620d8edba0 patch 8.2.4356: command line completion functions are very long
Problem:    Command line completion functions are very long.
Solution:   Refactor into multiple functions. (Yegappan Lakshmanan,
            closes #9753)
2022-02-12 12:03:07 +00:00
Sean Dewar
0f7ff851cb patch 8.2.4355: unnecessary call to check_colorcolumn()
Problem:    Unnecessary call to check_colorcolumn().
Solution:   Remove the call. (Sean Dewar, closes #9748)
2022-02-12 11:51:25 +00:00
K.Takata
d68b2fc034 patch 8.2.4354: dynamic loading of libsodium not handled properly
Problem:    Dynamic loading of libsodium not handled properly.
Solution:   Fix has() and :version. Show an error message when loading fails.
            Fix memory leaks. (Ken Takata, closes #9754)
2022-02-12 11:18:37 +00:00
Philip H
18f7593e57 patch 8.2.4353: CI does not use the latest Lua and Python
Problem:    CI does not use the latest Lua and Python.
Solution:   Use Lua 5.4.2 and Python 3.10. (closes #9744)
2022-02-12 10:53:07 +00:00
Ananda Umamil
0c3cc2fec3 patch 8.2.4352: ReScript files are not recognized
Problem:    ReScript files are not recognized.
Solution:   Add the *.res and *.resi patterns. (Ananda Umamil, closes #9752)
2022-02-12 10:33:56 +00:00
ichizok
41ee5b1913 patch 8.2.4351: no coverage is measured on MS-Windows CI
Problem:    No coverage is measured on MS-Windows CI.
Solution:   Enable coverage on MS-Windows. (Ozaki Kiichi, closes #9750)
2022-02-12 10:13:13 +00:00
ola.soder@axis.com
29c70f612f patch 8.2.4350: FEAT_GUI_ENABLED defined but never used
Problem:    FEAT_GUI_ENABLED defined but never used.
Solution:   Remove the #define. (Ola Söder, closes #9732)
2022-02-11 21:13:35 +00:00
Bram Moolenaar
c9e3187d05 patch 8.2.4349: FileChangedShell test fails on MS-Windows
Problem:    FileChangedShell test fails on MS-Windows.
Solution:   Skip the test on MS-Windows.
2022-02-11 20:55:16 +00:00
Bram Moolenaar
5b1d6e98c6 patch 8.2.4348: "legacy exe cmd" does not do what one would expect
Problem:    "legacy exe cmd" does not do what one would expect.
Solution:   Apply the "legacy" and "vim9script" command modifiers to the
            argument of ":execute".
2022-02-11 20:33:48 +00:00
ola.soder@axis.com
bd89d44063 patch 8.2.4347: in some build setups UNUSED is not defined
Problem:    In some build setups UNUSED is not defined.
Solution:   Change the logic of how UNUSED is defined. (Ola Söder,
            closes #9734)
2022-02-11 19:27:55 +00:00
Bram Moolenaar
481acb1141 patch 8.2.4346: a custom statusline may cause Esc to work like Enter
Problem:    A custom statusline may cause Esc to work like Enter on the
            command line when the popup menu is displayed.
Solution:   Save and restore KeyTyped. (closes #9749)
2022-02-11 18:51:45 +00:00
Bram Moolenaar
f6246f51e3 patch 8.2.4345: <amatch> is expanded like a file name for DirChangedPre
Problem:    <amatch> is expanded like a file name for DirChangedPre.
Solution:   Do not expand <amatch>. (closes #9742)  Also for the User event.
2022-02-11 16:30:12 +00:00
ola.soder@axis.com
14f23122bf patch 8.2.4344: Amiga: header file included twice
Problem:    Amiga: header file included twice.
Solution:   Remove #include. (Ola Söder, closes #9733)
2022-02-11 16:11:14 +00:00
Rob Pilling
8196e94a8b patch 8.2.4343: when reloading not all properties are detected
Problem:    When reloading not all properties are detected.
Solution:   Add the "edit" value to v:fcs_choice. (Rob Pilling, closes #9579)
2022-02-11 15:12:10 +00:00
Bram Moolenaar
92f645bef7 Update runtime files. (closes #9741) 2022-02-11 13:29:40 +00:00
ichizok
bece72785d patch 8.2.4342: CI will soon switch to other windows version
Problem:    CI will soon switch to other windows version.
Solution:   Use "windows-2019" instead of "windows-latest". (Ozaki Kiichi,
            closes #9740)
2022-02-11 11:09:40 +00:00
Bram Moolenaar
414acd342f patch 8.2.4341: command line not redrawn when finishing popup menu
Problem:    Command line not redrawn when finishing popup menu and the screen
            has scrolled up.
Solution:   Redraw the command line after updating the screen. (closes #9722)
2022-02-10 21:09:45 +00:00
ola.soder@axis.com
949b35d83b patch 8.2.4340: Amiga: mch_can_exe() is not implemented
Problem:    Amiga: mch_can_exe() is not implemented.
Solution:   Implement mch_can_exe() for Amiga OS 4. (Ola Söder, closes #9731)
2022-02-10 20:21:04 +00:00
Yegappan Lakshmanan
560dff49c0 patch 8.2.4339: CTRL-A does not work properly with the cmdline popup menu
Problem:    CTRL-A does not work properly with the cmdline popup menu.
Solution:   Fix issues with CTRL-A.  Add more tests for the cmdline popup
            menu.  Remove TermWait() before VeriryScreenDump().  Refactor the
            cmdline popup code. (Yegappan Lakshmanan, closes #9735)
2022-02-10 19:52:10 +00:00
Bram Moolenaar
74a0a5b26d patch 8.2.4338: an error from an expression mapping messes up the display
Problem:    An error from an expression mapping messes up the display.
Solution:   When the expression results in an empty string return K_IGNORE.
            In cmdline mode redraw the command line. (closes #9726)
2022-02-10 14:07:41 +00:00
Bram Moolenaar
9da17d7c57 Update runtime files 2022-02-09 21:50:44 +00:00
=?UTF-8?q?Dundar=20G=C3=B6c?=
78a8404f8b patch 8.2.4337: part of condition is always true
Problem:    Part of condition is always true.
Solution:   Remove that part of the condition. (closes #9729)
2022-02-09 15:20:39 +00:00
Bram Moolenaar
769f5895eb patch 8.2.4336: using :filter for :scriptnames does not work
Problem:    Using :filter for :scriptnames does not work. (Ben Jackson)
Solution:   Call message_filtered(). (closes #9720)
2022-02-09 14:31:05 +00:00
Bram Moolenaar
28e8f73ae2 patch 8.2.4335: no autocommand event triggered before changing directory
Problem:    No autocommand event triggered before changing directory. (Ronnie
            Magatti)
Solution:   Add DirChangedPre. (closes #9721)
2022-02-09 12:58:20 +00:00
rbtnn
68cc2b8a37 patch 8.2.4334: command line popup menu not positioned correctly
Problem:    Command line popup menu not positioned correctly.
Solution:   Also use vim_strsize() on the existing text. (Naruhiko Nishino,
            closes #9727)
2022-02-09 11:55:47 +00:00
Bram Moolenaar
b6a138eb33 patch 8.2.4333: cstack not always passed to where it is needed
Problem:    cstack not always passed to where it is needed.
Solution:   Pass ctack through functions.
2022-02-08 21:17:22 +00:00
Bram Moolenaar
dce2441a60 patch 8.2.4332: Vim9: incomplete test for existing script variable in block
Problem:    Vim9: incomplete test for existing script variable in block.
Solution:   Add a couple more tests.  Fix uncovered problem.
2022-02-08 20:35:30 +00:00
211 changed files with 5023 additions and 2747 deletions

View File

@@ -225,7 +225,7 @@ jobs:
do_test make ${SHADOWOPT} ${TEST}
# - name: Coveralls
# if: matrix.coverage && success() && github.event_name != 'pull_request'
# if: matrix.coverage && github.event_name != 'pull_request'
# env:
# COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
# COVERALLS_PARALLEL: true
@@ -238,21 +238,21 @@ jobs:
# ~/.local/bin/coveralls -b "${SRCDIR}" -x .xs -e "${SRCDIR}"/if_perl.c -e "${SRCDIR}"/xxd -e "${SRCDIR}"/libvterm --encodings utf-8
- name: Generate gcov files
if: matrix.coverage && success()
if: matrix.coverage
run: |
cd "${SRCDIR}"
find . -type f -name '*.gcno' -exec gcov -pb {} + || true
- name: Codecov
if: matrix.coverage && success()
if: matrix.coverage
uses: codecov/codecov-action@v2
with:
flags: ${{ matrix.features }}-${{ matrix.compiler }}-${{ matrix.extra }}
flags: linux,${{ matrix.features }}-${{ matrix.compiler }}-${{ matrix.extra }}
- name: ASan logs
if: contains(matrix.extra, 'asan') && !cancelled()
run: |
for f in $(grep -lR '#[[:digit:]]* *0x[[:digit:]a-fA-F]*' "${LOG_DIR}"); do
for f in $(grep -lR '#[[:digit:]]* *0x[[:xdigit:]]*' "${LOG_DIR}"); do
asan_symbolize -l "$f"
false # in order to fail a job
done
@@ -344,15 +344,14 @@ jobs:
make ${TEST}
windows:
runs-on: windows-latest
runs-on: windows-2019
env:
VCVARSALL: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat
# Interfaces
# Lua
LUA_VER: 54
LUA_VER_DOT: '5.4'
LUA_RELEASE: 5.4.0
LUA_RELEASE: 5.4.2
LUA32_URL: https://downloads.sourceforge.net/luabinaries/lua-%LUA_RELEASE%_Win32_dllw6_lib.zip
LUA64_URL: https://downloads.sourceforge.net/luabinaries/lua-%LUA_RELEASE%_Win64_dllw6_lib.zip
LUA_DIR: D:\Lua
@@ -360,8 +359,8 @@ jobs:
PYTHON_VER: 27
PYTHON_VER_DOT: '2.7'
# Python 3
PYTHON3_VER: 38
PYTHON3_VER_DOT: '3.8'
PYTHON3_VER: 310
PYTHON3_VER_DOT: '3.10'
# Other dependencies
# winpty
WINPTY_URL: https://github.com/rprichard/winpty/releases/download/0.4.3/winpty-0.4.3-msvc2015.zip
@@ -392,6 +391,10 @@ jobs:
msystem: MINGW32
cygreg: registry32
pyreg: "-32"
- toolchain: mingw
arch: x64
features: HUGE
coverage: yes
exclude:
- toolchain: msvc
arch: x64
@@ -406,6 +409,7 @@ jobs:
shell: bash
run: |
git config --global core.autocrlf input
echo "VCVARSALL=$(vswhere -products \* -latest -property installationPath)\\VC\\Auxiliary\\Build\\vcvarsall.bat" >> $GITHUB_ENV
python_dir=$(cat "/proc/${{ matrix.cygreg }}/HKEY_LOCAL_MACHINE/SOFTWARE/Python/PythonCore/${PYTHON_VER_DOT}/InstallPath/@")
python3_dir=$(cat "/proc/${{ matrix.cygreg }}/HKEY_LOCAL_MACHINE/SOFTWARE/Python/PythonCore/${PYTHON3_VER_DOT}${{ matrix.pyreg }}/InstallPath/@")
echo "PYTHON_DIR=$python_dir" >> $GITHUB_ENV
@@ -463,8 +467,7 @@ jobs:
- name: Copy src directory to src2
shell: cmd
run: |
xcopy src src2\ /E > nul
run: xcopy src src2\ /E > nul
- name: Build (MSVC)
if: matrix.toolchain == 'msvc'
@@ -501,7 +504,7 @@ jobs:
DYNAMIC_LUA=yes LUA=${LUA_DIR} \
DYNAMIC_PYTHON=yes PYTHON=${PYTHON_DIR} \
DYNAMIC_PYTHON3=yes PYTHON3=${PYTHON3_DIR} \
STATIC_STDCPLUS=yes
STATIC_STDCPLUS=yes COVERAGE=${{ matrix.coverage }}
else
mingw32-make -f Make_ming.mak -j2 \
FEATURES=${{ matrix.features }} \
@@ -509,6 +512,10 @@ jobs:
STATIC_STDCPLUS=yes
fi
- name: Check version
shell: cmd
run: src\vim --version || exit 1
#- name: Prepare Artifact
# shell: cmd
# run: |
@@ -522,29 +529,34 @@ jobs:
# name: vim${{ matrix.bits }}-${{ matrix.toolchain }}
# path: ./artifacts
- name: Test
- name: Copy gcov data files to src2
if: matrix.coverage
shell: msys2 {0}
run: find src -name '*.gcno' | tar -c -T - | tar -x -C src2 --strip-components 1
- name: Test and show the result of testing gVim
shell: cmd
timeout-minutes: 20
run: |
PATH %LUA_DIR%;C:\msys64\${{ matrix.msystem }}\bin;%PATH%;%PYTHON3_DIR%
call "%VCVARSALL%" ${{ matrix.vcarch }}
cd src
echo.
echo ::group::%COL_GREEN%Vim version:%COL_RESET%
.\vim --version || exit 1
echo ::endgroup::
echo %COL_GREEN%Start testing vim in background.%COL_RESET%
start cmd /c "cd ..\src2\testdir & nmake -nologo -f Make_dos.mak VIMPROG=..\..\src\vim > nul & echo done>done.txt"
echo %COL_GREEN%Start testing Vim in background.%COL_RESET%
start cmd /c "cd src2\testdir & nmake -nologo -f Make_dos.mak VIMPROG=..\..\src\vim > nul & echo done>done.txt"
echo ::group::%COL_GREEN%Test gvim:%COL_RESET%
cd testdir
echo %COL_GREEN%Test gVim:%COL_RESET%
cd src\testdir
nmake -nologo -f Make_dos.mak VIMPROG=..\gvim || exit 1
cd ..
echo ::endgroup::
echo %COL_GREEN%Wait for vim tests to finish.%COL_RESET%
cd ..\src2\testdir
- name: Show the result of testing Vim
shell: cmd
timeout-minutes: 20
run: |
PATH %LUA_DIR%;C:\msys64\${{ matrix.msystem }}\bin;%PATH%;%PYTHON3_DIR%
call "%VCVARSALL%" ${{ matrix.vcarch }}
echo %COL_GREEN%Wait for Vim tests to finish.%COL_RESET%
cd src2\testdir
:: Wait about 10 minutes.
for /L %%i in (1,1,60) do (
if exist done.txt goto exitloop
@@ -554,11 +566,35 @@ jobs:
set timeout=1
:exitloop
echo ::group::%COL_GREEN%Test results of vim:%COL_RESET%
echo %COL_GREEN%The result of testing Vim:%COL_RESET%
cd src2\testdir
if exist messages type messages
nmake -nologo -f Make_dos.mak report VIMPROG=..\..\src\vim || exit 1
if "%timeout%"=="1" (
echo %COL_RED%Timed out.%COL_RESET%
exit 1
)
echo ::endgroup::
- name: Generate gcov files
if: matrix.coverage
shell: msys2 {0}
run: |
cd src
find . -type f -name '*.gcno' -exec gcov -pb {} + || true
cd ../src2
find . -type f -name '*.gcno' -exec gcov -pb {} + || true
- name: Codecov (gVim)
if: matrix.coverage
uses: codecov/codecov-action@v2
with:
directory: src
flags: windows,${{ matrix.toolchain }}-${{ matrix.arch }}-${{ matrix.features }}-gui
- name: Codecov (Vim)
if: matrix.coverage
uses: codecov/codecov-action@v2
with:
directory: src2
flags: windows,${{ matrix.toolchain }}-${{ matrix.arch }}-${{ matrix.features }}

View File

@@ -347,6 +347,9 @@ Section "$(str_section_exe)" id_section_exe
File /oname=gvim.exe ${VIMSRC}\gvim_ole.exe
!if /FileExists "${VIMSRC}\vim${BIT}.dll"
File ${VIMSRC}\vim${BIT}.dll
!endif
!if /FileExists "${VIMRT}\libsodium.dll"
File ${VIMRT}\libsodium.dll
!endif
File /oname=install.exe ${VIMSRC}\installw32.exe
File /oname=uninstall.exe ${VIMSRC}\uninstallw32.exe

426
runtime/autoload/dist/script.vim vendored Normal file
View File

@@ -0,0 +1,426 @@
vim9script
# Vim function for detecting a filetype from the file contents.
# Invoked from "scripts.vim" in 'runtimepath'
#
# Maintainer: Bram Moolenaar <Bram@vim.org>
# Last Change: 2022 Feb 13
export def DetectFiletype()
var line1 = getline(1)
if line1[0] == '#' && line1[1] == '!'
# File that starts with "#!".
DetectFromHashBang(line1)
else
# File does not start with "#!".
DetectFromText(line1)
endif
enddef
# Called for a script that has "#!" in the first line.
def DetectFromHashBang(firstline: string)
var line1 = firstline
# Check for a line like "#!/usr/bin/env {options} bash". Turn it into
# "#!/usr/bin/bash" to make matching easier.
# Recognize only a few {options} that are commonly used.
if line1 =~ '^#!\s*\S*\<env\s'
line1 = substitute(line1, '\S\+=\S\+', '', 'g')
line1 = substitute(line1, '\(-[iS]\|--ignore-environment\|--split-string\)', '', '')
line1 = substitute(line1, '\<env\s\+', '', '')
endif
# Get the program name.
# Only accept spaces in PC style paths: "#!c:/program files/perl [args]".
# If the word env is used, use the first word after the space:
# "#!/usr/bin/env perl [path/args]"
# If there is no path use the first word: "#!perl [path/args]".
# Otherwise get the last word after a slash: "#!/usr/bin/perl [path/args]".
var name: string
if line1 =~ '^#!\s*\a:[/\\]'
name = substitute(line1, '^#!.*[/\\]\(\i\+\).*', '\1', '')
elseif line1 =~ '^#!.*\<env\>'
name = substitute(line1, '^#!.*\<env\>\s\+\(\i\+\).*', '\1', '')
elseif line1 =~ '^#!\s*[^/\\ ]*\>\([^/\\]\|$\)'
name = substitute(line1, '^#!\s*\([^/\\ ]*\>\).*', '\1', '')
else
name = substitute(line1, '^#!\s*\S*[/\\]\(\i\+\).*', '\1', '')
endif
# tcl scripts may have #!/bin/sh in the first line and "exec wish" in the
# third line. Suggested by Steven Atkinson.
if getline(3) =~ '^exec wish'
name = 'wish'
endif
# Bourne-like shell scripts: bash bash2 ksh ksh93 sh
if name =~ '^\(bash\d*\|\|ksh\d*\|sh\)\>'
call dist#ft#SetFileTypeSH(line1)
# csh scripts
elseif name =~ '^csh\>'
if exists("g:filetype_csh")
call dist#ft#SetFileTypeShell(g:filetype_csh)
else
call dist#ft#SetFileTypeShell("csh")
endif
# tcsh scripts
elseif name =~ '^tcsh\>'
call dist#ft#SetFileTypeShell("tcsh")
# Z shell scripts
elseif name =~ '^zsh\>'
set ft=zsh
# TCL scripts
elseif name =~ '^\(tclsh\|wish\|expectk\|itclsh\|itkwish\)\>'
set ft=tcl
# Expect scripts
elseif name =~ '^expect\>'
set ft=expect
# Gnuplot scripts
elseif name =~ '^gnuplot\>'
set ft=gnuplot
# Makefiles
elseif name =~ 'make\>'
set ft=make
# Pike
elseif name =~ '^pike\%(\>\|[0-9]\)'
set ft=pike
# Lua
elseif name =~ 'lua'
set ft=lua
# Perl
elseif name =~ 'perl'
set ft=perl
# PHP
elseif name =~ 'php'
set ft=php
# Python
elseif name =~ 'python'
set ft=python
# Groovy
elseif name =~ '^groovy\>'
set ft=groovy
# Raku
elseif name =~ 'raku'
set ft=raku
# Ruby
elseif name =~ 'ruby'
set ft=ruby
# JavaScript
elseif name =~ 'node\(js\)\=\>\|js\>' || name =~ 'rhino\>'
set ft=javascript
# BC calculator
elseif name =~ '^bc\>'
set ft=bc
# sed
elseif name =~ 'sed\>'
set ft=sed
# OCaml-scripts
elseif name =~ 'ocaml'
set ft=ocaml
# Awk scripts; also finds "gawk"
elseif name =~ 'awk\>'
set ft=awk
# Website MetaLanguage
elseif name =~ 'wml'
set ft=wml
# Scheme scripts
elseif name =~ 'scheme'
set ft=scheme
# CFEngine scripts
elseif name =~ 'cfengine'
set ft=cfengine
# Erlang scripts
elseif name =~ 'escript'
set ft=erlang
# Haskell
elseif name =~ 'haskell'
set ft=haskell
# Scala
elseif name =~ 'scala\>'
set ft=scala
# Clojure
elseif name =~ 'clojure'
set ft=clojure
# Free Pascal
elseif name =~ 'instantfpc\>'
set ft=pascal
# Fennel
elseif name =~ 'fennel\>'
set ft=fennel
# MikroTik RouterOS script
elseif name =~ 'rsc\>'
set ft=routeros
# Fish shell
elseif name =~ 'fish\>'
set ft=fish
# Gforth
elseif name =~ 'gforth\>'
set ft=forth
endif
enddef
# Called for a script that does not have "#!" in the first line.
def DetectFromText(line1: string)
var line2 = getline(2)
var line3 = getline(3)
var line4 = getline(4)
var line5 = getline(5)
# Bourne-like shell scripts: sh ksh bash bash2
if line1 =~ '^:$'
call dist#ft#SetFileTypeSH(line1)
# Z shell scripts
elseif line1 =~ '^#compdef\>'
|| line1 =~ '^#autoload\>'
|| "\n" .. line1 .. "\n" .. line2 .. "\n" .. line3 ..
"\n" .. line4 .. "\n" .. line5
=~ '\n\s*emulate\s\+\%(-[LR]\s\+\)\=[ckz]\=sh\>'
set ft=zsh
# ELM Mail files
elseif line1 =~ '^From \([a-zA-Z][a-zA-Z_0-9\.=-]*\(@[^ ]*\)\=\|-\) .* \(19\|20\)\d\d$'
set ft=mail
# Mason
elseif line1 =~ '^<[%&].*>'
set ft=mason
# Vim scripts (must have '" vim' as the first line to trigger this)
elseif line1 =~ '^" *[vV]im$'
set ft=vim
# libcxx and libstdc++ standard library headers like "iostream" do not have
# an extension, recognize the Emacs file mode.
elseif line1 =~? '-\*-.*C++.*-\*-'
set ft=cpp
# MOO
elseif line1 =~ '^\*\* LambdaMOO Database, Format Version \%([1-3]\>\)\@!\d\+ \*\*$'
set ft=moo
# Diff file:
# - "diff" in first line (context diff)
# - "Only in " in first line
# - "--- " in first line and "+++ " in second line (unified diff).
# - "*** " in first line and "--- " in second line (context diff).
# - "# It was generated by makepatch " in the second line (makepatch diff).
# - "Index: <filename>" in the first line (CVS file)
# - "=== ", line of "=", "---", "+++ " (SVK diff)
# - "=== ", "--- ", "+++ " (bzr diff, common case)
# - "=== (removed|added|renamed|modified)" (bzr diff, alternative)
# - "# HG changeset patch" in first line (Mercurial export format)
elseif line1 =~ '^\(diff\>\|Only in \|\d\+\(,\d\+\)\=[cda]\d\+\>\|# It was generated by makepatch \|Index:\s\+\f\+\r\=$\|===== \f\+ \d\+\.\d\+ vs edited\|==== //\f\+#\d\+\|# HG changeset patch\)'
|| (line1 =~ '^--- ' && line2 =~ '^+++ ')
|| (line1 =~ '^\* looking for ' && line2 =~ '^\* comparing to ')
|| (line1 =~ '^\*\*\* ' && line2 =~ '^--- ')
|| (line1 =~ '^=== ' && ((line2 =~ '^=\{66\}' && line3 =~ '^--- ' && line4 =~ '^+++') || (line2 =~ '^--- ' && line3 =~ '^+++ ')))
|| (line1 =~ '^=== \(removed\|added\|renamed\|modified\)')
set ft=diff
# PostScript Files (must have %!PS as the first line, like a2ps output)
elseif line1 =~ '^%![ \t]*PS'
set ft=postscr
# M4 scripts: Guess there is a line that starts with "dnl".
elseif line1 =~ '^\s*dnl\>'
|| line2 =~ '^\s*dnl\>'
|| line3 =~ '^\s*dnl\>'
|| line4 =~ '^\s*dnl\>'
|| line5 =~ '^\s*dnl\>'
set ft=m4
# AmigaDos scripts
elseif $TERM == "amiga" && (line1 =~ "^;" || line1 =~? '^\.bra')
set ft=amiga
# SiCAD scripts (must have procn or procd as the first line to trigger this)
elseif line1 =~? '^ *proc[nd] *$'
set ft=sicad
# Purify log files start with "**** Purify"
elseif line1 =~ '^\*\*\*\* Purify'
set ft=purifylog
# XML
elseif line1 =~ '<?\s*xml.*?>'
set ft=xml
# XHTML (e.g.: PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN")
elseif line1 =~ '\<DTD\s\+XHTML\s'
set ft=xhtml
# HTML (e.g.: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN")
# Avoid "doctype html", used by slim.
elseif line1 =~? '<!DOCTYPE\s\+html\>'
set ft=html
# PDF
elseif line1 =~ '^%PDF-'
set ft=pdf
# XXD output
elseif line1 =~ '^\x\{7}: \x\{2} \=\x\{2} \=\x\{2} \=\x\{2} '
set ft=xxd
# RCS/CVS log output
elseif line1 =~ '^RCS file:' || line2 =~ '^RCS file:'
set ft=rcslog
# CVS commit
elseif line2 =~ '^CVS:' || getline("$") =~ '^CVS: '
set ft=cvs
# Prescribe
elseif line1 =~ '^!R!'
set ft=prescribe
# Send-pr
elseif line1 =~ '^SEND-PR:'
set ft=sendpr
# SNNS files
elseif line1 =~ '^SNNS network definition file'
set ft=snnsnet
elseif line1 =~ '^SNNS pattern definition file'
set ft=snnspat
elseif line1 =~ '^SNNS result file'
set ft=snnsres
# Virata
elseif line1 =~ '^%.\{-}[Vv]irata'
|| line2 =~ '^%.\{-}[Vv]irata'
|| line3 =~ '^%.\{-}[Vv]irata'
|| line4 =~ '^%.\{-}[Vv]irata'
|| line5 =~ '^%.\{-}[Vv]irata'
set ft=virata
# Strace
elseif line1 =~ '[0-9:.]* *execve(' || line1 =~ '^__libc_start_main'
set ft=strace
# VSE JCL
elseif line1 =~ '^\* $$ JOB\>' || line1 =~ '^// *JOB\>'
set ft=vsejcl
# TAK and SINDA
elseif line4 =~ 'K & K Associates' || line2 =~ 'TAK 2000'
set ft=takout
elseif line3 =~ 'S Y S T E M S I M P R O V E D '
set ft=sindaout
elseif getline(6) =~ 'Run Date: '
set ft=takcmp
elseif getline(9) =~ 'Node File 1'
set ft=sindacmp
# DNS zone files
elseif line1 .. line2 .. line3 .. line4 =~ '^; <<>> DiG [0-9.]\+.* <<>>\|$ORIGIN\|$TTL\|IN\s\+SOA'
set ft=bindzone
# BAAN
elseif line1 =~ '|\*\{1,80}' && line2 =~ 'VRC '
|| line2 =~ '|\*\{1,80}' && line3 =~ 'VRC '
set ft=baan
# Valgrind
elseif line1 =~ '^==\d\+== valgrind' || line3 =~ '^==\d\+== Using valgrind'
set ft=valgrind
# Go docs
elseif line1 =~ '^PACKAGE DOCUMENTATION$'
set ft=godoc
# Renderman Interface Bytestream
elseif line1 =~ '^##RenderMan'
set ft=rib
# Scheme scripts
elseif line1 =~ 'exec\s\+\S*scheme' || line2 =~ 'exec\s\+\S*scheme'
set ft=scheme
# Git output
elseif line1 =~ '^\(commit\|tree\|object\) \x\{40,\}\>\|^tag \S\+$'
set ft=git
# Gprof (gnu profiler)
elseif line1 == 'Flat profile:'
&& line2 == ''
&& line3 =~ '^Each sample counts as .* seconds.$'
set ft=gprof
# Erlang terms
# (See also: http://www.gnu.org/software/emacs/manual/html_node/emacs/Choosing-Modes.html#Choosing-Modes)
elseif line1 =~? '-\*-.*erlang.*-\*-'
set ft=erlang
# YAML
elseif line1 =~ '^%YAML'
set ft=yaml
# MikroTik RouterOS script
elseif line1 =~ '^#.*by RouterOS.*$'
set ft=routeros
# Sed scripts
# #ncomment is allowed but most likely a false positive so require a space
# before any trailing comment text
elseif line1 =~ '^#n\%($\|\s\)'
set ft=sed
else
var lnum = 1
while getline(lnum) =~ "^? " && lnum < line("$")
lnum += 1
endwhile
if getline(lnum) =~ '^Index:\s\+\f\+$'
# CVS diff
set ft=diff
# locale input files: Formal Definitions of Cultural Conventions
# filename must be like en_US, fr_FR@euro or en_US.UTF-8
elseif expand("%") =~ '\a\a_\a\a\($\|[.@]\)\|i18n$\|POSIX$\|translit_'
lnum = 1
while lnum < 100 && lnum < line("$")
if getline(lnum) =~ '^LC_\(IDENTIFICATION\|CTYPE\|COLLATE\|MONETARY\|NUMERIC\|TIME\|MESSAGES\|PAPER\|TELEPHONE\|MEASUREMENT\|NAME\|ADDRESS\)$'
setf fdcc
break
endif
lnum += 1
endwhile
endif
endif
enddef

View File

@@ -1,4 +1,4 @@
*autocmd.txt* For Vim version 8.2. Last change: 2022 Jan 21
*autocmd.txt* For Vim version 8.2. Last change: 2022 Feb 09
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -326,6 +326,7 @@ Name triggered by ~
|FileChangedRO| before making the first change to a read-only file
|DiffUpdated| after diffs have been updated
|DirChangedPre| before the working directory will change
|DirChanged| after the working directory has changed
|ShellCmdPost| after executing a shell command
@@ -738,6 +739,11 @@ 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|.
*DirChangedPre*
DirChangedPre The working directory is going to be changed,
as with |DirChanged|. The pattern is like
with |DirChanged|. The new directory can be
found in v:event.directory.
*DirChanged*
DirChanged The working directory has changed in response
to the |:cd| or |:tcd| or |:lcd| commands, or

View File

@@ -1,4 +1,4 @@
*builtin.txt* For Vim version 8.2. Last change: 2022 Feb 04
*builtin.txt* For Vim version 8.2. Last change: 2022 Feb 08
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -4670,9 +4670,11 @@ islocked({expr}) *islocked()* *E786*
:echo islocked('alist') " 1
:echo islocked('alist[1]') " 0
< When {expr} is a variable that does not exist you get an error
message. Use |exists()| to check for existence.
In Vim9 script it does not work for local variables.
< When {expr} is a variable that does not exist -1 is returned.
If {expr} uses a range, list or dict index that is out of
range or does not exist you get an error message. Use
|exists()| to check for existence.
In Vim9 script it does not work for local function variables.
Can also be used as a |method|: >
GetName()->islocked()

View File

@@ -1650,6 +1650,11 @@ If you don't get warned often enough you can use the following command.
if it exists now.
Once a file has been checked the timestamp is reset,
you will not be warned again.
Syntax highlighting, marks, diff status,
'fileencoding', 'fileformat' and 'binary' options
are not changed. See |v:fcs_choice| to reload these
too (for example, if a code formatting tools has
changed the file).
:[N]checkt[ime] {filename}
:[N]checkt[ime] [N]

View File

@@ -2070,6 +2070,11 @@ v:fcs_choice What should happen after a |FileChangedShell| event was
do with the affected buffer:
reload Reload the buffer (does not work if
the file was deleted).
edit Reload the buffer and detect the
values for options such as
'fileformat', 'fileencoding', 'binary'
(does not work if the file was
deleted).
ask Ask the user what to do, as if there
was no autocommand. Except that when
only the timestamp changed nothing

View File

@@ -1,4 +1,4 @@
*if_pyth.txt* For Vim version 8.2. Last change: 2021 Nov 12
*if_pyth.txt* For Vim version 8.2. Last change: 2022 Feb 07
VIM REFERENCE MANUAL by Paul Moore
@@ -65,7 +65,7 @@ There is no need to import sys, it's done by default.
*python-environment*
Environment variables set in Vim are not always available in Python. This
depends on how Vim and Python were build. Also see
depends on how Vim and Python were built. Also see
https://docs.python.org/3/library/os.html#os.environ
Note: Python is very sensitive to the indenting. Make sure the "class" line
@@ -834,6 +834,19 @@ To work around such problems there are these options:
Raising SystemExit exception in python isn't endorsed way to quit vim, use: >
:py vim.command("qall!")
<
*E1266*
This error can occur when python 3 cannot load the required modules. This
means that your python 3 is not correctly installed or there are some mistakes
in your settings. Please check the following items:
1. Make sure that python 3 is correctly installed. Also check the version of
python.
2. Check the 'pythonthreedll' option.
3. Check the 'pythonthreehome' option.
4. Check the PATH environment variable if you don't set 'pythonthreedll'.
On MS-Windows, you can use where.exe to check which dll will be loaded.
E.g. >
where.exe python310.dll
5. Check the PYTHONPATH and PYTHONHOME environment variables.
*has-python*
You can test what Python version is available with: >

View File

@@ -1,4 +1,4 @@
*index.txt* For Vim version 8.2. Last change: 2022 Jan 28
*index.txt* For Vim version 8.2. Last change: 2022 Feb 09
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1152,7 +1152,7 @@ tag command action ~
|:&| :& repeat last ":substitute"
|:star| :* execute contents of a register
|:<| :< shift lines one 'shiftwidth' left
|:=| := print the cursor line number
|:=| := print the last line number
|:>| :> shift lines one 'shiftwidth' right
|:@| :@ execute contents of a register
|:@@| :@@ repeat the previous ":@"

View File

@@ -1,4 +1,4 @@
*options.txt* For Vim version 8.2. Last change: 2022 Feb 04
*options.txt* For Vim version 8.2. Last change: 2022 Feb 08
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -383,12 +383,22 @@ lambda it will be converted to the name, e.g. "<lambda>123". Examples:
set opfunc=function('MyOpFunc')
set opfunc=funcref('MyOpFunc')
set opfunc={a\ ->\ MyOpFunc(a)}
" set using a funcref variable
Set to a script-local function: >
set opfunc=s:MyLocalFunc
set opfunc=<SID>MyLocalFunc
In |Vim9| script the "s:" and "<SID>" can be omitted if the function exists in
the script: >
set opfunc=MyLocalFunc
Set using a funcref variable: >
let Fn = function('MyTagFunc')
let &tagfunc = Fn
" set using a lambda expression
Set using a lambda expression: >
let &tagfunc = {t -> MyTagFunc(t)}
" set using a variable with lambda expression
Set using a variable with lambda expression: >
let L = {a, b, c -> MyTagFunc(a, b , c)}
let &tagfunc = L

View File

@@ -1,4 +1,4 @@
*quickfix.txt* For Vim version 8.2. Last change: 2022 Jan 04
*quickfix.txt* For Vim version 8.2. Last change: 2022 Feb 08
VIM REFERENCE MANUAL by Bram Moolenaar

View File

@@ -1,4 +1,4 @@
*syntax.txt* For Vim version 8.2. Last change: 2022 Feb 04
*syntax.txt* For Vim version 8.2. Last change: 2022 Feb 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -3713,12 +3713,13 @@ DEFINING CASE *:syn-case* *E390*
items until the next ":syntax case" command are affected.
:sy[ntax] case
Show either "syntax case match" or "syntax case ignore" (translated).
Show either "syntax case match" or "syntax case ignore".
DEFINING FOLDLEVEL *:syn-foldlevel*
:sy[ntax] foldlevel [start | minimum]
:sy[ntax] foldlevel start
:sy[ntax] foldlevel minimum
This defines how the foldlevel of a line is computed when using
foldmethod=syntax (see |fold-syntax| and |:syn-fold|):
@@ -3731,13 +3732,16 @@ DEFINING FOLDLEVEL *:syn-foldlevel*
may close and open horizontally within a line.
:sy[ntax] foldlevel
Show either "syntax foldlevel start" or "syntax foldlevel minimum".
Show the current foldlevel method, either "syntax foldlevel start" or
"syntax foldlevel minimum".
{not meaningful when Vim was compiled without |+folding| feature}
SPELL CHECKING *:syn-spell*
:sy[ntax] spell [toplevel | notoplevel | default]
:sy[ntax] spell toplevel
:sy[ntax] spell notoplevel
:sy[ntax] spell default
This defines where spell checking is to be done for text that is not
in a syntax item:
@@ -3752,8 +3756,8 @@ SPELL CHECKING *:syn-spell*
To activate spell checking the 'spell' option must be set.
:sy[ntax] spell
Show either "syntax spell toplevel", "syntax spell notoplevel" or
"syntax spell default" (translated).
Show the current syntax spell checking method, either "syntax spell
toplevel", "syntax spell notoplevel" or "syntax spell default".
SYNTAX ISKEYWORD SETTING *:syn-iskeyword*
@@ -4352,7 +4356,7 @@ IMPLICIT CONCEAL *:syn-conceal-implicit*
given explicitly.
:sy[ntax] conceal
Show either "syntax conceal on" or "syntax conceal off" (translated).
Show either "syntax conceal on" or "syntax conceal off".
==============================================================================
8. Syntax patterns *:syn-pattern* *E401* *E402*

View File

@@ -3948,6 +3948,7 @@ Dictionary-function eval.txt /*Dictionary-function*
DiffUpdated autocmd.txt /*DiffUpdated*
Digraphs digraph.txt /*Digraphs*
DirChanged autocmd.txt /*DirChanged*
DirChangedPre autocmd.txt /*DirChangedPre*
E motion.txt /*E*
E10 message.txt /*E10*
E100 diff.txt /*E100*
@@ -4234,6 +4235,7 @@ E1262 vim9.txt /*E1262*
E1263 eval.txt /*E1263*
E1264 vim9.txt /*E1264*
E1265 eval.txt /*E1265*
E1266 if_pyth.txt /*E1266*
E127 eval.txt /*E127*
E128 eval.txt /*E128*
E129 eval.txt /*E129*

View File

@@ -1,4 +1,4 @@
*testing.txt* For Vim version 8.2. Last change: 2022 Feb 04
*testing.txt* For Vim version 8.2. Last change: 2022 Feb 10
VIM REFERENCE MANUAL by Bram Moolenaar

View File

@@ -1,4 +1,4 @@
*todo.txt* For Vim version 8.2. Last change: 2022 Feb 04
*todo.txt* For Vim version 8.2. Last change: 2022 Feb 11
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -38,9 +38,18 @@ browser use: https://github.com/vim/vim/issues/1234
*known-bugs*
-------------------- Known bugs and current work -----------------------
Disallow using "s:" in Vim9 script at the script level.
Disallow a legacy function creating an s: variable in Vim9 script.
Once Vim9 is stable:
- Check code coverage, add more tests if needed.
- Use Vim9 for runtime files.
- Check code coverage, add more tests if needed.
vim9compile.c
vim9execute.c
vim9expr.c
vim9instr.c
vim9script.c
vim9type.c
Further Vim9 improvements, possibly after launch:
- Check performance with callgrind and kcachegrind.
@@ -4834,9 +4843,6 @@ Autocommands:
CursorHoldC - CursorHold while command-line editing
WinMoved - when windows have been moved around, e.g, ":wincmd J"
SearchPost - After doing a search command (e.g. to do "M")
PreDirChanged/PostDirChanged
- Before/after ":cd" has been used (for changing the
window title)
ShutDown - when the system is about to shut down
InsertCharPost - user typed a character in Insert mode, after inserting
the char.

View File

@@ -1,4 +1,4 @@
*uganda.txt* For Vim version 8.2. Last change: 2022 Feb 04
*uganda.txt* For Vim version 8.2. Last change: 2022 Feb 05
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -223,7 +223,7 @@ Canada: Contact Kuwasha in Surrey, Canada. They take care of the
forwards 100% of the money to the project in Uganda. You can
send them a one time donation directly.
Please send me a note so that I know what has been donated
because of Vim. Look on their for information about
because of Vim. Look on their site for information about
sponsorship: https://www.kuwasha.net/
If you make a donation to Kuwasha you will receive a tax
receipt which can be submitted with your tax return.
@@ -248,7 +248,7 @@ Credit Card: You can use PayPal to send money with a Credit card. This is
The e-mail address for sending the money to is:
Bram@iccf-holland.org
Others: Transfer to one of these accounts if possible:
Others: Transfer to this account if possible:
ING bank: IBAN: NL95 INGB 0004 5487 74
Swift code: INGBNL2A
under the name "stichting ICCF Holland", Amersfoort

View File

@@ -1,4 +1,4 @@
*usr_41.txt* For Vim version 8.2. Last change: 2022 Jan 28
*usr_41.txt* For Vim version 8.2. Last change: 2022 Feb 11
VIM USER MANUAL - by Bram Moolenaar
@@ -2512,6 +2512,8 @@ continuation, as mentioned above |use-cpo-save|.
For undoing the effect of an indent script, the b:undo_indent variable should
be set accordingly.
Both these variables use legacy script syntax, not |Vim9| syntax.
FILE NAME

View File

@@ -1,4 +1,4 @@
*vim9.txt* For Vim version 8.2. Last change: 2022 Feb 04
*vim9.txt* For Vim version 8.2. Last change: 2022 Feb 11
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -57,13 +57,13 @@ rewrite old scripts, they keep working as before. You may want to use a few
`:def` functions for code that needs to be fast.
:vim9[cmd] {cmd} *:vim9* *:vim9cmd* *E1164*
Execute {cmd} using Vim9 script syntax and semantics.
Useful when typing a command and in a legacy script or
function.
Evaluate and execute {cmd} using Vim9 script syntax and
semantics. Useful when typing a command and in a legacy
script or function.
:leg[acy] {cmd} *:leg* *:legacy* *E1189* *E1234*
Execute {cmd} using legacy script syntax and semantics. Only
useful in a Vim9 script or a :def function.
Evaluate and execute {cmd} using legacy script syntax and
semantics. Only useful in a Vim9 script or a :def function.
Note that {cmd} cannot use local variables, since it is parsed
with legacy expression syntax.
@@ -219,20 +219,18 @@ be given.
Functions and variables are script-local by default ~
*vim9-scopes*
When using `:function` or `:def` to specify a new function at the script level
in a Vim9 script, the function is local to the script, as if "s:" was
prefixed. Using the "s:" prefix is optional. To define a global function or
variable the "g:" prefix must be used. For functions in an autoload script
the "name#" prefix is sufficient. >
in a Vim9 script, the function is local to the script. Like prefixing "s:" in
legacy script. To define a global function or variable the "g:" prefix must
be used. For functions in a script that is to be imported and in an autoload
script "export" needs to be used. >
def ThisFunction() # script-local
def s:ThisFunction() # script-local
def g:ThatFunction() # global
def scriptname#function() # autoload
export def Function() # for import and import autoload
< *E1058* *E1075*
When using `:function` or `:def` to specify a nested function inside a `:def`
function and no namespace was given, this nested function is local to the code
block it is defined in. In a `:def` function it is not possible to define a
script-local function. It is possible to define a global function by using
the "g:" prefix.
block it is defined in. It is not possible to define a script-local function.
It is possible to define a global function by using the "g:" prefix.
When referring to a function and no "s:" or "g:" prefix is used, Vim will
search for the function:
@@ -244,6 +242,13 @@ start with an upper case letter even when using the "s:" prefix. In legacy
script "s:funcref" could be used, because it could not be referred to with
"funcref". In Vim9 script it can, therefore "s:Funcref" must be used to avoid
that the name interferes with builtin functions.
*vim9-s-namespace*
The use of the "s:" prefix is not supported at the Vim9 script level. All
functions and variables without a prefix are script-local.
In :def functions the use of "s:" is optional. This is because in legacy
script the "s:" might be needed. Disallowing the use of "s:" only in a :def
function in Vim9 script would be a bit confusing.
In legacy functions the use of "s:" for script items is required, as before.
In all cases the function must be defined before used. That is when it is
called, when `:defcompile` causes it to be compiled, or when code that calls
@@ -280,7 +285,9 @@ You want to use this in scripts that use a `finish` command to bail out at
some point when loaded again. E.g. when a buffer local option is set: >
vim9script noclear
setlocal completefunc=SomeFunc
if exists('*g:SomeFunc') | finish | endif
if exists('*g:SomeFunc')
finish
endif
def g:SomeFunc()
....
@@ -1398,14 +1405,24 @@ Results in:
For script-local variables in Vim9 script the type is checked, also when the
variable was declared in a legacy function.
When a type has been declared this is attached to a list or string. When
When a type has been declared this is attached to a List or Dictionary. When
later some expression attempts to change the type an error will be given: >
var ll: list<number> = [1, 2, 3]
ll->extend(['x']) # Error, 'x' is not a number
If the type is inferred then the type is allowed to change: >
If the type is not declared then it is allowed to change: >
[1, 2, 3]->extend(['x']) # result: [1, 2, 3, 'x']
For a variable declaration an inferred type matters: >
var ll = [1, 2, 3]
ll->extend(['x']) # Error, 'x' is not a number
That is because the declaration looks like a list of numbers, thus is
equivalent to: >
var ll: list<number> = [1, 2, 3]
If you do want a more permissive list you need to declare the type: >
var ll: list<any = [1, 2, 3]
ll->extend(['x']) # OK
Stricter type checking ~
*type-checking*

View File

@@ -44,7 +44,7 @@ endif
" file name matches ft_ignore_pat.
" When using this, the entry should probably be further down below with the
" other StarSetf() calls.
func! s:StarSetf(ft)
func s:StarSetf(ft)
if expand("<amatch>") !~ g:ft_ignore_pat
exe 'setf ' . a:ft
endif
@@ -229,6 +229,9 @@ au BufNewFile,BufRead *.bib setf bib
" BibTeX Bibliography Style
au BufNewFile,BufRead *.bst setf bst
" Bicep
au BufNewFile,BufRead *.bicep setf bicep
" BIND configuration
" sudoedit uses namedXXXX.conf
au BufNewFile,BufRead named*.conf,rndc*.conf,rndc*.key setf named
@@ -1547,6 +1550,9 @@ au BufNewFile,BufRead *.r,*.R call dist#ft#FTr()
" Remind
au BufNewFile,BufRead .reminders,*.remind,*.rem setf remind
" ReScript
au BufNewFile,BufRead *.res,*.resi setf rescript
" Resolv.conf
au BufNewFile,BufRead resolv.conf setf resolv
@@ -1789,6 +1795,9 @@ au BufNewFile,BufRead *.mib,*.my setf mib
au BufNewFile,BufRead *.hog,snort.conf,vision.conf setf hog
au BufNewFile,BufRead *.rules call dist#ft#FTRules()
" Solidity
au BufRead,BufNewFile *.sol setf solidity
" SPARQL queries
au BufNewFile,BufRead *.rq,*.sparql setf sparql
@@ -2513,7 +2522,7 @@ endif
" Function called for testing all functions defined here. These are
" script-local, thus need to be executed here.
" Returns a string with error messages (hopefully empty).
func! TestFiletypeFuncs(testlist)
func TestFiletypeFuncs(testlist)
let output = ''
for f in a:testlist
try

View File

@@ -1,20 +1,28 @@
" Vim support file to switch on loading plugins for file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last change: 2022 Feb 04
vim9script noclear
if exists("did_load_ftplugin")
# Vim support file to switch on loading plugins for file types
#
# Maintainer: Bram Moolenaar <Bram@vim.org>
# Last change: 2022 Feb 11
if exists("g:did_load_ftplugin")
finish
endif
let did_load_ftplugin = 1
g:did_load_ftplugin = 1
augroup filetypeplugin
au FileType * call s:LoadFTPlugin()
au FileType * call LoadFTPlugin()
augroup END
def s:LoadFTPlugin()
if exists('*LoadFTPlugin')
# No need to define the function again.
finish
endif
def LoadFTPlugin()
if exists("b:undo_ftplugin")
exe b:undo_ftplugin
# We assume b:undo_ftplugin is using legacy script syntax
legacy exe b:undo_ftplugin
unlet! b:undo_ftplugin b:did_ftplugin
endif

View File

@@ -1,13 +1,15 @@
" Vim support file to switch off loading plugins for file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2011 Oct 20
vim9script
if exists("did_load_ftplugin")
unlet did_load_ftplugin
# Vim support file to switch off loading plugins for file types
#
# Maintainer: Bram Moolenaar <Bram@vim.org>
# Last Change: 2022 Feb 09
if exists("g:did_load_ftplugin")
unlet g:did_load_ftplugin
endif
" Remove all autocommands in the filetypeplugin group, if any exist.
# Remove all autocommands in the filetypeplugin group, if any exist.
if exists("#filetypeplugin")
silent! au! filetypeplugin *
endif

View File

@@ -1,7 +1,7 @@
" Vim support file to switch on loading indent files for file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2022 Feb 04
" Last Change: 2022 Feb 11
if exists("did_indent_on")
finish
@@ -14,7 +14,7 @@ augroup END
def s:LoadIndent()
if exists("b:undo_indent")
exe b:undo_indent
legacy exe b:undo_indent
unlet! b:undo_indent b:did_indent
endif
var s = expand("<amatch>")

View File

@@ -1201,8 +1201,8 @@ an 50.710 &Syntax.Co&lor\ Test :sp $VIMRUNTIME/syntax/colortest.vim<Bar>so %<CR
an 50.720 &Syntax.&Highlight\ Test :runtime syntax/hitest.vim<CR>
an 50.730 &Syntax.&Convert\ to\ HTML :runtime syntax/2html.vim<CR>
" Uncomment this to compile the functions early to find any mistakes
defcompile
" Uncomment the next line to compile the functions early to find any mistakes
" defcompile
endif " !exists("did_install_syntax_menu")

View File

@@ -7,51 +7,57 @@
" Attached is a Vim script file for turning gvim into a shell script editor.
" It may also be used as an example how to use menus in Vim.
"
" Written by: Lennart Schultz <les@dmi.min.dk>
" Maintainer: Ada (Haowen) Yu <me@yuhaowen.com>
" Original author: Lennart Schultz <les@dmi.min.dk> (mail unreachable)
imenu Stmts.for for in
do
doneki kk0elli
imenu Stmts.case case in
) ;;
" Make sure the '<' and 'C' flags are not included in 'cpoptions', otherwise
" <CR> would not be recognized. See ":help 'cpoptions'".
let s:cpo_save = &cpo
set cpo&vim
imenu Stmts.for for in <CR>do<CR><CR>done<esc>ki <esc>kk0elli
imenu Stmts.case case in<CR>) ;;<CR>esac<esc>bki <esc>k0elli
imenu Stmts.if if <CR>then<CR><CR>fi<esc>ki <esc>kk0elli
imenu Stmts.if-else if <CR>then<CR><CR>else<CR><CR>fi<esc>ki <esc>kki <esc>kk0elli
imenu Stmts.elif elif <CR>then<CR><CR><esc>ki <esc>kk0elli
imenu Stmts.while while do<CR><CR>done<esc>ki <esc>kk0elli
imenu Stmts.break break
imenu Stmts.continue continue
then
imenu Stmts.function () {<CR><CR>}<esc>ki <esc>k0i
imenu Stmts.return return
imenu Stmts.return-true return 0
imenu Stmts.return-false return 1
imenu Stmts.exit exit
imenu Stmts.shift shift
imenu Stmts.trap trap
fiki kki kk0elli
imenu Stmts.elif elif
then
ki kk0elli
imenu Stmts.while while
do
doneki kk0elli
imenu Stmts.break break
imenu Stmts.continue continue
imenu Stmts.function () {
}ki k0i
imenu Stmts.return return
imenu Stmts.return-true return 0
imenu Stmts.return-false return 1
imenu Stmts.exit exit
imenu Stmts.shift shift
imenu Stmts.trap trap
imenu Test.existence [ -e ]hi
imenu Test.existence - file [ -f ]hi
imenu Test.existence - file (not empty) [ -s ]hi
imenu Test.existence - directory [ -d ]hi
imenu Test.existence - executable [ -x ]hi
imenu Test.existence - readable [ -r ]hi
imenu Test.existence - writable [ -w ]hi
imenu Test.existence [ -e ]<esc>hi
imenu Test.existence\ -\ file [ -f ]<esc>hi
imenu Test.existence\ -\ file\ (not\ empty) [ -s ]<esc>hi
imenu Test.existence\ -\ directory [ -d ]<esc>hi
imenu Test.existence\ -\ executable [ -x ]<esc>hi
imenu Test.existence\ -\ readable [ -r ]<esc>hi
imenu Test.existence\ -\ writable [ -w ]<esc>hi
imenu Test.String\ is\ empty [ x = "x$" ]<esc>hhi
imenu Test.String\ is\ not\ empty [ x != "x$" ]<esc>hhi
imenu Test.Strings\ is\ equal [ "" = "" ]<esc>hhhhhhhi
imenu Test.Strings\ is\ not\ equal [ "" != "" ]<esc>hhhhhhhhi
imenu Test.Values\ is\ greater\ than [ -gt ]<esc>hhhhhhi
imenu Test.Values\ is\ greater\ equal [ -ge ]<esc>hhhhhhi
imenu Test.Values\ is\ equal [ -eq ]<esc>hhhhhhi
imenu Test.Values\ is\ not\ equal [ -ne ]<esc>hhhhhhi
imenu Test.Values\ is\ less\ than [ -lt ]<esc>hhhhhhi
imenu Test.Values\ is\ less\ equal [ -le ]<esc>hhhhhhi
imenu ParmSub.Substitute\ word\ if\ parm\ not\ set ${:-}<esc>hhi
imenu ParmSub.Set\ parm\ to\ word\ if\ not\ set ${:=}<esc>hhi
imenu ParmSub.Substitute\ word\ if\ parm\ set\ else\ nothing ${:+}<esc>hhi
imenu ParmSub.If\ parm\ not\ set\ print\ word\ and\ exit ${:?}<esc>hhi
imenu SpShVars.Number\ of\ positional\ parameters ${#}
imenu SpShVars.All\ positional\ parameters\ (quoted\ spaces) ${*}
imenu SpShVars.All\ positional\ parameters\ (unquoted\ spaces) ${@}
imenu SpShVars.Flags\ set ${-}
imenu SpShVars.Return\ code\ of\ last\ command ${?}
imenu SpShVars.Process\ number\ of\ this\ shell ${$}
imenu SpShVars.Process\ number\ of\ last\ background\ command ${!}
imenu Environ.HOME ${HOME}
imenu Environ.PATH ${PATH}
imenu Environ.CDPATH ${CDPATH}
@@ -82,13 +88,17 @@ imenu Builtins.umask umask
imenu Builtins.wait wait
imenu Set.set set
imenu Set.unset unset
imenu Environ.SHELL ${SHELL}
imenu Environ.LC_CTYPE ${LC_CTYPE}
imenu Environ.LC_MESSAGES ${LC_MESSAGES}
imenu Builtins.cd cd
imenu Builtins.echo echo
imenu Builtins.eval eval
imenu Builtins.exec exec
imenu Builtins.export export
imenu Builtins.getopts getopts
imenu Builtins.hash hash
imenu Set.mark\ modified\ or\ modified\ variables set -a
imenu Set.exit\ when\ command\ returns\ non-zero\ exit\ code set -e
imenu Set.Disable\ file\ name\ generation set -f
imenu Set.remember\ function\ commands set -h
imenu Set.All\ keyword\ arguments\ are\ placed\ in\ the\ environment set -k
imenu Set.Read\ commands\ but\ do\ not\ execute\ them set -n
imenu Set.Exit\ after\ reading\ and\ executing\ one\ command set -t
imenu Set.Treat\ unset\ variables\ as\ an\ error\ when\ substituting set -u
imenu Set.Print\ shell\ input\ lines\ as\ they\ are\ read set -v
imenu Set.Print\ commands\ and\ their\ arguments\ as\ they\ are\ executed set -x
" Restore the previous value of 'cpoptions'.
let &cpo = s:cpo_save
unlet s:cpo_save

View File

@@ -1,7 +1,7 @@
" Vim support file to detect file types in scripts
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last change: 2021 Jan 22
" Last change: 2022 Feb 13
" This file is called by an autocommand for every file that has just been
" loaded into a buffer. It checks if the type of file can be recognized by
@@ -12,7 +12,7 @@
" =~? instead. Do not use =~ anywhere.
" Only do the rest when the FileType autocommand has not been triggered yet.
" Bail out when a FileType autocommand has already set the filetype.
if did_filetype()
finish
endif
@@ -26,422 +26,5 @@ if exists("myscriptsfile") && filereadable(expand(myscriptsfile))
endif
endif
" Line continuation is used here, remove 'C' from 'cpoptions'
let s:cpo_save = &cpo
set cpo&vim
let s:line1 = getline(1)
if s:line1 =~# "^#!"
" A script that starts with "#!".
" Check for a line like "#!/usr/bin/env {options} bash". Turn it into
" "#!/usr/bin/bash" to make matching easier.
" Recognize only a few {options} that are commonly used.
if s:line1 =~# '^#!\s*\S*\<env\s'
let s:line1 = substitute(s:line1, '\S\+=\S\+', '', 'g')
let s:line1 = substitute(s:line1, '\(-[iS]\|--ignore-environment\|--split-string\)', '', '')
let s:line1 = substitute(s:line1, '\<env\s\+', '', '')
endif
" Get the program name.
" Only accept spaces in PC style paths: "#!c:/program files/perl [args]".
" If the word env is used, use the first word after the space:
" "#!/usr/bin/env perl [path/args]"
" If there is no path use the first word: "#!perl [path/args]".
" Otherwise get the last word after a slash: "#!/usr/bin/perl [path/args]".
if s:line1 =~# '^#!\s*\a:[/\\]'
let s:name = substitute(s:line1, '^#!.*[/\\]\(\i\+\).*', '\1', '')
elseif s:line1 =~# '^#!.*\<env\>'
let s:name = substitute(s:line1, '^#!.*\<env\>\s\+\(\i\+\).*', '\1', '')
elseif s:line1 =~# '^#!\s*[^/\\ ]*\>\([^/\\]\|$\)'
let s:name = substitute(s:line1, '^#!\s*\([^/\\ ]*\>\).*', '\1', '')
else
let s:name = substitute(s:line1, '^#!\s*\S*[/\\]\(\i\+\).*', '\1', '')
endif
" tcl scripts may have #!/bin/sh in the first line and "exec wish" in the
" third line. Suggested by Steven Atkinson.
if getline(3) =~# '^exec wish'
let s:name = 'wish'
endif
" Bourne-like shell scripts: bash bash2 ksh ksh93 sh
if s:name =~# '^\(bash\d*\|\|ksh\d*\|sh\)\>'
call dist#ft#SetFileTypeSH(s:line1) " defined in filetype.vim
" csh scripts
elseif s:name =~# '^csh\>'
if exists("g:filetype_csh")
call dist#ft#SetFileTypeShell(g:filetype_csh)
else
call dist#ft#SetFileTypeShell("csh")
endif
" tcsh scripts
elseif s:name =~# '^tcsh\>'
call dist#ft#SetFileTypeShell("tcsh")
" Z shell scripts
elseif s:name =~# '^zsh\>'
set ft=zsh
" TCL scripts
elseif s:name =~# '^\(tclsh\|wish\|expectk\|itclsh\|itkwish\)\>'
set ft=tcl
" Expect scripts
elseif s:name =~# '^expect\>'
set ft=expect
" Gnuplot scripts
elseif s:name =~# '^gnuplot\>'
set ft=gnuplot
" Makefiles
elseif s:name =~# 'make\>'
set ft=make
" Pike
elseif s:name =~# '^pike\%(\>\|[0-9]\)'
set ft=pike
" Lua
elseif s:name =~# 'lua'
set ft=lua
" Perl
elseif s:name =~# 'perl'
set ft=perl
" PHP
elseif s:name =~# 'php'
set ft=php
" Python
elseif s:name =~# 'python'
set ft=python
" Groovy
elseif s:name =~# '^groovy\>'
set ft=groovy
" Raku
elseif s:name =~# 'raku'
set ft=raku
" Ruby
elseif s:name =~# 'ruby'
set ft=ruby
" JavaScript
elseif s:name =~# 'node\(js\)\=\>\|js\>' || s:name =~# 'rhino\>'
set ft=javascript
" BC calculator
elseif s:name =~# '^bc\>'
set ft=bc
" sed
elseif s:name =~# 'sed\>'
set ft=sed
" OCaml-scripts
elseif s:name =~# 'ocaml'
set ft=ocaml
" Awk scripts; also finds "gawk"
elseif s:name =~# 'awk\>'
set ft=awk
" Website MetaLanguage
elseif s:name =~# 'wml'
set ft=wml
" Scheme scripts
elseif s:name =~# 'scheme'
set ft=scheme
" CFEngine scripts
elseif s:name =~# 'cfengine'
set ft=cfengine
" Erlang scripts
elseif s:name =~# 'escript'
set ft=erlang
" Haskell
elseif s:name =~# 'haskell'
set ft=haskell
" Scala
elseif s:name =~# 'scala\>'
set ft=scala
" Clojure
elseif s:name =~# 'clojure'
set ft=clojure
" Free Pascal
elseif s:name =~# 'instantfpc\>'
set ft=pascal
" Fennel
elseif s:name =~# 'fennel\>'
set ft=fennel
" MikroTik RouterOS script
elseif s:name =~# 'rsc\>'
set ft=routeros
" Fish shell
elseif s:name =~# 'fish\>'
set ft=fish
" Gforth
elseif s:name =~# 'gforth\>'
set ft=forth
endif
unlet s:name
else
" File does not start with "#!".
let s:line2 = getline(2)
let s:line3 = getline(3)
let s:line4 = getline(4)
let s:line5 = getline(5)
" Bourne-like shell scripts: sh ksh bash bash2
if s:line1 =~# '^:$'
call dist#ft#SetFileTypeSH(s:line1) " defined in filetype.vim
" Z shell scripts
elseif s:line1 =~# '^#compdef\>' || s:line1 =~# '^#autoload\>' ||
\ "\n".s:line1."\n".s:line2."\n".s:line3."\n".s:line4."\n".s:line5 =~# '\n\s*emulate\s\+\%(-[LR]\s\+\)\=[ckz]\=sh\>'
set ft=zsh
" ELM Mail files
elseif s:line1 =~# '^From \([a-zA-Z][a-zA-Z_0-9\.=-]*\(@[^ ]*\)\=\|-\) .* \(19\|20\)\d\d$'
set ft=mail
" Mason
elseif s:line1 =~# '^<[%&].*>'
set ft=mason
" Vim scripts (must have '" vim' as the first line to trigger this)
elseif s:line1 =~# '^" *[vV]im$'
set ft=vim
" libcxx and libstdc++ standard library headers like "iostream" do not have
" an extension, recognize the Emacs file mode.
elseif s:line1 =~? '-\*-.*C++.*-\*-'
set ft=cpp
" MOO
elseif s:line1 =~# '^\*\* LambdaMOO Database, Format Version \%([1-3]\>\)\@!\d\+ \*\*$'
set ft=moo
" Diff file:
" - "diff" in first line (context diff)
" - "Only in " in first line
" - "--- " in first line and "+++ " in second line (unified diff).
" - "*** " in first line and "--- " in second line (context diff).
" - "# It was generated by makepatch " in the second line (makepatch diff).
" - "Index: <filename>" in the first line (CVS file)
" - "=== ", line of "=", "---", "+++ " (SVK diff)
" - "=== ", "--- ", "+++ " (bzr diff, common case)
" - "=== (removed|added|renamed|modified)" (bzr diff, alternative)
" - "# HG changeset patch" in first line (Mercurial export format)
elseif s:line1 =~# '^\(diff\>\|Only in \|\d\+\(,\d\+\)\=[cda]\d\+\>\|# It was generated by makepatch \|Index:\s\+\f\+\r\=$\|===== \f\+ \d\+\.\d\+ vs edited\|==== //\f\+#\d\+\|# HG changeset patch\)'
\ || (s:line1 =~# '^--- ' && s:line2 =~# '^+++ ')
\ || (s:line1 =~# '^\* looking for ' && s:line2 =~# '^\* comparing to ')
\ || (s:line1 =~# '^\*\*\* ' && s:line2 =~# '^--- ')
\ || (s:line1 =~# '^=== ' && ((s:line2 =~# '^=\{66\}' && s:line3 =~# '^--- ' && s:line4 =~# '^+++') || (s:line2 =~# '^--- ' && s:line3 =~# '^+++ ')))
\ || (s:line1 =~# '^=== \(removed\|added\|renamed\|modified\)')
set ft=diff
" PostScript Files (must have %!PS as the first line, like a2ps output)
elseif s:line1 =~# '^%![ \t]*PS'
set ft=postscr
" M4 scripts: Guess there is a line that starts with "dnl".
elseif s:line1 =~# '^\s*dnl\>'
\ || s:line2 =~# '^\s*dnl\>'
\ || s:line3 =~# '^\s*dnl\>'
\ || s:line4 =~# '^\s*dnl\>'
\ || s:line5 =~# '^\s*dnl\>'
set ft=m4
" AmigaDos scripts
elseif $TERM == "amiga"
\ && (s:line1 =~# "^;" || s:line1 =~? '^\.bra')
set ft=amiga
" SiCAD scripts (must have procn or procd as the first line to trigger this)
elseif s:line1 =~? '^ *proc[nd] *$'
set ft=sicad
" Purify log files start with "**** Purify"
elseif s:line1 =~# '^\*\*\*\* Purify'
set ft=purifylog
" XML
elseif s:line1 =~# '<?\s*xml.*?>'
set ft=xml
" XHTML (e.g.: PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN")
elseif s:line1 =~# '\<DTD\s\+XHTML\s'
set ft=xhtml
" HTML (e.g.: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN")
" Avoid "doctype html", used by slim.
elseif s:line1 =~? '<!DOCTYPE\s\+html\>'
set ft=html
" PDF
elseif s:line1 =~# '^%PDF-'
set ft=pdf
" XXD output
elseif s:line1 =~# '^\x\{7}: \x\{2} \=\x\{2} \=\x\{2} \=\x\{2} '
set ft=xxd
" RCS/CVS log output
elseif s:line1 =~# '^RCS file:' || s:line2 =~# '^RCS file:'
set ft=rcslog
" CVS commit
elseif s:line2 =~# '^CVS:' || getline("$") =~# '^CVS: '
set ft=cvs
" Prescribe
elseif s:line1 =~# '^!R!'
set ft=prescribe
" Send-pr
elseif s:line1 =~# '^SEND-PR:'
set ft=sendpr
" SNNS files
elseif s:line1 =~# '^SNNS network definition file'
set ft=snnsnet
elseif s:line1 =~# '^SNNS pattern definition file'
set ft=snnspat
elseif s:line1 =~# '^SNNS result file'
set ft=snnsres
" Virata
elseif s:line1 =~# '^%.\{-}[Vv]irata'
\ || s:line2 =~# '^%.\{-}[Vv]irata'
\ || s:line3 =~# '^%.\{-}[Vv]irata'
\ || s:line4 =~# '^%.\{-}[Vv]irata'
\ || s:line5 =~# '^%.\{-}[Vv]irata'
set ft=virata
" Strace
elseif s:line1 =~# '[0-9:.]* *execve(' || s:line1 =~# '^__libc_start_main'
set ft=strace
" VSE JCL
elseif s:line1 =~# '^\* $$ JOB\>' || s:line1 =~# '^// *JOB\>'
set ft=vsejcl
" TAK and SINDA
elseif s:line4 =~# 'K & K Associates' || s:line2 =~# 'TAK 2000'
set ft=takout
elseif s:line3 =~# 'S Y S T E M S I M P R O V E D '
set ft=sindaout
elseif getline(6) =~# 'Run Date: '
set ft=takcmp
elseif getline(9) =~# 'Node File 1'
set ft=sindacmp
" DNS zone files
elseif s:line1.s:line2.s:line3.s:line4 =~# '^; <<>> DiG [0-9.]\+.* <<>>\|$ORIGIN\|$TTL\|IN\s\+SOA'
set ft=bindzone
" BAAN
elseif s:line1 =~# '|\*\{1,80}' && s:line2 =~# 'VRC '
\ || s:line2 =~# '|\*\{1,80}' && s:line3 =~# 'VRC '
set ft=baan
" Valgrind
elseif s:line1 =~# '^==\d\+== valgrind' || s:line3 =~# '^==\d\+== Using valgrind'
set ft=valgrind
" Go docs
elseif s:line1 =~# '^PACKAGE DOCUMENTATION$'
set ft=godoc
" Renderman Interface Bytestream
elseif s:line1 =~# '^##RenderMan'
set ft=rib
" Scheme scripts
elseif s:line1 =~# 'exec\s\+\S*scheme' || s:line2 =~# 'exec\s\+\S*scheme'
set ft=scheme
" Git output
elseif s:line1 =~# '^\(commit\|tree\|object\) \x\{40,\}\>\|^tag \S\+$'
set ft=git
" Gprof (gnu profiler)
elseif s:line1 == 'Flat profile:'
\ && s:line2 == ''
\ && s:line3 =~# '^Each sample counts as .* seconds.$'
set ft=gprof
" Erlang terms
" (See also: http://www.gnu.org/software/emacs/manual/html_node/emacs/Choosing-Modes.html#Choosing-Modes)
elseif s:line1 =~? '-\*-.*erlang.*-\*-'
set ft=erlang
" YAML
elseif s:line1 =~# '^%YAML'
set ft=yaml
" MikroTik RouterOS script
elseif s:line1 =~# '^#.*by RouterOS.*$'
set ft=routeros
" Sed scripts
" #ncomment is allowed but most likely a false positive so require a space
" before any trailing comment text
elseif s:line1 =~# '^#n\%($\|\s\)'
set ft=sed
" CVS diff
else
let s:lnum = 1
while getline(s:lnum) =~# "^? " && s:lnum < line("$")
let s:lnum += 1
endwhile
if getline(s:lnum) =~# '^Index:\s\+\f\+$'
set ft=diff
" locale input files: Formal Definitions of Cultural Conventions
" filename must be like en_US, fr_FR@euro or en_US.UTF-8
elseif expand("%") =~# '\a\a_\a\a\($\|[.@]\)\|i18n$\|POSIX$\|translit_'
let s:lnum = 1
while s:lnum < 100 && s:lnum < line("$")
if getline(s:lnum) =~# '^LC_\(IDENTIFICATION\|CTYPE\|COLLATE\|MONETARY\|NUMERIC\|TIME\|MESSAGES\|PAPER\|TELEPHONE\|MEASUREMENT\|NAME\|ADDRESS\)$'
setf fdcc
break
endif
let s:lnum += 1
endwhile
endif
unlet s:lnum
endif
unlet s:line2 s:line3 s:line4 s:line5
endif
" Restore 'cpoptions'
let &cpo = s:cpo_save
unlet s:cpo_save s:line1
" The main code is in a compiled function for speed.
call dist#script#DetectFiletype()

View File

@@ -1,8 +1,8 @@
" Vim syntax file
" Language: Vim 8.2 script
" Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
" Last Change: February 01, 2022
" Version: 8.2-27
" Last Change: February 09, 2022
" Version: 8.2-28
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_VIM
" Automatically generated keyword lists: {{{1
@@ -66,8 +66,8 @@ syn keyword vimErrSetting contained bioskey biosk conskey consk autoprint beauti
" AutoCmd Events {{{2
syn case ignore
syn keyword vimAutoEvent contained BufAdd BufDelete BufFilePost BufHidden BufNew BufRead BufReadPost BufUnload BufWinLeave BufWrite BufWritePost CmdlineChanged CmdlineLeave CmdwinEnter ColorScheme ColorSchemePre CompleteChanged CompleteDone CompleteDonePre CursorHold CursorHoldI CursorMoved CursorMovedI DiffUpdated DirChanged EncodingChanged ExitPre FileAppendCmd FileAppendPost FileAppendPre FileChangedRO FileChangedShell FileChangedShellPost FileEncoding FileExplorer FileReadCmd FileReadPost FileReadPre FileType FileWriteCmd FileWritePost FileWritePre FilterReadPost FilterReadPre FilterWritePost FilterWritePre FocusGained FocusLost FuncUndefined GUIEnter GUIFailed InsertChange InsertCharPre InsertEnter InsertLeave InsertLeavePre MenuPopup ModeChanged OptionSet QuickFixCmdPost QuickFixCmdPre QuitPre RemoteReply SafeState SafeStateAgain SessionLoadPost ShellCmdPost ShellFilterPost SigUSR1 SourceCmd SourcePost SourcePre SpellFileMissing StdinReadPost StdinReadPre SwapExists Syntax TabClosed TabEnter TabLeave TabNew TermChanged TerminalOpen TerminalWinOpen TermResponse TextChanged TextChangedI TextChangedP TextYankPost User VimEnter VimLeave VimLeavePre VimResized VimResume VimSuspend WinClosed WinEnter WinLeave WinNew
syn keyword vimAutoEvent contained BufCreate BufEnter BufFilePre BufLeave BufNewFile BufReadCmd BufReadPre BufWinEnter BufWipeout BufWriteCmd BufWritePre CmdlineEnter CmdUndefined CmdwinLeave
syn keyword vimAutoEvent contained BufAdd BufDelete BufFilePost BufHidden BufNew BufRead BufReadPost BufUnload BufWinLeave BufWrite BufWritePost CmdlineChanged CmdlineLeave CmdwinEnter ColorScheme CompleteChanged CompleteDone CompleteDonePre CursorHold CursorHoldI CursorMoved CursorMovedI DiffUpdated DirChanged DirChangedPre EncodingChanged ExitPre FileAppendCmd FileAppendPost FileAppendPre FileChangedRO FileChangedShell FileChangedShellPost FileEncoding FileExplorer FileReadCmd FileReadPost FileReadPre FileType FileWriteCmd FileWritePost FileWritePre FilterReadPost FilterReadPre FilterWritePost FilterWritePre FocusGained FocusLost FuncUndefined GUIEnter GUIFailed InsertChange InsertCharPre InsertEnter InsertLeave InsertLeavePre MenuPopup ModeChanged OptionSet QuickFixCmdPost QuickFixCmdPre QuitPre RemoteReply SafeState SafeStateAgain SessionLoadPost ShellCmdPost ShellFilterPost SigUSR1 SourceCmd SourcePost SourcePre SpellFileMissing StdinReadPost StdinReadPre SwapExists Syntax TabClosed TabEnter TabLeave TabNew TermChanged TerminalOpen TerminalWinOpen TermResponse TextChanged TextChangedI TextChangedP TextYankPost User VimEnter VimLeave VimLeavePre VimResized VimResume VimSuspend WinClosed WinEnter WinLeave WinNew
syn keyword vimAutoEvent contained BufCreate BufEnter BufFilePre BufLeave BufNewFile BufReadCmd BufReadPre BufWinEnter BufWipeout BufWriteCmd BufWritePre CmdlineEnter CmdUndefined CmdwinLeave ColorSchemePre
" Highlight commonly used Groupnames {{{2
syn keyword vimGroup contained Comment Constant String Character Number Boolean Float Identifier Function Statement Conditional Repeat Label Operator Keyword Exception PreProc Include Define Macro PreCondit Type StorageClass Structure Typedef Special SpecialChar Tag Delimiter SpecialComment Debug Underlined Ignore Error Todo

View File

@@ -955,7 +955,7 @@ NOTE: Completion works for many commands. Just try pressing CTRL-D and
Publisher: New Riders
The first book completely dedicated to Vim. Especially useful for beginners.
There are many examples and pictures.
See http://iccf-holland.org/click5.html
See https://iccf-holland.org/click5.html
This book is older and more about Vi than Vim, but also recommended:
Learning the Vi Editor - by Linda Lamb

View File

@@ -954,7 +954,7 @@ Anm
Verlaag: New Riders
Dös ist dös eerste Buech, wo ganz yn n Wimm gwidmt ist, netty dös Grechte für
Anfönger. Es haat ayn Wösn Beispiler und aau Bilder drinn.
See http://iccf-holland.org/click5.html
See https://iccf-holland.org/click5.html
Dös folgete Buech ist schoon ölter und meerer über n Urwimm als wie über n
Wimm, aber aau zo n Empfelhen: Textbearbeitung mit dem vi-Editor - von dyr
@@ -968,7 +968,7 @@ Anm
mitp-Verlaag, Buechlaittzal 978-3-8266-1781-2
Trotz dyr recht pfrengen Darstöllung ist s durch seine viln nützlichnen Bei-
spiler aau für Einsteiger grad grecht. Probhaeupster und de Beispilschripfer
seind zesig zo n Kriegn; see http://iccf-holland.org/click5.html
seind zesig zo n Kriegn; see https://iccf-holland.org/click5.html
Verfasst habnd dönn Schainer dyr PIERCE Michael C. und WARE Robert K. von dyr
Kolraader Knappnschuel (Colorado School of Mines). Er beruet auf Entwürff, wo

View File

@@ -954,7 +954,7 @@ Anmörkung: D Vergöntzung geit s für aynn Hauffen Faudungen. Versuech ainfa
Verlaag: New Riders
Dös ist dös eerste Buech, wo ganz yn n Wimm gwidmt ist, netty dös Grechte für
Anfönger. Es haat ayn Wösn Beispiler und aau Bilder drinn.
See http://iccf-holland.org/click5.html
See https://iccf-holland.org/click5.html
Dös folgete Buech ist schoon ölter und meerer über n Urwimm als wie über n
Wimm, aber aau zo n Empfelhen: Textbearbeitung mit dem vi-Editor - von dyr
@@ -968,7 +968,7 @@ Anmörkung: D Vergöntzung geit s für aynn Hauffen Faudungen. Versuech ainfa
mitp-Verlaag, Buechlaittzal 978-3-8266-1781-2
Trotz dyr recht pfrengen Darstöllung ist s durch seine viln nützlichnen Bei-
spiler aau für Einsteiger grad grecht. Probhaeupster und de Beispilschripfer
seind zesig zo n Kriegn; see http://iccf-holland.org/click5.html
seind zesig zo n Kriegn; see https://iccf-holland.org/click5.html
Verfasst habnd dönn Schainer dyr PIERCE Michael C. und WARE Robert K. von dyr
Kolraader Knappnschuel (Colorado School of Mines). Er beruet auf Entwürff, wo

View File

@@ -1017,7 +1017,7 @@
Издател: New Riders
Това е първата книга, изцяло посветена на Vim. Особено полезна е за
начинаещи. В нея ще намерите много примери и картинки.
Вижте http://iccf-holland.org/click5.html
Вижте https://iccf-holland.org/click5.html
Следната книга е по-стара и по-скоро за Vi отколкото за Vim, но също се препоръчва:
Learning the Vi Editor - от Linda Lamb

View File

@@ -792,7 +792,7 @@ Nota: Aix
Editorial: New Riders
És el primer llibre dedicat completament al Vim, especialment útil per a
usuaris novells. Conté molts exemples i diagrames.
Vegeu http://iccf-holland.org/click5.html
Vegeu https://iccf-holland.org/click5.html
Aquest altre és més vell i tracta més sobre el Vi que sobre el Vim:
Learning the Vi Editor - de Linda Lamb

View File

@@ -792,7 +792,7 @@ Nota: Així s'evita haver de prémer i , l'últim caràcter, el text a inserir,
Editorial: New Riders
És el primer llibre dedicat completament al Vim, especialment útil per a
usuaris novells. Conté molts exemples i diagrames.
Vegeu http://iccf-holland.org/click5.html
Vegeu https://iccf-holland.org/click5.html
Aquest altre és més vell i tracta més sobre el Vi que sobre el Vim:
Learning the Vi Editor - de Linda Lamb

View File

@@ -791,7 +791,7 @@ Pozn
Nakladatel: New Riders
První kniha určená pro Vim. Obzvláště vhodná pro začátečníky.
Obsahuje množství příkladů a obrázků.
viz http://iccf-holland.org/click5.html
viz https://iccf-holland.org/click5.html
Tato kniha je starší a více věnovaná Vi než Vim, ale také doporučená:
Learning the Vi Editor - od Linda Lamb

View File

@@ -791,7 +791,7 @@ Pozn
Nakladatel: New Riders
První kniha určená pro Vim. Obzvláště vhodná pro začátečníky.
Obsahuje množství příkladů a obrázků.
viz http://iccf-holland.org/click5.html
viz https://iccf-holland.org/click5.html
Tato kniha je starší a více věnovaná Vi než Vim, ale také doporučená:
Learning the Vi Editor - od Linda Lamb

View File

@@ -791,7 +791,7 @@ Poznámka: Tímto se vyhneš stisknutí i , posledního znaku, textu na vlože
Nakladatel: New Riders
První kniha určená pro Vim. Obzvláště vhodná pro začátečníky.
Obsahuje množství příkladů a obrázků.
viz http://iccf-holland.org/click5.html
viz https://iccf-holland.org/click5.html
Tato kniha je starší a více věnovaná Vi než Vim, ale také doporučená:
Learning the Vi Editor - od Linda Lamb

View File

@@ -953,7 +953,7 @@ BEM
Forlag: New Riders
Den første bog som helt er tilegnet Vim. Specielt nyttig for begyndere.
Der er mange eksempler og billeder.
Se http://iccf-holland.org/click5.html
Se https://iccf-holland.org/click5.html
Denne bog er ældre og mere om Vi end Vim, men anbefales også:
Learning the Vi Editor - af Linda Lamb

View File

@@ -953,7 +953,7 @@ BEMÆRK: Fuldførelse virker til mange kommandoer. Prøv blot at trykke på
Forlag: New Riders
Den første bog som helt er tilegnet Vim. Specielt nyttig for begyndere.
Der er mange eksempler og billeder.
Se http://iccf-holland.org/click5.html
Se https://iccf-holland.org/click5.html
Denne bog er ældre og mere om Vi end Vim, men anbefales også:
Learning the Vi Editor - af Linda Lamb

View File

@@ -956,7 +956,7 @@ Anmerkung: Vervollst
Verlag: New Riders
Das erste Buch, welches durchgängig Vim gewidmet ist. Besonders nützlich
für Anfänger. Viele Beispiele und Bilder sind enthalten.
Siehe http://iccf-holland.org/click5.html
Siehe https://iccf-holland.org/click5.html
Folgendes Buch ist älter und mehr über Vi als Vim, aber auch empfehlenswert:
Textbearbeitung mit dem Vi-Editor - von Linda Lamb und Arnold Robbins
@@ -970,7 +970,7 @@ Anmerkung: Vervollst
mitp-Verlag, ISBN 3-8266-1425-9
Trotz der kompakten Darstellung ist es durch viele nützliche Beispiele auch
für Einsteiger empfehlenswert. Probekapitel und die Beispielskripte sind
online erhältlich. Siehe http://iccf-holland.org/click5.html
online erhältlich. Siehe https://iccf-holland.org/click5.html
Dieses Tutorial wurde geschrieben von Michael C. Pierce und Robert K. Ware,
Colorado School of Mines. Es benutzt Ideen, die Charles Smith, Colorado State

View File

@@ -956,7 +956,7 @@ Anmerkung: Vervollständigung funktioniert für viele Kommandos. Probiere
Verlag: New Riders
Das erste Buch, welches durchgängig Vim gewidmet ist. Besonders nützlich
für Anfänger. Viele Beispiele und Bilder sind enthalten.
Siehe http://iccf-holland.org/click5.html
Siehe https://iccf-holland.org/click5.html
Folgendes Buch ist älter und mehr über Vi als Vim, aber auch empfehlenswert:
Textbearbeitung mit dem Vi-Editor - von Linda Lamb und Arnold Robbins
@@ -970,7 +970,7 @@ Anmerkung: Vervollständigung funktioniert für viele Kommandos. Probiere
mitp-Verlag, ISBN 3-8266-1425-9
Trotz der kompakten Darstellung ist es durch viele nützliche Beispiele auch
für Einsteiger empfehlenswert. Probekapitel und die Beispielskripte sind
online erhältlich. Siehe http://iccf-holland.org/click5.html
online erhältlich. Siehe https://iccf-holland.org/click5.html
Dieses Tutorial wurde geschrieben von Michael C. Pierce und Robert K. Ware,
Colorado School of Mines. Es benutzt Ideen, die Charles Smith, Colorado State

View File

@@ -796,7 +796,7 @@
Το πρώτο βιβλίο πλήρως αφιερωμένο στον Vim.
Ιδιαίτερα χρήσιμο για αρχάριους.
Υπάρχουν πολλά παραδείγματα και εικόνες.
Δείτε την http://iccf-holland.org/click5.html
Δείτε την https://iccf-holland.org/click5.html
Αυτό το βιβλίο είναι παλιότερο και περισσότερο για τον Vi παρά για τον Vim,
αλλά επίσης συνιστώμενο:

View File

@@ -796,7 +796,7 @@
’¦ §¨é«¦ ™ ™¢å¦ §¢ã¨àª ˜­ œ¨à£â¤¦ ©«¦¤ Vim.
ˆ› ˜å«œ¨˜ ®¨ã© £¦ š ˜ ˜¨®á¨ ¦¬ª.
“§á¨®¦¬¤ §¦¢¢á §˜¨˜›œåš£˜«˜ ¡˜  œ ¡æ¤œª.
ƒœå«œ «ž¤ http://iccf-holland.org/click5.html
ƒœå«œ «ž¤ https://iccf-holland.org/click5.html
€¬«æ «¦ ™ ™¢å¦ œå¤˜  §˜¢ æ«œ¨¦ ¡˜  §œ¨ ©©æ«œ¨¦ š ˜ «¦¤ Vi §˜¨á š ˜ «¦¤ Vim,
˜¢¢á œ§å©žª ©¬¤ ©«é£œ¤¦:

View File

@@ -796,7 +796,7 @@
Το πρώτο βιβλίο πλήρως αφιερωμένο στον Vim.
Ιδιαίτερα χρήσιμο για αρχάριους.
Υπάρχουν πολλά παραδείγματα και εικόνες.
Δείτε την http://iccf-holland.org/click5.html
Δείτε την https://iccf-holland.org/click5.html
Αυτό το βιβλίο είναι παλιότερο και περισσότερο για τον Vi παρά για τον Vim,
αλλά επίσης συνιστώμενο:

View File

@@ -951,7 +951,7 @@ NAPOMENA: Mogu
Izdavač: New Riders
Prva knjiga potpuno posvećena Vim-u. Vrlo korisna za početnike.
Sa mnogo primjera i slika.
Posjetite http://iccf-holland.org/click5.html
Posjetite https://iccf-holland.org/click5.html
Sljedeća knjiga je nešto starija i više o Vi-u nego o Vim-u, preporučamo:
Learning the Vi Editor - by Linda Lamb

View File

@@ -951,7 +951,7 @@ NAPOMENA: Mogu
Izdavač: New Riders
Prva knjiga potpuno posvećena Vim-u. Vrlo korisna za početnike.
Sa mnogo primjera i slika.
Posjetite http://iccf-holland.org/click5.html
Posjetite https://iccf-holland.org/click5.html
Sljedeća knjiga je nešto starija i više o Vi-u nego o Vim-u, preporučamo:
Learning the Vi Editor - by Linda Lamb

View File

@@ -951,7 +951,7 @@ NAPOMENA: Moguće je dopuniti mnoge naredbe. Koristite CTRL-D i <TAB>.
Izdavač: New Riders
Prva knjiga potpuno posvećena Vim-u. Vrlo korisna za početnike.
Sa mnogo primjera i slika.
Posjetite http://iccf-holland.org/click5.html
Posjetite https://iccf-holland.org/click5.html
Sljedeća knjiga je nešto starija i više o Vi-u nego o Vim-u, preporučamo:
Learning the Vi Editor - by Linda Lamb

View File

@@ -810,7 +810,7 @@ Megj: A Vimben a sor legv
Publisher: New Riders
The first book completely dedicated to Vim. Especially useful for beginners.
There are many examples and pictures.
See http://iccf-holland.org/click5.html
See https://iccf-holland.org/click5.html
This book is older and more about Vi than Vim, but also recommended:
Learning the Vi Editor - by Linda Lamb

View File

@@ -810,7 +810,7 @@ Megj: A Vimben a sor legv
Publisher: New Riders
The first book completely dedicated to Vim. Especially useful for beginners.
There are many examples and pictures.
See http://iccf-holland.org/click5.html
See https://iccf-holland.org/click5.html
This book is older and more about Vi than Vim, but also recommended:
Learning the Vi Editor - by Linda Lamb

View File

@@ -810,7 +810,7 @@ Megj: A Vimben a sor legvégére is lehet állni, azonban ez elődjében
Publisher: New Riders
The first book completely dedicated to Vim. Especially useful for beginners.
There are many examples and pictures.
See http://iccf-holland.org/click5.html
See https://iccf-holland.org/click5.html
This book is older and more about Vi than Vim, but also recommended:
Learning the Vi Editor - by Linda Lamb

View File

@@ -951,7 +951,7 @@ NOTA: Il completamento
Vim - Vi Improved - di Steve Oualline Editore: New Riders
Il primo libro completamente dedicato a Vim. Utile specie per principianti.
Contiene molti esempi e figure.
Vedi http://iccf-holland.org/click5.html
Vedi https://iccf-holland.org/click5.html
Quest'altro libro è più su Vi che su Vim, ma è pure consigliato:
Learning the Vi Editor - di Linda Lamb e Arnold Robbins

View File

@@ -951,7 +951,7 @@ NOTA: Il completamento è disponibile per molti comandi. Prova a battere
Vim - Vi Improved - di Steve Oualline Editore: New Riders
Il primo libro completamente dedicato a Vim. Utile specie per principianti.
Contiene molti esempi e figure.
Vedi http://iccf-holland.org/click5.html
Vedi https://iccf-holland.org/click5.html
Quest'altro libro è più su Vi che su Vim, ma è pure consigliato:
Learning the Vi Editor - di Linda Lamb e Arnold Robbins

View File

@@ -955,7 +955,7 @@ NOTE:
出版社: New Riders
最初の本は完全に Vim のために書かれました。とりわけ初心者にはお奨めです。
多くの例題や図版が掲載されています。
次のURLを参照して下さい http://iccf-holland.org/click5.html
次のURLを参照して下さい https://iccf-holland.org/click5.html
次は Vim よりも Vi について書かれた古い本ですが推薦します:
Learning the Vi Editor - by Linda Lamb

View File

@@ -955,7 +955,7 @@ NOTE:
出版社: New Riders
最初の本は完全に Vim のために書かれました。とりわけ初心者にはお奨めです。
多くの例題や図版が掲載されています。
次のURLを参照して下さい http://iccf-holland.org/click5.html
次のURLを参照して下さい https://iccf-holland.org/click5.html
次は Vim よりも Vi について書かれた古い本ですが推薦します:
Learning the Vi Editor - by Linda Lamb

View File

@@ -955,7 +955,7 @@ NOTE: 補完は多くのコマンドで動作します。そして CTRL-D と <T
出版社: New Riders
最初の本は完全に Vim のために書かれました。とりわけ初心者にはお奨めです。
多くの例題や図版が掲載されています。
次のURLを参照して下さい http://iccf-holland.org/click5.html
次のURLを参照して下さい https://iccf-holland.org/click5.html
次は Vim よりも Vi について書かれた古い本ですが推薦します:
Learning the Vi Editor - by Linda Lamb

View File

@@ -949,7 +949,7 @@ ce 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있
출판사: New Riders
이 책은 완전히 빔에 대해서만 다루고 있습니다. 특히 초보자들에게 유용합니다.
많은 예제와 그림이 있습니다.
다음을 참고하십시오: http://iccf-holland.org/click5.html
다음을 참고하십시오: https://iccf-holland.org/click5.html
다음 책은 좀 오래된 책으로 빔보다는 Vi에 대해 다루고 있지만, 역시 추천할 만
합니다:

View File

@@ -949,7 +949,7 @@ ce
출판사: New Riders
이 책은 완전히 빔에 대해서만 다루고 있습니다. 특히 초보자들에게 유용합니다.
많은 예제와 그림이 있습니다.
다음을 참고하십시오: http://iccf-holland.org/click5.html
다음을 참고하십시오: https://iccf-holland.org/click5.html
다음 책은 좀 오래된 책으로 빔보다는 Vi에 대해 다루고 있지만, 역시 추천할 만
합니다:

View File

@@ -949,7 +949,7 @@ ce 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있
출판사: New Riders
이 책은 완전히 빔에 대해서만 다루고 있습니다. 특히 초보자들에게 유용합니다.
많은 예제와 그림이 있습니다.
다음을 참고하십시오: http://iccf-holland.org/click5.html
다음을 참고하십시오: https://iccf-holland.org/click5.html
다음 책은 좀 오래된 책으로 빔보다는 Vi에 대해 다루고 있지만, 역시 추천할 만
합니다:

View File

@@ -986,7 +986,7 @@ PIEZĪME: Pabeigšana strādā dažādām komandām.
Vim - Vi Improved, Steve Oualline, New Riders
Šī grāmata ir tieši par Vim, un ir ļoti ieteicama iesācējiem.
Daudzi piemēri un attēli no tās pieejami: http://iccf-holland.org/click5.html
Daudzi piemēri un attēli no tās pieejami: https://iccf-holland.org/click5.html
Otra, vecāka grāmata ir par Vi, nevis Vim, bet arī ir ļoti noderīga:

View File

@@ -953,7 +953,7 @@ MERK: Fullf
Utgiver: New Riders
Den første boken som er fullt og helt dedisert til Vim. Spesielt nyttig for
nybegynnere. Inneholder mange eksempler og illustrasjoner.
Se http://iccf-holland.org/click5.html
Se https://iccf-holland.org/click5.html
Denne boken er eldre og handler mer om Vi enn Vim, men anbefales også:
«Learning the Vi Editor» av Linda Lamb

View File

@@ -953,7 +953,7 @@ MERK: Fullføring fungerer for mange kommandoer. Prøv ved å trykke CTRL-D og
Utgiver: New Riders
Den første boken som er fullt og helt dedisert til Vim. Spesielt nyttig for
nybegynnere. Inneholder mange eksempler og illustrasjoner.
Se http://iccf-holland.org/click5.html
Se https://iccf-holland.org/click5.html
Denne boken er eldre og handler mer om Vi enn Vim, men anbefales også:
«Learning the Vi Editor» av Linda Lamb

View File

@@ -927,7 +927,7 @@
Uitgever: New Riders
Dit is het eerste boek dat geheel aan Vim is gewijd. Speciaal geschikt
voor beginners. Met veel voorbeelden en afbeeldingen.
Zie http://iccf-holland.org/click5.html
Zie https://iccf-holland.org/click5.html
Het volgende boek is ouder en gaat meer over Vi dan Vim, maar het wordt
toch aanbevolen:

View File

@@ -927,7 +927,7 @@
Uitgever: New Riders
Dit is het eerste boek dat geheel aan Vim is gewijd. Speciaal geschikt
voor beginners. Met veel voorbeelden en afbeeldingen.
Zie http://iccf-holland.org/click5.html
Zie https://iccf-holland.org/click5.html
Het volgende boek is ouder en gaat meer over Vi dan Vim, maar het wordt
toch aanbevolen:

View File

@@ -953,7 +953,7 @@ MERK: Fullf
Utgiver: New Riders
Den første boken som er fullt og helt dedisert til Vim. Spesielt nyttig for
nybegynnere. Inneholder mange eksempler og illustrasjoner.
Se http://iccf-holland.org/click5.html
Se https://iccf-holland.org/click5.html
Denne boken er eldre og handler mer om Vi enn Vim, men anbefales også:
«Learning the Vi Editor» av Linda Lamb

View File

@@ -953,7 +953,7 @@ MERK: Fullføring fungerer for mange kommandoer. Prøv ved å trykke CTRL-D og
Utgiver: New Riders
Den første boken som er fullt og helt dedisert til Vim. Spesielt nyttig for
nybegynnere. Inneholder mange eksempler og illustrasjoner.
Se http://iccf-holland.org/click5.html
Se https://iccf-holland.org/click5.html
Denne boken er eldre og handler mer om Vi enn Vim, men anbefales også:
«Learning the Vi Editor» av Linda Lamb

View File

@@ -954,7 +954,7 @@ UWAGA: Uzupe
Wydawca: New Riders
Pierwsza książka całkowicie poświęcona Vimowi. Użyteczna zwłaszcza dla
początkujących. Zawiera wiele przykładów i ilustracji.
Zobacz http://iccf-holland.org./click5.html
Zobacz https://iccf-holland.org./click5.html
Starsza pozycja i bardziej o Vi niż o Vimie, ale także warta
polecenia:

View File

@@ -954,7 +954,7 @@ UWAGA: Uzupe
Wydawca: New Riders
Pierwsza książka całkowicie poświęcona Vimowi. Użyteczna zwłaszcza dla
początkujących. Zawiera wiele przykładów i ilustracji.
Zobacz http://iccf-holland.org./click5.html
Zobacz https://iccf-holland.org./click5.html
Starsza pozycja i bardziej o Vi niż o Vimie, ale także warta
polecenia:

View File

@@ -954,7 +954,7 @@ UWAGA: Uzupełnianie działa dla wielu poleceń. Spróbuj wcisnąć CTRL-D i <TA
Wydawca: New Riders
Pierwsza książka całkowicie poświęcona Vimowi. Użyteczna zwłaszcza dla
początkujących. Zawiera wiele przykładów i ilustracji.
Zobacz http://iccf-holland.org./click5.html
Zobacz https://iccf-holland.org./click5.html
Starsza pozycja i bardziej o Vi niż o Vimie, ale także warta
polecenia:

View File

@@ -975,7 +975,7 @@ NOTA: A completa
Editora: New Riders
Este é o primeiro livro completamente dedicado ao Vim. Especialmente útil
para iniciantes, com muitos exemplos e ilustrações.
Veja http://iccf-holland.org/click5.html
Veja https://iccf-holland.org/click5.html
Esse livro é mais antigo e mais sobre o Vi do que sobre o Vim, mas também é
recomendado:

View File

@@ -975,7 +975,7 @@ NOTA: A completação funciona com muitos comandos. Basta pressionar CTRL-D e
Editora: New Riders
Este é o primeiro livro completamente dedicado ao Vim. Especialmente útil
para iniciantes, com muitos exemplos e ilustrações.
Veja http://iccf-holland.org/click5.html
Veja https://iccf-holland.org/click5.html
Esse livro é mais antigo e mais sobre o Vi do que sobre o Vim, mas também é
recomendado:

View File

@@ -980,7 +980,7 @@
Эта книга полностью посвящена Vim. Особенно полезна она будет новичкам.
Содержит множество примеров и иллюстраций.
См. http://iccf-holland.org/click5.html
См. https://iccf-holland.org/click5.html
Следующая книга более почтенного возраста и посвящена больше Vi, чем Vim,
однако также рекомендуется:

View File

@@ -980,7 +980,7 @@
Эта книга полностью посвящена Vim. Особенно полезна она будет новичкам.
Содержит множество примеров и иллюстраций.
См. http://iccf-holland.org/click5.html
См. https://iccf-holland.org/click5.html
Следующая книга более почтенного возраста и посвящена больше Vi, чем Vim,
однако также рекомендуется:

View File

@@ -980,7 +980,7 @@
Эта книга полностью посвящена Vim. Особенно полезна она будет новичкам.
Содержит множество примеров и иллюстраций.
См. http://iccf-holland.org/click5.html
См. https://iccf-holland.org/click5.html
Следующая книга более почтенного возраста и посвящена больше Vi, чем Vim,
однако также рекомендуется:

View File

@@ -986,7 +986,7 @@ POZN
Vydavateľ: New Riders
Prvá kniha určená pre Vim. Špeciálne vhodná pre začiatočníkov.
Obsahuje množstvo príkladov a obrázkov.
Pozri na http://iccf-holland.org/click5.html
Pozri na https://iccf-holland.org/click5.html
Táto kniha je staršia a je viac o Vi ako o Vim, ale je tiež odporúčaná:
Learning the Vi Editor - od Linda Lamb

View File

@@ -986,7 +986,7 @@ POZN
Vydavateľ: New Riders
Prvá kniha určená pre Vim. Špeciálne vhodná pre začiatočníkov.
Obsahuje množstvo príkladov a obrázkov.
Pozri na http://iccf-holland.org/click5.html
Pozri na https://iccf-holland.org/click5.html
Táto kniha je staršia a je viac o Vi ako o Vim, ale je tiež odporúčaná:
Learning the Vi Editor - od Linda Lamb

View File

@@ -986,7 +986,7 @@ POZNÁMKA: Dokončovanie funguje pre veľa príkazov. Vyskúšaj stlačenie
Vydavateľ: New Riders
Prvá kniha určená pre Vim. Špeciálne vhodná pre začiatočníkov.
Obsahuje množstvo príkladov a obrázkov.
Pozri na http://iccf-holland.org/click5.html
Pozri na https://iccf-holland.org/click5.html
Táto kniha je staršia a je viac o Vi ako o Vim, ale je tiež odporúčaná:
Learning the Vi Editor - od Linda Lamb

View File

@@ -951,7 +951,7 @@ NAPOMENA: Mogu
Izdavač: New Riders
Prva knjiga potpuno posvećena Vim-u. Naročito korisna za početnike.
Ima mnoštvo primera i slika.
Vidite http://iccf-holland.org/click5.html
Vidite https://iccf-holland.org/click5.html
Sledeća knjiga je starija i više govori o Vi-u nego o Vim-u, ali je takođe
preporučujemo:

View File

@@ -951,7 +951,7 @@ NAPOMENA: Moguće je dopuniti mnoge komande. Samo probajte CTRL-D i <TAB>.
Izdavač: New Riders
Prva knjiga potpuno posvećena Vim-u. Naročito korisna za početnike.
Ima mnoštvo primera i slika.
Vidite http://iccf-holland.org/click5.html
Vidite https://iccf-holland.org/click5.html
Sledeća knjiga je starija i više govori o Vi-u nego o Vim-u, ali je takođe
preporučujemo:

View File

@@ -812,7 +812,7 @@ Notera: Detta undviker att beh
Förlag: New Riders
Den första boken som är endast behandlar Vim. Speciellt användbar för
nybörjare. Det finns många exempel och bilder.
Se http://iccf-holland.org/click5.html
Se https://iccf-holland.org/click5.html
Den här boken är äldre och behandlar mer Vi än Vim, men rekommenderas också:
Learning the Vi Editor - av Linda Lamb

View File

@@ -812,7 +812,7 @@ Notera: Detta undviker att behöva skriva i , det sista tecknet, texten att
Förlag: New Riders
Den första boken som är endast behandlar Vim. Speciellt användbar för
nybörjare. Det finns många exempel och bilder.
Se http://iccf-holland.org/click5.html
Se https://iccf-holland.org/click5.html
Den här boken är äldre och behandlar mer Vi än Vim, men rekommenderas också:
Learning the Vi Editor - av Linda Lamb

View File

@@ -956,7 +956,7 @@ Not: Arama dosyan
Tümüyle Vim için hazırlanmış ilk kitaptır. Özellikle ilk kullanıcılar için
çok uygundur.
Kitapta birçok örnek ve resim bulunmaktadır.
http://iccf-holland.org/click5.html adresine bakabilirsiniz.
https://iccf-holland.org/click5.html adresine bakabilirsiniz.
Bu kitap daha eskidir ve Vim'den daha çok Vi içindir ancak tavsiye edilir:

View File

@@ -956,7 +956,7 @@ Not: Arama dosyanın sonuna ulaştığında dosyanın başından sürecektir. Bu
Tümüyle Vim için hazırlanmış ilk kitaptır. Özellikle ilk kullanıcılar için
çok uygundur.
Kitapta birçok örnek ve resim bulunmaktadır.
http://iccf-holland.org/click5.html adresine bakabilirsiniz.
https://iccf-holland.org/click5.html adresine bakabilirsiniz.
Bu kitap daha eskidir ve Vim'den daha çok Vi içindir ancak tavsiye edilir:

View File

@@ -965,7 +965,7 @@
Publisher: New Riders
Особливо корисна для початківців.
Там багато прикладів і ілюстрацій.
Дивіться http://iccf-holland.org/click5.html
Дивіться https://iccf-holland.org/click5.html
Ці уроки були написані Майклом С. Пірсом та Робертом Уаром.

View File

@@ -955,7 +955,7 @@ NOTE: Completion works for many commands. Just try pressing CTRL-D and
Publisher: New Riders
The first book completely dedicated to Vim. Especially useful for beginners.
There are many examples and pictures.
See http://iccf-holland.org/click5.html
See https://iccf-holland.org/click5.html
This book is older and more about Vi than Vim, but also recommended:
Learning the Vi Editor - by Linda Lamb

View File

@@ -792,7 +792,7 @@ Chú ý: Lệnh này thay cho việc gõ i , ký tự cuối cùng, văn bản
Nhà xuất bản: New Riders
Cuốn sách đầu tiên dành hoàn toàn cho Vim. Đặc biệt có ích cho người mới.
Có rất nhiều ví dụ và tranh ảnh.
Hãy xem: http://iccf-holland.org/click5.html
Hãy xem: https://iccf-holland.org/click5.html
Cuốn sách tiếp theo này xuất bản sớm hơn và nói nhiều về Vi hơn là Vim,
nhưng cũng rất nên đọc:

View File

@@ -805,7 +805,7 @@ Open up a line above this by typing Shift-O while the cursor is on this line.
出版社New Riders
這是第一本完全講解vim的書籍。對于初學者特別有用。其中還包含有大量實例
和圖示。欲知詳情,請訪問 http://iccf-holland.org/click5.html
和圖示。欲知詳情,請訪問 https://iccf-holland.org/click5.html
以下這本書比較老了而且內容主要是vi而不是vim但是也值得推薦

View File

@@ -953,7 +953,7 @@
出版社New Riders
这是第一本完全讲解 Vim 的书籍。它对于初学者特别有用。其中包含有大量实例
和图示。
欲知详情,请访问 http://iccf-holland.org/click5.html
欲知详情,请访问 https://iccf-holland.org/click5.html
以下这本书比较老了而且内容更多是关于 Vi 而非 Vim但是也值得推荐
Learning the Vi Editor - 作者Linda Lamb

View File

@@ -805,7 +805,7 @@ Open up a line above this by typing Shift-O while the cursor is on this line.
出版社New Riders
這是第一本完全講解vim的書籍。對于初學者特別有用。其中還包含有大量實例
和圖示。欲知詳情,請訪問 http://iccf-holland.org/click5.html
和圖示。欲知詳情,請訪問 https://iccf-holland.org/click5.html
以下這本書比較老了而且內容主要是vi而不是vim但是也值得推薦

View File

@@ -953,7 +953,7 @@
出版社New Riders
这是第一本完全讲解 Vim 的书籍。它对于初学者特别有用。其中包含有大量实例
和图示。
欲知详情,请访问 http://iccf-holland.org/click5.html
欲知详情,请访问 https://iccf-holland.org/click5.html
以下这本书比较老了而且内容更多是关于 Vi 而非 Vim但是也值得推荐
Learning the Vi Editor - 作者Linda Lamb

View File

@@ -805,7 +805,7 @@ Open up a line above this by typing Shift-O while the cursor is on this line.
出版社New Riders
這是第一本完全講解vim的書籍。對于初學者特別有用。其中還包含有大量實例
和圖示。欲知詳情,請訪問 http://iccf-holland.org/click5.html
和圖示。欲知詳情,請訪問 https://iccf-holland.org/click5.html
以下這本書比較老了而且內容主要是vi而不是vim但是也值得推薦

View File

@@ -4187,7 +4187,7 @@ objects/vim9script.o: vim9script.c vim.h protodef.h auto/config.h feature.h \
objects/vim9type.o: vim9type.c vim.h protodef.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h termdefs.h macros.h option.h beval.h \
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
proto.h globals.h errors.h
proto.h globals.h errors.h vim9.h
objects/viminfo.o: viminfo.c vim.h protodef.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h termdefs.h macros.h option.h beval.h \
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \

View File

@@ -119,6 +119,7 @@ static struct event_name
{"CursorMovedI", EVENT_CURSORMOVEDI},
{"DiffUpdated", EVENT_DIFFUPDATED},
{"DirChanged", EVENT_DIRCHANGED},
{"DirChangedPre", EVENT_DIRCHANGEDPRE},
{"EncodingChanged", EVENT_ENCODINGCHANGED},
{"ExitPre", EVENT_EXITPRE},
{"FileEncoding", EVENT_ENCODINGCHANGED},
@@ -216,9 +217,9 @@ static AutoPat *last_autopat[NUM_EVENTS] =
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
};
#define AUGROUP_DEFAULT -1 // default autocmd group
#define AUGROUP_ERROR -2 // erroneous autocmd group
#define AUGROUP_ALL -3 // all autocmd groups
#define AUGROUP_DEFAULT (-1) // default autocmd group
#define AUGROUP_ERROR (-2) // erroneous autocmd group
#define AUGROUP_ALL (-3) // all autocmd groups
/*
* struct used to keep status while executing autocommands for an event.
@@ -2042,7 +2043,7 @@ apply_autocmds_group(
{
sfname = vim_strsave(fname);
// Don't try expanding FileType, Syntax, FuncUndefined, WindowID,
// ColorScheme, QuickFixCmd* or DirChanged
// ColorScheme, QuickFixCmd*, DirChanged and similar.
if (event == EVENT_FILETYPE
|| event == EVENT_SYNTAX
|| event == EVENT_CMDLINECHANGED
@@ -2060,7 +2061,9 @@ apply_autocmds_group(
|| event == EVENT_OPTIONSET
|| event == EVENT_QUICKFIXCMDPOST
|| event == EVENT_DIRCHANGED
|| event == EVENT_DIRCHANGEDPRE
|| event == EVENT_MODECHANGED
|| event == EVENT_USER
|| event == EVENT_WINCLOSED)
{
fname = vim_strsave(fname);

View File

@@ -4164,6 +4164,7 @@ build_stl_str_hl(
stl_hlrec_T *sp;
int save_must_redraw = must_redraw;
int save_redr_type = curwin->w_redr_type;
int save_KeyTyped = KeyTyped;
if (stl_items == NULL)
{
@@ -5060,6 +5061,9 @@ build_stl_str_hl(
curwin->w_redr_type = save_redr_type;
}
// A user function may reset KeyTyped, restore it.
KeyTyped = save_KeyTyped;
return width;
}
#endif // FEAT_STL_OPT

View File

@@ -155,9 +155,8 @@ static long next_listener_id = 0;
/*
* Check if the change at "lnum" is above or overlaps with an existing
* change. If above then flush changes and invoke listeners.
* Returns TRUE if the change was merged.
*/
static int
static void
check_recorded_changes(
buf_T *buf,
linenr_T lnum,
@@ -185,7 +184,6 @@ check_recorded_changes(
}
}
}
return FALSE;
}
/*
@@ -206,8 +204,7 @@ may_record_change(
// If the new change is going to change the line numbers in already listed
// changes, then flush.
if (check_recorded_changes(curbuf, lnum, lnume, xtra))
return;
check_recorded_changes(curbuf, lnum, lnume, xtra);
if (curbuf->b_recorded_changes == NULL)
{
@@ -555,6 +552,9 @@ changed_common(
{
if (wp->w_buffer == curbuf)
{
#ifdef FEAT_FOLDING
linenr_T last = lnume + xtra - 1; // last line after the change
#endif
// Mark this window to be redrawn later.
if (wp->w_redr_type < VALID)
wp->w_redr_type = VALID;
@@ -564,7 +564,7 @@ changed_common(
#ifdef FEAT_FOLDING
// Update the folds for this window. Can't postpone this, because
// a following operator might work on the whole fold: ">>dd".
foldUpdate(wp, lnum, lnume + xtra - 1);
foldUpdate(wp, lnum, last);
// The change may cause lines above or below the change to become
// included in a fold. Set lnum/lnume to the first/last line that
@@ -574,8 +574,8 @@ changed_common(
i = hasFoldingWin(wp, lnum, &lnum, NULL, FALSE, NULL);
if (wp->w_cursor.lnum == lnum)
wp->w_cline_folded = i;
i = hasFoldingWin(wp, lnume, NULL, &lnume, FALSE, NULL);
if (wp->w_cursor.lnum == lnume)
i = hasFoldingWin(wp, last, NULL, &last, FALSE, NULL);
if (wp->w_cursor.lnum == last)
wp->w_cline_folded = i;
// If the changed line is in a range of previously folded lines,

View File

@@ -386,9 +386,9 @@ str_foldcase(
int len = orglen;
#define GA_CHAR(i) ((char_u *)ga.ga_data)[i]
#define GA_PTR(i) ((char_u *)ga.ga_data + i)
#define GA_PTR(i) ((char_u *)ga.ga_data + (i))
#define STR_CHAR(i) (buf == NULL ? GA_CHAR(i) : buf[i])
#define STR_PTR(i) (buf == NULL ? GA_PTR(i) : buf + i)
#define STR_PTR(i) (buf == NULL ? GA_PTR(i) : buf + (i))
// Copy "str" into "buf" or allocated memory, unmodified.
if (buf == NULL)
@@ -706,7 +706,7 @@ vim_strnsize(char_u *s, int len)
#ifdef FEAT_VARTABS
# define RET_WIN_BUF_CHARTABSIZE(wp, buf, p, col) \
if (*(p) == TAB && (!(wp)->w_p_list || wp->w_lcs_chars.tab1)) \
if (*(p) == TAB && (!(wp)->w_p_list || (wp)->w_lcs_chars.tab1)) \
{ \
return tabstop_padding(col, (buf)->b_p_ts, (buf)->b_p_vts_array); \
} \

File diff suppressed because it is too large Load Diff

View File

@@ -162,6 +162,22 @@ typedef struct {
# ifdef DYNAMIC_SODIUM
# ifdef MSWIN
# define SODIUM_PROC FARPROC
# define load_dll vimLoadLib
# define symbol_from_dll GetProcAddress
# define close_dll FreeLibrary
# define load_dll_error GetWin32Error
# else
# error Dynamic loading of libsodium is not supported for now.
//# define HINSTANCE void*
//# define SODIUM_PROC void*
//# define load_dll(n) dlopen((n), RTLD_LAZY|RTLD_GLOBAL)
//# define symbol_from_dll dlsym
//# define close_dll dlclose
//# define load_dll_error dlerror
# endif
# define sodium_init load_sodium
# define sodium_free dll_sodium_free
# define sodium_malloc dll_sodium_malloc
@@ -214,53 +230,72 @@ static void (*dll_randombytes_buf)(void * const buf, const size_t size);
static struct {
const char *name;
FARPROC *ptr;
SODIUM_PROC *ptr;
} sodium_funcname_table[] = {
{"sodium_init", (FARPROC*)&dll_sodium_init},
{"sodium_free", (FARPROC*)&dll_sodium_free},
{"sodium_malloc", (FARPROC*)&dll_sodium_malloc},
{"sodium_memzero", (FARPROC*)&dll_sodium_memzero},
{"sodium_mlock", (FARPROC*)&dll_sodium_mlock},
{"sodium_munlock", (FARPROC*)&dll_sodium_munlock},
{"crypto_secretstream_xchacha20poly1305_init_push", (FARPROC*)&dll_crypto_secretstream_xchacha20poly1305_init_push},
{"crypto_secretstream_xchacha20poly1305_push", (FARPROC*)&dll_crypto_secretstream_xchacha20poly1305_push},
{"crypto_secretstream_xchacha20poly1305_init_pull", (FARPROC*)&dll_crypto_secretstream_xchacha20poly1305_init_pull},
{"crypto_secretstream_xchacha20poly1305_pull", (FARPROC*)&dll_crypto_secretstream_xchacha20poly1305_pull},
{"crypto_pwhash", (FARPROC*)&dll_crypto_pwhash},
{"randombytes_buf", (FARPROC*)&dll_randombytes_buf},
{"sodium_init", (SODIUM_PROC*)&dll_sodium_init},
{"sodium_free", (SODIUM_PROC*)&dll_sodium_free},
{"sodium_malloc", (SODIUM_PROC*)&dll_sodium_malloc},
{"sodium_memzero", (SODIUM_PROC*)&dll_sodium_memzero},
{"sodium_mlock", (SODIUM_PROC*)&dll_sodium_mlock},
{"sodium_munlock", (SODIUM_PROC*)&dll_sodium_munlock},
{"crypto_secretstream_xchacha20poly1305_init_push", (SODIUM_PROC*)&dll_crypto_secretstream_xchacha20poly1305_init_push},
{"crypto_secretstream_xchacha20poly1305_push", (SODIUM_PROC*)&dll_crypto_secretstream_xchacha20poly1305_push},
{"crypto_secretstream_xchacha20poly1305_init_pull", (SODIUM_PROC*)&dll_crypto_secretstream_xchacha20poly1305_init_pull},
{"crypto_secretstream_xchacha20poly1305_pull", (SODIUM_PROC*)&dll_crypto_secretstream_xchacha20poly1305_pull},
{"crypto_pwhash", (SODIUM_PROC*)&dll_crypto_pwhash},
{"randombytes_buf", (SODIUM_PROC*)&dll_randombytes_buf},
{NULL, NULL}
};
static int
load_sodium(void)
sodium_runtime_link_init(int verbose)
{
static HANDLE hsodium = NULL;
static HINSTANCE hsodium = NULL;
const char *libname = "libsodium.dll";
int i;
if (hsodium != NULL)
return 0;
return OK;
hsodium = vimLoadLib("libsodium.dll");
hsodium = load_dll(libname);
if (hsodium == NULL)
{
// TODO: Show error message.
return -1;
if (verbose)
semsg(_(e_could_not_load_library_str_str), libname, load_dll_error());
return FAIL;
}
for (i = 0; sodium_funcname_table[i].ptr; ++i)
{
if ((*sodium_funcname_table[i].ptr = GetProcAddress(hsodium,
if ((*sodium_funcname_table[i].ptr = symbol_from_dll(hsodium,
sodium_funcname_table[i].name)) == NULL)
{
FreeLibrary(hsodium);
hsodium = NULL;
// TODO: Show error message.
return -1;
if (verbose)
semsg(_(e_could_not_load_library_function_str), sodium_funcname_table[i].name);
return FAIL;
}
}
return OK;
}
static int
load_sodium(void)
{
if (sodium_runtime_link_init(TRUE) == FAIL)
return -1;
return dll_sodium_init();
}
# endif
# if defined(DYNAMIC_SODIUM) || defined(PROTO)
int
sodium_enabled(int verbose)
{
return sodium_runtime_link_init(verbose) == OK;
}
# endif
#endif
#define CRYPT_MAGIC_LEN 12 // cannot change

View File

@@ -404,32 +404,32 @@ win_line(
// draw_state: items that are drawn in sequence:
#define WL_START 0 // nothing done yet
#ifdef FEAT_CMDWIN
# define WL_CMDLINE WL_START + 1 // cmdline window column
# define WL_CMDLINE (WL_START + 1) // cmdline window column
#else
# define WL_CMDLINE WL_START
#endif
#ifdef FEAT_FOLDING
# define WL_FOLD WL_CMDLINE + 1 // 'foldcolumn'
# define WL_FOLD (WL_CMDLINE + 1) // 'foldcolumn'
#else
# define WL_FOLD WL_CMDLINE
#endif
#ifdef FEAT_SIGNS
# define WL_SIGN WL_FOLD + 1 // column for signs
# define WL_SIGN (WL_FOLD + 1) // column for signs
#else
# define WL_SIGN WL_FOLD // column for signs
#endif
#define WL_NR WL_SIGN + 1 // line number
#define WL_NR (WL_SIGN + 1) // line number
#ifdef FEAT_LINEBREAK
# define WL_BRI WL_NR + 1 // 'breakindent'
# define WL_BRI (WL_NR + 1) // 'breakindent'
#else
# define WL_BRI WL_NR
#endif
#if defined(FEAT_LINEBREAK) || defined(FEAT_DIFF)
# define WL_SBR WL_BRI + 1 // 'showbreak' or 'diff'
# define WL_SBR (WL_BRI + 1) // 'showbreak' or 'diff'
#else
# define WL_SBR WL_BRI
#endif
#define WL_LINE WL_SBR + 1 // text in the line
#define WL_LINE (WL_SBR + 1) // text in the line
int draw_state = WL_START; // what to draw next
#if defined(FEAT_XIM) && defined(FEAT_GUI_GTK)
int feedback_col = 0;

View File

@@ -1112,10 +1112,10 @@ fold_line(
# define RL_MEMSET(p, v, l) \
do { \
if (wp->w_p_rl) \
for (ri = 0; ri < l; ++ri) \
for (ri = 0; ri < (l); ++ri) \
ScreenAttrs[off + (wp->w_width - (p) - (l)) + ri] = v; \
else \
for (ri = 0; ri < l; ++ri) \
for (ri = 0; ri < (l); ++ri) \
ScreenAttrs[off + (p) + ri] = v; \
} while (0)
#else

View File

@@ -2788,10 +2788,14 @@ EXTERN char e_missing_argument_type_for_str[]
INIT(= N_("E1077: Missing argument type for %s"));
// E1078 unused
// E1079 unused
// E1080 unused
EXTERN char e_invalid_assignment[]
INIT(= N_("E1080: Invalid assignment"));
EXTERN char e_cannot_unlet_str[]
INIT(= N_("E1081: Cannot unlet %s"));
// E1082 unused
#endif
EXTERN char e_command_modifier_without_command[]
INIT(= N_("E1082: Command modifier without command"));
#ifdef FEAT_EVAL
EXTERN char e_missing_backtick[]
INIT(= N_("E1083: Missing backtick"));
EXTERN char e_cannot_delete_vim9_script_function_str[]
@@ -2828,7 +2832,7 @@ EXTERN char e_unknown_error_while_executing_str[]
INIT(= N_("E1099: Unknown error while executing %s"));
EXTERN char e_command_not_supported_in_vim9_script_missing_var_str[]
INIT(= N_("E1100: Command not supported in Vim9 script (missing :var?): %s"));
EXTERN char e_cannot_declare_script_variable_in_function[]
EXTERN char e_cannot_declare_script_variable_in_function_str[]
INIT(= N_("E1101: Cannot declare a script variable in a function: %s"));
EXTERN char e_lambda_function_not_found_str[]
INIT(= N_("E1102: Lambda function not found: %s"));
@@ -3006,8 +3010,7 @@ EXTERN char e_variable_arguments_type_must_be_list_str[]
INIT(= N_("E1180: Variable arguments type must be a list: %s"));
EXTERN char e_cannot_use_underscore_here[]
INIT(= N_("E1181: Cannot use an underscore here"));
EXTERN char e_blob_required[]
INIT(= N_("E1182: Blob required"));
// E1182 unused
EXTERN char e_cannot_use_range_with_assignment_operator_str[]
INIT(= N_("E1183: Cannot use a range with an assignment operator: %s"));
#endif
@@ -3232,4 +3235,8 @@ EXTERN char e_critical_error_in_python3_initialization_check_your_installation[]
#ifdef FEAT_EVAL
EXTERN char e_function_name_must_start_with_capital_str[]
INIT(= N_("E1267: Function name must start with a capital: %s"));
EXTERN char e_cannot_use_s_colon_in_vim9_script_str[]
INIT(= N_("E1268: Cannot use s: in Vim9 script: %s"));
EXTERN char e_cannot_create_vim9_script_variable_in_function_str[]
INIT(= N_("E1269: Cannot create a Vim9 script variable in a function: %s"));
#endif

View File

@@ -865,6 +865,7 @@ get_lval(
hashtab_T *ht = NULL;
int quiet = flags & GLV_QUIET;
int writing;
int vim9script = in_vim9script();
// Clear everything in "lp".
CLEAR_POINTER(lp);
@@ -878,6 +879,14 @@ get_lval(
return lp->ll_name_end;
}
// Cannot use "s:var" at the Vim9 script level. "s: type" is OK.
if (vim9script && at_script_level()
&& name[0] == 's' && name[1] == ':' && !VIM_ISWHITE(name[2]))
{
semsg(_(e_cannot_use_s_colon_in_vim9_script_str), name);
return NULL;
}
// Find the end of the name.
p = find_name_end(name, &expr_start, &expr_end, fne_flags);
lp->ll_name_end = p;
@@ -910,7 +919,7 @@ get_lval(
{
lp->ll_name = name;
if (in_vim9script())
if (vim9script)
{
// "a: type" is declaring variable "a" with a type, not "a:".
if (p == name + 2 && p[-1] == ':')
@@ -958,8 +967,7 @@ get_lval(
if (*p == '.')
{
imported_T *import = find_imported(lp->ll_name, p - lp->ll_name,
TRUE, NULL);
imported_T *import = find_imported(lp->ll_name, p - lp->ll_name, TRUE);
if (import != NULL)
{
@@ -975,7 +983,7 @@ get_lval(
cc = *p;
*p = NUL;
if (find_exported(import->imp_sid, lp->ll_name, &ufunc, &type,
NULL, TRUE) == -1)
NULL, NULL, TRUE) == -1)
{
*p = cc;
return NULL;
@@ -988,7 +996,7 @@ get_lval(
if ((*p != '[' && *p != '.'))
return p;
if (in_vim9script() && lval_root != NULL)
if (vim9script && lval_root != NULL)
{
// using local variable
lp->ll_tv = lval_root;
@@ -1010,7 +1018,7 @@ get_lval(
lp->ll_tv = &v->di_tv;
}
if (in_vim9script() && (flags & GLV_NO_DECL) == 0)
if (vim9script && (flags & GLV_NO_DECL) == 0)
{
if (!quiet)
semsg(_(e_variable_already_declared), lp->ll_name);
@@ -1053,7 +1061,7 @@ get_lval(
return NULL;
}
if (in_vim9script() && lp->ll_valtype == NULL
if (vim9script && lp->ll_valtype == NULL
&& v != NULL
&& lp->ll_tv == &v->di_tv
&& ht != NULL && ht == get_script_local_ht())
@@ -2604,7 +2612,7 @@ eval2(char_u **arg, typval_T *rettv, evalarg_T *evalarg)
*arg = eval_next_line(evalarg_used);
else
{
if (evaluate && in_vim9script() && !VIM_ISWHITE(p[-1]))
if (evaluate && vim9script && !VIM_ISWHITE(p[-1]))
{
error_white_both(p, 2);
clear_tv(rettv);
@@ -2616,7 +2624,7 @@ eval2(char_u **arg, typval_T *rettv, evalarg_T *evalarg)
/*
* Get the second variable.
*/
if (evaluate && in_vim9script() && !IS_WHITE_OR_NUL((*arg)[2]))
if (evaluate && vim9script && !IS_WHITE_OR_NUL((*arg)[2]))
{
error_white_both(*arg, 2);
clear_tv(rettv);
@@ -2742,7 +2750,7 @@ eval3(char_u **arg, typval_T *rettv, evalarg_T *evalarg)
/*
* Get the second variable.
*/
if (evaluate && in_vim9script() && !IS_WHITE_OR_NUL((*arg)[2]))
if (evaluate && vim9script && !IS_WHITE_OR_NUL((*arg)[2]))
{
error_white_both(*arg, 2);
clear_tv(rettv);
@@ -3519,7 +3527,8 @@ eval7(
char_u *start_leader, *end_leader;
int ret = OK;
char_u *alias;
static int recurse = 0;
static int recurse = 0;
int vim9script = in_vim9script();
/*
* Initialise variable so that clear_tv() can't mistake this for a
@@ -3531,7 +3540,7 @@ eval7(
* Skip '!', '-' and '+' characters. They are handled later.
*/
start_leader = *arg;
if (eval_leader(arg, in_vim9script()) == FAIL)
if (eval_leader(arg, vim9script) == FAIL)
return FAIL;
end_leader = *arg;
@@ -3606,7 +3615,7 @@ eval7(
/*
* Dictionary: #{key: val, key: val}
*/
case '#': if (in_vim9script())
case '#': if (vim9script)
{
ret = vim9_bad_comment(*arg) ? FAIL : NOTDONE;
}
@@ -3623,10 +3632,10 @@ eval7(
* Lambda: {arg, arg -> expr}
* Dictionary: {'key': val, 'key': val}
*/
case '{': if (in_vim9script())
case '{': if (vim9script)
ret = NOTDONE;
else
ret = get_lambda_tv(arg, rettv, in_vim9script(), evalarg);
ret = get_lambda_tv(arg, rettv, vim9script, evalarg);
if (ret == NOTDONE)
ret = eval_dict(arg, rettv, evalarg, FALSE);
break;
@@ -3649,9 +3658,9 @@ eval7(
case '@': ++*arg;
if (evaluate)
{
if (in_vim9script() && IS_WHITE_OR_NUL(**arg))
if (vim9script && IS_WHITE_OR_NUL(**arg))
semsg(_(e_syntax_error_at_str), *arg);
else if (in_vim9script() && !valid_yank_reg(**arg, FALSE))
else if (vim9script && !valid_yank_reg(**arg, FALSE))
emsg_invreg(**arg);
else
{
@@ -3669,7 +3678,7 @@ eval7(
* or lambda: (arg) => expr
*/
case '(': ret = NOTDONE;
if (in_vim9script())
if (vim9script)
{
ret = get_lambda_tv(arg, rettv, TRUE, evalarg);
if (ret == OK && evaluate)
@@ -3727,12 +3736,18 @@ eval7(
{
int flags = evalarg == NULL ? 0 : evalarg->eval_flags;
if (evaluate && in_vim9script() && len == 1 && *s == '_')
if (evaluate && vim9script && len == 1 && *s == '_')
{
emsg(_(e_cannot_use_underscore_here));
ret = FAIL;
}
else if ((in_vim9script() ? **arg : *skipwhite(*arg)) == '(')
else if (evaluate && vim9script && len > 2
&& s[0] == 's' && s[1] == ':')
{
semsg(_(e_cannot_use_s_colon_in_vim9_script_str), s);
ret = FAIL;
}
else if ((vim9script ? **arg : *skipwhite(*arg)) == '(')
{
// "name(..." recursive!
*arg = skipwhite(*arg);
@@ -3743,21 +3758,19 @@ eval7(
else if (evaluate)
{
// get the value of "true", "false" or a variable
if (len == 4 && in_vim9script() && STRNCMP(s, "true", 4) == 0)
if (len == 4 && vim9script && STRNCMP(s, "true", 4) == 0)
{
rettv->v_type = VAR_BOOL;
rettv->vval.v_number = VVAL_TRUE;
ret = OK;
}
else if (len == 5 && in_vim9script()
&& STRNCMP(s, "false", 5) == 0)
else if (len == 5 && vim9script && STRNCMP(s, "false", 5) == 0)
{
rettv->v_type = VAR_BOOL;
rettv->vval.v_number = VVAL_FALSE;
ret = OK;
}
else if (len == 4 && in_vim9script()
&& STRNCMP(s, "null", 4) == 0)
else if (len == 4 && vim9script && STRNCMP(s, "null", 4) == 0)
{
rettv->v_type = VAR_SPECIAL;
rettv->vval.v_number = VVAL_NULL;
@@ -3812,6 +3825,7 @@ eval7_leader(
int error = FALSE;
varnumber_T val = 0;
vartype_T type = rettv->v_type;
int vim9script = in_vim9script();
#ifdef FEAT_FLOAT
float_T f = 0.0;
@@ -3822,7 +3836,7 @@ eval7_leader(
{
while (VIM_ISWHITE(end_leader[-1]))
--end_leader;
if (in_vim9script() && end_leader[-1] == '!')
if (vim9script && end_leader[-1] == '!')
val = tv2bool(rettv);
else
val = tv_get_number_chk(rettv, &error);
@@ -3847,7 +3861,7 @@ eval7_leader(
#ifdef FEAT_FLOAT
if (rettv->v_type == VAR_FLOAT)
{
if (in_vim9script())
if (vim9script)
{
rettv->v_type = VAR_BOOL;
val = f == 0.0 ? VVAL_TRUE : VVAL_FALSE;
@@ -3885,7 +3899,7 @@ eval7_leader(
#endif
{
clear_tv(rettv);
if (in_vim9script())
if (vim9script)
rettv->v_type = type;
else
rettv->v_type = VAR_NUMBER;
@@ -4137,7 +4151,7 @@ eval_index(
int range = FALSE;
char_u *key = NULL;
int keylen = -1;
int vim9 = in_vim9script();
int vim9script = in_vim9script();
if (check_can_index(rettv, evaluate, verbose) == FAIL)
return FAIL;
@@ -4168,7 +4182,7 @@ eval_index(
empty1 = TRUE;
else if (eval1(arg, &var1, evalarg) == FAIL) // recursive!
return FAIL;
else if (vim9 && **arg == ':')
else if (vim9script && **arg == ':')
{
semsg(_(e_white_space_required_before_and_after_str_at_str),
":", *arg);
@@ -4181,14 +4195,14 @@ eval_index(
#ifdef FEAT_FLOAT
// allow for indexing with float
if (vim9 && rettv->v_type == VAR_DICT
if (vim9script && rettv->v_type == VAR_DICT
&& var1.v_type == VAR_FLOAT)
{
var1.vval.v_string = typval_tostring(&var1, TRUE);
var1.v_type = VAR_STRING;
}
#endif
if (vim9 && rettv->v_type == VAR_LIST)
if (vim9script && rettv->v_type == VAR_LIST)
tv_get_number_chk(&var1, &error);
else
error = tv_get_string_chk(&var1) == NULL;
@@ -4208,7 +4222,7 @@ eval_index(
{
range = TRUE;
++*arg;
if (vim9 && !IS_WHITE_OR_NUL(**arg) && **arg != ']')
if (vim9script && !IS_WHITE_OR_NUL(**arg) && **arg != ']')
{
semsg(_(e_white_space_required_before_and_after_str_at_str),
":", *arg - 1);
@@ -6056,7 +6070,7 @@ handle_subscript(
**arg = NUL;
idx = find_exported(rettv->vval.v_number, exp_name, &ufunc, &type,
evalarg->eval_cctx, verbose);
evalarg->eval_cctx, evalarg->eval_cstack, verbose);
**arg = cc;
if (idx < 0 && ufunc == NULL)
@@ -6491,8 +6505,16 @@ ex_execute(exarg_T *eap)
did_emsg = save_did_emsg;
}
else if (eap->cmdidx == CMD_execute)
{
int save_sticky_cmdmod_flags = sticky_cmdmod_flags;
// "legacy exe cmd" and "vim9cmd exe cmd" applies to "cmd".
sticky_cmdmod_flags = cmdmod.cmod_flags
& (CMOD_LEGACY | CMOD_VIM9CMD);
do_cmdline((char_u *)ga.ga_data,
eap->getline, eap->cookie, DOCMD_NOWAIT|DOCMD_VERBOSE);
sticky_cmdmod_flags = save_sticky_cmdmod_flags;
}
}
ga_clear(&ga);

View File

@@ -3131,7 +3131,7 @@ f_call(typval_T *argvars, typval_T *rettv)
dot = vim_strchr(func, '.');
if (dot != NULL)
{
imported_T *import = find_imported(func, dot - func, TRUE, NULL);
imported_T *import = find_imported(func, dot - func, TRUE);
if (import != NULL && SCRIPT_ID_VALID(import->imp_sid))
{
@@ -5997,7 +5997,7 @@ f_has(typval_T *argvars, typval_T *rettv)
#endif
},
{"sodium",
#ifdef FEAT_SODIUM
#if defined(FEAT_SODIUM) && !defined(DYNAMIC_SODIUM)
1
#else
0
@@ -6318,6 +6318,10 @@ f_has(typval_T *argvars, typval_T *rettv)
else if (STRICMP(name, "tcl") == 0)
n = tcl_enabled(FALSE);
#endif
#ifdef DYNAMIC_SODIUM
else if (STRICMP(name, "sodium") == 0)
n = sodium_enabled(FALSE);
#endif
#if defined(FEAT_TERMINAL) && defined(MSWIN)
else if (STRICMP(name, "terminal") == 0)
n = terminal_enabled();
@@ -7874,21 +7878,21 @@ init_srand(UINT32_T *x)
*x = vim_time();
}
#define ROTL(x, k) ((x << k) | (x >> (32 - k)))
#define ROTL(x, k) (((x) << (k)) | ((x) >> (32 - (k))))
#define SPLITMIX32(x, z) ( \
z = (x += 0x9e3779b9), \
z = (z ^ (z >> 16)) * 0x85ebca6b, \
z = (z ^ (z >> 13)) * 0xc2b2ae35, \
z ^ (z >> 16) \
(z) = ((x) += 0x9e3779b9), \
(z) = ((z) ^ ((z) >> 16)) * 0x85ebca6b, \
(z) = ((z) ^ ((z) >> 13)) * 0xc2b2ae35, \
(z) ^ ((z) >> 16) \
)
#define SHUFFLE_XOSHIRO128STARSTAR(x, y, z, w) \
result = ROTL(y * 5, 7) * 9; \
t = y << 9; \
z ^= x; \
w ^= y; \
y ^= z, x ^= w; \
z ^= t; \
w = ROTL(w, 11);
result = ROTL((y) * 5, 7) * 9; \
t = (y) << 9; \
(z) ^= (x); \
(w) ^= (y); \
(y) ^= (z), (x) ^= (w); \
(z) ^= t; \
(w) = ROTL(w, 11);
/*
* "rand()" function

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