Compare commits
268 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
327d3ee455 | ||
|
|
eaf3f36168 | ||
|
|
6868634abd | ||
|
|
78e006b9b0 | ||
|
|
e2390c7f32 | ||
|
|
7e6a2a64f0 | ||
|
|
9088784972 | ||
|
|
f723701de0 | ||
|
|
4490ec4e83 | ||
|
|
5d7c2df536 | ||
|
|
53ba05b090 | ||
|
|
29b857150c | ||
|
|
ccb148ac63 | ||
|
|
678b207fb1 | ||
|
|
ff34bee3a2 | ||
|
|
3c77b6a1ce | ||
|
|
a764e73d4f | ||
|
|
2ec28aec9d | ||
|
|
7a4ca32175 | ||
|
|
8a4c812ede | ||
|
|
3ed0d93796 | ||
|
|
2eb6fc3b52 | ||
|
|
5bca906b30 | ||
|
|
7d60384a00 | ||
|
|
9c9472ff49 | ||
|
|
5a9e5845e1 | ||
|
|
7973de35ba | ||
|
|
dd0b287c1e | ||
|
|
88421d6dc8 | ||
|
|
1a3e5747b7 | ||
|
|
5a234eb18e | ||
|
|
0ad871dc4d | ||
|
|
1b862c466b | ||
|
|
c9e7e344ed | ||
|
|
cd268017cf | ||
|
|
5dd839ce20 | ||
|
|
2b59df00d8 | ||
|
|
7a3fe3e180 | ||
|
|
a74901929e | ||
|
|
f674b358fc | ||
|
|
d8e44476d8 | ||
|
|
05bd9785fd | ||
|
|
c4c5642513 | ||
|
|
cd9172077b | ||
|
|
189663bdac | ||
|
|
11d7e62f1d | ||
|
|
63cb6567f0 | ||
|
|
e29a27f6f8 | ||
|
|
9fa5dabedc | ||
|
|
83494b4ac6 | ||
|
|
9bb0dad0d8 | ||
|
|
605793500b | ||
|
|
ac2cd2b08f | ||
|
|
6106504e9e | ||
|
|
98c2eaed27 | ||
|
|
885971e2f5 | ||
|
|
9ff9c7b974 | ||
|
|
f6488547e3 | ||
|
|
24e9316560 | ||
|
|
4db572eeb2 | ||
|
|
ad2d4969e1 | ||
|
|
0c35752d04 | ||
|
|
c6ba2f9dde | ||
|
|
47bc9c3337 | ||
|
|
a9a7c0c602 | ||
|
|
20c370d9f2 | ||
|
|
f5f1b59d3b | ||
|
|
d8cee76b49 | ||
|
|
5245beb37c | ||
|
|
378697ac58 | ||
|
|
547f94f330 | ||
|
|
b5841b99e6 | ||
|
|
9e60e899ee | ||
|
|
0894e0d808 | ||
|
|
1557b16dad | ||
|
|
1a71d31bf3 | ||
|
|
c816a2c226 | ||
|
|
4a0b85ad01 | ||
|
|
5bea41dea3 | ||
|
|
1840a7b4e3 | ||
|
|
16e26a3116 | ||
|
|
ee41052ccb | ||
|
|
042414fa00 | ||
|
|
841e498c5d | ||
|
|
7b7a118e74 | ||
|
|
11005b078d | ||
|
|
ffcfddc759 | ||
|
|
c72bdd28ac | ||
|
|
cc7eb2aa7a | ||
|
|
5231224e11 | ||
|
|
648594eaf7 | ||
|
|
c03fe66ade | ||
|
|
4ece152ad6 | ||
|
|
0f1227f7d5 | ||
|
|
d9162550aa | ||
|
|
1aeddeb8bd | ||
|
|
de69a7353e | ||
|
|
482d2f37a5 | ||
|
|
a2438132a6 | ||
|
|
31e21766d6 | ||
|
|
c323527d67 | ||
|
|
fe3418abe0 | ||
|
|
5b73992d8f | ||
|
|
9da32e4d57 | ||
|
|
90fba5627b | ||
|
|
6bcb18253a | ||
|
|
981217c11f | ||
|
|
b885a7c72c | ||
|
|
c967d57aa9 | ||
|
|
f055d45023 | ||
|
|
f32f099761 | ||
|
|
d4ab807d62 | ||
|
|
09f688c33a | ||
|
|
deb108ba0a | ||
|
|
1594f31345 | ||
|
|
30441bb3d5 | ||
|
|
41fb723ee9 | ||
|
|
db86472770 | ||
|
|
6a9e5c69cf | ||
|
|
5ede5b231e | ||
|
|
efc5db5215 | ||
|
|
90df4b9d42 | ||
|
|
303215d60c | ||
|
|
b5098060f4 | ||
|
|
599a6e5b36 | ||
|
|
442b29c968 | ||
|
|
5cb09620c1 | ||
|
|
404557e6a6 | ||
|
|
04db26b360 | ||
|
|
f6d877975b | ||
|
|
d6fa7bd5b9 | ||
|
|
22f85d0459 | ||
|
|
6977dba04b | ||
|
|
97f227d9c9 | ||
|
|
b7480cd893 | ||
|
|
f33cae6050 | ||
|
|
3777d6e32b | ||
|
|
26e88ec8e2 | ||
|
|
67b17a6fc6 | ||
|
|
7a40ff00ed | ||
|
|
4197828dc6 | ||
|
|
999db2346b | ||
|
|
1d97efce0c | ||
|
|
6c72fd51a8 | ||
|
|
b17ab86e7b | ||
|
|
c60e959cba | ||
|
|
fb773a3e0a | ||
|
|
74509239df | ||
|
|
e28d9b3bd4 | ||
|
|
00aaa512d5 | ||
|
|
20cc528320 | ||
|
|
9cee4a1c9c | ||
|
|
fcde67c99f | ||
|
|
6fc0161682 | ||
|
|
acbb4b5720 | ||
|
|
a26f56f675 | ||
|
|
72463f883c | ||
|
|
b836f631db | ||
|
|
11a632d60b | ||
|
|
576cb75ceb | ||
|
|
a3d1b29bd3 | ||
|
|
834193afd7 | ||
|
|
d3d8feeb89 | ||
|
|
3f987b5917 | ||
|
|
80b2ba3e96 | ||
|
|
ea042677ab | ||
|
|
4067bd3604 | ||
|
|
7d7bcc6ba0 | ||
|
|
127950241e | ||
|
|
ffec6dd16a | ||
|
|
108010aa47 | ||
|
|
d887297ad0 | ||
|
|
1d1ce613cd | ||
|
|
17d868b8b2 | ||
|
|
577dc93da9 | ||
|
|
4d8f476176 | ||
|
|
e65081d1b5 | ||
|
|
65aee0b714 | ||
|
|
4cd5c52d64 | ||
|
|
054794c20f | ||
|
|
98f9a5f4cb | ||
|
|
e3ffaa6b7c | ||
|
|
015cf10311 | ||
|
|
307dec4567 | ||
|
|
14ded11fca | ||
|
|
3a3b10e87a | ||
|
|
4d5dfe2083 | ||
|
|
13e45d14ba | ||
|
|
ce024c3e20 | ||
|
|
444d878324 | ||
|
|
f3caeb63d6 | ||
|
|
6582e230a0 | ||
|
|
22480d147f | ||
|
|
f3d30842dc | ||
|
|
b420ac9d20 | ||
|
|
98703d7f6c | ||
|
|
3a62b14077 | ||
|
|
d415d26913 | ||
|
|
6738fd2000 | ||
|
|
44dea9da4b | ||
|
|
18d46587b9 | ||
|
|
8cec9273d2 | ||
|
|
cc65040986 | ||
|
|
8ce3ca8961 | ||
|
|
7237cab8f1 | ||
|
|
831bdf8622 | ||
|
|
ef7be8348f | ||
|
|
419a40ac96 | ||
|
|
226b28b961 | ||
|
|
22f17a29cd | ||
|
|
cb54bc6562 | ||
|
|
035bd1c99f | ||
|
|
f1e7449d56 | ||
|
|
2ac4b2536a | ||
|
|
4f8f54280f | ||
|
|
0d5e1ec37f | ||
|
|
2fb1b89d72 | ||
|
|
ca81f0e834 | ||
|
|
f573c6e1ed | ||
|
|
208f0b48b2 | ||
|
|
2fb7495686 | ||
|
|
6864efa596 | ||
|
|
ad52f96a2d | ||
|
|
59b50c3bee | ||
|
|
fae55a9cb0 | ||
|
|
74f4a965bc | ||
|
|
6e9695525e | ||
|
|
4cea536bdf | ||
|
|
29f0dc3689 | ||
|
|
6bc30b05e6 | ||
|
|
41a7f82dea | ||
|
|
b90ac5e96e | ||
|
|
55b6b60b69 | ||
|
|
61a417b7c1 | ||
|
|
a97c36310f | ||
|
|
f57b43c230 | ||
|
|
8ac681a280 | ||
|
|
968a5b62ff | ||
|
|
affd0bc626 | ||
|
|
caf1a2f296 | ||
|
|
3b814af7e1 | ||
|
|
47f6db9089 | ||
|
|
1b0a9dd413 | ||
|
|
26d711645c | ||
|
|
b69c6fb7b4 | ||
|
|
90478f35a8 | ||
|
|
2d6d718dde | ||
|
|
5ffefbb35a | ||
|
|
2346a63784 | ||
|
|
4ee9d8e04d | ||
|
|
e70e12b32f | ||
|
|
2e66b0d137 | ||
|
|
c2dec4cac4 | ||
|
|
c3a27bbd53 | ||
|
|
6d1792d408 | ||
|
|
d9f31c13d2 | ||
|
|
e99d422bbd | ||
|
|
e6174fd58d | ||
|
|
4a27aefe3b | ||
|
|
a993153538 | ||
|
|
7423577180 | ||
|
|
6654ca702c | ||
|
|
0b71955552 | ||
|
|
5958549760 | ||
|
|
744aecf877 | ||
|
|
22db0d549f | ||
|
|
8de901e1f1 | ||
|
|
f0a4069e3d |
1
.github/CODEOWNERS
vendored
1
.github/CODEOWNERS
vendored
@@ -236,3 +236,4 @@ src/libvterm/ @leonerd
|
||||
src/po/de.po @chrisbra
|
||||
src/po/eo.po @dpelle
|
||||
src/po/fr.po @dpelle
|
||||
src/xxd/ @jnweiger
|
||||
|
||||
5
.github/workflows/ci.yml
vendored
5
.github/workflows/ci.yml
vendored
@@ -56,7 +56,7 @@ jobs:
|
||||
|
||||
- name: Install packages
|
||||
run: |
|
||||
sudo apt-get install -y \
|
||||
sudo apt update && sudo apt install -y \
|
||||
autoconf \
|
||||
lcov \
|
||||
gettext \
|
||||
@@ -71,7 +71,8 @@ jobs:
|
||||
cscope \
|
||||
libgtk2.0-dev \
|
||||
desktop-file-utils \
|
||||
libtool-bin
|
||||
libtool-bin \
|
||||
libsodium-dev
|
||||
|
||||
- name: Install clang-11
|
||||
if: matrix.compiler == 'clang'
|
||||
|
||||
2
Filelist
2
Filelist
@@ -134,6 +134,7 @@ SRC_ALL = \
|
||||
src/spell.h \
|
||||
src/spellfile.c \
|
||||
src/spellsuggest.c \
|
||||
src/strings.c \
|
||||
src/structs.h \
|
||||
src/syntax.c \
|
||||
src/tag.c \
|
||||
@@ -296,6 +297,7 @@ SRC_ALL = \
|
||||
src/proto/spell.pro \
|
||||
src/proto/spellfile.pro \
|
||||
src/proto/spellsuggest.pro \
|
||||
src/proto/strings.pro \
|
||||
src/proto/syntax.pro \
|
||||
src/proto/tag.pro \
|
||||
src/proto/term.pro \
|
||||
|
||||
@@ -4,6 +4,12 @@
|
||||
|
||||
<sub>For translations of this README see the end.</sub>
|
||||
|
||||
If you find a bug or want to discuss the best way to add a new feature, please
|
||||
open an [issue](https://github.com/vim/vim/issues).
|
||||
If you have a question or want to discuss the best way to do something with
|
||||
Vim, you can use [StackExchange](https://vi.stackexchange.com/)
|
||||
or one of the [Maillists](https://www.vim.org/community.php).
|
||||
|
||||
|
||||
## What is Vim? ##
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ Unpack the images:
|
||||
cd nsis
|
||||
unzip icons.zip
|
||||
|
||||
To build then, enter:
|
||||
Then build gvim.exe:
|
||||
|
||||
cd nsis
|
||||
makensis gvim.nsi
|
||||
|
||||
@@ -126,10 +126,11 @@ RequestExecutionLevel highest
|
||||
# This adds '\Vim' to the user choice automagically. The actual value is
|
||||
# obtained below with CheckOldVim.
|
||||
!ifdef WIN64
|
||||
InstallDir "$PROGRAMFILES64\Vim"
|
||||
!define DEFAULT_INSTDIR "$PROGRAMFILES64\Vim"
|
||||
!else
|
||||
InstallDir "$PROGRAMFILES\Vim"
|
||||
!define DEFAULT_INSTDIR "$PROGRAMFILES\Vim"
|
||||
!endif
|
||||
InstallDir ${DEFAULT_INSTDIR}
|
||||
|
||||
# Types of installs we can perform:
|
||||
InstType $(str_type_typical)
|
||||
@@ -710,8 +711,13 @@ Function .onInit
|
||||
!insertmacro MUI_LANGDLL_DISPLAY
|
||||
!endif
|
||||
|
||||
# Check $VIM
|
||||
ReadEnvStr $INSTDIR "VIM"
|
||||
${If} $INSTDIR == ${DEFAULT_INSTDIR}
|
||||
# Check $VIM
|
||||
ReadEnvStr $3 "VIM"
|
||||
${If} $3 != ""
|
||||
StrCpy $INSTDIR $3
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
|
||||
call CheckOldVim
|
||||
Pop $3
|
||||
@@ -721,20 +727,11 @@ Function .onInit
|
||||
SectionSetInstTypes ${id_section_old_ver} 0
|
||||
SectionSetText ${id_section_old_ver} ""
|
||||
${Else}
|
||||
${If} $INSTDIR == ""
|
||||
${If} $INSTDIR == ${DEFAULT_INSTDIR}
|
||||
StrCpy $INSTDIR $3
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
|
||||
# If did not find a path: use the default dir.
|
||||
${If} $INSTDIR == ""
|
||||
!ifdef WIN64
|
||||
StrCpy $INSTDIR "$PROGRAMFILES64\Vim"
|
||||
!else
|
||||
StrCpy $INSTDIR "$PROGRAMFILES\Vim"
|
||||
!endif
|
||||
${EndIf}
|
||||
|
||||
${If} ${RunningX64}
|
||||
SetRegView 64
|
||||
${EndIf}
|
||||
|
||||
11
runtime/autoload/dist/ft.vim
vendored
11
runtime/autoload/dist/ft.vim
vendored
@@ -172,6 +172,17 @@ func dist#ft#FTent()
|
||||
setf dtd
|
||||
endfunc
|
||||
|
||||
func dist#ft#ExCheck()
|
||||
let lines = getline(1, min([line("$"), 100]))
|
||||
if exists('g:filetype_euphoria')
|
||||
exe 'setf ' . g:filetype_euphoria
|
||||
elseif match(lines, '^--\|^ifdef\>\|^include\>') > -1
|
||||
setf euphoria3
|
||||
else
|
||||
setf elixir
|
||||
endif
|
||||
endfunc
|
||||
|
||||
func dist#ft#EuphoriaCheck()
|
||||
if exists('g:filetype_euphoria')
|
||||
exe 'setf ' . g:filetype_euphoria
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
" Maintainer: Mark Guzman <segfault@hasno.info>
|
||||
" URL: https://github.com/vim-ruby/vim-ruby
|
||||
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2019 Feb 25
|
||||
" Last Change: 2020 Apr 12
|
||||
" ----------------------------------------------------------------------------
|
||||
"
|
||||
" Ruby IRB/Complete author: Keiju ISHITSUKA(keiju@ishitsuka.com)
|
||||
@@ -501,13 +501,8 @@ class VimRubyCompletion
|
||||
return if rails_base == nil
|
||||
$:.push rails_base unless $:.index( rails_base )
|
||||
|
||||
rails_config = rails_base + "config/"
|
||||
rails_lib = rails_base + "lib/"
|
||||
$:.push rails_config unless $:.index( rails_config )
|
||||
$:.push rails_lib unless $:.index( rails_lib )
|
||||
|
||||
bootfile = rails_config + "boot.rb"
|
||||
envfile = rails_config + "environment.rb"
|
||||
bootfile = rails_base + "config/boot.rb"
|
||||
envfile = rails_base + "config/environment.rb"
|
||||
if File.exists?( bootfile ) && File.exists?( envfile )
|
||||
begin
|
||||
require bootfile
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*arabic.txt* For Vim version 8.2. Last change: 2019 May 05
|
||||
*arabic.txt* For Vim version 8.2. Last change: 2021 Jun 22
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Nadim Shaikli
|
||||
@@ -176,6 +176,13 @@ o Enable Arabic settings [short-cut]
|
||||
and its support is preferred due to its level of offerings.
|
||||
'arabic' when 'termbidi' is enabled only sets the keymap.
|
||||
|
||||
For vertical window isolation while setting 'termbidi' an LTR
|
||||
vertical separator like "l" or "𝖨" may be used. It may also be
|
||||
hidden by changing its color to the foreground color: >
|
||||
:set fillchars=vert:l
|
||||
:hi VertSplit ctermbg=White
|
||||
< Note that this is a workaround, not a proper solution.
|
||||
|
||||
If, on the other hand, you'd like to be verbose and explicit and
|
||||
are opting not to use the 'arabic' short-cut command, here's what
|
||||
is needed (i.e. if you use ':set arabic' you can skip this section) -
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*autocmd.txt* For Vim version 8.2. Last change: 2021 May 29
|
||||
*autocmd.txt* For Vim version 8.2. Last change: 2021 Jul 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -54,7 +54,7 @@ effects. Be careful not to destroy your text.
|
||||
:au[tocmd] [group] {event} {pat} [++once] [++nested] {cmd}
|
||||
Add {cmd} to the list of commands that Vim will
|
||||
execute automatically on {event} for a file matching
|
||||
{pat} |autocmd-patterns|.
|
||||
{pat} |autocmd-patterns|.
|
||||
Here {event} cannot be "*". *E1155*
|
||||
Note: A quote character is seen as argument to the
|
||||
:autocmd and won't start a comment.
|
||||
@@ -679,8 +679,10 @@ CursorHoldI Just like CursorHold, but in Insert mode.
|
||||
CursorMoved After the cursor was moved in Normal or Visual
|
||||
mode. Also when the text of the cursor line
|
||||
has been changed, e.g., with "x", "rx" or "p".
|
||||
Not triggered when there is typeahead or when
|
||||
an operator is pending.
|
||||
Not triggered when there is typeahead, when
|
||||
an operator is pending or when moving to
|
||||
another window while remaining at the same
|
||||
cursor position.
|
||||
For an example see |match-parens|.
|
||||
Note: This can not be skipped with
|
||||
`:noautocmd`.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*change.txt* For Vim version 8.2. Last change: 2021 Mar 01
|
||||
*change.txt* For Vim version 8.2. Last change: 2021 Jun 23
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -780,12 +780,15 @@ For compatibility with Vi these two exceptions are allowed:
|
||||
"\/{string}/" and "\?{string}?" do the same as "//{string}/r".
|
||||
"\&{string}&" does the same as "//{string}/".
|
||||
*pattern-delimiter* *E146*
|
||||
Instead of the '/' which surrounds the pattern and replacement string, you
|
||||
can use any other single-byte character, but not an alphanumeric character,
|
||||
'\', '"' or '|'. This is useful if you want to include a '/' in the search
|
||||
pattern or replacement string. Example: >
|
||||
Instead of the '/' which surrounds the pattern and replacement string, you can
|
||||
use another single-byte character. This is useful if you want to include a
|
||||
'/' in the search pattern or replacement string. Example: >
|
||||
:s+/+//+
|
||||
|
||||
You can use most characters, but not an alphanumeric character, '\', '"' or
|
||||
'|'. In Vim9 script you should not use '#' because it may be recognized as
|
||||
the start of a comment.
|
||||
|
||||
For the definition of a pattern, see |pattern|. In Visual block mode, use
|
||||
|/\%V| in the pattern to have the substitute work in the block only.
|
||||
Otherwise it works on whole lines anyway.
|
||||
|
||||
@@ -852,7 +852,7 @@ available.
|
||||
job_getchannel({job}) *job_getchannel()*
|
||||
Get the channel handle that {job} is using.
|
||||
To check if the job has no channel: >
|
||||
if string(job_getchannel()) == 'channel fail'
|
||||
if string(job_getchannel(job)) == 'channel fail'
|
||||
<
|
||||
Can also be used as a |method|: >
|
||||
GetJob()->job_getchannel()
|
||||
|
||||
@@ -38,6 +38,9 @@ An alternative is using the 'keymap' option.
|
||||
< Avoid defining a digraph with '_' (underscore) as the
|
||||
first character, it has a special meaning in the
|
||||
future.
|
||||
NOTE: This command cannot add a digraph that starts
|
||||
with a white space. If you want to add such digraph,
|
||||
you can use |digraph_set()| instead.
|
||||
|
||||
Vim is normally compiled with the |+digraphs| feature. If the feature is
|
||||
disabled, the ":digraph" command will display an error message.
|
||||
|
||||
@@ -1749,6 +1749,12 @@ There are three different types of searching:
|
||||
/u/user_x/work/include
|
||||
/u/user_x/include
|
||||
|
||||
< Note: If your 'path' setting includes an non-existing directory, Vim will
|
||||
skip the non-existing directory, but continues searching in the parent of
|
||||
the non-existing directory if upwards searching is used. E.g. when
|
||||
searching "../include" and that doesn't exist, and upward searching is
|
||||
used, also searches in "..".
|
||||
|
||||
3) Combined up/downward search:
|
||||
If Vim's current path is /u/user_x/work/release and you do >
|
||||
set path=**;/u/user_x
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 8.2. Last change: 2021 May 07
|
||||
*eval.txt* For Vim version 8.2. Last change: 2021 Jul 01
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1588,7 +1588,17 @@ The lambda expression is also useful for Channel, Job and timer: >
|
||||
Handler called
|
||||
Handler called
|
||||
|
||||
Note how execute() is used to execute an Ex command. That's ugly though.
|
||||
Note that it is possible to cause memory to be used and not freed if the
|
||||
closure is referenced by the context it depends on: >
|
||||
function Function()
|
||||
let x = 0
|
||||
let F = {-> x}
|
||||
endfunction
|
||||
The closure uses "x" from the function scope, and "F" in that same scope
|
||||
refers to the closure. This cycle results in the memory not being freed.
|
||||
Recommendation: don't do this.
|
||||
|
||||
Notice how execute() is used to execute an Ex command. That's ugly though.
|
||||
In Vim9 script you can use a command block, see |inline-function|.
|
||||
|
||||
Lambda expressions have internal names like '<lambda>42'. If you get an error
|
||||
@@ -1963,7 +1973,8 @@ v:fcs_choice What should happen after a |FileChangedShell| event was
|
||||
Vim behaves like it is empty, there is no warning message.
|
||||
|
||||
*v:fname* *fname-variable*
|
||||
v:fname The file name set by 'includeexpr'. Empty otherwise.
|
||||
v:fname When evaluating 'includeexpr': the file name that was
|
||||
detected. Empty otherwise.
|
||||
|
||||
*v:fname_in* *fname_in-variable*
|
||||
v:fname_in The name of the input file. Valid while evaluating:
|
||||
@@ -2102,7 +2113,7 @@ v:null An empty String. Used to put "null" in JSON. See
|
||||
v:numbermax Maximum value of a number.
|
||||
|
||||
*v:numbermin* *numbermin-variable*
|
||||
v:numbermin Minimum value of a number (negative)
|
||||
v:numbermin Minimum value of a number (negative).
|
||||
|
||||
*v:numbersize* *numbersize-variable*
|
||||
v:numbersize Number of bits in a Number. This is normally 64, but on some
|
||||
@@ -2508,7 +2519,7 @@ char2nr({expr} [, {utf8}]) Number ASCII/UTF8 value of first char in {expr}
|
||||
charclass({string}) Number character class of {string}
|
||||
charcol({expr}) Number column number of cursor or mark
|
||||
charidx({string}, {idx} [, {countcc}])
|
||||
Number char index of byte {idx} in {string}
|
||||
Number char index of byte {idx} in {string}
|
||||
chdir({dir}) String change current working directory
|
||||
cindent({lnum}) Number C indent for line {lnum}
|
||||
clearmatches([{win}]) none clear all matches
|
||||
@@ -2529,7 +2540,7 @@ cscope_connection([{num}, {dbpath} [, {prepend}]])
|
||||
cursor({lnum}, {col} [, {off}])
|
||||
Number move cursor to {lnum}, {col}, {off}
|
||||
cursor({list}) Number move cursor to position in {list}
|
||||
debugbreak({pid}) Number interrupt process being debugged
|
||||
debugbreak({pid}) Number interrupt process being debugged
|
||||
deepcopy({expr} [, {noref}]) any make a full copy of {expr}
|
||||
delete({fname} [, {flags}]) Number delete the file or directory {fname}
|
||||
deletebufline({expr}, {first} [, {last}])
|
||||
@@ -2537,6 +2548,10 @@ deletebufline({expr}, {first} [, {last}])
|
||||
did_filetype() Number |TRUE| if FileType autocmd event used
|
||||
diff_filler({lnum}) Number diff filler lines about {lnum}
|
||||
diff_hlID({lnum}, {col}) Number diff highlighting at {lnum}/{col}
|
||||
digraph_get({chars}) String get the digraph of {chars}
|
||||
digraph_getlist([{listall}]) List get all |digraph|s
|
||||
digraph_set({chars}, {digraph}) Boolean register |digraph|
|
||||
digraph_setlist({digraphlist}) Boolean register multiple |digraph|s
|
||||
echoraw({expr}) none output {expr} as-is
|
||||
empty({expr}) Number |TRUE| if {expr} is empty
|
||||
environ() Dict return environment variables
|
||||
@@ -3022,6 +3037,10 @@ test_feedinput({string}) none add key sequence to input buffer
|
||||
test_garbagecollect_now() none free memory right now for testing
|
||||
test_garbagecollect_soon() none free memory soon for testing
|
||||
test_getvalue({string}) any get value of an internal variable
|
||||
test_gui_drop_files({list}, {row}, {col}, {mods})
|
||||
none drop a list of files in a window
|
||||
test_gui_mouse_event({button}, {row}, {col}, {repeated}, {mods})
|
||||
none add a mouse event to the input buffer
|
||||
test_ignore_error({expr}) none ignore a specific error
|
||||
test_null_blob() Blob null value for testing
|
||||
test_null_channel() Channel null value for testing
|
||||
@@ -4179,6 +4198,107 @@ diff_hlID({lnum}, {col}) *diff_hlID()*
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetLnum()->diff_hlID(col)
|
||||
<
|
||||
|
||||
digraph_get({chars}) *digraph_get()* *E1214*
|
||||
Return the digraph of {chars}. This should be a string with
|
||||
exactly two characters. If {chars} are not just two
|
||||
characters, or the digraph of {chars} does not exist, an error
|
||||
is given and an empty string is returned.
|
||||
|
||||
The character will be converted from Unicode to 'encoding'
|
||||
when needed. This does require the conversion to be
|
||||
available, it might fail.
|
||||
|
||||
Also see |digraph_getlist()|.
|
||||
|
||||
Examples: >
|
||||
" Get a built-in digraph
|
||||
:echo digraph_get('00') " Returns '∞'
|
||||
|
||||
" Get a user-defined digraph
|
||||
:call digraph_set('aa', 'あ')
|
||||
:echo digraph_get('aa') " Returns 'あ'
|
||||
<
|
||||
Can also be used as a |method|: >
|
||||
GetChars()->digraph_get()
|
||||
<
|
||||
This function works only when compiled with the |+digraphs|
|
||||
feature. If this feature is disabled, this function will
|
||||
display an error message.
|
||||
|
||||
|
||||
digraph_getlist([{listall}]) *digraph_getlist()*
|
||||
Return a list of digraphs. If the {listall} argument is given
|
||||
and it is TRUE, return all digraphs, including the default
|
||||
digraphs. Otherwise, return only user-defined digraphs.
|
||||
|
||||
The characters will be converted from Unicode to 'encoding'
|
||||
when needed. This does require the conservation to be
|
||||
available, it might fail.
|
||||
|
||||
Also see |digraph_get()|.
|
||||
|
||||
Examples: >
|
||||
" Get user-defined digraphs
|
||||
:echo digraph_getlist()
|
||||
|
||||
" Get all the digraphs, including default digraphs
|
||||
:echo digraph_getlist(1)
|
||||
<
|
||||
Can also be used as a |method|: >
|
||||
GetNumber()->digraph_getlist()
|
||||
<
|
||||
This function works only when compiled with the |+digraphs|
|
||||
feature. If this feature is disabled, this function will
|
||||
display an error message.
|
||||
|
||||
|
||||
digraph_set({chars}, {digraph}) *digraph_set()* *E1205*
|
||||
Add digraph {chars} to the list. {chars} must be a string
|
||||
with two characters. {digraph} is a string with one utf-8
|
||||
encoded character. Be careful, composing characters are NOT
|
||||
ignored. This function is similar to |:digraphs| command, but
|
||||
useful to add digraphs start with a white space.
|
||||
|
||||
The function result is v:true if |digraph| is registered. If
|
||||
this fails an error message is given and v:false is returned.
|
||||
|
||||
If you want to define multiple digraphs at once, you can use
|
||||
|digraph_setlist()|.
|
||||
|
||||
Example: >
|
||||
call digraph_set(' ', 'あ')
|
||||
<
|
||||
Can be used as a |method|: >
|
||||
GetString()->digraph_set('あ')
|
||||
<
|
||||
This function works only when compiled with the |+digraphs|
|
||||
feature. If this feature is disabled, this function will
|
||||
display an error message.
|
||||
|
||||
|
||||
digraph_setlist({digraphlist}) *digraph_setlist()*
|
||||
Similar to |digraph_set()| but this function can add multiple
|
||||
digraphs at once. {digraphlist} is a list composed of lists,
|
||||
where each list contains two strings with {chars} and
|
||||
{digraph} as in |digraph_set()|.
|
||||
Example: >
|
||||
call digraph_setlist([['aa', 'あ'], ['ii', 'い']])
|
||||
<
|
||||
It is similar to the following: >
|
||||
for [chars, digraph] in [['aa', 'あ'], ['ii', 'い']]
|
||||
call digraph_set(chars, digraph)
|
||||
endfor
|
||||
< Except that the function returns after the first error,
|
||||
following digraphs will not be added.
|
||||
|
||||
Can be used as a |method|: >
|
||||
GetList()->digraph_setlist()
|
||||
<
|
||||
This function works only when compiled with the |+digraphs|
|
||||
feature. If this feature is disabled, this function will
|
||||
display an error message.
|
||||
|
||||
|
||||
echoraw({expr}) *echoraw()*
|
||||
@@ -4858,6 +4978,8 @@ foldclosed({lnum}) *foldclosed()*
|
||||
The result is a Number. If the line {lnum} is in a closed
|
||||
fold, the result is the number of the first line in that fold.
|
||||
If the line {lnum} is not in a closed fold, -1 is returned.
|
||||
{lnum} is used like with |getline()|. Thus "." is the current
|
||||
line, "'m" mark m, etc.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetLnum()->foldclosed()
|
||||
@@ -4866,6 +4988,8 @@ foldclosedend({lnum}) *foldclosedend()*
|
||||
The result is a Number. If the line {lnum} is in a closed
|
||||
fold, the result is the number of the last line in that fold.
|
||||
If the line {lnum} is not in a closed fold, -1 is returned.
|
||||
{lnum} is used like with |getline()|. Thus "." is the current
|
||||
line, "'m" mark m, etc.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetLnum()->foldclosedend()
|
||||
@@ -4879,6 +5003,8 @@ foldlevel({lnum}) *foldlevel()*
|
||||
returned for lines where folds are still to be updated and the
|
||||
foldlevel is unknown. As a special case the level of the
|
||||
previous line is usually available.
|
||||
{lnum} is used like with |getline()|. Thus "." is the current
|
||||
line, "'m" mark m, etc.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetLnum()->foldlevel()
|
||||
@@ -4951,7 +5077,7 @@ funcref({name} [, {arglist}] [, {dict}])
|
||||
Can also be used as a |method|: >
|
||||
GetFuncname()->funcref([arg])
|
||||
<
|
||||
*function()* *E700* *E922* *E923*
|
||||
*function()* *partial* *E700* *E922* *E923*
|
||||
function({name} [, {arglist}] [, {dict}])
|
||||
Return a |Funcref| variable that refers to function {name}.
|
||||
{name} can be the name of a user defined function or an
|
||||
@@ -5500,8 +5626,8 @@ getcurpos([{winid}])
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetWinid()->getcurpos()
|
||||
|
||||
< *getcursorcharpos()*
|
||||
<
|
||||
*getcursorcharpos()*
|
||||
getcursorcharpos([{winid}])
|
||||
Same as |getcurpos()| but the column number in the returned
|
||||
List is a character index instead of a byte index.
|
||||
@@ -5510,8 +5636,8 @@ getcursorcharpos([{winid}])
|
||||
With the cursor on '보' in line 3 with text "여보세요": >
|
||||
getcursorcharpos() returns [0, 3, 2, 0, 3]
|
||||
getcurpos() returns [0, 3, 4, 0, 3]
|
||||
|
||||
< Can also be used as a |method|: >
|
||||
<
|
||||
Can also be used as a |method|: >
|
||||
GetWinid()->getcursorcharpos()
|
||||
|
||||
< *getcwd()*
|
||||
@@ -5550,7 +5676,7 @@ getcwd([{winnr} [, {tabnr}]])
|
||||
|
||||
< Can also be used as a |method|: >
|
||||
GetWinnr()->getcwd()
|
||||
<
|
||||
|
||||
getenv({name}) *getenv()*
|
||||
Return the value of environment variable {name}.
|
||||
When the variable does not exist |v:null| is returned. That
|
||||
@@ -5736,11 +5862,11 @@ getmarklist([{expr}]) *getmarklist()*
|
||||
see |bufname()|.
|
||||
|
||||
Each item in the returned List is a |Dict| with the following:
|
||||
name - name of the mark prefixed by "'"
|
||||
pos - a |List| with the position of the mark:
|
||||
mark name of the mark prefixed by "'"
|
||||
pos a |List| with the position of the mark:
|
||||
[bufnum, lnum, col, off]
|
||||
Refer to |getpos()| for more information.
|
||||
file - file name
|
||||
Refer to |getpos()| for more information.
|
||||
file file name
|
||||
|
||||
Refer to |getpos()| for getting information about a specific
|
||||
mark.
|
||||
@@ -5754,6 +5880,8 @@ getmatches([{win}]) *getmatches()*
|
||||
|getmatches()| is useful in combination with |setmatches()|,
|
||||
as |setmatches()| can restore a list of matches saved by
|
||||
|getmatches()|.
|
||||
If {win} is specified, use the window with this number or
|
||||
window ID instead of the current window.
|
||||
Example: >
|
||||
:echo getmatches()
|
||||
< [{'group': 'MyGroup1', 'pattern': 'TODO',
|
||||
@@ -5791,7 +5919,7 @@ getmousepos() *getmousepos()*
|
||||
are zero.
|
||||
|
||||
When the position is after the text then "column" is the
|
||||
length of the text in bytes.
|
||||
length of the text in bytes plus one.
|
||||
|
||||
If the mouse is over a popup window then that window is used.
|
||||
|
||||
@@ -5822,7 +5950,7 @@ getpos({expr}) Get the position for {expr}. For possible values of {expr}
|
||||
'> is a large number.
|
||||
The column number in the returned List is the byte position
|
||||
within the line. To get the character position in the line,
|
||||
use |getcharpos()|
|
||||
use |getcharpos()|.
|
||||
The column number can be very large, e.g. 2147483647, in which
|
||||
case it means "after the end of the line".
|
||||
This can be used to save and restore the position of a mark: >
|
||||
@@ -5841,7 +5969,10 @@ getqflist([{what}]) *getqflist()*
|
||||
bufname() to get the name
|
||||
module module name
|
||||
lnum line number in the buffer (first line is 1)
|
||||
end_lnum
|
||||
end of line number if the item is multiline
|
||||
col column number (first column is 1)
|
||||
end_col end of column number if the item has range
|
||||
vcol |TRUE|: "col" is visual column
|
||||
|FALSE|: "col" is byte index
|
||||
nr error number
|
||||
@@ -5851,8 +5982,10 @@ getqflist([{what}]) *getqflist()*
|
||||
valid |TRUE|: recognized error message
|
||||
|
||||
When there is no error list or it's empty, an empty list is
|
||||
returned. Quickfix list entries with non-existing buffer
|
||||
number are returned with "bufnr" set to zero.
|
||||
returned. Quickfix list entries with a non-existing buffer
|
||||
number are returned with "bufnr" set to zero (Note: some
|
||||
functions accept buffer number zero for the alternate buffer,
|
||||
you may need to explicitly check for zero).
|
||||
|
||||
Useful application: Find pattern matches in multiple files and
|
||||
do something with them: >
|
||||
@@ -5996,12 +6129,12 @@ getregtype([{regname}]) *getregtype()*
|
||||
Can also be used as a |method|: >
|
||||
GetRegname()->getregtype()
|
||||
|
||||
gettabinfo([{arg}]) *gettabinfo()*
|
||||
If {arg} is not specified, then information about all the tab
|
||||
pages is returned as a |List|. Each List item is a |Dictionary|.
|
||||
Otherwise, {arg} specifies the tab page number and information
|
||||
about that one is returned. If the tab page does not exist an
|
||||
empty List is returned.
|
||||
gettabinfo([{tabnr}]) *gettabinfo()*
|
||||
If {tabnr} is not specified, then information about all the
|
||||
tab pages is returned as a |List|. Each List item is a
|
||||
|Dictionary|. Otherwise, {tabnr} specifies the tab page
|
||||
number and information about that one is returned. If the tab
|
||||
page does not exist an empty List is returned.
|
||||
|
||||
Each List item is a |Dictionary| with the following entries:
|
||||
tabnr tab page number.
|
||||
@@ -6054,11 +6187,11 @@ gettabwinvar({tabnr}, {winnr}, {varname} [, {def}]) *gettabwinvar()*
|
||||
< Can also be used as a |method|: >
|
||||
GetTabnr()->gettabwinvar(winnr, varname)
|
||||
|
||||
gettagstack([{nr}]) *gettagstack()*
|
||||
The result is a Dict, which is the tag stack of window {nr}.
|
||||
{nr} can be the window number or the |window-ID|.
|
||||
When {nr} is not specified, the current window is used.
|
||||
When window {nr} doesn't exist, an empty Dict is returned.
|
||||
gettagstack([{winnr}]) *gettagstack()*
|
||||
The result is a Dict, which is the tag stack of window {winnr}.
|
||||
{winnr} can be the window number or the |window-ID|.
|
||||
When {winnr} is not specified, the current window is used.
|
||||
When window {winnr} doesn't exist, an empty Dict is returned.
|
||||
|
||||
The returned dictionary contains the following entries:
|
||||
curidx Current index in the stack. When at
|
||||
@@ -7637,7 +7770,7 @@ matchfuzzypos({list}, {str} [, {dict}]) *matchfuzzypos()*
|
||||
Same as |matchfuzzy()|, but returns the list of matched
|
||||
strings, the list of character positions where characters
|
||||
in {str} matches and a list of matching scores. You can
|
||||
use |byteidx()|to convert a character position to a byte
|
||||
use |byteidx()| to convert a character position to a byte
|
||||
position.
|
||||
|
||||
If {str} matches multiple times in a string, then only the
|
||||
@@ -7845,6 +7978,10 @@ mode([expr]) Return a string that indicates the current mode.
|
||||
s Select by character
|
||||
S Select by line
|
||||
CTRL-S Select blockwise
|
||||
vs Visual by character using |v_CTRL-O| from
|
||||
Select mode
|
||||
Vs Visual by line using |v_CTRL-O| from Select mode
|
||||
CTRL-Vs Visual blockwise using |v_CTRL-O| from Select mode
|
||||
i Insert
|
||||
ic Insert mode completion |compl-generic|
|
||||
ix Insert mode |i_CTRL-X| completion
|
||||
@@ -8202,6 +8339,8 @@ prompt_getprompt({buf}) *prompt_getprompt()*
|
||||
Can also be used as a |method|: >
|
||||
GetBuffer()->prompt_getprompt()
|
||||
|
||||
< {only available when compiled with the |+channel| feature}
|
||||
|
||||
|
||||
prompt_setcallback({buf}, {expr}) *prompt_setcallback()*
|
||||
Set prompt callback for buffer {buf} to {expr}. When {expr}
|
||||
@@ -8235,6 +8374,7 @@ prompt_setcallback({buf}, {expr}) *prompt_setcallback()*
|
||||
< Can also be used as a |method|: >
|
||||
GetBuffer()->prompt_setcallback(callback)
|
||||
|
||||
< {only available when compiled with the |+channel| feature}
|
||||
|
||||
prompt_setinterrupt({buf}, {expr}) *prompt_setinterrupt()*
|
||||
Set a callback for buffer {buf} to {expr}. When {expr} is an
|
||||
@@ -8248,6 +8388,8 @@ prompt_setinterrupt({buf}, {expr}) *prompt_setinterrupt()*
|
||||
Can also be used as a |method|: >
|
||||
GetBuffer()->prompt_setinterrupt(callback)
|
||||
|
||||
< {only available when compiled with the |+channel| feature}
|
||||
|
||||
prompt_setprompt({buf}, {text}) *prompt_setprompt()*
|
||||
Set prompt for buffer {buf} to {text}. You most likely want
|
||||
{text} to end in a space.
|
||||
@@ -8258,6 +8400,8 @@ prompt_setprompt({buf}, {text}) *prompt_setprompt()*
|
||||
Can also be used as a |method|: >
|
||||
GetBuffer()->prompt_setprompt('command: ')
|
||||
|
||||
< {only available when compiled with the |+channel| feature}
|
||||
|
||||
prop_ functions are documented here: |text-prop-functions|
|
||||
|
||||
pum_getpos() *pum_getpos()*
|
||||
@@ -8897,6 +9041,10 @@ screenpos({winid}, {lnum}, {col}) *screenpos()*
|
||||
The "curscol" value is where the cursor would be placed. For
|
||||
a Tab it would be the same as "endcol", while for a double
|
||||
width character it would be the same as "col".
|
||||
The |conceal| feature is ignored here, the column numbers are
|
||||
as if 'conceallevel' is zero. You can set the cursor to the
|
||||
right position and use |screencol()| to get the value with
|
||||
|conceal| taken into account.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetWinid()->screenpos(lnum, col)
|
||||
@@ -9451,6 +9599,7 @@ setcursorcharpos({list})
|
||||
Can also be used as a |method|: >
|
||||
GetCursorPos()->setcursorcharpos()
|
||||
|
||||
|
||||
setenv({name}, {val}) *setenv()*
|
||||
Set environment variable {name} to {val}.
|
||||
When {val} is |v:null| the environment variable is deleted.
|
||||
@@ -9861,6 +10010,10 @@ sha256({string}) *sha256()*
|
||||
|
||||
shellescape({string} [, {special}]) *shellescape()*
|
||||
Escape {string} for use as a shell command argument.
|
||||
When the 'shell' contains powershell (MS-Windows) or pwsh
|
||||
(MS-Windows, Linux, and MacOS) then it will enclose {string}
|
||||
in single quotes and will double up all internal single
|
||||
quotes.
|
||||
On MS-Windows, when 'shellslash' is not set, it will enclose
|
||||
{string} in double quotes and double all double quotes within
|
||||
{string}.
|
||||
@@ -9961,7 +10114,7 @@ sinh({expr}) *sinh()*
|
||||
{only available when compiled with the |+float| feature}
|
||||
|
||||
|
||||
slice({expr}, {start} [, {end}]) *slice()*
|
||||
slice({expr}, {start} [, {end}]) *slice()*
|
||||
Similar to using a |slice| "expr[start : end]", but "end" is
|
||||
used exclusive. And for a string the indexes are used as
|
||||
character indexes instead of byte indexes, like in
|
||||
@@ -11023,7 +11176,8 @@ tempname() *tempname()* *temp-file-name*
|
||||
:exe "redir > " . tmpfile
|
||||
< For Unix, the file will be in a private directory |tempfile|.
|
||||
For MS-Windows forward slashes are used when the 'shellslash'
|
||||
option is set or when 'shellcmdflag' starts with '-'.
|
||||
option is set, or when 'shellcmdflag' starts with '-' and
|
||||
'shell' does not contain powershell or pwsh.
|
||||
|
||||
|
||||
term_ functions are documented here: |terminal-function-details|
|
||||
@@ -11863,6 +12017,7 @@ diff Compiled with |vimdiff| and 'diff' support.
|
||||
digraphs Compiled with support for digraphs.
|
||||
directx Compiled with support for DirectX and 'renderoptions'.
|
||||
dnd Compiled with support for the "~ register |quote_~|.
|
||||
drop_file Compiled with |drop_file| support.
|
||||
ebcdic Compiled on a machine with ebcdic character set.
|
||||
emacs_tags Compiled with support for Emacs tags.
|
||||
eval Compiled with expression evaluation support. Always
|
||||
@@ -11968,6 +12123,7 @@ scrollbind Compiled with 'scrollbind' support. (always true)
|
||||
showcmd Compiled with 'showcmd' support.
|
||||
signs Compiled with |:sign| support.
|
||||
smartindent Compiled with 'smartindent' support.
|
||||
sodium Compiled with libsodium for better crypt support
|
||||
sound Compiled with sound support, e.g. `sound_playevent()`
|
||||
spell Compiled with spell checking support |spell|.
|
||||
startuptime Compiled with |--startuptime| support.
|
||||
|
||||
@@ -632,7 +632,7 @@ For fish, add to the config file
|
||||
MARKDOWN *ft-markdown-plugin*
|
||||
|
||||
To enable folding use this: >
|
||||
let g:markdown_folding = 1
|
||||
let g:markdown_folding = 1
|
||||
<
|
||||
|
||||
PDF *ft-pdf-plugin*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*ps1.txt* A Windows PowerShell syntax plugin for Vim
|
||||
*ft_ps1.txt* A Windows PowerShell syntax plugin for Vim
|
||||
|
||||
Author: Peter Provost <https://www.github.com/PProvost>
|
||||
License: Apache 2.0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*vim-raku.txt* The Raku programming language filetype
|
||||
*ft_raku.txt* The Raku programming language filetype
|
||||
|
||||
*vim-raku*
|
||||
|
||||
@@ -45,7 +45,7 @@ Numbers, subscripts and superscripts are available with 's' and 'S':
|
||||
1s ₁ 1S ¹ ~
|
||||
2s ₂ 9S ⁹ ~
|
||||
|
||||
But some don´t come defined by default. Those are digraph definitions you can
|
||||
But some don't come defined by default. Those are digraph definitions you can
|
||||
add in your ~/.vimrc file. >
|
||||
exec 'digraph \\ '.char2nr('∖')
|
||||
exec 'digraph \< '.char2nr('≼')
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*gui.txt* For Vim version 8.2. Last change: 2021 May 01
|
||||
*gui.txt* For Vim version 8.2. Last change: 2021 Jun 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -411,7 +411,8 @@ Mouse mapping with modifiers does not work for modeless selection.
|
||||
3.7 Drag and drop *drag-n-drop*
|
||||
|
||||
You can drag and drop one or more files into the Vim window, where they will
|
||||
be opened as if a |:drop| command was used.
|
||||
be opened as if a |:drop| command was used. You can check if this is
|
||||
supported with the *drop_file* feature: `has('drop_file')`.
|
||||
|
||||
If you hold down Shift while doing this, Vim changes to the first dropped
|
||||
file's directory. If you hold Ctrl Vim will always split a new window for the
|
||||
|
||||
@@ -132,7 +132,7 @@ Advanced editing ~
|
||||
|windows.txt| commands for using multiple windows and buffers
|
||||
|tabpage.txt| commands for using multiple tab pages
|
||||
|spell.txt| spell checking
|
||||
|diff.txt| working with two to four versions of the same file
|
||||
|diff.txt| working with two to eight versions of the same file
|
||||
|autocmd.txt| automatically executing commands on an event
|
||||
|eval.txt| expression evaluation, conditional commands
|
||||
|channel.txt| Jobs, Channels, inter-process communication
|
||||
@@ -145,6 +145,7 @@ Special issues ~
|
||||
|term.txt| using different terminals and mice
|
||||
|terminal.txt| Terminal window support
|
||||
|popup.txt| popup window support
|
||||
|vim9.txt| using Vim9 script
|
||||
|
||||
Programming language support ~
|
||||
|indent.txt| automatic indenting for C and other languages
|
||||
@@ -153,6 +154,8 @@ Programming language support ~
|
||||
|filetype.txt| settings done specifically for a type of file
|
||||
|quickfix.txt| commands for a quick edit-compile-fix cycle
|
||||
|ft_ada.txt| Ada (the programming language) support
|
||||
|ft_ps1.txt| Filetype plugin for Windows PowerShell
|
||||
|ft_raku.txt| Filetype plugin for Raku
|
||||
|ft_rust.txt| Filetype plugin for Rust
|
||||
|ft_sql.txt| about the SQL filetype plugin
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*index.txt* For Vim version 8.2. Last change: 2021 May 27
|
||||
*index.txt* For Vim version 8.2. Last change: 2021 Jun 19
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1312,6 +1312,7 @@ tag command action ~
|
||||
|:endtry| :endt[ry] end previous :try
|
||||
|:endwhile| :endw[hile] end previous :while
|
||||
|:enew| :ene[w] edit a new, unnamed buffer
|
||||
|:eval| :ev[al] evaluate an expression and discard the result
|
||||
|:ex| :ex same as ":edit"
|
||||
|:execute| :exe[cute] execute result of expressions
|
||||
|:exit| :exi[t] same as ":xit"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*insert.txt* For Vim version 8.2. Last change: 2020 Oct 16
|
||||
*insert.txt* For Vim version 8.2. Last change: 2021 Jul 05
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1073,7 +1073,8 @@ On the second invocation the arguments are:
|
||||
|
||||
The function must return a List with the matching words. These matches
|
||||
usually include the "a:base" text. When there are no matches return an empty
|
||||
List.
|
||||
List. Note that the cursor may have moved since the first invocation, the
|
||||
text may have been changed.
|
||||
|
||||
In order to return more information than the matching words, return a Dict
|
||||
that contains the List. The Dict can have these items:
|
||||
|
||||
@@ -1572,6 +1572,16 @@ feature. Use the full name for new scripts.
|
||||
|
||||
Replacement text ~
|
||||
|
||||
The {repl} argument is normally one long string, possibly with "|" separated
|
||||
commands. A special case is when the argument is "{", then the following
|
||||
lines, up to a line starting with "}" are used and |Vim9| syntax applies.
|
||||
Example: >
|
||||
:command MyCommand {
|
||||
echo 'hello'
|
||||
g:calledMyCommand = true
|
||||
}
|
||||
No nesting is supported.
|
||||
|
||||
The replacement text {repl} for a user defined command is scanned for special
|
||||
escape sequences, using <...> notation. Escape sequences are replaced with
|
||||
values from the entered command line, and all other text is copied unchanged.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*motion.txt* For Vim version 8.2. Last change: 2021 Mar 28
|
||||
*motion.txt* For Vim version 8.2. Last change: 2021 Jun 13
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -59,9 +59,14 @@ or change text. The following operators are available:
|
||||
|<| < shift left
|
||||
|zf| zf define a fold
|
||||
|g@| g@ call function set with the 'operatorfunc' option
|
||||
|
||||
*motion-count-multiplied*
|
||||
If the motion includes a count and the operator also had a count before it,
|
||||
the two counts are multiplied. For example: "2d3w" deletes six words.
|
||||
*operator-doubled*
|
||||
When doubling the operator it operates on a line. When using a count, before
|
||||
or after the first character, that many lines are operated upon. Thus `3dd`
|
||||
deletes three lines. A count before and after the first character is
|
||||
multiplied, thus `2y3y` yanks six lines.
|
||||
|
||||
After applying the operator the cursor is mostly left at the start of the text
|
||||
that was operated upon. For example, "yfe" doesn't move the cursor, but "yFe"
|
||||
@@ -195,9 +200,9 @@ l or *l*
|
||||
*$* *<End>* *<kEnd>*
|
||||
$ or <End> To the end of the line. When a count is given also go
|
||||
[count - 1] lines downward, or as far is possible.
|
||||
|inclusive| motion. If a count of 2 of larger is
|
||||
|inclusive| motion. If a count of 2 or larger is
|
||||
given and the cursor is on the last line, that is an
|
||||
error an the cursor doesn't move.
|
||||
error and the cursor doesn't move.
|
||||
In Visual mode the cursor goes to just after the last
|
||||
character in the line.
|
||||
When 'virtualedit' is active, "$" may move the cursor
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 8.2. Last change: 2021 May 16
|
||||
*options.txt* For Vim version 8.2. Last change: 2021 Jun 20
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1326,7 +1326,12 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
continuation (positive).
|
||||
sbr Display the 'showbreak' value before applying the
|
||||
additional indent.
|
||||
The default value for min is 20 and shift is 0.
|
||||
list:{n} Adds an additional indent for lines that match a
|
||||
numbered or bulleted list (using the
|
||||
'formatlistpat' setting).
|
||||
list:-1 Uses the length of a match with 'formatlistpat'
|
||||
for indentation.
|
||||
The default value for min is 20, shift and list is 0.
|
||||
|
||||
*'browsedir'* *'bsdir'*
|
||||
'browsedir' 'bsdir' string (default: "last")
|
||||
@@ -2384,6 +2389,23 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
you write the file the encrypted bytes will be
|
||||
different. The whole undo file is encrypted, not just
|
||||
the pieces of text.
|
||||
*E1193* *E1194* *E1195* *E1196*
|
||||
*E1197* *E1198* *E1199* *E1200* *E1201*
|
||||
xchacha20 XChaCha20 Cipher with Poly1305 Message Authentication
|
||||
Code. Medium strong till strong encryption.
|
||||
Encryption is provided by the libsodium library, it
|
||||
requires Vim to be built with |+sodium|
|
||||
It adds a seed and a message authentication code (MAC)
|
||||
to the file. This needs at least a Vim 8.2.3022 to
|
||||
read the encrypted file.
|
||||
Encryption of swap files is not supported, therefore
|
||||
no swap file will be used when xchacha20 encryption is
|
||||
enabled.
|
||||
Encryption of undo files is not yet supported,
|
||||
therefore no undo file will currently be written.
|
||||
CURRENTLY EXPERIMENTAL: Files written with this method
|
||||
might have to be read back with the same version of
|
||||
Vim if the binary format changes later.
|
||||
|
||||
You should use "blowfish2", also to re-encrypt older files.
|
||||
|
||||
@@ -5595,19 +5617,21 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
- abbreviations are disabled
|
||||
- 'autoindent' is reset
|
||||
- 'expandtab' is reset
|
||||
- 'formatoptions' is used like it is empty
|
||||
- 'hkmap' is reset
|
||||
- 'revins' is reset
|
||||
- 'ruler' is reset
|
||||
- 'showmatch' is reset
|
||||
- 'smartindent' is reset
|
||||
- 'smarttab' is reset
|
||||
- 'softtabstop' is set to 0
|
||||
- 'textwidth' is set to 0
|
||||
- 'wrapmargin' is set to 0
|
||||
- 'varsofttabstop' is made empty
|
||||
These options keep their value, but their effect is disabled:
|
||||
- 'cindent'
|
||||
- 'formatoptions' is used like it is empty
|
||||
- 'indentexpr'
|
||||
- 'lisp'
|
||||
- 'smartindent'
|
||||
NOTE: When you start editing another file while the 'paste' option is
|
||||
on, settings from the modelines or autocommands may change the
|
||||
settings again, causing trouble when pasting text. You might want to
|
||||
@@ -6575,23 +6599,25 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|
||||
*'shellcmdflag'* *'shcf'*
|
||||
'shellcmdflag' 'shcf' string (default: "-c";
|
||||
Win32, when 'shell' does not contain "sh"
|
||||
Win32, when 'shell' contains "powershell":
|
||||
"-Command", or when it does not contain "sh"
|
||||
somewhere: "/c")
|
||||
global
|
||||
Flag passed to the shell to execute "!" and ":!" commands; e.g.,
|
||||
"bash.exe -c ls" or "cmd.exe /c dir". For MS-Windows, the default is
|
||||
set according to the value of 'shell', to reduce the need to set this
|
||||
option by the user.
|
||||
"bash.exe -c ls", "powershell.exe -Command dir", or "cmd.exe /c dir".
|
||||
For MS-Windows, the default is set according to the value of 'shell',
|
||||
to reduce the need to set this option by the user.
|
||||
On Unix it can have more than one flag. Each white space separated
|
||||
part is passed as an argument to the shell command.
|
||||
See |option-backslash| about including spaces and backslashes.
|
||||
Also see |dos-shell| for MS-Windows.
|
||||
Also see |dos-shell| and |dos-powershell| for MS-Windows.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
*'shellpipe'* *'sp'*
|
||||
'shellpipe' 'sp' string (default ">", ">%s 2>&1", "| tee", "|& tee" or
|
||||
"2>&1| tee")
|
||||
'shellpipe' 'sp' string (default ">", ">%s 2>&1", "| tee", "|& tee"
|
||||
"2>&1| tee", or
|
||||
"2>&1 | Out-File -Encoding default")
|
||||
global
|
||||
{not available when compiled without the |+quickfix|
|
||||
feature}
|
||||
@@ -6601,9 +6627,10 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
The name of the temporary file can be represented by "%s" if necessary
|
||||
(the file name is appended automatically if no %s appears in the value
|
||||
of this option).
|
||||
For the Amiga the default is ">". For MS-Windows the default is
|
||||
">%s 2>&1". The output is directly saved in a file and not echoed to
|
||||
the screen.
|
||||
For the Amiga the default is ">". For MS-Windows using powershell the
|
||||
default is "2>&1 | Out-File -Encoding default", otherwise the default
|
||||
is ">%s 2>&1". The output is directly saved in a file and not echoed
|
||||
to the screen.
|
||||
For Unix the default is "| tee". The stdout of the compiler is saved
|
||||
in a file and echoed to the screen. If the 'shell' option is "csh" or
|
||||
"tcsh" after initializations, the default becomes "|& tee". If the
|
||||
@@ -6611,6 +6638,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
"bash", "fish", "ash" or "dash" the default becomes "2>&1| tee". This
|
||||
means that stderr is also included. Before using the 'shell' option a
|
||||
path is removed, thus "/bin/sh" uses "sh".
|
||||
For Unix and MS-Windows, when the 'shell' option is "pwsh" the default
|
||||
becomes ">%s 2>&1" and the output is not echoed to the screen.
|
||||
The initialization of this option is done after reading the ".vimrc"
|
||||
and the other initializations, so that when the 'shell' option is set
|
||||
there, the 'shellpipe' option changes automatically, unless it was
|
||||
@@ -6626,8 +6655,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
security reasons.
|
||||
|
||||
*'shellquote'* *'shq'*
|
||||
'shellquote' 'shq' string (default: ""; Win32, when 'shell'
|
||||
contains "sh" somewhere: "\"")
|
||||
'shellquote' 'shq' string (default: "")
|
||||
global
|
||||
Quoting character(s), put around the command passed to the shell, for
|
||||
the "!" and ":!" commands. The redirection is kept outside of the
|
||||
@@ -6635,14 +6663,13 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
probably not useful to set both options.
|
||||
This is an empty string by default. Only known to be useful for
|
||||
third-party shells on MS-Windows-like systems, such as the MKS Korn
|
||||
Shell or bash, where it should be "\"". The default is adjusted
|
||||
according the value of 'shell', to reduce the need to set this option
|
||||
by the user. See |dos-shell|.
|
||||
Shell or bash, where it should be "\"". See |dos-shell|.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
*'shellredir'* *'srr'*
|
||||
'shellredir' 'srr' string (default ">", ">&" or ">%s 2>&1")
|
||||
'shellredir' 'srr' string (default ">", ">&", ">%s 2>&1", or
|
||||
"2>&1 | Out-File -Encoding default")
|
||||
global
|
||||
String to be used to put the output of a filter command in a temporary
|
||||
file. See also |:!|. See |option-backslash| about including spaces
|
||||
@@ -6653,10 +6680,12 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
The default is ">". For Unix, if the 'shell' option is "csh" or
|
||||
"tcsh" during initializations, the default becomes ">&". If the
|
||||
'shell' option is "sh", "ksh", "mksh", "pdksh", "zsh", "zsh-beta",
|
||||
"bash" or "fish", the default becomes ">%s 2>&1". This means that
|
||||
stderr is also included. For Win32, the Unix checks are done and
|
||||
additionally "cmd" is checked for, which makes the default ">%s 2>&1".
|
||||
Also, the same names with ".exe" appended are checked for.
|
||||
"bash", "fish", or "pwsh", the default becomes ">%s 2>&1". This means
|
||||
that stderr is also included. For Win32, the Unix checks are done and
|
||||
additionally "cmd" is checked for, which makes the default ">%s 2>&1",
|
||||
and "powershell" is checked for which makes the default
|
||||
"2>&1 | Out-File -Encoding default" (see |dos-powershell|). Also, the
|
||||
same names with ".exe" appended are checked for.
|
||||
The initialization of this option is done after reading the ".vimrc"
|
||||
and the other initializations, so that when the 'shell' option is set
|
||||
there, the 'shellredir' option changes automatically unless it was
|
||||
@@ -6671,9 +6700,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
global
|
||||
{only for MS-Windows}
|
||||
When set, a forward slash is used when expanding file names. This is
|
||||
useful when a Unix-like shell is used instead of cmd.exe. Backward
|
||||
slashes can still be typed, but they are changed to forward slashes by
|
||||
Vim.
|
||||
useful when a Unix-like shell is used instead of cmd.exe, pwsh.exe, or
|
||||
powershell.exe. Backward slashes can still be typed, but they are
|
||||
changed to forward slashes by Vim.
|
||||
Note that setting or resetting this option has no effect for some
|
||||
existing file names, thus this option needs to be set before opening
|
||||
any file for best results. This might change in the future.
|
||||
@@ -6727,6 +6756,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*'shellxquote'* *'sxq'*
|
||||
'shellxquote' 'sxq' string (default: "";
|
||||
for Win32, when 'shell' is cmd.exe: "("
|
||||
for Win32, when 'shell' is
|
||||
powershell.exe: "\""
|
||||
for Win32, when 'shell' contains "sh"
|
||||
somewhere: "\""
|
||||
for Unix, when using system(): "\"")
|
||||
@@ -6739,11 +6770,12 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
then ')"' is appended.
|
||||
When the value is '(' then also see 'shellxescape'.
|
||||
This is an empty string by default on most systems, but is known to be
|
||||
useful for on Win32 version, either for cmd.exe which automatically
|
||||
strips off the first and last quote on a command, or 3rd-party shells
|
||||
such as the MKS Korn Shell or bash, where it should be "\"". The
|
||||
default is adjusted according the value of 'shell', to reduce the need
|
||||
to set this option by the user. See |dos-shell|.
|
||||
useful for on Win32 version, either for cmd.exe, powershell.exe, or
|
||||
pwsh.exe which automatically strips off the first and last quote on a
|
||||
command, or 3rd-party shells such as the MKS Korn Shell or bash, where
|
||||
it should be "\"". The default is adjusted according the value of
|
||||
'shell', to reduce the need to set this option by the user. See
|
||||
|dos-shell|.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
@@ -8611,12 +8643,16 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|
||||
*'virtualedit'* *'ve'*
|
||||
'virtualedit' 've' string (default "")
|
||||
global
|
||||
global or local to buffer |global-local|
|
||||
A comma separated list of these words:
|
||||
block Allow virtual editing in Visual block mode.
|
||||
insert Allow virtual editing in Insert mode.
|
||||
all Allow virtual editing in all modes.
|
||||
onemore Allow the cursor to move just past the end of the line
|
||||
none When used as the local value, do not allow virtual
|
||||
editing even when the global value is set. When used
|
||||
as the global value, "none" is the same as "".
|
||||
NONE Alternative spelling of "none".
|
||||
|
||||
Virtual editing means that the cursor can be positioned where there is
|
||||
no actual character. This can be halfway into a tab or beyond the end
|
||||
|
||||
@@ -17,6 +17,7 @@ versions of Vim. Also see |os_win32.txt| and |os_msdos.txt|.
|
||||
7. Interrupting |dos-CTRL-Break|
|
||||
8. Temp files |dos-temp-files|
|
||||
9. Shell option default |dos-shell|
|
||||
10. PowerShell |dos-powershell|
|
||||
|
||||
==============================================================================
|
||||
1. File locations *dos-locations*
|
||||
@@ -297,8 +298,86 @@ For Win32 as:
|
||||
<shell> -c "command name >file"
|
||||
For DOS 32 bit, DJGPP does this internally somehow.
|
||||
|
||||
When starting up, Vim checks for the presence of "sh" anywhere in the 'shell'
|
||||
option. If it is present, Vim sets the 'shellcmdflag' and 'shellquote' or
|
||||
'shellxquote' options will be set as described above.
|
||||
When starting up, if Vim does not recognise a standard Windows shell it checks
|
||||
for the presence of "sh" anywhere in the 'shell' option. If it is present,
|
||||
Vim sets the 'shellcmdflag' and 'shellquote' or 'shellxquote' options will be
|
||||
set as described above.
|
||||
|
||||
==============================================================================
|
||||
10. PowerShell *dos-powershell* *dos-pwsh*
|
||||
|
||||
Vim supports PowerShell Desktop and PowerShell Core. PowerShell Desktop is
|
||||
the version of PowerShell that is installed with Windows, while PowerShell
|
||||
Core is a separate downloadable version that works cross-platform. To see
|
||||
which version you are using then enter the following in a PowerShell prompt -
|
||||
$PSVersionTable.PSEdition
|
||||
|
||||
If 'shell' includes "powershell" in the filename at startup then VIM sets
|
||||
'shellcmdflag', 'shellxquote', 'shellpipe', and 'shellredir' options to the
|
||||
following values:
|
||||
|
||||
'shellcmdflag' -Command
|
||||
'shellxquote' "
|
||||
'shellpipe' 2>&1 | Out-File -Encoding default
|
||||
'shellredir' 2>&1 | Out-File -Encoding default
|
||||
|
||||
If 'shell' includes "pwsh" in the filename at startup then VIM sets
|
||||
'shellcmdflag', 'shellxquote', 'shellpipe', and 'shellredir' options to the
|
||||
following values:
|
||||
|
||||
'shellcmdflag' -c
|
||||
'shellxquote' "
|
||||
'shellpipe' >%s 2>&1
|
||||
'shellredir' >%s 2>&1
|
||||
|
||||
If you find that PowerShell commands are taking a long time to run then try
|
||||
with "-NoProfile" at the beginning of the 'shellcmdflag'. Note this will
|
||||
prevent any PowerShell environment setup by the profile from taking place.
|
||||
|
||||
If you have problems running PowerShell scripts through the 'shell' then try
|
||||
with "-ExecutionPolicy RemoteSigned -Command" at the beginning of
|
||||
'shellcmdflag'. See online Windows documentation for more information on
|
||||
PowerShell Execution Policy settings.
|
||||
|
||||
See |option-backslash| about including spaces in 'shellcmdflag' when using
|
||||
multiple flags.
|
||||
|
||||
The 'shellpipe' and 'shellredir' option values re-encode the UTF-16le output
|
||||
from PowerShell Desktop to your currently configured console codepage. The
|
||||
output can be forced into a different encoding by changing "default" to one of
|
||||
the following:
|
||||
|
||||
unicode - UTF-16le (default output from PowerShell 5.1)
|
||||
bigendianunicode - UTF-16
|
||||
utf8 - UTF-8
|
||||
utf7 - UTF-7 (no BOM)
|
||||
utf32 - UTF-32
|
||||
ascii - 7-bit ASCII character set
|
||||
default - System's active code page (typically ANSI)
|
||||
oem - System's current OEM code page
|
||||
|
||||
Note The abovce multi-byte Unicode encodings include a leading BOM unless
|
||||
otherwise indicated.
|
||||
|
||||
By default PowerShell Core's output is UTF-8 encoded without a BOM. If you
|
||||
want to force the output of PowerShell Core into a different encoding then set
|
||||
'shellredir' and 'shellpipe' to "2>&1 | Out-File -Encoding encoding" where
|
||||
encoding is one of the following:
|
||||
|
||||
ascii - 7-bit ASCII character set
|
||||
bigendianunicode - UTF-16be
|
||||
bigendianutf32 - UTF-32be
|
||||
oem - System's current OEM code page
|
||||
unicode - UTF-16le
|
||||
utf7 - UTF-7
|
||||
utf8 - UTF-8
|
||||
utf8BOM - UTF-8, with BOM
|
||||
utf8NoBOM - UTF-8, no BOM (default output from PowerShell Core)
|
||||
utf32 - UTF-32
|
||||
|
||||
Since PowerShell Core 6.2, the Encoding parameter also supports specifying a
|
||||
numeric ID of a registered code page (-Encoding 1251) or string names of
|
||||
registered code pages (-Encoding "windows-1251"). The .NET documentation for
|
||||
Encoding.CodePage has more information
|
||||
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -767,12 +767,12 @@ GNU_TOOLS.ZIP package downloadable from http://www.polarhome.com/vim/
|
||||
|
||||
Version 8.2
|
||||
- make all changes needed for clean compile build of v8.2 on VMS on all platforms
|
||||
- fix the call mkdir bug (vicente_polo@yahoo.es)
|
||||
- fix the call mkdir bug (vicente_polo@yahoo.es)
|
||||
- test on VSI OpenVMS Alpha and Itanium platforms
|
||||
- added LUA support
|
||||
- added XPM support - Motif GUI with toolbar on all platforms
|
||||
- XPM v3.4.11 libraries for IA64, AXP and VAX are added
|
||||
- start integrating the new test scripts
|
||||
- XPM v3.4.11 libraries for IA64, AXP and VAX are added
|
||||
- start integrating the new test scripts
|
||||
|
||||
Version 8.1
|
||||
- make necessary changes to build v8.1 on VMS
|
||||
|
||||
@@ -18,7 +18,8 @@ The 32 bit version also runs on 64 bit MS-Windows systems.
|
||||
4. Using the mouse |win32-mouse|
|
||||
5. Running under Windows 95 |win32-win95|
|
||||
6. Running under Windows 3.1 |win32-win3.1|
|
||||
7. Win32 mini FAQ |win32-faq|
|
||||
7. Installation package |win32-installer|
|
||||
8. Win32 mini FAQ |win32-faq|
|
||||
|
||||
Additionally, there are a number of common Win32 and DOS items:
|
||||
File locations |dos-locations|
|
||||
@@ -30,6 +31,7 @@ File formats |dos-file-formats|
|
||||
Interrupting |dos-CTRL-Break|
|
||||
Temp files |dos-temp-files|
|
||||
Shell option default |dos-shell|
|
||||
PowerShell defaults |dos-powershell|
|
||||
|
||||
Win32 GUI |gui-w32|
|
||||
|
||||
@@ -174,7 +176,29 @@ There was a special version of gvim that runs under Windows 3.1 and 3.11.
|
||||
Support was removed in patch 7.4.1364.
|
||||
|
||||
==============================================================================
|
||||
7. Win32 mini FAQ *win32-faq*
|
||||
7. Installation package *win32-installer*
|
||||
|
||||
A simple installer for windows is available at http://www.vim.org/download.php
|
||||
(stable version) and nightly builds are also available at
|
||||
https://github.com/vim/vim-win32-installer/releases/
|
||||
|
||||
The nightly builds include 32bit and 64bit builds, have most features enabled
|
||||
and usually also contain an extra cryptographic signed installer, so Windows
|
||||
will not complain.
|
||||
|
||||
To use the installer, simply run the exe file. The following switches are
|
||||
also supported: >
|
||||
|
||||
gvim_<version>.exe /S -> silent install without any dialogues
|
||||
gvim_<version>.exe /D=C:\vim -> Install into directory c:\vim
|
||||
-> /D must be the last argument
|
||||
gvim_<version>.exe /S /D=c:\vim -> silent install into c:\vim
|
||||
<
|
||||
The default installation directory can alternatively be given by setting the
|
||||
$VIM environment variable.
|
||||
|
||||
==============================================================================
|
||||
8. Win32 mini FAQ *win32-faq*
|
||||
|
||||
Q. How do I change the font?
|
||||
A. In the GUI version, you can use the 'guifont' option. Example: >
|
||||
|
||||
@@ -929,13 +929,20 @@ $ At end of pattern or in front of "\|", "\)" or "\n" ('magic' on):
|
||||
\%23l Matches in a specific line.
|
||||
\%<23l Matches above a specific line (lower line number).
|
||||
\%>23l Matches below a specific line (higher line number).
|
||||
\%.l Matches at the cursor line.
|
||||
\%<.l Matches above the cursor line.
|
||||
\%>.l Matches below the cursor line.
|
||||
These three can be used to match specific lines in a buffer. The "23"
|
||||
can be any line number. The first line is 1.
|
||||
WARNING: When inserting or deleting lines Vim does not automatically
|
||||
update the matches. This means Syntax highlighting quickly becomes
|
||||
wrong.
|
||||
wrong. Also when refering to the cursor position (".") and
|
||||
the cursor moves the display isn't updated for this change. An update
|
||||
is done when using the |CTRL-L| command (the whole screen is updated).
|
||||
Example, to highlight the line where the cursor currently is: >
|
||||
:exe '/\%' . line(".") . 'l.*'
|
||||
:exe '/\%' . line(".") . 'l'
|
||||
< Alternatively use: >
|
||||
/\%.l
|
||||
< When 'hlsearch' is set and you move the cursor around and make changes
|
||||
this will clearly show when the match is updated or not.
|
||||
|
||||
@@ -943,15 +950,23 @@ $ At end of pattern or in front of "\|", "\)" or "\n" ('magic' on):
|
||||
\%23c Matches in a specific column.
|
||||
\%<23c Matches before a specific column.
|
||||
\%>23c Matches after a specific column.
|
||||
\%.c Matches at the cursor column.
|
||||
\%<.c Matches before the cursor column.
|
||||
\%>.c Matches after the cursor column.
|
||||
These three can be used to match specific columns in a buffer or
|
||||
string. The "23" can be any column number. The first column is 1.
|
||||
Actually, the column is the byte number (thus it's not exactly right
|
||||
for multibyte characters).
|
||||
WARNING: When inserting or deleting text Vim does not automatically
|
||||
update the matches. This means Syntax highlighting quickly becomes
|
||||
wrong.
|
||||
wrong. Also when refering to the cursor position (".") and
|
||||
the cursor moves the display isn't updated for this change. An update
|
||||
is done when using the |CTRL-L| command (the whole screen is updated).
|
||||
|
||||
Example, to highlight the column where the cursor currently is: >
|
||||
:exe '/\%' . col(".") . 'c'
|
||||
< Alternatively use: >
|
||||
/\%.c
|
||||
< When 'hlsearch' is set and you move the cursor around and make changes
|
||||
this will clearly show when the match is updated or not.
|
||||
Example for matching a single byte in column 44: >
|
||||
@@ -962,6 +977,9 @@ $ At end of pattern or in front of "\|", "\)" or "\n" ('magic' on):
|
||||
\%23v Matches in a specific virtual column.
|
||||
\%<23v Matches before a specific virtual column.
|
||||
\%>23v Matches after a specific virtual column.
|
||||
\%.v Matches at the current virtual column.
|
||||
\%<.v Matches before the current virtual column.
|
||||
\%>.v Matches after the current virtual column.
|
||||
These three can be used to match specific virtual columns in a buffer
|
||||
or string. When not matching with a buffer in a window, the option
|
||||
values of the current window are used (e.g., 'tabstop').
|
||||
@@ -971,13 +989,18 @@ $ At end of pattern or in front of "\|", "\)" or "\n" ('magic' on):
|
||||
one screen character.
|
||||
WARNING: When inserting or deleting text Vim does not automatically
|
||||
update highlighted matches. This means Syntax highlighting quickly
|
||||
becomes wrong.
|
||||
becomes wrong. Also when refering to the cursor position (".") and
|
||||
the cursor moves the display isn't updated for this change. An update
|
||||
is done when using the |CTRL-L| command (the whole screen is updated).
|
||||
Example, to highlight all the characters after virtual column 72: >
|
||||
/\%>72v.*
|
||||
< When 'hlsearch' is set and you move the cursor around and make changes
|
||||
this will clearly show when the match is updated or not.
|
||||
To match the text up to column 17: >
|
||||
/^.*\%17v
|
||||
< To match all characters after the current virtual column (where the
|
||||
cursor is): >
|
||||
/\%>.v.*
|
||||
< Column 17 is not included, because this is a |/zero-width| match. To
|
||||
include the column use: >
|
||||
/^.*\%17v.
|
||||
@@ -1217,7 +1240,7 @@ x A single character, with no special meaning, matches itself
|
||||
|
||||
\%d123 Matches the character specified with a decimal number. Must be
|
||||
followed by a non-digit.
|
||||
\%o40 Matches the character specified with an octal number up to 0377.
|
||||
\%o40 Matches the character specified with an octal number up to 0o377.
|
||||
Numbers below 0o40 must be followed by a non-octal digit or a
|
||||
non-digit.
|
||||
\%x2a Matches the character specified with up to two hexadecimal characters.
|
||||
|
||||
@@ -3809,7 +3809,7 @@ netrw:
|
||||
Decho.vim is provided as a "vimball"; see |vimball-intro|. You
|
||||
should edit the Decho.vba.gz file and source it in: >
|
||||
|
||||
vim Decho.vba.gz
|
||||
vim Decho.vba.gz
|
||||
:so %
|
||||
:q
|
||||
<
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*repeat.txt* For Vim version 8.2. Last change: 2021 May 08
|
||||
*repeat.txt* For Vim version 8.2. Last change: 2021 Jun 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -279,7 +279,9 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
|
||||
ftdetect scripts are loaded, only the matching
|
||||
directories are added to 'runtimepath'. This is
|
||||
useful in your .vimrc. The plugins will then be
|
||||
loaded during initialization, see |load-plugins|.
|
||||
loaded during initialization, see |load-plugins| (note
|
||||
that the loading order will be reversed, because each
|
||||
directory is inserted before others).
|
||||
Note that for ftdetect scripts to be loaded
|
||||
you will need to write `filetype plugin indent on`
|
||||
AFTER all `packadd!` commands.
|
||||
@@ -372,7 +374,7 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
|
||||
for some commands.
|
||||
See |:vim9cmd| for executing one command with Vim9
|
||||
syntax and semantics.
|
||||
|
||||
|
||||
*:scr* *:scriptnames*
|
||||
:scr[iptnames] List all sourced script names, in the order they were
|
||||
first sourced. The number is used for the script ID
|
||||
@@ -842,6 +844,16 @@ About the additional commands in debug mode:
|
||||
is reset (because it's not clear what you want to repeat).
|
||||
- When you want to use the Ex command with the same name, prepend a colon:
|
||||
":cont", ":next", ":finish" (or shorter).
|
||||
*vim9-debug*
|
||||
When debugging a compiled :def function, "step" will stop before every
|
||||
executed line, not every single instruction. Thus it works mostly like a not
|
||||
compiled function. Access to local variables is limited you can use: >
|
||||
echo varname
|
||||
But not much else.
|
||||
When executing a command that is not a specific bytecode instruction but
|
||||
executed like a normal Ex command, "step" will stop once in the compiled
|
||||
context, where local variables can be inspected, and once just before
|
||||
executing the command.
|
||||
|
||||
The backtrace shows the hierarchy of function calls, e.g.:
|
||||
>bt ~
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*rileft.txt* For Vim version 8.2. Last change: 2019 May 05
|
||||
*rileft.txt* For Vim version 8.2. Last change: 2021 Jun 13
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Avner Lottem
|
||||
@@ -75,7 +75,7 @@ o Invocations
|
||||
|
||||
o Typing backwards *ins-reverse*
|
||||
----------------
|
||||
In lieu of using full-fledged the 'rightleft' option, one can opt for
|
||||
In lieu of using the full-fledged 'rightleft' option, one can opt for
|
||||
reverse insertion. When the 'revins' (reverse insert) option is set,
|
||||
inserting happens backwards. This can be used to type right-to-left
|
||||
text. When inserting characters the cursor is not moved and the text
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*sponsor.txt* For Vim version 8.2. Last change: 2008 Jun 21
|
||||
*sponsor.txt* For Vim version 8.2. Last change: 2021 Jul 07
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -11,9 +11,8 @@ Fixing bugs and adding new features takes a lot of time and effort. To show
|
||||
your appreciation for the work and motivate Bram and others to continue
|
||||
working on Vim please send a donation.
|
||||
|
||||
Since Bram is back to a paid job the money will now be used to help children
|
||||
in Uganda. See |uganda|. But at the same time donations increase Bram's
|
||||
motivation to keep working on Vim!
|
||||
Since Bram does not need the money it will be used to help children in Uganda,
|
||||
see |uganda|. Donations increase Bram's motivation to keep working on Vim!
|
||||
|
||||
For the most recent information about sponsoring look on the Vim web site:
|
||||
|
||||
@@ -74,19 +73,6 @@ Other methods See |iccf-donations|.
|
||||
amount you transferred if you want to vote for features and
|
||||
show others you are a registered Vim user or sponsor.
|
||||
|
||||
Cash Small amounts can be sent with ordinary mail. Put something
|
||||
around the money, so that it's not noticeable from the
|
||||
outside. Mention your e-mail address if you want to vote for
|
||||
features and show others you are a registered Vim user or
|
||||
sponsor.
|
||||
|
||||
You can use this permanent address:
|
||||
Bram Moolenaar
|
||||
Finsterruetihof 1
|
||||
8134 Adliswil
|
||||
Switzerland
|
||||
|
||||
|
||||
|
||||
QUESTIONS AND ANSWERS *sponsor-faq* *register-faq*
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*syntax.txt* For Vim version 8.2. Last change: 2021 May 30
|
||||
*syntax.txt* For Vim version 8.2. Last change: 2021 Jul 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1420,11 +1420,17 @@ To select syntax highlighting file for Euphoria, as well as for
|
||||
auto-detecting the *.e and *.E file extensions as Euphoria file type,
|
||||
add the following line to your startup file: >
|
||||
|
||||
:let filetype_euphoria="euphoria3"
|
||||
:let g:filetype_euphoria = "euphoria3"
|
||||
|
||||
or
|
||||
< or >
|
||||
|
||||
:let filetype_euphoria="euphoria4"
|
||||
:let g:filetype_euphoria = "euphoria4"
|
||||
|
||||
Elixir and Euphoria share the *.ex file extension. If the filetype is
|
||||
specifically set as Euphoria with the g:filetype_euphoria variable, or the
|
||||
file is determined to be Euphoria based on keywords in the file, then the
|
||||
filetype will be set as Euphoria. Otherwise, the filetype will default to
|
||||
Elixir.
|
||||
|
||||
|
||||
ERLANG *erlang.vim* *ft-erlang-syntax*
|
||||
@@ -1442,6 +1448,22 @@ To enable highlighting some special atoms, put this in your vimrc: >
|
||||
:let g:erlang_highlight_special_atoms = 1
|
||||
|
||||
|
||||
ELIXIR *elixir.vim* *ft-elixir-syntax*
|
||||
|
||||
Elixir is a dynamic, functional language for building scalable and maintainable
|
||||
applications.
|
||||
|
||||
The following file extensions are auto-detected as Elixir file types:
|
||||
|
||||
*.ex, *.exs, *.eex, *.leex, *.lock
|
||||
|
||||
Elixir and Euphoria share the *.ex file extension. If the filetype is
|
||||
specifically set as Euphoria with the g:filetype_euphoria variable, or the
|
||||
file is determined to be Euphoria based on keywords in the file, then the
|
||||
filetype will be set as Euphoria. Otherwise, the filetype will default to
|
||||
Elixir.
|
||||
|
||||
|
||||
FLEXWIKI *flexwiki.vim* *ft-flexwiki-syntax*
|
||||
|
||||
FlexWiki is an ASP.NET-based wiki package available at http://www.flexwiki.com
|
||||
@@ -3430,8 +3452,8 @@ syntax highlighting script handles this with the following logic:
|
||||
Tex: Match Check Control~
|
||||
|
||||
Sometimes one actually wants mismatched parentheses, square braces,
|
||||
and or curly braces; for example, \text{(1,10] is a range from but
|
||||
not including 1 to and including 10}. This wish, of course, conflicts
|
||||
and or curly braces; for example, \text{(1,10]} is a range from but
|
||||
not including 1 to and including 10. This wish, of course, conflicts
|
||||
with the desire to provide delimiter mismatch detection. To
|
||||
accommodate these conflicting goals, syntax/tex.vim provides >
|
||||
g:tex_matchcheck = '[({[]'
|
||||
@@ -4084,7 +4106,7 @@ match in the same position overrules an earlier one). The "transparent"
|
||||
argument makes the "myVim" match use the same highlighting as "myString". But
|
||||
it does not contain anything. If the "contains=NONE" argument would be left
|
||||
out, then "myVim" would use the contains argument from myString and allow
|
||||
"myWord" to be contained, which will be highlighted as a Constant. This
|
||||
"myWord" to be contained, which will be highlighted as a Comment. This
|
||||
happens because a contained match doesn't match inside itself in the same
|
||||
position, thus the "myVim" match doesn't overrule the "myWord" match here.
|
||||
|
||||
@@ -4970,8 +4992,8 @@ ctermul={color-nr} *highlight-ctermul*
|
||||
*tmux*
|
||||
When using tmux you may want to use this in the tmux config: >
|
||||
# tmux colors
|
||||
set -g default-terminal "xterm-256color"
|
||||
set -ag terminal-overrides ",xterm-256color:Tc"
|
||||
set -s default-terminal "tmux-256color"
|
||||
set -as terminal-overrides ",*-256color:Tc"
|
||||
< More info at:
|
||||
https://github.com/tmux/tmux/wiki/FAQ#how-do-i-use-a-256-colour-terminal
|
||||
https://github.com/tmux/tmux/wiki/FAQ#how-do-i-use-rgb-colour
|
||||
|
||||
@@ -1384,6 +1384,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
+scrollbind various.txt /*+scrollbind*
|
||||
+signs various.txt /*+signs*
|
||||
+smartindent various.txt /*+smartindent*
|
||||
+sodium various.txt /*+sodium*
|
||||
+sound various.txt /*+sound*
|
||||
+spell various.txt /*+spell*
|
||||
+startuptime various.txt /*+startuptime*
|
||||
@@ -1959,7 +1960,9 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
:& change.txt /*:&*
|
||||
:&& change.txt /*:&&*
|
||||
:' cmdline.txt /*:'*
|
||||
:++ vim9.txt /*:++*
|
||||
:, cmdline.txt /*:,*
|
||||
:-- vim9.txt /*:--*
|
||||
:. cmdline.txt /*:.*
|
||||
:/ cmdline.txt /*:\/*
|
||||
:0file editing.txt /*:0file*
|
||||
@@ -3964,8 +3967,17 @@ E118 eval.txt /*E118*
|
||||
E1187 starting.txt /*E1187*
|
||||
E1188 cmdline.txt /*E1188*
|
||||
E119 eval.txt /*E119*
|
||||
E1193 options.txt /*E1193*
|
||||
E1194 options.txt /*E1194*
|
||||
E1195 options.txt /*E1195*
|
||||
E1196 options.txt /*E1196*
|
||||
E1197 options.txt /*E1197*
|
||||
E1198 options.txt /*E1198*
|
||||
E1199 options.txt /*E1199*
|
||||
E12 message.txt /*E12*
|
||||
E120 eval.txt /*E120*
|
||||
E1200 options.txt /*E1200*
|
||||
E1201 options.txt /*E1201*
|
||||
E121 eval.txt /*E121*
|
||||
E122 eval.txt /*E122*
|
||||
E123 eval.txt /*E123*
|
||||
@@ -6178,6 +6190,8 @@ dos-backslash os_dos.txt /*dos-backslash*
|
||||
dos-colors os_dos.txt /*dos-colors*
|
||||
dos-file-formats os_dos.txt /*dos-file-formats*
|
||||
dos-locations os_dos.txt /*dos-locations*
|
||||
dos-powershell os_dos.txt /*dos-powershell*
|
||||
dos-pwsh os_dos.txt /*dos-pwsh*
|
||||
dos-shell os_dos.txt /*dos-shell*
|
||||
dos-standard-mappings os_dos.txt /*dos-standard-mappings*
|
||||
dos-temp-files os_dos.txt /*dos-temp-files*
|
||||
@@ -6190,6 +6204,7 @@ dp diff.txt /*dp*
|
||||
drag-n-drop gui.txt /*drag-n-drop*
|
||||
drag-n-drop-win32 gui_w32.txt /*drag-n-drop-win32*
|
||||
drag-status-line term.txt /*drag-status-line*
|
||||
drop_file gui.txt /*drop_file*
|
||||
dtd.vim syntax.txt /*dtd.vim*
|
||||
dtd2vim insert.txt /*dtd2vim*
|
||||
dying-variable eval.txt /*dying-variable*
|
||||
@@ -6210,6 +6225,7 @@ efm-%> quickfix.txt /*efm-%>*
|
||||
efm-entries quickfix.txt /*efm-entries*
|
||||
efm-ignore quickfix.txt /*efm-ignore*
|
||||
eiffel.vim syntax.txt /*eiffel.vim*
|
||||
elixir.vim syntax.txt /*elixir.vim*
|
||||
emacs-keys tips.txt /*emacs-keys*
|
||||
emacs-tags tagsrch.txt /*emacs-tags*
|
||||
emacs_tags tagsrch.txt /*emacs_tags*
|
||||
@@ -6559,6 +6575,7 @@ ft-docbkxml-syntax syntax.txt /*ft-docbkxml-syntax*
|
||||
ft-dosbatch-syntax syntax.txt /*ft-dosbatch-syntax*
|
||||
ft-dtd-syntax syntax.txt /*ft-dtd-syntax*
|
||||
ft-eiffel-syntax syntax.txt /*ft-eiffel-syntax*
|
||||
ft-elixir-syntax syntax.txt /*ft-elixir-syntax*
|
||||
ft-erlang-syntax syntax.txt /*ft-erlang-syntax*
|
||||
ft-euphoria-syntax syntax.txt /*ft-euphoria-syntax*
|
||||
ft-flexwiki-syntax syntax.txt /*ft-flexwiki-syntax*
|
||||
@@ -6674,6 +6691,8 @@ ft-yaml-syntax syntax.txt /*ft-yaml-syntax*
|
||||
ft-zimbu-plugin filetype.txt /*ft-zimbu-plugin*
|
||||
ft-zsh-syntax syntax.txt /*ft-zsh-syntax*
|
||||
ft_ada.txt ft_ada.txt /*ft_ada.txt*
|
||||
ft_ps1.txt ft_ps1.txt /*ft_ps1.txt*
|
||||
ft_raku.txt ft_raku.txt /*ft_raku.txt*
|
||||
ft_rust.txt ft_rust.txt /*ft_rust.txt*
|
||||
ft_sql.txt ft_sql.txt /*ft_sql.txt*
|
||||
ftdetect filetype.txt /*ftdetect*
|
||||
@@ -7000,6 +7019,7 @@ getchar() eval.txt /*getchar()*
|
||||
getcharmod() eval.txt /*getcharmod()*
|
||||
getcharpos() eval.txt /*getcharpos()*
|
||||
getcharsearch() eval.txt /*getcharsearch()*
|
||||
getcharstr() eval.txt /*getcharstr()*
|
||||
getcmdline() eval.txt /*getcmdline()*
|
||||
getcmdpos() eval.txt /*getcmdpos()*
|
||||
getcmdtype() eval.txt /*getcmdtype()*
|
||||
@@ -7901,6 +7921,7 @@ moo.vim syntax.txt /*moo.vim*
|
||||
more-compatible version5.txt /*more-compatible*
|
||||
more-prompt message.txt /*more-prompt*
|
||||
more-variables eval.txt /*more-variables*
|
||||
motion-count-multiplied motion.txt /*motion-count-multiplied*
|
||||
motion.txt motion.txt /*motion.txt*
|
||||
mouse-mode-table term.txt /*mouse-mode-table*
|
||||
mouse-overview term.txt /*mouse-overview*
|
||||
@@ -8348,6 +8369,7 @@ omni-sql-completion ft_sql.txt /*omni-sql-completion*
|
||||
online-help helphelp.txt /*online-help*
|
||||
opening-window windows.txt /*opening-window*
|
||||
operator motion.txt /*operator*
|
||||
operator-doubled motion.txt /*operator-doubled*
|
||||
operator-pending-index index.txt /*operator-pending-index*
|
||||
operator-variable eval.txt /*operator-variable*
|
||||
option-backslash options.txt /*option-backslash*
|
||||
@@ -8401,6 +8423,7 @@ page_up intro.txt /*page_up*
|
||||
pager message.txt /*pager*
|
||||
papp.vim syntax.txt /*papp.vim*
|
||||
paragraph motion.txt /*paragraph*
|
||||
partial eval.txt /*partial*
|
||||
pascal.vim syntax.txt /*pascal.vim*
|
||||
patches-8 version8.txt /*patches-8*
|
||||
patches-8.1 version8.txt /*patches-8.1*
|
||||
@@ -8598,7 +8621,6 @@ ps1-compiler ft_ps1.txt /*ps1-compiler*
|
||||
ps1-folding ft_ps1.txt /*ps1-folding*
|
||||
ps1-keyword ft_ps1.txt /*ps1-keyword*
|
||||
ps1-syntax ft_ps1.txt /*ps1-syntax*
|
||||
ps1.txt ft_ps1.txt /*ps1.txt*
|
||||
psql ft_sql.txt /*psql*
|
||||
ptcap.vim syntax.txt /*ptcap.vim*
|
||||
pterm-mouse options.txt /*pterm-mouse*
|
||||
@@ -9673,6 +9695,8 @@ test_feedinput() testing.txt /*test_feedinput()*
|
||||
test_garbagecollect_now() testing.txt /*test_garbagecollect_now()*
|
||||
test_garbagecollect_soon() testing.txt /*test_garbagecollect_soon()*
|
||||
test_getvalue() testing.txt /*test_getvalue()*
|
||||
test_gui_drop_files() testing.txt /*test_gui_drop_files()*
|
||||
test_gui_mouse_event() testing.txt /*test_gui_mouse_event()*
|
||||
test_ignore_error() testing.txt /*test_ignore_error()*
|
||||
test_null_blob() testing.txt /*test_null_blob()*
|
||||
test_null_channel() testing.txt /*test_null_channel()*
|
||||
@@ -10066,6 +10090,7 @@ v_u change.txt /*v_u*
|
||||
v_v visual.txt /*v_v*
|
||||
v_x change.txt /*v_x*
|
||||
v_y change.txt /*v_y*
|
||||
v_zy change.txt /*v_zy*
|
||||
v_~ change.txt /*v_~*
|
||||
vab motion.txt /*vab*
|
||||
val-variable eval.txt /*val-variable*
|
||||
@@ -10141,7 +10166,6 @@ vim-mac intro.txt /*vim-mac*
|
||||
vim-modes intro.txt /*vim-modes*
|
||||
vim-modes-intro intro.txt /*vim-modes-intro*
|
||||
vim-raku ft_raku.txt /*vim-raku*
|
||||
vim-raku.txt ft_raku.txt /*vim-raku.txt*
|
||||
vim-script-intro usr_41.txt /*vim-script-intro*
|
||||
vim-use intro.txt /*vim-use*
|
||||
vim-variable eval.txt /*vim-variable*
|
||||
@@ -10152,6 +10176,7 @@ vim9 vim9.txt /*vim9*
|
||||
vim9-classes vim9.txt /*vim9-classes*
|
||||
vim9-const vim9.txt /*vim9-const*
|
||||
vim9-curly vim9.txt /*vim9-curly*
|
||||
vim9-debug repeat.txt /*vim9-debug*
|
||||
vim9-declaration vim9.txt /*vim9-declaration*
|
||||
vim9-declarations usr_46.txt /*vim9-declarations*
|
||||
vim9-differences vim9.txt /*vim9-differences*
|
||||
@@ -10435,6 +10460,7 @@ zOS-PuTTY os_390.txt /*zOS-PuTTY*
|
||||
zOS-has-ebcdic os_390.txt /*zOS-has-ebcdic*
|
||||
zOS-limitations os_390.txt /*zOS-limitations*
|
||||
zOS-open-source os_390.txt /*zOS-open-source*
|
||||
zP change.txt /*zP*
|
||||
zR fold.txt /*zR*
|
||||
zW spell.txt /*zW*
|
||||
zX fold.txt /*zX*
|
||||
@@ -10462,6 +10488,7 @@ zl scroll.txt /*zl*
|
||||
zm fold.txt /*zm*
|
||||
zn fold.txt /*zn*
|
||||
zo fold.txt /*zo*
|
||||
zp change.txt /*zp*
|
||||
zr fold.txt /*zr*
|
||||
zs scroll.txt /*zs*
|
||||
zsh.vim syntax.txt /*zsh.vim*
|
||||
@@ -10473,6 +10500,7 @@ zuw spell.txt /*zuw*
|
||||
zv fold.txt /*zv*
|
||||
zw spell.txt /*zw*
|
||||
zx fold.txt /*zx*
|
||||
zy change.txt /*zy*
|
||||
zz scroll.txt /*zz*
|
||||
{ motion.txt /*{*
|
||||
{Visual} intro.txt /*{Visual}*
|
||||
|
||||
@@ -373,10 +373,10 @@ Added by Vim (there are no standard codes for these):
|
||||
t_Ri restore icon text from stack *t_Ri* *'t_Ri'*
|
||||
t_TE end of "raw" mode *t_TE* *'t_TE'*
|
||||
t_TI put terminal into "raw" mode *t_TI* *'t_TI'*
|
||||
t_fd disable focus-event tracking *t_fd* *'t_fd'*
|
||||
|xterm-focus-event|
|
||||
t_fe enable focus-event tracking *t_fe* *'t_fe'*
|
||||
|xterm-focus-event|
|
||||
t_fd disable focus-event tracking *t_fd* *'t_fd'*
|
||||
|xterm-focus-event|
|
||||
|
||||
Some codes have a start, middle and end part. The start and end are defined
|
||||
by the termcap option, the middle part is text.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*testing.txt* For Vim version 8.2. Last change: 2021 Apr 02
|
||||
*testing.txt* For Vim version 8.2. Last change: 2021 Jul 07
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -78,6 +78,46 @@ test_getvalue({name}) *test_getvalue()*
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetName()->test_getvalue()
|
||||
<
|
||||
*test_gui_drop_files()*
|
||||
test_gui_drop_files({list}, {row}, {col}, {mods})
|
||||
Drop one or more files in {list} in the window at {row}, {col}.
|
||||
This function only works when the GUI is running and the
|
||||
|drag-n-drop| feature is present.
|
||||
|
||||
The supported values for {mods} are:
|
||||
0x4 Shift
|
||||
0x8 Alt
|
||||
0x10 Ctrl
|
||||
The files are added to the argument list and the first file in
|
||||
{list} is edited in the window. See |drag-n-drop| for more
|
||||
information.
|
||||
|
||||
*test_gui_mouse_event()*
|
||||
test_gui_mouse_event({button}, {row}, {col}, {multiclick}, {modifiers})
|
||||
Inject a mouse button click event. This function only works
|
||||
when the GUI is running.
|
||||
The supported values for {button} are:
|
||||
0 right mouse button
|
||||
1 middle mouse button
|
||||
2 left mouse button
|
||||
3 mouse button release
|
||||
4 scroll wheel down
|
||||
5 scroll wheel up
|
||||
6 scroll wheel left
|
||||
7 scroll wheel right
|
||||
{row} and {col} specify the location of the mouse click. The
|
||||
first row of the Vim window is 1 and the last row is 'lines'.
|
||||
The maximum value of {col} is 'columns'.
|
||||
To inject a multiclick event, set {multiclick} to 1.
|
||||
The supported values for {modifiers} are:
|
||||
4 shift is pressed
|
||||
8 alt is pressed
|
||||
16 ctrl is pressed
|
||||
After injecting the mouse event you probably should call
|
||||
|feedkeys()| to have them processed, e.g.: >
|
||||
call feedkeys("y", 'Lx!')
|
||||
|
||||
|
||||
test_ignore_error({expr}) *test_ignore_error()*
|
||||
Ignore any error containing {expr}. A normal message is given
|
||||
|
||||
@@ -211,6 +211,8 @@ prop_list({lnum} [, {props}]) *prop_list()*
|
||||
id property ID
|
||||
type name of the property type, omitted if
|
||||
the type was deleted
|
||||
type_bufnr buffer number for which this type was defined;
|
||||
0 if the type is global
|
||||
start when TRUE property starts in this line
|
||||
end when TRUE property ends in this line
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 8.2. Last change: 2021 May 28
|
||||
*todo.txt* For Vim version 8.2. Last change: 2021 Jul 05
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -38,57 +38,31 @@ browser use: https://github.com/vim/vim/issues/1234
|
||||
*known-bugs*
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
Geen memory leak?
|
||||
|
||||
Crash using outer var from nested lambda:
|
||||
vim9script
|
||||
def F(text: string): func(string): func(string): string
|
||||
return (arg: string): func(string): string => ((sep: string): string => {
|
||||
return text .. ' ' .. arg
|
||||
})
|
||||
enddef
|
||||
|
||||
echo F('hello')(' ')('there')
|
||||
|
||||
|
||||
|
||||
Vim9 - Make everything work:
|
||||
- function returning nothing should return void instead of zero
|
||||
- compile "expr" and "call" expression of a channel in channel_exe_cmd()?
|
||||
- Need some solution for dict function. Can we implement part of classes?
|
||||
- A lambda without {} does not require a return type, using { return x } does.
|
||||
That's unexpected, since the arguments are not required to have a type.
|
||||
alt 1: not require a return type, figure it out from the common type of all
|
||||
the return statements found
|
||||
alt 2: also require argument types
|
||||
- Using "windo echo expr" does not accept a line break inside "expr" (in a
|
||||
:def function and at script level in a not executed block). #7681
|
||||
- possible leak in test_vim9_builtin ?
|
||||
- Make "for _ in range()" work, do not store the value in a var.
|
||||
- use CheckLegacyAndVim9Success(lines) in many more places
|
||||
- compile get_lambda_tv() in popup_add_timeout()
|
||||
- For builtin functions using tv_get_string*() use check_for_string() to be
|
||||
more strict about the argument type (not a bool).
|
||||
done: balloon_()
|
||||
- Check many more builtin function arguments at compile time.
|
||||
map() could check that the return type of the function argument matches
|
||||
the type of the list or dict member. (#8092)
|
||||
- Allow for using an autoload function name without quotes. It is then loaded
|
||||
(and compiled) right away. #8124
|
||||
- Test more expressions in legacy and Vim9 script, using
|
||||
CheckLegacyAndVim9Success()
|
||||
Same for other functions, such as searchpair().
|
||||
- Test try/catch and throw better, also nested.
|
||||
Test that return inside try/finally jumps to finally and then returns.
|
||||
- Test that a function defined inside a :def function is local to that
|
||||
function, g: functions can be defined and script-local functions cannot be
|
||||
defined.
|
||||
- Make debugging work - at least per function. Need to recompile a function
|
||||
to step through it line-by-line? Evaluate the stack and variables on the
|
||||
stack?
|
||||
- Reserve command for future use: :type, :class, :enum
|
||||
- Unexpected error message when using "var x: any | x.key = 9", because "x" is
|
||||
given the type number. Can we use VAR_ANY?
|
||||
|
||||
Once Vim9 is stable:
|
||||
- Add the "vim9script" feature, can use has('vim9script')
|
||||
- Change the help to prefer Vim9 syntax where appropriate
|
||||
- Add all the error numbers in a good place in documentation.
|
||||
- In the generic eval docs, point out the Vim9 syntax where it differs.
|
||||
- Add the "vim9script" feature, can use has('vim9script')
|
||||
- Use Vim9 for runtime files.
|
||||
PR #7497 for autoload/ccomplete.vim
|
||||
|
||||
@@ -100,13 +74,12 @@ Further Vim9 improvements, possibly after launch:
|
||||
Give an error if compilation fails. (#7625)
|
||||
Use the location where the option was set for deciding whether it's to be
|
||||
evaluated in Vim9 script context.
|
||||
- implement :type, import type declaration.
|
||||
- implement enum, import enum.
|
||||
- Future work: See |vim9-classes|
|
||||
- implement :type, "import type"
|
||||
- implement enum, "import enum".
|
||||
- implement class and interface: See |vim9-classes|
|
||||
- For range: make table of first ASCII character with flag to quickly check if
|
||||
it can be a Vim9 command. E.g. "+" can, but "." can't.
|
||||
- compile get_lambda_tv() in popup_add_timeout()
|
||||
- inline call to map() and filter()
|
||||
- Inline call to map() and filter(), better type checking.
|
||||
- Make accessing varargs faster: arg[expr]
|
||||
EVAL expr
|
||||
LOADVARARG (varargs idx)
|
||||
@@ -273,6 +246,10 @@ test_arglist func Test_all_not_allowed_from_cmdwin() hangs on MS-Windows.
|
||||
|
||||
Mapping with partial match not executed properly in GTK. (Ingo Karkat, #7082)
|
||||
|
||||
Problem that a previous silent ":throw" causes a following try/catch not to
|
||||
work. (ZyX, 2013 Sep 28) With examples: (Malcolm Rowe, 2015 Dec 24)
|
||||
Also see #8487 for an example.
|
||||
|
||||
Patch for Template string: #4634
|
||||
Have another look at the implementation.
|
||||
|
||||
@@ -300,6 +277,9 @@ inconsistent with the documentation.
|
||||
Making breakat support multibyte characters (Yasuhiro Matsumoto, #6598)
|
||||
Scroll doesn't work correctly, why?
|
||||
|
||||
glob() and globfile() do not always honor 'wildignorecase'. #8350
|
||||
globpath() does not use 'wildignorecase' at all?
|
||||
|
||||
Add 'termguiattr' option, use "gui=" attributes in the terminal? Would work
|
||||
with 'termguicolors'. #1740
|
||||
|
||||
@@ -312,6 +292,9 @@ Missing filetype test for bashrc, PKGBUILD, etc.
|
||||
Add an option to not fetch terminal codes in xterm, to avoid flicker when t_Co
|
||||
changes.
|
||||
|
||||
MS-Windows: instead of "edit with multiple Vims" use "Edit with Vim in
|
||||
multiple tabs". #8404
|
||||
|
||||
When using ":bwipe!" also get rid of references to be buffer, e.g. in the
|
||||
jumplist and alternate file.
|
||||
|
||||
@@ -344,6 +327,12 @@ Should also work without any group:
|
||||
:echo matchstr('aaa bbb', '.\{-1,}\>\|.*')
|
||||
aaa bbb (should be aaa)
|
||||
|
||||
Should add a match/str/list/pos method that also returns the test and position
|
||||
of submatches. #8355
|
||||
|
||||
Syntax highlight for a region does not work with a "nextgroup" if the start
|
||||
match is empty. #8449
|
||||
|
||||
Check out PR #543 (Roland Puntaier).
|
||||
Patch for multibyte characters in langmap and applying a mapping on them.
|
||||
(Christian Brabandt, 2015 Jun 12, update July 25)
|
||||
@@ -368,6 +357,7 @@ The buffer list and windows are locked, no changes possible
|
||||
|
||||
Add a ModeChanged autocommand that has an argument indicating the old and new
|
||||
mode, as what's returned from mode(). Also used for switching Terminal mode.
|
||||
#8360, #7863, #7363
|
||||
|
||||
Matchparen doesn't remove highlight after undo. (#7054)
|
||||
Is OK when syntax HL is active.
|
||||
@@ -380,6 +370,10 @@ work.
|
||||
Using "au!" after "filetype on" is a bit slow. Can the matching of
|
||||
autocommands be made faster? (#7056)
|
||||
|
||||
Append in Visual block mode inserts the wrong character.
|
||||
Test_visual_block_mode() already has the proper check, which is commented out.
|
||||
(#8288)
|
||||
|
||||
Add the <=> (spaceship) operator and "cond ?< expr ?= expr ?> expr"
|
||||
replace this:
|
||||
let left = GetLeftFunc()
|
||||
@@ -1428,9 +1422,6 @@ Appveyor build with self-installing executable, includes getting most
|
||||
interfaces: https://github.com/k-takata/vim/tree/chrisbra-appveyor-build
|
||||
result: https://ci.appveyor.com/project/k-takata/vim/history
|
||||
|
||||
Problem that a previous silent ":throw" causes a following try/catch not to
|
||||
work. (ZyX, 2013 Sep 28) With examples: (Malcolm Rowe, 2015 Dec 24)
|
||||
|
||||
Problem using ":try" inside ":execute". (ZyX, 2013 Sep 15)
|
||||
|
||||
Patch to make tests pass with EBCDIC. (Owen Leibman, 2016 Apr 10)
|
||||
@@ -2263,9 +2254,6 @@ Win32: Improved Makefile for MSVC. (Leonardo Valeri Manera, 2010 Aug 18)
|
||||
|
||||
Win32: Expanding 'path' runs into a maximum size limit. (bgold12, 2009 Nov 15)
|
||||
|
||||
Win32: Patch for enabling quick edit mode in console. (Craig Barkhouse, 2010
|
||||
Sep 1)
|
||||
|
||||
Win32: Patch for using .png files for icons. (Charles Peacech, 2012 Feb 5)
|
||||
|
||||
Putting a Visual block while 'visualedit' is "all" does not leave the cursor
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_41.txt* For Vim version 8.2. Last change: 2021 Apr 19
|
||||
*usr_41.txt* For Vim version 8.2. Last change: 2021 Jun 07
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -994,6 +994,10 @@ Window size and position: *window-size-functions*
|
||||
winrestview() restore saved view of current window
|
||||
|
||||
Mappings and Menus: *mapping-functions*
|
||||
digraph_get() get |digraph|
|
||||
digraph_getlist() get all |digraph|s
|
||||
digraph_set() register |digraph|
|
||||
digraph_setlist() register multiple |digraph|s
|
||||
hasmapto() check if a mapping exists
|
||||
mapcheck() check if a matching mapping exists
|
||||
maparg() get rhs of a mapping
|
||||
@@ -1021,6 +1025,8 @@ Testing: *test-functions*
|
||||
test_garbagecollect_now() free memory right now
|
||||
test_garbagecollect_soon() set a flag to free memory soon
|
||||
test_getvalue() get value of an internal variable
|
||||
test_gui_drop_files() drop file(s) in a window
|
||||
test_gui_mouse_event() add a GUI mouse event to the input buffer
|
||||
test_ignore_error() ignore a specific error message
|
||||
test_null_blob() return a null Blob
|
||||
test_null_channel() return a null Channel
|
||||
|
||||
@@ -444,6 +444,7 @@ m *+ruby/dyn* Ruby interface |ruby-dynamic| |/dyn|
|
||||
T *+scrollbind* |'scrollbind'|
|
||||
B *+signs* |:sign|
|
||||
N *+smartindent* |'smartindent'|
|
||||
B *+sodium* compiled with libsodium for better encryption support
|
||||
B *+sound* |sound_playevent()|, |sound_playfile()| functions, etc.
|
||||
N *+spell* spell checking support, see |spell|
|
||||
N *+startuptime* |--startuptime| argument
|
||||
@@ -724,7 +725,7 @@ K Run a program to lookup the keyword under the
|
||||
feature}
|
||||
|
||||
*:sl!* *:sleep!*
|
||||
:[N]sl[eep]! [N] [m] Same as above, but hide the cursor.
|
||||
:[N]sl[eep]! [N][m] Same as above, but hide the cursor.
|
||||
|
||||
*:xrestore* *:xr*
|
||||
:xr[estore] [display] Reinitializes the connection to the X11 server. Useful
|
||||
|
||||
@@ -2696,7 +2696,7 @@ Multi-byte:
|
||||
double-wide character.
|
||||
- Overstrike mode for the cmdline replaced only the first byte of a multibyte
|
||||
character.
|
||||
- The cursor in Replace mode (also in the cmdline) was to small on a
|
||||
- The cursor in Replace mode (also in the cmdline) was too small on a
|
||||
double-wide character.
|
||||
- When a multibyte character contained a 0x80 byte, it didn't work (was using
|
||||
a CSI byte instead). (Muraoka Taro)
|
||||
@@ -3546,7 +3546,7 @@ Added Simplified Chinese translation of the tutor. (Mendel L Chan)
|
||||
Added Russian keymap for yawerty keyboard.
|
||||
|
||||
Added an explanation of using the vimrc file in the tutor.
|
||||
Changed tutor.vim to get the right encoding for the Taiwainese tutor.
|
||||
Changed tutor.vim to get the right encoding for the Taiwanese tutor.
|
||||
|
||||
Added Russian tutor. (Andrey Kiselev)
|
||||
Added Polish tutor. (Mikolaj Machowski)
|
||||
|
||||
@@ -35504,7 +35504,7 @@ Files: Filelist, src/testdir/Make_all.mak, src/testdir/check.vim,
|
||||
src/testdir/test_xxd.vim
|
||||
|
||||
Patch 8.1.1545
|
||||
Problem: When the screen is to small there is no message about that.
|
||||
Problem: When the screen is too small there is no message about that.
|
||||
(Daniel Hahler)
|
||||
Solution: Do not use :cquit. (closes #4534)
|
||||
Files: src/testdir/runtest.vim
|
||||
@@ -41104,7 +41104,7 @@ Files: src/buffer.c, src/testdir/test_popupwin.vim
|
||||
Patch 8.1.2419
|
||||
Problem: With a long file name the hit-enter prompt appears. (J. Lewis
|
||||
Muir)
|
||||
Solution: When checking for text to wrap don't do this when outputing a CR.
|
||||
Solution: When checking for text to wrap don't do this when outputting a CR.
|
||||
Files: src/message.c, src/testdir/test_display.vim,
|
||||
src/testdir/dumps/Test_long_file_name_1.dump
|
||||
|
||||
|
||||
@@ -186,7 +186,7 @@ behave mostly like Vi, even though a .vimrc file exists.
|
||||
.TP
|
||||
\-d
|
||||
Start in diff mode.
|
||||
There should be two, three or four file name arguments.
|
||||
There should between two to eight file name arguments.
|
||||
.B Vim
|
||||
will open all the files and show differences between them.
|
||||
Works like vimdiff(1).
|
||||
|
||||
@@ -135,9 +135,9 @@ OPTIONS
|
||||
Vim behave mostly like Vi, even though a .vimrc file ex‐
|
||||
ists.
|
||||
|
||||
-d Start in diff mode. There should be two, three or four
|
||||
file name arguments. Vim will open all the files and show
|
||||
differences between them. Works like vimdiff(1).
|
||||
-d Start in diff mode. There should between two to eight file
|
||||
name arguments. Vim will open all the files and show dif‐
|
||||
ferences between them. Works like vimdiff(1).
|
||||
|
||||
-d {device} Open {device} for use as a terminal. Only on the Amiga.
|
||||
Example: "-d con:20/30/600/150".
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*vim9.txt* For Vim version 8.2. Last change: 2021 May 26
|
||||
*vim9.txt* For Vim version 8.2. Last change: 2021 Jul 07
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -169,6 +169,14 @@ created yet. In this case you can call `execute()` to invoke it at runtime. >
|
||||
used for the command or inside a `:try` block), does not get a range passed
|
||||
cannot be a "dict" function, and can always be a closure.
|
||||
|
||||
Later classes will be added, which replaces the "dict function" mechanism.
|
||||
For now you will need to pass the dictionary explicitly: >
|
||||
def DictFunc(d: dict<any>, arg: string)
|
||||
echo d[arg]
|
||||
enddef
|
||||
var d = {item: 'value', func: DictFunc}
|
||||
d.func(d, 'item')
|
||||
|
||||
The argument types and return type need to be specified. The "any" type can
|
||||
be used, type checking will then be done at runtime, like with legacy
|
||||
functions.
|
||||
@@ -434,7 +442,8 @@ The function must already have been defined. >
|
||||
var Funcref = MyFunction
|
||||
|
||||
When using `function()` the resulting type is "func", a function with any
|
||||
number of arguments and any return type. The function can be defined later.
|
||||
number of arguments and any return type (including void). The function can be
|
||||
defined later.
|
||||
|
||||
|
||||
Lambda using => instead of -> ~
|
||||
@@ -445,11 +454,12 @@ it is the start of a lambda or a dictionary, which is now more complicated
|
||||
because of the use of argument types.
|
||||
|
||||
To avoid these problems Vim9 script uses a different syntax for a lambda,
|
||||
which is similar to Javascript: >
|
||||
which is similar to JavaScript: >
|
||||
var Lambda = (arg) => expression
|
||||
|
||||
No line break is allowed in the arguments of a lambda up to and including the
|
||||
"=>". This is OK: >
|
||||
"=>" (so that Vim can tell the difference between an expression in parentheses
|
||||
and lambda arguments). This is OK: >
|
||||
filter(list, (k, v) =>
|
||||
v > 0)
|
||||
This does not work: >
|
||||
@@ -522,7 +532,7 @@ And when a dict spans multiple lines: >
|
||||
one: 1,
|
||||
two: 2,
|
||||
}
|
||||
Function call: >
|
||||
With a function call: >
|
||||
var result = Func(
|
||||
arg1,
|
||||
arg2
|
||||
@@ -555,10 +565,36 @@ at the start of the line indicates line continuation: >
|
||||
| echo 'match'
|
||||
| endif
|
||||
|
||||
< *E1050*
|
||||
Note that this means that in heredoc the first line cannot be a bar: >
|
||||
var lines =<< trim END
|
||||
| this doesn't work
|
||||
END
|
||||
Either use an empty line at the start or do not use heredoc. Or temporarily
|
||||
add the "C" flag to 'cpoptions': >
|
||||
set cpo+=C
|
||||
var lines =<< trim END
|
||||
| this doesn't work
|
||||
END
|
||||
set cpo-=C
|
||||
If the heredoc is inside a function 'cpoptions' must be set before :def and
|
||||
restored after the :enddef.
|
||||
|
||||
In places where line continuation with a backslash is still needed, such as
|
||||
splitting up a long Ex command, comments can start with '#\ ': >
|
||||
syn region Text
|
||||
\ start='foo'
|
||||
#\ comment
|
||||
\ end='bar'
|
||||
Like with legacy script '"\ ' is used. This is also needed when line
|
||||
continuation is used without a backslash and a line starts with a bar: >
|
||||
au CursorHold * echom 'BEFORE bar'
|
||||
#\ some comment
|
||||
| echom 'AFTER bar'
|
||||
<
|
||||
*E1050*
|
||||
To make it possible for the operator at the start of the line to be
|
||||
recognized, it is required to put a colon before a range. This will add
|
||||
"start" and print: >
|
||||
recognized, it is required to put a colon before a range. This example will
|
||||
add "start" and print: >
|
||||
var result = start
|
||||
+ print
|
||||
Like this: >
|
||||
@@ -610,6 +646,9 @@ Notes:
|
||||
< This does not work: >
|
||||
echo [1, 2]
|
||||
[3, 4]
|
||||
- In some cases it is difficult for Vim to parse a command, especially when
|
||||
commands are used as an argument to another command, such as `windo`. In
|
||||
those cases the line continuation with a backslash has to be used.
|
||||
|
||||
|
||||
White space ~
|
||||
@@ -904,6 +943,16 @@ The 'gdefault' option value is not used.
|
||||
You may also find this wiki useful. It was written by an early adopter of
|
||||
Vim9 script: https://github.com/lacygoill/wiki/blob/master/vim/vim9.md
|
||||
|
||||
*:++* *:--*
|
||||
The ++ and -- commands have been added. They are very similar to adding or
|
||||
subtracting one: >
|
||||
++var
|
||||
var += 1
|
||||
--var
|
||||
var -= 1
|
||||
|
||||
Using ++var or --var in an expression is not supported yet.
|
||||
|
||||
==============================================================================
|
||||
|
||||
3. New style functions *fast-functions*
|
||||
@@ -966,9 +1015,14 @@ prefix if they do not exist at the time of compiling.
|
||||
Note that for command line completion of {func} you
|
||||
can prepend "s:" to find script-local functions.
|
||||
|
||||
:disa[ssemble]! {func} Like `:disassemble` but with the instructions used for
|
||||
:disa[ssemble] profile {func}
|
||||
Like `:disassemble` but with the instructions used for
|
||||
profiling.
|
||||
|
||||
:disa[ssemble] debug {func}
|
||||
Like `:disassemble` but with the instructions used for
|
||||
debugging.
|
||||
|
||||
Limitations ~
|
||||
|
||||
Local variables will not be visible to string evaluation. For example: >
|
||||
@@ -1036,10 +1090,8 @@ The following builtin types are supported:
|
||||
Not supported yet:
|
||||
tuple<a: {type}, b: {type}, ...>
|
||||
|
||||
These types can be used in declarations, but no value will have this type:
|
||||
{type}|{type} {not implemented yet}
|
||||
void
|
||||
any
|
||||
These types can be used in declarations, but no simple value will actually
|
||||
have the "void" type.
|
||||
|
||||
There is no array type, use list<{type}> instead. For a list constant an
|
||||
efficient implementation is used that avoids allocating lot of small pieces of
|
||||
@@ -1048,8 +1100,16 @@ memory.
|
||||
A partial and function can be declared in more or less specific ways:
|
||||
func any kind of function reference, no type
|
||||
checking for arguments or return value
|
||||
func: void any number and type of arguments, no return
|
||||
value
|
||||
func: {type} any number and type of arguments with specific
|
||||
return type
|
||||
|
||||
func() function with no argument, does not return a
|
||||
value
|
||||
func(): void same
|
||||
func(): {type} function with no argument and return type
|
||||
|
||||
func({type}) function with argument type, does not return
|
||||
a value
|
||||
func({type}): {type} function with argument type and return type
|
||||
@@ -1138,6 +1198,18 @@ dictionary. If there is a mix of types, the "any" type is used. >
|
||||
['a', 'b', 'c'] list<string>
|
||||
[1, 'x', 3] list<any>
|
||||
|
||||
The common type of function references, if they do not all have the same
|
||||
number of arguments, uses "(...)" to indicate the number of arguments is not
|
||||
specified. For example: >
|
||||
def Foo(x: bool)
|
||||
enddef
|
||||
def Bar(x: bool, y: bool)
|
||||
enddef
|
||||
var funclist = [Foo, Bar]
|
||||
echo funclist->typename()
|
||||
Results in:
|
||||
list<func(...)>
|
||||
|
||||
For script-local variables in Vim9 script the type is checked, also when the
|
||||
variable was declared in a legacy function.
|
||||
|
||||
@@ -1154,16 +1226,24 @@ In Vim9 script this has been made stricter. In most places it works just as
|
||||
before, if the value used matches the expected type. There will sometimes be
|
||||
an error, thus breaking backwards compatibility. For example:
|
||||
- Using a number other than 0 or 1 where a boolean is expected. *E1023*
|
||||
- Using a string value when setting a number options.
|
||||
- Using a string value when setting a number option.
|
||||
- Using a number where a string is expected. *E1024*
|
||||
|
||||
One consequence is that the item type of a list or dict given to map() must
|
||||
not change. This will give an error in Vim9 script: >
|
||||
map([1, 2, 3], (i, v) => 'item ' .. i)
|
||||
vim9 echo map([1, 2, 3], (i, v) => 'item ' .. i)
|
||||
E1012: Type mismatch; expected number but got string
|
||||
Instead use |mapnew()|. If the item type was determined to be "any" it can
|
||||
change to a more specific type. E.g. when a list of mixed types gets changed
|
||||
to a list of numbers.
|
||||
Instead use |mapnew(): >
|
||||
vim9 echo mapnew([1, 2, 3], (i, v) => 'item ' .. i)
|
||||
['item 0', 'item 1', 'item 2']
|
||||
|
||||
If the item type was determined to be "any" it can change to a more specific
|
||||
type. E.g. when a list of mixed types gets changed to a list of numbers: >
|
||||
var mylist = [1, 2.0, '3']
|
||||
# typename(mylist) == "list<any>"
|
||||
map(mylist, (i, v) => 'item ' .. i)
|
||||
# typename(mylist) == "list<string>", no error
|
||||
|
||||
Same for |extend()|, use |extendnew()| instead, and for |flatten()|, use
|
||||
|flattennew()| instead.
|
||||
|
||||
@@ -1240,9 +1320,10 @@ Exporting an item can be written as: >
|
||||
export const someValue = ...
|
||||
export def MyFunc() ...
|
||||
export class MyClass ...
|
||||
export interface MyClass ...
|
||||
|
||||
As this suggests, only constants, variables, `:def` functions and classes can
|
||||
be exported. {not implemented yet: export class}
|
||||
be exported. {not implemented yet: class, interface}
|
||||
|
||||
*E1042*
|
||||
`:export` can only be used in Vim9 script, at the script level.
|
||||
@@ -1273,6 +1354,9 @@ script file to avoid confusion.
|
||||
`:import` can also be used in legacy Vim script. The imported items still
|
||||
become script-local, even when the "s:" prefix is not given.
|
||||
|
||||
`:import` can not be used in a function. Imported items are intended to exist
|
||||
at the script level and only imported once.
|
||||
|
||||
The script name after `import` can be:
|
||||
- A relative path, starting "." or "..". This finds a file relative to the
|
||||
location of the script file itself. This is useful to split up a large
|
||||
@@ -1282,6 +1366,7 @@ The script name after `import` can be:
|
||||
- A path not being relative or absolute. This will be found in the
|
||||
"import" subdirectories of 'runtimepath' entries. The name will usually be
|
||||
longer and unique, to avoid loading the wrong file.
|
||||
Note that "after/import" is not used.
|
||||
|
||||
Once a vim9 script file has been imported, the result is cached and used the
|
||||
next time the same script is imported. It will not be read again.
|
||||
@@ -1342,27 +1427,46 @@ implementing classes is going to be a lot of work, it is left for the future.
|
||||
For now we'll just make sure classes can be added later.
|
||||
|
||||
Thoughts:
|
||||
- `class` / `endclass`, everything in one file
|
||||
- Class names are always CamelCase
|
||||
- Single constructor
|
||||
- `class` / `endclass`, the whole class must be in one file
|
||||
- Class names are always CamelCase (to avoid a name clash with builtin types)
|
||||
- A single constructor called "constructor"
|
||||
- Single inheritance with `class ThisClass extends BaseClass`
|
||||
- `abstract class`
|
||||
- `interface` (Abstract class without any implementation)
|
||||
- `abstract class` (class with incomplete implementation)
|
||||
- `interface` / `endinterface` (abstract class without any implementation)
|
||||
- `class SomeClass implements SomeInterface`
|
||||
- Generics for class: `class <Tkey, Tentry>`
|
||||
- Generics for function: `def <Tkey> GetLast(key: Tkey)`
|
||||
|
||||
Again, much of this is from TypeScript.
|
||||
Again, much of this is from TypeScript with a slightly different syntax.
|
||||
|
||||
Some things that look like good additions:
|
||||
- Use a class as an interface (like Dart)
|
||||
- Extend a class with methods, using an import (like Dart)
|
||||
- Mixins
|
||||
- For testing: Mock mechanism
|
||||
|
||||
An important class that will be provided is "Promise". Since Vim is single
|
||||
threaded, connecting asynchronous operations is a natural way of allowing
|
||||
plugins to do their work without blocking the user. It's a uniform way to
|
||||
invoke callbacks and handle timeouts and errors.
|
||||
|
||||
Some examples: >
|
||||
|
||||
abstract class Person
|
||||
static const prefix = 'xxx'
|
||||
var name: string
|
||||
|
||||
def constructor(name: string)
|
||||
this.name = name;
|
||||
enddef
|
||||
|
||||
def display(): void
|
||||
echo name
|
||||
enddef
|
||||
|
||||
abstract def find(string): Person
|
||||
endclass
|
||||
|
||||
==============================================================================
|
||||
|
||||
9. Rationale *vim9-rationale*
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
.TH VIMDIFF 1 "2001 March 30"
|
||||
.SH NAME
|
||||
vimdiff \- edit two, three or four versions of a file with Vim and show differences
|
||||
vimdiff \- edit between two and eight versions of a file with Vim and show differences
|
||||
.SH SYNOPSIS
|
||||
.br
|
||||
.B vimdiff
|
||||
[options] file1 file2 [file3 [file4]]
|
||||
[options] file1 file2 [file3 [file4 [file5 [file6 [file7 [file8]]]]]]
|
||||
.PP
|
||||
.B gvimdiff
|
||||
.SH DESCRIPTION
|
||||
.B Vimdiff
|
||||
starts
|
||||
.B Vim
|
||||
on two (or three or four) files.
|
||||
on two up to eight files.
|
||||
Each file gets its own window.
|
||||
The differences between the files are highlighted.
|
||||
This is a nice way to inspect changes and to move changes from one version
|
||||
|
||||
@@ -1,27 +1,28 @@
|
||||
VIMDIFF(1) VIMDIFF(1)
|
||||
VIMDIFF(1) General Commands Manual VIMDIFF(1)
|
||||
|
||||
|
||||
|
||||
NAME
|
||||
vimdiff - edit two, three or four versions of a file with Vim and show
|
||||
differences
|
||||
vimdiff - edit between two and eight versions of a file with Vim and
|
||||
show differences
|
||||
|
||||
SYNOPSIS
|
||||
vimdiff [options] file1 file2 [file3 [file4]]
|
||||
vimdiff [options] file1 file2 [file3 [file4 [file5 [file6 [file7
|
||||
[file8]]]]]]
|
||||
|
||||
gvimdiff
|
||||
|
||||
DESCRIPTION
|
||||
Vimdiff starts Vim on two (or three or four) files. Each file gets its
|
||||
own window. The differences between the files are highlighted. This
|
||||
is a nice way to inspect changes and to move changes from one version
|
||||
to another version of the same file.
|
||||
Vimdiff starts Vim on two up to eight files. Each file gets its own
|
||||
window. The differences between the files are highlighted. This is a
|
||||
nice way to inspect changes and to move changes from one version to an‐
|
||||
other version of the same file.
|
||||
|
||||
See vim(1) for details about Vim itself.
|
||||
|
||||
When started as gvimdiff the GUI will be started, if available.
|
||||
|
||||
In each window the 'diff' option will be set, which causes the differ-
|
||||
In each window the 'diff' option will be set, which causes the differ‐
|
||||
ences to be highlighted.
|
||||
The 'wrap' and 'scrollbind' options are set to make the text look good.
|
||||
The 'foldmethod' option is set to "diff", which puts ranges of lines
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2021 Apr 17
|
||||
" Last Change: 2021 Jul 03
|
||||
|
||||
" Listen very carefully, I will say this only once
|
||||
if exists("did_load_filetypes")
|
||||
@@ -393,7 +393,7 @@ au BufNewFile,BufRead *.cfm,*.cfi,*.cfc setf cf
|
||||
" Configure scripts
|
||||
au BufNewFile,BufRead configure.in,configure.ac setf config
|
||||
|
||||
" CUDA Cumpute Unified Device Architecture
|
||||
" CUDA Compute Unified Device Architecture
|
||||
au BufNewFile,BufRead *.cu,*.cuh setf cuda
|
||||
|
||||
" Dockerfile; Podman uses the same syntax with name Containerfile
|
||||
@@ -408,8 +408,15 @@ au BufNewFile,BufRead *enlightenment/*.cfg setf c
|
||||
" Eterm
|
||||
au BufNewFile,BufRead *Eterm/*.cfg setf eterm
|
||||
|
||||
" Elixir or Euphoria
|
||||
au BufNewFile,BufRead *.ex call dist#ft#ExCheck()
|
||||
|
||||
" Elixir
|
||||
au BufRead,BufNewFile mix.lock,*.exs setf elixir
|
||||
au BufRead,BufNewFile *.eex,*.leex setf eelixir
|
||||
|
||||
" Euphoria 3 or 4
|
||||
au BufNewFile,BufRead *.eu,*.ew,*.ex,*.exu,*.exw call dist#ft#EuphoriaCheck()
|
||||
au BufNewFile,BufRead *.eu,*.ew,*.exu,*.exw call dist#ft#EuphoriaCheck()
|
||||
if has("fname_case")
|
||||
au BufNewFile,BufRead *.EU,*.EW,*.EX,*.EXU,*.EXW call dist#ft#EuphoriaCheck()
|
||||
endif
|
||||
@@ -643,6 +650,9 @@ au BufNewFile,BufRead *.mo,*.gdmo setf gdmo
|
||||
" Gedcom
|
||||
au BufNewFile,BufRead *.ged,lltxxxxx.txt setf gedcom
|
||||
|
||||
" Gemtext
|
||||
au BufNewFile,BufRead *.gmi,*.gemini setf gemtext
|
||||
|
||||
" Gift (Moodle)
|
||||
autocmd BufRead,BufNewFile *.gift setf gift
|
||||
|
||||
@@ -855,6 +865,15 @@ au BufNewFile,BufRead *.jov,*.j73,*.jovial setf jovial
|
||||
" JSON
|
||||
au BufNewFile,BufRead *.json,*.jsonp,*.webmanifest setf json
|
||||
|
||||
" JSON Patch (RFC 6902)
|
||||
au BufNewFile,BufRead *.json-patch setf json
|
||||
|
||||
" Jupyter Notebook is also json
|
||||
au BufNewFile,BufRead *.ipynb setf json
|
||||
|
||||
" JSONC
|
||||
au BufNewFile,BufRead *.jsonc setf jsonc
|
||||
|
||||
" Kixtart
|
||||
au BufNewFile,BufRead *.kix setf kix
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" URL: https://github.com/vim-ruby/vim-ruby
|
||||
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2019 Jan 06
|
||||
" Last Change: 2020 Jun 28
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
@@ -118,7 +118,7 @@ endif
|
||||
" TODO: comments=
|
||||
setlocal commentstring=<%#%s%>
|
||||
|
||||
let b:undo_ftplugin = "setl cms< "
|
||||
let b:undo_ftplugin = "setl cms< " .
|
||||
\ " | unlet! b:browsefilter b:match_words | " . s:undo_ftplugin
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
|
||||
27
runtime/ftplugin/jsonc.vim
Normal file
27
runtime/ftplugin/jsonc.vim
Normal file
@@ -0,0 +1,27 @@
|
||||
" Vim filetype plugin
|
||||
" Language: JSONC (JSON with Comments)
|
||||
" Original Author: Izhak Jakov <izhak724@gmail.com>
|
||||
" Acknowledgement: Based off of vim-jsonc maintained by Kevin Locke <kevin@kevinlocke.name>
|
||||
" https://github.com/kevinoid/vim-jsonc
|
||||
" License: MIT
|
||||
" Last Change: 2021-07-01
|
||||
|
||||
runtime! ftplugin/json.vim
|
||||
|
||||
if exists('b:did_ftplugin_jsonc')
|
||||
finish
|
||||
else
|
||||
let b:did_ftplugin_jsonc = 1
|
||||
endif
|
||||
|
||||
" A list of commands that undo buffer local changes made below.
|
||||
let s:undo_ftplugin = []
|
||||
|
||||
" Set comment (formatting) related options. {{{1
|
||||
setlocal commentstring=//%s comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
|
||||
call add(s:undo_ftplugin, 'commentstring< comments<')
|
||||
|
||||
" Let Vim know how to disable the plug-in.
|
||||
call map(s:undo_ftplugin, "'execute ' . string(v:val)")
|
||||
let b:undo_ftplugin = join(s:undo_ftplugin, ' | ')
|
||||
unlet s:undo_ftplugin
|
||||
@@ -3,7 +3,7 @@
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" URL: https://github.com/vim-ruby/vim-ruby
|
||||
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2019 Nov 06
|
||||
" Last Change: 2020 Feb 13
|
||||
|
||||
if (exists("b:did_ftplugin"))
|
||||
finish
|
||||
@@ -112,7 +112,7 @@ else
|
||||
if !exists('g:ruby_default_path')
|
||||
if has("ruby") && has("win32")
|
||||
ruby ::VIM::command( 'let g:ruby_default_path = split("%s",",")' % $:.join(%q{,}) )
|
||||
elseif executable('ruby')
|
||||
elseif executable('ruby') && !empty($HOME)
|
||||
let g:ruby_default_path = s:query_path($HOME)
|
||||
else
|
||||
let g:ruby_default_path = map(split($RUBYLIB,':'), 'v:val ==# "." ? "" : v:val')
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
Name[de]=GVim
|
||||
Name[eo]=GVim
|
||||
Name[fr]=GVim
|
||||
Name[it]=GVim
|
||||
Name[ru]=GVim
|
||||
Name[sr]=GVim
|
||||
Name[tr]=GVim
|
||||
@@ -13,6 +14,7 @@ Name=GVim
|
||||
GenericName[de]=Texteditor
|
||||
GenericName[eo]=Tekstoredaktilo
|
||||
GenericName[fr]=Éditeur de texte
|
||||
GenericName[it]=Editor di testi
|
||||
GenericName[ja]=テキストエディタ
|
||||
GenericName[ru]=Текстовый редактор
|
||||
GenericName[sr]=Едитор текст
|
||||
@@ -22,6 +24,7 @@ GenericName=Text Editor
|
||||
Comment[de]=Textdateien bearbeiten
|
||||
Comment[eo]=Redakti tekstajn dosierojn
|
||||
Comment[fr]=Éditer des fichiers texte
|
||||
Comment[it]=Edita file di testo
|
||||
Comment[ja]=テキストファイルを編集します
|
||||
Comment[ru]=Редактирование текстовых файлов
|
||||
Comment[sr]=Уређујте текст фајлове
|
||||
@@ -60,7 +63,6 @@ Comment[hr]=Uređivanje tekstualne datoteke
|
||||
Comment[hu]=Szövegfájlok szerkesztése
|
||||
Comment[id]=Edit file teks
|
||||
Comment[is]=Vinna með textaskrár
|
||||
Comment[it]=Modifica file di testo
|
||||
Comment[kn]=ಪಠ್ಯ ಕಡತಗಳನ್ನು ಸಂಪಾದಿಸು
|
||||
Comment[ko]=텍스트 파일을 편집합니다
|
||||
Comment[lt]=Redaguoti tekstines bylas
|
||||
@@ -102,6 +104,7 @@ Type=Application
|
||||
Keywords[de]=Text;Editor;
|
||||
Keywords[eo]=Teksto;redaktilo;
|
||||
Keywords[fr]=Texte;éditeur;
|
||||
Keywords[it]=Testo;editor;
|
||||
Keywords[ja]=テキスト;エディタ;
|
||||
Keywords[ru]=текст;текстовый редактор;
|
||||
Keywords[sr]=Текст;едитор;
|
||||
@@ -111,7 +114,9 @@ Keywords=Text;editor;
|
||||
Icon[de]=gvim
|
||||
Icon[eo]=gvim
|
||||
Icon[fr]=gvim
|
||||
Icon[it]=gvim
|
||||
Icon[ru]=gvim
|
||||
Icon[sr]=gvim
|
||||
Icon=gvim
|
||||
Categories=Utility;TextEditor;
|
||||
StartupNotify=true
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim indent script for HTML
|
||||
" Maintainer: Bram Moolenaar
|
||||
" Original Author: Andy Wokula <anwoku@yahoo.de>
|
||||
" Last Change: 2021 Jan 26
|
||||
" Last Change: 2021 Jun 13
|
||||
" Version: 1.0 "{{{
|
||||
" Description: HTML indent script with cached state for faster indenting on a
|
||||
" range of lines.
|
||||
@@ -62,7 +62,7 @@ let s:tagname = '\w\+\(-\w\+\)*'
|
||||
" Prefer using buffer-local settings over global settings, so that there can
|
||||
" be defaults for all HTML files and exceptions for specific types of HTML
|
||||
" files.
|
||||
func! HtmlIndent_CheckUserSettings()
|
||||
func HtmlIndent_CheckUserSettings()
|
||||
"{{{
|
||||
let inctags = ''
|
||||
if exists("b:html_indent_inctags")
|
||||
@@ -178,7 +178,7 @@ let s:endtags = [0,0,0,0,0,0,0] " long enough for the highest index
|
||||
"}}}
|
||||
|
||||
" Add a list of tag names for a pair of <tag> </tag> to "tags".
|
||||
func! s:AddITags(tags, taglist)
|
||||
func s:AddITags(tags, taglist)
|
||||
"{{{
|
||||
for itag in a:taglist
|
||||
let a:tags[itag] = 1
|
||||
@@ -187,7 +187,7 @@ func! s:AddITags(tags, taglist)
|
||||
endfunc "}}}
|
||||
|
||||
" Take a list of tag name pairs that are not to be used as tag pairs.
|
||||
func! s:RemoveITags(tags, taglist)
|
||||
func s:RemoveITags(tags, taglist)
|
||||
"{{{
|
||||
for itag in a:taglist
|
||||
let a:tags[itag] = 1
|
||||
@@ -196,7 +196,7 @@ func! s:RemoveITags(tags, taglist)
|
||||
endfunc "}}}
|
||||
|
||||
" Add a block tag, that is a tag with a different kind of indenting.
|
||||
func! s:AddBlockTag(tag, id, ...)
|
||||
func s:AddBlockTag(tag, id, ...)
|
||||
"{{{
|
||||
if !(a:id >= 2 && a:id < len(s:endtags))
|
||||
echoerr 'AddBlockTag ' . a:id
|
||||
@@ -255,7 +255,7 @@ call s:AddBlockTag('<!--[', 6, '![endif]-->')
|
||||
" Return non-zero when "tagname" is an opening tag, not being a block tag, for
|
||||
" which there should be a closing tag. Can be used by scripts that include
|
||||
" HTML indenting.
|
||||
func! HtmlIndent_IsOpenTag(tagname)
|
||||
func HtmlIndent_IsOpenTag(tagname)
|
||||
"{{{
|
||||
if get(s:indent_tags, a:tagname) == 1
|
||||
return 1
|
||||
@@ -264,7 +264,7 @@ func! HtmlIndent_IsOpenTag(tagname)
|
||||
endfunc "}}}
|
||||
|
||||
" Get the value for "tagname", taking care of buffer-local tags.
|
||||
func! s:get_tag(tagname)
|
||||
func s:get_tag(tagname)
|
||||
"{{{
|
||||
let i = get(s:indent_tags, a:tagname)
|
||||
if (i == 1 || i == -1) && get(b:hi_removed_tags, a:tagname) != 0
|
||||
@@ -277,7 +277,7 @@ func! s:get_tag(tagname)
|
||||
endfunc "}}}
|
||||
|
||||
" Count the number of start and end tags in "text".
|
||||
func! s:CountITags(text)
|
||||
func s:CountITags(text)
|
||||
"{{{
|
||||
" Store the result in s:curind and s:nextrel.
|
||||
let s:curind = 0 " relative indent steps for current line [unit &sw]:
|
||||
@@ -289,7 +289,7 @@ func! s:CountITags(text)
|
||||
endfunc "}}}
|
||||
|
||||
" Count the number of start and end tags in text.
|
||||
func! s:CountTagsAndState(text)
|
||||
func s:CountTagsAndState(text)
|
||||
"{{{
|
||||
" Store the result in s:curind and s:nextrel. Update b:hi_newstate.block.
|
||||
let s:curind = 0 " relative indent steps for current line [unit &sw]:
|
||||
@@ -304,7 +304,7 @@ func! s:CountTagsAndState(text)
|
||||
endfunc "}}}
|
||||
|
||||
" Used by s:CountITags() and s:CountTagsAndState().
|
||||
func! s:CheckTag(itag)
|
||||
func s:CheckTag(itag)
|
||||
"{{{
|
||||
" Returns an empty string or "SCRIPT".
|
||||
" a:itag can be "tag" or "/tag" or "<!--" or "-->"
|
||||
@@ -338,7 +338,7 @@ func! s:CheckTag(itag)
|
||||
endfunc "}}}
|
||||
|
||||
" Used by s:CheckTag(). Returns an empty string or "SCRIPT".
|
||||
func! s:CheckBlockTag(blocktag, ind)
|
||||
func s:CheckBlockTag(blocktag, ind)
|
||||
"{{{
|
||||
if a:ind > 0
|
||||
" a block starts here
|
||||
@@ -366,7 +366,7 @@ func! s:CheckBlockTag(blocktag, ind)
|
||||
endfunc "}}}
|
||||
|
||||
" Used by s:CheckTag().
|
||||
func! s:CheckCustomTag(ctag)
|
||||
func s:CheckCustomTag(ctag)
|
||||
"{{{
|
||||
" Returns 1 if ctag is the tag for a custom element, 0 otherwise.
|
||||
" a:ctag can be "tag" or "/tag" or "<!--" or "-->"
|
||||
@@ -396,7 +396,7 @@ func! s:CheckCustomTag(ctag)
|
||||
endfunc "}}}
|
||||
|
||||
" Return the <script> type: either "javascript" or ""
|
||||
func! s:GetScriptType(str)
|
||||
func s:GetScriptType(str)
|
||||
"{{{
|
||||
if a:str == "" || a:str =~ "java"
|
||||
return "javascript"
|
||||
@@ -407,7 +407,7 @@ endfunc "}}}
|
||||
|
||||
" Look back in the file, starting at a:lnum - 1, to compute a state for the
|
||||
" start of line a:lnum. Return the new state.
|
||||
func! s:FreshState(lnum)
|
||||
func s:FreshState(lnum)
|
||||
"{{{
|
||||
" A state is to know ALL relevant details about the
|
||||
" lines 1..a:lnum-1, initial calculating (here!) can be slow, but updating is
|
||||
@@ -568,24 +568,29 @@ func! s:FreshState(lnum)
|
||||
endfunc "}}}
|
||||
|
||||
" Indent inside a <pre> block: Keep indent as-is.
|
||||
func! s:Alien2()
|
||||
func s:Alien2()
|
||||
"{{{
|
||||
return -1
|
||||
endfunc "}}}
|
||||
|
||||
" Return the indent inside a <script> block for javascript.
|
||||
func! s:Alien3()
|
||||
func s:Alien3()
|
||||
"{{{
|
||||
let lnum = prevnonblank(v:lnum - 1)
|
||||
while lnum > 1 && getline(lnum) =~ '^\s*/[/*]'
|
||||
" Skip over comments to avoid that cindent() aligns with the <script> tag
|
||||
let lnum = prevnonblank(lnum - 1)
|
||||
endwhile
|
||||
if lnum < b:hi_indent.blocklnr
|
||||
" indent for <script> itself
|
||||
return b:hi_indent.blocktagind
|
||||
endif
|
||||
if lnum == b:hi_indent.blocklnr
|
||||
" indent for the first line after <script>
|
||||
return eval(b:hi_js1indent)
|
||||
endif
|
||||
if b:hi_indent.scripttype == "javascript"
|
||||
" indent for further lines
|
||||
return eval(b:hi_js1indent) + GetJavascriptIndent()
|
||||
else
|
||||
return -1
|
||||
@@ -593,7 +598,7 @@ func! s:Alien3()
|
||||
endfunc "}}}
|
||||
|
||||
" Return the indent inside a <style> block.
|
||||
func! s:Alien4()
|
||||
func s:Alien4()
|
||||
"{{{
|
||||
if prevnonblank(v:lnum-1) == b:hi_indent.blocklnr
|
||||
" indent for first content line
|
||||
@@ -603,7 +608,7 @@ func! s:Alien4()
|
||||
endfunc "}}}
|
||||
|
||||
" Indending inside a <style> block. Returns the indent.
|
||||
func! s:CSSIndent()
|
||||
func s:CSSIndent()
|
||||
"{{{
|
||||
" This handles standard CSS and also Closure stylesheets where special lines
|
||||
" start with @.
|
||||
@@ -720,13 +725,13 @@ endfunc "}}}
|
||||
" tag: blah
|
||||
" tag: blah &&
|
||||
" tag: blah ||
|
||||
func! s:CssUnfinished(text)
|
||||
func s:CssUnfinished(text)
|
||||
"{{{
|
||||
return a:text =~ '\(||\|&&\|:\|\k\)\s*$'
|
||||
endfunc "}}}
|
||||
|
||||
" Search back for the first unfinished line above "lnum".
|
||||
func! s:CssFirstUnfinished(lnum, min_lnum)
|
||||
func s:CssFirstUnfinished(lnum, min_lnum)
|
||||
"{{{
|
||||
let align_lnum = a:lnum
|
||||
while align_lnum > a:min_lnum && s:CssUnfinished(getline(align_lnum - 1))
|
||||
@@ -736,7 +741,7 @@ func! s:CssFirstUnfinished(lnum, min_lnum)
|
||||
endfunc "}}}
|
||||
|
||||
" Find the non-empty line at or before "lnum" that is not a comment.
|
||||
func! s:CssPrevNonComment(lnum, stopline)
|
||||
func s:CssPrevNonComment(lnum, stopline)
|
||||
"{{{
|
||||
" caller starts from a line a:lnum + 1 that is not a comment
|
||||
let lnum = prevnonblank(a:lnum)
|
||||
@@ -761,7 +766,7 @@ func! s:CssPrevNonComment(lnum, stopline)
|
||||
endfunc "}}}
|
||||
|
||||
" Check the number of {} and () in line "lnum". Return a dict with the counts.
|
||||
func! HtmlIndent_CountBraces(lnum)
|
||||
func HtmlIndent_CountBraces(lnum)
|
||||
"{{{
|
||||
let brs = substitute(getline(a:lnum), '[''"].\{-}[''"]\|/\*.\{-}\*/\|/\*.*$\|[^{}()]', '', 'g')
|
||||
let c_open = 0
|
||||
@@ -794,7 +799,7 @@ func! HtmlIndent_CountBraces(lnum)
|
||||
endfunc "}}}
|
||||
|
||||
" Return the indent for a comment: <!-- -->
|
||||
func! s:Alien5()
|
||||
func s:Alien5()
|
||||
"{{{
|
||||
let curtext = getline(v:lnum)
|
||||
if curtext =~ '^\s*\zs-->'
|
||||
@@ -826,7 +831,7 @@ func! s:Alien5()
|
||||
endfunc "}}}
|
||||
|
||||
" Return the indent for conditional comment: <!--[ ![endif]-->
|
||||
func! s:Alien6()
|
||||
func s:Alien6()
|
||||
"{{{
|
||||
let curtext = getline(v:lnum)
|
||||
if curtext =~ '\s*\zs<!\[endif\]-->'
|
||||
@@ -840,7 +845,7 @@ func! s:Alien6()
|
||||
endfunc "}}}
|
||||
|
||||
" When the "lnum" line ends in ">" find the line containing the matching "<".
|
||||
func! HtmlIndent_FindTagStart(lnum)
|
||||
func HtmlIndent_FindTagStart(lnum)
|
||||
"{{{
|
||||
" Avoids using the indent of a continuation line.
|
||||
" Moves the cursor.
|
||||
@@ -863,7 +868,7 @@ func! HtmlIndent_FindTagStart(lnum)
|
||||
endfunc "}}}
|
||||
|
||||
" Find the unclosed start tag from the current cursor position.
|
||||
func! HtmlIndent_FindStartTag()
|
||||
func HtmlIndent_FindStartTag()
|
||||
"{{{
|
||||
" The cursor must be on or before a closing tag.
|
||||
" If found, positions the cursor at the match and returns the line number.
|
||||
@@ -877,7 +882,7 @@ func! HtmlIndent_FindStartTag()
|
||||
endfunc "}}}
|
||||
|
||||
" Moves the cursor from a "<" to the matching ">".
|
||||
func! HtmlIndent_FindTagEnd()
|
||||
func HtmlIndent_FindTagEnd()
|
||||
"{{{
|
||||
" Call this with the cursor on the "<" of a start tag.
|
||||
" This will move the cursor to the ">" of the matching end tag or, when it's
|
||||
@@ -897,7 +902,7 @@ func! HtmlIndent_FindTagEnd()
|
||||
endfunc "}}}
|
||||
|
||||
" Indenting inside a start tag. Return the correct indent or -1 if unknown.
|
||||
func! s:InsideTag(foundHtmlString)
|
||||
func s:InsideTag(foundHtmlString)
|
||||
"{{{
|
||||
if a:foundHtmlString
|
||||
" Inside an attribute string.
|
||||
@@ -958,7 +963,7 @@ func! s:InsideTag(foundHtmlString)
|
||||
endfunc "}}}
|
||||
|
||||
" THE MAIN INDENT FUNCTION. Return the amount of indent for v:lnum.
|
||||
func! HtmlIndent()
|
||||
func HtmlIndent()
|
||||
"{{{
|
||||
if prevnonblank(v:lnum - 1) < 1
|
||||
" First non-blank line has no indent.
|
||||
|
||||
189
runtime/indent/jsonc.vim
Normal file
189
runtime/indent/jsonc.vim
Normal file
@@ -0,0 +1,189 @@
|
||||
" Vim indent file
|
||||
" Language: JSONC (JSON with Comments)
|
||||
" Original Author: Izhak Jakov <izhak724@gmail.com>
|
||||
" Acknowledgement: Based off of vim-json maintained by Eli Parra <eli@elzr.com>
|
||||
" https://github.com/elzr/vim-json
|
||||
" Last Change: 2021-07-01
|
||||
|
||||
" 0. Initialization {{{1
|
||||
" =================
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal nosmartindent
|
||||
|
||||
" Now, set up our indentation expression and keys that trigger it.
|
||||
setlocal indentexpr=GetJSONCIndent()
|
||||
setlocal indentkeys=0{,0},0),0[,0],!^F,o,O,e
|
||||
|
||||
" Only define the function once.
|
||||
if exists("*GetJSONCIndent")
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" 1. Variables {{{1
|
||||
" ============
|
||||
|
||||
let s:line_term = '\s*\%(\%(\/\/\).*\)\=$'
|
||||
" Regex that defines blocks.
|
||||
let s:block_regex = '\%({\)\s*\%(|\%([*@]\=\h\w*,\=\s*\)\%(,\s*[*@]\=\h\w*\)*|\)\=' . s:line_term
|
||||
|
||||
" 2. Auxiliary Functions {{{1
|
||||
" ======================
|
||||
|
||||
" Check if the character at lnum:col is inside a string.
|
||||
function s:IsInString(lnum, col)
|
||||
return synIDattr(synID(a:lnum, a:col, 1), 'name') == 'jsonString'
|
||||
endfunction
|
||||
|
||||
" Find line above 'lnum' that isn't empty, or in a string.
|
||||
function s:PrevNonBlankNonString(lnum)
|
||||
let lnum = prevnonblank(a:lnum)
|
||||
while lnum > 0
|
||||
" If the line isn't empty or in a string, end search.
|
||||
let line = getline(lnum)
|
||||
if !(s:IsInString(lnum, 1) && s:IsInString(lnum, strlen(line)))
|
||||
break
|
||||
endif
|
||||
let lnum = prevnonblank(lnum - 1)
|
||||
endwhile
|
||||
return lnum
|
||||
endfunction
|
||||
|
||||
" Check if line 'lnum' has more opening brackets than closing ones.
|
||||
function s:LineHasOpeningBrackets(lnum)
|
||||
let open_0 = 0
|
||||
let open_2 = 0
|
||||
let open_4 = 0
|
||||
let line = getline(a:lnum)
|
||||
let pos = match(line, '[][(){}]', 0)
|
||||
while pos != -1
|
||||
let idx = stridx('(){}[]', line[pos])
|
||||
if idx % 2 == 0
|
||||
let open_{idx} = open_{idx} + 1
|
||||
else
|
||||
let open_{idx - 1} = open_{idx - 1} - 1
|
||||
endif
|
||||
let pos = match(line, '[][(){}]', pos + 1)
|
||||
endwhile
|
||||
return (open_0 > 0) . (open_2 > 0) . (open_4 > 0)
|
||||
endfunction
|
||||
|
||||
function s:Match(lnum, regex)
|
||||
let col = match(getline(a:lnum), a:regex) + 1
|
||||
return col > 0 && !s:IsInString(a:lnum, col) ? col : 0
|
||||
endfunction
|
||||
|
||||
" 3. GetJSONCIndent Function {{{1
|
||||
" =========================
|
||||
|
||||
function GetJSONCIndent()
|
||||
if !exists("s:inside_comment")
|
||||
let s:inside_comment = 0
|
||||
endif
|
||||
|
||||
" 3.1. Setup {{{2
|
||||
" ----------
|
||||
|
||||
" Set up variables for restoring position in file. Could use v:lnum here.
|
||||
let vcol = col('.')
|
||||
|
||||
" 3.2. Work on the current line {{{2
|
||||
" -----------------------------
|
||||
|
||||
|
||||
" Get the current line.
|
||||
let line = getline(v:lnum)
|
||||
let ind = -1
|
||||
if s:inside_comment == 0
|
||||
" TODO iterate through all the matches in a line
|
||||
let col = matchend(line, '\/\*')
|
||||
if col > 0 && !s:IsInString(v:lnum, col)
|
||||
let s:inside_comment = 1
|
||||
endif
|
||||
endif
|
||||
" If we're in the middle of a comment
|
||||
if s:inside_comment == 1
|
||||
let col = matchend(line, '\*\/')
|
||||
if col > 0 && !s:IsInString(v:lnum, col)
|
||||
let s:inside_comment = 0
|
||||
endif
|
||||
return ind
|
||||
endif
|
||||
if line =~ '^\s*//'
|
||||
return ind
|
||||
endif
|
||||
|
||||
" If we got a closing bracket on an empty line, find its match and indent
|
||||
" according to it.
|
||||
let col = matchend(line, '^\s*[]}]')
|
||||
|
||||
if col > 0 && !s:IsInString(v:lnum, col)
|
||||
call cursor(v:lnum, col)
|
||||
let bs = strpart('{}[]', stridx('}]', line[col - 1]) * 2, 2)
|
||||
|
||||
let pairstart = escape(bs[0], '[')
|
||||
let pairend = escape(bs[1], ']')
|
||||
let pairline = searchpair(pairstart, '', pairend, 'bW')
|
||||
|
||||
if pairline > 0
|
||||
let ind = indent(pairline)
|
||||
else
|
||||
let ind = virtcol('.') - 1
|
||||
endif
|
||||
|
||||
return ind
|
||||
endif
|
||||
|
||||
" If we are in a multi-line string, don't do anything to it.
|
||||
if s:IsInString(v:lnum, matchend(line, '^\s*') + 1)
|
||||
return indent('.')
|
||||
endif
|
||||
|
||||
" 3.3. Work on the previous line. {{{2
|
||||
" -------------------------------
|
||||
|
||||
let lnum = prevnonblank(v:lnum - 1)
|
||||
|
||||
if lnum == 0
|
||||
return 0
|
||||
endif
|
||||
|
||||
" Set up variables for current line.
|
||||
let line = getline(lnum)
|
||||
let ind = indent(lnum)
|
||||
|
||||
" If the previous line ended with a block opening, add a level of indent.
|
||||
" if s:Match(lnum, s:block_regex)
|
||||
" return indent(lnum) + shiftwidth()
|
||||
" endif
|
||||
|
||||
" If the previous line contained an opening bracket, and we are still in it,
|
||||
" add indent depending on the bracket type.
|
||||
if line =~ '[[({]'
|
||||
let counts = s:LineHasOpeningBrackets(lnum)
|
||||
if counts[0] == '1' || counts[1] == '1' || counts[2] == '1'
|
||||
return ind + shiftwidth()
|
||||
else
|
||||
call cursor(v:lnum, vcol)
|
||||
end
|
||||
endif
|
||||
|
||||
" }}}2
|
||||
|
||||
return ind
|
||||
endfunction
|
||||
|
||||
" }}}1
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim:set sw=2 sts=2 ts=8 noet:
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: Pascal
|
||||
" Maintainer: Neil Carter <n.carter@swansea.ac.uk>
|
||||
" Created: 2004 Jul 13
|
||||
" Last Change: 2017 Jun 13
|
||||
" Last Change: 2021 Jul 01
|
||||
"
|
||||
" This is version 2.0, a complete rewrite.
|
||||
"
|
||||
@@ -20,6 +20,8 @@ setlocal indentkeys+==end;,==const,==type,==var,==begin,==repeat,==until,==for
|
||||
setlocal indentkeys+==program,==function,==procedure,==object,==private
|
||||
setlocal indentkeys+==record,==if,==else,==case
|
||||
|
||||
let b:undo_indent = "setl indentkeys< indentexpr<"
|
||||
|
||||
if exists("*GetPascalIndent")
|
||||
finish
|
||||
endif
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
" Previous Maintainer: Nikolai Weibull <now at bitwi.se>
|
||||
" URL: https://github.com/vim-ruby/vim-ruby
|
||||
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2021 Feb 03
|
||||
|
||||
" 0. Initialization {{{1
|
||||
" =================
|
||||
|
||||
@@ -293,7 +293,7 @@ syn region eighthComment start="\zs\\" end="$" contains=eighthTodo
|
||||
" Define the default highlighting.
|
||||
if !exists("did_eighth_syntax_inits")
|
||||
let did_eighth_syntax_inits=1
|
||||
" The default methods for highlighting. Can be overriden later.
|
||||
" The default methods for highlighting. Can be overridden later.
|
||||
hi def link eighthTodo Todo
|
||||
hi def link eighthOperators Operator
|
||||
hi def link eighthMath Number
|
||||
|
||||
@@ -1,58 +1,109 @@
|
||||
" Vim syntax file
|
||||
" Language: Go
|
||||
" Maintainer: David Barnett (https://github.com/google/vim-ft-go)
|
||||
" Last Change: 2014 Aug 16
|
||||
|
||||
" Options:
|
||||
" There are some options for customizing the highlighting; the recommended
|
||||
" settings are the default values, but you can write:
|
||||
" let OPTION_NAME = 0
|
||||
" in your ~/.vimrc file to disable particular options. You can also write:
|
||||
" let OPTION_NAME = 1
|
||||
" to enable particular options. At present, all options default to on.
|
||||
" Copyright 2009 The Go Authors. All rights reserved.
|
||||
" Use of this source code is governed by a BSD-style
|
||||
" license that can be found in the LICENSE file.
|
||||
"
|
||||
" - g:go_highlight_array_whitespace_error
|
||||
" Highlights white space after "[]".
|
||||
" - g:go_highlight_chan_whitespace_error
|
||||
" Highlights white space around the communications operator that don't
|
||||
" follow the standard style.
|
||||
" - g:go_highlight_extra_types
|
||||
" Highlights commonly used library types (io.Reader, etc.).
|
||||
" - g:go_highlight_space_tab_error
|
||||
" Highlights instances of tabs following spaces.
|
||||
" - g:go_highlight_trailing_whitespace_error
|
||||
" Highlights trailing white space.
|
||||
" go.vim: Vim syntax file for Go.
|
||||
" Language: Go
|
||||
" Maintainer: Billie Cleek <bhcleek@gmail.com>
|
||||
" Latest Revision: 2021-06-26
|
||||
" License: BSD-style. See LICENSE file in source repository.
|
||||
" Repository: https://github.com/fatih/vim-go
|
||||
|
||||
" Quit when a (custom) syntax file was already loaded
|
||||
if exists('b:current_syntax')
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
if !exists('g:go_highlight_array_whitespace_error')
|
||||
let g:go_highlight_array_whitespace_error = 1
|
||||
endif
|
||||
if !exists('g:go_highlight_chan_whitespace_error')
|
||||
let g:go_highlight_chan_whitespace_error = 1
|
||||
endif
|
||||
if !exists('g:go_highlight_extra_types')
|
||||
let g:go_highlight_extra_types = 1
|
||||
endif
|
||||
if !exists('g:go_highlight_space_tab_error')
|
||||
let g:go_highlight_space_tab_error = 1
|
||||
endif
|
||||
if !exists('g:go_highlight_trailing_whitespace_error')
|
||||
let g:go_highlight_trailing_whitespace_error = 1
|
||||
endif
|
||||
let s:keepcpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! s:FoldEnable(...) abort
|
||||
if a:0 > 0
|
||||
return index(s:FoldEnable(), a:1) > -1
|
||||
endif
|
||||
return get(g:, 'go_fold_enable', ['block', 'import', 'varconst', 'package_comment'])
|
||||
endfunction
|
||||
|
||||
function! s:HighlightArrayWhitespaceError() abort
|
||||
return get(g:, 'go_highlight_array_whitespace_error', 0)
|
||||
endfunction
|
||||
|
||||
function! s:HighlightChanWhitespaceError() abort
|
||||
return get(g:, 'go_highlight_chan_whitespace_error', 0)
|
||||
endfunction
|
||||
|
||||
function! s:HighlightExtraTypes() abort
|
||||
return get(g:, 'go_highlight_extra_types', 0)
|
||||
endfunction
|
||||
|
||||
function! s:HighlightSpaceTabError() abort
|
||||
return get(g:, 'go_highlight_space_tab_error', 0)
|
||||
endfunction
|
||||
|
||||
function! s:HighlightTrailingWhitespaceError() abort
|
||||
return get(g:, 'go_highlight_trailing_whitespace_error', 0)
|
||||
endfunction
|
||||
|
||||
function! s:HighlightOperators() abort
|
||||
return get(g:, 'go_highlight_operators', 0)
|
||||
endfunction
|
||||
|
||||
function! s:HighlightFunctions() abort
|
||||
return get(g:, 'go_highlight_functions', 0)
|
||||
endfunction
|
||||
|
||||
function! s:HighlightFunctionParameters() abort
|
||||
return get(g:, 'go_highlight_function_parameters', 0)
|
||||
endfunction
|
||||
|
||||
function! s:HighlightFunctionCalls() abort
|
||||
return get(g:, 'go_highlight_function_calls', 0)
|
||||
endfunction
|
||||
|
||||
function! s:HighlightFields() abort
|
||||
return get(g:, 'go_highlight_fields', 0)
|
||||
endfunction
|
||||
|
||||
function! s:HighlightTypes() abort
|
||||
return get(g:, 'go_highlight_types', 0)
|
||||
endfunction
|
||||
|
||||
function! s:HighlightBuildConstraints() abort
|
||||
return get(g:, 'go_highlight_build_constraints', 0)
|
||||
endfunction
|
||||
|
||||
function! s:HighlightStringSpellcheck() abort
|
||||
return get(g:, 'go_highlight_string_spellcheck', 1)
|
||||
endfunction
|
||||
|
||||
function! s:HighlightFormatStrings() abort
|
||||
return get(g:, 'go_highlight_format_strings', 1)
|
||||
endfunction
|
||||
|
||||
function! s:HighlightGenerateTags() abort
|
||||
return get(g:, 'go_highlight_generate_tags', 0)
|
||||
endfunction
|
||||
|
||||
function! s:HighlightVariableAssignments() abort
|
||||
return get(g:, 'go_highlight_variable_assignments', 0)
|
||||
endfunction
|
||||
|
||||
function! s:HighlightVariableDeclarations() abort
|
||||
return get(g:, 'go_highlight_variable_declarations', 0)
|
||||
endfunction
|
||||
|
||||
syn case match
|
||||
|
||||
syn keyword goDirective package import
|
||||
syn keyword goDeclaration var const type
|
||||
syn keyword goDeclType struct interface
|
||||
syn keyword goPackage package
|
||||
syn keyword goImport import contained
|
||||
syn keyword goVar var contained
|
||||
syn keyword goConst const contained
|
||||
|
||||
hi def link goDirective Statement
|
||||
hi def link goPackage Statement
|
||||
hi def link goImport Statement
|
||||
hi def link goVar Keyword
|
||||
hi def link goConst Keyword
|
||||
hi def link goDeclaration Keyword
|
||||
hi def link goDeclType Keyword
|
||||
|
||||
" Keywords within functions
|
||||
syn keyword goStatement defer go goto return break continue fallthrough
|
||||
@@ -78,28 +129,38 @@ hi def link goUnsignedInts Type
|
||||
hi def link goFloats Type
|
||||
hi def link goComplexes Type
|
||||
|
||||
" Treat func specially: it's a declaration at the start of a line, but a type
|
||||
" elsewhere. Order matters here.
|
||||
syn match goType /\<func\>/
|
||||
syn match goDeclaration /^func\>/
|
||||
|
||||
" Predefined functions and values
|
||||
syn keyword goBuiltins append cap close complex copy delete imag len
|
||||
syn keyword goBuiltins make new panic print println real recover
|
||||
syn keyword goConstants iota true false nil
|
||||
syn keyword goBuiltins append cap close complex copy delete imag len
|
||||
syn keyword goBuiltins make new panic print println real recover
|
||||
syn keyword goBoolean true false
|
||||
syn keyword goPredefinedIdentifiers nil iota
|
||||
|
||||
hi def link goBuiltins Keyword
|
||||
hi def link goConstants Keyword
|
||||
hi def link goBuiltins Identifier
|
||||
hi def link goBoolean Boolean
|
||||
hi def link goPredefinedIdentifiers goBoolean
|
||||
|
||||
" Comments; their contents
|
||||
syn keyword goTodo contained TODO FIXME XXX BUG
|
||||
syn cluster goCommentGroup contains=goTodo
|
||||
syn region goComment start="/\*" end="\*/" contains=@goCommentGroup,@Spell
|
||||
syn region goComment start="//" end="$" contains=@goCommentGroup,@Spell
|
||||
|
||||
syn region goComment start="//" end="$" contains=goGenerate,@goCommentGroup,@Spell
|
||||
if s:FoldEnable('comment')
|
||||
syn region goComment start="/\*" end="\*/" contains=@goCommentGroup,@Spell fold
|
||||
syn match goComment "\v(^\s*//.*\n)+" contains=goGenerate,@goCommentGroup,@Spell fold
|
||||
else
|
||||
syn region goComment start="/\*" end="\*/" contains=@goCommentGroup,@Spell
|
||||
endif
|
||||
|
||||
hi def link goComment Comment
|
||||
hi def link goTodo Todo
|
||||
|
||||
if s:HighlightGenerateTags()
|
||||
syn match goGenerateVariables contained /\%(\$GOARCH\|\$GOOS\|\$GOFILE\|\$GOLINE\|\$GOPACKAGE\|\$DOLLAR\)\>/
|
||||
syn region goGenerate start="^\s*//go:generate" end="$" contains=goGenerateVariables
|
||||
hi def link goGenerate PreProc
|
||||
hi def link goGenerateVariables Special
|
||||
endif
|
||||
|
||||
" Go escapes
|
||||
syn match goEscapeOctal display contained "\\[0-7]\{3}"
|
||||
syn match goEscapeC display contained +\\[abfnrtv\\'"]+
|
||||
@@ -118,8 +179,30 @@ hi def link goEscapeError Error
|
||||
|
||||
" Strings and their contents
|
||||
syn cluster goStringGroup contains=goEscapeOctal,goEscapeC,goEscapeX,goEscapeU,goEscapeBigU,goEscapeError
|
||||
syn region goString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@goStringGroup
|
||||
syn region goRawString start=+`+ end=+`+
|
||||
if s:HighlightStringSpellcheck()
|
||||
syn region goString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@goStringGroup,@Spell
|
||||
syn region goRawString start=+`+ end=+`+ contains=@Spell
|
||||
else
|
||||
syn region goString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@goStringGroup
|
||||
syn region goRawString start=+`+ end=+`+
|
||||
endif
|
||||
|
||||
if s:HighlightFormatStrings()
|
||||
" [n] notation is valid for specifying explicit argument indexes
|
||||
" 1. Match a literal % not preceded by a %.
|
||||
" 2. Match any number of -, #, 0, space, or +
|
||||
" 3. Match * or [n]* or any number or nothing before a .
|
||||
" 4. Match * or [n]* or any number or nothing after a .
|
||||
" 5. Match [n] or nothing before a verb
|
||||
" 6. Match a formatting verb
|
||||
syn match goFormatSpecifier /\
|
||||
\%([^%]\%(%%\)*\)\
|
||||
\@<=%[-#0 +]*\
|
||||
\%(\%(\%(\[\d\+\]\)\=\*\)\|\d\+\)\=\
|
||||
\%(\.\%(\%(\%(\[\d\+\]\)\=\*\)\|\d\+\)\=\)\=\
|
||||
\%(\[\d\+\]\)\=[vTtbcdoqxXUeEfFgGspw]/ contained containedin=goString,goRawString
|
||||
hi def link goFormatSpecifier goSpecialString
|
||||
endif
|
||||
|
||||
hi def link goString String
|
||||
hi def link goRawString String
|
||||
@@ -131,71 +214,263 @@ syn region goCharacter start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=
|
||||
hi def link goCharacter Character
|
||||
|
||||
" Regions
|
||||
syn region goBlock start="{" end="}" transparent fold
|
||||
syn region goParen start='(' end=')' transparent
|
||||
if s:FoldEnable('block')
|
||||
syn region goBlock start="{" end="}" transparent fold
|
||||
else
|
||||
syn region goBlock start="{" end="}" transparent
|
||||
endif
|
||||
|
||||
" import
|
||||
if s:FoldEnable('import')
|
||||
syn region goImport start='import (' end=')' transparent fold contains=goImport,goString,goComment
|
||||
else
|
||||
syn region goImport start='import (' end=')' transparent contains=goImport,goString,goComment
|
||||
endif
|
||||
|
||||
" var, const
|
||||
if s:FoldEnable('varconst')
|
||||
syn region goVar start='var (' end='^\s*)$' transparent fold
|
||||
\ contains=ALLBUT,goParen,goBlock,goFunction,goTypeName,goReceiverType,goReceiverVar,goParamName,goParamType,goSimpleParams,goPointerOperator
|
||||
syn region goConst start='const (' end='^\s*)$' transparent fold
|
||||
\ contains=ALLBUT,goParen,goBlock,goFunction,goTypeName,goReceiverType,goReceiverVar,goParamName,goParamType,goSimpleParams,goPointerOperator
|
||||
else
|
||||
syn region goVar start='var (' end='^\s*)$' transparent
|
||||
\ contains=ALLBUT,goParen,goBlock,goFunction,goTypeName,goReceiverType,goReceiverVar,goParamName,goParamType,goSimpleParams,goPointerOperator
|
||||
syn region goConst start='const (' end='^\s*)$' transparent
|
||||
\ contains=ALLBUT,goParen,goBlock,goFunction,goTypeName,goReceiverType,goReceiverVar,goParamName,goParamType,goSimpleParams,goPointerOperator
|
||||
endif
|
||||
|
||||
" Single-line var, const, and import.
|
||||
syn match goSingleDecl /\%(import\|var\|const\) [^(]\@=/ contains=goImport,goVar,goConst
|
||||
|
||||
" Integers
|
||||
syn match goDecimalInt "\<\d\+\([Ee]\d\+\)\?\>"
|
||||
syn match goHexadecimalInt "\<0x\x\+\>"
|
||||
syn match goOctalInt "\<0\o\+\>"
|
||||
syn match goOctalError "\<0\o*[89]\d*\>"
|
||||
syn match goDecimalInt "\<-\=\(0\|[1-9]_\?\(\d\|\d\+_\?\d\+\)*\)\%([Ee][-+]\=\d\+\)\=\>"
|
||||
syn match goDecimalError "\<-\=\(_\(\d\+_*\)\+\|\([1-9]\d*_*\)\+__\(\d\+_*\)\+\|\([1-9]\d*_*\)\+_\+\)\%([Ee][-+]\=\d\+\)\=\>"
|
||||
syn match goHexadecimalInt "\<-\=0[xX]_\?\(\x\+_\?\)\+\>"
|
||||
syn match goHexadecimalError "\<-\=0[xX]_\?\(\x\+_\?\)*\(\([^ \t0-9A-Fa-f_)]\|__\)\S*\|_\)\>"
|
||||
syn match goOctalInt "\<-\=0[oO]\?_\?\(\o\+_\?\)\+\>"
|
||||
syn match goOctalError "\<-\=0[0-7oO_]*\(\([^ \t0-7oOxX_/)\]\}\:]\|[oO]\{2,\}\|__\)\S*\|_\|[oOxX]\)\>"
|
||||
syn match goBinaryInt "\<-\=0[bB]_\?\([01]\+_\?\)\+\>"
|
||||
syn match goBinaryError "\<-\=0[bB]_\?[01_]*\([^ \t01_)]\S*\|__\S*\|_\)\>"
|
||||
|
||||
hi def link goDecimalInt Integer
|
||||
hi def link goDecimalError Error
|
||||
hi def link goHexadecimalInt Integer
|
||||
hi def link goHexadecimalError Error
|
||||
hi def link goOctalInt Integer
|
||||
hi def link goOctalError Error
|
||||
hi def link goBinaryInt Integer
|
||||
hi def link goBinaryError Error
|
||||
hi def link Integer Number
|
||||
|
||||
" Floating point
|
||||
syn match goFloat "\<\d\+\.\d*\([Ee][-+]\d\+\)\?\>"
|
||||
syn match goFloat "\<\.\d\+\([Ee][-+]\d\+\)\?\>"
|
||||
syn match goFloat "\<\d\+[Ee][-+]\d\+\>"
|
||||
syn match goFloat "\<-\=\d\+\.\d*\%([Ee][-+]\=\d\+\)\=\>"
|
||||
syn match goFloat "\<-\=\.\d\+\%([Ee][-+]\=\d\+\)\=\>"
|
||||
|
||||
hi def link goFloat Float
|
||||
|
||||
" Imaginary literals
|
||||
syn match goImaginary "\<\d\+i\>"
|
||||
syn match goImaginary "\<\d\+\.\d*\([Ee][-+]\d\+\)\?i\>"
|
||||
syn match goImaginary "\<\.\d\+\([Ee][-+]\d\+\)\?i\>"
|
||||
syn match goImaginary "\<\d\+[Ee][-+]\d\+i\>"
|
||||
syn match goImaginary "\<-\=\d\+i\>"
|
||||
syn match goImaginary "\<-\=\d\+[Ee][-+]\=\d\+i\>"
|
||||
syn match goImaginaryFloat "\<-\=\d\+\.\d*\%([Ee][-+]\=\d\+\)\=i\>"
|
||||
syn match goImaginaryFloat "\<-\=\.\d\+\%([Ee][-+]\=\d\+\)\=i\>"
|
||||
|
||||
hi def link goImaginary Number
|
||||
hi def link goImaginaryFloat Float
|
||||
|
||||
" Spaces after "[]"
|
||||
if go_highlight_array_whitespace_error != 0
|
||||
syn match goSpaceError display "\(\[\]\)\@<=\s\+"
|
||||
if s:HighlightArrayWhitespaceError()
|
||||
syn match goSpaceError display "\%(\[\]\)\@<=\s\+"
|
||||
endif
|
||||
|
||||
" Spacing errors around the 'chan' keyword
|
||||
if go_highlight_chan_whitespace_error != 0
|
||||
if s:HighlightChanWhitespaceError()
|
||||
" receive-only annotation on chan type
|
||||
syn match goSpaceError display "\(<-\)\@<=\s\+\(chan\>\)\@="
|
||||
"
|
||||
" \(\<chan\>\)\@<!<- (only pick arrow when it doesn't come after a chan)
|
||||
" this prevents picking up 'chan<- chan<-' but not '<- chan'
|
||||
syn match goSpaceError display "\%(\%(\<chan\>\)\@<!<-\)\@<=\s\+\%(\<chan\>\)\@="
|
||||
|
||||
" send-only annotation on chan type
|
||||
syn match goSpaceError display "\(\<chan\)\@<=\s\+\(<-\)\@="
|
||||
"
|
||||
" \(<-\)\@<!\<chan\> (only pick chan when it doesn't come after an arrow)
|
||||
" this prevents picking up '<-chan <-chan' but not 'chan <-'
|
||||
syn match goSpaceError display "\%(\%(<-\)\@<!\<chan\>\)\@<=\s\+\%(<-\)\@="
|
||||
|
||||
" value-ignoring receives in a few contexts
|
||||
syn match goSpaceError display "\(\(^\|[={(,;]\)\s*<-\)\@<=\s\+"
|
||||
syn match goSpaceError display "\%(\%(^\|[={(,;]\)\s*<-\)\@<=\s\+"
|
||||
endif
|
||||
|
||||
" Extra types commonly seen
|
||||
if go_highlight_extra_types != 0
|
||||
syn match goExtraType /\<bytes\.\(Buffer\)\>/
|
||||
syn match goExtraType /\<io\.\(Reader\|Writer\|ReadWriter\|ReadWriteCloser\)\>/
|
||||
syn match goExtraType /\<reflect\.\(Kind\|Type\|Value\)\>/
|
||||
if s:HighlightExtraTypes()
|
||||
syn match goExtraType /\<bytes\.\%(Buffer\)\>/
|
||||
syn match goExtraType /\<context\.\%(Context\)\>/
|
||||
syn match goExtraType /\<io\.\%(Reader\|ReadSeeker\|ReadWriter\|ReadCloser\|ReadWriteCloser\|Writer\|WriteCloser\|Seeker\)\>/
|
||||
syn match goExtraType /\<reflect\.\%(Kind\|Type\|Value\)\>/
|
||||
syn match goExtraType /\<unsafe\.Pointer\>/
|
||||
endif
|
||||
|
||||
" Space-tab error
|
||||
if go_highlight_space_tab_error != 0
|
||||
if s:HighlightSpaceTabError()
|
||||
syn match goSpaceError display " \+\t"me=e-1
|
||||
endif
|
||||
|
||||
" Trailing white space error
|
||||
if go_highlight_trailing_whitespace_error != 0
|
||||
if s:HighlightTrailingWhitespaceError()
|
||||
syn match goSpaceError display excludenl "\s\+$"
|
||||
endif
|
||||
|
||||
hi def link goExtraType Type
|
||||
hi def link goSpaceError Error
|
||||
|
||||
|
||||
|
||||
" included from: https://github.com/athom/more-colorful.vim/blob/master/after/syntax/go.vim
|
||||
"
|
||||
" Comments; their contents
|
||||
syn keyword goTodo contained NOTE
|
||||
hi def link goTodo Todo
|
||||
|
||||
syn match goVarArgs /\.\.\./
|
||||
|
||||
" Operators;
|
||||
if s:HighlightOperators()
|
||||
" match single-char operators: - + % < > ! & | ^ * =
|
||||
" and corresponding two-char operators: -= += %= <= >= != &= |= ^= *= ==
|
||||
syn match goOperator /[-+%<>!&|^*=]=\?/
|
||||
" match / and /=
|
||||
syn match goOperator /\/\%(=\|\ze[^/*]\)/
|
||||
" match two-char operators: << >> &^
|
||||
" and corresponding three-char operators: <<= >>= &^=
|
||||
syn match goOperator /\%(<<\|>>\|&^\)=\?/
|
||||
" match remaining two-char operators: := && || <- ++ --
|
||||
syn match goOperator /:=\|||\|<-\|++\|--/
|
||||
" match ...
|
||||
|
||||
hi def link goPointerOperator goOperator
|
||||
hi def link goVarArgs goOperator
|
||||
endif
|
||||
hi def link goOperator Operator
|
||||
|
||||
" Functions;
|
||||
if s:HighlightFunctions() || s:HighlightFunctionParameters()
|
||||
syn match goDeclaration /\<func\>/ nextgroup=goReceiver,goFunction,goSimpleParams skipwhite skipnl
|
||||
syn match goReceiverVar /\w\+\ze\s\+\%(\w\|\*\)/ nextgroup=goPointerOperator,goReceiverType skipwhite skipnl contained
|
||||
syn match goPointerOperator /\*/ nextgroup=goReceiverType contained skipwhite skipnl
|
||||
syn match goFunction /\w\+/ nextgroup=goSimpleParams contained skipwhite skipnl
|
||||
syn match goReceiverType /\w\+/ contained
|
||||
if s:HighlightFunctionParameters()
|
||||
syn match goSimpleParams /(\%(\w\|\_s\|[*\.\[\],\{\}<>-]\)*)/ contained contains=goParamName,goType nextgroup=goFunctionReturn skipwhite skipnl
|
||||
syn match goFunctionReturn /(\%(\w\|\_s\|[*\.\[\],\{\}<>-]\)*)/ contained contains=goParamName,goType skipwhite skipnl
|
||||
syn match goParamName /\w\+\%(\s*,\s*\w\+\)*\ze\s\+\%(\w\|\.\|\*\|\[\)/ contained nextgroup=goParamType skipwhite skipnl
|
||||
syn match goParamType /\%([^,)]\|\_s\)\+,\?/ contained nextgroup=goParamName skipwhite skipnl
|
||||
\ contains=goVarArgs,goType,goSignedInts,goUnsignedInts,goFloats,goComplexes,goDeclType,goBlock
|
||||
hi def link goReceiverVar goParamName
|
||||
hi def link goParamName Identifier
|
||||
endif
|
||||
syn match goReceiver /(\s*\w\+\%(\s\+\*\?\s*\w\+\)\?\s*)\ze\s*\w/ contained nextgroup=goFunction contains=goReceiverVar skipwhite skipnl
|
||||
else
|
||||
syn keyword goDeclaration func
|
||||
endif
|
||||
hi def link goFunction Function
|
||||
|
||||
" Function calls;
|
||||
if s:HighlightFunctionCalls()
|
||||
syn match goFunctionCall /\w\+\ze(/ contains=goBuiltins,goDeclaration
|
||||
endif
|
||||
hi def link goFunctionCall Type
|
||||
|
||||
" Fields;
|
||||
if s:HighlightFields()
|
||||
" 1. Match a sequence of word characters coming after a '.'
|
||||
" 2. Require the following but dont match it: ( \@= see :h E59)
|
||||
" - The symbols: / - + * % OR
|
||||
" - The symbols: [] {} <> ) OR
|
||||
" - The symbols: \n \r space OR
|
||||
" - The symbols: , : .
|
||||
" 3. Have the start of highlight (hs) be the start of matched
|
||||
" pattern (s) offsetted one to the right (+1) (see :h E401)
|
||||
syn match goField /\.\w\+\
|
||||
\%(\%([\/\-\+*%]\)\|\
|
||||
\%([\[\]{}<\>\)]\)\|\
|
||||
\%([\!=\^|&]\)\|\
|
||||
\%([\n\r\ ]\)\|\
|
||||
\%([,\:.]\)\)\@=/hs=s+1
|
||||
endif
|
||||
hi def link goField Identifier
|
||||
|
||||
" Structs & Interfaces;
|
||||
if s:HighlightTypes()
|
||||
syn match goTypeConstructor /\<\w\+{\@=/
|
||||
syn match goTypeDecl /\<type\>/ nextgroup=goTypeName skipwhite skipnl
|
||||
syn match goTypeName /\w\+/ contained nextgroup=goDeclType skipwhite skipnl
|
||||
syn match goDeclType /\<\%(interface\|struct\)\>/ skipwhite skipnl
|
||||
hi def link goReceiverType Type
|
||||
else
|
||||
syn keyword goDeclType struct interface
|
||||
syn keyword goDeclaration type
|
||||
endif
|
||||
hi def link goTypeConstructor Type
|
||||
hi def link goTypeName Type
|
||||
hi def link goTypeDecl Keyword
|
||||
hi def link goDeclType Keyword
|
||||
|
||||
" Variable Assignments
|
||||
if s:HighlightVariableAssignments()
|
||||
syn match goVarAssign /\v[_.[:alnum:]]+(,\s*[_.[:alnum:]]+)*\ze(\s*([-^+|^\/%&]|\*|\<\<|\>\>|\&\^)?\=[^=])/
|
||||
hi def link goVarAssign Special
|
||||
endif
|
||||
|
||||
" Variable Declarations
|
||||
if s:HighlightVariableDeclarations()
|
||||
syn match goVarDefs /\v\w+(,\s*\w+)*\ze(\s*:\=)/
|
||||
hi def link goVarDefs Special
|
||||
endif
|
||||
|
||||
" Build Constraints
|
||||
if s:HighlightBuildConstraints()
|
||||
syn match goBuildKeyword display contained "+build"
|
||||
" Highlight the known values of GOOS, GOARCH, and other +build options.
|
||||
syn keyword goBuildDirectives contained
|
||||
\ android darwin dragonfly freebsd linux nacl netbsd openbsd plan9
|
||||
\ solaris windows 386 amd64 amd64p32 arm armbe arm64 arm64be ppc64
|
||||
\ ppc64le mips mipsle mips64 mips64le mips64p32 mips64p32le ppc
|
||||
\ s390 s390x sparc sparc64 cgo ignore race
|
||||
|
||||
" Other words in the build directive are build tags not listed above, so
|
||||
" avoid highlighting them as comments by using a matchgroup just for the
|
||||
" start of the comment.
|
||||
" The rs=s+2 option lets the \s*+build portion be part of the inner region
|
||||
" instead of the matchgroup so it will be highlighted as a goBuildKeyword.
|
||||
syn region goBuildComment matchgroup=goBuildCommentStart
|
||||
\ start="//\s*+build\s"rs=s+2 end="$"
|
||||
\ contains=goBuildKeyword,goBuildDirectives
|
||||
hi def link goBuildCommentStart Comment
|
||||
hi def link goBuildDirectives Type
|
||||
hi def link goBuildKeyword PreProc
|
||||
endif
|
||||
|
||||
if s:HighlightBuildConstraints() || s:FoldEnable('package_comment')
|
||||
" One or more line comments that are followed immediately by a "package"
|
||||
" declaration are treated like package documentation, so these must be
|
||||
" matched as comments to avoid looking like working build constraints.
|
||||
" The he, me, and re options let the "package" itself be highlighted by
|
||||
" the usual rules.
|
||||
exe 'syn region goPackageComment start=/\v(\/\/.*\n)+\s*package/'
|
||||
\ . ' end=/\v\n\s*package/he=e-7,me=e-7,re=e-7'
|
||||
\ . ' contains=@goCommentGroup,@Spell'
|
||||
\ . (s:FoldEnable('package_comment') ? ' fold' : '')
|
||||
exe 'syn region goPackageComment start=/\v^\s*\/\*.*\n(.*\n)*\s*\*\/\npackage/'
|
||||
\ . ' end=/\v\*\/\n\s*package/he=e-7,me=e-7,re=e-7'
|
||||
\ . ' contains=@goCommentGroup,@Spell'
|
||||
\ . (s:FoldEnable('package_comment') ? ' fold' : '')
|
||||
hi def link goPackageComment Comment
|
||||
endif
|
||||
|
||||
" :GoCoverage commands
|
||||
hi def link goCoverageNormalText Comment
|
||||
|
||||
" Search backwards for a global declaration to start processing the syntax.
|
||||
"syn sync match goSync grouphere NONE /^\(const\|var\|type\|func\)\>/
|
||||
|
||||
@@ -203,6 +478,9 @@ hi def link goSpaceError Error
|
||||
" following as a more expensive/less precise workaround.
|
||||
syn sync minlines=500
|
||||
|
||||
let b:current_syntax = 'go'
|
||||
let b:current_syntax = "go"
|
||||
|
||||
let &cpo = s:keepcpo
|
||||
unlet s:keepcpo
|
||||
|
||||
" vim: sw=2 sts=2 et
|
||||
|
||||
85
runtime/syntax/gvpr.vim
Normal file
85
runtime/syntax/gvpr.vim
Normal file
@@ -0,0 +1,85 @@
|
||||
" Vim syntax file
|
||||
" Language: Graphviz program
|
||||
" Maintainer: Matthew Fernandez <matthew.fernandez@gmail.com>
|
||||
" Last Change: Tue, 28 Jul 2020 17:20:44 -0700
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
syn keyword gvArg ARGC ARGV
|
||||
syn keyword gvBeg BEGIN BEG_G N E END END_G
|
||||
syn keyword gvFunc
|
||||
\ graph fstsubg isDirect isStrict isSubg nEdges nNodes nxtsubg subg
|
||||
\ degreeOf fstnode indegreeOf isNode isSubnode node nxtnode nxtnode_sg
|
||||
\ outDegreeOf subnode
|
||||
\ edge edge_sg fstedge fstedge_sg fstin fstin_sg fstout fstout_sg isEdge
|
||||
\ isEdge_sg isSubedge nxtedge nxtedge_sg nxtin nxtin_sg nxtout nxtout_sg opp
|
||||
\ subedge
|
||||
\ freadG fwriteG readG write[] writeG
|
||||
\ aget aset clone cloneG compOf copy[] copyA delete[] fstAttr getDflt hasAttr
|
||||
\ induce isAttr isIn kindOf lock[] nxtAttr setDflt
|
||||
\ canon gsub html index ishtml length llOf match[] rindex split[] sprintf
|
||||
\ sscanf strcmp sub substr tokens tolower toupper urOf xOf yOf
|
||||
\ closeF openF print[] printf scanf readL
|
||||
\ atan2 cos exp log MAX MIN pow sin[] sqrt
|
||||
\ in[] unset
|
||||
\ colorx exit[] rand srand system
|
||||
syn keyword gvCons
|
||||
\ NULL TV_bfs TV_dfs TV_en TV_flat TV_fwd TV_ne TV_prepostdfs TV_prepostfwd
|
||||
\ TV_prepostrev TV_postdfs TV_postfwd tv_postrev TV_rev
|
||||
syn keyword gvType char double float int long unsigned void
|
||||
\ string
|
||||
\ edge_t graph_t node_t obj_t
|
||||
syn match gvVar
|
||||
\ "\$\(\(F\|G\|NG\|O\|T\|tgtname\|tvedge\|tvnext\|tvroot\|tvtype\)\>\)\?\(\<\)\@!"
|
||||
syn keyword gvWord break continue else for forr if return switch while
|
||||
|
||||
" numbers adapted from c.vim's cNumbers and friends
|
||||
syn match gvNums transparent "\<\d\|\.\d" contains=gvNumber,gvFloat,gvOctal
|
||||
syn match gvNumber contained "\d\+\(u\=l\{0,2}\|ll\=u\)\>"
|
||||
syn match gvNumber contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>"
|
||||
syn match gvOctal contained "0\o\+\(u\=l\{0,2}\|ll\=u\)\>" contains=gvOctalZero
|
||||
syn match gvOctalZero contained "\<0"
|
||||
syn match gvFloat contained "\d\+f"
|
||||
syn match gvFloat contained "\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\="
|
||||
syn match gvFloat contained "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>"
|
||||
syn match gvFloat contained "\d\+e[-+]\=\d\+[fl]\=\>"
|
||||
|
||||
syn region gvString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=gvFormat,gvSpecial extend
|
||||
syn region gvString start="'" skip="\\\\\|\\'" end="'" contains=gvFormat,gvSpecial extend
|
||||
|
||||
" adapted from c.vim's cFormat for c_no_c99
|
||||
syn match gvFormat "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlL]\|ll\)\=\([bdiuoxXDOUfeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained
|
||||
|
||||
syn match gvSpecial "\\." contained
|
||||
|
||||
syn region gvCComment start="//" skip="\\$" end="$" keepend
|
||||
syn region gvCPPComment start="#" skip="\\$" end="$" keepend
|
||||
syn region gvCXXComment start="/\*" end="\*/" fold
|
||||
|
||||
hi def link gvArg Identifier
|
||||
hi def link gvBeg Keyword
|
||||
hi def link gvFloat Number
|
||||
hi def link gvFunc Identifier
|
||||
hi def link gvCons Number
|
||||
hi def link gvNumber Number
|
||||
hi def link gvType Type
|
||||
hi def link gvVar Statement
|
||||
hi def link gvWord Keyword
|
||||
|
||||
hi def link gvString String
|
||||
hi def link gvFormat Special
|
||||
hi def link gvSpecial Special
|
||||
|
||||
hi def link gvCComment Comment
|
||||
hi def link gvCPPComment Comment
|
||||
hi def link gvCXXComment Comment
|
||||
|
||||
let b:current_syntax = "gvpr"
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: Vim help file
|
||||
" Maintainer: Bram Moolenaar (Bram@vim.org)
|
||||
" Last Change: 2020 Jul 28
|
||||
" Last Change: 2021 Jun 13
|
||||
|
||||
" Quit when a (custom) syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
@@ -76,6 +76,7 @@ syn match helpSpecial "\[line]"
|
||||
syn match helpSpecial "\[count]"
|
||||
syn match helpSpecial "\[offset]"
|
||||
syn match helpSpecial "\[cmd]"
|
||||
syn match helpNormal "vim9\[cmd]"
|
||||
syn match helpSpecial "\[num]"
|
||||
syn match helpSpecial "\[+num]"
|
||||
syn match helpSpecial "\[-num]"
|
||||
|
||||
44
runtime/syntax/jsonc.vim
Normal file
44
runtime/syntax/jsonc.vim
Normal file
@@ -0,0 +1,44 @@
|
||||
" Vim syntax file
|
||||
" Language: JSONC (JSON with Comments)
|
||||
" Original Author: Izhak Jakov <izhak724@gmail.com>
|
||||
" Acknowledgement: Based off of vim-jsonc maintained by Kevin Locke <kevin@kevinlocke.name>
|
||||
" https://github.com/kevinoid/vim-jsonc
|
||||
" License: MIT
|
||||
" Last Change: 2021-07-01
|
||||
|
||||
" Ensure syntax is loaded once, unless nested inside another (main) syntax
|
||||
" For description of main_syntax, see https://stackoverflow.com/q/16164549
|
||||
if !exists('g:main_syntax')
|
||||
if exists('b:current_syntax') && b:current_syntax ==# 'jsonc'
|
||||
finish
|
||||
endif
|
||||
let g:main_syntax = 'jsonc'
|
||||
endif
|
||||
|
||||
" Based on vim-json syntax
|
||||
runtime! syntax/json.vim
|
||||
|
||||
" Remove syntax group for comments treated as errors
|
||||
if !exists("g:vim_json_warnings") || g:vim_json_warnings
|
||||
syn clear jsonCommentError
|
||||
endif
|
||||
|
||||
syn match jsonStringMatch /"\([^"]\|\\\"\)\+"\ze\(\_s*\/\/.*\_s*\)*[}\]]/ contains=jsonString
|
||||
syn match jsonStringMatch /"\([^"]\|\\\"\)\+"\ze\_s*\/\*\_.*\*\/\_s*[}\]]/ contains=jsonString
|
||||
syn match jsonTrailingCommaError /\(,\)\+\ze\(\_s*\/\/.*\_s*\)*[}\]]/
|
||||
syn match jsonTrailingCommaError /\(,\)\+\ze\_s*\/\*\_.*\*\/\_s*[}\]]/
|
||||
|
||||
" Define syntax matching comments and their contents
|
||||
syn keyword jsonCommentTodo FIXME NOTE TBD TODO XXX
|
||||
syn region jsonLineComment start=+\/\/+ end=+$+ contains=@Spell,jsonCommentTodo keepend
|
||||
syn region jsonComment start='/\*' end='\*/' contains=@Spell,jsonCommentTodo fold
|
||||
|
||||
" Link comment syntax comment to highlighting
|
||||
hi! def link jsonLineComment Comment
|
||||
hi! def link jsonComment Comment
|
||||
|
||||
" Set/Unset syntax to avoid duplicate inclusion and correctly handle nesting
|
||||
let b:current_syntax = 'jsonc'
|
||||
if g:main_syntax ==# 'jsonc'
|
||||
unlet g:main_syntax
|
||||
endif
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: ReDIF
|
||||
" Maintainer: Axel Castellane <axel.castellane@polytechnique.edu>
|
||||
" Last Change: 2013 April 17
|
||||
" Last Change: 2021 Jun 17
|
||||
" Original Author: Axel Castellane
|
||||
" Source: http://openlib.org/acmes/root/docu/redif_1.html
|
||||
" File Extension: rdf
|
||||
@@ -932,7 +932,7 @@ highlight redifFieldDeprecated term=undercurl cterm=undercurl gui=undercurl guis
|
||||
" Sync: The template-type (ReDIF-Paper, ReDIF-Archive, etc.) influences which
|
||||
" fields can follow. Thus sync must search backwards for it.
|
||||
"
|
||||
" I would like to simply ask VIM to search backward for the first occurence of
|
||||
" I would like to simply ask VIM to search backward for the first occurrence of
|
||||
" /^Template-Type:/, but it does not seem to be possible, so I have to start
|
||||
" from the beginning of the file... This might slow down a lot for files that
|
||||
" contain a lot of Template-Type statements.
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" URL: https://github.com/vim-ruby/vim-ruby
|
||||
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2019 Jul 13
|
||||
" Last Change: 2021 Jun 06
|
||||
" ----------------------------------------------------------------------------
|
||||
"
|
||||
" Previous Maintainer: Mirko Nasato
|
||||
@@ -66,7 +66,7 @@ endfunction
|
||||
com! -nargs=* SynFold call s:run_syntax_fold(<q-args>)
|
||||
|
||||
" Not-Top Cluster {{{1
|
||||
syn cluster rubyNotTop contains=@rubyCommentNotTop,@rubyStringNotTop,@rubyRegexpSpecial,@rubyDeclaration,@rubyExceptionHandler,@rubyClassOperator,rubyConditional,rubyModuleName,rubyClassName,rubySymbolDelimiter,rubyParentheses
|
||||
syn cluster rubyNotTop contains=@rubyCommentNotTop,@rubyStringNotTop,@rubyRegexpSpecial,@rubyDeclaration,@rubyExceptionHandler,@rubyClassOperator,rubyConditional,rubyModuleName,rubyClassName,rubySymbolDelimiter,rubyParentheses,@Spell
|
||||
|
||||
" Whitespace Errors {{{1
|
||||
if exists("ruby_space_errors")
|
||||
@@ -92,7 +92,7 @@ if exists("ruby_operators") || exists("ruby_pseudo_operators")
|
||||
syn match rubyBooleanOperator "\%(\w\|[^\x00-\x7F]\)\@1<!!\|&&\|||"
|
||||
syn match rubyRangeOperator "\.\.\.\="
|
||||
syn match rubyAssignmentOperator "=>\@!\|-=\|/=\|\*\*=\|\*=\|&&=\|&=\|||=\||=\|%=\|+=\|>>=\|<<=\|\^="
|
||||
syn match rubyAssignmentOperator "=>\@!" containedin=rubyBlockParameterList " TODO: this is inelegant
|
||||
syn match rubyAssignmentOperator "=>\@!" contained containedin=rubyBlockParameterList " TODO: this is inelegant
|
||||
syn match rubyEqualityOperator "===\|==\|!=\|!\~\|=\~"
|
||||
|
||||
syn region rubyBracketOperator matchgroup=rubyOperator start="\%(\%(\w\|[^\x00-\x7F]\)[?!]\=\|[]})]\)\@2<=\[" end="]" contains=ALLBUT,@rubyNotTop
|
||||
@@ -134,10 +134,10 @@ syn match rubyCurlyBraceEscape "\\[{}]" contained display
|
||||
syn match rubyAngleBracketEscape "\\[<>]" contained display
|
||||
syn match rubySquareBracketEscape "\\[[\]]" contained display
|
||||
|
||||
syn region rubyNestedParentheses start="(" skip="\\\\\|\\)" matchgroup=rubyString end=")" transparent contained
|
||||
syn region rubyNestedCurlyBraces start="{" skip="\\\\\|\\}" matchgroup=rubyString end="}" transparent contained
|
||||
syn region rubyNestedAngleBrackets start="<" skip="\\\\\|\\>" matchgroup=rubyString end=">" transparent contained
|
||||
syn region rubyNestedSquareBrackets start="\[" skip="\\\\\|\\\]" matchgroup=rubyString end="\]" transparent contained
|
||||
syn region rubyNestedParentheses start="(" skip="\\\\\|\\)" end=")" transparent contained
|
||||
syn region rubyNestedCurlyBraces start="{" skip="\\\\\|\\}" end="}" transparent contained
|
||||
syn region rubyNestedAngleBrackets start="<" skip="\\\\\|\\>" end=">" transparent contained
|
||||
syn region rubyNestedSquareBrackets start="\[" skip="\\\\\|\\\]" end="\]" transparent contained
|
||||
|
||||
syn cluster rubySingleCharEscape contains=rubyBackslashEscape,rubyQuoteEscape,rubySpaceEscape,rubyParenthesisEscape,rubyCurlyBraceEscape,rubyAngleBracketEscape,rubySquareBracketEscape
|
||||
syn cluster rubyNestedBrackets contains=rubyNested.\+
|
||||
@@ -193,7 +193,7 @@ SynFold ':' syn region rubySymbol matchgroup=rubySymbolDelimiter start="[]})\"':
|
||||
|
||||
syn match rubyCapitalizedMethod "\%(\%(^\|[^.]\)\.\s*\)\@<!\<\u\%(\w\|[^\x00-\x7F]\)*\>\%(\s*(\)\@="
|
||||
|
||||
syn region rubyParentheses start="(" end=")" contains=ALLBUT,@rubyNotTop containedin=rubyBlockParameterList
|
||||
syn region rubyParentheses start="(" end=")" contains=ALLBUT,@rubyNotTop contained containedin=rubyBlockParameterList
|
||||
syn region rubyBlockParameterList start="\%(\%(\<do\>\|{\)\_s*\)\@32<=|" end="|" contains=ALLBUT,@rubyNotTop,@rubyProperOperator
|
||||
|
||||
if exists('ruby_global_variable_error')
|
||||
@@ -332,7 +332,7 @@ SynFold '<<' syn region rubyString start=+\%(\%(class\|::\|\.\@1<!\.\)\_s*\|\%([
|
||||
syn match rubyAliasDeclaration "[^[:space:];#.()]\+" contained contains=rubySymbol,@rubyGlobalVariable nextgroup=rubyAliasDeclaration2 skipwhite
|
||||
syn match rubyAliasDeclaration2 "[^[:space:];#.()]\+" contained contains=rubySymbol,@rubyGlobalVariable
|
||||
syn match rubyMethodDeclaration "[^[:space:];#(]\+" contained contains=rubyConstant,rubyBoolean,rubyPseudoVariable,rubyInstanceVariable,rubyClassVariable,rubyGlobalVariable
|
||||
syn match rubyClassDeclaration "[^[:space:];#<]\+" contained contains=rubyClassName,rubyScopeOperator nextgroup=rubySuperClassOperator skipwhite skipnl
|
||||
syn match rubyClassDeclaration "[^[:space:];#<]\+" contained contains=rubyClassName,rubyScopeOperator nextgroup=rubySuperClassOperator skipwhite
|
||||
syn match rubyModuleDeclaration "[^[:space:];#<]\+" contained contains=rubyModuleName,rubyScopeOperator
|
||||
|
||||
syn match rubyMethodName "\<\%([_[:alpha:]]\|[^\x00-\x7F]\)\%([_[:alnum:]]\|[^\x00-\x7F]\)*[?!=]\=\%([[:alnum:]_.:?!=]\|[^\x00-\x7F]\)\@!" contained containedin=rubyMethodDeclaration
|
||||
@@ -462,7 +462,7 @@ endif
|
||||
syn match rubyDefinedOperator "\%#=1\<defined?" display
|
||||
|
||||
" 1.9-style Hash Keys and Keyword Parameters {{{1
|
||||
syn match rubySymbol "\%([{(|,]\_s*\)\@<=\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[?!]\=::\@!"he=e-1
|
||||
syn match rubySymbol "\%(\w\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[?!]\=::\@!"he=e-1 contained containedin=rubyBlockParameterList,rubyCurlyBlock
|
||||
syn match rubySymbol "[]})\"':]\@1<!\<\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[!?]\=:[[:space:],;]\@="he=e-1
|
||||
syn match rubySymbol "[[:space:],{(]\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[!?]\=:[[:space:],;]\@="hs=s+1,he=e-1
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
" Vim syntax file
|
||||
" Language: Vim 8.2 script
|
||||
" Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
|
||||
" Last Change: May 20, 2021
|
||||
" Version: 8.2-03
|
||||
" Last Change: June 20, 2021
|
||||
" Version: 8.2-06
|
||||
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_VIM
|
||||
" Automatically generated keyword lists: {{{1
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
let s:keepcpo= &cpo
|
||||
let s:keepcpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" vimTodo: contains common special-notices for comments {{{2
|
||||
@@ -19,12 +19,12 @@ syn keyword vimTodo contained COMBAK FIXME TODO XXX
|
||||
syn cluster vimCommentGroup contains=vimTodo,@Spell
|
||||
|
||||
" regular vim commands {{{2
|
||||
syn keyword vimCommand contained a ar[gs] argl[ocal] ba[ll] bl[ast] brea[k] buffers ca caf[ter] cbo[ttom] cex[pr] cgete[xpr] cl[ist] cn[ext] colo[rscheme] cons[t] cs d[elete] delel delf[unction] dif[fupdate] difft[his] dli[st] ds[earch] echoc[onsole] em[enu] endw[hile] export filt[er] fo[ld] fu[nction] gvim helpt[ags] iabc[lear] import isp[lit] keepa l[ist] laf[ter] lbel[ow] lcscope lf[ile] lgr[ep] lli[st] lnf[ile] lol[der] lt[ag] lw[indow] menut[ranslate] mkvie[w] nbc[lose] noh[lsearch] ol[dfiles] pa[ckadd] po[p] prof[ile] pta[g] ptr[ewind] py3f[ile] pythonx quita[ll] redraws[tatus] rew[ind] rubyf[ile] sIg sa[rgument] sba[ll] sbr[ewind] scl scscope sfir[st] sgl sic sin sm[ap] snoreme spelld[ump] spellw[rong] srg sta[g] sts[elect] sus[pend] syncbind tabN[ext] tabl[ast] tabr[ewind] tcld[o] tj[ump] tlu tno[remap] tu[nmenu] undol[ist] v vie[w] vmapc[lear] wa[ll] winp[os] wundo xme xr[estore]
|
||||
syn keyword vimCommand contained a ar[gs] argl[ocal] ba[ll] bl[ast] brea[k] buffers ca caf[ter] cbo[ttom] cex[pr] cgete[xpr] cl[ist] cn[ext] colo[rscheme] cons[t] cs d[elete] delel delf[unction] dif[fupdate] difft[his] dli[st] ds[earch] echoc[onsole] em[enu] endw[hile] export filt[er] fo[ld] fu[nction] gvim helpt[ags] iabc[lear] import isp[lit] keepa l[ist] laf[ter] lbel[ow] lcscope lf[ile] lgr[ep] lli[st] lnf[ile] lol[der] lt[ag] lw[indow] menut[ranslate] mkvie[w] nbc[lose] noh[lsearch] ol[dfiles] pa[ckadd] po[p] prof[ile] pta[g] ptr[ewind] py3f[ile] pythonx quita[ll] redraws[tatus] rew[ind] rubyf[ile] sIg sa[rgument] sba[ll] sbr[ewind] scl scscope sfir[st] sgl sic sin sm[ap] snoreme spelld[ump] spellw[rong] srg sta[g] sts[elect] sus[pend] syncbind tabN[ext] tabl[ast] tabr[ewind] tcld[o] tj[ump] tlu tno[remap] tu[nmenu] undol[ist] v vie[w] viu[sage] wa[ll] winp[os] wundo xme xr[estore]
|
||||
syn keyword vimCommand contained ab arga[dd] argu[ment] bad[d] bm[odified] breaka[dd] bun[load] cabc[lear] cal[l] cc cf[ile] changes cla[st] cnew[er] com cope[n] cscope debug delep dell diffg[et] dig[raphs] do dsp[lit] echoe[rr] en[dif] ene[w] exu[sage] fin[d] foldc[lose] g h[elp] hi if in iuna[bbrev] keepalt la[st] lan[guage] lbo[ttom] ld[o] lfdo lgrepa[dd] lma lo[adview] lop[en] lua m[ove] mes[sages] mod[e] nbs[tart] nor omapc[lear] packl[oadall] popu[p] profd[el] ptf[irst] pts[elect] py3f[ile] pyx r[ead] redrawt[abline] ri[ght] rundo sIl sal[l] sbf[irst] sc scp se[t] sg sgn sie sip sme snoremenu spelli[nfo] spr[evious] sri star[tinsert] substitutepattern sv[iew] syntime tabc[lose] tabm[ove] tabs tclf[ile] tl[ast] tlunmenu to[pleft] tunma[p] unh[ide] var vim9[cmd] vne[w] wh[ile] wn[ext] wv[iminfo] xmenu xunme
|
||||
syn keyword vimCommand contained abc[lear] argd[elete] as[cii] balt bn[ext] breakd[el] bw[ipeout] cabo[ve] cat[ch] ccl[ose] cfdo chd[ir] class cnf[ile] comc[lear] cp[revious] cstag debugg[reedy] deletel delm[arks] diffo[ff] dir doau e[dit] echom[sg] enddef eval f[ile] fina[lly] foldd[oopen] go[to] ha[rdcopy] hid[e] ij[ump] inor j[oin] keepj[umps] lab[ove] lat lc[d] le[ft] lfir[st] lh[elpgrep] lmak[e] loadk lp[revious] luado ma[rk] mk[exrc] mz[scheme] new nore on[ly] pc[lose] pp[op] promptf[ind] ptj[ump] pu[t] py[thon] pyxdo rec[over] reg[isters] rightb[elow] rv[iminfo] sIn san[dbox] sbl[ast] scI scr[iptnames] setf[iletype] sgI sgp sig sir smenu so[urce] spellr[are] sr srl startg[replace] substituterepeat sw[apname] t tabd[o] tabn[ext] tags te[aroff] tlm tm[enu] tp[revious] type unl ve[rsion] vim9s[cript] vs[plit] win[size] wp[revious] x[it] xnoreme xunmenu
|
||||
syn keyword vimCommand contained abo[veleft] argdo au bd[elete] bo[tright] breakl[ist] cN[ext] cad[dbuffer] cb[uffer] cd cfir[st] che[ckpath] cle[arjumps] cnor comp[iler] cpf[ile] cun def deletep delp diffp[atch] disa[ssemble] doaut ea echon endf[unction] ex files fini[sh] folddoc[losed] gr[ep] helpc[lose] his[tory] il[ist] interface ju[mps] keepp[atterns] lad[dexpr] later lch[dir] lefta[bove] lg[etfile] lhi[story] lmapc[lear] loadkeymap lpf[ile] luafile mak[e] mks[ession] mzf[ile] nmapc[lear] nos[wapfile] opt[ions] pe[rl] pre[serve] promptr[epl] ptl[ast] pw[d] pydo pyxfile red[o] res[ize] ru[ntime] sI sIp sav[eas] sbm[odified] sce scripte[ncoding] setg[lobal] sgc sgr sign sl[eep] smile sor[t] spellr[epall] srI srn startr[eplace] sun[hide] sy tN[ext] tabe[dit] tabnew tc[l] ter[minal] tlmenu tma[p] tr[ewind] u[ndo] unlo[ckvar] verb[ose] vim[grep] wN[ext] winc[md] wq xa[ll] xnoremenu xwininfo
|
||||
syn keyword vimCommand contained addd arge[dit] bN[ext] bel[owright] bp[revious] bro[wse] cNf[ile] cadde[xpr] cbe[fore] cdo cg[etfile] checkt[ime] clo[se] co[py] con[tinue] cq[uit] cuna[bbrev] defc[ompile] deletl dep diffpu[t] dj[ump] dp earlier el[se] endfo[r] exi[t] filet fir[st] foldo[pen] grepa[dd] helpf[ind] i imapc[lear] intro k lN[ext] laddb[uffer] lb[uffer] lcl[ose] leg[acy] lgetb[uffer] ll lne[xt] loc[kmarks] lr[ewind] lv[imgrep] marks mksp[ell] n[ext] noa nu[mber] ownsyntax ped[it] prev[ious] ps[earch] ptn[ext] py3 pyf[ile] q[uit] redi[r] ret[ab] rub[y] sIc sIr sbN[ext] sbn[ext] scg scriptv[ersion] setl[ocal] sge sh[ell] sil[ent] sla[st] sn[ext] sp[lit] spellr[rare] src srp stj[ump] sunme syn ta[g] tabf[ind] tabo[nly] tcd tf[irst] tln tmapc[lear] try una[bbreviate] uns[ilent] vert[ical] vimgrepa[dd] w[rite] windo wqa[ll] xmapc[lear] xprop y[ank]
|
||||
syn keyword vimCommand contained al[l] argg[lobal] b[uffer] bf[irst] br[ewind] bufdo c[hange] caddf[ile] cbel[ow] ce[nter] cgetb[uffer] chi[story] cmapc[lear] col[der] conf[irm] cr[ewind] cw[indow] delc[ommand] deletp di[splay] diffs[plit] dl dr[op] ec elsei[f] endt[ry] exp filetype fix[del] for gui helpg[rep] ia imp is[earch] kee[pmarks] lNf[ile] laddf[ile] lbe[fore] lcs lex[pr] lgete[xpr] lla[st] lnew[er] lockv[ar] ls lvimgrepa[dd] mat[ch] mkv[imrc] nb[key] noautocmd o[pen] p[rint] perld[o] pro ptN[ext] ptp[revious] py3do python3 qa[ll] redr[aw] retu[rn] rubyd[o] sIe sN[ext] sb[uffer] sbp[revious] sci scs sf[ind] sgi si sim[alt] sm[agic] sno[magic] spe[llgood] spellu[ndo] sre[wind] st[op] stopi[nsert] sunmenu sync tab tabfir[st] tabp[revious] tch[dir] th[row] tlnoremenu tn[ext] ts[elect] undoj[oin] up[date] vi[sual] viu[sage]
|
||||
syn keyword vimCommand contained abo[veleft] argdo au bd[elete] bo[tright] breakl[ist] cN[ext] cad[dbuffer] cb[uffer] cd cfir[st] che[ckpath] cle[arjumps] cnor comp[iler] cpf[ile] cun def deletep delp diffp[atch] disa[ssemble] doaut ea echon endf[unction] ex files fini[sh] folddoc[losed] gr[ep] helpc[lose] his[tory] il[ist] interface ju[mps] keepp[atterns] lad[dexpr] later lch[dir] lefta[bove] lg[etfile] lhi[story] lmapc[lear] loadkeymap lpf[ile] luafile mak[e] mks[ession] mzf[ile] nmapc[lear] nos[wapfile] opt[ions] pe[rl] pre[serve] promptr[epl] ptl[ast] pw[d] pydo pyxfile red[o] res[ize] ru[ntime] sI sIp sav[eas] sbm[odified] sce scripte[ncoding] setg[lobal] sgc sgr sign sl[eep] smile sor[t] spellr[epall] srI srn startr[eplace] sun[hide] sy tN[ext] tabe[dit] tabnew tc[d] ter[minal] tlmenu tma[p] tr[ewind] u[ndo] unlo[ckvar] verb[ose] vim[grep] wN[ext] winc[md] wq xa[ll] xnoremenu xwininfo
|
||||
syn keyword vimCommand contained addd arge[dit] bN[ext] bel[owright] bp[revious] bro[wse] cNf[ile] cadde[xpr] cbe[fore] cdo cg[etfile] checkt[ime] clo[se] co[py] con[tinue] cq[uit] cuna[bbrev] defc[ompile] deletl dep diffpu[t] dj[ump] dp earlier el[se] endfo[r] exi[t] filet fir[st] foldo[pen] grepa[dd] helpf[ind] i imapc[lear] intro k lN[ext] laddb[uffer] lb[uffer] lcl[ose] leg[acy] lgetb[uffer] ll lne[xt] loc[kmarks] lr[ewind] lv[imgrep] marks mksp[ell] n[ext] noa nu[mber] ownsyntax ped[it] prev[ious] ps[earch] ptn[ext] py3 pyf[ile] q[uit] redi[r] ret[ab] rub[y] sIc sIr sbN[ext] sbn[ext] scg scriptv[ersion] setl[ocal] sge sh[ell] sil[ent] sla[st] sn[ext] sp[lit] spellr[rare] src srp stj[ump] sunme syn ta[g] tabf[ind] tabo[nly] tch[dir] tf[irst] tln tmapc[lear] try una[bbreviate] uns[ilent] vert[ical] vimgrepa[dd] w[rite] windo wqa[ll] xmapc[lear] xprop y[ank]
|
||||
syn keyword vimCommand contained al[l] argg[lobal] b[uffer] bf[irst] br[ewind] bufdo c[hange] caddf[ile] cbel[ow] ce[nter] cgetb[uffer] chi[story] cmapc[lear] col[der] conf[irm] cr[ewind] cw[indow] delc[ommand] deletp di[splay] diffs[plit] dl dr[op] ec elsei[f] endt[ry] exp filetype fix[del] for gui helpg[rep] ia imp is[earch] kee[pmarks] lNf[ile] laddf[ile] lbe[fore] lcs lex[pr] lgete[xpr] lla[st] lnew[er] lockv[ar] ls lvimgrepa[dd] mat[ch] mkv[imrc] nb[key] noautocmd o[pen] p[rint] perld[o] pro ptN[ext] ptp[revious] py3do python3 qa[ll] redr[aw] retu[rn] rubyd[o] sIe sN[ext] sb[uffer] sbp[revious] sci scs sf[ind] sgi si sim[alt] sm[agic] sno[magic] spe[llgood] spellu[ndo] sre[wind] st[op] stopi[nsert] sunmenu sync tab tabfir[st] tabp[revious] tcl th[row] tlnoremenu tn[ext] ts[elect] undoj[oin] up[date] vi[sual]
|
||||
syn match vimCommand contained "\<z[-+^.=]\=\>"
|
||||
syn keyword vimStdPlugin contained Arguments Asm Break Cfilter Clear Continue DiffOrig Evaluate Finish Gdb Lfilter Man N[ext] Over P[rint] Program Run S Source Step Stop Termdebug TermdebugCommand TOhtml Winbar XMLent XMLns
|
||||
|
||||
@@ -78,12 +78,12 @@ syn match vimHLGroup contained "Conceal"
|
||||
syn case match
|
||||
|
||||
" Function Names {{{2
|
||||
syn keyword vimFuncName contained abs argc assert_equal assert_match atan browsedir bufname byteidxcomp charcol ch_evalexpr ch_logfile ch_sendraw complete cos deepcopy echoraw eventhandler exp feedkeys findfile fmod foldlevel funcref getbufline getcharpos getcmdwintype getenv getftype getmarklist getqflist gettabvar getwinpos glob2regpat hasmapto hlexists index inputsave isdirectory job_getchannel job_stop json_encode line listener_flush luaeval mapset matchdelete matchstr mkdir or popup_clear popup_filter_yesno popup_hide popup_notification prevnonblank prompt_setprompt prop_remove prop_type_list pyxeval readdirex reltime remote_peek rename rubyeval screenpos searchdecl serverlist setcharsearch setline setreg sha256 sign_getplaced sign_unplace slice sound_playfile sqrt str2nr strftime strpart submatch synID systemlist taglist term_dumpload term_getcursor term_getstatus term_scrape term_setrestore test_autochdir test_ignore_error test_null_job test_override test_srand_seed timer_start tr undofile visualmode win_execute winheight winnr win_splitmove
|
||||
syn keyword vimFuncName contained acos argidx assert_equalfile assert_nobeep atan2 bufadd bufnr call charidx ch_evalraw ch_open ch_setoptions complete_add cosh delete empty executable expand filereadable flatten fnameescape foldtext function getbufvar getcharsearch getcompletion getfontname getimstatus getmatches getreg gettabwinvar getwinposx globpath histadd hlID input inputsecret isinf job_info join keys line2byte listener_remove map match matchend matchstrpos mode pathshorten popup_close popup_findinfo popup_list popup_setoptions printf prop_add prop_type_add pum_getpos rand readfile reltimefloat remote_read repeat screenattr screenrow searchpair setbufline setcmdpos setloclist settabvar shellescape sign_jump sign_unplacelist sort sound_stop srand strcharlen strgetchar strptime substitute synIDattr tabpagebuflist tan term_dumpwrite term_getjob term_gettitle term_sendkeys term_setsize test_feedinput test_null_blob test_null_list test_refcount test_unknown timer_stop trim undotree wildmenumode win_findbuf win_id2tabwin winrestcmd winwidth
|
||||
syn keyword vimFuncName contained add arglistid assert_exception assert_notequal balloon_gettext bufexists bufwinid ceil ch_canread ch_getbufnr ch_read ch_status complete_check count deletebufline environ execute expandcmd filewritable flattennew fnamemodify foldtextresult garbagecollect getchangelist getcmdline getcurpos getfperm getjumplist getmousepos getreginfo gettagstack getwinposy has histdel hostname inputdialog insert islocked job_setoptions js_decode len lispindent localtime maparg matchadd matchfuzzy max mzeval perleval popup_create popup_findpreview popup_locate popup_settext prompt_getprompt prop_clear prop_type_change pumvisible range reduce reltimestr remote_send resolve screenchar screenstring searchpairpos setbufvar setcursorcharpos setmatches settabwinvar shiftwidth sign_place simplify sound_clear spellbadword state strcharpart stridx strridx swapinfo synIDtrans tabpagenr tanh term_getaltscreen term_getline term_gettty term_setansicolors term_start test_garbagecollect_now test_null_channel test_null_partial test_scrollbar test_void timer_stopall trunc uniq winbufnr win_getid win_id2win winrestview wordcount
|
||||
syn keyword vimFuncName contained and argv assert_fails assert_notmatch balloon_show buflisted bufwinnr changenr ch_close ch_getjob ch_readblob cindent complete_info cscope_connection did_filetype escape exepath extend filter float2nr foldclosed foreground get getchar getcmdpos getcursorcharpos getfsize getline getpid getregtype gettext getwinvar has_key histget iconv inputlist interrupt isnan job_start js_encode libcall list2str log mapcheck matchaddpos matchfuzzypos menu_info nextnonblank popup_atcursor popup_dialog popup_getoptions popup_menu popup_show prompt_setcallback prop_find prop_type_delete py3eval readblob reg_executing remote_expr remote_startserver reverse screenchars search searchpos setcellwidths setenv setpos settagstack sign_define sign_placelist sin soundfold spellsuggest str2float strchars string strtrans swapname synstack tabpagewinnr tempname term_getansicolors term_getscrolled terminalprops term_setapi term_wait test_garbagecollect_soon test_null_dict test_null_string test_setmouse timer_info tolower type values wincol win_gettype winlayout winsaveview writefile
|
||||
syn keyword vimFuncName contained append asin assert_false assert_report balloon_split bufload byte2line char2nr ch_close_in ch_info ch_readraw clearmatches confirm cursor diff_filler eval exists extendnew finddir floor foldclosedend fullcommand getbufinfo getcharmod getcmdtype getcwd getftime getloclist getpos gettabinfo getwininfo glob haslocaldir histnr indent inputrestore invert items job_status json_decode libcallnr listener_add log10 mapnew matcharg matchlist min nr2char popup_beval popup_filter_menu popup_getpos popup_move pow prompt_setinterrupt prop_list prop_type_get pyeval readdir reg_recording remote_foreground remove round screencol searchcount server2client setcharpos setfperm setqflist setwinvar sign_getdefined sign_undefine sinh sound_playevent split str2list strdisplaywidth strlen strwidth synconcealed system tagfiles term_dumpdiff term_getattr term_getsize term_list term_setkill test_alloc_fail test_getvalue test_null_function test_option_not_set test_settime timer_pause toupper typename virtcol windowsversion win_gotoid winline win_screenpos xor
|
||||
syn keyword vimFuncName contained appendbufline assert_beeps assert_inrange assert_true browse bufloaded byteidx charclass chdir ch_log ch_sendexpr col copy debugbreak diff_hlID
|
||||
syn keyword vimFuncName contained abs argc assert_equal assert_match atan browsedir bufname byteidxcomp charcol ch_evalexpr ch_logfile ch_sendraw complete cos deepcopy echoraw executable expand filereadable flatten fnameescape foldtext function getbufvar getcharsearch getcmdwintype getenv getftype getmarklist getqflist gettabvar getwinpos glob2regpat hasmapto hlexists index inputsave isdirectory job_getchannel job_stop json_encode line listener_flush luaeval mapset matchdelete matchstr mkdir or popup_clear popup_filter_yesno popup_hide popup_notification prevnonblank prompt_setprompt prop_remove prop_type_list pyxeval readdirex reltime remote_peek rename rubyeval screenpos searchdecl serverlist setcharsearch setline setreg sha256 sign_getplaced sign_unplace slice sound_playfile sqrt str2nr strftime strpart submatch synID systemlist taglist term_dumpload term_getcursor term_getstatus term_scrape term_setrestore test_autochdir test_ignore_error test_null_job test_override test_srand_seed timer_start tr undofile visualmode win_execute winheight winnr win_splitmove
|
||||
syn keyword vimFuncName contained acos argidx assert_equalfile assert_nobeep atan2 bufadd bufnr call charidx ch_evalraw ch_open ch_setoptions complete_add cosh delete empty execute expandcmd filewritable flattennew fnamemodify foldtextresult garbagecollect getchangelist getcharstr getcompletion getfontname getimstatus getmatches getreg gettabwinvar getwinposx globpath histadd hlID input inputsecret isinf job_info join keys line2byte listener_remove map match matchend matchstrpos mode pathshorten popup_close popup_findinfo popup_list popup_setoptions printf prop_add prop_type_add pum_getpos rand readfile reltimefloat remote_read repeat screenattr screenrow searchpair setbufline setcmdpos setloclist settabvar shellescape sign_jump sign_unplacelist sort sound_stop srand strcharlen strgetchar strptime substitute synIDattr tabpagebuflist tan term_dumpwrite term_getjob term_gettitle term_sendkeys term_setsize test_feedinput test_null_blob test_null_list test_refcount test_unknown timer_stop trim undotree wildmenumode win_findbuf win_id2tabwin winrestcmd winwidth
|
||||
syn keyword vimFuncName contained add arglistid assert_exception assert_notequal balloon_gettext bufexists bufwinid ceil ch_canread ch_getbufnr ch_read ch_status complete_check count deletebufline environ exepath extend filter float2nr foldclosed foreground get getchar getcmdline getcurpos getfperm getjumplist getmousepos getreginfo gettagstack getwinposy has histdel hostname inputdialog insert islocked job_setoptions js_decode len lispindent localtime maparg matchadd matchfuzzy max mzeval perleval popup_create popup_findpreview popup_locate popup_settext prompt_getprompt prop_clear prop_type_change pumvisible range reduce reltimestr remote_send resolve screenchar screenstring searchpairpos setbufvar setcursorcharpos setmatches settabwinvar shiftwidth sign_place simplify sound_clear spellbadword state strcharpart stridx strridx swapinfo synIDtrans tabpagenr tanh term_getaltscreen term_getline term_gettty term_setansicolors term_start test_garbagecollect_now test_null_channel test_null_partial test_scrollbar test_void timer_stopall trunc uniq winbufnr win_getid win_id2win winrestview wordcount
|
||||
syn keyword vimFuncName contained and argv assert_fails assert_notmatch balloon_show buflisted bufwinnr changenr ch_close ch_getjob ch_readblob cindent complete_info cscope_connection did_filetype escape exists extendnew finddir floor foldclosedend fullcommand getbufinfo getcharmod getcmdpos getcursorcharpos getfsize getline getpid getregtype gettext getwinvar has_key histget iconv inputlist interrupt isnan job_start js_encode libcall list2str log mapcheck matchaddpos matchfuzzypos menu_info nextnonblank popup_atcursor popup_dialog popup_getoptions popup_menu popup_show prompt_setcallback prop_find prop_type_delete py3eval readblob reg_executing remote_expr remote_startserver reverse screenchars search searchpos setcellwidths setenv setpos settagstack sign_define sign_placelist sin soundfold spellsuggest str2float strchars string strtrans swapname synstack tabpagewinnr tempname term_getansicolors term_getscrolled terminalprops term_setapi term_wait test_garbagecollect_soon test_null_dict test_null_string test_setmouse timer_info tolower type values wincol win_gettype winlayout winsaveview writefile
|
||||
syn keyword vimFuncName contained append asin assert_false assert_report balloon_split bufload byte2line char2nr ch_close_in ch_info ch_readraw clearmatches confirm cursor diff_filler eval exp feedkeys findfile fmod foldlevel funcref getbufline getcharpos getcmdtype getcwd getftime getloclist getpos gettabinfo getwininfo glob haslocaldir histnr indent inputrestore invert items job_status json_decode libcallnr listener_add log10 mapnew matcharg matchlist min nr2char popup_beval popup_filter_menu popup_getpos popup_move pow prompt_setinterrupt prop_list prop_type_get pyeval readdir reg_recording remote_foreground remove round screencol searchcount server2client setcharpos setfperm setqflist setwinvar sign_getdefined sign_undefine sinh sound_playevent split str2list strdisplaywidth strlen strwidth synconcealed system tagfiles term_dumpdiff term_getattr term_getsize term_list term_setkill test_alloc_fail test_getvalue test_null_function test_option_not_set test_settime timer_pause toupper typename virtcol windowsversion win_gotoid winline win_screenpos xor
|
||||
syn keyword vimFuncName contained appendbufline assert_beeps assert_inrange assert_true browse bufloaded byteidx charclass chdir ch_log ch_sendexpr col copy debugbreak diff_hlID eventhandler
|
||||
|
||||
"--- syntax here and above generated by mkvimvim ---
|
||||
" Special Vim Highlighting (not automatic) {{{1
|
||||
@@ -227,7 +227,7 @@ syn keyword vimAugroupKey contained aug[roup]
|
||||
|
||||
" Operators: {{{2
|
||||
" =========
|
||||
syn cluster vimOperGroup contains=vimEnvvar,vimFunc,vimFuncVar,vimOper,vimOperParen,vimNumber,vimString,vimRegister,vimContinue,vim9Comment
|
||||
syn cluster vimOperGroup contains=vimEnvvar,vimFunc,vimFuncVar,vimOper,vimOperParen,vimNumber,vimString,vimType,vimRegister,vimContinue,vim9Comment
|
||||
syn match vimOper "\%#=1\(==\|!=\|>=\|<=\|=\~\|!\~\|>\|<\|=\)[?#]\{0,2}" skipwhite nextgroup=vimString,vimSpecFile
|
||||
syn match vimOper "\(\<is\|\<isnot\)[?#]\{0,2}\>" skipwhite nextgroup=vimString,vimSpecFile
|
||||
syn match vimOper "||\|&&\|[-+.!]" skipwhite nextgroup=vimString,vimSpecFile
|
||||
@@ -241,12 +241,13 @@ endif
|
||||
" =========
|
||||
syn cluster vimFuncList contains=vimCommand,vimFunctionError,vimFuncKey,Tag,vimFuncSID
|
||||
syn cluster vimFuncBodyList contains=vimAbb,vimAddress,vimAugroupKey,vimAutoCmd,vimCmplxRepeat,vimComment,vim9Comment,vimContinue,vimCtrlChar,vimEcho,vimEchoHL,vimEnvvar,vimExecute,vimIsCommand,vimFBVar,vimFunc,vimFunction,vimFuncVar,vimGlobal,vimHighlight,vimIsCommand,vimLet,vimLetHereDoc,vimLineComment,vimMap,vimMark,vimNorm,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegion,vimRegister,vimSearch,vimSet,vimSpecFile,vimString,vimSubst,vimSynLine,vimUnmap,vimUserCommand
|
||||
syn match vimFunction "\<\(fu\%[nction]\|def\)!\=\s\+\%(<[sS][iI][dD]>\|[sSgGbBwWtTlL]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)*\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody
|
||||
syn match vimFunction "\<\(fu\%[nction]\)!\=\s\+\%(<[sS][iI][dD]>\|[sSgGbBwWtTlL]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)*\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody
|
||||
syn match vimFunction "\<def!\=\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody
|
||||
|
||||
if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'f'
|
||||
syn region vimFuncBody contained fold start="\ze\s*(" matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\|enddef\>\)" contains=@vimFuncBodyList
|
||||
else
|
||||
syn region vimFuncBody contained start="\ze\s*(" matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\|enddef\>\)" contains=@vimFuncBodyList
|
||||
syn region vimFuncBody contained start="\ze\s*(" matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\|enddef\>\)" contains=@vimFuncBodyList
|
||||
endif
|
||||
syn match vimFuncVar contained "a:\(\K\k*\|\d\+\)"
|
||||
syn match vimFuncSID contained "\c<sid>\|\<s:"
|
||||
@@ -256,6 +257,9 @@ syn match vimFuncBlank contained "\s\+"
|
||||
|
||||
syn keyword vimPattern contained start skip end
|
||||
|
||||
" vimTypes : new for vim9
|
||||
syn match vimType ":\s*\zs\<\(bool\|number\|float\|string\|blob\|list<\|dict<\|job\|channel\|func\)\>"
|
||||
|
||||
" Special Filenames, Modifiers, Extension Removal: {{{2
|
||||
" ===============================================
|
||||
syn match vimSpecFile "<c\(word\|WORD\)>" nextgroup=vimSpecFileMod,vimSubst
|
||||
@@ -384,7 +388,7 @@ syn match vimCmplxRepeat '[^a-zA-Z_/\\()]q[0-9a-zA-Z"]\>'lc=1
|
||||
syn match vimCmplxRepeat '@[0-9a-z".=@:]\ze\($\|[^a-zA-Z]\>\)'
|
||||
|
||||
" Set command and associated set-options (vimOptions) with comment {{{2
|
||||
syn region vimSet matchgroup=vimCommand start="\<\%(setl\%[ocal]\|setg\%[lobal]\|se\%[t]\)\>" skip="\%(\\\\\)*\\." end="$" end="|" matchgroup=vimNotation end="<[cC][rR]>" oneline keepend contains=vimSetEqual,vimOption,vimErrSetting,vimComment,vim9Comment,vimSetString,vimSetMod
|
||||
syn region vimSet matchgroup=vimCommand start="\<\%(setl\%[ocal]\|setg\%[lobal]\|se\%[t]\)\>" skip="\%(\\\\\)*\\.\n\@!" end="$" end="|" matchgroup=vimNotation end="<[cC][rR]>" keepend contains=vimSetEqual,vimOption,vimErrSetting,vimComment,vim9Comment,vimSetString,vimSetMod
|
||||
syn region vimSetEqual contained start="[=:]\|[-+^]=" skip="\\\\\|\\\s" end="[| \t]"me=e-1 end="$" contains=vimCtrlChar,vimSetSep,vimNotation,vimEnvvar
|
||||
syn region vimSetString contained start=+="+hs=s+1 skip=+\\\\\|\\"+ end=+"+ contains=vimCtrlChar
|
||||
syn match vimSetSep contained "[,:]"
|
||||
@@ -419,7 +423,7 @@ syn case match
|
||||
" Maps: {{{2
|
||||
" ====
|
||||
syn match vimMap "\<map\>!\=\ze\s*[^(]" skipwhite nextgroup=vimMapMod,vimMapLhs
|
||||
syn keyword vimMap cm[ap] cno[remap] im[ap] ino[remap] lm[ap] ln[oremap] nm[ap] nn[oremap] no[remap] om[ap] ono[remap] smap snor[emap] tno[remap] tm[ap] vm[ap] vn[oremap] xm[ap] xn[oremap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs
|
||||
syn keyword vimMap cm[ap] cno[remap] im[ap] ino[remap] lm[ap] ln[oremap] nm[ap] nn[oremap] no[remap] om[ap] ono[remap] smap snor[emap] tno[remap] tm[ap] vm[ap] vmapc[lear] vn[oremap] xm[ap] xn[oremap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs
|
||||
syn keyword vimMap mapc[lear] smapc[lear]
|
||||
syn keyword vimUnmap cu[nmap] iu[nmap] lu[nmap] nun[map] ou[nmap] sunm[ap] tunma[p] unm[ap] unm[ap] vu[nmap] xu[nmap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs
|
||||
syn match vimMapLhs contained "\S\+" contains=vimNotation,vimCtrlChar skipwhite nextgroup=vimMapRhs
|
||||
@@ -1002,6 +1006,7 @@ if !exists("skip_vim_syntax_inits")
|
||||
hi def link vimSyntax vimCommand
|
||||
hi def link vimSynType vimSpecial
|
||||
hi def link vimTodo Todo
|
||||
hi def link vimType Type
|
||||
hi def link vimUnmap vimMap
|
||||
hi def link vimUserAttrbCmpltFunc Special
|
||||
hi def link vimUserAttrbCmplt vimSpecial
|
||||
|
||||
@@ -195,6 +195,13 @@ func! BuildWidthTable(pattern, tableName)
|
||||
let end = -1
|
||||
let ranges = []
|
||||
let dataidx = 0
|
||||
" Account for indentation differences between ambiguous and doublewidth
|
||||
" table in mbyte.c
|
||||
if a:pattern == 'A'
|
||||
let spc = ' '
|
||||
else
|
||||
let spc = "\t"
|
||||
endif
|
||||
for p in s:widthprops
|
||||
if p[1][0] =~ a:pattern
|
||||
if p[0] =~ '\.\.'
|
||||
@@ -229,7 +236,7 @@ func! BuildWidthTable(pattern, tableName)
|
||||
else
|
||||
if start >= 0
|
||||
" produce previous range
|
||||
call add(ranges, printf("\t{0x%04x, 0x%04x},", start, end))
|
||||
call add(ranges, printf("%s{0x%04x, 0x%04x},", spc, start, end))
|
||||
if a:pattern == 'A'
|
||||
call add(s:ambitable, [start, end])
|
||||
else
|
||||
@@ -243,7 +250,7 @@ func! BuildWidthTable(pattern, tableName)
|
||||
endif
|
||||
endfor
|
||||
if start >= 0
|
||||
call add(ranges, printf("\t{0x%04x, 0x%04x},", start, end))
|
||||
call add(ranges, printf("%s{0x%04x, 0x%04x},", spc, start, end))
|
||||
if a:pattern == 'A'
|
||||
call add(s:ambitable, [start, end])
|
||||
else
|
||||
@@ -254,11 +261,20 @@ func! BuildWidthTable(pattern, tableName)
|
||||
" New buffer to put the result in.
|
||||
new
|
||||
exe "file " . a:tableName
|
||||
call setline(1, " static struct interval " . a:tableName . "[] =")
|
||||
call setline(2, " {")
|
||||
if a:pattern == 'A'
|
||||
call setline(1, "static struct interval " . a:tableName . "[] =")
|
||||
call setline(2, "{")
|
||||
else
|
||||
call setline(1, " static struct interval " . a:tableName . "[] =")
|
||||
call setline(2, " {")
|
||||
endif
|
||||
call append('$', ranges)
|
||||
call setline('$', getline('$')[:-2]) " remove last comma
|
||||
call setline(line('$') + 1, " };")
|
||||
if a:pattern == 'A'
|
||||
call setline(line('$') + 1, "};")
|
||||
else
|
||||
call setline(line('$') + 1, " };")
|
||||
endif
|
||||
wincmd p
|
||||
endfunc
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
Name[de]=Vim
|
||||
Name[eo]=Vim
|
||||
Name[fr]=Vim
|
||||
Name[it]=Vim
|
||||
Name[ru]=Vim
|
||||
Name[sr]=Vim
|
||||
Name[tr]=Vim
|
||||
@@ -13,6 +14,7 @@ Name=Vim
|
||||
GenericName[de]=Texteditor
|
||||
GenericName[eo]=Tekstoredaktilo
|
||||
GenericName[fr]=Éditeur de texte
|
||||
GenericName[it]=Editor di testi
|
||||
GenericName[ja]=テキストエディタ
|
||||
GenericName[ru]=Текстовый редактор
|
||||
GenericName[sr]=Едитор текст
|
||||
@@ -22,6 +24,7 @@ GenericName=Text Editor
|
||||
Comment[de]=Textdateien bearbeiten
|
||||
Comment[eo]=Redakti tekstajn dosierojn
|
||||
Comment[fr]=Éditer des fichiers texte
|
||||
Comment[it]=Edita file di testo
|
||||
Comment[ja]=テキストファイルを編集します
|
||||
Comment[ru]=Редактирование текстовых файлов
|
||||
Comment[sr]=Уређујте текст фајлове
|
||||
@@ -60,7 +63,6 @@ Comment[hr]=Uređivanje tekstualne datoteke
|
||||
Comment[hu]=Szövegfájlok szerkesztése
|
||||
Comment[id]=Edit file teks
|
||||
Comment[is]=Vinna með textaskrár
|
||||
Comment[it]=Modifica file di testo
|
||||
Comment[kn]=ಪಠ್ಯ ಕಡತಗಳನ್ನು ಸಂಪಾದಿಸು
|
||||
Comment[ko]=텍스트 파일을 편집합니다
|
||||
Comment[lt]=Redaguoti tekstines bylas
|
||||
@@ -102,6 +104,7 @@ Type=Application
|
||||
Keywords[de]=Text;Editor;
|
||||
Keywords[eo]=Teksto;redaktilo;
|
||||
Keywords[fr]=Texte;éditeur;
|
||||
Keywords[it]=Testo;editor;
|
||||
Keywords[ja]=テキスト;エディタ;
|
||||
Keywords[ru]=текст;текстовый редактор;
|
||||
Keywords[sr]=Текст;едитор;
|
||||
@@ -111,7 +114,9 @@ Keywords=Text;editor;
|
||||
Icon[de]=gvim
|
||||
Icon[eo]=gvim
|
||||
Icon[fr]=gvim
|
||||
Icon[it]=gvim
|
||||
Icon[ru]=gvim
|
||||
Icon[sr]=gvim
|
||||
Icon=gvim
|
||||
Categories=Utility;TextEditor;
|
||||
StartupNotify=false
|
||||
|
||||
@@ -284,7 +284,8 @@ open the window from the start menu, MSYS2 64 bit / MSYS2 MSYS.
|
||||
Execute:
|
||||
$ pacman -Syu
|
||||
|
||||
And restart MSYS2 console (select "MSYS2 MSYS" icon from the Start Menu).
|
||||
And restart MSYS2 console (select "MSYS2 MSYS 32-Bit" icon from the Start
|
||||
Menu for building 32 bit Vim, otherwise select "MSYS2 MinGW 64-Bit").
|
||||
Then execute:
|
||||
$ pacman -Su
|
||||
|
||||
@@ -321,6 +322,9 @@ MSYS2 has its own git package, and you can also install it via pacman:
|
||||
|
||||
$ pacman -S git
|
||||
|
||||
For enabling libsodium support, you also need to install the package
|
||||
|
||||
$ pacman -S mingw-w64-x86_64-libsodium
|
||||
|
||||
2.3. Keep the build environment up-to-date
|
||||
|
||||
|
||||
@@ -162,6 +162,7 @@ SRC += \
|
||||
spell.c \
|
||||
spellfile.c \
|
||||
spellsuggest.c \
|
||||
strings.c \
|
||||
syntax.c \
|
||||
tag.c \
|
||||
term.c \
|
||||
|
||||
@@ -41,6 +41,9 @@ DEBUG=no
|
||||
# set to yes to measure code coverage
|
||||
COVERAGE=no
|
||||
|
||||
# better encryption support using libsodium
|
||||
#SODIUM=yes
|
||||
|
||||
# set to SIZE for size, SPEED for speed, MAXSPEED for maximum optimization
|
||||
OPTIMIZE=MAXSPEED
|
||||
|
||||
@@ -517,6 +520,10 @@ CXXFLAGS = -std=gnu++11
|
||||
WINDRES_FLAGS =
|
||||
EXTRA_LIBS =
|
||||
|
||||
ifdef SODIUM
|
||||
DEFINES += -DHAVE_SODIUM
|
||||
endif
|
||||
|
||||
ifdef GETTEXT
|
||||
DEFINES += -DHAVE_GETTEXT -DHAVE_LOCALE_H
|
||||
GETTEXTINCLUDE = $(GETTEXT)/include
|
||||
@@ -660,6 +667,10 @@ DEFINES += -DFEAT_DIRECTX_COLOR_EMOJI
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(SODIUM),yes)
|
||||
SODIUMLIB = -lsodium
|
||||
endif
|
||||
|
||||
# Only allow XPM for a GUI build.
|
||||
ifeq (yes, $(GUI))
|
||||
|
||||
@@ -798,6 +809,7 @@ OBJ = \
|
||||
$(OUTDIR)/spell.o \
|
||||
$(OUTDIR)/spellfile.o \
|
||||
$(OUTDIR)/spellsuggest.o \
|
||||
$(OUTDIR)/strings.o \
|
||||
$(OUTDIR)/syntax.o \
|
||||
$(OUTDIR)/tag.o \
|
||||
$(OUTDIR)/term.o \
|
||||
@@ -1064,7 +1076,7 @@ $(EXEOBJC): | $(OUTDIR)
|
||||
|
||||
ifeq ($(VIMDLL),yes)
|
||||
$(TARGET): $(OBJ)
|
||||
$(LINK) $(CFLAGS) $(LFLAGS) -o $@ $(OBJ) $(LIB) -lole32 -luuid -lgdi32 $(LUA_LIB) $(MZSCHEME_LIBDIR) $(MZSCHEME_LIB) $(PYTHONLIB) $(PYTHON3LIB) $(RUBYLIB)
|
||||
$(LINK) $(CFLAGS) $(LFLAGS) -o $@ $(OBJ) $(LIB) -lole32 -luuid -lgdi32 $(LUA_LIB) $(MZSCHEME_LIBDIR) $(MZSCHEME_LIB) $(PYTHONLIB) $(PYTHON3LIB) $(RUBYLIB) $(SODIUMLIB)
|
||||
|
||||
$(GVIMEXE): $(EXEOBJG) $(VIMDLLBASE).dll
|
||||
$(CC) -L. $(EXELFLAGS) -mwindows -o $@ $(EXEOBJG) -l$(VIMDLLBASE)
|
||||
@@ -1073,7 +1085,7 @@ $(VIMEXE): $(EXEOBJC) $(VIMDLLBASE).dll
|
||||
$(CC) -L. $(EXELFLAGS) -o $@ $(EXEOBJC) -l$(VIMDLLBASE)
|
||||
else
|
||||
$(TARGET): $(OBJ)
|
||||
$(LINK) $(CFLAGS) $(LFLAGS) -o $@ $(OBJ) $(LIB) -lole32 -luuid $(LUA_LIB) $(MZSCHEME_LIBDIR) $(MZSCHEME_LIB) $(PYTHONLIB) $(PYTHON3LIB) $(RUBYLIB)
|
||||
$(LINK) $(CFLAGS) $(LFLAGS) -o $@ $(OBJ) $(LIB) -lole32 -luuid $(LUA_LIB) $(MZSCHEME_LIBDIR) $(MZSCHEME_LIB) $(PYTHONLIB) $(PYTHON3LIB) $(RUBYLIB) $(SODIUMLIB)
|
||||
endif
|
||||
|
||||
upx: exes
|
||||
|
||||
@@ -41,6 +41,13 @@
|
||||
#
|
||||
# Sound support: SOUND=yes (default is yes)
|
||||
#
|
||||
# Sodium support: SODIUM=[Path to Sodium directory]
|
||||
# Dynamic built with libsodium
|
||||
# You need to install the msvc package from
|
||||
# https://download.libsodium.org/libsodium/releases/
|
||||
# and package the libsodium.dll with Vim
|
||||
#
|
||||
#
|
||||
# DLL support (EXPERIMENTAL): VIMDLL=yes (default is no)
|
||||
# Creates vim{32,64}.dll, and stub gvim.exe and vim.exe.
|
||||
# The shared codes between the GUI and the console are built into
|
||||
@@ -372,6 +379,26 @@ SOUND = no
|
||||
! endif
|
||||
!endif
|
||||
|
||||
!ifndef SODIUM
|
||||
SODIUM = no
|
||||
!endif
|
||||
|
||||
!if "$(SODIUM)" != "no"
|
||||
! if "$(CPU)" == "AMD64"
|
||||
SOD_LIB = $(SODIUM)\x64\Release\v140\dynamic
|
||||
! elseif "$(CPU)" == "i386"
|
||||
SOD_LIB = $(SODIUM)\Win32\Release\v140\dynamic
|
||||
! else
|
||||
SODIUM = no
|
||||
! endif
|
||||
!endif
|
||||
|
||||
!if "$(SODIUM)" != "no"
|
||||
SOD_INC = /I "$(SODIUM)\include"
|
||||
SOD_DEFS = -DFEAT_SODIUM
|
||||
SOD_LIB = $(SOD_LIB)\libsodium.lib
|
||||
!endif
|
||||
|
||||
!ifndef NETBEANS
|
||||
NETBEANS = $(GUI)
|
||||
!endif
|
||||
@@ -491,7 +518,7 @@ CON_LIB = $(CON_LIB) /DELAYLOAD:comdlg32.dll /DELAYLOAD:ole32.dll DelayImp.lib
|
||||
|
||||
CFLAGS = -c /W3 /GF /nologo $(CVARS) -I. -Iproto -DHAVE_PATHDEF -DWIN32 \
|
||||
$(CSCOPE_DEFS) $(TERM_DEFS) $(SOUND_DEFS) $(NETBEANS_DEFS) $(CHANNEL_DEFS) \
|
||||
$(NBDEBUG_DEFS) $(XPM_DEFS) \
|
||||
$(NBDEBUG_DEFS) $(XPM_DEFS) $(SOD_DEFS) $(SOD_INC) \
|
||||
$(DEFINES) -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER)
|
||||
|
||||
#>>>>> end of choices
|
||||
@@ -792,6 +819,7 @@ OBJ = \
|
||||
$(OUTDIR)\spell.obj \
|
||||
$(OUTDIR)\spellfile.obj \
|
||||
$(OUTDIR)\spellsuggest.obj \
|
||||
$(OUTDIR)\strings.obj \
|
||||
$(OUTDIR)\syntax.obj \
|
||||
$(OUTDIR)\tag.obj \
|
||||
$(OUTDIR)\term.obj \
|
||||
@@ -1282,7 +1310,7 @@ conflags = $(conflags) /map /mapinfo:lines
|
||||
LINKARGS1 = $(linkdebug) $(conflags)
|
||||
LINKARGS2 = $(CON_LIB) $(GUI_LIB) $(NODEFAULTLIB) $(LIBC) $(OLE_LIB) user32.lib \
|
||||
$(LUA_LIB) $(MZSCHEME_LIB) $(PERL_LIB) $(PYTHON_LIB) $(PYTHON3_LIB) $(RUBY_LIB) \
|
||||
$(TCL_LIB) $(SOUND_LIB) $(NETBEANS_LIB) $(XPM_LIB) $(LINK_PDB)
|
||||
$(TCL_LIB) $(SOUND_LIB) $(NETBEANS_LIB) $(XPM_LIB) $(SOD_LIB) $(LINK_PDB)
|
||||
|
||||
# Report link time code generation progress if used.
|
||||
!ifdef NODEBUG
|
||||
@@ -1765,6 +1793,8 @@ $(OUTDIR)/spellfile.obj: $(OUTDIR) spellfile.c $(INCL)
|
||||
|
||||
$(OUTDIR)/spellsuggest.obj: $(OUTDIR) spellsuggest.c $(INCL)
|
||||
|
||||
$(OUTDIR)/strings.obj: $(OUTDIR) strings.c $(INCL)
|
||||
|
||||
$(OUTDIR)/syntax.obj: $(OUTDIR) syntax.c $(INCL)
|
||||
|
||||
$(OUTDIR)/tag.obj: $(OUTDIR) tag.c $(INCL)
|
||||
@@ -1985,6 +2015,7 @@ proto.h: \
|
||||
proto/spell.pro \
|
||||
proto/spellfile.pro \
|
||||
proto/spellsuggest.pro \
|
||||
proto/strings.pro \
|
||||
proto/syntax.pro \
|
||||
proto/tag.pro \
|
||||
proto/term.pro \
|
||||
|
||||
@@ -393,6 +393,7 @@ SRC = \
|
||||
spell.c \
|
||||
spellfile.c \
|
||||
spellsuggest.c \
|
||||
strings.c \
|
||||
syntax.c \
|
||||
tag.c \
|
||||
term.c \
|
||||
@@ -512,6 +513,7 @@ OBJ = \
|
||||
spell.obj \
|
||||
spellfile.obj \
|
||||
spellsuggest.obj \
|
||||
strings.obj \
|
||||
syntax.obj \
|
||||
tag.obj \
|
||||
term.obj \
|
||||
@@ -1048,6 +1050,10 @@ spellsuggest.obj : spellsuggest.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h \
|
||||
regexp.h gui.h beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h \
|
||||
proto.h errors.h globals.h
|
||||
strings.obj : strings.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h \
|
||||
regexp.h gui.h beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h \
|
||||
proto.h errors.h globals.h
|
||||
syntax.obj : syntax.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h term.h macros.h structs.h regexp.h \
|
||||
gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
|
||||
|
||||
10
src/Makefile
10
src/Makefile
@@ -1677,6 +1677,7 @@ BASIC_SRC = \
|
||||
spell.c \
|
||||
spellfile.c \
|
||||
spellsuggest.c \
|
||||
strings.c \
|
||||
syntax.c \
|
||||
tag.c \
|
||||
term.c \
|
||||
@@ -1828,6 +1829,7 @@ OBJ_COMMON = \
|
||||
objects/spell.o \
|
||||
objects/spellfile.o \
|
||||
objects/spellsuggest.o \
|
||||
objects/strings.o \
|
||||
objects/syntax.o \
|
||||
objects/tag.o \
|
||||
objects/term.o \
|
||||
@@ -2011,6 +2013,7 @@ PRO_AUTO = \
|
||||
spell.pro \
|
||||
spellfile.pro \
|
||||
spellsuggest.pro \
|
||||
strings.pro \
|
||||
syntax.pro \
|
||||
tag.pro \
|
||||
term.pro \
|
||||
@@ -3516,6 +3519,9 @@ objects/spellfile.o: spellfile.c
|
||||
objects/spellsuggest.o: spellsuggest.c
|
||||
$(CCC) -o $@ spellsuggest.c
|
||||
|
||||
objects/strings.o: strings.c
|
||||
$(CCC) -o $@ strings.c
|
||||
|
||||
objects/syntax.o: syntax.c
|
||||
$(CCC) -o $@ syntax.c
|
||||
|
||||
@@ -4049,6 +4055,10 @@ objects/spellsuggest.o: spellsuggest.c vim.h protodef.h auto/config.h feature.h
|
||||
os_unix.h auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
|
||||
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
|
||||
proto.h errors.h globals.h
|
||||
objects/strings.o: strings.c vim.h protodef.h auto/config.h feature.h os_unix.h \
|
||||
auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
|
||||
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
|
||||
proto.h errors.h globals.h
|
||||
objects/syntax.o: syntax.c vim.h protodef.h auto/config.h feature.h os_unix.h \
|
||||
auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
|
||||
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
|
||||
|
||||
@@ -80,6 +80,7 @@ sign.c | signs
|
||||
spell.c | spell checking core
|
||||
spellfile.c | spell file handling
|
||||
spellsuggest.c | spell correction suggestions
|
||||
strings.c | string manipulation functions
|
||||
syntax.c | syntax and other highlighting
|
||||
tag.c | tags
|
||||
term.c | terminal handling, termcap codes
|
||||
|
||||
@@ -213,7 +213,7 @@ Troubleshooting
|
||||
Cause: You can't delete an item you once added to the add-ins
|
||||
list box.
|
||||
Explanation: M$ just didn't put a 'delete' button in the dialog box.
|
||||
Unfortunately there is no DEL key accellerator as well...
|
||||
Unfortunately there is no DEL key accelerator as well...
|
||||
Workaround: You can't kill it, but you can knock it out:
|
||||
1. Uncheck the check box in front of 'Vim Developer Studio
|
||||
Add-in'.
|
||||
|
||||
@@ -832,7 +832,7 @@ ex_argdelete(exarg_T *eap)
|
||||
{
|
||||
// Don't give an error for ":%argdel" if the list is empty.
|
||||
if (eap->line1 != 1 || eap->line2 != 0)
|
||||
emsg(_(e_invrange));
|
||||
emsg(_(e_invalid_range));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -920,7 +920,7 @@ do_arg_all(
|
||||
#ifdef FEAT_CMDWIN
|
||||
if (cmdwin_type != 0)
|
||||
{
|
||||
emsg(_(e_cmdwin));
|
||||
emsg(_(e_invalid_in_cmdline_window));
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
@@ -1271,6 +1271,9 @@ f_argc(typval_T *argvars, typval_T *rettv)
|
||||
{
|
||||
win_T *wp;
|
||||
|
||||
if (in_vim9script() && check_for_opt_number_arg(argvars, 0) == FAIL)
|
||||
return;
|
||||
|
||||
if (argvars[0].v_type == VAR_UNKNOWN)
|
||||
// use the current window
|
||||
rettv->vval.v_number = ARGCOUNT;
|
||||
@@ -1306,6 +1309,12 @@ f_arglistid(typval_T *argvars, typval_T *rettv)
|
||||
{
|
||||
win_T *wp;
|
||||
|
||||
if (in_vim9script()
|
||||
&& (check_for_opt_number_arg(argvars, 0) == FAIL
|
||||
|| (argvars[0].v_type != VAR_UNKNOWN
|
||||
&& check_for_opt_number_arg(argvars, 1) == FAIL)))
|
||||
return;
|
||||
|
||||
rettv->vval.v_number = -1;
|
||||
wp = find_tabwin(&argvars[0], &argvars[1], NULL);
|
||||
if (wp != NULL)
|
||||
@@ -1336,6 +1345,12 @@ f_argv(typval_T *argvars, typval_T *rettv)
|
||||
aentry_T *arglist = NULL;
|
||||
int argcount = -1;
|
||||
|
||||
if (in_vim9script()
|
||||
&& (check_for_opt_number_arg(argvars, 0) == FAIL
|
||||
|| (argvars[0].v_type != VAR_UNKNOWN
|
||||
&& check_for_opt_number_arg(argvars, 1) == FAIL)))
|
||||
return;
|
||||
|
||||
if (argvars[0].v_type != VAR_UNKNOWN)
|
||||
{
|
||||
if (argvars[1].v_type == VAR_UNKNOWN)
|
||||
|
||||
66
src/auto/configure
vendored
66
src/auto/configure
vendored
@@ -839,6 +839,7 @@ with_motif_lib
|
||||
with_tlib
|
||||
enable_largefile
|
||||
enable_canberra
|
||||
enable_libsodium
|
||||
enable_acl
|
||||
enable_gpm
|
||||
enable_sysmouse
|
||||
@@ -1513,6 +1514,7 @@ Optional Features:
|
||||
--disable-desktop-database-update update disabled
|
||||
--disable-largefile omit support for large files
|
||||
--disable-canberra Do not use libcanberra.
|
||||
--disable-libsodium Do not use libsodium.
|
||||
--disable-acl No check for ACL support.
|
||||
--disable-gpm Don't use gpm (Linux mouse daemon).
|
||||
--disable-sysmouse Don't use sysmouse (mouse in *BSD console).
|
||||
@@ -13005,6 +13007,70 @@ rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-libsodium argument" >&5
|
||||
$as_echo_n "checking --enable-libsodium argument... " >&6; }
|
||||
# Check whether --enable-libsodium was given.
|
||||
if test "${enable_libsodium+set}" = set; then :
|
||||
enableval=$enable_libsodium;
|
||||
else
|
||||
enable_libsodium="maybe"
|
||||
fi
|
||||
|
||||
|
||||
if test "$enable_libsodium" = "maybe"; then
|
||||
if test "$features" = "big" -o "$features" = "huge"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Defaulting to yes" >&5
|
||||
$as_echo "Defaulting to yes" >&6; }
|
||||
enable_libsodium="yes"
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Defaulting to no" >&5
|
||||
$as_echo "Defaulting to no" >&6; }
|
||||
enable_libsodium="no"
|
||||
fi
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_libsodium" >&5
|
||||
$as_echo "$enable_libsodium" >&6; }
|
||||
fi
|
||||
if test "$enable_libsodium" = "yes"; then
|
||||
if test "x$PKG_CONFIG" != "xno"; then
|
||||
libsodium_lib=`$PKG_CONFIG --libs libsodium 2>/dev/null`
|
||||
libsodium_cflags=`$PKG_CONFIG --cflags libsodium 2>/dev/null`
|
||||
fi
|
||||
if test "x$libsodium_lib" = "x"; then
|
||||
libsodium_lib=-lsodium
|
||||
libsodium_cflags=
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libsodium" >&5
|
||||
$as_echo_n "checking for libsodium... " >&6; }
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
ac_save_LIBS="$LIBS"
|
||||
CFLAGS="$CFLAGS $libsodium_cflags"
|
||||
LIBS="$LIBS $libsodium_lib"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
# include <sodium.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
printf("%d", sodium_init());
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }; $as_echo "#define HAVE_SODIUM 1" >>confdefs.h
|
||||
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no; try installing libsodium-dev" >&5
|
||||
$as_echo "no; try installing libsodium-dev" >&6; }; CFLAGS="$ac_save_CFLAGS"; LIBS="$ac_save_LIBS"
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_blksize" >&5
|
||||
$as_echo_n "checking for st_blksize... " >&6; }
|
||||
|
||||
@@ -415,9 +415,10 @@ blob_set_range(blob_T *dest, long n1, long n2, typval_T *src)
|
||||
blob_remove(typval_T *argvars, typval_T *rettv)
|
||||
{
|
||||
int error = FALSE;
|
||||
long idx = (long)tv_get_number_chk(&argvars[1], &error);
|
||||
long idx;
|
||||
long end;
|
||||
|
||||
idx = (long)tv_get_number_chk(&argvars[1], &error);
|
||||
if (!error)
|
||||
{
|
||||
blob_T *b = argvars[0].vval.v_blob;
|
||||
|
||||
@@ -596,7 +596,8 @@ crypt_blowfish_encode(
|
||||
cryptstate_T *state,
|
||||
char_u *from,
|
||||
size_t len,
|
||||
char_u *to)
|
||||
char_u *to,
|
||||
int last UNUSED)
|
||||
{
|
||||
bf_state_T *bfs = state->method_state;
|
||||
size_t i;
|
||||
@@ -619,7 +620,8 @@ crypt_blowfish_decode(
|
||||
cryptstate_T *state,
|
||||
char_u *from,
|
||||
size_t len,
|
||||
char_u *to)
|
||||
char_u *to,
|
||||
int last UNUSED)
|
||||
{
|
||||
bf_state_T *bfs = state->method_state;
|
||||
size_t i;
|
||||
@@ -680,5 +682,4 @@ blowfish_self_test(void)
|
||||
}
|
||||
return OK;
|
||||
}
|
||||
|
||||
#endif // FEAT_CRYPT
|
||||
|
||||
14
src/buffer.c
14
src/buffer.c
@@ -1130,7 +1130,12 @@ handle_swap_exists(bufref_T *old_curbuf)
|
||||
close_buffer(curwin, curbuf, DOBUF_UNLOAD, FALSE, FALSE);
|
||||
if (old_curbuf == NULL || !bufref_valid(old_curbuf)
|
||||
|| old_curbuf->br_buf == curbuf)
|
||||
{
|
||||
// Block autocommands here because curwin->w_buffer is NULL.
|
||||
block_autocmds();
|
||||
buf = buflist_new(NULL, NULL, 1L, BLN_CURBUF | BLN_LISTED);
|
||||
unblock_autocmds();
|
||||
}
|
||||
else
|
||||
buf = old_curbuf->br_buf;
|
||||
if (buf != NULL)
|
||||
@@ -1937,7 +1942,7 @@ no_write_message(void)
|
||||
emsg(_("E948: Job still running (add ! to end the job)"));
|
||||
else
|
||||
#endif
|
||||
emsg(_("E37: No write since last change (add ! to override)"));
|
||||
emsg(_(e_no_write_since_last_change_add_bang_to_override));
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1948,7 +1953,7 @@ no_write_message_nobang(buf_T *buf UNUSED)
|
||||
emsg(_("E948: Job still running"));
|
||||
else
|
||||
#endif
|
||||
emsg(_("E37: No write since last change"));
|
||||
emsg(_(e_no_write_since_last_change));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2379,6 +2384,7 @@ free_buf_options(
|
||||
#endif
|
||||
clear_string_option(&buf->b_p_bkc);
|
||||
clear_string_option(&buf->b_p_menc);
|
||||
clear_string_option(&buf->b_p_ve);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2407,7 +2413,7 @@ buflist_getfile(
|
||||
if (buf == NULL)
|
||||
{
|
||||
if ((options & GETF_ALT) && n == 0)
|
||||
emsg(_(e_noalt));
|
||||
emsg(_(e_no_alternate_file));
|
||||
else
|
||||
semsg(_("E92: Buffer %d not found"), n);
|
||||
return FAIL;
|
||||
@@ -3516,7 +3522,7 @@ getaltfname(
|
||||
if (buflist_name_nr(0, &fname, &dummy) == FAIL)
|
||||
{
|
||||
if (errmsg)
|
||||
emsg(_(e_noalt));
|
||||
emsg(_(e_no_alternate_file));
|
||||
return NULL;
|
||||
}
|
||||
return fname;
|
||||
|
||||
@@ -30,6 +30,7 @@ struct bw_info
|
||||
int bw_flags; // FIO_ flags
|
||||
#ifdef FEAT_CRYPT
|
||||
buf_T *bw_buffer; // buffer being written
|
||||
int bw_finish; // finish encrypting
|
||||
#endif
|
||||
char_u bw_rest[CONV_RESTLEN]; // not converted bytes
|
||||
int bw_restlen; // nr of bytes in bw_rest[]
|
||||
@@ -493,14 +494,16 @@ buf_write_bytes(struct bw_info *ip)
|
||||
if (crypt_works_inplace(ip->bw_buffer->b_cryptstate))
|
||||
{
|
||||
# endif
|
||||
crypt_encode_inplace(ip->bw_buffer->b_cryptstate, buf, len);
|
||||
crypt_encode_inplace(ip->bw_buffer->b_cryptstate, buf, len,
|
||||
ip->bw_finish);
|
||||
# ifdef CRYPT_NOT_INPLACE
|
||||
}
|
||||
else
|
||||
{
|
||||
char_u *outbuf;
|
||||
|
||||
len = crypt_encode_alloc(curbuf->b_cryptstate, buf, len, &outbuf);
|
||||
len = crypt_encode_alloc(curbuf->b_cryptstate, buf, len, &outbuf,
|
||||
ip->bw_finish);
|
||||
if (len == 0)
|
||||
return OK; // Crypt layer is buffering, will flush later.
|
||||
wlen = write_eintr(ip->bw_fd, outbuf, len);
|
||||
@@ -724,6 +727,7 @@ buf_write(
|
||||
#endif
|
||||
#ifdef FEAT_CRYPT
|
||||
write_info.bw_buffer = buf;
|
||||
write_info.bw_finish = FALSE;
|
||||
#endif
|
||||
|
||||
// After writing a file changedtick changes but we don't want to display
|
||||
@@ -1982,8 +1986,25 @@ restore_backup:
|
||||
&& overwriting
|
||||
&& !append
|
||||
&& !filtering
|
||||
# ifdef CRYPT_NOT_INPLACE
|
||||
// writing undo file requires
|
||||
// crypt_encode_inplace()
|
||||
&& (buf->b_cryptstate == NULL
|
||||
|| crypt_works_inplace(buf->b_cryptstate))
|
||||
# endif
|
||||
&& reset_changed
|
||||
&& !checking_conversion);
|
||||
# ifdef CRYPT_NOT_INPLACE
|
||||
// remove undo file if encrypting it is not possible
|
||||
if (buf->b_p_udf
|
||||
&& overwriting
|
||||
&& !append
|
||||
&& !filtering
|
||||
&& !checking_conversion
|
||||
&& buf->b_cryptstate != NULL
|
||||
&& !crypt_works_inplace(buf->b_cryptstate))
|
||||
u_undofile_reset_and_delete(buf);
|
||||
# endif
|
||||
if (write_undo_file)
|
||||
// Prepare for computing the hash value of the text.
|
||||
sha256_start(&sha_ctx);
|
||||
@@ -2015,6 +2036,13 @@ restore_backup:
|
||||
++s;
|
||||
if (++len != bufsize)
|
||||
continue;
|
||||
#ifdef FEAT_CRYPT
|
||||
if (write_info.bw_fd > 0 && lnum == end
|
||||
&& (write_info.bw_flags & FIO_ENCRYPTED)
|
||||
&& *buf->b_p_key != NUL && !filtering
|
||||
&& *ptr == NUL)
|
||||
write_info.bw_finish = TRUE;
|
||||
#endif
|
||||
if (buf_write_bytes(&write_info) == FAIL)
|
||||
{
|
||||
end = 0; // write error: break loop
|
||||
@@ -2118,6 +2146,12 @@ restore_backup:
|
||||
if (len > 0 && end > 0)
|
||||
{
|
||||
write_info.bw_len = len;
|
||||
#ifdef FEAT_CRYPT
|
||||
if (write_info.bw_fd > 0 && lnum >= end
|
||||
&& (write_info.bw_flags & FIO_ENCRYPTED)
|
||||
&& *buf->b_p_key != NUL && !filtering)
|
||||
write_info.bw_finish = TRUE;
|
||||
#endif
|
||||
if (buf_write_bytes(&write_info) == FAIL)
|
||||
end = 0; // write error
|
||||
nchars += len;
|
||||
|
||||
23
src/change.c
23
src/change.c
@@ -241,6 +241,9 @@ f_listener_add(typval_T *argvars, typval_T *rettv)
|
||||
listener_T *lnr;
|
||||
buf_T *buf = curbuf;
|
||||
|
||||
if (in_vim9script() && check_for_opt_buffer_arg(argvars, 1) == FAIL)
|
||||
return;
|
||||
|
||||
callback = get_callback(&argvars[0]);
|
||||
if (callback.cb_name == NULL)
|
||||
return;
|
||||
@@ -278,6 +281,9 @@ f_listener_flush(typval_T *argvars, typval_T *rettv UNUSED)
|
||||
{
|
||||
buf_T *buf = curbuf;
|
||||
|
||||
if (in_vim9script() && check_for_opt_buffer_arg(argvars, 0) == FAIL)
|
||||
return;
|
||||
|
||||
if (argvars[0].v_type != VAR_UNKNOWN)
|
||||
{
|
||||
buf = get_buf_arg(&argvars[0]);
|
||||
@@ -296,9 +302,13 @@ f_listener_remove(typval_T *argvars, typval_T *rettv)
|
||||
listener_T *lnr;
|
||||
listener_T *next;
|
||||
listener_T *prev;
|
||||
int id = tv_get_number(argvars);
|
||||
int id;
|
||||
buf_T *buf;
|
||||
|
||||
if (in_vim9script() && check_for_number_arg(argvars, 0) == FAIL)
|
||||
return;
|
||||
|
||||
id = tv_get_number(argvars);
|
||||
FOR_ALL_BUFFERS(buf)
|
||||
{
|
||||
prev = NULL;
|
||||
@@ -563,9 +573,12 @@ changed_common(
|
||||
changed_cline_bef_curs_win(wp);
|
||||
if (wp->w_botline >= lnum)
|
||||
{
|
||||
// Assume that botline doesn't change (inserted lines make
|
||||
// other lines scroll down below botline).
|
||||
approximate_botline_win(wp);
|
||||
if (xtra < 0)
|
||||
invalidate_botline_win(wp);
|
||||
else
|
||||
// Assume that botline doesn't change (inserted lines make
|
||||
// other lines scroll down below botline).
|
||||
approximate_botline_win(wp);
|
||||
}
|
||||
|
||||
// Check if any w_lines[] entries have become invalid.
|
||||
@@ -1251,7 +1264,7 @@ del_bytes(
|
||||
// fixpos is TRUE, we don't want to end up positioned at the NUL,
|
||||
// unless "restart_edit" is set or 'virtualedit' contains "onemore".
|
||||
if (col > 0 && fixpos && restart_edit == 0
|
||||
&& (ve_flags & VE_ONEMORE) == 0)
|
||||
&& (get_ve_flags() & VE_ONEMORE) == 0)
|
||||
{
|
||||
--curwin->w_cursor.col;
|
||||
curwin->w_cursor.coladd = 0;
|
||||
|
||||
101
src/channel.c
101
src/channel.c
@@ -1232,7 +1232,7 @@ channel_set_options(channel_T *channel, jobopt_T *opt)
|
||||
|
||||
if (!buf->b_p_ma && !channel->ch_part[PART_OUT].ch_nomodifiable)
|
||||
{
|
||||
emsg(_(e_modifiable));
|
||||
emsg(_(e_cannot_make_changes_modifiable_is_off));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1278,7 +1278,7 @@ channel_set_options(channel_T *channel, jobopt_T *opt)
|
||||
!opt->jo_modifiable[PART_ERR];
|
||||
if (!buf->b_p_ma && !channel->ch_part[PART_ERR].ch_nomodifiable)
|
||||
{
|
||||
emsg(_(e_modifiable));
|
||||
emsg(_(e_cannot_make_changes_modifiable_is_off));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1311,6 +1311,11 @@ channel_open_func(typval_T *argvars)
|
||||
jobopt_T opt;
|
||||
channel_T *channel = NULL;
|
||||
|
||||
if (in_vim9script()
|
||||
&& (check_for_string_arg(argvars, 0) == FAIL
|
||||
|| check_for_dict_arg(argvars, 1) == FAIL))
|
||||
return NULL;
|
||||
|
||||
address = tv_get_string(&argvars[0]);
|
||||
if (argvars[1].v_type != VAR_UNKNOWN
|
||||
&& (argvars[1].v_type != VAR_DICT || argvars[1].vval.v_dict == NULL))
|
||||
@@ -2486,12 +2491,17 @@ channel_exe_cmd(channel_T *channel, ch_part_T part, typval_T *argv)
|
||||
|
||||
if (STRCMP(cmd, "ex") == 0)
|
||||
{
|
||||
int called_emsg_before = called_emsg;
|
||||
int called_emsg_before = called_emsg;
|
||||
char_u *p = arg;
|
||||
int do_emsg_silent;
|
||||
|
||||
ch_log(channel, "Executing ex command '%s'", (char *)arg);
|
||||
++emsg_silent;
|
||||
do_emsg_silent = !checkforcmd(&p, "echoerr", 5);
|
||||
if (do_emsg_silent)
|
||||
++emsg_silent;
|
||||
do_cmdline_cmd(arg);
|
||||
--emsg_silent;
|
||||
if (do_emsg_silent)
|
||||
--emsg_silent;
|
||||
if (called_emsg > called_emsg_before)
|
||||
ch_log(channel, "Ex command error: '%s'",
|
||||
(char *)get_vim_var_str(VV_ERRMSG));
|
||||
@@ -2545,7 +2555,8 @@ channel_exe_cmd(channel_T *channel, ch_part_T part, typval_T *argv)
|
||||
char_u *json = NULL;
|
||||
|
||||
// Don't pollute the display with errors.
|
||||
++emsg_skip;
|
||||
// Do generate the errors so that try/catch works.
|
||||
++emsg_silent;
|
||||
if (!is_call)
|
||||
{
|
||||
ch_log(channel, "Evaluating expression '%s'", (char *)arg);
|
||||
@@ -2581,7 +2592,7 @@ channel_exe_cmd(channel_T *channel, ch_part_T part, typval_T *argv)
|
||||
vim_free(json);
|
||||
}
|
||||
}
|
||||
--emsg_skip;
|
||||
--emsg_silent;
|
||||
if (tv == &res_tv)
|
||||
clear_tv(tv);
|
||||
else
|
||||
@@ -3854,6 +3865,11 @@ common_channel_read(typval_T *argvars, typval_T *rettv, int raw, int blob)
|
||||
rettv->v_type = VAR_STRING;
|
||||
rettv->vval.v_string = NULL;
|
||||
|
||||
if (in_vim9script()
|
||||
&& (check_for_chan_or_job_arg(argvars, 0) == FAIL
|
||||
|| check_for_opt_dict_arg(argvars, 1) == FAIL))
|
||||
return;
|
||||
|
||||
clear_job_options(&opt);
|
||||
if (get_job_options(&argvars[1], &opt, JO_TIMEOUT + JO_PART + JO_ID, 0)
|
||||
== FAIL)
|
||||
@@ -4259,6 +4275,11 @@ ch_expr_common(typval_T *argvars, typval_T *rettv, int eval)
|
||||
rettv->v_type = VAR_STRING;
|
||||
rettv->vval.v_string = NULL;
|
||||
|
||||
if (in_vim9script()
|
||||
&& (check_for_chan_or_job_arg(argvars, 0) == FAIL
|
||||
|| check_for_opt_dict_arg(argvars, 2) == FAIL))
|
||||
return;
|
||||
|
||||
channel = get_channel_arg(&argvars[0], TRUE, FALSE, 0);
|
||||
if (channel == NULL)
|
||||
return;
|
||||
@@ -4319,6 +4340,12 @@ ch_raw_common(typval_T *argvars, typval_T *rettv, int eval)
|
||||
rettv->v_type = VAR_STRING;
|
||||
rettv->vval.v_string = NULL;
|
||||
|
||||
if (in_vim9script()
|
||||
&& (check_for_chan_or_job_arg(argvars, 0) == FAIL
|
||||
|| check_for_string_or_blob_arg(argvars, 1) == FAIL
|
||||
|| check_for_opt_dict_arg(argvars, 2) == FAIL))
|
||||
return;
|
||||
|
||||
if (argvars[1].v_type == VAR_BLOB)
|
||||
{
|
||||
text = argvars[1].vval.v_blob->bv_ga.ga_data;
|
||||
@@ -4762,9 +4789,13 @@ channel_get_timeout(channel_T *channel, ch_part_T part)
|
||||
void
|
||||
f_ch_canread(typval_T *argvars, typval_T *rettv)
|
||||
{
|
||||
channel_T *channel = get_channel_arg(&argvars[0], FALSE, FALSE, 0);
|
||||
channel_T *channel;
|
||||
|
||||
rettv->vval.v_number = 0;
|
||||
if (in_vim9script() && check_for_chan_or_job_arg(argvars, 0) == FAIL)
|
||||
return;
|
||||
|
||||
channel = get_channel_arg(&argvars[0], FALSE, FALSE, 0);
|
||||
if (channel != NULL)
|
||||
rettv->vval.v_number = channel_has_readahead(channel, PART_SOCK)
|
||||
|| channel_has_readahead(channel, PART_OUT)
|
||||
@@ -4777,8 +4808,12 @@ f_ch_canread(typval_T *argvars, typval_T *rettv)
|
||||
void
|
||||
f_ch_close(typval_T *argvars, typval_T *rettv UNUSED)
|
||||
{
|
||||
channel_T *channel = get_channel_arg(&argvars[0], TRUE, FALSE, 0);
|
||||
channel_T *channel;
|
||||
|
||||
if (in_vim9script() && check_for_chan_or_job_arg(argvars, 0) == FAIL)
|
||||
return;
|
||||
|
||||
channel = get_channel_arg(&argvars[0], TRUE, FALSE, 0);
|
||||
if (channel != NULL)
|
||||
{
|
||||
channel_close(channel, FALSE);
|
||||
@@ -4792,8 +4827,12 @@ f_ch_close(typval_T *argvars, typval_T *rettv UNUSED)
|
||||
void
|
||||
f_ch_close_in(typval_T *argvars, typval_T *rettv UNUSED)
|
||||
{
|
||||
channel_T *channel = get_channel_arg(&argvars[0], TRUE, FALSE, 0);
|
||||
channel_T *channel;
|
||||
|
||||
if (in_vim9script() && check_for_chan_or_job_arg(argvars, 0) == FAIL)
|
||||
return;
|
||||
|
||||
channel = get_channel_arg(&argvars[0], TRUE, FALSE, 0);
|
||||
if (channel != NULL)
|
||||
channel_close_in(channel);
|
||||
}
|
||||
@@ -4804,9 +4843,16 @@ f_ch_close_in(typval_T *argvars, typval_T *rettv UNUSED)
|
||||
void
|
||||
f_ch_getbufnr(typval_T *argvars, typval_T *rettv)
|
||||
{
|
||||
channel_T *channel = get_channel_arg(&argvars[0], FALSE, FALSE, 0);
|
||||
channel_T *channel;
|
||||
|
||||
rettv->vval.v_number = -1;
|
||||
|
||||
if (in_vim9script()
|
||||
&& (check_for_chan_or_job_arg(argvars, 0) == FAIL
|
||||
|| check_for_string_arg(argvars, 1) == FAIL))
|
||||
return;
|
||||
|
||||
channel = get_channel_arg(&argvars[0], FALSE, FALSE, 0);
|
||||
if (channel != NULL)
|
||||
{
|
||||
char_u *what = tv_get_string(&argvars[1]);
|
||||
@@ -4832,8 +4878,12 @@ f_ch_getbufnr(typval_T *argvars, typval_T *rettv)
|
||||
void
|
||||
f_ch_getjob(typval_T *argvars, typval_T *rettv)
|
||||
{
|
||||
channel_T *channel = get_channel_arg(&argvars[0], FALSE, FALSE, 0);
|
||||
channel_T *channel;
|
||||
|
||||
if (in_vim9script() && check_for_chan_or_job_arg(argvars, 0) == FAIL)
|
||||
return;
|
||||
|
||||
channel = get_channel_arg(&argvars[0], FALSE, FALSE, 0);
|
||||
if (channel != NULL)
|
||||
{
|
||||
rettv->v_type = VAR_JOB;
|
||||
@@ -4849,8 +4899,12 @@ f_ch_getjob(typval_T *argvars, typval_T *rettv)
|
||||
void
|
||||
f_ch_info(typval_T *argvars, typval_T *rettv UNUSED)
|
||||
{
|
||||
channel_T *channel = get_channel_arg(&argvars[0], FALSE, FALSE, 0);
|
||||
channel_T *channel;
|
||||
|
||||
if (in_vim9script() && check_for_chan_or_job_arg(argvars, 0) == FAIL)
|
||||
return;
|
||||
|
||||
channel = get_channel_arg(&argvars[0], FALSE, FALSE, 0);
|
||||
if (channel != NULL && rettv_dict_alloc(rettv) != FAIL)
|
||||
channel_info(channel, rettv->vval.v_dict);
|
||||
}
|
||||
@@ -4861,9 +4915,15 @@ f_ch_info(typval_T *argvars, typval_T *rettv UNUSED)
|
||||
void
|
||||
f_ch_log(typval_T *argvars, typval_T *rettv UNUSED)
|
||||
{
|
||||
char_u *msg = tv_get_string(&argvars[0]);
|
||||
char_u *msg;
|
||||
channel_T *channel = NULL;
|
||||
|
||||
if (in_vim9script()
|
||||
&& (check_for_string_arg(argvars, 0) == FAIL
|
||||
|| check_for_opt_chan_or_job_arg(argvars, 1) == FAIL))
|
||||
return;
|
||||
|
||||
msg = tv_get_string(&argvars[0]);
|
||||
if (argvars[1].v_type != VAR_UNKNOWN)
|
||||
channel = get_channel_arg(&argvars[1], FALSE, FALSE, 0);
|
||||
|
||||
@@ -4883,9 +4943,10 @@ f_ch_logfile(typval_T *argvars, typval_T *rettv UNUSED)
|
||||
// Don't open a file in restricted mode.
|
||||
if (check_restricted() || check_secure())
|
||||
return;
|
||||
|
||||
if (in_vim9script()
|
||||
&& (check_for_string_arg(argvars, 0) == FAIL
|
||||
|| check_for_string_arg(argvars, 1) == FAIL))
|
||||
|| check_for_opt_string_arg(argvars, 1) == FAIL))
|
||||
return;
|
||||
|
||||
fname = tv_get_string(&argvars[0]);
|
||||
@@ -4978,6 +5039,11 @@ f_ch_setoptions(typval_T *argvars, typval_T *rettv UNUSED)
|
||||
channel_T *channel;
|
||||
jobopt_T opt;
|
||||
|
||||
if (in_vim9script()
|
||||
&& (check_for_chan_or_job_arg(argvars, 0) == FAIL
|
||||
|| check_for_dict_arg(argvars, 1) == FAIL))
|
||||
return;
|
||||
|
||||
channel = get_channel_arg(&argvars[0], FALSE, FALSE, 0);
|
||||
if (channel == NULL)
|
||||
return;
|
||||
@@ -5002,6 +5068,11 @@ f_ch_status(typval_T *argvars, typval_T *rettv)
|
||||
rettv->v_type = VAR_STRING;
|
||||
rettv->vval.v_string = NULL;
|
||||
|
||||
if (in_vim9script()
|
||||
&& (check_for_chan_or_job_arg(argvars, 0) == FAIL
|
||||
|| check_for_opt_dict_arg(argvars, 1) == FAIL))
|
||||
return;
|
||||
|
||||
channel = get_channel_arg(&argvars[0], FALSE, FALSE, 0);
|
||||
|
||||
if (argvars[1].v_type != VAR_UNKNOWN)
|
||||
|
||||
@@ -4129,6 +4129,9 @@ f_cindent(typval_T *argvars UNUSED, typval_T *rettv)
|
||||
pos_T pos;
|
||||
linenr_T lnum;
|
||||
|
||||
if (in_vim9script() && check_for_lnum_arg(argvars, 0) == FAIL)
|
||||
return;
|
||||
|
||||
pos = curwin->w_cursor;
|
||||
lnum = tv_get_lnum(argvars);
|
||||
if (lnum >= 1 && lnum <= curbuf->b_ml.ml_line_count)
|
||||
|
||||
@@ -793,6 +793,15 @@ f_remote_expr(typval_T *argvars UNUSED, typval_T *rettv)
|
||||
{
|
||||
rettv->v_type = VAR_STRING;
|
||||
rettv->vval.v_string = NULL;
|
||||
|
||||
if (in_vim9script()
|
||||
&& (check_for_string_arg(argvars, 0) == FAIL
|
||||
|| check_for_string_arg(argvars, 1) == FAIL
|
||||
|| check_for_opt_string_arg(argvars, 2) == FAIL
|
||||
|| (argvars[2].v_type != VAR_UNKNOWN
|
||||
&& check_for_opt_number_arg(argvars, 3) == FAIL)))
|
||||
return;
|
||||
|
||||
#ifdef FEAT_CLIENTSERVER
|
||||
remote_common(argvars, rettv, TRUE);
|
||||
#endif
|
||||
@@ -805,6 +814,9 @@ f_remote_expr(typval_T *argvars UNUSED, typval_T *rettv)
|
||||
f_remote_foreground(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
|
||||
{
|
||||
#ifdef FEAT_CLIENTSERVER
|
||||
if (in_vim9script() && check_for_string_arg(argvars, 0) == FAIL)
|
||||
return;
|
||||
|
||||
# ifdef MSWIN
|
||||
// On Win32 it's done in this application.
|
||||
{
|
||||
@@ -837,17 +849,18 @@ f_remote_peek(typval_T *argvars UNUSED, typval_T *rettv)
|
||||
# endif
|
||||
char_u *serverid;
|
||||
|
||||
rettv->vval.v_number = -1;
|
||||
if (check_restricted() || check_secure())
|
||||
{
|
||||
rettv->vval.v_number = -1;
|
||||
return;
|
||||
}
|
||||
|
||||
if (in_vim9script()
|
||||
&& (check_for_string_arg(argvars, 0) == FAIL
|
||||
|| check_for_opt_string_arg(argvars, 1) == FAIL))
|
||||
return;
|
||||
|
||||
serverid = tv_get_string_chk(&argvars[0]);
|
||||
if (serverid == NULL)
|
||||
{
|
||||
rettv->vval.v_number = -1;
|
||||
return; // type error; errmsg already given
|
||||
}
|
||||
# ifdef MSWIN
|
||||
sscanf((const char *)serverid, SCANF_HEX_LONG_U, &n);
|
||||
if (n == 0)
|
||||
@@ -887,8 +900,14 @@ f_remote_read(typval_T *argvars UNUSED, typval_T *rettv)
|
||||
char_u *r = NULL;
|
||||
|
||||
#ifdef FEAT_CLIENTSERVER
|
||||
char_u *serverid = tv_get_string_chk(&argvars[0]);
|
||||
char_u *serverid;
|
||||
|
||||
if (in_vim9script()
|
||||
&& (check_for_string_arg(argvars, 0) == FAIL
|
||||
|| check_for_opt_number_arg(argvars, 1) == FAIL))
|
||||
return;
|
||||
|
||||
serverid = tv_get_string_chk(&argvars[0]);
|
||||
if (serverid != NULL && !check_restricted() && !check_secure())
|
||||
{
|
||||
int timeout = 0;
|
||||
@@ -925,6 +944,13 @@ f_remote_send(typval_T *argvars UNUSED, typval_T *rettv)
|
||||
{
|
||||
rettv->v_type = VAR_STRING;
|
||||
rettv->vval.v_string = NULL;
|
||||
|
||||
if (in_vim9script()
|
||||
&& (check_for_string_arg(argvars, 0) == FAIL
|
||||
|| check_for_string_arg(argvars, 1) == FAIL
|
||||
|| check_for_opt_string_arg(argvars, 2) == FAIL))
|
||||
return;
|
||||
|
||||
#ifdef FEAT_CLIENTSERVER
|
||||
remote_common(argvars, rettv, FALSE);
|
||||
#endif
|
||||
@@ -937,8 +963,12 @@ f_remote_send(typval_T *argvars UNUSED, typval_T *rettv)
|
||||
f_remote_startserver(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
|
||||
{
|
||||
#ifdef FEAT_CLIENTSERVER
|
||||
char_u *server = tv_get_string_chk(&argvars[0]);
|
||||
char_u *server;
|
||||
|
||||
if (in_vim9script() && check_for_string_arg(argvars, 0) == FAIL)
|
||||
return;
|
||||
|
||||
server = tv_get_string_chk(&argvars[0]);
|
||||
if (server == NULL)
|
||||
return; // type error; errmsg already given
|
||||
if (serverName != NULL)
|
||||
@@ -962,14 +992,23 @@ f_server2client(typval_T *argvars UNUSED, typval_T *rettv)
|
||||
{
|
||||
#ifdef FEAT_CLIENTSERVER
|
||||
char_u buf[NUMBUFLEN];
|
||||
char_u *server = tv_get_string_chk(&argvars[0]);
|
||||
char_u *reply = tv_get_string_buf_chk(&argvars[1], buf);
|
||||
char_u *server;
|
||||
char_u *reply;
|
||||
|
||||
rettv->vval.v_number = -1;
|
||||
if (server == NULL || reply == NULL)
|
||||
return;
|
||||
if (check_restricted() || check_secure())
|
||||
return;
|
||||
|
||||
if (in_vim9script()
|
||||
&& (check_for_string_arg(argvars, 0) == FAIL
|
||||
|| check_for_string_arg(argvars, 1) == FAIL))
|
||||
return;
|
||||
|
||||
server = tv_get_string_chk(&argvars[0]);
|
||||
reply = tv_get_string_buf_chk(&argvars[1], buf);
|
||||
if (server == NULL || reply == NULL)
|
||||
return;
|
||||
|
||||
# ifdef FEAT_X11
|
||||
if (check_connection() == FAIL)
|
||||
return;
|
||||
|
||||
@@ -1370,6 +1370,8 @@ set_one_cmd_context(
|
||||
case CMD_verbose:
|
||||
case CMD_vertical:
|
||||
case CMD_windo:
|
||||
case CMD_vim9cmd:
|
||||
case CMD_legacy:
|
||||
return arg;
|
||||
|
||||
case CMD_filter:
|
||||
@@ -1555,10 +1557,12 @@ set_one_cmd_context(
|
||||
|
||||
case CMD_function:
|
||||
case CMD_delfunction:
|
||||
case CMD_disassemble:
|
||||
xp->xp_context = EXPAND_USER_FUNC;
|
||||
xp->xp_pattern = arg;
|
||||
break;
|
||||
case CMD_disassemble:
|
||||
set_context_in_disassemble_cmd(xp, arg);
|
||||
break;
|
||||
|
||||
case CMD_echohl:
|
||||
set_context_in_echohl_cmd(xp, arg);
|
||||
@@ -2118,6 +2122,7 @@ ExpandFromContext(
|
||||
{EXPAND_USER_VARS, get_user_var_name, FALSE, TRUE},
|
||||
{EXPAND_FUNCTIONS, get_function_name, FALSE, TRUE},
|
||||
{EXPAND_USER_FUNC, get_user_func_name, FALSE, TRUE},
|
||||
{EXPAND_DISASSEMBLE, get_disassemble_argument, FALSE, TRUE},
|
||||
{EXPAND_EXPRESSION, get_expr_name, FALSE, TRUE},
|
||||
# endif
|
||||
# ifdef FEAT_MENU
|
||||
@@ -2886,6 +2891,12 @@ f_getcompletion(typval_T *argvars, typval_T *rettv)
|
||||
int options = WILD_SILENT | WILD_USE_NL | WILD_ADD_SLASH
|
||||
| WILD_NO_BEEP;
|
||||
|
||||
if (in_vim9script()
|
||||
&& (check_for_string_arg(argvars, 0) == FAIL
|
||||
|| check_for_string_arg(argvars, 1) == FAIL
|
||||
|| check_for_opt_bool_arg(argvars, 2) == FAIL))
|
||||
return;
|
||||
|
||||
if (argvars[1].v_type != VAR_STRING)
|
||||
{
|
||||
semsg(_(e_invarg2), "type must be a string");
|
||||
|
||||
@@ -545,6 +545,12 @@ f_histadd(typval_T *argvars UNUSED, typval_T *rettv)
|
||||
rettv->vval.v_number = FALSE;
|
||||
if (check_secure())
|
||||
return;
|
||||
|
||||
if (in_vim9script()
|
||||
&& (check_for_string_arg(argvars, 0) == FAIL
|
||||
|| check_for_string_arg(argvars, 1) == FAIL))
|
||||
return;
|
||||
|
||||
str = tv_get_string_chk(&argvars[0]); // NULL on type error
|
||||
histype = str != NULL ? get_histtype(str) : -1;
|
||||
if (histype >= 0)
|
||||
@@ -570,6 +576,11 @@ f_histdel(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
|
||||
char_u buf[NUMBUFLEN];
|
||||
char_u *str;
|
||||
|
||||
if (in_vim9script()
|
||||
&& (check_for_string_arg(argvars, 0) == FAIL
|
||||
|| check_for_opt_string_or_number_arg(argvars, 1) == FAIL))
|
||||
return;
|
||||
|
||||
str = tv_get_string_chk(&argvars[0]); // NULL on type error
|
||||
if (str == NULL)
|
||||
n = 0;
|
||||
@@ -597,6 +608,11 @@ f_histget(typval_T *argvars UNUSED, typval_T *rettv)
|
||||
int idx;
|
||||
char_u *str;
|
||||
|
||||
if (in_vim9script()
|
||||
&& (check_for_string_arg(argvars, 0) == FAIL
|
||||
|| check_for_opt_number_arg(argvars, 1) == FAIL))
|
||||
return;
|
||||
|
||||
str = tv_get_string_chk(&argvars[0]); // NULL on type error
|
||||
if (str == NULL)
|
||||
rettv->vval.v_string = NULL;
|
||||
@@ -620,9 +636,12 @@ f_histget(typval_T *argvars UNUSED, typval_T *rettv)
|
||||
f_histnr(typval_T *argvars UNUSED, typval_T *rettv)
|
||||
{
|
||||
int i;
|
||||
char_u *histname;
|
||||
|
||||
char_u *histname = tv_get_string_chk(&argvars[0]);
|
||||
if (in_vim9script() && check_for_string_arg(argvars, 0) == FAIL)
|
||||
return;
|
||||
|
||||
histname = tv_get_string_chk(&argvars[0]);
|
||||
i = histname == NULL ? HIST_CMD - 1 : get_histtype(histname);
|
||||
if (i >= HIST_CMD && i < HIST_COUNT)
|
||||
i = get_history_idx(i);
|
||||
|
||||
@@ -208,6 +208,7 @@
|
||||
#undef HAVE_STRPTIME
|
||||
#undef HAVE_STRTOL
|
||||
#undef HAVE_CANBERRA
|
||||
#undef HAVE_SODIUM
|
||||
#undef HAVE_ST_BLKSIZE
|
||||
#undef HAVE_SYSCONF
|
||||
#undef HAVE_SYSCTL
|
||||
|
||||
@@ -3767,6 +3767,43 @@ if test "$enable_canberra" = "yes"; then
|
||||
AC_MSG_RESULT(no; try installing libcanberra-dev); CFLAGS="$ac_save_CFLAGS"; LIBS="$ac_save_LIBS")
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(--enable-libsodium argument)
|
||||
AC_ARG_ENABLE(libsodium,
|
||||
[ --disable-libsodium Do not use libsodium.],
|
||||
, [enable_libsodium="maybe"])
|
||||
|
||||
if test "$enable_libsodium" = "maybe"; then
|
||||
if test "$features" = "big" -o "$features" = "huge"; then
|
||||
AC_MSG_RESULT(Defaulting to yes)
|
||||
enable_libsodium="yes"
|
||||
else
|
||||
AC_MSG_RESULT(Defaulting to no)
|
||||
enable_libsodium="no"
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT($enable_libsodium)
|
||||
fi
|
||||
if test "$enable_libsodium" = "yes"; then
|
||||
if test "x$PKG_CONFIG" != "xno"; then
|
||||
libsodium_lib=`$PKG_CONFIG --libs libsodium 2>/dev/null`
|
||||
libsodium_cflags=`$PKG_CONFIG --cflags libsodium 2>/dev/null`
|
||||
fi
|
||||
if test "x$libsodium_lib" = "x"; then
|
||||
libsodium_lib=-lsodium
|
||||
libsodium_cflags=
|
||||
fi
|
||||
AC_MSG_CHECKING(for libsodium)
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
ac_save_LIBS="$LIBS"
|
||||
CFLAGS="$CFLAGS $libsodium_cflags"
|
||||
LIBS="$LIBS $libsodium_lib"
|
||||
AC_TRY_LINK([
|
||||
# include <sodium.h>
|
||||
], [
|
||||
printf("%d", sodium_init()); ],
|
||||
AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SODIUM),
|
||||
AC_MSG_RESULT(no; try installing libsodium-dev); CFLAGS="$ac_save_CFLAGS"; LIBS="$ac_save_LIBS")
|
||||
fi
|
||||
|
||||
dnl fstatfs() can take 2 to 4 arguments, try to use st_blksize if possible
|
||||
AC_MSG_CHECKING(for st_blksize)
|
||||
|
||||
429
src/crypt.c
429
src/crypt.c
@@ -12,6 +12,10 @@
|
||||
*/
|
||||
#include "vim.h"
|
||||
|
||||
#ifdef FEAT_SODIUM
|
||||
# include <sodium.h>
|
||||
#endif
|
||||
|
||||
#if defined(FEAT_CRYPT) || defined(PROTO)
|
||||
/*
|
||||
* Optional encryption support.
|
||||
@@ -33,7 +37,7 @@ typedef struct {
|
||||
char *name; // encryption name as used in 'cryptmethod'
|
||||
char *magic; // magic bytes stored in file header
|
||||
int salt_len; // length of salt, or 0 when not using salt
|
||||
int seed_len; // length of seed, or 0 when not using salt
|
||||
int seed_len; // length of seed, or 0 when not using seed
|
||||
#ifdef CRYPT_NOT_INPLACE
|
||||
int works_inplace; // encryption/decryption can be done in-place
|
||||
#endif
|
||||
@@ -49,16 +53,16 @@ typedef struct {
|
||||
// Function pointers for encoding/decoding from one buffer into another.
|
||||
// Optional, however, these or the _buffer ones should be configured.
|
||||
void (*encode_fn)(cryptstate_T *state, char_u *from, size_t len,
|
||||
char_u *to);
|
||||
char_u *to, int last);
|
||||
void (*decode_fn)(cryptstate_T *state, char_u *from, size_t len,
|
||||
char_u *to);
|
||||
char_u *to, int last);
|
||||
|
||||
// Function pointers for encoding and decoding, can buffer data if needed.
|
||||
// Optional (however, these or the above should be configured).
|
||||
long (*encode_buffer_fn)(cryptstate_T *state, char_u *from, size_t len,
|
||||
char_u **newptr);
|
||||
char_u **newptr, int last);
|
||||
long (*decode_buffer_fn)(cryptstate_T *state, char_u *from, size_t len,
|
||||
char_u **newptr);
|
||||
char_u **newptr, int last);
|
||||
|
||||
// Function pointers for in-place encoding and decoding, used for
|
||||
// crypt_*_inplace(). "from" and "to" arguments will be equal.
|
||||
@@ -68,9 +72,9 @@ typedef struct {
|
||||
// padding to files).
|
||||
// This method is used for swap and undo files which have a rigid format.
|
||||
void (*encode_inplace_fn)(cryptstate_T *state, char_u *p1, size_t len,
|
||||
char_u *p2);
|
||||
char_u *p2, int last);
|
||||
void (*decode_inplace_fn)(cryptstate_T *state, char_u *p1, size_t len,
|
||||
char_u *p2);
|
||||
char_u *p2, int last);
|
||||
} cryptmethod_T;
|
||||
|
||||
// index is method_nr of cryptstate_T, CRYPT_M_*
|
||||
@@ -126,10 +130,41 @@ static cryptmethod_T cryptmethods[CRYPT_M_COUNT] = {
|
||||
crypt_blowfish_encode, crypt_blowfish_decode,
|
||||
},
|
||||
|
||||
// XChaCha20 using libsodium
|
||||
{
|
||||
"xchacha20",
|
||||
"VimCrypt~04!",
|
||||
#ifdef FEAT_SODIUM
|
||||
crypto_pwhash_argon2id_SALTBYTES, // 16
|
||||
#else
|
||||
16,
|
||||
#endif
|
||||
8,
|
||||
#ifdef CRYPT_NOT_INPLACE
|
||||
FALSE,
|
||||
#endif
|
||||
FALSE,
|
||||
NULL,
|
||||
crypt_sodium_init,
|
||||
NULL, NULL,
|
||||
crypt_sodium_buffer_encode, crypt_sodium_buffer_decode,
|
||||
NULL, NULL,
|
||||
},
|
||||
|
||||
// NOTE: when adding a new method, use some random bytes for the magic key,
|
||||
// to avoid that a text file is recognized as encrypted.
|
||||
};
|
||||
|
||||
#ifdef FEAT_SODIUM
|
||||
typedef struct {
|
||||
size_t count;
|
||||
unsigned char key[crypto_box_SEEDBYTES];
|
||||
// 32, same as crypto_secretstream_xchacha20poly1305_KEYBYTES
|
||||
crypto_secretstream_xchacha20poly1305_state
|
||||
state;
|
||||
} sodium_state_T;
|
||||
#endif
|
||||
|
||||
#define CRYPT_MAGIC_LEN 12 // cannot change
|
||||
static char crypt_magic_head[] = "VimCrypt~";
|
||||
|
||||
@@ -215,6 +250,26 @@ crypt_get_header_len(int method_nr)
|
||||
+ cryptmethods[method_nr].seed_len;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Get maximum crypt method specific length of the file header in bytes.
|
||||
*/
|
||||
int
|
||||
crypt_get_max_header_len()
|
||||
{
|
||||
int i;
|
||||
int max = 0;
|
||||
int temp = 0;
|
||||
|
||||
for (i = 0; i < CRYPT_M_COUNT; ++i)
|
||||
{
|
||||
temp = crypt_get_header_len(i);
|
||||
if (temp > max)
|
||||
max = temp;
|
||||
}
|
||||
return max;
|
||||
}
|
||||
|
||||
/*
|
||||
* Set the crypt method for buffer "buf" to "method_nr" using the int value as
|
||||
* returned by crypt_method_nr_from_name().
|
||||
@@ -260,7 +315,7 @@ crypt_create(
|
||||
|
||||
state->method_nr = method_nr;
|
||||
if (cryptmethods[method_nr].init_fn(
|
||||
state, key, salt, salt_len, seed, seed_len) == FAIL)
|
||||
state, key, salt, salt_len, seed, seed_len) == FAIL)
|
||||
{
|
||||
vim_free(state);
|
||||
return NULL;
|
||||
@@ -365,9 +420,18 @@ crypt_create_for_writing(
|
||||
// TODO: Should this be crypt method specific? (Probably not worth
|
||||
// it). sha2_seed is pretty bad for large amounts of entropy, so make
|
||||
// that into something which is suitable for anything.
|
||||
sha2_seed(salt, salt_len, seed, seed_len);
|
||||
#ifdef FEAT_SODIUM
|
||||
if (sodium_init() >= 0)
|
||||
{
|
||||
if (salt_len > 0)
|
||||
randombytes_buf(salt, salt_len);
|
||||
if (seed_len > 0)
|
||||
randombytes_buf(seed, seed_len);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
sha2_seed(salt, salt_len, seed, seed_len);
|
||||
}
|
||||
|
||||
state = crypt_create(method_nr, key, salt, salt_len, seed, seed_len);
|
||||
if (state == NULL)
|
||||
VIM_CLEAR(*header);
|
||||
@@ -380,7 +444,15 @@ crypt_create_for_writing(
|
||||
void
|
||||
crypt_free_state(cryptstate_T *state)
|
||||
{
|
||||
vim_free(state->method_state);
|
||||
#ifdef FEAT_SODIUM
|
||||
if (state->method_nr == CRYPT_M_SOD)
|
||||
{
|
||||
sodium_memzero(state->method_state, sizeof(sodium_state_T));
|
||||
sodium_free(state->method_state);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
vim_free(state->method_state);
|
||||
vim_free(state);
|
||||
}
|
||||
|
||||
@@ -395,21 +467,22 @@ crypt_encode_alloc(
|
||||
cryptstate_T *state,
|
||||
char_u *from,
|
||||
size_t len,
|
||||
char_u **newptr)
|
||||
char_u **newptr,
|
||||
int last)
|
||||
{
|
||||
cryptmethod_T *method = &cryptmethods[state->method_nr];
|
||||
|
||||
if (method->encode_buffer_fn != NULL)
|
||||
// Has buffer function, pass through.
|
||||
return method->encode_buffer_fn(state, from, len, newptr);
|
||||
return method->encode_buffer_fn(state, from, len, newptr, last);
|
||||
if (len == 0)
|
||||
// Not buffering, just return EOF.
|
||||
return (long)len;
|
||||
|
||||
*newptr = alloc(len);
|
||||
*newptr = alloc(len + 50);
|
||||
if (*newptr == NULL)
|
||||
return -1;
|
||||
method->encode_fn(state, from, len, *newptr);
|
||||
method->encode_fn(state, from, len, *newptr, last);
|
||||
return (long)len;
|
||||
}
|
||||
|
||||
@@ -423,13 +496,14 @@ crypt_decode_alloc(
|
||||
cryptstate_T *state,
|
||||
char_u *ptr,
|
||||
long len,
|
||||
char_u **newptr)
|
||||
char_u **newptr,
|
||||
int last)
|
||||
{
|
||||
cryptmethod_T *method = &cryptmethods[state->method_nr];
|
||||
|
||||
if (method->decode_buffer_fn != NULL)
|
||||
// Has buffer function, pass through.
|
||||
return method->decode_buffer_fn(state, ptr, len, newptr);
|
||||
return method->decode_buffer_fn(state, ptr, len, newptr, last);
|
||||
|
||||
if (len == 0)
|
||||
// Not buffering, just return EOF.
|
||||
@@ -438,7 +512,7 @@ crypt_decode_alloc(
|
||||
*newptr = alloc(len);
|
||||
if (*newptr == NULL)
|
||||
return -1;
|
||||
method->decode_fn(state, ptr, len, *newptr);
|
||||
method->decode_fn(state, ptr, len, *newptr, last);
|
||||
return len;
|
||||
}
|
||||
#endif
|
||||
@@ -451,9 +525,10 @@ crypt_encode(
|
||||
cryptstate_T *state,
|
||||
char_u *from,
|
||||
size_t len,
|
||||
char_u *to)
|
||||
char_u *to,
|
||||
int last)
|
||||
{
|
||||
cryptmethods[state->method_nr].encode_fn(state, from, len, to);
|
||||
cryptmethods[state->method_nr].encode_fn(state, from, len, to, last);
|
||||
}
|
||||
|
||||
#if 0 // unused
|
||||
@@ -465,9 +540,10 @@ crypt_decode(
|
||||
cryptstate_T *state,
|
||||
char_u *from,
|
||||
size_t len,
|
||||
char_u *to)
|
||||
char_u *to,
|
||||
int last)
|
||||
{
|
||||
cryptmethods[state->method_nr].decode_fn(state, from, len, to);
|
||||
cryptmethods[state->method_nr].decode_fn(state, from, len, to, last);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -478,9 +554,11 @@ crypt_decode(
|
||||
crypt_encode_inplace(
|
||||
cryptstate_T *state,
|
||||
char_u *buf,
|
||||
size_t len)
|
||||
size_t len,
|
||||
int last)
|
||||
{
|
||||
cryptmethods[state->method_nr].encode_inplace_fn(state, buf, len, buf);
|
||||
cryptmethods[state->method_nr].encode_inplace_fn(state, buf, len,
|
||||
buf, last);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -490,9 +568,11 @@ crypt_encode_inplace(
|
||||
crypt_decode_inplace(
|
||||
cryptstate_T *state,
|
||||
char_u *buf,
|
||||
size_t len)
|
||||
size_t len,
|
||||
int last)
|
||||
{
|
||||
cryptmethods[state->method_nr].decode_inplace_fn(state, buf, len, buf);
|
||||
cryptmethods[state->method_nr].decode_inplace_fn(state, buf, len,
|
||||
buf, last);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -525,6 +605,23 @@ crypt_check_method(int method)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef FEAT_SODIUM
|
||||
static void
|
||||
crypt_check_swapfile_curbuf(void)
|
||||
{
|
||||
int method = crypt_get_method_nr(curbuf);
|
||||
if (method == CRYPT_M_SOD)
|
||||
{
|
||||
// encryption uses padding and MAC, that does not work very well with
|
||||
// swap and undo files, so disable them
|
||||
mf_close_file(curbuf, TRUE); // remove the swap file
|
||||
set_option_value((char_u *)"swf", 0, NULL, OPT_LOCAL);
|
||||
msg_scroll = TRUE;
|
||||
msg(_("Note: Encryption of swapfile not supported, disabling swap file"));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
crypt_check_current_method(void)
|
||||
{
|
||||
@@ -576,6 +673,9 @@ crypt_get_key(
|
||||
set_option_value((char_u *)"key", 0L, p1, OPT_LOCAL);
|
||||
crypt_free_key(p1);
|
||||
p1 = curbuf->b_p_key;
|
||||
#ifdef FEAT_SODIUM
|
||||
crypt_check_swapfile_curbuf();
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -583,10 +683,13 @@ crypt_get_key(
|
||||
}
|
||||
|
||||
// since the user typed this, no need to wait for return
|
||||
if (msg_didout)
|
||||
msg_putchar('\n');
|
||||
need_wait_return = FALSE;
|
||||
msg_didout = FALSE;
|
||||
if (crypt_get_method_nr(curbuf) != CRYPT_M_SOD)
|
||||
{
|
||||
if (msg_didout)
|
||||
msg_putchar('\n');
|
||||
need_wait_return = FALSE;
|
||||
msg_didout = FALSE;
|
||||
}
|
||||
|
||||
crypt_free_key(p2);
|
||||
return p1;
|
||||
@@ -610,4 +713,270 @@ crypt_append_msg(
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
crypt_sodium_init(
|
||||
cryptstate_T *state UNUSED,
|
||||
char_u *key UNUSED,
|
||||
char_u *salt UNUSED,
|
||||
int salt_len UNUSED,
|
||||
char_u *seed UNUSED,
|
||||
int seed_len UNUSED)
|
||||
{
|
||||
# ifdef FEAT_SODIUM
|
||||
// crypto_box_SEEDBYTES == crypto_secretstream_xchacha20poly1305_KEYBYTES
|
||||
unsigned char dkey[crypto_box_SEEDBYTES]; // 32
|
||||
sodium_state_T *sd_state;
|
||||
|
||||
if (sodium_init() < 0)
|
||||
return FAIL;
|
||||
|
||||
sd_state = (sodium_state_T *)sodium_malloc(sizeof(sodium_state_T));
|
||||
sodium_memzero(sd_state, sizeof(sodium_state_T));
|
||||
|
||||
// derive a key from the password
|
||||
if (crypto_pwhash(dkey, sizeof(dkey), (const char *)key, STRLEN(key), salt,
|
||||
crypto_pwhash_OPSLIMIT_INTERACTIVE, crypto_pwhash_MEMLIMIT_INTERACTIVE,
|
||||
crypto_pwhash_ALG_DEFAULT) != 0)
|
||||
{
|
||||
// out of memory
|
||||
sodium_free(sd_state);
|
||||
return FAIL;
|
||||
}
|
||||
memcpy(sd_state->key, dkey, crypto_box_SEEDBYTES);
|
||||
sd_state->count = 0;
|
||||
state->method_state = sd_state;
|
||||
|
||||
return OK;
|
||||
# else
|
||||
emsg(e_libsodium_not_built_in);
|
||||
return FAIL;
|
||||
# endif
|
||||
}
|
||||
|
||||
/*
|
||||
* Encrypt "from[len]" into "to[len]".
|
||||
* "from" and "to" can be equal to encrypt in place.
|
||||
* Call needs to ensure that there is enough space in to (for the header)
|
||||
*/
|
||||
#if 0 // Currently unused
|
||||
void
|
||||
crypt_sodium_encode(
|
||||
cryptstate_T *state UNUSED,
|
||||
char_u *from UNUSED,
|
||||
size_t len UNUSED,
|
||||
char_u *to UNUSED,
|
||||
int last UNUSED)
|
||||
{
|
||||
# ifdef FEAT_SODIUM
|
||||
// crypto_box_SEEDBYTES == crypto_secretstream_xchacha20poly1305_KEYBYTES
|
||||
sodium_state_T *sod_st = state->method_state;
|
||||
unsigned char tag = last
|
||||
? crypto_secretstream_xchacha20poly1305_TAG_FINAL : 0;
|
||||
|
||||
if (sod_st->count == 0)
|
||||
{
|
||||
if (len <= crypto_secretstream_xchacha20poly1305_HEADERBYTES)
|
||||
{
|
||||
emsg(e_libsodium_cannot_encrypt_header);
|
||||
return;
|
||||
}
|
||||
crypto_secretstream_xchacha20poly1305_init_push(&sod_st->state,
|
||||
to, sod_st->key);
|
||||
to += crypto_secretstream_xchacha20poly1305_HEADERBYTES;
|
||||
}
|
||||
|
||||
if (sod_st->count && len <= crypto_secretstream_xchacha20poly1305_ABYTES)
|
||||
{
|
||||
emsg(e_libsodium_cannot_encrypt_buffer);
|
||||
return;
|
||||
}
|
||||
|
||||
crypto_secretstream_xchacha20poly1305_push(&sod_st->state, to, NULL,
|
||||
from, len, NULL, 0, tag);
|
||||
|
||||
sod_st->count++;
|
||||
# endif
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Decrypt "from[len]" into "to[len]".
|
||||
* "from" and "to" can be equal to encrypt in place.
|
||||
*/
|
||||
#if 0 // Currently unused
|
||||
void
|
||||
crypt_sodium_decode(
|
||||
cryptstate_T *state UNUSED,
|
||||
char_u *from UNUSED,
|
||||
size_t len UNUSED,
|
||||
char_u *to UNUSED,
|
||||
int last UNUSED)
|
||||
{
|
||||
# ifdef FEAT_SODIUM
|
||||
// crypto_box_SEEDBYTES == crypto_secretstream_xchacha20poly1305_KEYBYTES
|
||||
sodium_state_T *sod_st = state->method_state;
|
||||
unsigned char tag;
|
||||
unsigned long long buf_len;
|
||||
char_u *p1 = from;
|
||||
char_u *p2 = to;
|
||||
char_u *buf_out;
|
||||
|
||||
if (sod_st->count == 0
|
||||
&& len <= crypto_secretstream_xchacha20poly1305_HEADERBYTES)
|
||||
{
|
||||
emsg(e_libsodium_cannot_decrypt_header);
|
||||
return;
|
||||
}
|
||||
|
||||
buf_out = (char_u *)alloc(len);
|
||||
|
||||
if (buf_out == NULL)
|
||||
{
|
||||
emsg(e_libsodium_cannot_allocate_buffer);
|
||||
return;
|
||||
}
|
||||
if (sod_st->count == 0)
|
||||
{
|
||||
if (crypto_secretstream_xchacha20poly1305_init_pull(
|
||||
&sod_st->state, from, sod_st->key) != 0)
|
||||
{
|
||||
emsg(e_libsodium_decryption_failed_header_incomplete);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
from += crypto_secretstream_xchacha20poly1305_HEADERBYTES;
|
||||
len -= crypto_secretstream_xchacha20poly1305_HEADERBYTES;
|
||||
|
||||
if (p1 == p2)
|
||||
to += crypto_secretstream_xchacha20poly1305_HEADERBYTES;
|
||||
}
|
||||
|
||||
if (sod_st->count && len <= crypto_secretstream_xchacha20poly1305_ABYTES)
|
||||
{
|
||||
emsg(e_libsodium_cannot_decrypt_buffer);
|
||||
goto fail;
|
||||
}
|
||||
if (crypto_secretstream_xchacha20poly1305_pull(&sod_st->state,
|
||||
buf_out, &buf_len, &tag, from, len, NULL, 0) != 0)
|
||||
{
|
||||
emsg(e_libsodium_decryption_failed);
|
||||
goto fail;
|
||||
}
|
||||
sod_st->count++;
|
||||
|
||||
if (tag == crypto_secretstream_xchacha20poly1305_TAG_FINAL && !last)
|
||||
{
|
||||
emsg(e_libsodium_decryption_failed_premature);
|
||||
goto fail;
|
||||
}
|
||||
if (p1 == p2)
|
||||
mch_memmove(p2, buf_out, buf_len);
|
||||
|
||||
fail:
|
||||
vim_free(buf_out);
|
||||
# endif
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Encrypt "from[len]" into "to[len]".
|
||||
* "from" and "to" can be equal to encrypt in place.
|
||||
*/
|
||||
long
|
||||
crypt_sodium_buffer_encode(
|
||||
cryptstate_T *state UNUSED,
|
||||
char_u *from UNUSED,
|
||||
size_t len UNUSED,
|
||||
char_u **buf_out UNUSED,
|
||||
int last UNUSED)
|
||||
{
|
||||
# ifdef FEAT_SODIUM
|
||||
// crypto_box_SEEDBYTES == crypto_secretstream_xchacha20poly1305_KEYBYTES
|
||||
unsigned long long out_len;
|
||||
char_u *ptr;
|
||||
unsigned char tag = last
|
||||
? crypto_secretstream_xchacha20poly1305_TAG_FINAL : 0;
|
||||
int length;
|
||||
sodium_state_T *sod_st = state->method_state;
|
||||
int first = (sod_st->count == 0);
|
||||
|
||||
length = (int)len + crypto_secretstream_xchacha20poly1305_ABYTES
|
||||
+ (first ? crypto_secretstream_xchacha20poly1305_HEADERBYTES : 0);
|
||||
*buf_out = alloc_clear(length);
|
||||
if (*buf_out == NULL)
|
||||
{
|
||||
emsg(e_libsodium_cannot_allocate_buffer);
|
||||
return -1;
|
||||
}
|
||||
ptr = *buf_out;
|
||||
|
||||
if (first)
|
||||
{
|
||||
crypto_secretstream_xchacha20poly1305_init_push(&sod_st->state,
|
||||
ptr, sod_st->key);
|
||||
ptr += crypto_secretstream_xchacha20poly1305_HEADERBYTES;
|
||||
}
|
||||
|
||||
crypto_secretstream_xchacha20poly1305_push(&sod_st->state, ptr,
|
||||
&out_len, from, len, NULL, 0, tag);
|
||||
|
||||
sod_st->count++;
|
||||
return out_len + (first
|
||||
? crypto_secretstream_xchacha20poly1305_HEADERBYTES : 0);
|
||||
# else
|
||||
return -1;
|
||||
# endif
|
||||
}
|
||||
|
||||
/*
|
||||
* Decrypt "from[len]" into "to[len]".
|
||||
* "from" and "to" can be equal to encrypt in place.
|
||||
*/
|
||||
long
|
||||
crypt_sodium_buffer_decode(
|
||||
cryptstate_T *state UNUSED,
|
||||
char_u *from UNUSED,
|
||||
size_t len UNUSED,
|
||||
char_u **buf_out UNUSED,
|
||||
int last UNUSED)
|
||||
{
|
||||
# ifdef FEAT_SODIUM
|
||||
// crypto_box_SEEDBYTES == crypto_secretstream_xchacha20poly1305_KEYBYTES
|
||||
sodium_state_T *sod_st = state->method_state;
|
||||
unsigned char tag;
|
||||
unsigned long long out_len;
|
||||
*buf_out = alloc_clear(len);
|
||||
if (*buf_out == NULL)
|
||||
{
|
||||
emsg(e_libsodium_cannot_allocate_buffer);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (sod_st->count == 0)
|
||||
{
|
||||
if (crypto_secretstream_xchacha20poly1305_init_pull(&sod_st->state,
|
||||
from, sod_st->key) != 0)
|
||||
{
|
||||
emsg(e_libsodium_decryption_failed_header_incomplete);
|
||||
return -1;
|
||||
}
|
||||
from += crypto_secretstream_xchacha20poly1305_HEADERBYTES;
|
||||
len -= crypto_secretstream_xchacha20poly1305_HEADERBYTES;
|
||||
sod_st->count++;
|
||||
}
|
||||
if (crypto_secretstream_xchacha20poly1305_pull(&sod_st->state,
|
||||
*buf_out, &out_len, &tag, from, len, NULL, 0) != 0)
|
||||
{
|
||||
emsg(e_libsodium_decryption_failed);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (tag == crypto_secretstream_xchacha20poly1305_TAG_FINAL && !last)
|
||||
emsg(e_libsodium_decryption_failed_premature);
|
||||
return (long) out_len;
|
||||
# else
|
||||
return -1;
|
||||
# endif
|
||||
}
|
||||
|
||||
#endif // FEAT_CRYPT
|
||||
|
||||
@@ -114,7 +114,8 @@ crypt_zip_encode(
|
||||
cryptstate_T *state,
|
||||
char_u *from,
|
||||
size_t len,
|
||||
char_u *to)
|
||||
char_u *to,
|
||||
int last UNUSED)
|
||||
{
|
||||
zip_state_T *zs = state->method_state;
|
||||
size_t i;
|
||||
@@ -137,7 +138,8 @@ crypt_zip_decode(
|
||||
cryptstate_T *state,
|
||||
char_u *from,
|
||||
size_t len,
|
||||
char_u *to)
|
||||
char_u *to,
|
||||
int last UNUSED)
|
||||
{
|
||||
zip_state_T *zs = state->method_state;
|
||||
size_t i;
|
||||
|
||||
@@ -218,7 +218,7 @@ do_debug(char_u *cmd)
|
||||
|
||||
if (last_cmd != 0)
|
||||
{
|
||||
// Execute debug command: decided where to break next and
|
||||
// Execute debug command: decide where to break next and
|
||||
// return.
|
||||
switch (last_cmd)
|
||||
{
|
||||
@@ -562,7 +562,7 @@ dbg_parsearg(
|
||||
{
|
||||
if (curbuf->b_ffname == NULL)
|
||||
{
|
||||
emsg(_(e_noname));
|
||||
emsg(_(e_no_file_name));
|
||||
return FAIL;
|
||||
}
|
||||
bp->dbg_type = DBG_FILE;
|
||||
@@ -606,7 +606,7 @@ dbg_parsearg(
|
||||
}
|
||||
|
||||
if (bp->dbg_type == DBG_FUNC)
|
||||
bp->dbg_name = vim_strsave(p);
|
||||
bp->dbg_name = vim_strsave(STRNCMP(p, "g:", 2) == 0 ? p + 2 : p);
|
||||
else if (here)
|
||||
bp->dbg_name = vim_strsave(curbuf->b_ffname);
|
||||
else if (bp->dbg_type == DBG_EXPR)
|
||||
|
||||
14
src/dict.c
14
src/dict.c
@@ -1073,7 +1073,7 @@ failret:
|
||||
* Otherwise duplicate keys are ignored ("action" is "keep").
|
||||
*/
|
||||
void
|
||||
dict_extend(dict_T *d1, dict_T *d2, char_u *action)
|
||||
dict_extend(dict_T *d1, dict_T *d2, char_u *action, char *func_name)
|
||||
{
|
||||
dictitem_T *di1;
|
||||
hashitem_T *hi2;
|
||||
@@ -1106,8 +1106,8 @@ dict_extend(dict_T *d1, dict_T *d2, char_u *action)
|
||||
}
|
||||
|
||||
if (type != NULL
|
||||
&& check_typval_arg_type(type, &HI2DI(hi2)->di_tv, 0)
|
||||
== FAIL)
|
||||
&& check_typval_arg_type(type, &HI2DI(hi2)->di_tv,
|
||||
func_name, 0) == FAIL)
|
||||
break;
|
||||
|
||||
if (di1 == NULL)
|
||||
@@ -1201,6 +1201,9 @@ dict_list(typval_T *argvars, typval_T *rettv, int what)
|
||||
dict_T *d;
|
||||
int todo;
|
||||
|
||||
if (in_vim9script() && check_for_dict_arg(argvars, 0) == FAIL)
|
||||
return;
|
||||
|
||||
if (argvars[0].v_type != VAR_DICT)
|
||||
{
|
||||
emsg(_(e_dictreq));
|
||||
@@ -1318,6 +1321,11 @@ dict_set_items_ro(dict_T *di)
|
||||
void
|
||||
f_has_key(typval_T *argvars, typval_T *rettv)
|
||||
{
|
||||
if (in_vim9script()
|
||||
&& (check_for_dict_arg(argvars, 0) == FAIL
|
||||
|| check_for_string_or_number_arg(argvars, 1) == FAIL))
|
||||
return;
|
||||
|
||||
if (argvars[0].v_type != VAR_DICT)
|
||||
{
|
||||
emsg(_(e_dictreq));
|
||||
|
||||
11
src/diff.c
11
src/diff.c
@@ -3272,6 +3272,9 @@ xdiff_out(void *priv, mmbuffer_t *mb, int nbuf)
|
||||
f_diff_filler(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
|
||||
{
|
||||
#ifdef FEAT_DIFF
|
||||
if (in_vim9script() && check_for_lnum_arg(argvars, 0) == FAIL)
|
||||
return;
|
||||
|
||||
rettv->vval.v_number = diff_check_fill(curwin, tv_get_lnum(argvars));
|
||||
#endif
|
||||
}
|
||||
@@ -3283,7 +3286,7 @@ f_diff_filler(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
|
||||
f_diff_hlID(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
|
||||
{
|
||||
#ifdef FEAT_DIFF
|
||||
linenr_T lnum = tv_get_lnum(argvars);
|
||||
linenr_T lnum;
|
||||
static linenr_T prev_lnum = 0;
|
||||
static varnumber_T changedtick = 0;
|
||||
static int fnum = 0;
|
||||
@@ -3293,6 +3296,12 @@ f_diff_hlID(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
|
||||
int filler_lines;
|
||||
int col;
|
||||
|
||||
if (in_vim9script()
|
||||
&& (check_for_lnum_arg(argvars,0) == FAIL
|
||||
|| check_for_number_arg(argvars, 1) == FAIL))
|
||||
return;
|
||||
|
||||
lnum = tv_get_lnum(argvars);
|
||||
if (lnum < 0) // ignore type error in {lnum} arg
|
||||
lnum = 0;
|
||||
if (lnum != prev_lnum
|
||||
|
||||
410
src/digraph.c
410
src/digraph.c
@@ -1781,7 +1781,7 @@ do_digraph(int c)
|
||||
else if (p_dg)
|
||||
{
|
||||
if (backspaced >= 0)
|
||||
c = getdigraph(backspaced, c, FALSE);
|
||||
c = digraph_get(backspaced, c, FALSE);
|
||||
backspaced = -1;
|
||||
if ((c == K_BS || c == Ctrl_H) && lastchar >= 0)
|
||||
backspaced = lastchar;
|
||||
@@ -1887,7 +1887,7 @@ get_digraph(
|
||||
--no_mapping;
|
||||
--allow_keys;
|
||||
if (cc != ESC) // ESC cancels CTRL-K
|
||||
return getdigraph(c, cc, TRUE);
|
||||
return digraph_get(c, cc, TRUE);
|
||||
}
|
||||
return NUL;
|
||||
}
|
||||
@@ -1981,7 +1981,7 @@ getexactdigraph(int char1, int char2, int meta_char)
|
||||
* Allow for both char1-char2 and char2-char1
|
||||
*/
|
||||
int
|
||||
getdigraph(int char1, int char2, int meta_char)
|
||||
digraph_get(int char1, int char2, int meta_char)
|
||||
{
|
||||
int retval;
|
||||
|
||||
@@ -1992,6 +1992,65 @@ getdigraph(int char1, int char2, int meta_char)
|
||||
return retval;
|
||||
}
|
||||
|
||||
/*
|
||||
* Add a digraph to the digraph table.
|
||||
*/
|
||||
static void
|
||||
registerdigraph(int char1, int char2, int n)
|
||||
{
|
||||
int i;
|
||||
digr_T *dp;
|
||||
|
||||
// If the digraph already exists, replace "result".
|
||||
dp = (digr_T *)user_digraphs.ga_data;
|
||||
for (i = 0; i < user_digraphs.ga_len; ++i)
|
||||
{
|
||||
if ((int)dp->char1 == char1 && (int)dp->char2 == char2)
|
||||
{
|
||||
dp->result = n;
|
||||
return;
|
||||
}
|
||||
++dp;
|
||||
}
|
||||
|
||||
// Add a new digraph to the table.
|
||||
if (ga_grow(&user_digraphs, 1) == OK)
|
||||
{
|
||||
dp = (digr_T *)user_digraphs.ga_data + user_digraphs.ga_len;
|
||||
dp->char1 = char1;
|
||||
dp->char2 = char2;
|
||||
dp->result = n;
|
||||
++user_digraphs.ga_len;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Check the characters are valid for a digraph.
|
||||
* If they are valid, returns TRUE; otherwise, give an error message and
|
||||
* returns FALSE.
|
||||
*/
|
||||
int
|
||||
check_digraph_chars_valid(int char1, int char2)
|
||||
{
|
||||
if (char2 == 0)
|
||||
{
|
||||
char_u msg[MB_MAXBYTES + 1];
|
||||
|
||||
msg[mb_char2bytes(char1, msg)] = NUL;
|
||||
|
||||
semsg(_(e_digraph_must_be_just_two_characters_str), msg);
|
||||
return FALSE;
|
||||
}
|
||||
if (char1 == ESC || char2 == ESC)
|
||||
{
|
||||
emsg(_("E104: Escape not allowed in digraph"));
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Add the digraphs in the argument to the digraph table.
|
||||
* format: {c1}{c2} char {c1}{c2} char ...
|
||||
@@ -2000,8 +2059,6 @@ getdigraph(int char1, int char2, int meta_char)
|
||||
putdigraph(char_u *str)
|
||||
{
|
||||
int char1, char2, n;
|
||||
int i;
|
||||
digr_T *dp;
|
||||
|
||||
while (*str != NUL)
|
||||
{
|
||||
@@ -2010,48 +2067,19 @@ putdigraph(char_u *str)
|
||||
return;
|
||||
char1 = *str++;
|
||||
char2 = *str++;
|
||||
if (char2 == 0)
|
||||
{
|
||||
emsg(_(e_invarg));
|
||||
|
||||
if (!check_digraph_chars_valid(char1, char2))
|
||||
return;
|
||||
}
|
||||
if (char1 == ESC || char2 == ESC)
|
||||
{
|
||||
emsg(_("E104: Escape not allowed in digraph"));
|
||||
return;
|
||||
}
|
||||
|
||||
str = skipwhite(str);
|
||||
if (!VIM_ISDIGIT(*str))
|
||||
{
|
||||
emsg(_(e_number_exp));
|
||||
emsg(_(e_number_expected));
|
||||
return;
|
||||
}
|
||||
n = getdigits(&str);
|
||||
|
||||
// If the digraph already exists, replace the result.
|
||||
dp = (digr_T *)user_digraphs.ga_data;
|
||||
for (i = 0; i < user_digraphs.ga_len; ++i)
|
||||
{
|
||||
if ((int)dp->char1 == char1 && (int)dp->char2 == char2)
|
||||
{
|
||||
dp->result = n;
|
||||
break;
|
||||
}
|
||||
++dp;
|
||||
}
|
||||
|
||||
// Add a new digraph to the table.
|
||||
if (i == user_digraphs.ga_len)
|
||||
{
|
||||
if (ga_grow(&user_digraphs, 1) == OK)
|
||||
{
|
||||
dp = (digr_T *)user_digraphs.ga_data + user_digraphs.ga_len;
|
||||
dp->char1 = char1;
|
||||
dp->char2 = char2;
|
||||
dp->result = n;
|
||||
++user_digraphs.ga_len;
|
||||
}
|
||||
}
|
||||
registerdigraph(char1, char2, n);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2114,6 +2142,97 @@ listdigraphs(int use_headers)
|
||||
// wrong, in which case we messed up ScreenLines
|
||||
}
|
||||
|
||||
static void
|
||||
digraph_getlist_appendpair(digr_T *dp, list_T *l)
|
||||
{
|
||||
char_u buf[30];
|
||||
char_u *p;
|
||||
list_T *l2;
|
||||
listitem_T *li, *li2;
|
||||
|
||||
|
||||
li = listitem_alloc();
|
||||
if (li == NULL)
|
||||
return;
|
||||
list_append(l, li);
|
||||
li->li_tv.v_type = VAR_LIST;
|
||||
li->li_tv.v_lock = 0;
|
||||
|
||||
l2 = list_alloc();
|
||||
li->li_tv.vval.v_list = l2;
|
||||
if (l2 == NULL)
|
||||
return;
|
||||
++l2->lv_refcount;
|
||||
|
||||
li2 = listitem_alloc();
|
||||
if (li2 == NULL)
|
||||
return;
|
||||
list_append(l2, li2);
|
||||
li2->li_tv.v_type = VAR_STRING;
|
||||
li2->li_tv.v_lock = 0;
|
||||
|
||||
buf[0] = dp->char1;
|
||||
buf[1] = dp->char2;
|
||||
buf[2] = NUL;
|
||||
li2->li_tv.vval.v_string = vim_strsave(&buf[0]);
|
||||
|
||||
li2 = listitem_alloc();
|
||||
if (li2 == NULL)
|
||||
return;
|
||||
list_append(l2, li2);
|
||||
li2->li_tv.v_type = VAR_STRING;
|
||||
li2->li_tv.v_lock = 0;
|
||||
|
||||
p = buf;
|
||||
if (has_mbyte)
|
||||
p += (*mb_char2bytes)(dp->result, p);
|
||||
else
|
||||
*p++ = (char_u)dp->result;
|
||||
*p = NUL;
|
||||
|
||||
li2->li_tv.vval.v_string = vim_strsave(buf);
|
||||
}
|
||||
|
||||
void
|
||||
digraph_getlist_common(int list_all, typval_T *rettv)
|
||||
{
|
||||
int i;
|
||||
digr_T *dp;
|
||||
|
||||
if (rettv_list_alloc(rettv) == FAIL)
|
||||
return;
|
||||
|
||||
if (list_all)
|
||||
{
|
||||
dp = digraphdefault;
|
||||
for (i = 0; dp->char1 != NUL && !got_int; ++i)
|
||||
{
|
||||
#ifdef USE_UNICODE_DIGRAPHS
|
||||
digr_T tmp;
|
||||
|
||||
tmp.char1 = dp->char1;
|
||||
tmp.char2 = dp->char2;
|
||||
tmp.result = getexactdigraph(tmp.char1, tmp.char2, FALSE);
|
||||
if (tmp.result != 0 && tmp.result != tmp.char2
|
||||
&& (has_mbyte || tmp.result <= 255))
|
||||
digraph_getlist_appendpair(&tmp, rettv->vval.v_list);
|
||||
#else
|
||||
if (getexactdigraph(dp->char1, dp->char2, FALSE) == dp->result
|
||||
&& (has_mbyte || dp->result <= 255))
|
||||
digraph_getlist_appendpair(dp, rettv->vval.v_list);
|
||||
#endif
|
||||
++dp;
|
||||
}
|
||||
}
|
||||
|
||||
dp = (digr_T *)user_digraphs.ga_data;
|
||||
for (i = 0; i < user_digraphs.ga_len && !got_int; ++i)
|
||||
{
|
||||
digraph_getlist_appendpair(dp, rettv->vval.v_list);
|
||||
++dp;
|
||||
}
|
||||
}
|
||||
|
||||
static struct dg_header_entry {
|
||||
int dg_start;
|
||||
char *dg_header;
|
||||
@@ -2210,8 +2329,219 @@ printdigraph(digr_T *dp, result_T *previous)
|
||||
}
|
||||
}
|
||||
|
||||
# ifdef FEAT_EVAL
|
||||
/*
|
||||
* Get the two digraph characters from a typval.
|
||||
* Return OK or FAIL.
|
||||
*/
|
||||
static int
|
||||
get_digraph_chars(typval_T *arg, int *char1, int *char2)
|
||||
{
|
||||
char_u buf_chars[NUMBUFLEN];
|
||||
char_u *chars = tv_get_string_buf_chk(arg, buf_chars);
|
||||
char_u *p = chars;
|
||||
|
||||
if (p != NULL)
|
||||
{
|
||||
if (*p != NUL)
|
||||
{
|
||||
*char1 = mb_cptr2char_adv(&p);
|
||||
if (*p != NUL)
|
||||
{
|
||||
*char2 = mb_cptr2char_adv(&p);
|
||||
if (*p == NUL)
|
||||
{
|
||||
if (check_digraph_chars_valid(*char1, *char2))
|
||||
return OK;
|
||||
return FAIL;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
semsg(_(e_digraph_must_be_just_two_characters_str), chars);
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
static int
|
||||
digraph_set_common(typval_T *argchars, typval_T *argdigraph)
|
||||
{
|
||||
int char1, char2;
|
||||
char_u *digraph;
|
||||
char_u *p;
|
||||
char_u buf_digraph[NUMBUFLEN];
|
||||
varnumber_T n;
|
||||
|
||||
if (get_digraph_chars(argchars, &char1, &char2) == FAIL)
|
||||
return FALSE;
|
||||
|
||||
digraph = tv_get_string_buf_chk(argdigraph, buf_digraph);
|
||||
if (digraph == NULL)
|
||||
return FALSE;
|
||||
p = digraph;
|
||||
n = mb_cptr2char_adv(&p);
|
||||
if (*p != NUL)
|
||||
{
|
||||
semsg(_(e_digraph_argument_must_be_one_character_str), digraph);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
registerdigraph(char1, char2, (int)n);
|
||||
return TRUE;
|
||||
}
|
||||
# endif
|
||||
|
||||
#endif // FEAT_DIGRAPHS
|
||||
|
||||
#if defined(FEAT_EVAL) || defined(PROTO)
|
||||
/*
|
||||
* "digraph_get()" function
|
||||
*/
|
||||
void
|
||||
f_digraph_get(typval_T *argvars, typval_T *rettv)
|
||||
{
|
||||
# ifdef FEAT_DIGRAPHS
|
||||
int code;
|
||||
char_u buf[NUMBUFLEN];
|
||||
char_u *digraphs;
|
||||
|
||||
rettv->v_type = VAR_STRING;
|
||||
rettv->vval.v_string = NULL; // Return empty string for failure
|
||||
|
||||
if (in_vim9script() && check_for_string_arg(argvars, 0) == FAIL)
|
||||
return;
|
||||
|
||||
digraphs = tv_get_string_chk(&argvars[0]);
|
||||
|
||||
if (digraphs == NULL)
|
||||
return;
|
||||
else if (STRLEN(digraphs) != 2)
|
||||
{
|
||||
semsg(_(e_digraph_must_be_just_two_characters_str), digraphs);
|
||||
return;
|
||||
}
|
||||
code = digraph_get(digraphs[0], digraphs[1], FALSE);
|
||||
|
||||
if (has_mbyte)
|
||||
buf[(*mb_char2bytes)(code, buf)] = NUL;
|
||||
else {
|
||||
buf[0] = code;
|
||||
buf[1] = NUL;
|
||||
}
|
||||
|
||||
rettv->vval.v_string = vim_strsave(buf);
|
||||
# else
|
||||
emsg(_(e_no_digraphs_version));
|
||||
# endif
|
||||
}
|
||||
|
||||
/*
|
||||
* "digraph_getlist()" function
|
||||
*/
|
||||
void
|
||||
f_digraph_getlist(typval_T *argvars, typval_T *rettv)
|
||||
{
|
||||
# ifdef FEAT_DIGRAPHS
|
||||
int flag_list_all;
|
||||
|
||||
if (in_vim9script() && check_for_opt_number_arg(argvars, 0) == FAIL)
|
||||
return;
|
||||
|
||||
if (argvars[0].v_type == VAR_UNKNOWN)
|
||||
flag_list_all = FALSE;
|
||||
else
|
||||
{
|
||||
int error = FALSE;
|
||||
varnumber_T flag = tv_get_number_chk(&argvars[0], &error);
|
||||
if (error)
|
||||
return;
|
||||
flag_list_all = flag ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
digraph_getlist_common(flag_list_all, rettv);
|
||||
# else
|
||||
emsg(_(e_no_digraphs_version));
|
||||
# endif
|
||||
}
|
||||
|
||||
/*
|
||||
* "digraph_set()" function
|
||||
*/
|
||||
void
|
||||
f_digraph_set(typval_T *argvars, typval_T *rettv)
|
||||
{
|
||||
# ifdef FEAT_DIGRAPHS
|
||||
rettv->v_type = VAR_BOOL;
|
||||
rettv->vval.v_number = VVAL_FALSE;
|
||||
|
||||
if (in_vim9script()
|
||||
&& (check_for_string_arg(argvars, 0) == FAIL
|
||||
|| check_for_number_arg(argvars, 1) == FAIL))
|
||||
return;
|
||||
|
||||
if (!digraph_set_common(&argvars[0], &argvars[1]))
|
||||
return;
|
||||
|
||||
rettv->vval.v_number = VVAL_TRUE;
|
||||
# else
|
||||
emsg(_(e_no_digraphs_version));
|
||||
# endif
|
||||
}
|
||||
|
||||
/*
|
||||
* "digraph_setlist()" function
|
||||
*/
|
||||
void
|
||||
f_digraph_setlist(typval_T * argvars, typval_T *rettv)
|
||||
{
|
||||
# ifdef FEAT_DIGRAPHS
|
||||
list_T *pl, *l;
|
||||
listitem_T *pli;
|
||||
|
||||
rettv->v_type = VAR_BOOL;
|
||||
rettv->vval.v_number = VVAL_FALSE;
|
||||
|
||||
if (argvars[0].v_type != VAR_LIST)
|
||||
{
|
||||
emsg(_(e_digraph_setlist_argument_must_be_list_of_lists_with_two_items));
|
||||
return;
|
||||
}
|
||||
|
||||
pl = argvars[0].vval.v_list;
|
||||
if (pl == NULL)
|
||||
{
|
||||
// Empty list always results in success.
|
||||
rettv->vval.v_number = VVAL_TRUE;
|
||||
return;
|
||||
}
|
||||
|
||||
FOR_ALL_LIST_ITEMS(pl, pli)
|
||||
{
|
||||
if (pli->li_tv.v_type != VAR_LIST)
|
||||
{
|
||||
emsg(_(e_digraph_setlist_argument_must_be_list_of_lists_with_two_items));
|
||||
return;
|
||||
}
|
||||
|
||||
l = pli->li_tv.vval.v_list;
|
||||
if (l == NULL || l->lv_len != 2)
|
||||
{
|
||||
emsg(_(e_digraph_setlist_argument_must_be_list_of_lists_with_two_items));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!digraph_set_common(&l->lv_first->li_tv,
|
||||
&l->lv_first->li_next->li_tv))
|
||||
return;
|
||||
}
|
||||
rettv->vval.v_number = VVAL_TRUE;
|
||||
# else
|
||||
emsg(_(e_no_digraphs_version));
|
||||
# endif
|
||||
}
|
||||
|
||||
#endif // FEAT_EVAL
|
||||
|
||||
|
||||
#if defined(FEAT_KEYMAP) || defined(PROTO)
|
||||
|
||||
// structure used for b_kmap_ga.ga_data
|
||||
@@ -2253,7 +2583,7 @@ keymap_init(void)
|
||||
buflen = STRLEN(curbuf->b_p_keymap) + STRLEN(p_enc) + 14;
|
||||
buf = alloc(buflen);
|
||||
if (buf == NULL)
|
||||
return e_outofmem;
|
||||
return e_out_of_memory;
|
||||
|
||||
// try finding "keymap/'keymap'_'encoding'.vim" in 'runtimepath'
|
||||
vim_snprintf((char *)buf, buflen, "keymap/%s_%s.vim",
|
||||
|
||||
@@ -1580,6 +1580,7 @@ install_registry(void)
|
||||
char display_name[BUFSIZE];
|
||||
char uninstall_string[BUFSIZE];
|
||||
char icon_string[BUFSIZE];
|
||||
char version_string[BUFSIZE];
|
||||
int i;
|
||||
int loop_count = is_64bit_os() ? 2 : 1;
|
||||
DWORD flag;
|
||||
@@ -1652,13 +1653,15 @@ install_registry(void)
|
||||
|
||||
sprintf(icon_string, "%s\\gvim.exe,0", installdir);
|
||||
|
||||
sprintf(version_string, VIM_VERSION_SHORT "." VIM_VERSION_PATCHLEVEL_STR);
|
||||
|
||||
lRet = register_uninstall(
|
||||
HKEY_LOCAL_MACHINE,
|
||||
"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Vim " VIM_VERSION_SHORT,
|
||||
display_name,
|
||||
uninstall_string,
|
||||
icon_string,
|
||||
VIM_VERSION_SHORT,
|
||||
version_string,
|
||||
"Bram Moolenaar et al.");
|
||||
if (ERROR_SUCCESS != lRet)
|
||||
return FAIL;
|
||||
|
||||
@@ -1121,8 +1121,9 @@ win_line(
|
||||
int t;
|
||||
|
||||
// like rl_mirror(), but keep the space at the end
|
||||
p2 = skiptowhite(extra) - 1;
|
||||
for (p1 = extra; p1 < p2; ++p1, --p2)
|
||||
p2 = skipwhite(extra);
|
||||
p2 = skiptowhite(p2) - 1;
|
||||
for (p1 = skipwhite(extra); p1 < p2; ++p1, --p2)
|
||||
{
|
||||
t = *p1;
|
||||
*p1 = *p2;
|
||||
@@ -2782,6 +2783,7 @@ win_line(
|
||||
// Show "extends" character from 'listchars' if beyond the line end and
|
||||
// 'list' is set.
|
||||
if (wp->w_lcs_chars.ext != NUL
|
||||
&& draw_state == WL_LINE
|
||||
&& wp->w_p_list
|
||||
&& !wp->w_p_wrap
|
||||
#ifdef FEAT_DIFF
|
||||
@@ -3049,7 +3051,8 @@ win_line(
|
||||
wp->w_p_rl ? (col < 0) :
|
||||
#endif
|
||||
(col >= wp->w_width))
|
||||
&& (*ptr != NUL
|
||||
&& (draw_state != WL_LINE
|
||||
|| *ptr != NUL
|
||||
#ifdef FEAT_DIFF
|
||||
|| filler_todo > 0
|
||||
#endif
|
||||
|
||||
@@ -1379,6 +1379,15 @@ fold_line(
|
||||
curwin->w_cline_folded = TRUE;
|
||||
curwin->w_valid |= (VALID_CHEIGHT|VALID_CROW);
|
||||
}
|
||||
|
||||
# ifdef FEAT_CONCEAL
|
||||
// When the line was not folded w_wrow may have been set, recompute it.
|
||||
if (wp == curwin
|
||||
&& wp->w_cursor.lnum >= lnum
|
||||
&& wp->w_cursor.lnum <= lnume
|
||||
&& conceal_cursor_line(wp))
|
||||
curs_columns(TRUE);
|
||||
# endif
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1997,18 +2006,47 @@ win_update(win_T *wp)
|
||||
{
|
||||
colnr_T fromc, toc;
|
||||
#if defined(FEAT_LINEBREAK)
|
||||
int save_ve_flags = ve_flags;
|
||||
int save_ve_flags = curbuf->b_ve_flags;
|
||||
|
||||
if (curwin->w_p_lbr)
|
||||
ve_flags = VE_ALL;
|
||||
curbuf->b_ve_flags = VE_ALL;
|
||||
#endif
|
||||
getvcols(wp, &VIsual, &curwin->w_cursor, &fromc, &toc);
|
||||
#if defined(FEAT_LINEBREAK)
|
||||
ve_flags = save_ve_flags;
|
||||
#endif
|
||||
++toc;
|
||||
#if defined(FEAT_LINEBREAK)
|
||||
curbuf->b_ve_flags = save_ve_flags;
|
||||
#endif
|
||||
// Highlight to the end of the line, unless 'virtualedit' has
|
||||
// "block".
|
||||
if (curwin->w_curswant == MAXCOL)
|
||||
toc = MAXCOL;
|
||||
{
|
||||
if (get_ve_flags() & VE_BLOCK)
|
||||
{
|
||||
pos_T pos;
|
||||
int cursor_above =
|
||||
curwin->w_cursor.lnum < VIsual.lnum;
|
||||
|
||||
// Need to find the longest line.
|
||||
toc = 0;
|
||||
pos.coladd = 0;
|
||||
for (pos.lnum = curwin->w_cursor.lnum; cursor_above
|
||||
? pos.lnum <= VIsual.lnum
|
||||
: pos.lnum >= VIsual.lnum;
|
||||
pos.lnum += cursor_above ? 1 : -1)
|
||||
{
|
||||
colnr_T t;
|
||||
|
||||
pos.col = (int)STRLEN(ml_get_buf(wp->w_buffer,
|
||||
pos.lnum, FALSE));
|
||||
getvvcol(wp, &pos, NULL, NULL, &t);
|
||||
if (toc < t)
|
||||
toc = t;
|
||||
}
|
||||
++toc;
|
||||
}
|
||||
else
|
||||
toc = MAXCOL;
|
||||
}
|
||||
|
||||
if (fromc != wp->w_old_cursor_fcol
|
||||
|| toc != wp->w_old_cursor_lcol)
|
||||
@@ -2211,9 +2249,11 @@ win_update(win_T *wp)
|
||||
// up or down to minimize redrawing.
|
||||
// Don't do this when the change continues until the end.
|
||||
// Don't scroll when dollar_vcol >= 0, keep the "$".
|
||||
// Don't scroll when redrawing the top, scrolled already above.
|
||||
if (lnum == mod_top
|
||||
&& mod_bot != MAXLNUM
|
||||
&& !(dollar_vcol >= 0 && mod_bot == mod_top + 1))
|
||||
&& !(dollar_vcol >= 0 && mod_bot == mod_top + 1)
|
||||
&& row >= top_end)
|
||||
{
|
||||
int old_rows = 0;
|
||||
int new_rows = 0;
|
||||
|
||||
27
src/edit.c
27
src/edit.c
@@ -147,6 +147,9 @@ edit(
|
||||
#ifdef FEAT_JOB_CHANNEL
|
||||
int cmdchar_todo = cmdchar;
|
||||
#endif
|
||||
#ifdef FEAT_CONCEAL
|
||||
int cursor_line_was_concealed;
|
||||
#endif
|
||||
|
||||
// Remember whether editing was restarted after CTRL-O.
|
||||
did_restart_edit = restart_edit;
|
||||
@@ -162,7 +165,7 @@ edit(
|
||||
// Don't allow inserting in the sandbox.
|
||||
if (sandbox != 0)
|
||||
{
|
||||
emsg(_(e_sandbox));
|
||||
emsg(_(e_not_allowed_in_sandbox));
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
@@ -222,9 +225,9 @@ edit(
|
||||
}
|
||||
|
||||
#ifdef FEAT_CONCEAL
|
||||
// Check if the cursor line needs redrawing before changing State. If
|
||||
// 'concealcursor' is "n" it needs to be redrawn without concealing.
|
||||
conceal_check_cursor_line();
|
||||
// Check if the cursor line was concealed before changing State.
|
||||
cursor_line_was_concealed = curwin->w_p_cole > 0
|
||||
&& conceal_cursor_line(curwin);
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -283,6 +286,12 @@ edit(
|
||||
|
||||
stop_insert_mode = FALSE;
|
||||
|
||||
#ifdef FEAT_CONCEAL
|
||||
// Check if the cursor line needs redrawing after changing State. If
|
||||
// 'concealcursor' is "n" it needs to be redrawn without concealing.
|
||||
conceal_check_cursor_line(cursor_line_was_concealed);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Need to recompute the cursor position, it might move when the cursor is
|
||||
* on a TAB or special character.
|
||||
@@ -852,7 +861,7 @@ doESCkey:
|
||||
ins_ctrl_o();
|
||||
|
||||
// don't move the cursor left when 'virtualedit' has "onemore".
|
||||
if (ve_flags & VE_ONEMORE)
|
||||
if (get_ve_flags() & VE_ONEMORE)
|
||||
{
|
||||
ins_at_eol = FALSE;
|
||||
nomove = TRUE;
|
||||
@@ -2664,7 +2673,7 @@ oneright(void)
|
||||
|
||||
// move "l" bytes right, but don't end up on the NUL, unless 'virtualedit'
|
||||
// contains "onemore".
|
||||
if (ptr[l] == NUL && (ve_flags & VE_ONEMORE) == 0)
|
||||
if (ptr[l] == NUL && (get_ve_flags() & VE_ONEMORE) == 0)
|
||||
return FAIL;
|
||||
curwin->w_cursor.col += l;
|
||||
|
||||
@@ -2865,7 +2874,7 @@ stuff_inserted(
|
||||
ptr = get_last_insert();
|
||||
if (ptr == NULL)
|
||||
{
|
||||
emsg(_(e_noinstext));
|
||||
emsg(_(e_no_inserted_text_yet));
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
@@ -3647,7 +3656,7 @@ ins_esc(
|
||||
#endif
|
||||
)
|
||||
{
|
||||
if (curwin->w_cursor.coladd > 0 || ve_flags == VE_ALL)
|
||||
if (curwin->w_cursor.coladd > 0 || get_ve_flags() == VE_ALL)
|
||||
{
|
||||
oneleft();
|
||||
if (restart_edit != NUL)
|
||||
@@ -5210,7 +5219,7 @@ ins_digraph(void)
|
||||
if (cc != ESC)
|
||||
{
|
||||
AppendToRedobuff((char_u *)CTRL_V_STR);
|
||||
c = getdigraph(c, cc, TRUE);
|
||||
c = digraph_get(c, cc, TRUE);
|
||||
#ifdef FEAT_CMDL_INFO
|
||||
clear_showcmd();
|
||||
#endif
|
||||
|
||||
220
src/errors.h
220
src/errors.h
@@ -10,12 +10,141 @@
|
||||
* Definition of error messages, sorted on error number.
|
||||
*/
|
||||
|
||||
EXTERN char e_backslash_should_be_followed_by[]
|
||||
INIT(= N_("E10: \\ should be followed by /, ? or &"));
|
||||
#ifdef FEAT_CMDWIN
|
||||
EXTERN char e_invalid_in_cmdline_window[]
|
||||
INIT(= N_("E11: Invalid in command-line window; <CR> executes, CTRL-C quits"));
|
||||
#endif
|
||||
EXTERN char e_command_not_allowed_from_vimrc_in_current_dir_or_tag_search[]
|
||||
INIT(= N_("E12: Command not allowed from exrc/vimrc in current dir or tag search"));
|
||||
EXTERN char e_file_exists[]
|
||||
INIT(= N_("E13: File exists (add ! to override)"));
|
||||
#ifdef FEAT_EVAL
|
||||
EXTERN char e_invalid_expression_str[]
|
||||
INIT(= N_("E15: Invalid expression: \"%s\""));
|
||||
#endif
|
||||
EXTERN char e_invalid_range[]
|
||||
INIT(= N_("E16: Invalid range"));
|
||||
#if defined(UNIX) || defined(FEAT_SYN_HL) || defined(FEAT_SPELL)
|
||||
EXTERN char e_src_is_directory[]
|
||||
INIT(= N_("E17: \"%s\" is a directory"));
|
||||
#endif
|
||||
#ifdef FEAT_EVAL
|
||||
EXTERN char e_unexpected_characters_in_let[]
|
||||
INIT(= N_("E18: Unexpected characters in :let"));
|
||||
EXTERN char e_unexpected_characters_in_assignment[]
|
||||
INIT(= N_("E18: Unexpected characters in assignment"));
|
||||
#endif
|
||||
EXTERN char e_mark_has_invalid_line_number[]
|
||||
INIT(= N_("E19: Mark has invalid line number"));
|
||||
EXTERN char e_mark_not_set[]
|
||||
INIT(= N_("E20: Mark not set"));
|
||||
EXTERN char e_cannot_make_changes_modifiable_is_off[]
|
||||
INIT(= N_("E21: Cannot make changes, 'modifiable' is off"));
|
||||
EXTERN char e_scripts_nested_too_deep[]
|
||||
INIT(= N_("E22: Scripts nested too deep"));
|
||||
EXTERN char e_no_alternate_file[]
|
||||
INIT(= N_("E23: No alternate file"));
|
||||
EXTERN char e_no_such_abbreviation[]
|
||||
INIT(= N_("E24: No such abbreviation"));
|
||||
#if !defined(FEAT_GUI) || defined(VIMDLL)
|
||||
EXTERN char e_gui_cannot_be_used_not_enabled_at_compile_time[]
|
||||
INIT(= N_("E25: GUI cannot be used: Not enabled at compile time"));
|
||||
#endif
|
||||
#ifndef FEAT_RIGHTLEFT
|
||||
EXTERN char e_hebrew_cannot_be_used_not_enabled_at_compile_time[]
|
||||
INIT(= N_("E26: Hebrew cannot be used: Not enabled at compile time\n"));
|
||||
#endif
|
||||
EXTERN char e_farsi_support_has_been_removed[]
|
||||
INIT(= N_("E27: Farsi support has been removed\n"));
|
||||
#if defined(FEAT_SEARCH_EXTRA) || defined(FEAT_SYN_HL)
|
||||
EXTERN char e_no_such_highlight_group_name_str[]
|
||||
INIT(= N_("E28: No such highlight group name: %s"));
|
||||
#endif
|
||||
EXTERN char e_no_inserted_text_yet[]
|
||||
INIT(= N_("E29: No inserted text yet"));
|
||||
EXTERN char e_no_previous_command_line[]
|
||||
INIT(= N_("E30: No previous command line"));
|
||||
EXTERN char e_no_such_mapping[]
|
||||
INIT(= N_("E31: No such mapping"));
|
||||
EXTERN char e_no_file_name[]
|
||||
INIT(= N_("E32: No file name"));
|
||||
EXTERN char e_no_previous_substitute_regular_expression[]
|
||||
INIT(= N_("E33: No previous substitute regular expression"));
|
||||
EXTERN char e_no_previous_command[]
|
||||
INIT(= N_("E34: No previous command"));
|
||||
EXTERN char e_no_previous_regular_expression[]
|
||||
INIT(= N_("E35: No previous regular expression"));
|
||||
EXTERN char e_not_enough_room[]
|
||||
INIT(= N_("E36: Not enough room"));
|
||||
EXTERN char e_no_write_since_last_change[]
|
||||
INIT(= N_("E37: No write since last change"));
|
||||
EXTERN char e_no_write_since_last_change_add_bang_to_override[]
|
||||
INIT(= N_("E37: No write since last change (add ! to override)"));
|
||||
EXTERN char e_null_argument[]
|
||||
INIT(= N_("E38: Null argument"));
|
||||
#if defined(FEAT_DIGRAPHS) || defined(FEAT_TIMERS) || defined(FEAT_EVAL)
|
||||
EXTERN char e_number_expected[]
|
||||
INIT(= N_("E39: Number expected"));
|
||||
#endif
|
||||
#ifdef FEAT_QUICKFIX
|
||||
EXTERN char e_cant_open_errorfile_str[]
|
||||
INIT(= N_("E40: Can't open errorfile %s"));
|
||||
#endif
|
||||
EXTERN char e_out_of_memory[]
|
||||
INIT(= N_("E41: Out of memory!"));
|
||||
#ifdef FEAT_QUICKFIX
|
||||
EXTERN char e_no_errors[]
|
||||
INIT(= N_("E42: No Errors"));
|
||||
#endif
|
||||
EXTERN char e_damaged_match_string[]
|
||||
INIT(= N_("E43: Damaged match string"));
|
||||
EXTERN char e_corrupted_regexp_program[]
|
||||
INIT(= N_("E44: Corrupted regexp program"));
|
||||
EXTERN char e_readonly_option_is_set_add_bang_to_override[]
|
||||
INIT(= N_("E45: 'readonly' option is set (add ! to override)"));
|
||||
#ifdef FEAT_EVAL
|
||||
EXTERN char e_cannot_change_readonly_variable_str[]
|
||||
INIT(= N_("E46: Cannot change read-only variable \"%s\""));
|
||||
#endif
|
||||
#ifdef FEAT_QUICKFIX
|
||||
EXTERN char e_error_while_reading_errorfile[]
|
||||
INIT(= N_("E47: Error while reading errorfile"));
|
||||
#endif
|
||||
#ifdef HAVE_SANDBOX
|
||||
EXTERN char e_not_allowed_in_sandbox[]
|
||||
INIT(= N_("E48: Not allowed in sandbox"));
|
||||
#endif
|
||||
EXTERN char e_invalid_scroll_size[]
|
||||
INIT(= N_("E49: Invalid scroll size"));
|
||||
EXTERN char e_too_many_z[]
|
||||
INIT(= N_("E50: Too many \\z("));
|
||||
EXTERN char e_too_many_str_open[]
|
||||
INIT(= N_("E51: Too many %s("));
|
||||
EXTERN char e_unmatched_z[]
|
||||
INIT(= N_("E52: Unmatched \\z("));
|
||||
EXTERN char e_unmatched_str_percent_open[]
|
||||
INIT(= N_("E53: Unmatched %s%%("));
|
||||
EXTERN char e_unmatched_str_open[]
|
||||
INIT(= N_("E54: Unmatched %s("));
|
||||
EXTERN char e_unmatched_str_close[]
|
||||
INIT(= N_("E55: Unmatched %s)"));
|
||||
EXTERN char e_invalid_character_after_str_at[]
|
||||
INIT(= N_("E59: invalid character after %s@"));
|
||||
EXTERN char e_too_many_complex_str_curly[]
|
||||
INIT(= N_("E60: Too many complex %s{...}s"));
|
||||
|
||||
#ifdef FEAT_EVAL
|
||||
EXTERN char e_undefined_variable_str[]
|
||||
INIT(= N_("E121: Undefined variable: %s"));
|
||||
EXTERN char e_undefined_variable_char_str[]
|
||||
INIT(= N_("E121: Undefined variable: %c:%s"));
|
||||
#endif
|
||||
#ifndef FEAT_DIGRAPHS
|
||||
EXTERN char e_no_digraphs_version[]
|
||||
INIT(= N_("E196: No digraphs in this version"));
|
||||
#endif
|
||||
EXTERN char e_ambiguous_use_of_user_defined_command[]
|
||||
INIT(= N_("E464: Ambiguous use of user-defined command"));
|
||||
EXTERN char e_invalid_command[]
|
||||
@@ -63,8 +192,12 @@ EXTERN char e_name_too_long_str[]
|
||||
INIT(= N_("E1011: Name too long: %s"));
|
||||
EXTERN char e_type_mismatch_expected_str_but_got_str[]
|
||||
INIT(= N_("E1012: Type mismatch; expected %s but got %s"));
|
||||
EXTERN char e_type_mismatch_expected_str_but_got_str_in_str[]
|
||||
INIT(= N_("E1012: Type mismatch; expected %s but got %s in %s"));
|
||||
EXTERN char e_argument_nr_type_mismatch_expected_str_but_got_str[]
|
||||
INIT(= N_("E1013: Argument %d: type mismatch, expected %s but got %s"));
|
||||
EXTERN char e_argument_nr_type_mismatch_expected_str_but_got_str_in_str[]
|
||||
INIT(= N_("E1013: Argument %d: type mismatch, expected %s but got %s in %s"));
|
||||
EXTERN char e_invalid_key_str[]
|
||||
INIT(= N_("E1014: Invalid key: %s"));
|
||||
EXTERN char e_name_expected_str[]
|
||||
@@ -91,8 +224,10 @@ EXTERN char e_using_number_as_string[]
|
||||
INIT(= N_("E1024: Using a Number as a String"));
|
||||
EXTERN char e_using_rcurly_outside_if_block_scope[]
|
||||
INIT(= N_("E1025: Using } outside of a block scope"));
|
||||
#endif
|
||||
EXTERN char e_missing_rcurly[]
|
||||
INIT(= N_("E1026: Missing }"));
|
||||
#ifdef FEAT_EVAL
|
||||
EXTERN char e_missing_return_statement[]
|
||||
INIT(= N_("E1027: Missing return statement"));
|
||||
EXTERN char e_compiling_def_function_failed[]
|
||||
@@ -318,7 +453,7 @@ EXTERN char e_using_bool_as_number[]
|
||||
EXTERN char e_missing_matching_bracket_after_dict_key[]
|
||||
INIT(= N_("E1139: Missing matching bracket after dict key"));
|
||||
EXTERN char e_for_argument_must_be_sequence_of_lists[]
|
||||
INIT(= N_("E1140: For argument must be a sequence of lists"));
|
||||
INIT(= N_("E1140: :for argument must be a sequence of lists"));
|
||||
EXTERN char e_indexable_type_required[]
|
||||
INIT(= N_("E1141: Indexable type required"));
|
||||
EXTERN char e_non_empty_string_required[]
|
||||
@@ -343,8 +478,8 @@ EXTERN char e_mismatched_endfunction[]
|
||||
INIT(= N_("E1151: Mismatched endfunction"));
|
||||
EXTERN char e_mismatched_enddef[]
|
||||
INIT(= N_("E1152: Mismatched enddef"));
|
||||
EXTERN char e_invalid_operation_for_bool[]
|
||||
INIT(= N_("E1153: Invalid operation for bool"));
|
||||
EXTERN char e_invalid_operation_for_str[]
|
||||
INIT(= N_("E1153: Invalid operation for %s"));
|
||||
EXTERN char e_divide_by_zero[]
|
||||
INIT(= N_("E1154: Divide by zero"));
|
||||
EXTERN char e_cannot_define_autocommands_for_all_events[]
|
||||
@@ -365,6 +500,8 @@ EXTERN char e_register_name_must_be_one_char_str[]
|
||||
INIT(= N_("E1162: Register name must be one character: %s"));
|
||||
EXTERN char e_variable_nr_type_mismatch_expected_str_but_got_str[]
|
||||
INIT(= N_("E1163: Variable %d: type mismatch, expected %s but got %s"));
|
||||
EXTERN char e_variable_nr_type_mismatch_expected_str_but_got_str_in_str[]
|
||||
INIT(= N_("E1163: Variable %d: type mismatch, expected %s but got %s in %s"));
|
||||
EXTERN char e_vim9cmd_must_be_followed_by_command[]
|
||||
INIT(= N_("E1164: vim9cmd must be followed by a command"));
|
||||
EXTERN char e_cannot_use_range_with_assignment_str[]
|
||||
@@ -425,3 +562,80 @@ EXTERN char e_nr_arguments_too_few[]
|
||||
INIT(= N_("E1190: %d arguments too few"));
|
||||
EXTERN char e_call_to_function_that_failed_to_compile_str[]
|
||||
INIT(= N_("E1191: Call to function that failed to compile: %s"));
|
||||
EXTERN char e_empty_function_name[]
|
||||
INIT(= N_("E1192: Empty function name"));
|
||||
// libsodium
|
||||
EXTERN char e_libsodium_not_built_in[]
|
||||
INIT(= N_("E1193: cryptmethod xchacha20 not built into this Vim"));
|
||||
EXTERN char e_libsodium_cannot_encrypt_header[]
|
||||
INIT(= N_("E1194: Cannot encrypt header, not enough space"));
|
||||
EXTERN char e_libsodium_cannot_encrypt_buffer[]
|
||||
INIT(= N_("E1195: Cannot encrypt buffer, not enough space"));
|
||||
EXTERN char e_libsodium_cannot_decrypt_header[]
|
||||
INIT(= N_("E1196: Cannot decrypt header, not enough space"));
|
||||
EXTERN char e_libsodium_cannot_allocate_buffer[]
|
||||
INIT(= N_("E1197: Cannot allocate_buffer for encryption"));
|
||||
EXTERN char e_libsodium_decryption_failed_header_incomplete[]
|
||||
INIT(= N_("E1198: Decryption failed: Header incomplete!"));
|
||||
EXTERN char e_libsodium_cannot_decrypt_buffer[]
|
||||
INIT(= N_("E1199: Cannot decrypt buffer, not enough space"));
|
||||
EXTERN char e_libsodium_decryption_failed[]
|
||||
INIT(= N_("E1200: Decryption failed!"));
|
||||
EXTERN char e_libsodium_decryption_failed_premature[]
|
||||
INIT(= N_("E1201: Decryption failed: pre-mature end of file!"));
|
||||
EXTERN char e_no_white_space_allowed_after_str_str[]
|
||||
INIT(= N_("E1202: No white space allowed after '%s': %s"));
|
||||
EXTERN char e_dot_can_only_be_used_on_dictionary_str[]
|
||||
INIT(= N_("E1203: Dot can only be used on a dictionary: %s"));
|
||||
EXTERN char e_regexp_number_after_dot_pos_search[]
|
||||
INIT(= N_("E1204: No Number allowed after .: '\\%%%c'"));
|
||||
EXTERN char e_no_white_space_allowed_between_option_and[]
|
||||
INIT(= N_("E1205: No white space allowed between option and"));
|
||||
EXTERN char e_dict_required_for_argument_nr[]
|
||||
INIT(= N_("E1206: Dictionary required for argument %d"));
|
||||
EXTERN char e_expression_without_effect_str[]
|
||||
INIT(= N_("E1207: Expression without an effect: %s"));
|
||||
EXTERN char e_complete_used_without_nargs[]
|
||||
INIT(= N_("E1208: -complete used without -nargs"));
|
||||
EXTERN char e_invalid_value_for_line_number_str[]
|
||||
INIT(= N_("E1209: Invalid value for a line number: \"%s\""));
|
||||
EXTERN char e_number_required_for_argument_nr[]
|
||||
INIT(= N_("E1210: Number required for argument %d"));
|
||||
EXTERN char e_list_required_for_argument_nr[]
|
||||
INIT(= N_("E1211: List required for argument %d"));
|
||||
EXTERN char e_bool_required_for_argument_nr[]
|
||||
INIT(= N_("E1212: Bool required for argument %d"));
|
||||
EXTERN char e_redefining_imported_item_str[]
|
||||
INIT(= N_("E1213: Redefining imported item \"%s\""));
|
||||
#if defined(FEAT_DIGRAPHS) && defined(FEAT_EVAL)
|
||||
EXTERN char e_digraph_must_be_just_two_characters_str[]
|
||||
INIT(= N_("E1214: Digraph must be just two characters: %s"));
|
||||
EXTERN char e_digraph_argument_must_be_one_character_str[]
|
||||
INIT(= N_("E1215: Digraph must be one character: %s"));
|
||||
EXTERN char e_digraph_setlist_argument_must_be_list_of_lists_with_two_items[]
|
||||
INIT(= N_("E1216: digraph_setlist() argument must be a list of lists with two items"));
|
||||
#endif
|
||||
EXTERN char e_chan_or_job_required_for_argument_nr[]
|
||||
INIT(= N_("E1217: Channel or Job required for argument %d"));
|
||||
EXTERN char e_job_required_for_argument_nr[]
|
||||
INIT(= N_("E1218: Job required for argument %d"));
|
||||
EXTERN char e_float_or_number_required_for_argument_nr[]
|
||||
INIT(= N_("E1219: Float or Number required for argument %d"));
|
||||
EXTERN char e_string_or_number_required_for_argument_nr[]
|
||||
INIT(= N_("E1220: String or Number required for argument %d"));
|
||||
EXTERN char e_string_or_blob_required_for_argument_nr[]
|
||||
INIT(= N_("E1221: String or Blob required for argument %d"));
|
||||
EXTERN char e_string_or_list_required_for_argument_nr[]
|
||||
INIT(= N_("E1222: String or List required for argument %d"));
|
||||
EXTERN char e_string_or_dict_required_for_argument_nr[]
|
||||
INIT(= N_("E1223: String or List required for argument %d"));
|
||||
EXTERN char e_string_or_number_or_list_required_for_argument_nr[]
|
||||
INIT(= N_("E1224: String or List required for argument %d"));
|
||||
EXTERN char e_string_or_list_or_dict_required_for_argument_nr[]
|
||||
INIT(= N_("E1225: String or List required for argument %d"));
|
||||
EXTERN char e_list_or_blob_required_for_argument_nr[]
|
||||
INIT(= N_("E1226: String or List required for argument %d"));
|
||||
EXTERN char e_list_or_dict_required_for_argument_nr[]
|
||||
INIT(= N_("E1227: List or Dictionary required for argument %d"));
|
||||
EXTERN char e_list_or_dict_or_blob_required_for_argument_nr[]
|
||||
INIT(= N_("E1228: List or Dictionary or Blob required for argument %d"));
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user