Compare commits

...

66 Commits

Author SHA1 Message Date
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
Bram Moolenaar
3a5988c025 patch 8.2.4331: Vim9: no test for existing script variable in block
Problem:    Vim9: no test for existing script variable in block.
Solution:   Add a test.
2022-02-08 19:23:35 +00:00
Bram Moolenaar
779aeff5c3 patch 8.2.4330: Vim9: no error if script imports itself
Problem:    Vim9: no error if script imports itself.
Solution:   Give an error when a script imports itself.
2022-02-08 19:12:19 +00:00
haya14busa
e023d49937 patch 8.2.4329: no support for end line number and column in 'errorformat'
Problem:    No support for end line number and column in 'errorformat'.
Solution:   Add %e and %k. (closes #9624)
2022-02-08 18:09:29 +00:00
Bram Moolenaar
73a16c22a4 patch 8.2.4328: command line complete matches cleard when typing character
Problem:    Command line complete matches cleard when typing character.
            (Dominique Pellé)
Solution:   Only remove a popup menu if there is one.
2022-02-08 17:40:36 +00:00
Bram Moolenaar
e3537aec2f patch 8.2.4327: may end up with no current buffer
Problem:    May end up with no current buffer.
Solution:   When deleting the current buffer to not pick a quickfix buffer as
            the new current buffer.
2022-02-08 15:05:20 +00:00
zeertzjq
51ab7c7d0d patch 8.2.4326: "o" and "O" copying comment not sufficiently tested
Problem:    "o" and "O" copying comment not sufficiently tested.
Solution:   Add a test case. (closes #9718)
2022-02-08 12:58:37 +00:00
Yegappan Lakshmanan
3908ef5017 patch 8.2.4325: 'wildmenu' only shows few matches
Problem:    'wildmenu' only shows few matches.
Solution:   Add the "pum" option: use a popup menu to show the matches.
            (Yegappan Lakshmanan et al., closes #9707)
2022-02-08 12:08:07 +00:00
Bram Moolenaar
3787f26c2e patch 8.2.4324: Vim9: script-local function name can start with "_"
Problem:    Vim9: script-local function name can start with "_".
Solution:   Check for leading capital after "s:".  Correct error message.
2022-02-07 21:54:01 +00:00
Bram Moolenaar
f681cfb90b patch 8.2.4323: Vim9: nested function name can start with "_"
Problem:    Vim9: nested function name can start with "_".
Solution:   Use same rule for function name for nested functions.
            (closes #9713)
2022-02-07 20:30:57 +00:00
Bram Moolenaar
7aca5ca676 patch 8.2.4322: Vim9: crash when using funcref with closure
Problem:    Vim9: crash when using funcref with closure.
Solution:   Keep a reference to the funcref that has the outer context.
            (closes #9716)
2022-02-07 19:56:43 +00:00
Bram Moolenaar
92368aad61 patch 8.2.4321: Vim9: crash when using a funcref to a closure
Problem:    Vim9: crash when using a funcref to a closure.
Solution:   Copy pt_outer to the new partial. (closes #9714)
2022-02-07 17:50:39 +00:00
qsmodo
28f1a51bde patch 8.2.4320: Athena and Motif: when maximized scrollbar position is wrong
Problem:    Athena and Motif: when maximized scrollbar position is wrong.
Solution:   Implement the scrollbar padding functions. (closes #9712)
2022-02-07 15:57:50 +00:00
Bram Moolenaar
4e713bafc0 patch 8.2.4319: :put does not work properly in compiled function
Problem:    :put does not work properly in compiled function. (John Beckett)
Solution:   Adjust the direction when using line zero.
2022-02-07 15:31:37 +00:00
Bram Moolenaar
54969f4ef5 patch 8.2.4318: various comment and indent mistakes, returning wrong zero
Problem:    Various comment and indent mistakes, returning wrong zero.
Solution:   Fix the mistakes.  Return NULL instead of FAIL.
2022-02-07 13:56:44 +00:00
Bram Moolenaar
63ff72aab9 patch 8.2.4317: MS-Windows: Vim exits when Python 3 initialisation fails
Problem:    MS-Windows: Vim exits when Python 3 initialisation fails.
Solution:   Hook into the exit() function to recover from the failure.
            (Ken Takata, closes #9710)
2022-02-07 13:54:01 +00:00
K.Takata
b247e0622e patch 8.2.4316: __CYGWIN32__ is not defined on 64 bit systems
Problem:    __CYGWIN32__ is not defined on 64 bit systems.
Solution:   Update #ifdefs. (Ken Takata, closes #9709)
2022-02-07 10:45:23 +00:00
zeertzjq
6bf821e8ab patch 8.2.4315: put in Visual mode not fully tested
Problem:    Put in Visual mode not fully tested.
Solution:   Add a few more test cases. (closes #9708)
2022-02-07 10:33:20 +00:00
Bram Moolenaar
8cbf249917 patch 8.2.4314: test fails where lines are skipped
Problem:    Test fails where lines are skipped.
Solution:   Only give an error when not skipping commands.
2022-02-06 20:28:13 +00:00
Bram Moolenaar
5f4ef5f5e5 patch 8.2.4313: Vim9: cannot change type of list after making a slice
Problem:    Vim9: cannot change type of list after making a slice.
Solution:   Adjust the declared member type. (closes #9696)
2022-02-06 18:36:53 +00:00
Bram Moolenaar
107f7325f6 patch 8.2.4312: no error for using :vim9script in a :def function
Problem:    No error for using :vim9script in a :def function.
Solution:   Give an error when compiling.
2022-02-06 17:30:41 +00:00
Bram Moolenaar
160afdb185 patch 8.2.4311: Vim9: changing script variable type not caught compile time
Problem:    Vim9: changing script variable type not caught at compile time.
Solution:   Set the declared type.
2022-02-06 17:17:02 +00:00
225 changed files with 4023 additions and 1616 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,7 +344,7 @@ 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
@@ -352,7 +352,7 @@ jobs:
# 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 +360,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
@@ -410,6 +410,9 @@ jobs:
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
echo "PYTHON3_DIR=$python3_dir" >> $GITHUB_ENV
if ${{ matrix.toolchain == 'mingw' && matrix.arch == 'x64' && matrix.features == 'HUGE' }}; then
echo "COVERAGE=yes" >> $GITHUB_ENV
fi
- uses: msys2/setup-msys2@v2
if: matrix.toolchain == 'mingw'
@@ -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=${COVERAGE}
else
mingw32-make -f Make_ming.mak -j2 \
FEATURES=${{ matrix.features }} \
@@ -522,6 +525,12 @@ jobs:
# name: vim${{ matrix.bits }}-${{ matrix.toolchain }}
# path: ./artifacts
- name: Copy gcov data files to src2
if: env.COVERAGE
shell: msys2 {0}
run: |
find src -name '*.gcno' | tar -c -T - | tar -x -C src2 --strip-components 1
- name: Test
shell: cmd
timeout-minutes: 20
@@ -562,3 +571,26 @@ jobs:
exit 1
)
echo ::endgroup::
- name: Generate gcov files
if: env.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: env.COVERAGE
uses: codecov/codecov-action@v2
with:
directory: src
flags: windows,${{ matrix.toolchain }}-${{ matrix.arch }}-${{ matrix.features }}-gui
- name: Codecov (vim)
if: env.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
@@ -8974,7 +8974,8 @@ A jump table for the options with a short description can be found at |Q_op|.
mode. On pressing 'wildchar' (usually <Tab>) to invoke completion,
the possible matches are shown just above the command line, with the
first match highlighted (overwriting the status line, if there is
one). Keys that show the previous/next match, such as <Tab> or
one). This is the behavior without "pum" in 'wildoptions.
Keys that show the previous/next match, such as <Tab> or
CTRL-P/CTRL-N, cause the highlight to move to the appropriate match.
When 'wildmode' is used, "wildmenu" mode is used where "full" is
specified. "longest" and "list" do not start "wildmenu" mode.
@@ -8982,10 +8983,12 @@ A jump table for the options with a short description can be found at |Q_op|.
If there are more matches than can fit in the line, a ">" is shown on
the right and/or a "<" is shown on the left. The status line scrolls
as needed.
When 'wildoptions' contains "pum", then the completion matches are
shown in a popup menu.
The "wildmenu" mode is abandoned when a key is hit that is not used
for selecting a completion.
While the "wildmenu" is active the following keys have special
meanings:
While the "wildmenu" is active, not using the popup menu, the
following keys have special meanings:
<Left> <Right> - select previous/next match (like CTRL-P/CTRL-N)
<Down> - in filename/menu name completion: move into a
@@ -8995,6 +8998,21 @@ A jump table for the options with a short description can be found at |Q_op|.
<Up> - in filename/menu name completion: move up into
parent directory or parent menu.
When using the popup menu for command line completion, the following
keys have special meanings:
<Down> - select next match (like CTRL-N)
<Left> - in filename/menu name completion: move up into
parent directory or parent menu.
<Right> - in filename/menu name completion: move into a
subdirectory or submenu.
<Up> - select previous match (like CTRL-P)
CTRL-E - end completion, go back to what was there before
selecting a match.
CTRL-N - go to the next entry
CTRL-P - go to the previous entry
CTRL-Y - accept the currently selected match and stop
completion.
This makes the menus accessible from the console |console-menus|.
If you prefer the <Left> and <Right> keys to move the cursor instead
@@ -9057,14 +9075,15 @@ A jump table for the options with a short description can be found at |Q_op|.
global
{not available when compiled without the |+wildignore|
feature}
A list of words that change how command line completion is done.
Currently only one word is allowed:
A list of words that change how |cmdline-completion| is done.
The following values are supported:
pum Display the completion matches using the popupmenu
in the same style as the |ins-completion-menu|.
tagfile When using CTRL-D to list matching tags, the kind of
tag and the file of the tag is listed. Only one match
is displayed per line. Often used tag kinds are:
d #define
f function
Also see |cmdline-completion|.
*'winaltkeys'* *'wak'*
'winaltkeys' 'wak' string (default "menu")

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
@@ -1385,12 +1385,17 @@ Basic items
%f file name (finds a string)
%o module name (finds a string)
%l line number (finds a number)
%e end line number (finds a number)
%c column number (finds a number representing character
column of the error, byte index, a <tab> is 1
character column)
%v virtual column number (finds a number representing
screen column of the error (1 <tab> == 8 screen
columns))
%k end column number (finds a number representing
the character column of the error, byte index, or a
number representing screen end column of the error if
it's used with %v)
%t error type (finds a single character):
e - error message
w - warning message

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

@@ -1547,6 +1547,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

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

@@ -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},
@@ -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

@@ -1430,8 +1430,14 @@ do_buffer_ext(
buf = buflist_findnr(curwin->w_jumplist[jumpidx].fmark.fnum);
if (buf != NULL)
{
if (buf == curbuf || !buf->b_p_bl)
buf = NULL; // skip current and unlisted bufs
// Skip current and unlisted bufs. Also skip a quickfix
// buffer, it might be deleted soon.
if (buf == curbuf || !buf->b_p_bl
#if defined(FEAT_QUICKFIX)
|| bt_quickfix(buf)
#endif
)
buf = NULL;
else if (buf->b_ml.ml_mfp == NULL)
{
// skip unloaded buf, but may keep it for later
@@ -1467,7 +1473,11 @@ do_buffer_ext(
continue;
}
// in non-help buffer, try to skip help buffers, and vv
if (buf->b_help == curbuf->b_help && buf->b_p_bl)
if (buf->b_help == curbuf->b_help && buf->b_p_bl
#if defined(FEAT_QUICKFIX)
&& !bt_quickfix(buf)
#endif
)
{
if (buf->b_ml.ml_mfp != NULL) // found loaded buffer
break;
@@ -1485,7 +1495,11 @@ do_buffer_ext(
if (buf == NULL) // No loaded buffer, find listed one
{
FOR_ALL_BUFFERS(buf)
if (buf->b_p_bl && buf != curbuf)
if (buf->b_p_bl && buf != curbuf
#if defined(FEAT_QUICKFIX)
&& !bt_quickfix(buf)
#endif
)
break;
}
if (buf == NULL) // Still no buffer, just take one
@@ -1494,6 +1508,10 @@ do_buffer_ext(
buf = curbuf->b_next;
else
buf = curbuf->b_prev;
#if defined(FEAT_QUICKFIX)
if (bt_quickfix(buf))
buf = NULL;
#endif
}
}

View File

@@ -651,7 +651,7 @@ build_drop_cmd(
ga_concat(&ga, (char_u *)":");
if (inicmd != NULL)
{
// Can't use <CR> after "inicmd", because an "startinsert" would cause
// Can't use <CR> after "inicmd", because a "startinsert" would cause
// the following commands to be inserted as text. Use a "|",
// hopefully "inicmd" does allow this...
ga_concat(&ga, inicmd);

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

@@ -571,6 +571,7 @@ redraw_custom_statusline(win_T *wp)
{
static int entered = FALSE;
int saved_did_emsg = did_emsg;
int saved_KeyTyped = KeyTyped;
// When called recursively return. This can happen when the statusline
// contains an expression that triggers a redraw.
@@ -591,6 +592,9 @@ redraw_custom_statusline(win_T *wp)
}
did_emsg |= saved_did_emsg;
entered = FALSE;
// A user function may reset KeyTyped, restore it.
KeyTyped = saved_KeyTyped;
}
#endif
@@ -3048,6 +3052,10 @@ redraw_after_callback(int call_update_screen, int do_message)
}
else if (State & CMDLINE)
{
#ifdef FEAT_WILDMENU
if (pum_visible())
cmdline_pum_display();
#endif
// Don't redraw when in prompt_for_number().
if (cmdline_row > 0)
{

View File

@@ -2802,7 +2802,8 @@ EXTERN char e_function_reference_invalid[]
INIT(= N_("E1086: Function reference invalid"));
EXTERN char e_cannot_use_index_when_declaring_variable[]
INIT(= N_("E1087: Cannot use an index when declaring a variable"));
// E1088 unused
EXTERN char e_script_cannot_import_itself[]
INIT(= N_("E1088: Script cannot import itself"));
EXTERN char e_unknown_variable_str[]
INIT(= N_("E1089: Unknown variable: %s"));
EXTERN char e_cannot_assign_to_argument[]
@@ -2827,7 +2828,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"));
@@ -3224,3 +3225,15 @@ EXTERN char e_autoload_import_cannot_use_absolute_or_relative_path[]
EXTERN char e_cannot_use_partial_here[]
INIT(= N_("E1265: Cannot use a partial here"));
#endif
#if defined(FEAT_PYTHON3) && defined(MSWIN)
EXTERN char e_critical_error_in_python3_initialization_check_your_installation[]
INIT(= N_("E1266: Critical error in python3 initialization, check your python3 installation"));
#endif
#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

@@ -629,10 +629,10 @@ eval_expr(char_u *arg, exarg_T *eap)
*/
static char_u *
deref_function_name(
char_u **arg,
char_u **tofree,
evalarg_T *evalarg,
int verbose)
char_u **arg,
char_u **tofree,
evalarg_T *evalarg,
int verbose)
{
typval_T ref;
char_u *name = *arg;
@@ -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] == ':')
@@ -975,7 +984,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 +997,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 +1019,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 +1062,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 +2613,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 +2625,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 +2751,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);
@@ -2955,7 +2964,7 @@ eval_addlist(typval_T *tv1, typval_T *tv2)
/*
* Handle fourth level expression:
* + number addition
* + number addition, concatenation of list or blob
* - number subtraction
* . string concatenation (if script version is 1)
* .. string concatenation
@@ -3519,7 +3528,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 +3541,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 +3616,7 @@ eval7(
/*
* Dictionary: #{key: val, key: val}
*/
case '#': if (in_vim9script())
case '#': if (vim9script)
{
ret = vim9_bad_comment(*arg) ? FAIL : NOTDONE;
}
@@ -3623,10 +3633,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 +3659,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 +3679,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 +3737,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 +3759,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 +3826,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 +3837,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 +3862,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 +3900,7 @@ eval7_leader(
#endif
{
clear_tv(rettv);
if (in_vim9script())
if (vim9script)
rettv->v_type = type;
else
rettv->v_type = VAR_NUMBER;
@@ -4137,7 +4152,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 +4183,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 +4196,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 +4223,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);
@@ -4526,6 +4541,9 @@ partial_free(partial_T *pt)
// "out_up" is no longer used, decrement refcount on partial that owns it.
partial_unref(pt->pt_outer.out_up_partial);
// Using pt_outer from another partial.
partial_unref(pt->pt_outer_partial);
// Decrease the reference count for the context of a closure. If down
// to the minimum it may be time to free it.
if (pt->pt_funcstack != NULL)
@@ -6053,7 +6071,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)
@@ -6488,8 +6506,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

@@ -4454,6 +4454,12 @@ common_function(typval_T *argvars, typval_T *rettv, int is_funcref)
pt->pt_name = name;
func_ref(name);
}
if (arg_pt != NULL)
{
pt->pt_outer_partial = arg_pt;
++arg_pt->pt_refcount;
}
}
rettv->v_type = VAR_PARTIAL;
rettv->vval.v_partial = pt;
@@ -5991,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
@@ -6312,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();
@@ -10330,7 +10340,7 @@ f_visualmode(typval_T *argvars, typval_T *rettv)
f_wildmenumode(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
{
#ifdef FEAT_WILDMENU
if (wild_menu_showing)
if (wild_menu_showing || ((State & CMDLINE) && cmdline_pum_active()))
rettv->vval.v_number = 1;
#endif
}

View File

@@ -3461,7 +3461,8 @@ set_var_const(
semsg(_(e_illegal_variable_name_str), name);
goto failed;
}
is_script_local = ht == get_script_local_ht() || sid != 0 || var_in_autoload;
is_script_local = ht == get_script_local_ht() || sid != 0
|| var_in_autoload;
if (vim9script
&& !is_script_local
@@ -3503,6 +3504,12 @@ set_var_const(
semsg(_(e_cannot_use_str_itself_it_is_imported), name);
goto failed;
}
if (!in_vim9script())
{
semsg(_(e_cannot_create_vim9_script_variable_in_function_str),
name);
goto failed;
}
}
if (dest_tv == NULL)

View File

@@ -2786,6 +2786,7 @@ parse_command_modifiers(
int starts_with_colon = FALSE;
CLEAR_POINTER(cmod);
cmod->cmod_flags = sticky_cmdmod_flags;
// Repeat until no more command modifiers are found.
for (;;)
@@ -7342,6 +7343,26 @@ post_chdir(cdscope_T scope)
shorten_fnames(TRUE);
}
/*
* Trigger DirChangedPre for "acmd_fname" with directory "new_dir".
*/
void
trigger_DirChangedPre(char_u *acmd_fname, char_u *new_dir)
{
#ifdef FEAT_EVAL
dict_T *v_event;
save_v_event_T save_v_event;
v_event = get_v_event(&save_v_event);
(void)dict_add_string(v_event, "directory", new_dir);
dict_set_items_ro(v_event);
#endif
apply_autocmds(EVENT_DIRCHANGEDPRE, acmd_fname, new_dir, FALSE, curbuf);
#ifdef FEAT_EVAL
restore_v_event(v_event, &save_v_event);
#endif
}
/*
* Change directory function used by :cd/:tcd/:lcd Ex commands and the
* chdir() function.
@@ -7358,7 +7379,7 @@ changedir_func(
{
char_u *pdir = NULL;
int dir_differs;
char_u *acmd_fname;
char_u *acmd_fname = NULL;
char_u **pp;
if (new_dir == NULL || allbuf_locked())
@@ -7411,12 +7432,23 @@ changedir_func(
new_dir = NameBuff;
}
dir_differs = pdir == NULL
|| pathcmp((char *)pdir, (char *)new_dir, -1) != 0;
if (dir_differs && vim_chdir(new_dir))
|| pathcmp((char *)pdir, (char *)new_dir, -1) != 0;
if (dir_differs)
{
emsg(_(e_command_failed));
vim_free(pdir);
return FALSE;
if (scope == CDSCOPE_WINDOW)
acmd_fname = (char_u *)"window";
else if (scope == CDSCOPE_TABPAGE)
acmd_fname = (char_u *)"tabpage";
else
acmd_fname = (char_u *)"global";
trigger_DirChangedPre(acmd_fname, new_dir);
if (vim_chdir(new_dir))
{
emsg(_(e_command_failed));
vim_free(pdir);
return FALSE;
}
}
if (scope == CDSCOPE_WINDOW)
@@ -7431,16 +7463,7 @@ changedir_func(
post_chdir(scope);
if (dir_differs)
{
if (scope == CDSCOPE_WINDOW)
acmd_fname = (char_u *)"window";
else if (scope == CDSCOPE_TABPAGE)
acmd_fname = (char_u *)"tabpage";
else
acmd_fname = (char_u *)"global";
apply_autocmds(EVENT_DIRCHANGED, acmd_fname, new_dir, FALSE,
curbuf);
}
apply_autocmds(EVENT_DIRCHANGED, acmd_fname, new_dir, FALSE, curbuf);
return TRUE;
}

View File

@@ -924,9 +924,18 @@ cmdline_wildchar_complete(
// if 'wildmode' contains "list" may still need to list
if (xp->xp_numfiles > 1
&& !*did_wild_list
&& (wim_flags[wim_index] & WIM_LIST))
&& ((wim_flags[wim_index] & WIM_LIST)
#ifdef FEAT_WILDMENU
|| (p_wmnu && (wim_flags[wim_index] & WIM_FULL) != 0)
#endif
))
{
#ifdef FEAT_WILDMENU
(void)showmatches(xp,
p_wmnu && ((wim_flags[wim_index] & WIM_LIST) == 0));
#else
(void)showmatches(xp, FALSE);
#endif
redrawcmd();
*did_wild_list = TRUE;
}
@@ -1848,15 +1857,37 @@ getcmdline_int(
#ifdef FEAT_WILDMENU
c = wildmenu_translate_key(&ccline, c, &xpc, did_wild_list);
if (cmdline_pum_active())
{
// Ctrl-Y: Accept the current selection and close the popup menu.
// Ctrl-E: cancel the cmdline popup menu and return the original
// text.
if (c == Ctrl_E || c == Ctrl_Y)
{
int wild_type;
wild_type = (c == Ctrl_E) ? WILD_CANCEL : WILD_APPLY;
if (nextwild(&xpc, wild_type, WILD_NO_BEEP,
firstc != '@') == FAIL)
break;
c = Ctrl_E;
}
}
#endif
// free expanded names when finished walking through matches
if (xpc.xp_numfiles != -1
&& !(c == p_wc && KeyTyped) && c != p_wcm
if (!(c == p_wc && KeyTyped) && c != p_wcm
&& c != Ctrl_N && c != Ctrl_P && c != Ctrl_A
&& c != Ctrl_L)
{
(void)ExpandOne(&xpc, NULL, NULL, 0, WILD_FREE);
#ifdef FEAT_WILDMENU
if (cmdline_pum_active())
cmdline_pum_remove();
#endif
if (xpc.xp_numfiles != -1)
(void)ExpandOne(&xpc, NULL, NULL, 0, WILD_FREE);
did_wild_list = FALSE;
#ifdef FEAT_WILDMENU
if (!p_wmnu || (c != K_UP && c != K_DOWN))
@@ -1950,10 +1981,22 @@ getcmdline_int(
// <S-Tab> goes to last match, in a clumsy way
if (c == K_S_TAB && KeyTyped)
{
if (nextwild(&xpc, WILD_EXPAND_KEEP, 0, firstc != '@') == OK
&& nextwild(&xpc, WILD_PREV, 0, firstc != '@') == OK
&& nextwild(&xpc, WILD_PREV, 0, firstc != '@') == OK)
goto cmdline_changed;
if (nextwild(&xpc, WILD_EXPAND_KEEP, 0, firstc != '@') == OK)
{
if (xpc.xp_numfiles > 1)
{
#ifdef FEAT_WILDMENU
// Trigger the popup menu when wildoptions=pum
showmatches(&xpc, p_wmnu
&& ((wim_flags[wim_index] & WIM_LIST) == 0));
#else
(void)showmatches(&xpc, FALSE);
#endif
}
if (nextwild(&xpc, WILD_PREV, 0, firstc != '@') == OK
&& nextwild(&xpc, WILD_PREV, 0, firstc != '@') == OK)
goto cmdline_changed;
}
}
if (c == NUL || c == K_ZERO) // NUL is stored as NL
@@ -2220,8 +2263,16 @@ getcmdline_int(
goto cmdline_not_changed;
case Ctrl_A: // all matches
#ifdef FEAT_WILDMENU
if (cmdline_pum_active())
// As Ctrl-A completes all the matches, close the popup
// menu (if present)
cmdline_pum_cleanup(&ccline);
#endif
if (nextwild(&xpc, WILD_ALL, 0, firstc != '@') == FAIL)
break;
xpc.xp_context = EXPAND_NOTHING;
did_wild_list = FALSE;
goto cmdline_changed;
case Ctrl_L:

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