mirror of
https://github.com/zoriya/vim.git
synced 2025-12-26 09:05:28 +00:00
Compare commits
111 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e468698994 | ||
|
|
fef4485ef5 | ||
|
|
c448e9c950 | ||
|
|
a653e53b1f | ||
|
|
bac9a9e5c2 | ||
|
|
9bd3ce22e3 | ||
|
|
861fcee8de | ||
|
|
3aca0916f0 | ||
|
|
1693712f02 | ||
|
|
42ccb8d747 | ||
|
|
75ab590f85 | ||
|
|
a929c922b1 | ||
|
|
d0a20c9d11 | ||
|
|
03cca297df | ||
|
|
53e8f3ffdf | ||
|
|
35cff32dd8 | ||
|
|
366f0bdd08 | ||
|
|
9f53e7bd7f | ||
|
|
280aebfd35 | ||
|
|
8b91e71441 | ||
|
|
a9549c9e8f | ||
|
|
3df8f6e353 | ||
|
|
066e0d9869 | ||
|
|
efbfa867a1 | ||
|
|
68aaff4697 | ||
|
|
34ffa10280 | ||
|
|
c360b2566c | ||
|
|
93c7a45e86 | ||
|
|
047a7019b2 | ||
|
|
d2edee5cf3 | ||
|
|
f50808ed13 | ||
|
|
ca7e86c237 | ||
|
|
e0805b849c | ||
|
|
9029a6e993 | ||
|
|
693ccd1160 | ||
|
|
3b470ae88f | ||
|
|
b9e99e58bb | ||
|
|
092e09cba7 | ||
|
|
12eb2eb4d7 | ||
|
|
7714231bb5 | ||
|
|
31e5c60a68 | ||
|
|
5dc294a7b6 | ||
|
|
648dd88af6 | ||
|
|
b836658a04 | ||
|
|
eca7c60d68 | ||
|
|
8944551534 | ||
|
|
f420ff2440 | ||
|
|
8cac20ed42 | ||
|
|
aae9762b2c | ||
|
|
77771d33f4 | ||
|
|
9bbe5c6b8c | ||
|
|
c9a9a0ac1e | ||
|
|
60895f3e36 | ||
|
|
575445200b | ||
|
|
d58862d18f | ||
|
|
11a57dfd16 | ||
|
|
1655619717 | ||
|
|
825b55e695 | ||
|
|
4a7724a440 | ||
|
|
3caf1cce2b | ||
|
|
4232dff815 | ||
|
|
c6e0a5e98c | ||
|
|
db0ea7f2b0 | ||
|
|
e08fde0073 | ||
|
|
fa76a24109 | ||
|
|
021996ffaa | ||
|
|
7765f5cf96 | ||
|
|
6013d0045d | ||
|
|
2ce97ae6aa | ||
|
|
a43993897a | ||
|
|
2bf52dd065 | ||
|
|
81b46a6ccd | ||
|
|
36951ed1da | ||
|
|
b09c320039 | ||
|
|
0bbf09ca41 | ||
|
|
a0f659c76e | ||
|
|
cee9c844f2 | ||
|
|
a016eeba7a | ||
|
|
7c7e19cf50 | ||
|
|
5e1792270a | ||
|
|
cbaff5e06e | ||
|
|
a8034a4886 | ||
|
|
0937182d49 | ||
|
|
18ee0f603e | ||
|
|
3a56b6d405 | ||
|
|
ac72c21da6 | ||
|
|
5017c66bd4 | ||
|
|
177847e67a | ||
|
|
8c97960850 | ||
|
|
6a06940f8a | ||
|
|
6d4e725a34 | ||
|
|
f26c16144d | ||
|
|
cb49a1d934 | ||
|
|
3506cf34c1 | ||
|
|
3ad2090316 | ||
|
|
c947b9ae41 | ||
|
|
75a0f3c011 | ||
|
|
aa7d0c2335 | ||
|
|
0d1f55c044 | ||
|
|
478700336d | ||
|
|
beb0ef1ab2 | ||
|
|
02560424bf | ||
|
|
72bb10df1f | ||
|
|
0f68e6c07a | ||
|
|
ca9d8d2cb9 | ||
|
|
1b76a8dfe2 | ||
|
|
d0fb2d8041 | ||
|
|
91ff3d4f52 | ||
|
|
e8a4c0d91f | ||
|
|
b471690fad | ||
|
|
188639d75c |
25
.github/workflows/ci.yml
vendored
25
.github/workflows/ci.yml
vendored
@@ -21,6 +21,7 @@ jobs:
|
||||
TEST: test
|
||||
SRCDIR: ./src
|
||||
LEAK_CFLAGS: -DEXITFREE
|
||||
CFLAGS: -Wno-error=deprecated-declarations
|
||||
LOG_DIR: ${{ github.workspace }}/logs
|
||||
TERM: xterm
|
||||
DISPLAY: ':99'
|
||||
@@ -88,17 +89,25 @@ jobs:
|
||||
fi
|
||||
sudo apt update && sudo apt install -y "${PKGS[@]}"
|
||||
|
||||
- name: Install clang-13
|
||||
- name: Install gcc-11
|
||||
if: matrix.compiler == 'gcc'
|
||||
run: |
|
||||
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
|
||||
sudo apt install -y gcc-11
|
||||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 100
|
||||
sudo update-alternatives --set gcc /usr/bin/gcc-11
|
||||
|
||||
- name: Install clang-14
|
||||
if: matrix.compiler == 'clang'
|
||||
run: |
|
||||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
|
||||
. /etc/lsb-release
|
||||
sudo add-apt-repository -y "deb http://apt.llvm.org/${DISTRIB_CODENAME}/ llvm-toolchain-${DISTRIB_CODENAME}-13 main"
|
||||
sudo apt-get install -y clang-13 llvm-13
|
||||
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-13 100
|
||||
sudo update-alternatives --set clang /usr/bin/clang-13
|
||||
sudo update-alternatives --install /usr/bin/llvm-cov llvm-cov /usr/bin/llvm-cov-13 100
|
||||
sudo update-alternatives --install /usr/bin/asan_symbolize asan_symbolize /usr/bin/asan_symbolize-13 100
|
||||
sudo add-apt-repository -y "deb http://apt.llvm.org/${DISTRIB_CODENAME}/ llvm-toolchain-${DISTRIB_CODENAME}-14 main"
|
||||
sudo apt install -y clang-14 llvm-14
|
||||
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-14 100
|
||||
sudo update-alternatives --set clang /usr/bin/clang-14
|
||||
sudo update-alternatives --install /usr/bin/llvm-cov llvm-cov /usr/bin/llvm-cov-14 100
|
||||
sudo update-alternatives --install /usr/bin/asan_symbolize asan_symbolize /usr/bin/asan_symbolize-14 100
|
||||
|
||||
- name: Set up environment
|
||||
run: |
|
||||
@@ -245,7 +254,7 @@ jobs:
|
||||
|
||||
- name: Codecov
|
||||
if: matrix.coverage
|
||||
uses: codecov/codecov-action@v2
|
||||
uses: codecov/codecov-action@v3
|
||||
with:
|
||||
flags: linux,${{ matrix.features }}-${{ matrix.compiler }}-${{ matrix.extra }}
|
||||
|
||||
|
||||
119
runtime/autoload/dist/ft.vim
vendored
119
runtime/autoload/dist/ft.vim
vendored
@@ -3,7 +3,7 @@ vim9script
|
||||
# Vim functions for file type detection
|
||||
#
|
||||
# Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
# Last Change: 2022 Mar 05
|
||||
# Last Change: 2022 Apr 13
|
||||
|
||||
# These functions are moved here from runtime/filetype.vim to make startup
|
||||
# faster.
|
||||
@@ -107,6 +107,25 @@ export def BindzoneCheck(default = '')
|
||||
endif
|
||||
enddef
|
||||
|
||||
# Returns true if file content looks like RAPID
|
||||
def IsRapid(sChkExt: string = ""): bool
|
||||
if sChkExt == "cfg"
|
||||
return getline(1) =~? '\v^%(EIO|MMC|MOC|PROC|SIO|SYS):CFG'
|
||||
endif
|
||||
# called from FTmod, FTprg or FTsys
|
||||
return getline(nextnonblank(1)) =~? '\v^\s*%(\%{3}|module\s+\k+\s*%(\(|$))'
|
||||
enddef
|
||||
|
||||
export def FTcfg()
|
||||
if exists("g:filetype_cfg")
|
||||
exe "setf " .. g:filetype_cfg
|
||||
elseif IsRapid("cfg")
|
||||
setf rapid
|
||||
else
|
||||
setf cfg
|
||||
endif
|
||||
enddef
|
||||
|
||||
export def FTlpc()
|
||||
if exists("g:lpc_syntax_for_c")
|
||||
var lnum = 1
|
||||
@@ -168,7 +187,7 @@ enddef
|
||||
|
||||
export def FTent()
|
||||
# This function checks for valid cl syntax in the first five lines.
|
||||
# Look for either an opening comment, '#', or a block start, '{".
|
||||
# Look for either an opening comment, '#', or a block start, '{'.
|
||||
# If not found, assume SGML.
|
||||
var lnum = 1
|
||||
while lnum < 6
|
||||
@@ -410,6 +429,36 @@ export def FTmm()
|
||||
setf nroff
|
||||
enddef
|
||||
|
||||
# Returns true if file content looks like LambdaProlog
|
||||
def IsLProlog(): bool
|
||||
# skip apparent comments and blank lines, what looks like
|
||||
# LambdaProlog comment may be RAPID header
|
||||
var l: number = nextnonblank(1)
|
||||
while l > 0 && l < line('$') && getline(l) =~ '^\s*%' # LambdaProlog comment
|
||||
l = nextnonblank(l + 1)
|
||||
endwhile
|
||||
# this pattern must not catch a go.mod file
|
||||
return getline(l) =~ '\<module\s\+\w\+\s*\.\s*\(%\|$\)'
|
||||
enddef
|
||||
|
||||
# Determine if *.mod is ABB RAPID, LambdaProlog, Modula-2, Modsim III or go.mod
|
||||
export def FTmod()
|
||||
if exists("g:filetype_mod")
|
||||
exe "setf " .. g:filetype_mod
|
||||
elseif IsLProlog()
|
||||
setf lprolog
|
||||
elseif getline(nextnonblank(1)) =~ '\%(\<MODULE\s\+\w\+\s*;\|^\s*(\*\)'
|
||||
setf modula2
|
||||
elseif IsRapid()
|
||||
setf rapid
|
||||
elseif expand("<afile>") =~ '\<go.mod$'
|
||||
setf gomod
|
||||
else
|
||||
# Nothing recognized, assume modsim3
|
||||
setf modsim3
|
||||
endif
|
||||
enddef
|
||||
|
||||
export def FTpl()
|
||||
if exists("g:filetype_pl")
|
||||
exe "setf " .. g:filetype_pl
|
||||
@@ -526,6 +575,18 @@ export def FTpp()
|
||||
endif
|
||||
enddef
|
||||
|
||||
# Determine if *.prg is ABB RAPID. Can also be Clipper, FoxPro or eviews
|
||||
export def FTprg()
|
||||
if exists("g:filetype_prg")
|
||||
exe "setf " .. g:filetype_prg
|
||||
elseif IsRapid()
|
||||
setf rapid
|
||||
else
|
||||
# Nothing recognized, assume Clipper
|
||||
setf clipper
|
||||
endif
|
||||
enddef
|
||||
|
||||
export def FTr()
|
||||
var max = line("$") > 50 ? 50 : line("$")
|
||||
|
||||
@@ -572,7 +633,7 @@ export def McSetf()
|
||||
return
|
||||
endif
|
||||
endfor
|
||||
setf m4 " Default: Sendmail .mc file
|
||||
setf m4 # Default: Sendmail .mc file
|
||||
enddef
|
||||
|
||||
# Called from filetype.vim and scripts.vim.
|
||||
@@ -708,6 +769,28 @@ export def SQL()
|
||||
endif
|
||||
enddef
|
||||
|
||||
# This function checks the first 25 lines of file extension "sc" to resolve
|
||||
# detection between scala and SuperCollider
|
||||
export def FTsc()
|
||||
for lnum in range(1, min([line("$"), 25]))
|
||||
if getline(lnum) =~# '[A-Za-z0-9]*\s:\s[A-Za-z0-9]\|var\s<\|classvar\s<\|\^this.*\||\w*|\|+\s\w*\s{\|\*ar\s'
|
||||
setf supercollider
|
||||
return
|
||||
endif
|
||||
endfor
|
||||
setf scala
|
||||
enddef
|
||||
|
||||
# This function checks the first line of file extension "scd" to resolve
|
||||
# detection between scdoc and SuperCollider
|
||||
export def FTscd()
|
||||
if getline(1) =~# '\%^\S\+(\d[0-9A-Za-z]*)\%(\s\+\"[^"]*\"\%(\s\+\"[^"]*\"\)\=\)\=$'
|
||||
setf scdoc
|
||||
else
|
||||
setf supercollider
|
||||
endif
|
||||
enddef
|
||||
|
||||
# If the file has an extension of 't' and is in a directory 't' or 'xt' then
|
||||
# it is almost certainly a Perl test file.
|
||||
# If the first line starts with '#' and contains 'perl' it's probably a Perl
|
||||
@@ -735,6 +818,16 @@ export def FTperl(): number
|
||||
return 0
|
||||
enddef
|
||||
|
||||
export def FTsys()
|
||||
if exists("g:filetype_sys")
|
||||
exe "setf " .. g:filetype_sys
|
||||
elseif IsRapid()
|
||||
setf rapid
|
||||
else
|
||||
setf bat
|
||||
endif
|
||||
enddef
|
||||
|
||||
# Choose context, plaintex, or tex (LaTeX) based on these rules:
|
||||
# 1. Check the first line of the file for "%&<format>".
|
||||
# 2. Check the first 1000 non-comment lines for LaTeX or ConTeXt keywords.
|
||||
@@ -896,6 +989,26 @@ export def FTtf()
|
||||
setf tf
|
||||
enddef
|
||||
|
||||
var ft_krl_header = '\&\w+'
|
||||
# Determine if a *.src file is Kuka Robot Language
|
||||
export def FTsrc()
|
||||
var ft_krl_def_or_deffct = '%(global\s+)?def%(fct)?>'
|
||||
if exists("g:filetype_src")
|
||||
exe "setf " .. g:filetype_src
|
||||
elseif getline(nextnonblank(1)) =~? '\v^\s*%(' .. ft_krl_header .. '|' .. ft_krl_def_or_deffct .. ')'
|
||||
setf krl
|
||||
endif
|
||||
enddef
|
||||
|
||||
# Determine if a *.dat file is Kuka Robot Language
|
||||
export def FTdat()
|
||||
var ft_krl_defdat = 'defdat>'
|
||||
if exists("g:filetype_dat")
|
||||
exe "setf " .. g:filetype_dat
|
||||
elseif getline(nextnonblank(1)) =~? '\v^\s*%(' .. ft_krl_header .. '|' .. ft_krl_defdat .. ')'
|
||||
setf krl
|
||||
endif
|
||||
enddef
|
||||
|
||||
# Uncomment this line to check for compilation errors early
|
||||
# defcompile
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*autocmd.txt* For Vim version 8.2. Last change: 2022 Mar 27
|
||||
*autocmd.txt* For Vim version 8.2. Last change: 2022 Apr 17
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -95,6 +95,7 @@ Or use `:execute`: >
|
||||
:augroup mine | exe "au! BufRead *" | augroup END
|
||||
:augroup mine | exe "au BufRead * set tw=70" | augroup END
|
||||
|
||||
< *autocmd-expand*
|
||||
Note that special characters (e.g., "%", "<cword>") in the ":autocmd"
|
||||
arguments are not expanded when the autocommand is defined. These will be
|
||||
expanded when the Event is recognized, and the {cmd} is executed. The only
|
||||
@@ -402,6 +403,8 @@ Name triggered by ~
|
||||
|User| to be used in combination with ":doautocmd"
|
||||
|SigUSR1| after the SIGUSR1 signal has been detected
|
||||
|
||||
|WinScrolled| after scrolling or resizing a window
|
||||
|
||||
|
||||
The alphabetical list of autocommand events: *autocmd-events-abc*
|
||||
|
||||
@@ -471,13 +474,15 @@ BufRead or BufReadPost When starting to edit a new buffer, after
|
||||
executing the modelines. See |BufWinEnter|
|
||||
for when you need to do something after
|
||||
processing the modelines.
|
||||
This does NOT work for ":r file". Not used
|
||||
when the file doesn't exist. Also used after
|
||||
successfully recovering a file.
|
||||
Also triggered for the filetypedetect group
|
||||
when executing ":filetype detect" and when
|
||||
writing an unnamed buffer in a way that the
|
||||
buffer gets a name.
|
||||
Also triggered:
|
||||
- when writing an unnamed buffer in a way that
|
||||
the buffer gets a name
|
||||
- after successfully recovering a file
|
||||
- for the filetypedetect group when executing
|
||||
":filetype detect"
|
||||
Not triggered:
|
||||
- for the `:read file` command
|
||||
- when the file doesn't exist
|
||||
*BufReadCmd*
|
||||
BufReadCmd Before starting to edit a new buffer. Should
|
||||
read the file into the buffer. |Cmd-event|
|
||||
@@ -705,9 +710,38 @@ CursorMoved After the cursor was moved in Normal or Visual
|
||||
CursorMovedI After the cursor was moved in Insert mode.
|
||||
Not triggered when the popup menu is visible.
|
||||
Otherwise the same as CursorMoved.
|
||||
*DiffUpdated*
|
||||
DiffUpdated After diffs have been updated. Depending on
|
||||
what kind of diff is being used (internal or
|
||||
external) this can be triggered on every
|
||||
change or when doing |:diffupdate|.
|
||||
*DirChangedPre*
|
||||
DirChangedPre The working directory is going to be changed,
|
||||
as with |DirChanged|. The pattern is like
|
||||
with |DirChanged|. The new directory can be
|
||||
found in v:event.directory.
|
||||
*DirChanged*
|
||||
DirChanged The working directory has changed in response
|
||||
to the |:cd| or |:tcd| or |:lcd| commands, or
|
||||
as a result of the 'autochdir' option.
|
||||
The pattern can be:
|
||||
"window" to trigger on `:lcd`
|
||||
"tabpage" to trigger on `:tcd`
|
||||
"global" to trigger on `:cd`
|
||||
"auto" to trigger on 'autochdir'.
|
||||
"drop" to trigger on editing a file
|
||||
<afile> is set to the new directory name.
|
||||
*EncodingChanged*
|
||||
EncodingChanged Fires off after the 'encoding' option has been
|
||||
changed. Useful to set up fonts, for example.
|
||||
*ExitPre*
|
||||
ExitPre When using `:quit`, `:wq` in a way it makes
|
||||
Vim exit, or using `:qall`, just after
|
||||
|QuitPre|. Can be used to close any
|
||||
non-essential window. Exiting may still be
|
||||
cancelled if there is a modified buffer that
|
||||
isn't automatically saved, use |VimLeavePre|
|
||||
for really exiting.
|
||||
*FileAppendCmd*
|
||||
FileAppendCmd Before appending to a file. Should do the
|
||||
appending to the file. Use the '[ and ']
|
||||
@@ -735,35 +769,6 @@ FileChangedRO Before making the first change to a read-only
|
||||
*E881*
|
||||
If the number of lines changes saving for undo
|
||||
may fail and the change will be aborted.
|
||||
*DiffUpdated*
|
||||
DiffUpdated After diffs have been updated. Depending on
|
||||
what kind of diff is being used (internal or
|
||||
external) this can be triggered on every
|
||||
change or when doing |:diffupdate|.
|
||||
*DirChangedPre*
|
||||
DirChangedPre The working directory is going to be changed,
|
||||
as with |DirChanged|. The pattern is like
|
||||
with |DirChanged|. The new directory can be
|
||||
found in v:event.directory.
|
||||
*DirChanged*
|
||||
DirChanged The working directory has changed in response
|
||||
to the |:cd| or |:tcd| or |:lcd| commands, or
|
||||
as a result of the 'autochdir' option.
|
||||
The pattern can be:
|
||||
"window" to trigger on `:lcd`
|
||||
"tabpage" to trigger on `:tcd`
|
||||
"global" to trigger on `:cd`
|
||||
"auto" to trigger on 'autochdir'.
|
||||
"drop" to trigger on editing a file
|
||||
<afile> is set to the new directory name.
|
||||
*ExitPre*
|
||||
ExitPre When using `:quit`, `:wq` in a way it makes
|
||||
Vim exit, or using `:qall`, just after
|
||||
|QuitPre|. Can be used to close any
|
||||
non-essential window. Exiting may still be
|
||||
cancelled if there is a modified buffer that
|
||||
isn't automatically saved, use |VimLeavePre|
|
||||
for really exiting.
|
||||
*FileChangedShell*
|
||||
FileChangedShell When Vim notices that the modification time of
|
||||
a file has changed since editing started.
|
||||
@@ -1203,6 +1208,9 @@ TextYankPost After text has been yanked or deleted in the
|
||||
current buffer. The following values of
|
||||
|v:event| can be used to determine the operation
|
||||
that triggered this autocmd:
|
||||
inclusive TRUE if the motion is
|
||||
|inclusive| else the motion is
|
||||
|exclusive|.
|
||||
operator The operation performed.
|
||||
regcontents Text that was stored in the
|
||||
register, as a list of lines,
|
||||
@@ -1228,7 +1236,13 @@ User Never executed automatically. To be used for
|
||||
Note that when `:doautocmd User MyEvent` is
|
||||
used while there are no matching autocommands,
|
||||
you will get an error. If you don't want
|
||||
that, define a dummy autocommand yourself.
|
||||
that, either check whether an autocommand is
|
||||
defined using `exists('#User#MyEvent')` or
|
||||
define a dummy autocommand yourself.
|
||||
Example: >
|
||||
if exists('#User#MyEvent')
|
||||
doautocmd User MyEvent
|
||||
endif
|
||||
|
||||
*SigUSR1*
|
||||
SigUSR1 After the SIGUSR1 signal has been detected.
|
||||
@@ -1317,10 +1331,23 @@ WinNew When a new window was created. Not done for
|
||||
the first window, when Vim has just started.
|
||||
Before a WinEnter event.
|
||||
|
||||
*WinScrolled*
|
||||
WinScrolled After scrolling the content of a window or
|
||||
resizing a window.
|
||||
The pattern is matched against the
|
||||
|window-ID|. Both <amatch> and <afile> are
|
||||
set to the |window-ID|.
|
||||
Non-recursive (the event cannot trigger
|
||||
itself). However, if the command causes the
|
||||
window to scroll or change size another
|
||||
WinScrolled event will be triggered later.
|
||||
Does not trigger when the command is added,
|
||||
only after the first scroll or resize.
|
||||
|
||||
==============================================================================
|
||||
6. Patterns *autocmd-patterns* *{aupat}*
|
||||
|
||||
The {aupat} argument of `:autocmd` can be a comma separated list. This works as
|
||||
The {aupat} argument of `:autocmd` can be a comma-separated list. This works as
|
||||
if the command was given with each pattern separately. Thus this command: >
|
||||
:autocmd BufRead *.txt,*.info set et
|
||||
Is equivalent to: >
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*builtin.txt* For Vim version 8.2. Last change: 2022 Mar 26
|
||||
*builtin.txt* For Vim version 8.2. Last change: 2022 Apr 16
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1754,7 +1754,10 @@ deepcopy({expr} [, {noref}]) *deepcopy()* *E698*
|
||||
|
||||
delete({fname} [, {flags}]) *delete()*
|
||||
Without {flags} or with {flags} empty: Deletes the file by the
|
||||
name {fname}. This also works when {fname} is a symbolic link.
|
||||
name {fname}.
|
||||
|
||||
This also works when {fname} is a symbolic link. The symbolic
|
||||
link itself is deleted, not what it points to.
|
||||
|
||||
When {flags} is "d": Deletes the directory by the name
|
||||
{fname}. This fails when directory {fname} is not empty.
|
||||
@@ -1764,8 +1767,6 @@ delete({fname} [, {flags}]) *delete()*
|
||||
Note: on MS-Windows it is not possible to delete a directory
|
||||
that is being used.
|
||||
|
||||
A symbolic link itself is deleted, not what it points to.
|
||||
|
||||
The result is a Number, which is 0/false if the delete
|
||||
operation was successful and -1/true when the deletion failed
|
||||
or partly failed.
|
||||
@@ -2045,7 +2046,7 @@ execute({command} [, {silent}]) *execute()*
|
||||
It is not possible to use `:redir` anywhere in {command}.
|
||||
|
||||
To get a list of lines use |split()| on the result: >
|
||||
split(execute('args'), "\n")
|
||||
execute('args')->split("\n")
|
||||
|
||||
< To execute a command in another window than the current one
|
||||
use `win_execute()`.
|
||||
@@ -2236,6 +2237,8 @@ expand({string} [, {nosuf} [, {list}]]) *expand()*
|
||||
a function
|
||||
<SID> "<SNR>123_" where "123" is the
|
||||
current script ID |<SID>|
|
||||
<script> sourced script file, or script file
|
||||
where the current function was defined
|
||||
<stack> call stack
|
||||
<cword> word under the cursor
|
||||
<cWORD> WORD under the cursor
|
||||
@@ -2269,6 +2272,9 @@ expand({string} [, {nosuf} [, {list}]]) *expand()*
|
||||
is not defined, an empty string is used. Using "%:p" in a
|
||||
buffer with no name, results in the current directory, with a
|
||||
'/' added.
|
||||
When 'verbose' is set then expanding '%', '#' and <> items
|
||||
will result in an error message if the argument cannot be
|
||||
expanded.
|
||||
|
||||
When {string} does not start with '%', '#' or '<', it is
|
||||
expanded like a file name is expanded on the command line.
|
||||
@@ -2741,7 +2747,7 @@ foreground() Move the Vim window to the foreground. Useful when sent from
|
||||
On Win32 systems this might not work, the OS does not always
|
||||
allow a window to bring itself to the foreground. Use
|
||||
|remote_foreground()| instead.
|
||||
{only in the Win32, Athena, Motif and GTK GUI versions and the
|
||||
{only in the Win32, Motif and GTK GUI versions and the
|
||||
Win32 console version}
|
||||
|
||||
fullcommand({name}) *fullcommand()*
|
||||
@@ -4833,6 +4839,8 @@ json_encode({expr}) *json_encode()*
|
||||
Note that NaN and Infinity are passed on as values. This is
|
||||
missing in the JSON standard, but several implementations do
|
||||
allow it. If not then you will get an error.
|
||||
If a string contains an illegal character then the replacement
|
||||
character 0xfffd is used.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetObject()->json_encode()
|
||||
@@ -5575,7 +5583,7 @@ matchfuzzy({list}, {str} [, {dict}]) *matchfuzzy()*
|
||||
|
||||
If {list} is a list of dictionaries, then the optional {dict}
|
||||
argument supports the following additional items:
|
||||
key key of the item which is fuzzy matched against
|
||||
key Key of the item which is fuzzy matched against
|
||||
{str}. The value of this item should be a
|
||||
string.
|
||||
text_cb |Funcref| that will be called for every item
|
||||
@@ -5583,6 +5591,8 @@ matchfuzzy({list}, {str} [, {dict}]) *matchfuzzy()*
|
||||
This should accept a dictionary item as the
|
||||
argument and return the text for that item to
|
||||
use for fuzzy matching.
|
||||
limit Maximum number of matches in {list} to be
|
||||
returned. Zero means no limit.
|
||||
|
||||
{str} is treated as a literal string and regular expression
|
||||
matching is NOT supported. The maximum supported {str} length
|
||||
@@ -5595,6 +5605,9 @@ matchfuzzy({list}, {str} [, {dict}]) *matchfuzzy()*
|
||||
empty list is returned. If length of {str} is greater than
|
||||
256, then returns an empty list.
|
||||
|
||||
When {limit} is given, matchfuzzy() will find up to this
|
||||
number of matches in {list} and return them in sorted order.
|
||||
|
||||
Refer to |fuzzy-matching| for more information about fuzzy
|
||||
matching strings.
|
||||
|
||||
@@ -6023,8 +6036,10 @@ printf({fmt}, {expr1} ...) *printf()*
|
||||
When used as a |method| the base is passed as the second
|
||||
argument: >
|
||||
Compute()->printf("result: %d")
|
||||
<
|
||||
You can use `call()` to pass the items as a list.
|
||||
|
||||
< Often used items are:
|
||||
Often used items are:
|
||||
%s string
|
||||
%6S string right-aligned in 6 display cells
|
||||
%6s string right-aligned in 6 bytes
|
||||
@@ -6693,7 +6708,7 @@ remote_foreground({server}) *remote_foreground()*
|
||||
Can also be used as a |method|: >
|
||||
ServerName()->remote_foreground()
|
||||
|
||||
< {only in the Win32, Athena, Motif and GTK GUI versions and the
|
||||
< {only in the Win32, Motif and GTK GUI versions and the
|
||||
Win32 console version}
|
||||
|
||||
|
||||
@@ -10025,7 +10040,7 @@ footer Compiled with GUI footer support. |gui-footer|
|
||||
fork Compiled to use fork()/exec() instead of system().
|
||||
gettext Compiled with message translation |multi-lang|
|
||||
gui Compiled with GUI enabled.
|
||||
gui_athena Compiled with Athena GUI.
|
||||
gui_athena Compiled with Athena GUI (always false).
|
||||
gui_gnome Compiled with Gnome support (gui_gtk is also defined).
|
||||
gui_gtk Compiled with GTK+ GUI (any version).
|
||||
gui_gtk2 Compiled with GTK+ 2 GUI (gui_gtk is also defined).
|
||||
|
||||
@@ -614,9 +614,10 @@ attack or other people reading your file). When Vim exits the directory and
|
||||
all files in it are deleted. When Vim has the setuid bit set this may cause
|
||||
problems, the temp file is owned by the setuid user but the filter command
|
||||
probably runs as the original user.
|
||||
On MS-Windows the first of these directories that works is used: $TMP,
|
||||
$TEMP, c:\TMP, c:\TEMP.
|
||||
For Unix the list of directories is: $TMPDIR, /tmp, current-dir, $HOME.
|
||||
Directory for temporary files is created in the first of these directories
|
||||
that works:
|
||||
Unix: $TMPDIR, /tmp, current-dir, $HOME.
|
||||
Windows: $TMP, $TEMP, c:\TMP, c:\TEMP
|
||||
For MS-Windows the GetTempFileName() system function is used.
|
||||
For other systems the tmpnam() library function is used.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*channel.txt* For Vim version 8.2. Last change: 2022 Mar 26
|
||||
*channel.txt* For Vim version 8.2. Last change: 2022 Apr 16
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -25,6 +25,7 @@ The Netbeans interface also uses a channel. |netbeans|
|
||||
12. Job options |job-options|
|
||||
13. Controlling a job |job-control|
|
||||
14. Using a prompt buffer |prompt-buffer|
|
||||
15. Language Server Protocol |language-server-protocol|
|
||||
|
||||
{only when compiled with the |+channel| feature for channel stuff}
|
||||
You can check this with: `has('channel')`
|
||||
@@ -424,6 +425,7 @@ To send a message, without expecting a response: >
|
||||
The process can send back a response, the channel handler will be called with
|
||||
it.
|
||||
|
||||
*channel-onetime-callback*
|
||||
To send a message and letting the response handled by a specific function,
|
||||
asynchronously: >
|
||||
call ch_sendraw(channel, {string}, {'callback': 'MyHandler'})
|
||||
@@ -528,7 +530,8 @@ ch_evalexpr({handle}, {expr} [, {options}]) *ch_evalexpr()*
|
||||
|
||||
ch_evalexpr() waits for a response and returns the decoded
|
||||
expression. When there is an error or timeout it returns an
|
||||
empty string.
|
||||
empty |String| or, when using the "lsp" channel mode, returns an
|
||||
empty |Dict|.
|
||||
|
||||
Note that while waiting for the response, Vim handles other
|
||||
messages. You need to make sure this doesn't cause trouble.
|
||||
@@ -588,7 +591,7 @@ ch_info({handle}) *ch_info()*
|
||||
"sock_io" "socket"
|
||||
"sock_timeout" timeout in msec
|
||||
|
||||
Note that "pair" is only present for Unix-domain sockets, for
|
||||
Note that "path" is only present for Unix-domain sockets, for
|
||||
regular ones "hostname" and "port" are present instead.
|
||||
|
||||
When opened with job_start():
|
||||
@@ -633,8 +636,8 @@ ch_logfile({fname} [, {mode}]) *ch_logfile()*
|
||||
is going on in real time.
|
||||
|
||||
To enable the log very early, to see what is received from a
|
||||
terminal during startup, use |--cmd|: >
|
||||
vim --cmd "call ch_logfile('logfile', 'w')"
|
||||
terminal during startup, use |--log|: >
|
||||
vim --log logfile
|
||||
<
|
||||
This function is not available in the |sandbox|.
|
||||
NOTE: the channel communication is stored in the file, be
|
||||
@@ -696,6 +699,16 @@ ch_sendexpr({handle}, {expr} [, {options}]) *ch_sendexpr()*
|
||||
{handle} can be a Channel or a Job that has a Channel.
|
||||
When using the "lsp" channel mode, {expr} must be a |Dict|.
|
||||
|
||||
If the channel mode is "lsp", then returns a Dict. Otherwise
|
||||
returns an empty String. If the "callback" item is present in
|
||||
{options}, then the returned Dict contains the ID of the
|
||||
request message. The ID can be used to send a cancellation
|
||||
request to the LSP server (if needed). Returns an empty Dict
|
||||
on error.
|
||||
|
||||
If a response message is not expected for {expr}, then don't
|
||||
specify the "callback" item in {options}.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetChannel()->ch_sendexpr(expr)
|
||||
|
||||
@@ -1383,7 +1396,7 @@ The same in |Vim9| script: >
|
||||
startinsert
|
||||
|
||||
==============================================================================
|
||||
14. Language Server Protocol *language-server-protocol*
|
||||
15. Language Server Protocol *language-server-protocol*
|
||||
|
||||
The language server protocol specification is available at:
|
||||
|
||||
@@ -1394,11 +1407,19 @@ payload encoded in JSON-RPC format. This is described in:
|
||||
|
||||
https://www.jsonrpc.org/specification
|
||||
|
||||
For messages received on a channel with mode set to "lsp", Vim will process
|
||||
the HTTP header and decode the payload into a Vim |Dict| type and call the
|
||||
channel callback or the specified callback function. When sending messages on
|
||||
a channel using |ch_evalexpr()| or |ch_sendexpr()|, Vim will add the HTTP
|
||||
header and encode the Vim expression into JSON-RPC.
|
||||
To encode and send a LSP request/notification message in a Vim |Dict| into a
|
||||
LSP JSON-RPC message and to receive and decode a LSP JSON-RPC
|
||||
response/notification message into a Vim |Dict|, connect to the LSP server
|
||||
with the |channel-mode| set to "lsp".
|
||||
|
||||
For messages received on a channel with |channel-mode| set to "lsp", Vim will
|
||||
process the HTTP header and decode the JSON-RPC payload into a Vim |Dict| type
|
||||
and call the |channel-callback| function or the specified
|
||||
|channel-onetime-callback| function. When sending messages on a channel using
|
||||
the |ch_evalexpr()| or |ch_sendexpr()| functions, Vim will add the HTTP header
|
||||
and encode the Vim expression into JSON. Refer to |json_encode()| and
|
||||
|json_decode()| for more information about how Vim encodes and decodes the
|
||||
builtin types into JSON.
|
||||
|
||||
To open a channel using the 'lsp' mode, set the 'mode' item in the |ch_open()|
|
||||
{options} argument to 'lsp'. Example: >
|
||||
@@ -1408,37 +1429,79 @@ To open a channel using the 'lsp' mode, set the 'mode' item in the |ch_open()|
|
||||
To open a channel using the 'lsp' mode with a job, set the 'in_mode' and
|
||||
'out_mode' items in the |job_start()| {options} argument to 'lsp'. Example: >
|
||||
|
||||
let job = job_start(...., #{in_mode: 'lsp', out_mode: 'lsp'})
|
||||
let cmd = ['clangd', '--background-index', '--clang-tidy']
|
||||
let opts = {}
|
||||
let opts.in_mode = 'lsp'
|
||||
let opts.out_mode = 'lsp'
|
||||
let opts.err_mode = 'nl'
|
||||
let opts.out_cb = function('LspOutCallback')
|
||||
let opts.err_cb = function('LspErrCallback')
|
||||
let opts.exit_cb = function('LspExitCallback')
|
||||
let job = job_start(cmd, opts)
|
||||
|
||||
To synchronously send a JSON-RPC request to the server, use the |ch_evalexpr()|
|
||||
function. This function will return the response from the server. You can use
|
||||
Note that if a job outputs LSP messages on stdout and non-LSP messages on
|
||||
stderr, then the channel-callback function should handle both the message
|
||||
formats appropriately or you should use a separate callback function for
|
||||
"out_cb" and "err_cb" to handle them as shown above.
|
||||
|
||||
To synchronously send a JSON-RPC request to the server, use the
|
||||
|ch_evalexpr()| function. This function will wait and return the decoded
|
||||
response message from the server. You can use either the |channel-timeout| or
|
||||
the 'timeout' field in the {options} argument to control the response wait
|
||||
time. Example: >
|
||||
time. If the request times out, then an empty |Dict| is returned. Example: >
|
||||
|
||||
let req = {}
|
||||
let req.method = 'textDocument/definition'
|
||||
let req.params = {}
|
||||
let req.params.textDocument = #{uri: 'a.c'}
|
||||
let req.params.position = #{line: 10, character: 3}
|
||||
let resp = ch_evalexpr(ch, req, #{timeout: 100})
|
||||
let defs = ch_evalexpr(ch, req, #{timeout: 100})
|
||||
if defs->empty()
|
||||
... <handle failure>
|
||||
endif
|
||||
|
||||
Note that in the request message the 'id' field should not be specified. If it
|
||||
is specified, then Vim will overwrite the value with an internally generated
|
||||
identifier. Vim currently supports only a number type for the 'id' field.
|
||||
The callback function will be invoked for both a successful and a failed RPC
|
||||
request.
|
||||
|
||||
To send a JSON-RPC request to the server and asynchronously process the
|
||||
response, use the |ch_sendexpr()| function and supply a callback function.
|
||||
Example: >
|
||||
response, use the |ch_sendexpr()| function and supply a callback function. If
|
||||
the "id" field is present in the request message, then Vim will overwrite it
|
||||
with an internally generated number. This function returns a Dict with the
|
||||
identifier used for the message. This can be used to send cancellation
|
||||
request to the LSP server (if needed). Example: >
|
||||
|
||||
let req = {}
|
||||
let req.method = 'textDocument/hover'
|
||||
let req.id = 200
|
||||
let req.params = {}
|
||||
let req.params.textDocument = #{uri: 'a.c'}
|
||||
let req.params.position = #{line: 10, character: 3}
|
||||
let resp = ch_sendexpr(ch, req, #{callback: 'MyFn'})
|
||||
let resp = ch_sendexpr(ch, req, #{callback: 'HoverFunc'})
|
||||
|
||||
To cancel an outstanding asynchronous LSP request sent to the server using the
|
||||
|ch_sendexpr()| function, send a cancelation message to the server using the
|
||||
|ch_sendexpr()| function with the ID returned by the |ch_sendexpr()| function
|
||||
for the request. Example: >
|
||||
|
||||
" send a completion request
|
||||
let req = {}
|
||||
let req.method = 'textDocument/completion'
|
||||
let req.params = {}
|
||||
let req.params.textDocument = #{uri: 'a.c'}
|
||||
let req.params.position = #{line: 10, character: 3}
|
||||
let reqstatus = ch_sendexpr(ch, req, #{callback: 'LspComplete'})
|
||||
" send a cancellation notification
|
||||
let notif = {}
|
||||
let notif.method = '$/cancelRequest'
|
||||
let notif.id = reqstatus.id
|
||||
call ch_sendexpr(ch, notif)
|
||||
|
||||
To send a JSON-RPC notification message to the server, use the |ch_sendexpr()|
|
||||
function. Example: >
|
||||
function. As the server will not send a response message to the notification,
|
||||
don't specify the "callback" item. Example: >
|
||||
|
||||
call ch_sendexpr(ch, #{method: 'initialized'})
|
||||
|
||||
@@ -1454,4 +1517,68 @@ from the server request message. Example: >
|
||||
The JSON-RPC notification messages from the server are delivered through the
|
||||
|channel-callback| function.
|
||||
|
||||
Depending on the use case, you can use the ch_evalexpr(), ch_sendexpr() and
|
||||
ch_sendraw() functions on the same channel.
|
||||
|
||||
A LSP request message has the following format (expressed as a Vim Dict). The
|
||||
"params" field is optional: >
|
||||
|
||||
{
|
||||
"jsonrpc": "2.0",
|
||||
"id": <number>,
|
||||
"method": <string>,
|
||||
"params": <list|dict>
|
||||
}
|
||||
|
||||
A LSP reponse message has the following format (expressed as a Vim Dict). The
|
||||
"result" and "error" fields are optional: >
|
||||
|
||||
{
|
||||
"jsonrpc": "2.0",
|
||||
"id": <number>,
|
||||
"result": <vim type>
|
||||
"error": <dict>
|
||||
}
|
||||
|
||||
A LSP notification message has the following format (expressed as a Vim Dict).
|
||||
The "params" field is optional: >
|
||||
|
||||
{
|
||||
"jsonrpc": "2.0",
|
||||
"method": <string>,
|
||||
"params": <list|dict>
|
||||
}
|
||||
|
||||
Depending on the use case, you can use the ch_evalexpr(), ch_sendexpr() and
|
||||
ch_sendraw() functions on the same channel.
|
||||
|
||||
A LSP request message has the following format (expressed as a Vim Dict). The
|
||||
"params" field is optional: >
|
||||
|
||||
{
|
||||
"jsonrpc": "2.0",
|
||||
"id": <number>,
|
||||
"method": <string>,
|
||||
"params": <list|dict>
|
||||
}
|
||||
|
||||
A LSP reponse message has the following format (expressed as a Vim Dict). The
|
||||
"result" and "error" fields are optional: >
|
||||
|
||||
{
|
||||
"jsonrpc": "2.0",
|
||||
"id": <number>,
|
||||
"result": <vim type>
|
||||
"error": <dict>
|
||||
}
|
||||
|
||||
A LSP notification message has the following format (expressed as a Vim Dict).
|
||||
The "params" field is optional: >
|
||||
|
||||
{
|
||||
"jsonrpc": "2.0",
|
||||
"method": <string>,
|
||||
"params": <list|dict>
|
||||
}
|
||||
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*cmdline.txt* For Vim version 8.2. Last change: 2022 Feb 04
|
||||
*cmdline.txt* For Vim version 8.2. Last change: 2022 Apr 09
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -939,7 +939,7 @@ Note: these are typed literally, they are not special keys!
|
||||
file name of the sourced file. *E498*
|
||||
When executing a legacy function, is replaced with the call
|
||||
stack, as with <stack> (this is for backwards
|
||||
compatibility, using <stack> is preferred).
|
||||
compatibility, using <stack> or <script> is preferred).
|
||||
In Vim9 script using <sfile> in a function gives error
|
||||
*E1245* .
|
||||
Note that filename-modifiers are useless when <sfile> is
|
||||
@@ -951,6 +951,12 @@ Note: these are typed literally, they are not special keys!
|
||||
".." in between items. E.g.:
|
||||
"function {function-name1}[{lnum}]..{function-name2}[{lnum}]"
|
||||
If there is no call stack you get error *E489* .
|
||||
*:<script>* *<script>*
|
||||
<script> When executing a `:source` command, is replaced with the file
|
||||
name of the sourced file. When executing a function, is
|
||||
replaced with the file name of the script where it is
|
||||
defined.
|
||||
If the file name cannot be determined you get error *E1274* .
|
||||
*:<slnum>* *<slnum>*
|
||||
<slnum> When executing a ":source" command, is replaced with the
|
||||
line number. *E842*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*editing.txt* For Vim version 8.2. Last change: 2022 Feb 16
|
||||
*editing.txt* For Vim version 8.2. Last change: 2022 Apr 16
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -445,7 +445,8 @@ does apply like to other wildcards.
|
||||
Environment variables in the expression are expanded when evaluating the
|
||||
expression, thus this works: >
|
||||
:e `=$HOME .. '/.vimrc'`
|
||||
This does not work, $HOME is inside a string and used literally: >
|
||||
This uses $HOME inside a string and it will be used literally, most likely not
|
||||
what you intended: >
|
||||
:e `='$HOME' .. '/.vimrc'`
|
||||
|
||||
If the expression returns a string then names are to be separated with line
|
||||
@@ -1224,7 +1225,7 @@ Examples: >
|
||||
|
||||
If you want to always use ":confirm", set the 'confirm' option.
|
||||
|
||||
*:browse* *:bro* *E338* *E614* *E615* *E616*
|
||||
*:browse* *:bro* *E338*
|
||||
:bro[wse] {command} Open a file selection dialog for an argument to
|
||||
{command}. At present this works for |:e|, |:w|,
|
||||
|:wall|, |:wq|, |:wqall|, |:x|, |:xall|, |:exit|,
|
||||
@@ -1235,7 +1236,7 @@ If you want to always use ":confirm", set the 'confirm' option.
|
||||
|:diffsplit|, |:diffpatch|, |:open|, |:pedit|,
|
||||
|:redir|, |:source|, |:update|, |:visual|, |:vsplit|,
|
||||
and |:qall| if 'confirm' is set.
|
||||
{only in Win32, Athena, Motif, GTK and Mac GUI, in
|
||||
{only in Win32, Motif, GTK and Mac GUI, in
|
||||
console `browse edit` works if the FileExplorer
|
||||
autocommand group exists}
|
||||
When ":browse" is not possible you get an error
|
||||
@@ -1694,7 +1695,7 @@ session or with another command (e.g., a filter command). Then you will know
|
||||
which version of the file you want to keep.
|
||||
|
||||
The accuracy of the time check depends on the filesystem. On Unix it is
|
||||
usually sub-second. With old file sytems and on MS-Windows it is normally one
|
||||
usually sub-second. With old file systems and on MS-Windows it is normally one
|
||||
second. Use `has('nanotime')` to check if sub-second time stamp checks are
|
||||
available.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 8.2. Last change: 2022 Mar 05
|
||||
*eval.txt* For Vim version 8.2. Last change: 2022 Apr 17
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -181,7 +181,7 @@ You will not get an error if you try to change the type of a variable.
|
||||
|
||||
|
||||
1.2 Function references ~
|
||||
*Funcref* *E695* *E718* *E1086* *E1192*
|
||||
*Funcref* *E695* *E718* *E1192*
|
||||
A Funcref variable is obtained with the |function()| function, the |funcref()|
|
||||
function or created with the lambda expression |expr-lambda|. It can be used
|
||||
in an expression in the place of a function name, before the parenthesis
|
||||
@@ -261,7 +261,7 @@ position in the sequence.
|
||||
|
||||
List creation ~
|
||||
*E696* *E697*
|
||||
A List is created with a comma separated list of items in square brackets.
|
||||
A List is created with a comma-separated list of items in square brackets.
|
||||
Examples: >
|
||||
:let mylist = [1, two, 3, "four"]
|
||||
:let emptylist = []
|
||||
@@ -514,7 +514,7 @@ ordering.
|
||||
|
||||
Dictionary creation ~
|
||||
*E720* *E721* *E722* *E723*
|
||||
A Dictionary is created with a comma separated list of entries in curly
|
||||
A Dictionary is created with a comma-separated list of entries in curly
|
||||
braces. Each entry has a key and a value, separated by a colon. Each key can
|
||||
only appear once. Examples: >
|
||||
:let mydict = {1: 'one', 2: 'two', 3: 'three'}
|
||||
@@ -3224,14 +3224,32 @@ declarations and assignments do not use a command. |vim9-declaration|
|
||||
|
||||
*:let=<<* *:let-heredoc*
|
||||
*E990* *E991* *E172* *E221* *E1145*
|
||||
:let {var-name} =<< [trim] {endmarker}
|
||||
:let {var-name} =<< [trim] [eval] {endmarker}
|
||||
text...
|
||||
text...
|
||||
{endmarker}
|
||||
Set internal variable {var-name} to a |List|
|
||||
containing the lines of text bounded by the string
|
||||
{endmarker}. The lines of text is used as a
|
||||
|literal-string|.
|
||||
{endmarker}.
|
||||
|
||||
If "eval" is not specified, then each line of text is
|
||||
used as a |literal-string|. If "eval" is specified,
|
||||
then any Vim expression in the form ``={expr}`` is
|
||||
evaluated and the result replaces the expression.
|
||||
Example where $HOME is expanded: >
|
||||
let lines =<< trim eval END
|
||||
some text
|
||||
See the file `=$HOME`/.vimrc
|
||||
more text
|
||||
END
|
||||
< There can be multiple Vim expressions in a single line
|
||||
but an expression cannot span multiple lines. If any
|
||||
expression evaluation fails, then the assignment fails.
|
||||
once the "`=" has been found {expr} and a backtick
|
||||
must follow. {expr} cannot be empty.
|
||||
Currenty, in a compiled function {expr} is evaluated
|
||||
when compiling the function, THIS WILL CHANGE.
|
||||
|
||||
{endmarker} must not contain white space.
|
||||
{endmarker} cannot start with a lower case character.
|
||||
The last line should end only with the {endmarker}
|
||||
@@ -3281,6 +3299,13 @@ text...
|
||||
1 2 3 4
|
||||
5 6 7 8
|
||||
DATA
|
||||
|
||||
let code =<< trim eval CODE
|
||||
let v = `=10 + 20`
|
||||
let h = "`=$HOME`"
|
||||
let s = "`=Str1()` abc `=Str2()`"
|
||||
let n = `=MyFunc(3, 4)`
|
||||
CODE
|
||||
<
|
||||
*E121*
|
||||
:let {var-name} .. List the value of variable {var-name}. Multiple
|
||||
@@ -4698,7 +4723,7 @@ parentheses can be cut out from |v:exception| with the ":substitute" command.
|
||||
:
|
||||
:try
|
||||
:
|
||||
: " something with arithmetics and I/O
|
||||
: " something with arithmetic and I/O
|
||||
:
|
||||
:catch /^EXCEPT:MATHERR:RANGE/
|
||||
: let function = substitute(v:exception, '.*(\(\a\+\)).*', '\1', "")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*filetype.txt* For Vim version 8.2. Last change: 2022 Jan 21
|
||||
*filetype.txt* For Vim version 8.2. Last change: 2022 Apr 09
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -142,19 +142,28 @@ variables can be used to overrule the filetype used for certain extensions:
|
||||
*.asm g:asmsyntax |ft-asm-syntax|
|
||||
*.asp g:filetype_asp |ft-aspvbs-syntax| |ft-aspperl-syntax|
|
||||
*.bas g:filetype_bas |ft-basic-syntax|
|
||||
*.cfg g:filetype_cfg
|
||||
*.dat g:filetype_dat
|
||||
*.frm g:filetype_frm |ft-form-syntax|
|
||||
*.fs g:filetype_fs |ft-forth-syntax|
|
||||
*.i g:filetype_i |ft-progress-syntax|
|
||||
*.inc g:filetype_inc
|
||||
*.m g:filetype_m |ft-mathematica-syntax|
|
||||
*.mod g:filetype_mod
|
||||
*.p g:filetype_p |ft-pascal-syntax|
|
||||
*.pl g:filetype_pl
|
||||
*.pp g:filetype_pp |ft-pascal-syntax|
|
||||
*.prg g:filetype_prg
|
||||
*.src g:filetype_src
|
||||
*.sys g:filetype_sys
|
||||
*.sh g:bash_is_sh |ft-sh-syntax|
|
||||
*.tex g:tex_flavor |ft-tex-plugin|
|
||||
*.w g:filetype_w |ft-cweb-syntax|
|
||||
|
||||
For a few filetypes the global variable is used only when the filetype could
|
||||
not be detected:
|
||||
*.r g:filetype_r |ft-rexx-syntax|
|
||||
|
||||
*filetype-ignore*
|
||||
To avoid that certain files are being inspected, the g:ft_ignore_pat variable
|
||||
is used. The default value is set like this: >
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*ft_sql.txt* For Vim version 8.2. Last change: 2019 Dec 07
|
||||
*ft_sql.txt* For Vim version 8.2. Last change: 2022 Apr 06
|
||||
|
||||
by David Fishburn
|
||||
|
||||
@@ -559,7 +559,7 @@ the SQL completion plugin. >
|
||||
< 1. After typing SELECT press <C-C>t to display a list of tables.
|
||||
2. Highlight the table you need the column list for.
|
||||
3. Press <Enter> to choose the table from the list.
|
||||
4. Press <C-C>l to request a comma separated list of all columns
|
||||
4. Press <C-C>l to request a comma-separated list of all columns
|
||||
for this table.
|
||||
5. Based on the table name chosen in step 3, the plugin attempts to
|
||||
decide on a reasonable table alias. You are then prompted to
|
||||
@@ -613,7 +613,7 @@ your |vimrc|: >
|
||||
>
|
||||
omni_sql_use_tbl_alias
|
||||
< - Default: a
|
||||
- This setting is only used when generating a comma separated
|
||||
- This setting is only used when generating a comma-separated
|
||||
column list. By default the map is <C-C>l. When generating
|
||||
a column list, an alias can be prepended to the beginning of each
|
||||
column, for example: e.emp_id, e.emp_name. This option has three
|
||||
@@ -697,9 +697,9 @@ plugin. >
|
||||
<C-C>c
|
||||
< - Displays a list of columns for a specific table. >
|
||||
<C-C>l
|
||||
< - Displays a comma separated list of columns for a specific table. >
|
||||
< - Displays a comma-separated list of columns for a specific table. >
|
||||
<C-C>L
|
||||
< - Displays a comma separated list of columns for a specific table.
|
||||
< - Displays a comma-separated list of columns for a specific table.
|
||||
This should only be used when the completion window is active. >
|
||||
<Right>
|
||||
< - Displays a list of columns for the table currently highlighted in
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*gui.txt* For Vim version 8.2. Last change: 2022 Mar 02
|
||||
*gui.txt* For Vim version 8.2. Last change: 2022 Apr 03
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*indent.txt* For Vim version 8.2. Last change: 2022 Jan 31
|
||||
*indent.txt* For Vim version 8.2. Last change: 2022 Apr 07
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -42,11 +42,12 @@ is not a C compiler: it does not recognize all syntax. One requirement is
|
||||
that toplevel functions have a '{' in the first column. Otherwise they are
|
||||
easily confused with declarations.
|
||||
|
||||
These four options control C program indenting:
|
||||
These five options control C program indenting:
|
||||
'cindent' Enables Vim to perform C program indenting automatically.
|
||||
'cinkeys' Specifies which keys trigger reindenting in insert mode.
|
||||
'cinoptions' Sets your preferred indent style.
|
||||
'cinwords' Defines keywords that start an extra indent in the next line.
|
||||
'cinscopedecls' Defines strings that are recognized as a C++ scope declaration.
|
||||
|
||||
If 'lisp' is not on and 'equalprg' is empty, the "=" operator indents using
|
||||
Vim's built-in algorithm rather than calling an external program.
|
||||
@@ -293,8 +294,9 @@ The examples below assume a 'shiftwidth' of 4.
|
||||
<
|
||||
*cino-g*
|
||||
gN Place C++ scope declarations N characters from the indent of the
|
||||
block they are in. (default 'shiftwidth'). A scope declaration
|
||||
can be "public:", "protected:" or "private:".
|
||||
block they are in. (default 'shiftwidth'). By default, a scope
|
||||
declaration is "public:", "protected:" or "private:". This can
|
||||
be adjusted with the 'cinscopedecls' option.
|
||||
|
||||
cino= cino=g0 >
|
||||
{ {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*insert.txt* For Vim version 8.2. Last change: 2022 Mar 28
|
||||
*insert.txt* For Vim version 8.2. Last change: 2022 Apr 06
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -272,7 +272,7 @@ CTRL-] Trigger abbreviation, without inserting a character.
|
||||
|
||||
*i_backspacing*
|
||||
The effect of the <BS>, CTRL-W, and CTRL-U depend on the 'backspace' option
|
||||
(unless 'revins' is set). This is a comma separated list of items:
|
||||
(unless 'revins' is set). This is a comma-separated list of items:
|
||||
|
||||
item action ~
|
||||
indent allow backspacing over autoindent
|
||||
@@ -1196,7 +1196,7 @@ three lines, but 'previewheight' is used when it has a value of 1 or 2.
|
||||
*complete-popup*
|
||||
When "popup" is in 'completeopt' a popup window is used to display the "info".
|
||||
Then the 'completepopup' option specifies the properties of the popup. This
|
||||
is used when the info popup is created. The option is a comma separated list
|
||||
is used when the info popup is created. The option is a comma-separated list
|
||||
of values:
|
||||
height maximum height of the popup
|
||||
width maximum width of the popup
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*intro.txt* For Vim version 8.2. Last change: 2022 Mar 03
|
||||
*intro.txt* For Vim version 8.2. Last change: 2022 Apr 03
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -213,7 +213,7 @@ Vim would never have become what it is now, without the help of these people!
|
||||
Daniel Elstner GTK+ 2 port
|
||||
Eric Fischer Mac port, 'cindent', and other improvements
|
||||
Benji Fisher Answering lots of user questions
|
||||
Bill Foster Athena GUI port
|
||||
Bill Foster Athena GUI port (later removed)
|
||||
Google Lets me work on Vim one day a week
|
||||
Loic Grenie xvim (ideas for multi windows version)
|
||||
Sven Guckes Vim promoter and previous WWW page maintainer
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*map.txt* For Vim version 8.2. Last change: 2022 Mar 03
|
||||
*map.txt* For Vim version 8.2. Last change: 2022 Apr 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -697,6 +697,10 @@ The special key name "<Plug>" can be used for an internal mapping, which is
|
||||
not to be matched with any key sequence. This is useful in plugins
|
||||
|using-<Plug>|.
|
||||
|
||||
*<MouseMove>*
|
||||
The special key name "<MouseMove>" can be used to handle mouse movement. It
|
||||
needs to be enabled with 'mousemoveevent'. Currently only works in the GUI.
|
||||
|
||||
*<Char>* *<Char->*
|
||||
To map a character by its decimal, octal or hexadecimal number the <Char>
|
||||
construct can be used:
|
||||
@@ -1320,7 +1324,8 @@ underscore. Example: >
|
||||
could define a mapping "<SNR>23_Add".
|
||||
|
||||
When defining a function in a script, "s:" can be prepended to the name to
|
||||
make it local to the script. But when a mapping is executed from outside of
|
||||
make it local to the script (in |Vim9| script functions without a prefix are
|
||||
local to the script). But when a mapping is executed from outside of
|
||||
the script, it doesn't know in which script the function was defined. To
|
||||
avoid this problem, use "<SID>" instead of "s:". The same translation is done
|
||||
as for mappings. This makes it possible to define a call to the function in
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*mbyte.txt* For Vim version 8.2. Last change: 2022 Jan 20
|
||||
*mbyte.txt* For Vim version 8.2. Last change: 2022 Apr 03
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar et al.
|
||||
@@ -702,7 +702,7 @@ USING RESOURCE FILES
|
||||
Instead of specifying 'guifontset', you can set X11 resources and Vim will
|
||||
pick them up. This is only for people who know how X resource files work.
|
||||
|
||||
For Motif and Athena insert these three lines in your $HOME/.Xdefaults file:
|
||||
For Motif insert these three lines in your $HOME/.Xdefaults file:
|
||||
|
||||
Vim.font: |base_font_name_list|
|
||||
Vim*fontSet: |base_font_name_list|
|
||||
@@ -1280,7 +1280,7 @@ internally.
|
||||
|
||||
Vim has comprehensive UTF-8 support. It works well in:
|
||||
- xterm with UTF-8 support enabled
|
||||
- Athena, Motif and GTK GUI
|
||||
- Motif and GTK GUI
|
||||
- MS-Windows GUI
|
||||
- several other platforms
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*motion.txt* For Vim version 8.2. Last change: 2021 Dec 27
|
||||
*motion.txt* For Vim version 8.2. Last change: 2022 Apr 18
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -33,7 +33,8 @@ know what the hjkl keys do. The mnemonic value of hjkl is clear from looking
|
||||
at the keyboard. Think of j as an arrow pointing downwards.
|
||||
|
||||
The 'virtualedit' option can be set to make it possible to move the cursor to
|
||||
positions where there is no character or halfway a character.
|
||||
positions where there is no character or within a multi-column character (like
|
||||
a tab).
|
||||
|
||||
==============================================================================
|
||||
1. Motions and operators *operator*
|
||||
@@ -445,35 +446,35 @@ between Vi and Vim.
|
||||
5. Text object motions *object-motions*
|
||||
|
||||
*(*
|
||||
( [count] sentences backward. |exclusive| motion.
|
||||
( [count] |sentence|s backward. |exclusive| motion.
|
||||
|
||||
*)*
|
||||
) [count] sentences forward. |exclusive| motion.
|
||||
) [count] |sentence|s forward. |exclusive| motion.
|
||||
|
||||
*{*
|
||||
{ [count] paragraphs backward. |exclusive| motion.
|
||||
{ [count] |paragraph|s backward. |exclusive| motion.
|
||||
|
||||
*}*
|
||||
} [count] paragraphs forward. |exclusive| motion.
|
||||
} [count] |paragraph|s forward. |exclusive| motion.
|
||||
|
||||
*]]*
|
||||
]] [count] sections forward or to the next '{' in the
|
||||
]] [count] |section|s forward or to the next '{' in the
|
||||
first column. When used after an operator, then also
|
||||
stops below a '}' in the first column. |exclusive|
|
||||
Note that |exclusive-linewise| often applies.
|
||||
|
||||
*][*
|
||||
][ [count] sections forward or to the next '}' in the
|
||||
][ [count] |section|s forward or to the next '}' in the
|
||||
first column. |exclusive|
|
||||
Note that |exclusive-linewise| often applies.
|
||||
|
||||
*[[*
|
||||
[[ [count] sections backward or to the previous '{' in
|
||||
[[ [count] |section|s backward or to the previous '{' in
|
||||
the first column. |exclusive|
|
||||
Note that |exclusive-linewise| often applies.
|
||||
|
||||
*[]*
|
||||
[] [count] sections backward or to the previous '}' in
|
||||
[] [count] |section|s backward or to the previous '}' in
|
||||
the first column. |exclusive|
|
||||
Note that |exclusive-linewise| often applies.
|
||||
|
||||
@@ -1076,6 +1077,9 @@ The "file/text" column shows the file name, or the text at the jump if it is
|
||||
in the current file (an indent is removed and a long line is truncated to fit
|
||||
in the window).
|
||||
|
||||
The marker ">" indicates the current position in the jumplist. It may not be
|
||||
shown when filtering the |:jumps| command using |:filter|
|
||||
|
||||
You are currently in line 1167. If you then use the CTRL-O command, the
|
||||
cursor is put in line 1154. This results in:
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*netbeans.txt* For Vim version 8.2. Last change: 2020 Nov 02
|
||||
*netbeans.txt* For Vim version 8.2. Last change: 2022 Apr 03
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Gordon Prieur et al.
|
||||
@@ -124,12 +124,12 @@ In case you do not want the NetBeans interface you can disable it by
|
||||
uncommenting a line with "--disable-netbeans" in the Makefile.
|
||||
|
||||
Currently the NetBeans interface is supported by Vim running in a terminal and
|
||||
by gvim when it is run with one of the following GUIs: GTK, GNOME, Windows,
|
||||
Athena and Motif.
|
||||
by gvim when it is run with one of the following GUIs: GTK, GNOME, Windows
|
||||
and Motif.
|
||||
|
||||
*netbeans-xpm*
|
||||
If Motif support is required the user must supply XPM libraries.
|
||||
The XPM library is required to show images within Vim with Motif or Athena.
|
||||
The XPM library is required to show images within Vim with Motif.
|
||||
Without it the toolbar and signs will be disabled.
|
||||
|
||||
The XPM library is provided by Arnaud Le Hors of the French National Institute
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 8.2. Last change: 2022 Mar 29
|
||||
*options.txt* For Vim version 8.2. Last change: 2022 Apr 13
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -87,7 +87,7 @@ achieve special effects. These options come in three forms:
|
||||
:se[t] {option}+={value} *:set+=*
|
||||
Add the {value} to a number option, or append the
|
||||
{value} to a string option. When the option is a
|
||||
comma separated list, a comma is added, unless the
|
||||
comma-separated list, a comma is added, unless the
|
||||
value was empty.
|
||||
If the option is a list of flags, superfluous flags
|
||||
are removed. When adding a flag that was already
|
||||
@@ -97,7 +97,7 @@ achieve special effects. These options come in three forms:
|
||||
:se[t] {option}^={value} *:set^=*
|
||||
Multiply the {value} to a number option, or prepend
|
||||
the {value} to a string option. When the option is a
|
||||
comma separated list, a comma is added, unless the
|
||||
comma-separated list, a comma is added, unless the
|
||||
value was empty.
|
||||
Also see |:set-args| above.
|
||||
|
||||
@@ -1019,7 +1019,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
'backupcopy' 'bkc' string (Vi default for Unix: "yes", otherwise: "auto")
|
||||
global or local to buffer |global-local|
|
||||
When writing a file and a backup is made, this option tells how it's
|
||||
done. This is a comma separated list of words.
|
||||
done. This is a comma-separated list of words.
|
||||
|
||||
The main values are:
|
||||
"yes" make a copy of the file and overwrite the original one
|
||||
@@ -1043,10 +1043,10 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
file.
|
||||
- When the file is a link the new file will not be a link.
|
||||
|
||||
The "auto" value is the middle way: When Vim sees that renaming file
|
||||
is possible without side effects (the attributes can be passed on and
|
||||
the file is not a link) that is used. When problems are expected, a
|
||||
copy will be made.
|
||||
The "auto" value is the middle way: When Vim sees that renaming the
|
||||
file is possible without side effects (the attributes can be passed on
|
||||
and the file is not a link) that is used. When problems are expected,
|
||||
a copy will be made.
|
||||
|
||||
The "breaksymlink" and "breakhardlink" values can be used in
|
||||
combination with any of "yes", "no" and "auto". When included, they
|
||||
@@ -1065,13 +1065,13 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|
||||
When a copy is made, the original file is truncated and then filled
|
||||
with the new text. This means that protection bits, owner and
|
||||
symbolic links of the original file are unmodified. The backup file
|
||||
symbolic links of the original file are unmodified. The backup file,
|
||||
however, is a new file, owned by the user who edited the file. The
|
||||
group of the backup is set to the group of the original file. If this
|
||||
fails, the protection bits for the group are made the same as for
|
||||
others.
|
||||
|
||||
When the file is renamed this is the other way around: The backup has
|
||||
When the file is renamed, this is the other way around: The backup has
|
||||
the same attributes of the original file, and the newly written file
|
||||
is owned by the current user. When the file was a (hard/symbolic)
|
||||
link, the new file will not! That's why the "auto" value doesn't
|
||||
@@ -1138,7 +1138,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
accidentally overwriting existing files with a backup file. You might
|
||||
prefer using ".bak", but make sure that you don't have files with
|
||||
".bak" that you want to keep.
|
||||
Only normal file name characters can be used, "/\*?[|<>" are illegal.
|
||||
Only normal file name characters can be used; "/\*?[|<>" are illegal.
|
||||
|
||||
If you like to keep a lot of backups, you could use a BufWritePre
|
||||
autocommand to change 'backupext' just before writing the file to
|
||||
@@ -1265,6 +1265,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
separated list of items. For each item that is present, the bell
|
||||
will be silenced. This is most useful to specify specific events in
|
||||
insert mode to be silenced.
|
||||
You can also make it flash by using 'visualbell'.
|
||||
|
||||
item meaning when present ~
|
||||
all All events.
|
||||
@@ -1290,6 +1291,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
register Unknown register after <C-R> in |Insert-mode|.
|
||||
shell Bell from shell output |:!|.
|
||||
spell Error happened on spell suggest.
|
||||
term Bell from |:terminal| output.
|
||||
wildmode More matches in |cmdline-completion| available
|
||||
(depends on the 'wildmode' setting).
|
||||
|
||||
@@ -1402,7 +1404,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*'browsedir'* *'bsdir'*
|
||||
'browsedir' 'bsdir' string (default: "last")
|
||||
global
|
||||
{only for Motif, Athena, GTK, Mac and Win32 GUI}
|
||||
{only for Motif, GTK, Mac and Win32 GUI}
|
||||
Which directory to use for the file browser:
|
||||
last Use same directory as with last file browser, where a
|
||||
file was opened or saved.
|
||||
@@ -1416,16 +1418,16 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
This option specifies what happens when a buffer is no longer
|
||||
displayed in a window:
|
||||
<empty> follow the global 'hidden' option
|
||||
hide hide the buffer (don't unload it), also when 'hidden'
|
||||
is not set
|
||||
unload unload the buffer, also when 'hidden' is set or using
|
||||
|:hide|
|
||||
delete delete the buffer from the buffer list, also when
|
||||
'hidden' is set or using |:hide|, like using
|
||||
|:bdelete|
|
||||
wipe wipe out the buffer from the buffer list, also when
|
||||
'hidden' is set or using |:hide|, like using
|
||||
|:bwipeout|
|
||||
hide hide the buffer (don't unload it), even if 'hidden' is
|
||||
not set
|
||||
unload unload the buffer, even if 'hidden' is set; the
|
||||
|:hide| command will also unlod the buffer
|
||||
delete delete the buffer from the buffer list, even if
|
||||
'hidden' is set; the |:hide| command will also delete
|
||||
the buffer, making it behave like |:bdelete|
|
||||
wipe wipe the buffer from the buffer list, even if
|
||||
'hidden' is set; the |:hide| command will also wipe
|
||||
out the buffer, making it behave like |:bwipeout|
|
||||
|
||||
CAREFUL: when "unload", "delete" or "wipe" is used changes in a buffer
|
||||
are lost without a warning. Also, these values may break autocommands
|
||||
@@ -1661,13 +1663,23 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
matter, include the keyword both the uppercase and lowercase:
|
||||
"if,If,IF".
|
||||
|
||||
*'clipboard'* *'cb'*
|
||||
*'cinscopedecls'* *'cinsd'*
|
||||
'cinscopedecls' 'cinsd' string (default "public,protected,private")
|
||||
local to buffer
|
||||
{not available when compiled without the |+cindent|
|
||||
feature}
|
||||
Keywords that are interpreted as a C++ scope declaration by |cino-g|.
|
||||
Useful e.g. for working with the Qt framework that defines additional
|
||||
scope declarations "signals", "public slots" and "private slots": >
|
||||
set cinscopedecls+=signals,public\ slots,private\ slots
|
||||
|
||||
< *'clipboard'* *'cb'*
|
||||
'clipboard' 'cb' string (default "autoselect,exclude:cons\|linux"
|
||||
for X-windows, "" otherwise)
|
||||
global
|
||||
{only in GUI versions or when the |+xterm_clipboard|
|
||||
feature is included}
|
||||
This option is a list of comma separated names.
|
||||
This option is a list of comma-separated names.
|
||||
Note: if one of the items is "exclude:", then you can't add an item
|
||||
after that. Therefore do append an item with += but use ^= to
|
||||
prepend, e.g.: >
|
||||
@@ -1768,7 +1780,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
local to window
|
||||
{not available when compiled without the |+syntax|
|
||||
feature}
|
||||
'colorcolumn' is a comma separated list of screen columns that are
|
||||
'colorcolumn' is a comma-separated list of screen columns that are
|
||||
highlighted with ColorColumn |hl-ColorColumn|. Useful to align
|
||||
text. Will make screen redrawing slower.
|
||||
The screen column can be an absolute number, or a number preceded with
|
||||
@@ -1802,7 +1814,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
'comments' 'com' string (default
|
||||
"s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-")
|
||||
local to buffer
|
||||
A comma separated list of strings that can start a comment line. See
|
||||
A comma-separated list of strings that can start a comment line. See
|
||||
|format-comments|. See |option-backslash| about using backslashes to
|
||||
insert a space.
|
||||
|
||||
@@ -1943,7 +1955,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
This option specifies how keyword completion |ins-completion| works
|
||||
when CTRL-P or CTRL-N are used. It is also used for whole-line
|
||||
completion |i_CTRL-X_CTRL-L|. It indicates the type of completion
|
||||
and the places to scan. It is a comma separated list of flags:
|
||||
and the places to scan. It is a comma-separated list of flags:
|
||||
. scan the current buffer ('wrapscan' is ignored)
|
||||
w scan buffers from other windows
|
||||
b scan other loaded buffers that are in the buffer list
|
||||
@@ -2012,7 +2024,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*'completeopt'* *'cot'*
|
||||
'completeopt' 'cot' string (default: "menu,preview")
|
||||
global
|
||||
A comma separated list of options for Insert mode completion
|
||||
A comma-separated list of options for Insert mode completion
|
||||
|ins-completion|. The supported values are:
|
||||
|
||||
menu Use a popup menu to show the possible completions. The
|
||||
@@ -2628,7 +2640,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
local to window
|
||||
{not available when compiled without the |+syntax|
|
||||
feature}
|
||||
Comma separated list of settings for how 'cursorline' is displayed.
|
||||
Comma-separated list of settings for how 'cursorline' is displayed.
|
||||
Valid values:
|
||||
"line" Highlight the text line of the cursor with
|
||||
CursorLine |hl-CursorLine|.
|
||||
@@ -2908,7 +2920,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
'display' 'dy' string (default "", set to "truncate" in
|
||||
|defaults.vim|)
|
||||
global
|
||||
Change the way text is displayed. This is comma separated list of
|
||||
Change the way text is displayed. This is comma-separated list of
|
||||
flags:
|
||||
lastline When included, as much as possible of the last line
|
||||
in a window will be displayed. "@@@" is put in the
|
||||
@@ -3112,7 +3124,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
A list of autocommand event names, which are to be ignored.
|
||||
When set to "all" or when "all" is one of the items, all autocommand
|
||||
events are ignored, autocommands will not be executed.
|
||||
Otherwise this is a comma separated list of event names. Example: >
|
||||
Otherwise this is a comma-separated list of event names. Example: >
|
||||
:set ei=WinEnter,WinLeave
|
||||
<
|
||||
*'expandtab'* *'et'* *'noexpandtab'* *'noet'*
|
||||
@@ -3372,7 +3384,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
{not available when compiled without the |+folding|
|
||||
feature}
|
||||
Characters to fill the statuslines and vertical separators.
|
||||
It is a comma separated list of items:
|
||||
It is a comma-separated list of items:
|
||||
|
||||
item default Used for ~
|
||||
stl:c ' ' or '^' statusline of the current window
|
||||
@@ -3562,7 +3574,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
{not available when compiled without the |+folding|
|
||||
feature}
|
||||
Specifies for which type of commands folds will be opened, if the
|
||||
command moves the cursor into a closed fold. It is a comma separated
|
||||
command moves the cursor into a closed fold. It is a comma-separated
|
||||
list of items.
|
||||
NOTE: When the command is part of a mapping this option is not used.
|
||||
Add the |zv| command to the mapping to get the same effect.
|
||||
@@ -3780,7 +3792,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
For a console the 't_SI', 't_SR', and 't_EI' escape sequences are
|
||||
used.
|
||||
|
||||
The option is a comma separated list of parts. Each part consist of a
|
||||
The option is a comma-separated list of parts. Each part consist of a
|
||||
mode-list and an argument-list:
|
||||
mode-list:argument-list,mode-list:argument-list,..
|
||||
The mode-list is a dash separated list of these modes:
|
||||
@@ -3899,7 +3911,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*'guioptions'* *'go'*
|
||||
'guioptions' 'go' string (default "egmrLtT" (MS-Windows,
|
||||
"t" is removed in |defaults.vim|),
|
||||
"aegimrLtT" (GTK, Motif and Athena),
|
||||
"aegimrLtT" (GTK and Motif),
|
||||
)
|
||||
global
|
||||
{only available when compiled with GUI enabled}
|
||||
@@ -3980,13 +3992,12 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*'go-g'*
|
||||
'g' Grey menu items: Make menu items that are not active grey. If
|
||||
'g' is not included inactive menu items are not shown at all.
|
||||
Exception: Athena will always use grey menu items.
|
||||
*'go-t'*
|
||||
't' Include tearoff menu items. Currently only works for Win32,
|
||||
GTK+, and Motif 1.2 GUI.
|
||||
*'go-T'*
|
||||
'T' Include Toolbar. Currently only in Win32, GTK+, Motif, Photon
|
||||
and Athena GUIs.
|
||||
'T' Include Toolbar. Currently only in Win32, GTK+, Motif and
|
||||
Photon GUIs.
|
||||
*'go-r'*
|
||||
'r' Right-hand scrollbar is always present.
|
||||
*'go-R'*
|
||||
@@ -4092,7 +4103,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
global
|
||||
{only available when compiled with the |+multi_lang|
|
||||
feature}
|
||||
Comma separated list of languages. Vim will use the first language
|
||||
Comma-separated list of languages. Vim will use the first language
|
||||
for which the desired help can be found. The English help will always
|
||||
be used as a last resort. You can add "en" to prefer English over
|
||||
another language, but that will only find tags that exist in that
|
||||
@@ -4111,10 +4122,14 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
When off a buffer is unloaded when it is |abandon|ed. When on a
|
||||
buffer becomes hidden when it is |abandon|ed. If the buffer is still
|
||||
displayed in another window, it does not become hidden, of course.
|
||||
|
||||
The commands that move through the buffer list sometimes make a buffer
|
||||
hidden although the 'hidden' option is off: When the buffer is
|
||||
modified, 'autowrite' is off or writing is not possible, and the '!'
|
||||
flag was used. See also |windows.txt|.
|
||||
hidden even if the 'hidden' option is off when these three are true:
|
||||
- the buffer is modified
|
||||
- 'autowrite' is off or writing is not possible
|
||||
- the '!' flag was used
|
||||
Also see |windows.txt|.
|
||||
|
||||
To only make one buffer hidden use the 'bufhidden' option.
|
||||
This option is set for one command with ":hide {command}" |:hide|.
|
||||
WARNING: It's easy to forget that you have changes in hidden buffers.
|
||||
@@ -4140,7 +4155,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
z:StatusLineTerm,Z:StatusLineTermNC")
|
||||
global
|
||||
This option can be used to set highlighting mode for various
|
||||
occasions. It is a comma separated list of character pairs. The
|
||||
occasions. It is a comma-separated list of character pairs. The
|
||||
first character in a pair gives the occasion, the second the mode to
|
||||
use for that occasion. The occasions are:
|
||||
|hl-SpecialKey| 8 Meta and special keys listed with ":map"
|
||||
@@ -4152,6 +4167,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|hl-ErrorMsg| e error messages
|
||||
h (obsolete, ignored)
|
||||
|hl-IncSearch| i 'incsearch' highlighting
|
||||
|hl-CurSearch| y current instance of last search pattern
|
||||
|hl-Search| l last search pattern highlighting (see 'hlsearch')
|
||||
|hl-MoreMsg| m |more-prompt|
|
||||
|hl-ModeMsg| M Mode (e.g., "-- INSERT --")
|
||||
@@ -4395,7 +4411,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|i_CTRL-^|.
|
||||
The value is set to 1 when setting 'keymap' to a valid keymap name.
|
||||
It is also used for the argument of commands like "r" and "f".
|
||||
The value 0 may not work correctly with Athena and Motif with some XIM
|
||||
The value 0 may not work correctly with Motif with some XIM
|
||||
methods. Use 'imdisable' to disable XIM then.
|
||||
|
||||
You can set 'imactivatefunc' and 'imstatusfunc' to handle IME/XIM
|
||||
@@ -4416,7 +4432,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|c_CTRL-^|.
|
||||
The value is set to 1 when it is not -1 and setting the 'keymap'
|
||||
option to a valid keymap name.
|
||||
The value 0 may not work correctly with Athena and Motif with some XIM
|
||||
The value 0 may not work correctly with Motif with some XIM
|
||||
methods. Use 'imdisable' to disable XIM then.
|
||||
|
||||
*'imstatusfunc'* *'imsf'*
|
||||
@@ -4807,7 +4823,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*'keymodel'* *'km'*
|
||||
'keymodel' 'km' string (default "")
|
||||
global
|
||||
List of comma separated words, which enable special things that keys
|
||||
List of comma-separated words, which enable special things that keys
|
||||
can do. These values can be used:
|
||||
startsel Using a shifted special key starts selection (either
|
||||
Select mode or Visual mode, depending on "key" being
|
||||
@@ -5008,7 +5024,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
global or local to buffer |global-local|
|
||||
{not available when compiled without the |+lispindent|
|
||||
feature}
|
||||
Comma separated list of words that influence the Lisp indenting.
|
||||
Comma-separated list of words that influence the Lisp indenting.
|
||||
|'lisp'|
|
||||
|
||||
*'list'* *'nolist'*
|
||||
@@ -5032,7 +5048,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
'listchars' 'lcs' string (default "eol:$")
|
||||
global or local to window |global-local|
|
||||
Strings to use in 'list' mode and for the |:list| command. It is a
|
||||
comma separated list of string settings.
|
||||
comma-separated list of string settings.
|
||||
*lcs-eol*
|
||||
eol:c Character to show at the end of each line. When
|
||||
omitted, there is no extra character at the end of the
|
||||
@@ -5537,7 +5553,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
{only available when compiled with the |+mouseshape|
|
||||
feature}
|
||||
This option tells Vim what the mouse pointer should look like in
|
||||
different modes. The option is a comma separated list of parts, much
|
||||
different modes. The option is a comma-separated list of parts, much
|
||||
like used for 'guicursor'. Each part consist of a mode/location-list
|
||||
and an argument-list:
|
||||
mode-list:shape,mode-list:shape,..
|
||||
@@ -6678,7 +6694,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*'selectmode'* *'slm'*
|
||||
'selectmode' 'slm' string (default "")
|
||||
global
|
||||
This is a comma separated list of words, which specifies when to start
|
||||
This is a comma-separated list of words, which specifies when to start
|
||||
Select mode instead of Visual mode, when a selection is started.
|
||||
Possible values:
|
||||
mouse when using the mouse
|
||||
@@ -7297,7 +7313,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
commands. It must end in ".{encoding}.add". You need to include the
|
||||
path, otherwise the file is placed in the current directory.
|
||||
*E765*
|
||||
It may also be a comma separated list of names. A count before the
|
||||
It may also be a comma-separated list of names. A count before the
|
||||
|zg| and |zw| commands can be used to access each. This allows using
|
||||
a personal word list file and a project word list file.
|
||||
When a word is added while this option is empty Vim will set it for
|
||||
@@ -7319,7 +7335,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
local to buffer
|
||||
{not available when compiled without the |+syntax|
|
||||
feature}
|
||||
A comma separated list of word list names. When the 'spell' option is
|
||||
A comma-separated list of word list names. When the 'spell' option is
|
||||
on spellchecking will be done for these languages. Example: >
|
||||
set spelllang=en_us,nl,medical
|
||||
< This means US English, Dutch and medical words are recognized. Words
|
||||
@@ -7364,7 +7380,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
local to buffer
|
||||
{not available when compiled without the |+syntax|
|
||||
feature}
|
||||
A comma separated list of options for spell checking:
|
||||
A comma-separated list of options for spell checking:
|
||||
camel When a word is CamelCased, assume "Cased" is a
|
||||
separate word: every upper-case character in a word
|
||||
that comes after a lower case character indicates the
|
||||
@@ -7669,7 +7685,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
local to buffer
|
||||
{not available when compiled without the
|
||||
|+file_in_path| feature}
|
||||
Comma separated list of suffixes, which are used when searching for a
|
||||
Comma-separated list of suffixes, which are used when searching for a
|
||||
file for the "gf", "[I", etc. commands. Example: >
|
||||
:set suffixesadd=.java
|
||||
<
|
||||
@@ -7715,7 +7731,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
This option controls the behavior when switching between buffers.
|
||||
Mostly for |quickfix| commands some values are also used for other
|
||||
commands, as mentioned below.
|
||||
Possible values (comma separated list):
|
||||
Possible values (comma-separated list):
|
||||
useopen If included, jump to the first open window that
|
||||
contains the specified buffer (if there is one).
|
||||
Otherwise: Do not examine other windows.
|
||||
@@ -8348,8 +8364,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*'toolbar'* *'tb'*
|
||||
'toolbar' 'tb' string (default "icons,tooltips")
|
||||
global
|
||||
{only for |+GUI_GTK|, |+GUI_Athena|, |+GUI_Motif| and
|
||||
|+GUI_Photon|}
|
||||
{only for |+GUI_GTK|, |+GUI_Motif| and |+GUI_Photon|}
|
||||
The contents of this option controls various toolbar settings. The
|
||||
possible values are:
|
||||
icons Toolbar buttons are shown with icons.
|
||||
@@ -8363,7 +8378,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
If you want the toolbar to be shown with icons as well as text, do the
|
||||
following: >
|
||||
:set tb=icons,text
|
||||
< Motif and Athena cannot display icons and text at the same time. They
|
||||
< Motif cannot display icons and text at the same time. They
|
||||
will show icons if both are requested.
|
||||
|
||||
If none of the strings specified in 'toolbar' are valid or if
|
||||
@@ -8682,7 +8697,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
global
|
||||
{not available when compiled without the |+mksession|
|
||||
feature}
|
||||
Changes the effect of the |:mkview| command. It is a comma separated
|
||||
Changes the effect of the |:mkview| command. It is a comma-separated
|
||||
list of words. Each word enables saving and restoring something:
|
||||
word save and restore ~
|
||||
cursor cursor position in file and in window
|
||||
@@ -8712,7 +8727,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
When non-empty, the viminfo file is read upon startup and written
|
||||
when exiting Vim (see |viminfo-file|). Except when 'viminfofile' is
|
||||
"NONE".
|
||||
The string should be a comma separated list of parameters, each
|
||||
The string should be a comma-separated list of parameters, each
|
||||
consisting of a single character identifying the particular parameter,
|
||||
followed by a number or string which specifies the value of that
|
||||
parameter. If a particular character is left out, then the default
|
||||
@@ -8835,7 +8850,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*'virtualedit'* *'ve'*
|
||||
'virtualedit' 've' string (default "")
|
||||
global or local to window |global-local|
|
||||
A comma separated list of these words:
|
||||
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.
|
||||
@@ -9051,7 +9066,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
'wildmode' 'wim' string (Vim default: "full")
|
||||
global
|
||||
Completion mode that is used for the character specified with
|
||||
'wildchar'. It is a comma separated list of up to four parts. Each
|
||||
'wildchar'. It is a comma-separated list of up to four parts. Each
|
||||
part specifies what to do for each consecutive use of 'wildchar'. The
|
||||
first part specifies the behavior for the first use of 'wildchar',
|
||||
The second part for the second use, etc.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*pi_netrw.txt* For Vim version 8.2. Last change: 2021 Aug 16
|
||||
*pi_netrw.txt* For Vim version 8.2. Last change: 2022 Apr 06
|
||||
|
||||
------------------------------------------------
|
||||
NETRW REFERENCE MANUAL by Charles E. Campbell
|
||||
@@ -2815,7 +2815,7 @@ your browsing preferences. (see also: |netrw-settings|)
|
||||
= 2: wide listing (multiple files in columns)
|
||||
= 3: tree style listing
|
||||
|
||||
*g:netrw_list_hide* comma separated pattern list for hiding files
|
||||
*g:netrw_list_hide* comma-separated pattern list for hiding files
|
||||
Patterns are regular expressions (see |regexp|)
|
||||
There's some special support for git-ignore
|
||||
files: you may add the output from the helper
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*popup.txt* For Vim version 8.2. Last change: 2022 Jan 08
|
||||
*popup.txt* For Vim version 8.2. Last change: 2022 Apr 04
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -271,6 +271,11 @@ popup_create({what}, {options}) *popup_create()*
|
||||
'buftype' set to "popup". That buffer will be wiped out once
|
||||
the popup closes.
|
||||
|
||||
if {what} is a buffer number and loading the buffer runs into
|
||||
an existing swap file, it is silently opened read-only, as if
|
||||
a |SwapExists| autocommand had set |v:swapchoice| to 'o'.
|
||||
This is because we assume the buffer is only used for viewing.
|
||||
|
||||
{options} is a dictionary with many possible entries.
|
||||
See |popup_create-arguments| for details.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*quickref.txt* For Vim version 8.2. Last change: 2021 Dec 21
|
||||
*quickref.txt* For Vim version 8.2. Last change: 2022 Apr 06
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -643,6 +643,7 @@ Short explanation of each option: *option-list*
|
||||
'cinkeys' 'cink' keys that trigger indent when 'cindent' is set
|
||||
'cinoptions' 'cino' how to do indenting when 'cindent' is set
|
||||
'cinwords' 'cinw' words where 'si' and 'cin' add an indent
|
||||
'cinscopedecls' 'cinsd' words that are recognized by 'cino-g'
|
||||
'clipboard' 'cb' use the clipboard as the unnamed register
|
||||
'cmdheight' 'ch' number of lines to use for the command-line
|
||||
'cmdwinheight' 'cwh' height of the command-line window
|
||||
@@ -814,6 +815,7 @@ Short explanation of each option: *option-list*
|
||||
'mousefocus' 'mousef' keyboard focus follows the mouse
|
||||
'mousehide' 'mh' hide mouse pointer while typing
|
||||
'mousemodel' 'mousem' changes meaning of mouse buttons
|
||||
'mousemoveevent' 'mousemev' report mouse moves with <MouseMove>
|
||||
'mouseshape' 'mouses' shape of the mouse pointer in different modes
|
||||
'mousetime' 'mouset' max time between mouse double-click
|
||||
'mzquantum' 'mzq' the interval between polls for MzScheme threads
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*repeat.txt* For Vim version 8.2. Last change: 2022 Mar 30
|
||||
*repeat.txt* For Vim version 8.2. Last change: 2022 Apr 08
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1043,18 +1043,24 @@ For example, to profile the one_script.vim script file: >
|
||||
|
||||
|
||||
:prof[ile] start {fname} *:prof* *:profile* *E750*
|
||||
Start profiling, write the output in {fname} upon exit.
|
||||
Start profiling, write the output in {fname} upon exit or when
|
||||
a `:profile stop` or `:profile dump` command is invoked.
|
||||
"~/" and environment variables in {fname} will be expanded.
|
||||
If {fname} already exists it will be silently overwritten.
|
||||
The variable |v:profiling| is set to one.
|
||||
|
||||
:prof[ile] stop
|
||||
Write the collected profiling information to the logfile and
|
||||
stop profiling. You can use the `:profile start` command to
|
||||
clear the profiling statistics and start profiling again.
|
||||
|
||||
:prof[ile] pause
|
||||
Don't profile until the following ":profile continue". Can be
|
||||
Don't profile until the following `:profile continue`. Can be
|
||||
used when doing something that should not be counted (e.g., an
|
||||
external command). Does not nest.
|
||||
|
||||
:prof[ile] continue
|
||||
Continue profiling after ":profile pause".
|
||||
Continue profiling after `:profile pause`.
|
||||
|
||||
:prof[ile] func {pattern}
|
||||
Profile function that matches the pattern {pattern}.
|
||||
@@ -1071,11 +1077,17 @@ For example, to profile the one_script.vim script file: >
|
||||
after this command. A :profile command in the script itself
|
||||
won't work.
|
||||
|
||||
:prof[ile] dump
|
||||
Write the current state of profiling to the logfile
|
||||
immediately. After running this command, Vim continues to
|
||||
collect the profiling statistics.
|
||||
|
||||
:profd[el] ... *:profd* *:profdel*
|
||||
Stop profiling for the arguments specified. See |:breakdel|
|
||||
for the arguments.
|
||||
|
||||
for the arguments. Examples: >
|
||||
profdel func MyFunc
|
||||
profdel file MyScript.vim
|
||||
profdel here
|
||||
|
||||
You must always start with a ":profile start fname" command. The resulting
|
||||
file is written when Vim exits. For example, to profile one specific
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*rileft.txt* For Vim version 8.2. Last change: 2021 Jun 13
|
||||
*rileft.txt* For Vim version 8.2. Last change: 2022 Apr 03
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Avner Lottem
|
||||
@@ -110,9 +110,6 @@ o Does not support reverse insert and rightleft modes on the command-line.
|
||||
o Somewhat slower in right-to-left mode, because right-to-left motion is
|
||||
emulated inside Vim, not by the controlling terminal.
|
||||
|
||||
o When the Athena GUI is used, the bottom scrollbar works in the wrong
|
||||
direction. This is difficult to fix.
|
||||
|
||||
o When both 'rightleft' and 'revins' are on: 'textwidth' does not work.
|
||||
Lines do not wrap at all; you just get a single, long line.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*scroll.txt* For Vim version 8.2. Last change: 2019 May 13
|
||||
*scroll.txt* For Vim version 8.2. Last change: 2022 Apr 03
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -242,7 +242,7 @@ dragging the scrollbar of the current window. How many lines are scrolled
|
||||
depends on your mouse driver. If the scroll action causes input focus
|
||||
problems, see |intellimouse-wheel-problems|.
|
||||
|
||||
For the X11 GUIs (Motif, Athena and GTK) scrolling the wheel generates key
|
||||
For the X11 GUIs (Motif and GTK) scrolling the wheel generates key
|
||||
presses <ScrollWheelUp>, <ScrollWheelDown>, <ScrollWheelLeft> and
|
||||
<ScrollWheelRight>. For example, if you push the scroll wheel upwards a
|
||||
<ScrollWheelUp> key press is generated causing the window to scroll upwards
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*starting.txt* For Vim version 8.2. Last change: 2022 Feb 01
|
||||
*starting.txt* For Vim version 8.2. Last change: 2022 Apr 12
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -344,6 +344,12 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
|
||||
Example: >
|
||||
vim -V20vimlog foobar
|
||||
<
|
||||
--log {filename} *--log*
|
||||
Start logging and write entries to {filename}.
|
||||
This works like calling `ch_logfile({filename}, 'a')` very
|
||||
early during startup.
|
||||
{only available with the +channel feature}
|
||||
|
||||
*-D*
|
||||
-D Debugging. Go to debugging mode when executing the first
|
||||
command from a script. |debug-mode|
|
||||
@@ -564,6 +570,7 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
|
||||
{scriptout} cannot start with a digit.
|
||||
If you want to record what is typed in a human readable for
|
||||
you can use |ch_logfile()|, It adds "raw key input" lines.
|
||||
Also see |--log|.
|
||||
|
||||
*-W*
|
||||
-W {scriptout} Like -w, but do not append, overwrite an existing file.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*syntax.txt* For Vim version 8.2. Last change: 2022 Mar 02
|
||||
*syntax.txt* For Vim version 8.2. Last change: 2022 Apr 06
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -215,7 +215,7 @@ A syntax group name doesn't specify any color or attributes itself.
|
||||
|
||||
The name for a highlight or syntax group must consist of ASCII letters, digits
|
||||
and the underscore. As a regexp: "[a-zA-Z0-9_]*". However, Vim does not give
|
||||
an error when using other characters. The maxium length of a group name is
|
||||
an error when using other characters. The maximum length of a group name is
|
||||
about 200 bytes. *E1249*
|
||||
|
||||
To be able to allow each user to pick their favorite set of colors, there must
|
||||
@@ -4898,7 +4898,7 @@ in their own color.
|
||||
:hi[ghlight] {group-name}
|
||||
List one highlight group.
|
||||
|
||||
*highlight-clear*
|
||||
*highlight-clear* *:hi-clear*
|
||||
:hi[ghlight] clear Reset all highlighting to the defaults. Removes all
|
||||
highlighting for groups added by the user!
|
||||
Uses the current value of 'background' to decide which
|
||||
@@ -4961,7 +4961,7 @@ the same syntax file on all terminals, and use the optimal highlighting.
|
||||
*inverse* *italic* *standout*
|
||||
*nocombine* *strikethrough*
|
||||
term={attr-list} *attr-list* *highlight-term* *E418*
|
||||
attr-list is a comma separated list (without spaces) of the
|
||||
attr-list is a comma-separated list (without spaces) of the
|
||||
following items (in any order):
|
||||
bold
|
||||
underline
|
||||
@@ -5145,7 +5145,7 @@ font={font-name} *highlight-font*
|
||||
When setting the font for the "Normal" group, this becomes the default
|
||||
font (until the 'guifont' option is changed; the last one set is
|
||||
used).
|
||||
The following only works with Motif and Athena, not with other GUIs:
|
||||
The following only works with Motif, not with other GUIs:
|
||||
When setting the font for the "Menu" group, the menus will be changed.
|
||||
When setting the font for the "Tooltip" group, the tooltips will be
|
||||
changed.
|
||||
@@ -5318,6 +5318,8 @@ QuickFixLine Current |quickfix| item in the quickfix window.
|
||||
*hl-Search*
|
||||
Search Last search pattern highlighting (see 'hlsearch').
|
||||
Also used for similar items that need to stand out.
|
||||
*hl-CurSearch*
|
||||
CurSearch Current match for the last search pattern (see 'hlsearch').
|
||||
*hl-SpecialKey*
|
||||
SpecialKey Meta and special keys listed with ":map", also for text used
|
||||
to show unprintable characters in the text, 'listchars'.
|
||||
@@ -5382,7 +5384,7 @@ Menu Current font, background and foreground colors of the menus.
|
||||
Also used for the toolbar.
|
||||
Applicable highlight arguments: font, guibg, guifg.
|
||||
|
||||
NOTE: For Motif and Athena the font argument actually
|
||||
NOTE: For Motif the font argument actually
|
||||
specifies a fontset at all times, no matter if 'guifontset' is
|
||||
empty, and as such it is tied to the current |:language| when
|
||||
set.
|
||||
@@ -5396,7 +5398,7 @@ Scrollbar Current background and foreground of the main window's
|
||||
Tooltip Current font, background and foreground of the tooltips.
|
||||
Applicable highlight arguments: font, guibg, guifg.
|
||||
|
||||
NOTE: For Motif and Athena the font argument actually
|
||||
NOTE: For Motif the font argument actually
|
||||
specifies a fontset at all times, no matter if 'guifontset' is
|
||||
empty, and as such it is tied to the current |:language| when
|
||||
set.
|
||||
|
||||
@@ -134,6 +134,8 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
'cinkeys' options.txt /*'cinkeys'*
|
||||
'cino' options.txt /*'cino'*
|
||||
'cinoptions' options.txt /*'cinoptions'*
|
||||
'cinscopedecls' options.txt /*'cinscopedecls'*
|
||||
'cinsd' options.txt /*'cinsd'*
|
||||
'cinw' options.txt /*'cinw'*
|
||||
'cinwords' options.txt /*'cinwords'*
|
||||
'clipboard' options.txt /*'clipboard'*
|
||||
@@ -487,7 +489,9 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
'mousefocus' options.txt /*'mousefocus'*
|
||||
'mousehide' options.txt /*'mousehide'*
|
||||
'mousem' options.txt /*'mousem'*
|
||||
'mousemev' options.txt /*'mousemev'*
|
||||
'mousemodel' options.txt /*'mousemodel'*
|
||||
'mousemoveevent' options.txt /*'mousemoveevent'*
|
||||
'mouses' options.txt /*'mouses'*
|
||||
'mouseshape' options.txt /*'mouseshape'*
|
||||
'mouset' options.txt /*'mouset'*
|
||||
@@ -1453,6 +1457,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
--echo-wid starting.txt /*--echo-wid*
|
||||
--help starting.txt /*--help*
|
||||
--literal starting.txt /*--literal*
|
||||
--log starting.txt /*--log*
|
||||
--nofork starting.txt /*--nofork*
|
||||
--noplugin starting.txt /*--noplugin*
|
||||
--not-a-term starting.txt /*--not-a-term*
|
||||
@@ -1999,6 +2004,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
:<cfile> cmdline.txt /*:<cfile>*
|
||||
:<client> cmdline.txt /*:<client>*
|
||||
:<cword> cmdline.txt /*:<cword>*
|
||||
:<script> cmdline.txt /*:<script>*
|
||||
:<sfile> cmdline.txt /*:<sfile>*
|
||||
:<sflnum> cmdline.txt /*:<sflnum>*
|
||||
:<slnum> cmdline.txt /*:<slnum>*
|
||||
@@ -2078,6 +2084,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
:Termdebug terminal.txt /*:Termdebug*
|
||||
:TermdebugCommand terminal.txt /*:TermdebugCommand*
|
||||
:Texplore pi_netrw.txt /*:Texplore*
|
||||
:Until terminal.txt /*:Until*
|
||||
:UseVimball pi_vimball.txt /*:UseVimball*
|
||||
:Vexplore pi_netrw.txt /*:Vexplore*
|
||||
:VimballList pi_vimball.txt /*:VimballList*
|
||||
@@ -2546,6 +2553,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
:helpt helphelp.txt /*:helpt*
|
||||
:helptags helphelp.txt /*:helptags*
|
||||
:hi syntax.txt /*:hi*
|
||||
:hi-clear syntax.txt /*:hi-clear*
|
||||
:hi-default syntax.txt /*:hi-default*
|
||||
:hi-link syntax.txt /*:hi-link*
|
||||
:hi-normal syntax.txt /*:hi-normal*
|
||||
@@ -3616,6 +3624,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
<MiddleRelease> term.txt /*<MiddleRelease>*
|
||||
<Mouse> term.txt /*<Mouse>*
|
||||
<MouseDown> scroll.txt /*<MouseDown>*
|
||||
<MouseMove> map.txt /*<MouseMove>*
|
||||
<MouseUp> scroll.txt /*<MouseUp>*
|
||||
<NL> motion.txt /*<NL>*
|
||||
<Nop> map.txt /*<Nop>*
|
||||
@@ -3716,6 +3725,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
<range> map.txt /*<range>*
|
||||
<reg> map.txt /*<reg>*
|
||||
<register> map.txt /*<register>*
|
||||
<script> cmdline.txt /*<script>*
|
||||
<sfile> cmdline.txt /*<sfile>*
|
||||
<sflnum> cmdline.txt /*<sflnum>*
|
||||
<slnum> cmdline.txt /*<slnum>*
|
||||
@@ -3771,7 +3781,6 @@ Aleph options.txt /*Aleph*
|
||||
Amiga os_amiga.txt /*Amiga*
|
||||
Arabic arabic.txt /*Arabic*
|
||||
Atari os_mint.txt /*Atari*
|
||||
Athena gui_x11.txt /*Athena*
|
||||
B motion.txt /*B*
|
||||
BeBox os_beos.txt /*BeBox*
|
||||
BeOS os_beos.txt /*BeOS*
|
||||
@@ -4052,7 +4061,6 @@ E1081 eval.txt /*E1081*
|
||||
E1083 editing.txt /*E1083*
|
||||
E1084 eval.txt /*E1084*
|
||||
E1085 eval.txt /*E1085*
|
||||
E1086 eval.txt /*E1086*
|
||||
E1087 vim9.txt /*E1087*
|
||||
E1089 eval.txt /*E1089*
|
||||
E109 eval.txt /*E109*
|
||||
@@ -4217,7 +4225,6 @@ E1231 map.txt /*E1231*
|
||||
E1232 builtin.txt /*E1232*
|
||||
E1233 builtin.txt /*E1233*
|
||||
E1234 vim9.txt /*E1234*
|
||||
E1235 vim9.txt /*E1235*
|
||||
E1236 vim9.txt /*E1236*
|
||||
E1237 map.txt /*E1237*
|
||||
E1238 vim9.txt /*E1238*
|
||||
@@ -4255,6 +4262,7 @@ E1266 if_pyth.txt /*E1266*
|
||||
E127 eval.txt /*E127*
|
||||
E1270 change.txt /*E1270*
|
||||
E1271 vim9.txt /*E1271*
|
||||
E1274 cmdline.txt /*E1274*
|
||||
E128 eval.txt /*E128*
|
||||
E129 eval.txt /*E129*
|
||||
E13 message.txt /*E13*
|
||||
@@ -4775,9 +4783,6 @@ E610 editing.txt /*E610*
|
||||
E611 eval.txt /*E611*
|
||||
E612 sign.txt /*E612*
|
||||
E613 print.txt /*E613*
|
||||
E614 editing.txt /*E614*
|
||||
E615 editing.txt /*E615*
|
||||
E616 editing.txt /*E616*
|
||||
E617 options.txt /*E617*
|
||||
E618 print.txt /*E618*
|
||||
E619 print.txt /*E619*
|
||||
@@ -5513,6 +5518,7 @@ WinClosed autocmd.txt /*WinClosed*
|
||||
WinEnter autocmd.txt /*WinEnter*
|
||||
WinLeave autocmd.txt /*WinLeave*
|
||||
WinNew autocmd.txt /*WinNew*
|
||||
WinScrolled autocmd.txt /*WinScrolled*
|
||||
X change.txt /*X*
|
||||
X11 options.txt /*X11*
|
||||
X11-icon gui_x11.txt /*X11-icon*
|
||||
@@ -5752,7 +5758,6 @@ assert_true() testing.txt /*assert_true()*
|
||||
at motion.txt /*at*
|
||||
atan() builtin.txt /*atan()*
|
||||
atan2() builtin.txt /*atan2()*
|
||||
athena-intellimouse gui.txt /*athena-intellimouse*
|
||||
attr-list syntax.txt /*attr-list*
|
||||
author intro.txt /*author*
|
||||
auto-format change.txt /*auto-format*
|
||||
@@ -5767,6 +5772,7 @@ autocmd-disable autocmd.txt /*autocmd-disable*
|
||||
autocmd-events autocmd.txt /*autocmd-events*
|
||||
autocmd-events-abc autocmd.txt /*autocmd-events-abc*
|
||||
autocmd-execute autocmd.txt /*autocmd-execute*
|
||||
autocmd-expand autocmd.txt /*autocmd-expand*
|
||||
autocmd-groups autocmd.txt /*autocmd-groups*
|
||||
autocmd-intro autocmd.txt /*autocmd-intro*
|
||||
autocmd-list autocmd.txt /*autocmd-list*
|
||||
@@ -6065,6 +6071,7 @@ changenr() builtin.txt /*changenr()*
|
||||
changetick eval.txt /*changetick*
|
||||
changing change.txt /*changing*
|
||||
channel channel.txt /*channel*
|
||||
channel-address channel.txt /*channel-address*
|
||||
channel-callback channel.txt /*channel-callback*
|
||||
channel-close channel.txt /*channel-close*
|
||||
channel-close-in channel.txt /*channel-close-in*
|
||||
@@ -6076,6 +6083,7 @@ channel-functions-details channel.txt /*channel-functions-details*
|
||||
channel-mode channel.txt /*channel-mode*
|
||||
channel-more channel.txt /*channel-more*
|
||||
channel-noblock channel.txt /*channel-noblock*
|
||||
channel-onetime-callback channel.txt /*channel-onetime-callback*
|
||||
channel-open channel.txt /*channel-open*
|
||||
channel-open-options channel.txt /*channel-open-options*
|
||||
channel-raw channel.txt /*channel-raw*
|
||||
@@ -7601,6 +7609,7 @@ hitest.vim syntax.txt /*hitest.vim*
|
||||
hjkl usr_02.txt /*hjkl*
|
||||
hl-ColorColumn syntax.txt /*hl-ColorColumn*
|
||||
hl-Conceal syntax.txt /*hl-Conceal*
|
||||
hl-CurSearch syntax.txt /*hl-CurSearch*
|
||||
hl-Cursor syntax.txt /*hl-Cursor*
|
||||
hl-CursorColumn syntax.txt /*hl-CursorColumn*
|
||||
hl-CursorIM syntax.txt /*hl-CursorIM*
|
||||
@@ -8257,6 +8266,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*
|
||||
motif-intellimouse gui.txt /*motif-intellimouse*
|
||||
motion-count-multiplied motion.txt /*motion-count-multiplied*
|
||||
motion.txt motion.txt /*motion.txt*
|
||||
mouse-mode-table term.txt /*mouse-mode-table*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*term.txt* For Vim version 8.2. Last change: 2022 Mar 04
|
||||
*term.txt* For Vim version 8.2. Last change: 2022 Apr 03
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -833,7 +833,7 @@ select and copy the text to the system, then press Esc.
|
||||
Another way is to temporarily use ":sh" to run a shell, copy the text, then
|
||||
exit the shell. 'mouse' can remain set to "a" then.
|
||||
*xterm-clipboard*
|
||||
In the Athena and Motif GUI versions, when running in a terminal and there is
|
||||
In the Motif GUI version, when running in a terminal and there is
|
||||
access to the X-server (DISPLAY is set), the copy and paste will behave like
|
||||
in the GUI. If not, the middle mouse button will insert the unnamed register.
|
||||
In that case, here is how you copy and paste a piece of text:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*terminal.txt* For Vim version 8.2. Last change: 2022 Jan 21
|
||||
*terminal.txt* For Vim version 8.2. Last change: 2022 Apr 06
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -674,7 +674,7 @@ term_getsize({buf}) *term_getsize()*
|
||||
|
||||
term_getstatus({buf}) *term_getstatus()*
|
||||
Get the status of terminal {buf}. This returns a String with
|
||||
a comma separated list of these items:
|
||||
a comma-separated list of these items:
|
||||
running job is running
|
||||
finished job has finished
|
||||
normal in Terminal-Normal mode
|
||||
@@ -1285,6 +1285,8 @@ Put focus on the gdb window to type commands there. Some common ones are:
|
||||
- next execute the current line and stop at the next line
|
||||
- step execute the current line and stop at the next statement,
|
||||
entering functions
|
||||
- until execute until past the current cursor line or past a specified
|
||||
position or the current stack frame returns
|
||||
- finish execute until leaving the current function
|
||||
- where show the stack
|
||||
- frame N go to the Nth stack frame
|
||||
@@ -1303,6 +1305,7 @@ gdb:
|
||||
|
||||
*:Step* execute the gdb "step" command
|
||||
*:Over* execute the gdb "next" command (`:Next` is a Vim command)
|
||||
*:Until* execute the gdb "until" command
|
||||
*:Finish* execute the gdb "finish" command
|
||||
*:Continue* execute the gdb "continue" command
|
||||
*:Stop* interrupt the program
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*testing.txt* For Vim version 8.2. Last change: 2022 Feb 10
|
||||
*testing.txt* For Vim version 8.2. Last change: 2022 Apr 03
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -174,22 +174,6 @@ test_gui_event({event}, {args})
|
||||
dragging: 1 to drag the scrollbar and 0 to click in the
|
||||
scrollbar.
|
||||
|
||||
"scrollbar":
|
||||
Set or drag the left, right or horizontal scrollbar. Only
|
||||
works when the scrollbar actually exists. The supported
|
||||
items in {args} are:
|
||||
which: scrollbar. The supported values are:
|
||||
left Left scrollbar of the current window
|
||||
right Right scrollbar of the current window
|
||||
hor Horizontal scrollbar
|
||||
value: amount to scroll. For the vertical scrollbars
|
||||
the value can be 1 to the line-count of the
|
||||
buffer. For the horizontal scrollbar the
|
||||
value can be between 1 and the maximum line
|
||||
length, assuming 'wrap' is not set.
|
||||
dragging: 1 to drag the scrollbar and 0 to click in the
|
||||
scrollbar.
|
||||
|
||||
"tabline":
|
||||
Inject a mouse click event on the tabline to select a
|
||||
tabpage. The supported items in {args} are:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 8.2. Last change: 2022 Mar 30
|
||||
*todo.txt* For Vim version 8.2. Last change: 2022 Apr 18
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -38,15 +38,12 @@ browser use: https://github.com/vim/vim/issues/1234
|
||||
*known-bugs*
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
Allow for: "import autoload '../lib/script.vim'"
|
||||
avoids going through 'runtimepath' and avoids name collisions.
|
||||
|
||||
Really drop the Athena and NeXtaw GUI? Decide end of March.
|
||||
Use "`=expr`" in heredoc also in :def function. #10216 Yegappan will do it.
|
||||
|
||||
Once Vim9 is stable:
|
||||
- Use Vim9 for more runtime files.
|
||||
- Check code coverage, add more tests if needed.
|
||||
vim9execute.c line 1900
|
||||
vim9execute.c line 3500
|
||||
vim9expr.c
|
||||
vim9instr.c
|
||||
vim9script.c
|
||||
@@ -55,6 +52,7 @@ Once Vim9 is stable:
|
||||
|
||||
Further Vim9 improvements, possibly after launch:
|
||||
- Check performance with callgrind and kcachegrind.
|
||||
getline()/substitute()/setline() in #5632
|
||||
- Better implementation for partial and tests for that.
|
||||
- when using "const" mark the variable type as const with TTFLAG_CONST, so
|
||||
that an error is given at compile time when trying to change it. E.g. for a
|
||||
@@ -155,7 +153,6 @@ Terminal debugger:
|
||||
- Add option to not open the program window. It's not used when attaching to
|
||||
an already running program. (M. Kelly)
|
||||
- When only gdb window exists, on "quit" edit another buffer.
|
||||
- Use a sign group
|
||||
- Termdebug does not work when Vim was built with mzscheme: gdb hangs just
|
||||
after "run". Everything else works, including communication channel. Not
|
||||
initializing mzscheme avoid the problem, thus it's not some #ifdef.
|
||||
@@ -200,12 +197,17 @@ Terminal emulator window:
|
||||
- When the job only outputs lines, we could handle resizing the terminal
|
||||
better: store lines separated by line breaks, instead of screen lines,
|
||||
then when the window is resized redraw those lines.
|
||||
- Redrawing is slow with Athena and Motif. (Ramel Eshed)
|
||||
- Redrawing is slow with Motif. (Ramel Eshed)
|
||||
- For the GUI fill termios with default values, perhaps like pangoterm:
|
||||
http://bazaar.launchpad.net/~leonerd/pangoterm/trunk/view/head:/main.c#L134
|
||||
- When 'encoding' is not utf-8, or the job is using another encoding, setup
|
||||
conversions.
|
||||
|
||||
CurSearch highlight is wrong when searching for a space, matches all spaces
|
||||
instead of only the current one.
|
||||
|
||||
Can deref_func_name() and deref_function_name() be merged?
|
||||
|
||||
When using 'cryptmethod' xchaha20 the undo file is not encrypted.
|
||||
Need to handle extra bytes.
|
||||
|
||||
@@ -227,10 +229,10 @@ Fails in line 64 of Ch_communicate, no exception is thrown.
|
||||
Patch for Template string: #4634
|
||||
Have another look at the implementation.
|
||||
|
||||
Add expanding <script> which works like <sfile> everywhere. #9189
|
||||
|
||||
Rename getdigraphlist -> digraph_getlist() etc.
|
||||
|
||||
Can "CSI nr X" be used instead of outputting spaces? Is it faster? #8002
|
||||
|
||||
Valgrind reports memory leaks in test_options.
|
||||
Valgrind reports overlapping memcpy in
|
||||
test_conceal.3
|
||||
@@ -257,6 +259,14 @@ Idea: when typing ":e /some/dir/" and "dir" does not exist, highlight in red.
|
||||
initialization to figure out the default value from 'shell'. Add a test for
|
||||
this.
|
||||
|
||||
With concealed text mouse click doesn't put the cursor in the right position.
|
||||
(Herb Sitz) Fix by Christian Brabandt, 2011 Jun 16. Doesn't work properly,
|
||||
need to make the change in where RET_WIN_BUF_CHARTABSIZE() is called.
|
||||
IDEA: when drawing the text, store the text byte index in ScreenLinesIdx[].
|
||||
When converting screen column to text position use this.
|
||||
Store the line number and byte index for the start of the line, when
|
||||
converting the screen line to text position use this, add the byte offset.
|
||||
|
||||
MS-Windows: did path modifier :p:8 stop working? #8600
|
||||
|
||||
Add support for "underdouble", "underdot" and "underdash". #9553
|
||||
@@ -309,8 +319,7 @@ 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?
|
||||
globpath() does not use 'wildignorecase' at all? (related to #8350)
|
||||
|
||||
Add 'termguiattr' option, use "gui=" attributes in the terminal? Would work
|
||||
with 'termguicolors'. #1740
|
||||
@@ -1923,10 +1932,6 @@ On MS-Windows a temp dir with a & init causes system() to fail. (Ben Fritz,
|
||||
Patch 7.3.116 was the wrong solution.
|
||||
Christian Brabandt has another incomplete patch. (2011 Jul 13)
|
||||
|
||||
With concealed text mouse click doesn't put the cursor in the right position.
|
||||
(Herb Sitz) Fix by Christian Brabandt, 2011 Jun 16. Doesn't work properly,
|
||||
need to make the change in where RET_WIN_BUF_CHARTABSIZE() is called.
|
||||
|
||||
Syntax region with 'concealends' and a 'cchar' value, 'conceallevel' set to 2,
|
||||
only one of the two ends gets the cchar displayed. (Brett Stahlman, 2010 Aug
|
||||
21, Ben Fritz, 2010 Sep 14)
|
||||
@@ -2393,11 +2398,6 @@ probably causes this.
|
||||
'scrollbind' is not respected when deleting lines or undo. (Milan Vancura,
|
||||
2009 Jan 16)
|
||||
|
||||
Document that default font in Athena can be set with resources:
|
||||
XtDefaultFont: "9x15"
|
||||
XtDefaultFontSet: "9x15"
|
||||
(Richard Sherman, 2009 Apr 12)
|
||||
|
||||
Having "Syntax" in 'eventignore' for :bufdo may cause problems, e.g. for
|
||||
":bufdo e" when buffers are open in windows. ex_listdo(eap) could set the
|
||||
option only for when jumping to another buffer, not when the command argument
|
||||
@@ -3239,7 +3239,7 @@ Win32 GUI known bugs:
|
||||
the font name).
|
||||
|
||||
|
||||
Athena and Motif:
|
||||
Motif:
|
||||
6 New Motif toolbar button from Marcin Dalecki:
|
||||
- When the mouse pointer is over an Agide button the red becomes black.
|
||||
Something with the way colors are specified in the .xpm file.
|
||||
@@ -3251,7 +3251,7 @@ Athena and Motif:
|
||||
wrong.
|
||||
9 XIM is disabled by default for SGI/IRIX. Fix XIM so that 'imdisable' can
|
||||
be off by default.
|
||||
9 XIM doesn't work properly for Athena/Motif. (Yasuhiro Matsumoto) For now,
|
||||
9 XIM doesn't work properly for Motif. (Yasuhiro Matsumoto) For now,
|
||||
keep XIM active at all times when the input method has the preediting
|
||||
flag.
|
||||
8 X11: A menu that contains an umlaut is truncated at that character.
|
||||
@@ -3269,27 +3269,6 @@ Athena and Motif:
|
||||
current locale. Workaround: set 'langmenu'.
|
||||
|
||||
|
||||
Athena GUI:
|
||||
9 The first event for any button in the menu or toolbar appears to get lost.
|
||||
The second click on a menu does work.
|
||||
9 When dragging the scrollbar thumb very fast, focus is only obtained in
|
||||
the scrollbar itself. And the thumb is no longer updated when moving
|
||||
through files.
|
||||
7 The file selector is not resizable. With a big font it is difficult to
|
||||
read long file names. (Schroeder)
|
||||
4 Re-write the widget attachments and code so that we will not have to go
|
||||
through and calculate the absolute position of every widget every time the
|
||||
window is refreshed/changes size. This will help the "flashing-widgets"
|
||||
problem during a refresh.
|
||||
5 When starting gvim with all the default colors and then typing
|
||||
":hi Menu guibg=cyan", the menus change color but the background of the
|
||||
pullright pixmap doesn't change colors.
|
||||
If you type ":hi Menu guibg=cyan font=anyfont", then the pixmap changes
|
||||
colors as it should.
|
||||
Allocating a new pixmap and setting the resource doesn't change the
|
||||
pullright pixmap's colors. Why? Possible Athena bug?
|
||||
|
||||
|
||||
Motif GUI:
|
||||
- gui_mch_browsedir() is missing, browsedir() doesn't work nicely.
|
||||
7 Use XmStringCreateLocalized() instead of XmStringCreateSimple()?
|
||||
@@ -3768,7 +3747,7 @@ Problems that will (probably) not be solved:
|
||||
|
||||
Most interesting new features to be added when all bugs have been fixed:
|
||||
- Using ":exe edit fname" has escaping problems. Use ":edit ++(fname)".
|
||||
Thus use "++=" to give arguments as expressions, comma separated as if
|
||||
Thus use "++=" to give arguments as expressions, comma-separated as if
|
||||
calling a function.
|
||||
With options: ":edit ++(['!', '++enc=abc'], ['+/pat'], fname)".
|
||||
Alternative: Make a function for Ex commands: cmd_edit().
|
||||
@@ -5659,7 +5638,7 @@ Options:
|
||||
7 ":with option=value | command": temporarily set an option value and
|
||||
restore it after the command has executed.
|
||||
8 Make "old" number options that really give a number of effects into string
|
||||
options that are a comma separated list. The old number values should
|
||||
options that are a comma-separated list. The old number values should
|
||||
also be supported.
|
||||
8 Add commands to save and restore an option, which also preserves the flag
|
||||
that marks if the option was set. Useful to keep the effect of setting
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*various.txt* For Vim version 8.2. Last change: 2022 Mar 04
|
||||
*various.txt* For Vim version 8.2. Last change: 2022 Apr 03
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -381,7 +381,7 @@ N *+folding* |folding|
|
||||
*+fork* Unix only: |fork| shell commands
|
||||
*+float* Floating point support
|
||||
N *+gettext* message translations |multi-lang|
|
||||
*+GUI_Athena* Unix only: Athena |GUI|
|
||||
- *+GUI_Athena* Unix only: Athena |GUI|
|
||||
*+GUI_neXtaw* Unix only: neXtaw |GUI|
|
||||
*+GUI_GTK* Unix only: GTK+ |GUI|
|
||||
*+GUI_Motif* Unix only: Motif |GUI|
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*version5.txt* For Vim version 8.2. Last change: 2021 Apr 05
|
||||
*version5.txt* For Vim version 8.2. Last change: 2022 Apr 06
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -2494,7 +2494,7 @@ regexp character classes (for fast syntax highlight matching):
|
||||
|
||||
":set" now accepts "+=", |^=" and "-=": add or remove parts of a string
|
||||
option, add or subtract a number from a number option. A comma is
|
||||
automagically inserted or deleted for options that are a comma separated list.
|
||||
automagically inserted or deleted for options that are a comma-separated list.
|
||||
|
||||
Filetype feature, for autocommands. Uses a file type instead of a pattern to
|
||||
match a file. Currently only used for RISC OS. (Leonard)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*version6.txt* For Vim version 8.2. Last change: 2021 Apr 05
|
||||
*version6.txt* For Vim version 8.2. Last change: 2022 Apr 06
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -12447,7 +12447,7 @@ Solution: Make sure ".out" files are deleted when they get in the way. Add
|
||||
Files: src/Make_bc5.mak, src/testdir/Make_dos.mak
|
||||
|
||||
Patch 6.2.381
|
||||
Problem: Setting 'fileencoding' to a comma separated list (confusing it
|
||||
Problem: Setting 'fileencoding' to a comma-separated list (confusing it
|
||||
with 'fileencodings') does not result in an error message.
|
||||
Setting 'fileencoding' in an empty file marks it as modified.
|
||||
There is no "+" in the title after setting 'fileencoding'.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*vi_diff.txt* For Vim version 8.2. Last change: 2021 Jan 21
|
||||
*vi_diff.txt* For Vim version 8.2. Last change: 2022 Apr 03
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -160,8 +160,8 @@ Graphical User Interface (GUI). |gui|
|
||||
Included support for GUI: menu's, mouse, scrollbars, etc. You can
|
||||
define your own menus. Better support for CTRL/SHIFT/ALT keys in
|
||||
combination with special keys and mouse. Supported for various
|
||||
platforms, such as X11 (with Motif and Athena interfaces), GTK, Win32
|
||||
(Windows XP and later), Amiga and Macintosh.
|
||||
platforms, such as X11 with Motif, GTK, Win32 (Windows XP and later),
|
||||
Amiga and Macintosh.
|
||||
|
||||
Multiple windows and buffers. |windows.txt|
|
||||
Vim can split the screen into several windows, each editing a
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*vim9.txt* For Vim version 8.2. Last change: 2022 Mar 28
|
||||
*vim9.txt* For Vim version 8.2. Last change: 2022 Apr 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -185,7 +185,7 @@ For now you will need to pass the dictionary explicitly: >
|
||||
echo d[arg]
|
||||
enddef
|
||||
var ad = {item: 'value', func: DictFunc}
|
||||
ad.func(d, 'item')
|
||||
ad.func(ad, 'item')
|
||||
|
||||
You can call a legacy dict function though: >
|
||||
func Legacy() dict
|
||||
@@ -378,7 +378,7 @@ And with autocommands: >
|
||||
Although using a :def function probably works better.
|
||||
|
||||
*E1022* *E1103* *E1130* *E1131* *E1133*
|
||||
*E1134* *E1235*
|
||||
*E1134*
|
||||
Declaring a variable with a type but without an initializer will initialize to
|
||||
false (for bool), empty (for string, list, dict, etc.) or zero (for number,
|
||||
any, etc.). This matters especially when using the "any" type, the value will
|
||||
@@ -1720,7 +1720,15 @@ line, there can be no line break: >
|
||||
name # Error!
|
||||
echo that
|
||||
.name # Error!
|
||||
< *:import-cycle*
|
||||
|
||||
To refer to a function in an imported script in a mapping, |<SID>| can be
|
||||
used: >
|
||||
noremap <silent> ,a :call <SID>name.Function()<CR>
|
||||
|
||||
When the mapping is defined "<SID>name." will be replaced with <SNR> and the
|
||||
script ID of the imported script.
|
||||
|
||||
*:import-cycle*
|
||||
The `import` commands are executed when encountered. If script A imports
|
||||
script B, and B (directly or indirectly) imports A, this will be skipped over.
|
||||
At this point items in A after "import B" will not have been processed and
|
||||
@@ -1745,7 +1753,8 @@ actually needed. Using the autoload mechanism is recommended:
|
||||
The "autoload" argument to `:import` means that the script is not loaded
|
||||
until one of the items is actually used. The script will be found under
|
||||
the "autoload" directory in 'runtimepath' instead of the "import"
|
||||
directory.
|
||||
directory. Alternatively a relative or absolute name can be used, see
|
||||
below.
|
||||
|
||||
2. In the autoload script put the bulk of the code. >
|
||||
vim9script
|
||||
@@ -1765,6 +1774,14 @@ actually needed. Using the autoload mechanism is recommended:
|
||||
You can split up the functionality and import other scripts from the
|
||||
autoload script as you like. This way you can share code between plugins.
|
||||
|
||||
Searching for the autoload script in all entries in 'runtimepath' can be a bit
|
||||
slow. If the plugin knows where the script is located, quite often a relative
|
||||
path can be used. This avoids the search and should be quite a bit faster.
|
||||
Another advantage is that the script name does not need to be unique. An
|
||||
absolute path is also possible. Examples: >
|
||||
import autoload '../lib/implement.vim'
|
||||
import autoload MyScriptsDir .. '/lib/implement.vim'
|
||||
|
||||
For defining a mapping that uses the imported autoload script the special key
|
||||
|<ScriptCmd>| is useful. It allows for a command in a mapping to use the
|
||||
script context of where the mapping was defined.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*windows.txt* For Vim version 8.2. Last change: 2022 Feb 03
|
||||
*windows.txt* For Vim version 8.2. Last change: 2022 Apr 06
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -892,7 +892,7 @@ windows.
|
||||
*preview-popup*
|
||||
Alternatively, a popup window can be used by setting the 'previewpopup'
|
||||
option. When set, it overrules the 'previewwindow' and 'previewheight'
|
||||
settings. The option is a comma separated list of values:
|
||||
settings. The option is a comma-separated list of values:
|
||||
height maximum height of the popup
|
||||
width maximum width of the popup
|
||||
highlight highlight group of the popup (default is Pmenu)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2022 Feb 13
|
||||
" Last Change: 2022 Apr 13
|
||||
|
||||
" Listen very carefully, I will say this only once
|
||||
if exists("did_load_filetypes")
|
||||
@@ -158,6 +158,10 @@ au BufNewFile,BufRead *.asp
|
||||
" Grub (must be before catch *.lst)
|
||||
au BufNewFile,BufRead */boot/grub/menu.lst,*/boot/grub/grub.conf,*/etc/grub.conf setf grub
|
||||
|
||||
" Maxima, see:
|
||||
" https://maxima.sourceforge.io/docs/manual/maxima_71.html#file_005ftype_005fmaxima
|
||||
au BufNewFile,BufRead *.mc,*.demo,*.dem,*.dm{1,2,3,t},*.wxm,maxima-init.mac setf maxima
|
||||
|
||||
" Assembly (all kinds)
|
||||
" *.lst is not pure assembly, it has two extra columns (address, byte codes)
|
||||
au BufNewFile,BufRead *.asm,*.[sS],*.[aA],*.mac,*.lst call dist#ft#FTasm()
|
||||
@@ -205,11 +209,13 @@ au BufNewFile,BufRead *.iba,*.ibi setf ibasic
|
||||
" FreeBasic file (similar to QBasic)
|
||||
au BufNewFile,BufRead *.fb setf freebasic
|
||||
|
||||
" Batch file for MSDOS.
|
||||
au BufNewFile,BufRead *.bat,*.sys setf dosbatch
|
||||
" Batch file for MSDOS. See dist#ft#FTsys for *.sys
|
||||
au BufNewFile,BufRead *.bat setf dosbatch
|
||||
" *.cmd is close to a Batch file, but on OS/2 Rexx files also use *.cmd.
|
||||
au BufNewFile,BufRead *.cmd
|
||||
\ if getline(1) =~ '^/\*' | setf rexx | else | setf dosbatch | endif
|
||||
" ABB RAPID or Batch file for MSDOS.
|
||||
au BufNewFile,BufRead *.sys\c call dist#ft#FTsys()
|
||||
|
||||
" Batch file for 4DOS
|
||||
au BufNewFile,BufRead *.btm call dist#ft#FTbtm()
|
||||
@@ -360,13 +366,8 @@ au BufNewFile,BufRead *.eni setf cl
|
||||
" Clever or dtd
|
||||
au BufNewFile,BufRead *.ent call dist#ft#FTent()
|
||||
|
||||
" Clipper (or FoxPro; could also be eviews)
|
||||
au BufNewFile,BufRead *.prg
|
||||
\ if exists("g:filetype_prg") |
|
||||
\ exe "setf " . g:filetype_prg |
|
||||
\ else |
|
||||
\ setf clipper |
|
||||
\ endif
|
||||
" Clipper, FoxPro, ABB RAPID or eviews
|
||||
au BufNewFile,BufRead *.prg\c call dist#ft#FTprg()
|
||||
|
||||
" Clojure
|
||||
au BufNewFile,BufRead *.clj,*.cljs,*.cljx,*.cljc setf clojure
|
||||
@@ -397,6 +398,9 @@ au BufNewFile,BufRead *.cfm,*.cfi,*.cfc setf cf
|
||||
" Configure scripts
|
||||
au BufNewFile,BufRead configure.in,configure.ac setf config
|
||||
|
||||
" Cooklang
|
||||
au BufNewFile,BufRead *.cook setf cook
|
||||
|
||||
" CUDA Compute Unified Device Architecture
|
||||
au BufNewFile,BufRead *.cu,*.cuh setf cuda
|
||||
|
||||
@@ -444,7 +448,7 @@ au BufNewFile,BufRead *quake[1-3]/*.cfg setf quake
|
||||
au BufNewFile,BufRead *.qc setf c
|
||||
|
||||
" Configure files
|
||||
au BufNewFile,BufRead *.cfg setf cfg
|
||||
au BufNewFile,BufRead *.cfg\c call dist#ft#FTcfg()
|
||||
|
||||
" Cucumber
|
||||
au BufNewFile,BufRead *.feature setf cucumber
|
||||
@@ -951,6 +955,11 @@ au BufNewFile,BufRead *.jl setf julia
|
||||
" Kixtart
|
||||
au BufNewFile,BufRead *.kix setf kix
|
||||
|
||||
" Kuka Robot Language
|
||||
au BufNewFile,BufRead *.src\c call dist#ft#FTsrc()
|
||||
au BufNewFile,BufRead *.dat\c call dist#ft#FTdat()
|
||||
au BufNewFile,BufRead *.sub\c setf krl
|
||||
|
||||
" Kimwitu[++]
|
||||
au BufNewFile,BufRead *.k setf kwt
|
||||
|
||||
@@ -975,7 +984,7 @@ au BufNewFile,BufRead *.latte,*.lte setf latte
|
||||
" Limits
|
||||
au BufNewFile,BufRead */etc/limits,*/etc/*limits.conf,*/etc/*limits.d/*.conf setf limits
|
||||
|
||||
" LambdaProlog (*.mod too, see Modsim)
|
||||
" LambdaProlog (see dist#ft#FTmod for *.mod)
|
||||
au BufNewFile,BufRead *.sig setf lprolog
|
||||
|
||||
" LDAP LDIF
|
||||
@@ -1008,6 +1017,9 @@ au BufNewFile,BufRead *.ll setf lifelines
|
||||
" Lilo: Linux loader
|
||||
au BufNewFile,BufRead lilo.conf setf lilo
|
||||
|
||||
" Lilypond
|
||||
au BufNewFile,BufRead *.ly,*.ily setf lilypond
|
||||
|
||||
" Lisp (*.el = ELisp, *.cl = Common Lisp)
|
||||
" *.jl was removed, it's also used for Julia, better skip than guess wrong.
|
||||
if has("fname_case")
|
||||
@@ -1138,18 +1150,11 @@ au BufNewFile,BufRead *.mms call dist#ft#FTmms()
|
||||
" Symbian meta-makefile definition (MMP)
|
||||
au BufNewFile,BufRead *.mmp setf mmp
|
||||
|
||||
" Modsim III (or LambdaProlog)
|
||||
au BufNewFile,BufRead *.mod
|
||||
\ if expand("<afile>") =~ '\<go.mod$' |
|
||||
\ setf gomod |
|
||||
\ elseif getline(1) =~ '\<module\>' |
|
||||
\ setf lprolog |
|
||||
\ else |
|
||||
\ setf modsim3 |
|
||||
\ endif
|
||||
" ABB Rapid, Modula-2, Modsim III or LambdaProlog
|
||||
au BufNewFile,BufRead *.mod\c call dist#ft#FTmod()
|
||||
|
||||
" Modula-2 (.md removed in favor of Markdown)
|
||||
au BufNewFile,BufRead *.m2,*.DEF,*.MOD,*.mi setf modula2
|
||||
" Modula-2 (.md removed in favor of Markdown, see dist#ft#FTmod for *.MOD)
|
||||
au BufNewFile,BufRead *.m2,*.DEF,*.mi setf modula2
|
||||
|
||||
" Modula-3 (.m3, .i3, .mg, .ig)
|
||||
au BufNewFile,BufRead *.[mi][3g] setf modula3
|
||||
@@ -1277,6 +1282,9 @@ au BufNewFile,BufRead *.or setf openroad
|
||||
" OPL
|
||||
au BufNewFile,BufRead *.[Oo][Pp][Ll] setf opl
|
||||
|
||||
" OpenSCAD
|
||||
au BufNewFile,BufRead *.scad setf openscad
|
||||
|
||||
" Oracle config file
|
||||
au BufNewFile,BufRead *.ora setf ora
|
||||
|
||||
@@ -1286,13 +1294,13 @@ au BufNewFile,BufRead *.org,*.org_archive setf org
|
||||
" Packet filter conf
|
||||
au BufNewFile,BufRead pf.conf setf pf
|
||||
|
||||
" Pacman Config (close enough to dosini)
|
||||
au BufNewFile,BufRead */etc/pacman.conf setf dosini
|
||||
" Pacman config
|
||||
au BufNewFile,BufRead */etc/pacman.conf setf conf
|
||||
|
||||
" Pacman hooks
|
||||
au BufNewFile,BufRead *.hook
|
||||
\ if getline(1) == '[Trigger]' |
|
||||
\ setf dosini |
|
||||
\ setf conf |
|
||||
\ endif
|
||||
|
||||
" Pam conf
|
||||
@@ -1347,9 +1355,10 @@ au BufNewFile,BufRead *.pm
|
||||
au BufNewFile,BufRead *.pod setf pod
|
||||
|
||||
" Php, php3, php4, etc.
|
||||
" Also Phtml (was used for PHP 2 in the past)
|
||||
" Also .ctp for Cake template file
|
||||
au BufNewFile,BufRead *.php,*.php\d,*.phtml,*.ctp setf php
|
||||
" Also Phtml (was used for PHP 2 in the past).
|
||||
" Also .ctp for Cake template file.
|
||||
" Also .phpt for php tests.
|
||||
au BufNewFile,BufRead *.php,*.php\d,*.phtml,*.ctp,*.phpt setf php
|
||||
|
||||
" PHP config
|
||||
au BufNewFile,BufRead php.ini-* setf dosini
|
||||
@@ -1635,16 +1644,22 @@ au BufNewFile,BufRead *.sass setf sass
|
||||
au BufNewFile,BufRead *.sa setf sather
|
||||
|
||||
" Scala
|
||||
au BufNewFile,BufRead *.scala,*.sc setf scala
|
||||
au BufNewFile,BufRead *.scala setf scala
|
||||
|
||||
" SBT - Scala Build Tool
|
||||
au BufNewFile,BufRead *.sbt setf sbt
|
||||
|
||||
" SuperCollider
|
||||
au BufNewFile,BufRead *.sc call dist#ft#FTsc()
|
||||
|
||||
au BufNewFile,BufRead *.quark setf supercollider
|
||||
|
||||
" scdoc
|
||||
au BufNewFile,BufRead *.scd call dist#ft#FTscd()
|
||||
|
||||
" Scilab
|
||||
au BufNewFile,BufRead *.sci,*.sce setf scilab
|
||||
|
||||
" scdoc
|
||||
au BufNewFile,BufRead *.scd setf scdoc
|
||||
|
||||
" SCSS
|
||||
au BufNewFile,BufRead *.scss setf scss
|
||||
@@ -2044,6 +2059,9 @@ au BufNewFile,BufRead *.vala setf vala
|
||||
" Vera
|
||||
au BufNewFile,BufRead *.vr,*.vri,*.vrh setf vera
|
||||
|
||||
" Vagrant (uses Ruby syntax)
|
||||
au BufNewFile,BufRead Vagrantfile setf ruby
|
||||
|
||||
" Verilog HDL
|
||||
au BufNewFile,BufRead *.v setf verilog
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: C
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2021 Sep 21
|
||||
" Last Change: 2022 Apr 08
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
@@ -31,7 +31,8 @@ if exists('&ofu')
|
||||
endif
|
||||
|
||||
" Set 'comments' to format dashed lists in comments.
|
||||
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
|
||||
" Also include ///, used for Doxygen.
|
||||
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:///,://
|
||||
|
||||
" In VMS C keywords contain '$' characters.
|
||||
if has("vms")
|
||||
|
||||
@@ -31,7 +31,7 @@ Always use ":setlocal" to set 'indentexpr'. This avoids it being carried over
|
||||
to other buffers.
|
||||
|
||||
To trigger the indenting after typing a word like "endif", add the word to the
|
||||
'cinkeys' option with "+=".
|
||||
'indentkeys' option with "+=".
|
||||
|
||||
You normally set 'indentexpr' to evaluate a function and then define that
|
||||
function. That function only needs to be defined once for as long as Vim is
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
" 15.10.2006 MK Bram's suggestion for runtime integration
|
||||
" 05.11.2006 MK Bram suggested to save on spaces
|
||||
" 19.09.2007 NO g: missing before ada#Comment
|
||||
" 2022 April: b:undo_indent added by Doug Kearns
|
||||
" Help Page: ft-vim-indent
|
||||
"------------------------------------------------------------------------------
|
||||
" ToDo:
|
||||
@@ -35,6 +36,8 @@ setlocal indentexpr=GetAdaIndent()
|
||||
setlocal indentkeys-=0{,0}
|
||||
setlocal indentkeys+=0=~then,0=~end,0=~elsif,0=~when,0=~exception,0=~begin,0=~is,0=~record
|
||||
|
||||
let b:undo_indent = "setl inde< indk<"
|
||||
|
||||
" Only define the functions once.
|
||||
if exists("*GetAdaIndent")
|
||||
finish
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
" 29-04-2002 Fixed problems in function headers and max line width
|
||||
" Added support for two-line if's without curly braces
|
||||
" Fixed hang: 2011 Aug 31
|
||||
" 2022 April: b:undo_indent added by Doug Kearns
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
@@ -36,6 +37,8 @@ setlocal indentexpr=GetAwkIndent()
|
||||
" Mmm, copied from the tcl indent program. Is this okay?
|
||||
setlocal indentkeys-=:,0#
|
||||
|
||||
let b:undo_indent = "setl inde< indk<"
|
||||
|
||||
" Only define the function once.
|
||||
if exists("*GetAwkIndent")
|
||||
finish
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Description: Comshare Dimension Definition Language (CDL)
|
||||
" Maintainer: Raul Segura Acevedo <raulseguraaceved@netscape.net> (Invalid email address)
|
||||
" Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: Fri Nov 30 13:35:48 2001 CST
|
||||
" Last Change: 2022 Apr 06
|
||||
|
||||
if exists("b:did_indent")
|
||||
"finish
|
||||
@@ -12,6 +12,8 @@ setlocal indentexpr=CdlGetIndent(v:lnum)
|
||||
setlocal indentkeys&
|
||||
setlocal indentkeys+==~else,=~endif,=~then,;,),=
|
||||
|
||||
let b:undo_indent = "setl inde< indk<"
|
||||
|
||||
" Only define the function once.
|
||||
if exists("*CdlGetIndent")
|
||||
"finish
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
" Vim indent file
|
||||
" Language: ChaiScript
|
||||
" Maintainer: Jason Turner <lefticus 'at' gmail com>
|
||||
" Last Change: 2022 Apr 06
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
@@ -11,6 +12,8 @@ let b:did_indent = 1
|
||||
setlocal indentexpr=GetChaiScriptIndent()
|
||||
setlocal autoindent
|
||||
|
||||
let b:undo_indent = "setl ai< inde<"
|
||||
|
||||
" Only define the function once.
|
||||
if exists("*GetChaiScriptIndent")
|
||||
finish
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
" Author: Andy Cedilnik <andy.cedilnik@kitware.com>
|
||||
" Maintainer: Dimitri Merejkowsky <d.merej@gmail.com>
|
||||
" Former Maintainer: Karthik Krishnan <karthik.krishnan@kitware.com>
|
||||
" Last Change: 2017 Sep 24
|
||||
" Last Change: 2022 Apr 06
|
||||
"
|
||||
" Licence: The CMake license applies to this file. See
|
||||
" https://cmake.org/licensing
|
||||
@@ -17,6 +17,8 @@ let b:did_indent = 1
|
||||
setlocal indentexpr=CMakeGetIndent(v:lnum)
|
||||
setlocal indentkeys+==ENDIF(,ENDFOREACH(,ENDMACRO(,ELSE(,ELSEIF(,ENDWHILE(
|
||||
|
||||
let b:undo_indent = "setl inde< indk<"
|
||||
|
||||
" Only define the function once.
|
||||
if exists("*CMakeGetIndent")
|
||||
finish
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: D
|
||||
" Maintainer: Jason Mills <jmills@cs.mun.ca> (Invalid email address)
|
||||
" Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2005 Nov 22
|
||||
" Last Change: 2022 Apr 06
|
||||
" Version: 0.1
|
||||
"
|
||||
" Please email me with bugs, comments, and suggestion. Put vim in the subject
|
||||
@@ -19,4 +19,6 @@ let b:did_indent = 1
|
||||
" D indenting is a lot like the built-in C indenting.
|
||||
setlocal cindent
|
||||
|
||||
let b:undo_indent = "setl cin<"
|
||||
|
||||
" vim: ts=8 noet
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim indent file
|
||||
" Language: dict(1) configuration file
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2006-12-20
|
||||
" Last Change: 2022 Apr 06
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
@@ -11,3 +11,5 @@ let b:did_indent = 1
|
||||
setlocal indentkeys=0{,0},!^F,o,O cinwords= autoindent smartindent
|
||||
setlocal nosmartindent
|
||||
inoremap <buffer> # X#
|
||||
|
||||
let b:undo_indent = "setl ai< cinw< indk< si< | silent! iunmap <buffer> #"
|
||||
|
||||
@@ -11,3 +11,5 @@ let b:did_indent = 1
|
||||
setlocal indentkeys=0{,0},!^F,o,O cinwords= autoindent smartindent
|
||||
setlocal nosmartindent
|
||||
inoremap <buffer> # X#
|
||||
|
||||
let b:undo_indent = "setl ai< cinw< indk< si< | silent! iunmap <buffer> #"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
" Maintainer: Brent A. Fulgham <bfulgham@debian.org> (Invalid email address)
|
||||
" Doug Kearns <dougkearns@gmail.com>
|
||||
" Version: 0.01
|
||||
" Last Change: 2017 Jun 13
|
||||
" Last Change: 2022 Apr 06
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
@@ -15,6 +15,9 @@ setlocal indentkeys+==~begin,=~block,=~case,=~cleanup,=~define,=~end,=~else,=~el
|
||||
|
||||
" Define the appropriate indent function but only once
|
||||
setlocal indentexpr=DylanGetIndent()
|
||||
|
||||
let b:undo_indent = "setl inde< indk<"
|
||||
|
||||
if exists("*DylanGetIndent")
|
||||
finish
|
||||
endif
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
" Maintainer: Steven Oliver <oliver.steven@gmail.com>
|
||||
" Website: https://steveno@github.com/steveno/falconpl-vim.git
|
||||
" Credits: This is, to a great extent, a copy n' paste of ruby.vim.
|
||||
" 2022 April: b:undo_indent added by Doug Kearns
|
||||
|
||||
" 1. Setup {{{1
|
||||
" ============
|
||||
@@ -20,6 +21,8 @@ setlocal indentexpr=FalconGetIndent(v:lnum)
|
||||
setlocal indentkeys=0{,0},0),0],!^F,o,O,e
|
||||
setlocal indentkeys+==~case,=~catch,=~default,=~elif,=~else,=~end,=~\"
|
||||
|
||||
let b:undo_indent = "setl inde< indk< si<"
|
||||
|
||||
" Define the appropriate indent function but only once
|
||||
if exists("*FalconGetIndent")
|
||||
finish
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
" (https://raw.githubusercontent.com/sitaramc/gitolite/master/contrib/vim/indent/gitolite.vim)
|
||||
" Maintainer: Sitaram Chamarty <sitaramc@gmail.com>
|
||||
" (former Maintainer: Teemu Matilainen <teemu.matilainen@iki.fi>)
|
||||
" Last Change: 2017 Oct 05
|
||||
" Last Change: 2022 Apr 06
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
@@ -15,6 +15,8 @@ setlocal autoindent
|
||||
setlocal indentexpr=GetGitoliteIndent()
|
||||
setlocal indentkeys=o,O,*<Return>,!^F,=repo,\",=
|
||||
|
||||
let b:undo_indent = "setl ai< inde< indk<"
|
||||
|
||||
" Only define the function once.
|
||||
if exists("*GetGitoliteIndent")
|
||||
finish
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: IDL (ft=idlang)
|
||||
" Maintainer: Aleksandar Jelenak <ajelenak AT yahoo.com> (Invalid email address)
|
||||
" Doug Kearns <dougkearns@gmail.com>
|
||||
" Last change: 2017 Jun 13
|
||||
" Last change: 2022 Apr 06
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
@@ -14,6 +14,8 @@ setlocal indentkeys=o,O,0=endif,0=ENDIF,0=endelse,0=ENDELSE,0=endwhile,0=ENDWHIL
|
||||
|
||||
setlocal indentexpr=GetIdlangIndent(v:lnum)
|
||||
|
||||
let b:undo_indent = "setl inde< indk<"
|
||||
|
||||
" Only define the function once.
|
||||
if exists("*GetIdlangIndent")
|
||||
finish
|
||||
|
||||
130
runtime/indent/krl.vim
Normal file
130
runtime/indent/krl.vim
Normal file
@@ -0,0 +1,130 @@
|
||||
" Vim indent file
|
||||
" Language: Kuka Robot Language
|
||||
" Maintainer: Patrick Meiser-Knosowski <knosowski@graeffrobotics.de>
|
||||
" Version: 3.0.0
|
||||
" Last Change: 15. Apr 2022
|
||||
" Credits: Based on indent/vim.vim
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal nolisp
|
||||
setlocal nocindent
|
||||
setlocal nosmartindent
|
||||
setlocal autoindent
|
||||
setlocal indentexpr=GetKrlIndent()
|
||||
setlocal indentkeys=!^F,o,O,=~end,0=~else,0=~case,0=~default,0=~until,0=~continue,=~part
|
||||
let b:undo_indent = "setlocal lisp< cindent< smartindent< autoindent< indentexpr< indentkeys<"
|
||||
|
||||
if get(g:,'krlSpaceIndent',1)
|
||||
" Use spaces, not tabs, for indention, 2 is enough.
|
||||
" More or even tabs would waste valuable space on the teach pendant.
|
||||
setlocal softtabstop=2
|
||||
setlocal shiftwidth=2
|
||||
setlocal expandtab
|
||||
setlocal shiftround
|
||||
let b:undo_indent = b:undo_indent." softtabstop< shiftwidth< expandtab< shiftround<"
|
||||
endif
|
||||
|
||||
" Only define the function once.
|
||||
if exists("*GetKrlIndent")
|
||||
finish
|
||||
endif
|
||||
let s:keepcpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function GetKrlIndent() abort
|
||||
|
||||
let currentLine = getline(v:lnum)
|
||||
if currentLine =~? '\v^;(\s*(end)?fold>)@!' && !get(g:, 'krlCommentIndent', 0)
|
||||
" If current line has a ; in column 1 and is no fold, keep zero indent.
|
||||
" This may be usefull if code is commented out at the first column.
|
||||
return 0
|
||||
endif
|
||||
|
||||
" Find a non-blank line above the current line.
|
||||
let preNoneBlankLineNum = s:KrlPreNoneBlank(v:lnum - 1)
|
||||
if preNoneBlankLineNum == 0
|
||||
" At the start of the file use zero indent.
|
||||
return 0
|
||||
endif
|
||||
|
||||
let preNoneBlankLine = getline(preNoneBlankLineNum)
|
||||
let ind = indent(preNoneBlankLineNum)
|
||||
|
||||
" Define add 'shiftwidth' pattern
|
||||
let addShiftwidthPattern = '\v^\s*('
|
||||
if get(g:, 'krlIndentBetweenDef', 1)
|
||||
let addShiftwidthPattern ..= '(global\s+)?def(fct|dat)?\s+\$?\w'
|
||||
let addShiftwidthPattern ..= '|'
|
||||
endif
|
||||
let addShiftwidthPattern ..= 'if>|while>|for>|loop>'
|
||||
let addShiftwidthPattern ..= '|else>'
|
||||
let addShiftwidthPattern ..= '|case>|default>'
|
||||
let addShiftwidthPattern ..= '|repeat>'
|
||||
let addShiftwidthPattern ..= '|skip>|(ptp_)?spline>'
|
||||
let addShiftwidthPattern ..= '|time_block\s+(start|part)>'
|
||||
let addShiftwidthPattern ..= '|const_vel\s+start>'
|
||||
let addShiftwidthPattern ..= ')'
|
||||
|
||||
" Define Subtract 'shiftwidth' pattern
|
||||
let subtractShiftwidthPattern = '\v^\s*('
|
||||
if get(g:, 'krlIndentBetweenDef', 1)
|
||||
let subtractShiftwidthPattern ..= 'end(fct|dat)?>'
|
||||
let subtractShiftwidthPattern ..= '|'
|
||||
endif
|
||||
let subtractShiftwidthPattern ..= 'end(if|while|for|loop)>'
|
||||
let subtractShiftwidthPattern ..= '|else>'
|
||||
let subtractShiftwidthPattern ..= '|case>|default>|endswitch>'
|
||||
let subtractShiftwidthPattern ..= '|until>'
|
||||
let subtractShiftwidthPattern ..= '|end(skip|spline)>'
|
||||
let subtractShiftwidthPattern ..= '|time_block\s+(part|end)>'
|
||||
let subtractShiftwidthPattern ..= '|const_vel\s+end>'
|
||||
let subtractShiftwidthPattern ..= ')'
|
||||
|
||||
" Add shiftwidth
|
||||
if preNoneBlankLine =~? addShiftwidthPattern
|
||||
let ind += &sw
|
||||
endif
|
||||
|
||||
" Subtract shiftwidth
|
||||
if currentLine =~? subtractShiftwidthPattern
|
||||
let ind = ind - &sw
|
||||
endif
|
||||
|
||||
" First case after a switch gets the indent of the switch.
|
||||
if currentLine =~? '\v^\s*case>'
|
||||
\&& preNoneBlankLine =~? '\v^\s*switch>'
|
||||
let ind = ind + &sw
|
||||
endif
|
||||
|
||||
" align continue with the following instruction
|
||||
if currentLine =~? '\v^\s*continue>'
|
||||
\&& getline(v:lnum + 1) =~? subtractShiftwidthPattern
|
||||
let ind = ind - &sw
|
||||
endif
|
||||
|
||||
return ind
|
||||
endfunction
|
||||
|
||||
" This function works almost like prevnonblank() but handles &-headers,
|
||||
" comments and continue instructions like blank lines
|
||||
function s:KrlPreNoneBlank(lnum) abort
|
||||
|
||||
let nPreNoneBlank = prevnonblank(a:lnum)
|
||||
|
||||
while nPreNoneBlank > 0 && getline(nPreNoneBlank) =~? '\v^\s*(\&\w\+|;|continue>)'
|
||||
" Previouse none blank line irrelevant. Look further aback.
|
||||
let nPreNoneBlank = prevnonblank(nPreNoneBlank - 1)
|
||||
endwhile
|
||||
|
||||
return nPreNoneBlank
|
||||
endfunction
|
||||
|
||||
let &cpo = s:keepcpo
|
||||
unlet s:keepcpo
|
||||
|
||||
" vim:sw=2 sts=2 et
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: Makefile
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Last Change: 24 Sep 2021
|
||||
" Last Change: 2022 Apr 06
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
@@ -13,7 +13,7 @@ setlocal indentexpr=GetMakeIndent()
|
||||
setlocal indentkeys=!^F,o,O,<:>,=else,=endif
|
||||
setlocal nosmartindent
|
||||
|
||||
let b:undo_indent = "setl ai< inde< indk<"
|
||||
let b:undo_indent = "setl inde< indk< si<"
|
||||
|
||||
if exists("*GetMakeIndent")
|
||||
finish
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
" Maintainer: Steve Layland <layland@wolfram.com> (Invalid email address)
|
||||
" Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: Sat May 10 18:56:22 CDT 2005
|
||||
" 2022 April: b:undo_indent added by Doug Kearns
|
||||
" Source: http://vim.sourceforge.net/scripts/script.php?script_id=1274
|
||||
" http://members.wolfram.com/layland/vim/indent/mma.vim
|
||||
"
|
||||
@@ -26,6 +27,8 @@ setlocal indentexpr=GetMmaIndent()
|
||||
setlocal indentkeys+=0[,0],0(,0)
|
||||
setlocal nosi "turn off smart indent so we don't over analyze } blocks
|
||||
|
||||
let b:undo_indent = "setl inde< indk< si<"
|
||||
|
||||
if exists("*GetMmaIndent")
|
||||
finish
|
||||
endif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim indent file
|
||||
" Language: nginx.conf
|
||||
" Maintainer: Chris Aumann <me@chr4.org>
|
||||
" Last Change: Apr 15, 2017
|
||||
" Last Change: 2022 Apr 06
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
@@ -15,3 +15,5 @@ setlocal cindent
|
||||
|
||||
" Just make sure that the comments are not reset as defs would be.
|
||||
setlocal cinkeys-=0#
|
||||
|
||||
let b:undo_indent = "setl inde< cin< cink<"
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
" Vim indent file
|
||||
" Language: Objective-C
|
||||
" Maintainer: Kazunobu Kuriyama <kazunobu.kuriyama@nifty.com>
|
||||
" Last Change: 2004 May 16
|
||||
"
|
||||
|
||||
" Last Change: 2022 Apr 06
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
@@ -19,6 +17,8 @@ setlocal indentexpr=GetObjCIndent()
|
||||
setlocal indentkeys-=:
|
||||
setlocal indentkeys+=<:>
|
||||
|
||||
let b:undo_indent = "setl cin< inde< indk<"
|
||||
|
||||
" Only define the function once.
|
||||
if exists("*GetObjCIndent")
|
||||
finish
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: occam
|
||||
" Maintainer: Mario Schweigler <ms44@kent.ac.uk> (Invalid email address)
|
||||
" Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 23 April 2003
|
||||
" Last Change: 2022 Apr 06
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
@@ -17,6 +17,8 @@ setlocal indentexpr=GetOccamIndent()
|
||||
setlocal indentkeys=o,O,0=:
|
||||
"}}}
|
||||
|
||||
let b:undo_indent = "setl inde< indk<"
|
||||
|
||||
" Only define the function once
|
||||
if exists("*GetOccamIndent")
|
||||
finish
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
" Language: PostScript
|
||||
" Maintainer: Mike Williams <mrw@netcomuk.co.uk> (Invalid email address)
|
||||
" Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2nd July 2001
|
||||
"
|
||||
" Last Change: 2022 Apr 06
|
||||
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
@@ -14,6 +14,8 @@ let b:did_indent = 1
|
||||
setlocal indentexpr=PostscrIndentGet(v:lnum)
|
||||
setlocal indentkeys+=0],0=>>,0=%%,0=end,0=restore,0=grestore indentkeys-=:,0#,e
|
||||
|
||||
let b:undo_indent = "setl inde< indk<"
|
||||
|
||||
" Catch multiple instantiations
|
||||
if exists("*PostscrIndentGet")
|
||||
finish
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
" Doug Kearns <dougkearns@gmail.com>
|
||||
" Revised on: 2002.02.18. 23:34:05
|
||||
" Last change by: Takuya Fujiwara, 2018 Sep 23
|
||||
" 2022 April: b:undo_indent added by Doug Kearns
|
||||
|
||||
" TODO:
|
||||
" checking with respect to syntax highlighting
|
||||
@@ -21,6 +22,8 @@ setlocal indentexpr=GetPrologIndent()
|
||||
setlocal indentkeys-=:,0#
|
||||
setlocal indentkeys+=0%,-,0;,>,0)
|
||||
|
||||
let b:undo_indent = "setl inde< indk<"
|
||||
|
||||
" Only define the function once.
|
||||
"if exists("*GetPrologIndent")
|
||||
" finish
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: SAS
|
||||
" Maintainer: Zhen-Huan Hu <wildkeny@gmail.com>
|
||||
" Version: 3.0.3
|
||||
" Last Change: Jun 26, 2018
|
||||
" Last Change: 2022 Apr 06
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
@@ -12,6 +12,8 @@ let b:did_indent = 1
|
||||
setlocal indentexpr=GetSASIndent()
|
||||
setlocal indentkeys+=;,=~data,=~proc,=~macro
|
||||
|
||||
let b:undo_indent = "setl inde< indk<"
|
||||
|
||||
if exists("*GetSASIndent")
|
||||
finish
|
||||
endif
|
||||
|
||||
@@ -7,10 +7,11 @@
|
||||
" Mike Leary <leary@nwlink.com>
|
||||
" Markus Mottl <markus@oefai.at>
|
||||
" OCaml URL: http://www.oefai.at/~markus/vim/indent/ocaml.vim
|
||||
" Last Change: 2003 Jan 04 - Adapted to SML
|
||||
" Last Change: 2022 Apr 06
|
||||
" 2002 Nov 06 - Some fixes (JY)
|
||||
" 2002 Oct 28 - Fixed bug with indentation of ']' (MM)
|
||||
" 2002 Oct 22 - Major rewrite (JY)
|
||||
" 2022 April: b:undo_indent added by Doug Kearns
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
@@ -26,6 +27,8 @@ setlocal nosmartindent
|
||||
setlocal textwidth=80
|
||||
setlocal shiftwidth=2
|
||||
|
||||
let b:undo_indent = "setl et< inde< indk< lisp< si< sw< tw<"
|
||||
|
||||
" Comment formatting
|
||||
if (has("comments"))
|
||||
set comments=sr:(*,mb:*,ex:*)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
" Language: SystemVerilog
|
||||
" Maintainer: kocha <kocha.lsifrontend@gmail.com>
|
||||
" Last Change: 05-Feb-2017 by Bilal Wasim
|
||||
" 2022 April: b:undo_indent added by Doug Kearns
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
@@ -16,6 +17,8 @@ setlocal indentkeys+==endclass,=endpackage,=endsequence,=endclocking
|
||||
setlocal indentkeys+==endinterface,=endgroup,=endprogram,=endproperty,=endchecker
|
||||
setlocal indentkeys+==`else,=`endif
|
||||
|
||||
let b:undo_indent = "setl inde< indk<"
|
||||
|
||||
" Only define the function once.
|
||||
if exists("*SystemVerilogIndent")
|
||||
finish
|
||||
|
||||
148
runtime/indent/testdir/krl.in
Normal file
148
runtime/indent/testdir/krl.in
Normal file
@@ -0,0 +1,148 @@
|
||||
; vim: set ft=krl :
|
||||
|
||||
; START_INDENT
|
||||
|
||||
def One()
|
||||
int i
|
||||
If i==1 then
|
||||
While i>=1
|
||||
For i=1 to 5 step 2
|
||||
Loop
|
||||
i = i+1
|
||||
EndLoop
|
||||
EndFor
|
||||
EndWhile
|
||||
Else
|
||||
Repeat
|
||||
Switch i
|
||||
Case 1
|
||||
Skip 123
|
||||
i = i+1
|
||||
EndSkip 123
|
||||
Spline with $acc=100, $vel.cp=3
|
||||
slin {x 100}
|
||||
scirc {x 110, y 110}, {x 120, y 90}
|
||||
slin {x 200} c_dis
|
||||
Time_Block Start
|
||||
slin {x 300} c_dis
|
||||
Time_Block Part = 22.2
|
||||
slin {y 400} c_dis
|
||||
Time_Block Part = 33.3
|
||||
Time_Block End = 10
|
||||
slin {y 200} c_dis
|
||||
Const_Vel Start +100 OnStart
|
||||
slin {y 300} c_dis
|
||||
slin {x 100}
|
||||
Const_Vel End -5.5
|
||||
slin {y 200} c_dis
|
||||
EndSpline
|
||||
Case 2,3
|
||||
PTP_Spline with $acc=100, $vel.ptp=100
|
||||
sptp {a1 0} c_ptp
|
||||
sptp {a1 90}
|
||||
EndSpline c_spl
|
||||
Default
|
||||
i = i+1
|
||||
EndSwitch
|
||||
Continue
|
||||
Until False
|
||||
EndIf
|
||||
end
|
||||
|
||||
DEF Two()
|
||||
int i
|
||||
END
|
||||
|
||||
global def Three()
|
||||
int i
|
||||
end
|
||||
|
||||
GLOBAL DEF Four()
|
||||
int i
|
||||
END
|
||||
|
||||
Global Def Five()
|
||||
int i
|
||||
End
|
||||
|
||||
deffct bool fOne()
|
||||
int i
|
||||
endfct
|
||||
|
||||
DEFFCT bool fTwo()
|
||||
int i
|
||||
ENDFCT
|
||||
|
||||
global deffct bool fThree()
|
||||
int i
|
||||
endfct
|
||||
|
||||
GLOBAL DEFFCT bool fFour()
|
||||
int i
|
||||
ENDFCT
|
||||
|
||||
Global DefFct bool fFive()
|
||||
int i
|
||||
EndFct
|
||||
|
||||
DefDat datfile()
|
||||
global int i=1
|
||||
; don't indent column 1 comments unless g:krlCommentIndent is set
|
||||
; global int o=2
|
||||
EndDat
|
||||
|
||||
; END_INDENT
|
||||
|
||||
; START_INDENT
|
||||
; INDENT_EXE let g:krlSpaceIndent = 0
|
||||
; INDENT_EXE set shiftwidth=4
|
||||
|
||||
def bla()
|
||||
int i
|
||||
end
|
||||
|
||||
; END_INDENT
|
||||
|
||||
; START_INDENT
|
||||
; INDENT_EXE let g:krlCommentIndent = 1
|
||||
def bla()
|
||||
; indent this first column comment because of g:krlCommentIndent=1
|
||||
end
|
||||
; END_INDENT
|
||||
|
||||
; START_INDENT
|
||||
; INDENT_EXE let g:krlIndentBetweenDef = 0
|
||||
def bla()
|
||||
int i ; don't indent this line because of g:krlIndentBetweenDef=0
|
||||
end
|
||||
; END_INDENT
|
||||
|
||||
; START_INDENT
|
||||
; INDENT_AT this-line
|
||||
def Some()
|
||||
int f
|
||||
if true then
|
||||
f = 1 ; this-line
|
||||
endif
|
||||
end
|
||||
; END_INDENT
|
||||
|
||||
; START_INDENT
|
||||
; INDENT_NEXT next-line
|
||||
def Some()
|
||||
int i
|
||||
; next-line
|
||||
i = 1 ; should get indent of line 'int i' above
|
||||
end
|
||||
; END_INDENT
|
||||
|
||||
; START_INDENT
|
||||
; INDENT_PREV prev-line
|
||||
def Some()
|
||||
int f
|
||||
if true then
|
||||
f = 1
|
||||
; prev-line
|
||||
endif
|
||||
end
|
||||
; END_INDENT
|
||||
148
runtime/indent/testdir/krl.ok
Normal file
148
runtime/indent/testdir/krl.ok
Normal file
@@ -0,0 +1,148 @@
|
||||
; vim: set ft=krl :
|
||||
|
||||
; START_INDENT
|
||||
|
||||
def One()
|
||||
int i
|
||||
If i==1 then
|
||||
While i>=1
|
||||
For i=1 to 5 step 2
|
||||
Loop
|
||||
i = i+1
|
||||
EndLoop
|
||||
EndFor
|
||||
EndWhile
|
||||
Else
|
||||
Repeat
|
||||
Switch i
|
||||
Case 1
|
||||
Skip 123
|
||||
i = i+1
|
||||
EndSkip 123
|
||||
Spline with $acc=100, $vel.cp=3
|
||||
slin {x 100}
|
||||
scirc {x 110, y 110}, {x 120, y 90}
|
||||
slin {x 200} c_dis
|
||||
Time_Block Start
|
||||
slin {x 300} c_dis
|
||||
Time_Block Part = 22.2
|
||||
slin {y 400} c_dis
|
||||
Time_Block Part = 33.3
|
||||
Time_Block End = 10
|
||||
slin {y 200} c_dis
|
||||
Const_Vel Start +100 OnStart
|
||||
slin {y 300} c_dis
|
||||
slin {x 100}
|
||||
Const_Vel End -5.5
|
||||
slin {y 200} c_dis
|
||||
EndSpline
|
||||
Case 2,3
|
||||
PTP_Spline with $acc=100, $vel.ptp=100
|
||||
sptp {a1 0} c_ptp
|
||||
sptp {a1 90}
|
||||
EndSpline c_spl
|
||||
Default
|
||||
i = i+1
|
||||
EndSwitch
|
||||
Continue
|
||||
Until False
|
||||
EndIf
|
||||
end
|
||||
|
||||
DEF Two()
|
||||
int i
|
||||
END
|
||||
|
||||
global def Three()
|
||||
int i
|
||||
end
|
||||
|
||||
GLOBAL DEF Four()
|
||||
int i
|
||||
END
|
||||
|
||||
Global Def Five()
|
||||
int i
|
||||
End
|
||||
|
||||
deffct bool fOne()
|
||||
int i
|
||||
endfct
|
||||
|
||||
DEFFCT bool fTwo()
|
||||
int i
|
||||
ENDFCT
|
||||
|
||||
global deffct bool fThree()
|
||||
int i
|
||||
endfct
|
||||
|
||||
GLOBAL DEFFCT bool fFour()
|
||||
int i
|
||||
ENDFCT
|
||||
|
||||
Global DefFct bool fFive()
|
||||
int i
|
||||
EndFct
|
||||
|
||||
DefDat datfile()
|
||||
global int i=1
|
||||
; don't indent column 1 comments unless g:krlCommentIndent is set
|
||||
; global int o=2
|
||||
EndDat
|
||||
|
||||
; END_INDENT
|
||||
|
||||
; START_INDENT
|
||||
; INDENT_EXE let g:krlSpaceIndent = 0
|
||||
; INDENT_EXE set shiftwidth=4
|
||||
|
||||
def bla()
|
||||
int i
|
||||
end
|
||||
|
||||
; END_INDENT
|
||||
|
||||
; START_INDENT
|
||||
; INDENT_EXE let g:krlCommentIndent = 1
|
||||
def bla()
|
||||
; indent this first column comment because of g:krlCommentIndent=1
|
||||
end
|
||||
; END_INDENT
|
||||
|
||||
; START_INDENT
|
||||
; INDENT_EXE let g:krlIndentBetweenDef = 0
|
||||
def bla()
|
||||
int i ; don't indent this line because of g:krlIndentBetweenDef=0
|
||||
end
|
||||
; END_INDENT
|
||||
|
||||
; START_INDENT
|
||||
; INDENT_AT this-line
|
||||
def Some()
|
||||
int f
|
||||
if true then
|
||||
f = 1 ; this-line
|
||||
endif
|
||||
end
|
||||
; END_INDENT
|
||||
|
||||
; START_INDENT
|
||||
; INDENT_NEXT next-line
|
||||
def Some()
|
||||
int i
|
||||
; next-line
|
||||
i = 1 ; should get indent of line 'int i' above
|
||||
end
|
||||
; END_INDENT
|
||||
|
||||
; START_INDENT
|
||||
; INDENT_PREV prev-line
|
||||
def Some()
|
||||
int f
|
||||
if true then
|
||||
f = 1
|
||||
; prev-line
|
||||
endif
|
||||
end
|
||||
; END_INDENT
|
||||
@@ -1,7 +1,7 @@
|
||||
" These commands create the option window.
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2021 Dec 21
|
||||
" Last Change: 2022 Apr 07
|
||||
|
||||
" If there already is an option window, jump to that one.
|
||||
let buf = bufnr('option-window')
|
||||
@@ -624,6 +624,8 @@ call <SID>BinOptionG("scf", &scf)
|
||||
if has("gui")
|
||||
call <SID>AddOption("mousehide", gettext("hide the mouse pointer while typing"))
|
||||
call <SID>BinOptionG("mh", &mh)
|
||||
call <SID>AddOption("mousemoveevent", gettext("report mouse movement events"))
|
||||
call <SID>BinOptionG("mousemev", &mousemev)
|
||||
endif
|
||||
call <SID>AddOption("mousemodel", gettext("\"extend\", \"popup\" or \"popup_setpos\"; what the right\nmouse button is used for"))
|
||||
call <SID>OptionG("mousem", &mousem)
|
||||
@@ -927,6 +929,9 @@ if has("cindent")
|
||||
call <SID>AddOption("cinwords", gettext("list of words that cause more C-indent"))
|
||||
call append("$", "\t" .. s:local_to_buffer)
|
||||
call <SID>OptionL("cinw")
|
||||
call <SID>AddOption("cinscopedecls", gettext("list of scope declaration names used by cino-g"))
|
||||
call append("$", "\t" .. s:local_to_buffer)
|
||||
call <SID>OptionL("cinsd")
|
||||
call <SID>AddOption("indentexpr", gettext("expression used to obtain the indent of a line"))
|
||||
call append("$", "\t" .. s:local_to_buffer)
|
||||
call <SID>OptionL("inde")
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"
|
||||
" Author: Bram Moolenaar
|
||||
" Copyright: Vim license applies, see ":help license"
|
||||
" Last Change: 2022 Jan 17
|
||||
" Last Change: 2022 Apr 16
|
||||
"
|
||||
" WORK IN PROGRESS - The basics works stable, more to come
|
||||
" Note: In general you need at least GDB 7.12 because this provides the
|
||||
@@ -445,7 +445,7 @@ endfunc
|
||||
func s:StartDebugCommon(dict)
|
||||
" Sign used to highlight the line where the program has stopped.
|
||||
" There can be only one.
|
||||
sign define debugPC linehl=debugPC
|
||||
call sign_define('debugPC', #{linehl: 'debugPC'})
|
||||
|
||||
" Install debugger commands in the text window.
|
||||
call win_gotoid(s:sourcewin)
|
||||
@@ -668,7 +668,9 @@ func s:EndDebugCommon()
|
||||
endif
|
||||
endif
|
||||
endfor
|
||||
exe was_buf .. "buf"
|
||||
if bufexists(was_buf)
|
||||
exe was_buf .. "buf"
|
||||
endif
|
||||
|
||||
call s:DeleteCommands()
|
||||
|
||||
@@ -740,8 +742,8 @@ func s:HandleDisasmMsg(msg)
|
||||
|
||||
let lnum = search('^' . s:asm_addr)
|
||||
if lnum != 0
|
||||
exe 'sign unplace ' . s:asm_id
|
||||
exe 'sign place ' . s:asm_id . ' line=' . lnum . ' name=debugPC'
|
||||
call sign_unplace('TermDebug', #{id: s:asm_id})
|
||||
call sign_place(s:asm_id, 'TermDebug', 'debugPC', '%', #{lnum: lnum})
|
||||
endif
|
||||
|
||||
call win_gotoid(curwinid)
|
||||
@@ -830,6 +832,7 @@ func s:InstallCommands()
|
||||
command Clear call s:ClearBreakpoint()
|
||||
command Step call s:SendResumingCommand('-exec-step')
|
||||
command Over call s:SendResumingCommand('-exec-next')
|
||||
command -nargs=? Until call s:Until(<q-args>)
|
||||
command Finish call s:SendResumingCommand('-exec-finish')
|
||||
command -nargs=* Run call s:Run(<q-args>)
|
||||
command -nargs=* Arguments call s:SendResumingCommand('-exec-arguments ' . <q-args>)
|
||||
@@ -866,7 +869,8 @@ func s:InstallCommands()
|
||||
an 1.200 PopUp.-SEP3- <Nop>
|
||||
an 1.210 PopUp.Set\ breakpoint :Break<CR>
|
||||
an 1.220 PopUp.Clear\ breakpoint :Clear<CR>
|
||||
an 1.230 PopUp.Evaluate :Evaluate<CR>
|
||||
an 1.230 PopUp.Run\ until :Until<CR>
|
||||
an 1.240 PopUp.Evaluate :Evaluate<CR>
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -894,6 +898,7 @@ func s:DeleteCommands()
|
||||
delcommand Clear
|
||||
delcommand Step
|
||||
delcommand Over
|
||||
delcommand Until
|
||||
delcommand Finish
|
||||
delcommand Run
|
||||
delcommand Arguments
|
||||
@@ -937,26 +942,35 @@ func s:DeleteCommands()
|
||||
aunmenu PopUp.-SEP3-
|
||||
aunmenu PopUp.Set\ breakpoint
|
||||
aunmenu PopUp.Clear\ breakpoint
|
||||
aunmenu PopUp.Run\ until
|
||||
aunmenu PopUp.Evaluate
|
||||
endif
|
||||
endif
|
||||
|
||||
exe 'sign unplace ' . s:pc_id
|
||||
for [id, entries] in items(s:breakpoints)
|
||||
for subid in keys(entries)
|
||||
exe 'sign unplace ' . s:Breakpoint2SignNumber(id, subid)
|
||||
endfor
|
||||
endfor
|
||||
call sign_unplace('TermDebug')
|
||||
unlet s:breakpoints
|
||||
unlet s:breakpoint_locations
|
||||
|
||||
sign undefine debugPC
|
||||
for val in s:BreakpointSigns
|
||||
exe "sign undefine debugBreakpoint" . val
|
||||
endfor
|
||||
call sign_undefine('debugPC')
|
||||
call sign_undefine(s:BreakpointSigns->map("'debugBreakpoint' .. v:val"))
|
||||
let s:BreakpointSigns = []
|
||||
endfunc
|
||||
|
||||
" :Until - Execute until past a specified position or current line
|
||||
func s:Until(at)
|
||||
if s:stopped
|
||||
" reset s:stopped here, it may take a bit of time before we get a response
|
||||
let s:stopped = 0
|
||||
call ch_log('assume that program is running after this command')
|
||||
" Use the fname:lnum format
|
||||
let at = empty(a:at) ?
|
||||
\ fnameescape(expand('%:p')) . ':' . line('.') : a:at
|
||||
call s:SendCommand('-exec-until ' . at)
|
||||
else
|
||||
call ch_log('dropping command, program is running: exec-until')
|
||||
endif
|
||||
endfunc
|
||||
|
||||
" :Break - Set a breakpoint at the cursor position.
|
||||
func s:SetBreakpoint(at)
|
||||
" Setting a breakpoint may not work while the program is running.
|
||||
@@ -990,7 +1004,8 @@ func s:ClearBreakpoint()
|
||||
" Assume this always works, the reply is simply "^done".
|
||||
call s:SendCommand('-break-delete ' . id)
|
||||
for subid in keys(s:breakpoints[id])
|
||||
exe 'sign unplace ' . s:Breakpoint2SignNumber(id, subid)
|
||||
call sign_unplace('TermDebug',
|
||||
\ #{id: s:Breakpoint2SignNumber(id, subid)})
|
||||
endfor
|
||||
unlet s:breakpoints[id]
|
||||
unlet s:breakpoint_locations[bploc][idx]
|
||||
@@ -1205,8 +1220,8 @@ func s:GotoAsmwinOrCreateIt()
|
||||
call s:SendCommand('disassemble $pc')
|
||||
endif
|
||||
else
|
||||
exe 'sign unplace ' . s:asm_id
|
||||
exe 'sign place ' . s:asm_id . ' line=' . lnum . ' name=debugPC'
|
||||
call sign_unplace('TermDebug', #{id: s:asm_id})
|
||||
call sign_place(s:asm_id, 'TermDebug', 'debugPC', '%', #{lnum: lnum})
|
||||
endif
|
||||
endif
|
||||
endfunc
|
||||
@@ -1241,8 +1256,8 @@ func s:HandleCursor(msg)
|
||||
if lnum == 0
|
||||
call s:SendCommand('disassemble $pc')
|
||||
else
|
||||
exe 'sign unplace ' . s:asm_id
|
||||
exe 'sign place ' . s:asm_id . ' line=' . lnum . ' name=debugPC'
|
||||
call sign_unplace('TermDebug', #{id: s:asm_id})
|
||||
call sign_place(s:asm_id, 'TermDebug', 'debugPC', '%', #{lnum: lnum})
|
||||
endif
|
||||
|
||||
call win_gotoid(curwinid)
|
||||
@@ -1279,8 +1294,9 @@ echomsg 'different fname: "' .. expand('%:p') .. '" vs "' .. fnamemodify(fname,
|
||||
endif
|
||||
exe lnum
|
||||
normal! zv
|
||||
exe 'sign unplace ' . s:pc_id
|
||||
exe 'sign place ' . s:pc_id . ' line=' . lnum . ' name=debugPC priority=110 file=' . fname
|
||||
call sign_unplace('TermDebug', #{id: s:pc_id})
|
||||
call sign_place(s:pc_id, 'TermDebug', 'debugPC', fname,
|
||||
\ #{lnum: lnum, priority: 110})
|
||||
if !exists('b:save_signcolumn')
|
||||
let b:save_signcolumn = &signcolumn
|
||||
call add(s:signcolumn_buflist, bufnr())
|
||||
@@ -1288,7 +1304,7 @@ echomsg 'different fname: "' .. expand('%:p') .. '" vs "' .. fnamemodify(fname,
|
||||
setlocal signcolumn=yes
|
||||
endif
|
||||
elseif !s:stopped || fname != ''
|
||||
exe 'sign unplace ' . s:pc_id
|
||||
call sign_unplace('TermDebug', #{id: s:pc_id})
|
||||
endif
|
||||
|
||||
call win_gotoid(wid)
|
||||
@@ -1305,7 +1321,9 @@ func s:CreateBreakpoint(id, subid, enabled)
|
||||
else
|
||||
let hiName = "debugBreakpoint"
|
||||
endif
|
||||
exe "sign define debugBreakpoint" . nr . " text=" . substitute(nr, '\..*', '', '') . " texthl=" . hiName
|
||||
call sign_define('debugBreakpoint' .. nr,
|
||||
\ #{text: substitute(nr, '\..*', '', ''),
|
||||
\ texthl: hiName})
|
||||
endif
|
||||
endfunc
|
||||
|
||||
@@ -1383,7 +1401,9 @@ endfunc
|
||||
|
||||
func s:PlaceSign(id, subid, entry)
|
||||
let nr = printf('%d.%d', a:id, a:subid)
|
||||
exe 'sign place ' . s:Breakpoint2SignNumber(a:id, a:subid) . ' line=' . a:entry['lnum'] . ' name=debugBreakpoint' . nr . ' priority=110 file=' . a:entry['fname']
|
||||
call sign_place(s:Breakpoint2SignNumber(a:id, a:subid), 'TermDebug',
|
||||
\ 'debugBreakpoint' .. nr, a:entry['fname'],
|
||||
\ #{lnum: a:entry['lnum'], priority: 110})
|
||||
let a:entry['placed'] = 1
|
||||
endfunc
|
||||
|
||||
@@ -1397,7 +1417,8 @@ func s:HandleBreakpointDelete(msg)
|
||||
if has_key(s:breakpoints, id)
|
||||
for [subid, entry] in items(s:breakpoints[id])
|
||||
if has_key(entry, 'placed')
|
||||
exe 'sign unplace ' . s:Breakpoint2SignNumber(id, subid)
|
||||
call sign_unplace('TermDebug',
|
||||
\ #{id: s:Breakpoint2SignNumber(id, subid)})
|
||||
unlet entry['placed']
|
||||
endif
|
||||
endfor
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: Debian DEP3 Patch headers
|
||||
" Maintainer: Gabriel Filion <gabster@lelutin.ca>
|
||||
" Last Change: 2021-01-09
|
||||
" Last Change: 2022 Apr 06
|
||||
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/dep3patch.vim
|
||||
"
|
||||
" Specification of the DEP3 patch header format is available at:
|
||||
@@ -28,7 +28,7 @@ syn region dep3patchMultiField matchgroup=dep3patchKey start="^Bug\%(-[[:graph:]
|
||||
syn region dep3patchMultiField matchgroup=dep3patchKey start="^Forwarded\ze: *" end="$" contained contains=dep3patchHTTPUrl,dep3patchForwardedShort oneline keepend
|
||||
syn region dep3patchMultiField matchgroup=dep3patchKey start="^\%(Author\|From\)\ze: *" end="$" contained contains=dep3patchEmail oneline keepend
|
||||
syn region dep3patchMultiField matchgroup=dep3patchKey start="^\%(Reviewed-by\|Acked-by\)\ze: *" end="$" contained contains=dep3patchEmail oneline keepend
|
||||
syn region dep3patchMultiField matchgroup=dep3patchKey start="^Last-Updated\ze: *" end="$" contained contains=dep3patchISODate oneline keepend
|
||||
syn region dep3patchMultiField matchgroup=dep3patchKey start="^Last-Update\ze: *" end="$" contained contains=dep3patchISODate oneline keepend
|
||||
syn region dep3patchMultiField matchgroup=dep3patchKey start="^Applied-Upstream\ze: *" end="$" contained contains=dep3patchHTTPUrl,dep3patchCommitID oneline keepend
|
||||
|
||||
syn match dep3patchHTTPUrl contained "\vhttps?://[[:alnum:]][-[:alnum:]]*[[:alnum:]]?(\.[[:alnum:]][-[:alnum:]]*[[:alnum:]]?)*\.[[:alpha:]][-[:alnum:]]*[[:alpha:]]?(:\d+)?(/[^[:space:]]*)?$"
|
||||
|
||||
458
runtime/syntax/krl.vim
Normal file
458
runtime/syntax/krl.vim
Normal file
@@ -0,0 +1,458 @@
|
||||
" Vim syntax file
|
||||
" Language: Kuka Robot Language
|
||||
" Maintainer: Patrick Meiser-Knosowski <knosowski@graeffrobotics.de>
|
||||
" Version: 3.0.0
|
||||
" Last Change: 18. Apr 2022
|
||||
" Credits: Thanks for contributions to this to Michael Jagusch
|
||||
" Thanks for beta testing to Thomas Baginski
|
||||
"
|
||||
" Note to self:
|
||||
" for testing perfomance
|
||||
" open a 1000 lines file.
|
||||
" :syntime on
|
||||
" G
|
||||
" hold down CTRL-U until reaching top
|
||||
" :syntime report
|
||||
|
||||
" Init {{{
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:keepcpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" if colorscheme is tortus(less)? krlGroupName defaults to 1
|
||||
if get(g:, 'colors_name', " ") =~ '\<tortus'
|
||||
\&& !exists("g:krlGroupName")
|
||||
let g:krlGroupName=1
|
||||
endif
|
||||
" krlGroupName defaults to 0 if it's not initialized yet or 0
|
||||
if !get(g:, "krlGroupName", 0)
|
||||
let g:krlGroupName = 0
|
||||
endif
|
||||
|
||||
" krl does ignore case
|
||||
syn case ignore
|
||||
" take #, $ and & into keyword (syntax only)
|
||||
syn iskeyword @,48-57,_,192-255,#,$,&
|
||||
" spell checking
|
||||
syn spell notoplevel
|
||||
" }}} init
|
||||
|
||||
" Comment and Folding {{{
|
||||
|
||||
" Special Comment
|
||||
|
||||
" TODO Comment
|
||||
syn keyword krlTodo contained TODO FIXME XXX
|
||||
highlight default link krlTodo Todo
|
||||
|
||||
" Debug Comment
|
||||
syn keyword krlDebug contained DEBUG
|
||||
highlight default link krlDebug Debug
|
||||
|
||||
" Comment
|
||||
" none move fold comment until second ;
|
||||
syn match krlFoldComment /\c\v^\s*;\s*%(end)?fold>[^;]*/ containedin=krlFold contains=krlSingleQuoteString,krlInteger,krlFloat,krlMovement,krlDelimiter,krlBoolean
|
||||
highlight default link krlFoldComment Comment
|
||||
|
||||
" move fold comment until second ;
|
||||
syn match krlMoveFoldComment /\c\v^\s*;\s*fold>[^;]*<s?%(ptp|lin|circ|spl)(_rel)?>[^;]*/ containedin=krlFold contains=krlInteger,krlFloat,krlMovement,krlDelimiter
|
||||
highlight default link krlMoveFoldComment Comment
|
||||
|
||||
" things to highlight in a fold line
|
||||
syn keyword krlFoldHighlights CONT IN SYN OUT containedin=krlFoldComment
|
||||
syn match krlFoldHighlights /\c\v<(M|F|E|A|t|i|bin|binin|UP|SPSMAKRO)\d+>/ containedin=krlFoldComment
|
||||
if g:krlGroupName
|
||||
highlight default link krlFoldHighlights Sysvars
|
||||
else
|
||||
" default color for Fold Highlights
|
||||
endif
|
||||
syn keyword krlVkrcFoldConstants EIN AUS containedin=krlFoldComment
|
||||
highlight default link krlVkrcFoldConstants Boolean
|
||||
|
||||
" Comment without Fold, also includes endfold lines and fold line part after second ;
|
||||
syn match krlComment /\c\v;\s*%(<%(end)?fold>)@!.*$/ containedin=krlFold contains=krlTodo,krlDebug,@Spell
|
||||
" Commented out Fold line: "; ;FOLD PTP..."
|
||||
syn match krlComment /\c\v^\s*;\s*;.*$/ contains=krlTodo,krlDebug
|
||||
highlight default link krlComment Comment
|
||||
|
||||
if has("conceal") && get(g:, 'krlConcealFoldTail', 1)
|
||||
syn match krlConcealFoldTail /\c\v(^\s*;\s*fold[^;]*)@250<=;%(--|\s*<fold>|\s*<endfold>)@!.*$/ transparent containedin=krlComment conceal cchar=*
|
||||
endif
|
||||
" }}} Comment and Folding
|
||||
|
||||
" Header {{{
|
||||
syn match krlHeader /&\a\w*/
|
||||
highlight default link krlHeader PreProc
|
||||
" }}} Header
|
||||
|
||||
" Operator {{{
|
||||
" Boolean operator
|
||||
syn keyword krlBoolOperator and or exor not b_and b_or b_exor b_not
|
||||
highlight default link krlBoolOperator Operator
|
||||
" Arithmetic operator
|
||||
syn match krlArithOperator /[+-]/ containedin=krlFloat
|
||||
syn match krlArithOperator /[*/]/
|
||||
highlight default link krlArithOperator Operator
|
||||
" Compare operator
|
||||
syn match krlCompOperator /[<>=]/
|
||||
highlight default link krlCompOperator Operator
|
||||
" Geometric operator
|
||||
" Do not move the : operator
|
||||
" Must be present befor krlParamdef
|
||||
syn match krlGeomOperator /[:]/
|
||||
" syn match krlGeomOperator /[:]/ containedin=krlLabel,krlParamdef
|
||||
highlight default link krlGeomOperator Operator
|
||||
" }}} Operator
|
||||
|
||||
" Type, StorageClass and Typedef {{{
|
||||
" Simple data types
|
||||
syn keyword krlType bool char real int containedin=krlAnyType
|
||||
" External program and function
|
||||
syn keyword krlType ext extfct extfctp extp containedin=krlAnyType
|
||||
" Communication
|
||||
syn keyword krlType signal channel containedin=krlAnyType
|
||||
highlight default link krlType Type
|
||||
" StorageClass
|
||||
syn keyword krlStorageClass decl global const struc enum
|
||||
highlight default link krlStorageClass StorageClass
|
||||
" .dat file public
|
||||
syn keyword krlDatStorageClass public
|
||||
highlight default link krlDatStorageClass StorageClass
|
||||
" Parameter StorageClass
|
||||
" Do not move the :in/:out
|
||||
" Must be present after krlGeomOperator
|
||||
syn match krlParamdef /[:]\s*in\>/
|
||||
syn match krlParamdef /[:]\s*out\>/
|
||||
highlight default link krlParamdef StorageClass
|
||||
" Not a typedef but I like to have those highlighted
|
||||
" different then types, structures or strorage classes
|
||||
syn keyword krlTypedef DEF DEFFCT ENDFCT DEFDAT ENDDAT
|
||||
syn match krlTypedef /^\s*END\>/
|
||||
highlight default link krlTypedef Typedef
|
||||
" }}} Type, StorageClass and Typedef
|
||||
|
||||
" Delimiter {{{
|
||||
syn match krlDelimiter /[\[\](),\\]/
|
||||
highlight default link krlDelimiter Delimiter
|
||||
" }}} Delimiter
|
||||
|
||||
" Constant values {{{
|
||||
" Boolean
|
||||
syn keyword krlBoolean true false containedin=krlStructVal
|
||||
highlight default link krlBoolean Boolean
|
||||
" Binary integer
|
||||
syn match krlBinaryInt /'b[01]\+'/ containedin=krlStructVal
|
||||
highlight default link krlBinaryInt Number
|
||||
" Hexadecimal integer
|
||||
syn match krlHexInt /'h[0-9a-fA-F]\+'/ containedin=krlStructVal
|
||||
highlight default link krlHexInt Number
|
||||
" Integer
|
||||
syn match krlInteger /\W\@1<=[+-]\?\d\+/ containedin=krlStructVal,krlFloat contains=krlArithOperator
|
||||
highlight default link krlInteger Number
|
||||
" Float
|
||||
syn match krlFloat /\v\W@1<=[+-]?\d+\.?\d*%(\s*[eE][+-]?\d+)?/ containedin=krlStructVal
|
||||
highlight default link krlFloat Float
|
||||
" String
|
||||
syn region krlString start=/"/ end=/"/ oneline containedin=krlStructVal contains=@Spell
|
||||
highlight default link krlString String
|
||||
syn match krlSpecialChar /[|]/ containedin=krlString
|
||||
highlight default link krlSpecialChar SpecialChar
|
||||
" String within a fold line
|
||||
syn region krlSingleQuoteString start=/'/ end=/'/ oneline contained contains=@Spell
|
||||
highlight default link krlSingleQuoteString String
|
||||
" Enum
|
||||
syn match krlEnumVal /#\s*\a\w*/ containedin=krlStructVal
|
||||
highlight default link krlEnumVal Constant
|
||||
" }}} Constant values
|
||||
|
||||
" Predefined Structure and Enum {{{
|
||||
" Predefined structures and enums found in
|
||||
" /r1/mada/$*.dat, /r1/steu/$*.dat and
|
||||
" /r1/system/$config.dat as well as
|
||||
" basisTech, gripperTech and spotTech
|
||||
"
|
||||
" Predefined data types found in krc1
|
||||
syn keyword krlStructure servopara keymove powermodul trace techangle tech techfct techcps techfctctrl axis_inc axis_cal date display_var pro_ip con bus
|
||||
syn keyword krlEnum ident_state sig_state move_state async_state emt_mode boxmode msg_prm_typ msg_typ cmd_stat asys trace_state trace_mode direction techsys techgeoref techclass techmode hpu_key_val pro_state eax transsys mode_move cosys device rotsys emstop cause_t
|
||||
"
|
||||
" Predefined data types found in kss functions
|
||||
syn keyword krlEnum ediagstate rdc_fs_state ret_c_psync_e var_type cancel_psync_e sys_vars
|
||||
syn keyword krlStructure siginf rw_rdc_file rw_mam_file diagpar_t error_t stopmess case_sense_t msgbuf_t e3pos e3axis diagopt_t
|
||||
"
|
||||
" Predefined structures for movement
|
||||
syn keyword krlStructure frame e6pos pos e6axis axis
|
||||
syn keyword krlStructure fdat ldat pdat
|
||||
syn keyword krlStructure load inertia
|
||||
"
|
||||
" Predefined structures for shapes
|
||||
syn keyword krlStructure axbox cylinder box
|
||||
"
|
||||
" Predefined structures and enums found in /r1/mada/$machine.dat
|
||||
syn keyword krlStructure cp fra acc_car jerk_struc dhart spin trpspin ex_kin et_ax maxtool
|
||||
syn keyword krlEnum individual_mames supply_voltage kinclass main_axis wrist_axis sw_onoff
|
||||
"
|
||||
" Predefined structures and enums found in /r1/mada/$robcor.dat
|
||||
" syn keyword krlStructure
|
||||
syn keyword krlEnum adap_acc model_type control_parameter eko_mode
|
||||
"
|
||||
" Predefined structures and enums found in /steu/mada/$custom.dat
|
||||
syn keyword krlStructure pro_io_t ser ext_mod_t coop_krc ws_config bin_type coop_update_t ldc_reaction
|
||||
syn keyword krlEnum axis_of_coordinates spline_para_variant target_status cp_vel_type cp_statmon
|
||||
"
|
||||
" Predefined structures and enums found in /steu/mada/$machine.dat
|
||||
syn keyword krlStructure emstop_path boxstatesafein boxstatesafeout
|
||||
syn keyword krlEnum digincode
|
||||
"
|
||||
" Predefined structures and enums found in /steu/mada/$option.dat
|
||||
syn keyword krlStructure msg_t
|
||||
" syn keyword krlEnum
|
||||
"
|
||||
" Predefined structures and enums found in /r1/system/$config.dat
|
||||
" BasisTech
|
||||
syn keyword krlStructure dig_out_type ctrl_in_t ctrl_out_t fct_out_t fct_in_t odat basis_sugg_t out_sugg_t md_state machine_def_t machine_tool_t machine_frame_t trigger_para constvel_para condstop_para adat tm_sugg_t tqm_tqdat_t sps_prog_type
|
||||
syn keyword krlEnum bas_command out_modetype ipo_m_t apo_mode_t funct_type p00_command timer_actiontype
|
||||
"
|
||||
" GripperTech
|
||||
syn keyword krlStructure grp_typ grp_types grp_sugg_t
|
||||
syn keyword krlEnum on_off_typ apo_typ
|
||||
"
|
||||
" SpotTech
|
||||
syn keyword krlStructure spot_type spot_sugg_t
|
||||
syn keyword krlEnum s_command s_pair_slct command_retr
|
||||
"
|
||||
" VW
|
||||
syn keyword krlStructure vw_mpara_typ zangentyp zangenbedingung ibszangentyp last_ibs_typ verr_typ verrcheck_t t_fb_state kollisionsdaten state_t modus_t
|
||||
syn keyword krlEnum synctype dir_typ subtype ari_typ bool_typ vw_command ibgn_command vw_user_cmd move_types adv_t_type bas_type ibs_mode_typ vw_user_cmd pro_mode mode_op
|
||||
"
|
||||
" ProgCoop
|
||||
syn keyword krlStructure ydat
|
||||
" syn keyword krlEnum
|
||||
"
|
||||
" bas.src
|
||||
syn keyword krlStructure cont
|
||||
syn keyword krlEnum esys ipo_mode circ_mode circ_type ori_type var_state
|
||||
"
|
||||
" MsgLib.src
|
||||
syn keyword krlStructure KrlMsg_T KrlMsgParType_T KrlMsgPar_T KrlMsgOpt_T KrlMsgDlgSK_T
|
||||
syn keyword krlEnum EKrlMsgType
|
||||
"
|
||||
highlight default link krlStructure Structure
|
||||
highlight default link krlEnum Structure
|
||||
" }}} Predefined Structure and Enum
|
||||
|
||||
" System variable {{{
|
||||
syn match krlSysvars /\<\$\a[a-zA-Z0-9_.]*/
|
||||
if g:krlGroupName
|
||||
highlight default link krlSysvars Sysvars
|
||||
else
|
||||
" default color for Sysvars
|
||||
endif
|
||||
" }}} System variable
|
||||
|
||||
" Statements, keywords et al {{{
|
||||
" continue
|
||||
syn keyword krlContinue continue
|
||||
if g:krlGroupName
|
||||
highlight default link krlContinue Continue
|
||||
else
|
||||
highlight default link krlContinue Statement
|
||||
endif
|
||||
" interrupt
|
||||
syn match krlStatement /\v\c%(<global>\s+)?<INTERRUPT>%(\s+<decl>)?/ contains=krlStorageClass
|
||||
" keywords
|
||||
syn keyword krlStatement wait on off enable disable stop trigger with when distance onstart delay do prio import is minimum maximum confirm on_error_proceed
|
||||
syn match krlStatement /\v\c%(<wait\s+)@7<=<sec>/
|
||||
syn match krlStatement /\v\c%(<when\s+)@7<=<path>/
|
||||
highlight default link krlStatement Statement
|
||||
" Conditional
|
||||
syn keyword krlConditional if then else endif switch case default endswitch skip endskip
|
||||
highlight default link krlConditional Conditional
|
||||
" Repeat
|
||||
syn keyword krlRepeat for to step endfor while endwhile repeat until loop endloop exit
|
||||
highlight default link krlRepeat Repeat
|
||||
" Label
|
||||
syn keyword krlLabel goto
|
||||
syn match krlLabel /^\s*\w\+:\ze\s*\%(;.*\)\?$/
|
||||
highlight default link krlLabel Label
|
||||
" Keyword
|
||||
syn keyword krlKeyword anin anout digin
|
||||
highlight default link krlKeyword Keyword
|
||||
" Exception
|
||||
syn keyword krlException return resume halt
|
||||
highlight default link krlException Exception
|
||||
" }}} Statements, keywords et al
|
||||
|
||||
" special keywords for movement commands {{{
|
||||
syn keyword krlMovement PTP PTP_REL LIN LIN_REL CIRC CIRC_REL SPL SPL_REL SPTP SPTP_REL SLIN SLIN_REL SCIRC SCIRC_REL
|
||||
syn keyword krlMovement ASYPTP ASYCONT ASYSTOP ASYCANCEL MOVE_EMI
|
||||
syn match krlMovement /\v\c^\s*<BRAKE(\s+F)?>/
|
||||
if g:krlGroupName
|
||||
highlight default link krlMovement Movement
|
||||
else
|
||||
highlight default link krlMovement Special
|
||||
endif
|
||||
" movement modifiers
|
||||
syn match krlMoveBlockInst /\c\v^\s*TIME_BLOCK\s+(START|PART|END)/
|
||||
syn match krlMoveBlockInst /\c\v^\s*CONST_VEL\s+(START|END)/
|
||||
syn keyword krlMoveBlockInst ptp_spline spline endspline
|
||||
highlight default link krlMoveBlockInst Statement
|
||||
syn keyword krlMoveMod ca c_ptp c_dis c_vel c_ori c_spl
|
||||
if g:krlGroupName
|
||||
highlight default link krlMoveMod Movement
|
||||
else
|
||||
highlight default link krlMoveMod Special
|
||||
endif
|
||||
" }}} special keywords for movement commands
|
||||
|
||||
" Structure value {{{
|
||||
" avoid coloring structure component names
|
||||
syn match krlNames /\.[a-zA-Z_][.a-zA-Z0-9_$]*/
|
||||
syn match krlNames contained /[a-zA-Z_][.a-zA-Z0-9_$]*/
|
||||
" highlight default link krlNames None
|
||||
" Structure value
|
||||
syn region krlStructVal start=/{/ end=/}/ oneline containedin=krlStructVal contains=krlNames
|
||||
highlight default link krlStructVal Delimiter
|
||||
" }}} Structure value
|
||||
|
||||
" BuildInFunction {{{
|
||||
syn keyword krlBuildInFunction contained Pulse
|
||||
syn keyword krlBuildInFunction contained m_comment
|
||||
syn keyword krlBuildInFunction contained is_key_pressed
|
||||
syn keyword krlBuildInFunction contained set_opt_filter
|
||||
syn keyword krlBuildInFunction contained timer_limit
|
||||
syn keyword krlBuildInFunction contained tool_adj
|
||||
syn keyword krlBuildInFunction contained FRand
|
||||
syn keyword krlBuildInFunction contained ExecFunc eb_test EB EK EO LK mbx_rec
|
||||
" safe robot
|
||||
syn keyword krlbuildinfunction contained get_AxesMask get_BrakeTest_Time
|
||||
" math
|
||||
syn keyword krlBuildInFunction contained Abs Sin Cos Acos Tan Atan Atan2 Sqrt
|
||||
syn keyword krlBuildInFunction contained Forward Inverse inv_pos
|
||||
" cFoo sFoo
|
||||
syn keyword krlBuildInFunction contained cClose cOpen cRead cWrite sRead sWrite
|
||||
" string
|
||||
syn keyword krlBuildInFunction contained StrToBool StrToInt StrToReal StrToString StrToFrame StrToPos StrToE3Pos StrToE6Pos StrToAxis StrToE3Axis StrToE6Axis
|
||||
syn keyword krlBuildInFunction contained StrAdd StrClear StrCopy StrComp StrFind StrLen StrDeclLen StrToBool StrToInt StrToReal StrToString
|
||||
" diag
|
||||
syn keyword krlBuildInFunction contained diag_start diag_stop get_DiagState
|
||||
" rdc mam pid
|
||||
syn keyword krlBuildInFunction contained CheckPidOnRdc check_mam_on_rdc get_rdc_fs_state
|
||||
syn keyword krlBuildInFunction contained set_mam_on_hd copy_mam_hd_to_rdc copy_mam_rdc_to_hd
|
||||
syn keyword krlBuildInFunction contained PidToHd PidToRdc
|
||||
syn keyword krlBuildInFunction contained cal_to_rdc rdc_file_to_hd
|
||||
syn keyword krlBuildInFunction contained delete_pid_on_rdc delete_rdc_content
|
||||
syn keyword krlBuildInFunction contained create_rdc_archive restore_rdc_archive
|
||||
" ioctl
|
||||
syn keyword krlBuildInFunction contained IOCtl cIOCtl
|
||||
syn keyword krlBuildInFunction contained WSpaceGive WSpaceTake
|
||||
" sync
|
||||
syn keyword krlBuildInFunction contained Sync SyncCmd CancelProgSync
|
||||
" remote
|
||||
syn keyword krlBuildInFunction contained RemoteCmd RemoteRead
|
||||
" msg/dlg
|
||||
syn keyword krlBuildInFunction contained IsMessageSet clear_KrlMsg get_MsgBuffer exists_KrlDlg exists_KrlMsg set_KrlDlg set_KrlDlgAnswer set_KrlMsg
|
||||
" robvers
|
||||
syn keyword krlBuildInFunction contained maximize_UsedxRobvers set_UsedxRobvers
|
||||
" md_foo
|
||||
syn keyword krlBuildInFunction contained md_Cmd md_GetState md_SetState md_Asgn
|
||||
" emi
|
||||
syn keyword krlBuildInFunction contained emi_ActPos emi_EndPos emi_StartPos emi_RecState emi_RecName
|
||||
" var
|
||||
syn keyword krlBuildInFunction contained cast_from cast_to
|
||||
syn keyword krlBuildInFunction contained GetVarsize GetCycDef get_sig_inf get_decl_place VarType VarState
|
||||
" sys
|
||||
syn keyword krlBuildInFunction contained GetSysState get_system_data set_system_data set_system_data_delayed
|
||||
" err
|
||||
syn keyword krlBuildInFunction contained err_clear err_raise
|
||||
" motion
|
||||
syn keyword krlBuildInFunction contained delete_backward_buffer rob_stop rob_stop_release set_brake_delay suppress_repositioning VectorMoveOn VectorMoveOff
|
||||
" torque
|
||||
syn keyword krlBuildInFunction contained set_torque_limits reset_torque_limits
|
||||
" krc1
|
||||
syn keyword krlBuildInFunction contained cLcopy cCurpos cNew cClear cRelease cKey
|
||||
if g:krlGroupName
|
||||
highlight default link krlBuildInFunction BuildInFunction
|
||||
else
|
||||
highlight default link krlBuildInFunction Function
|
||||
endif
|
||||
" }}} BuildInFunction
|
||||
|
||||
" Function {{{
|
||||
syn match krlFunction /[a-zA-Z_]\w* *(/me=e-1 contains=krlBuildInFunction
|
||||
highlight default link krlFunction Function
|
||||
" }}} Function
|
||||
|
||||
" Error {{{
|
||||
if get(g:, 'krlShowError', 1)
|
||||
" some more or less common typos
|
||||
"
|
||||
" vars or funcs >24 chars are not possible in krl. a234567890123456789012345
|
||||
syn match krlError0 /\w\{25,}/ containedin=krlFunction,krlNames,krlLabel,krlAnyType,krlEnumVal,krlSysvars
|
||||
"
|
||||
" should be interrupt (on|off) \w+
|
||||
syn match krlError1 /\vinterrupt[ \t(]+[_$a-zA-Z0-9]+[_$a-zA-Z0-9.\[\]()+\-*/]*[ \t)]+o%(n|ff)>/
|
||||
"
|
||||
" for bla==5 to 7...
|
||||
" ||
|
||||
syn match krlError3 /\v%(^\s*for%(\(|\s)+[_$a-zA-Z]+[_$a-zA-Z0-9.\[\]()+\-*/ ]*\s*)@<=[:=]\=/
|
||||
"
|
||||
" TODO optimize performance
|
||||
" wait for a=b
|
||||
" |
|
||||
syn match krlError4 /\v%(^\s*%(return|wait\s+for|if|while|until|%(global\s+)?interrupt\s+decl)>[^;]+[^;<>=])@<=\=[^=]/
|
||||
"
|
||||
" wait for a><b
|
||||
" ||
|
||||
syn match krlError5 /\v%(^\s*%(return|wait\s+for|if|while|until|%(global\s+)?interrupt\s+decl)>[^;]+)@<=\>\s*\</
|
||||
"
|
||||
" if (a==5) (b==6) ...
|
||||
" |||
|
||||
syn match krlError6 /\v%(^\s*%(return|wait\s+for|if|while|until|%(global\s+)?interrupt\s+decl)>[^;]+[^;])@<=\)\s*\(/
|
||||
"
|
||||
" TODO optimize performance
|
||||
" a == b + 1
|
||||
" a := b + 1
|
||||
" ||
|
||||
syn match krlError7 /\v%(^\s*%(return|wait\s+for|if|while|until|%(global\s+)?interrupt\s+decl)>[^;]+[^;])@1<!%(^\s*[_$a-zA-Z]+[_$a-zA-Z0-9.\[\],+\-*/]*\s*)@<=[:=]\=/
|
||||
syn match krlError7 /\v\c%(^\s*%(decl\s+)%(global\s+)?%(const\s+)?\w+\s+\w+\s*)@<=[:=]\=/
|
||||
syn match krlError7 /\v\c%(^\s*%(decl\s+)?%(global\s+)?%(const\s+)?%(bool\s+|int\s+|real\s+|char\s+)\w+\s*)@<=[:=]\=/
|
||||
"
|
||||
" this one is tricky. Make sure this does not match trigger instructions; OK, next try, now search for false positives
|
||||
" TODO optimize performance
|
||||
" a = b and c or (int1=int2)
|
||||
" |
|
||||
syn match krlError8 /\v(^\s*[_$a-zA-Z]+[_$a-zA-Z0-9.\[\]()+\-*/]*\s*\=[^;]*[^;<>=])@<=\=\ze[^=]/
|
||||
"
|
||||
" <(distance|delay|prio)> :=
|
||||
" <(distance|delay|prio)> ==
|
||||
" ||
|
||||
syn match krlError9 /\v(^[^;]*<(distance|delay|prio|minimum|maximum)\s*)@<=[:=]\=/
|
||||
"
|
||||
" 'for', 'while' or 'repeat' followed by 'do'
|
||||
syn match krlError10 /\c\v^\s*(until|while|for)>[^;]*<do>/
|
||||
"
|
||||
highlight default link krlError0 Error
|
||||
highlight default link krlError1 Error
|
||||
highlight default link krlError2 Error
|
||||
highlight default link krlError3 Error
|
||||
highlight default link krlError4 Error
|
||||
highlight default link krlError5 Error
|
||||
highlight default link krlError6 Error
|
||||
highlight default link krlError7 Error
|
||||
highlight default link krlError8 Error
|
||||
highlight default link krlError9 Error
|
||||
highlight default link krlError10 Error
|
||||
endif
|
||||
" }}} Error
|
||||
|
||||
" Finish {{{
|
||||
let &cpo = s:keepcpo
|
||||
unlet s:keepcpo
|
||||
|
||||
let b:current_syntax = "krl"
|
||||
" }}} Finish
|
||||
|
||||
" vim:sw=2 sts=2 et fdm=marker
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: Lua 4.0, Lua 5.0, Lua 5.1 and Lua 5.2
|
||||
" Maintainer: Marcus Aurelius Farias <masserahguard-lua 'at' yahoo com>
|
||||
" First Author: Carlos Augusto Teixeira Mendes <cmendes 'at' inf puc-rio br>
|
||||
" Last Change: 2012 Aug 12
|
||||
" Last Change: 2022 Mar 31
|
||||
" Options: lua_version = 4 or 5
|
||||
" lua_subversion = 0 (4.0, 5.0) or 1 (5.1) or 2 (5.2)
|
||||
" default 5.2
|
||||
@@ -319,6 +319,15 @@ elseif lua_version == 5
|
||||
syn match luaFunc /\<debug\.upvalueid\>/
|
||||
syn match luaFunc /\<debug\.upvaluejoin\>/
|
||||
endif
|
||||
if lua_subversion >= 3
|
||||
"https://www.lua.org/manual/5.3/manual.html#6.5
|
||||
syn match luaFunc /\<utf8\.char\>/
|
||||
syn match luaFunc /\<utf8\.charpattern\>/
|
||||
syn match luaFunc /\<utf8\.codes\>/
|
||||
syn match luaFunc /\<utf8\.codepoint\>/
|
||||
syn match luaFunc /\<utf8\.len\>/
|
||||
syn match luaFunc /\<utf8\.offset\>/
|
||||
endif
|
||||
endif
|
||||
|
||||
" Define the default highlighting.
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
" Language: NeoMutt setup files
|
||||
" Maintainer: Richard Russon <rich@flatcap.org>
|
||||
" Previous Maintainer: Guillaume Brogi <gui-gui@netcourrier.com>
|
||||
" Last Change: 2020-06-21
|
||||
" Last Change: 2022-04-08
|
||||
" Original version based on syntax/muttrc.vim
|
||||
|
||||
" This file covers NeoMutt 2020-06-19
|
||||
" This file covers NeoMutt 2022-04-08
|
||||
|
||||
" quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
@@ -115,6 +115,8 @@ syntax region muttrcIndexFormatStr contained skipwhite keepend start=+"+ sk
|
||||
syntax region muttrcIndexFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcIndexFormatEscapes,muttrcIndexFormatConditionals,muttrcFormatErrors,muttrcTimeEscapes nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syntax region muttrcMixFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcMixFormatEscapes,muttrcMixFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syntax region muttrcMixFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcMixFormatEscapes,muttrcMixFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syntax region muttrcPatternFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPatternFormatEscapes,muttrcPatternFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syntax region muttrcPatternFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPatternFormatEscapes,muttrcPatternFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syntax region muttrcPGPCmdFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPGPCmdFormatEscapes,muttrcPGPCmdFormatConditionals,muttrcVariable,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syntax region muttrcPGPCmdFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPGPCmdFormatEscapes,muttrcPGPCmdFormatConditionals,muttrcVariable,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syntax region muttrcPGPFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPGPFormatEscapes,muttrcPGPFormatConditionals,muttrcFormatErrors,muttrcPGPTimeEscapes nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
@@ -144,35 +146,37 @@ function! s:escapesConditionals(baseName, sequence, padding, conditional)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" CHECKED 2020-06-21
|
||||
" Ref: alias_format_str() in alias/dlgalias.c
|
||||
" CHECKED 2022-04-08
|
||||
" Ref: alias_format_str() in alias/dlg_alias.c
|
||||
call s:escapesConditionals('AliasFormat', '[acfnrt]', 1, 0)
|
||||
" Ref: attach_format_str() in recvattach.c
|
||||
" Ref: attach_format_str() in attach/dlg_attach.c
|
||||
call s:escapesConditionals('AttachFormat', '[CcDdeFfIMmnQsTtuX]', 1, 1)
|
||||
" Ref: compose_format_str() in compose.c
|
||||
" Ref: compose_format_str() in compose/cbar.c
|
||||
call s:escapesConditionals('ComposeFormat', '[ahlv]', 1, 1)
|
||||
" Ref: folder_format_str() in browser.c
|
||||
" Ref: folder_format_str() in browser/browser.c
|
||||
call s:escapesConditionals('FolderFormat', '[CDdFfgilmNnstu]', 1, 0)
|
||||
" Ref: group_index_format_str() in browser.c
|
||||
" Ref: group_index_format_str() in nntp/browse.c
|
||||
call s:escapesConditionals('GroupIndexFormat', '[CdfMNns]', 1, 1)
|
||||
" Ref: index_format_str() in hdrline.c
|
||||
call s:escapesConditionals('IndexFormat', '[AaBbCDdEefgHIiJKLlMmNnOPqRrSsTtuvWXxYyZ(<[{]\|@\i\+@\|G[a-zA-Z]\+\|Fp\=\|z[cst]\|cr\=', 1, 1)
|
||||
" Ref: mix_format_str() in remailer.c
|
||||
call s:escapesConditionals('MixFormat', '[acns]', 1, 0)
|
||||
" Ref: pattern_format_str() in pattern/dlg_pattern.c
|
||||
call s:escapesConditionals('PatternFormat', '[den]', 1, 0)
|
||||
" Ref: pgp_command_format_str() in ncrypt/pgpinvoke.c
|
||||
call s:escapesConditionals('PGPCmdFormat', '[afprs]', 0, 1)
|
||||
" Ref: crypt_format_str() in ncrypt/crypt_gpgme.c
|
||||
" Ref: pgp_entry_format_str() in ncrypt/pgpkey.c
|
||||
" Ref: crypt_format_str() in ncrypt/dlg_gpgme.c
|
||||
" Ref: pgp_entry_format_str() in ncrypt/dlg_pgp.c
|
||||
" Note: crypt_format_str() supports 'p', but pgp_entry_fmt() does not
|
||||
call s:escapesConditionals('PGPFormat', '[AaCcFfKkLlnptu[]', 0, 0)
|
||||
" Ref: query_format_str() in alias/dlgquery.c
|
||||
" Ref: query_format_str() in alias/dlg_query.c
|
||||
call s:escapesConditionals('QueryFormat', '[acent]', 1, 1)
|
||||
" Ref: sidebar_format_str() in sidebar.c
|
||||
" Ref: sidebar_format_str() in sidebar/window.c
|
||||
call s:escapesConditionals('SidebarFormat', '[!BDdFLNnorStZ]', 1, 1)
|
||||
" Ref: smime_command_format_str() in ncrypt/smime.c
|
||||
call s:escapesConditionals('SmimeFormat', '[aCcdfiks]', 0, 1)
|
||||
" Ref: status_format_str() in status.c
|
||||
call s:escapesConditionals('StatusFormat', '[bDdFfhLlMmnoPpRrSstuVv]', 1, 1)
|
||||
call s:escapesConditionals('StatusFormat', '[bDdFfhLlMmnoPpRrSsTtuVv]', 1, 1)
|
||||
|
||||
syntax region muttrcPGPTimeEscapes contained start=+%\[+ end=+\]+ contains=muttrcStrftimeEscapes
|
||||
syntax region muttrcTimeEscapes contained start=+%(+ end=+)+ contains=muttrcStrftimeEscapes
|
||||
@@ -187,6 +191,7 @@ syntax match muttrcVarEqualsFolderFmt contained skipwhite "=" nextgroup=mutt
|
||||
syntax match muttrcVarEqualsGrpIdxFmt contained skipwhite "=" nextgroup=muttrcGroupIndexFormatStr
|
||||
syntax match muttrcVarEqualsIdxFmt contained skipwhite "=" nextgroup=muttrcIndexFormatStr
|
||||
syntax match muttrcVarEqualsMixFmt contained skipwhite "=" nextgroup=muttrcMixFormatStr
|
||||
syntax match muttrcVarEqualsPatternFmt contained skipwhite "=" nextgroup=muttrcPatternFormatStr
|
||||
syntax match muttrcVarEqualsPGPCmdFmt contained skipwhite "=" nextgroup=muttrcPGPCmdFormatStr
|
||||
syntax match muttrcVarEqualsPGPFmt contained skipwhite "=" nextgroup=muttrcPGPFormatStr
|
||||
syntax match muttrcVarEqualsQueryFmt contained skipwhite "=" nextgroup=muttrcQueryFormatStr
|
||||
@@ -197,9 +202,9 @@ syntax match muttrcVarEqualsStrftimeFmt contained skipwhite "=" nextgroup=mutt
|
||||
|
||||
syntax match muttrcVPrefix contained /[?&]/ nextgroup=muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
|
||||
" CHECKED 2020-06-21
|
||||
" List of the different screens in mutt (see Menus in keymap.c)
|
||||
syntax keyword muttrcMenu contained alias attach browser compose editor generic index key_select_pgp key_select_smime mix pager pgp postpone query smime
|
||||
" CHECKED 2022-04-08
|
||||
" List of the different screens in NeoMutt (see MenuNames in menu/type.c)
|
||||
syntax keyword muttrcMenu contained alias attach autocrypt browser compose editor generic index key_select_pgp key_select_smime mix pager pgp postpone query smime
|
||||
syntax match muttrcMenuList "\S\+" contained contains=muttrcMenu
|
||||
syntax match muttrcMenuCommas /,/ contained
|
||||
|
||||
@@ -234,12 +239,12 @@ syntax match muttrcEscapedVariable contained "\\\$[a-zA-Z_-]\+"
|
||||
syntax match muttrcBadAction contained "[^<>]\+" contains=muttrcEmail
|
||||
syntax match muttrcAction contained "<[^>]\{-}>" contains=muttrcBadAction,muttrcFunction,muttrcKeyName
|
||||
|
||||
" CHECKED 2020-06-21
|
||||
" First, functions that take regular expressions:
|
||||
" CHECKED 2022-04-08
|
||||
" First, hooks that take regular expressions:
|
||||
syntax match muttrcRXHookNot contained /!\s*/ skipwhite nextgroup=muttrcRXHookString,muttrcRXHookStringNL
|
||||
syntax match muttrcRXHooks /\<\%(account\|append\|close\|crypt\|folder\|mbox\|open\|pgp\)-hook\>/ skipwhite nextgroup=muttrcRXHookNot,muttrcRXHookString,muttrcRXHookStringNL
|
||||
|
||||
" Now, functions that take patterns
|
||||
" Now, hooks that take patterns
|
||||
syntax match muttrcPatHookNot contained /!\s*/ skipwhite nextgroup=muttrcPattern
|
||||
syntax match muttrcPatHooks /\<\%(charset\|iconv\|index-format\)-hook\>/ skipwhite nextgroup=muttrcPatHookNot,muttrcPattern
|
||||
syntax match muttrcPatHooks /\<\%(message\|reply\|send\|send2\|save\|fcc\|fcc-save\)-hook\>/ skipwhite nextgroup=muttrcPatHookNot,muttrcOptPattern
|
||||
@@ -295,10 +300,10 @@ syntax match muttrcAliasNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrc
|
||||
syntax match muttrcUnAliasKey contained "\s*\w\+\s*" skipwhite nextgroup=muttrcUnAliasKey,muttrcUnAliasNL
|
||||
syntax match muttrcUnAliasNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcUnAliasKey,muttrcUnAliasNL
|
||||
|
||||
" CHECKED 2020-06-21
|
||||
" List of letters in Flags in pattern.c
|
||||
" CHECKED 2022-04-08
|
||||
" List of letters in Flags in pattern/flags.c
|
||||
" Parameter: none
|
||||
syntax match muttrcSimplePat contained "!\?\^\?[~][ADEFGgklNOPpQRSTuUvV#$=]"
|
||||
syntax match muttrcSimplePat contained "!\?\^\?[~][ADEFGgklNOPpQRSTUuVv#$=]"
|
||||
" Parameter: range
|
||||
syntax match muttrcSimplePat contained "!\?\^\?[~][mnXz]\s*\%([<>-][0-9]\+[kM]\?\|[0-9]\+[kM]\?[-]\%([0-9]\+[kM]\?\)\?\)"
|
||||
" Parameter: date
|
||||
@@ -306,7 +311,7 @@ syntax match muttrcSimplePat contained "!\?\^\?[~][dr]\s*\%(\%(-\?[0-9]\{1,2}\%(
|
||||
" Parameter: regex
|
||||
syntax match muttrcSimplePat contained "!\?\^\?[~][BbCcefHhIiLMstwxYy]\s*" nextgroup=muttrcSimplePatRXContainer
|
||||
" Parameter: pattern
|
||||
syntax match muttrcSimplePat contained "!\?\^\?[%][bBcCefhHiLstxy]\s*" nextgroup=muttrcSimplePatString
|
||||
syntax match muttrcSimplePat contained "!\?\^\?[%][BbCcefHhiLstxy]\s*" nextgroup=muttrcSimplePatString
|
||||
" Parameter: pattern
|
||||
syntax match muttrcSimplePat contained "!\?\^\?[=][bcCefhHiLstxy]\s*" nextgroup=muttrcSimplePatString
|
||||
syntax region muttrcSimplePat contained keepend start=+!\?\^\?[~](+ end=+)+ contains=muttrcSimplePat
|
||||
@@ -369,8 +374,8 @@ syntax keyword muttrcMonoAttrib contained bold none normal reverse standout unde
|
||||
syntax keyword muttrcMono contained mono skipwhite nextgroup=muttrcColorField,muttrcColorCompose
|
||||
syntax match muttrcMonoLine "^\s*mono\s\+\S\+" skipwhite nextgroup=muttrcMonoAttrib contains=muttrcMono
|
||||
|
||||
" CHECKED 2020-06-21
|
||||
" List of fields in Fields in color.c
|
||||
" CHECKED 2022-04-08
|
||||
" List of fields in ColorFields in color/commmand.c
|
||||
syntax keyword muttrcColorField skipwhite contained
|
||||
\ attachment attach_headers body bold error hdrdefault header index index_author
|
||||
\ index_collapsed index_date index_flags index_label index_number index_size index_subject
|
||||
@@ -383,8 +388,8 @@ syntax match muttrcColorField contained "\<quoted\d\=\>"
|
||||
|
||||
syntax match muttrcColorCompose skipwhite contained /\s*compose\s*/ nextgroup=muttrcColorComposeField
|
||||
|
||||
" CHECKED 2020-06-21
|
||||
" List of fields in ComposeFields in color.c
|
||||
" CHECKED 2022-04-08
|
||||
" List of fields in ComposeColorFields in color/command.c
|
||||
syntax keyword muttrcColorComposeField skipwhite contained
|
||||
\ header security_both security_encrypt security_none security_sign
|
||||
\ nextgroup=muttrcColorFG,muttrcColorFGNL
|
||||
@@ -411,20 +416,21 @@ function! s:boolQuadGen(type, vars, deprecated)
|
||||
|
||||
endfunction
|
||||
|
||||
" CHECKED 2020-06-21
|
||||
" CHECKED 2022-04-08
|
||||
" List of DT_BOOL in MuttVars in mutt_config.c
|
||||
call s:boolQuadGen('Bool', [
|
||||
\ 'abort_backspace', 'allow_8bit', 'allow_ansi', 'arrow_cursor', 'ascii_chars', 'askbcc',
|
||||
\ 'askcc', 'ask_follow_up', 'ask_x_comment_to', 'attach_save_without_prompting',
|
||||
\ 'attach_split', 'autocrypt', 'autocrypt_reply', 'autoedit', 'auto_subscribe', 'auto_tag',
|
||||
\ 'abort_backspace', 'allow_8bit', 'allow_ansi', 'arrow_cursor', 'ascii_chars', 'ask_bcc',
|
||||
\ 'ask_cc', 'ask_follow_up', 'ask_x_comment_to', 'attach_save_without_prompting',
|
||||
\ 'attach_split', 'autocrypt', 'autocrypt_reply', 'auto_edit', 'auto_subscribe', 'auto_tag',
|
||||
\ 'beep', 'beep_new', 'bounce_delivered', 'braille_friendly',
|
||||
\ 'browser_abbreviate_mailboxes', 'change_folder_next', 'check_mbox_size', 'check_new',
|
||||
\ 'collapse_all', 'collapse_flagged', 'collapse_unread', 'confirmappend', 'confirmcreate',
|
||||
\ 'crypt_autoencrypt', 'crypt_autopgp', 'crypt_autosign', 'crypt_autosmime',
|
||||
\ 'crypt_confirmhook', 'crypt_opportunistic_encrypt',
|
||||
\ 'collapse_all', 'collapse_flagged', 'collapse_unread', 'compose_show_user_headers',
|
||||
\ 'confirm_append', 'confirm_create', 'copy_decode_weed', 'count_alternatives',
|
||||
\ 'crypt_auto_encrypt', 'crypt_auto_pgp', 'crypt_auto_sign', 'crypt_auto_smime',
|
||||
\ 'crypt_confirm_hook', 'crypt_opportunistic_encrypt',
|
||||
\ 'crypt_opportunistic_encrypt_strong_keys', 'crypt_protected_headers_read',
|
||||
\ 'crypt_protected_headers_save', 'crypt_protected_headers_write', 'crypt_replyencrypt',
|
||||
\ 'crypt_replysign', 'crypt_replysignencrypted', 'crypt_timestamp', 'crypt_use_gpgme',
|
||||
\ 'crypt_protected_headers_save', 'crypt_protected_headers_write', 'crypt_reply_encrypt',
|
||||
\ 'crypt_reply_sign', 'crypt_reply_sign_encrypted', 'crypt_timestamp', 'crypt_use_gpgme',
|
||||
\ 'crypt_use_pka', 'delete_untag', 'digest_collapse', 'duplicate_threads', 'edit_headers',
|
||||
\ 'encode_from', 'fast_reply', 'fcc_before_send', 'fcc_clear', 'flag_safe', 'followup_to',
|
||||
\ 'force_name', 'forward_decode', 'forward_decrypt', 'forward_quote', 'forward_references',
|
||||
@@ -433,45 +439,52 @@ call s:boolQuadGen('Bool', [
|
||||
\ 'history_remove_dups', 'honor_disposition', 'idn_decode', 'idn_encode',
|
||||
\ 'ignore_list_reply_to', 'imap_check_subscribed', 'imap_condstore', 'imap_deflate',
|
||||
\ 'imap_idle', 'imap_list_subscribed', 'imap_passive', 'imap_peek', 'imap_qresync',
|
||||
\ 'imap_rfc5161', 'imap_servernoise', 'implicit_autoview', 'include_encrypted',
|
||||
\ 'include_onlyfirst', 'keep_flagged', 'mailcap_sanitize', 'maildir_check_cur',
|
||||
\ 'maildir_header_cache_verify', 'maildir_trash', 'mail_check_recent', 'mail_check_stats',
|
||||
\ 'markers', 'mark_old', 'menu_move_off', 'menu_scroll', 'message_cache_clean', 'meta_key',
|
||||
\ 'metoo', 'mh_purge', 'mime_forward_decode', 'mime_subject', 'mime_type_query_first',
|
||||
\ 'narrow_tree', 'nm_record', 'nntp_listgroup', 'nntp_load_description', 'pager_stop',
|
||||
\ 'pgp_autoinline', 'pgp_auto_decode', 'pgp_check_exit', 'pgp_check_gpg_decrypt_status_fd',
|
||||
\ 'pgp_ignore_subkeys', 'pgp_long_ids', 'pgp_replyinline', 'pgp_retainable_sigs',
|
||||
\ 'imap_rfc5161', 'imap_server_noise', 'implicit_autoview', 'include_encrypted',
|
||||
\ 'include_only_first', 'keep_flagged', 'local_date_header', 'mailcap_sanitize',
|
||||
\ 'maildir_check_cur', 'maildir_header_cache_verify', 'maildir_trash', 'mail_check_recent',
|
||||
\ 'mail_check_stats', 'markers', 'mark_old', 'menu_move_off', 'menu_scroll',
|
||||
\ 'message_cache_clean', 'meta_key', 'me_too', 'mh_purge', 'mime_forward_decode',
|
||||
\ 'mime_type_query_first', 'narrow_tree', 'nm_query_window_enable', 'nm_record',
|
||||
\ 'nntp_listgroup', 'nntp_load_description', 'pager_stop', 'pgp_auto_decode',
|
||||
\ 'pgp_auto_inline', 'pgp_check_exit', 'pgp_check_gpg_decrypt_status_fd',
|
||||
\ 'pgp_ignore_subkeys', 'pgp_long_ids', 'pgp_reply_inline', 'pgp_retainable_sigs',
|
||||
\ 'pgp_self_encrypt', 'pgp_show_unusable', 'pgp_strict_enc', 'pgp_use_gpg_agent',
|
||||
\ 'pipe_decode', 'pipe_split', 'pop_auth_try_all', 'pop_last', 'postpone_encrypt',
|
||||
\ 'print_decode', 'print_split', 'prompt_after', 'read_only', 'reflow_space_quotes',
|
||||
\ 'reflow_text', 'reply_self', 'reply_with_xorig', 'resolve', 'resume_draft_files',
|
||||
\ 'resume_edited_draft_files', 'reverse_alias', 'reverse_name', 'reverse_realname',
|
||||
\ 'rfc2047_parameters', 'save_address', 'save_empty', 'save_name', 'save_unsubscribed',
|
||||
\ 'score', 'show_new_news', 'show_only_unread', 'sidebar_folder_indent',
|
||||
\ 'sidebar_new_mail_only', 'sidebar_next_new_wrap', 'sidebar_non_empty_mailbox_only',
|
||||
\ 'sidebar_on_right', 'sidebar_short_path', 'sidebar_visible', 'sig_dashes', 'sig_on_top',
|
||||
\ 'size_show_bytes', 'size_show_fractions', 'size_show_mb', 'size_units_on_left',
|
||||
\ 'smart_wrap', 'smime_ask_cert_label', 'smime_decrypt_use_default_key', 'smime_is_default',
|
||||
\ 'smime_self_encrypt', 'sort_re', 'ssl_force_tls', 'ssl_usesystemcerts', 'ssl_use_sslv2',
|
||||
\ 'ssl_use_sslv3', 'ssl_use_tlsv1', 'ssl_use_tlsv1_1', 'ssl_use_tlsv1_2', 'ssl_use_tlsv1_3',
|
||||
\ 'pipe_decode', 'pipe_decode_weed', 'pipe_split', 'pop_auth_try_all', 'pop_last',
|
||||
\ 'postpone_encrypt', 'print_decode', 'print_decode_weed', 'print_split', 'prompt_after',
|
||||
\ 'read_only', 'reflow_space_quotes', 'reflow_text', 'reply_self', 'reply_with_xorig',
|
||||
\ 'resolve', 'resume_draft_files', 'resume_edited_draft_files', 'reverse_alias',
|
||||
\ 'reverse_name', 'reverse_real_name', 'rfc2047_parameters', 'save_address', 'save_empty',
|
||||
\ 'save_name', 'save_unsubscribed', 'score', 'show_new_news', 'show_only_unread',
|
||||
\ 'sidebar_folder_indent', 'sidebar_new_mail_only', 'sidebar_next_new_wrap',
|
||||
\ 'sidebar_non_empty_mailbox_only', 'sidebar_on_right', 'sidebar_short_path',
|
||||
\ 'sidebar_visible', 'sig_dashes', 'sig_on_top', 'size_show_bytes', 'size_show_fractions',
|
||||
\ 'size_show_mb', 'size_units_on_left', 'smart_wrap', 'smime_ask_cert_label',
|
||||
\ 'smime_decrypt_use_default_key', 'smime_is_default', 'smime_self_encrypt', 'sort_re',
|
||||
\ 'ssl_force_tls', 'ssl_use_sslv2', 'ssl_use_sslv3', 'ssl_use_system_certs',
|
||||
\ 'ssl_use_tlsv1', 'ssl_use_tlsv1_1', 'ssl_use_tlsv1_2', 'ssl_use_tlsv1_3',
|
||||
\ 'ssl_verify_dates', 'ssl_verify_host', 'ssl_verify_partial_chains', 'status_on_top',
|
||||
\ 'strict_threads', 'suspend', 'text_flowed', 'thorough_search', 'thread_received', 'tilde',
|
||||
\ 'ts_enabled', 'uncollapse_jump', 'uncollapse_new', 'user_agent', 'use_8bitmime',
|
||||
\ 'use_domain', 'use_envelope_from', 'use_from', 'use_ipv6', 'virtual_spoolfile',
|
||||
\ 'wait_key', 'weed', 'wrap_search', 'write_bcc', 'x_comment_to'
|
||||
\ 'ts_enabled', 'tunnel_is_secure', 'uncollapse_jump', 'uncollapse_new', 'user_agent',
|
||||
\ 'use_8bit_mime', 'use_domain', 'use_envelope_from', 'use_from', 'use_ipv6',
|
||||
\ 'virtual_spool_file', 'wait_key', 'weed', 'wrap_search', 'write_bcc', 'x_comment_to'
|
||||
\ ], 0)
|
||||
|
||||
" CHECKED 2020-06-21
|
||||
" CHECKED 2022-04-08
|
||||
" Deprecated Bools
|
||||
" List of DT_SYNONYM or DT_DEPRECATED Bools in MuttVars in mutt_config.c
|
||||
call s:boolQuadGen('Bool', [
|
||||
\ 'edit_hdrs', 'envelope_from', 'forw_decode', 'forw_decrypt', 'forw_quote',
|
||||
\ 'header_cache_compress', 'ignore_linear_white_space', 'pgp_autoencrypt', 'pgp_autosign',
|
||||
\ 'pgp_auto_traditional', 'pgp_create_traditional', 'pgp_replyencrypt', 'pgp_replysign',
|
||||
\ 'pgp_replysignencrypted', 'xterm_set_titles'
|
||||
\ 'askbcc', 'askcc', 'autoedit', 'confirmappend', 'confirmcreate', 'crypt_autoencrypt',
|
||||
\ 'crypt_autopgp', 'crypt_autosign', 'crypt_autosmime', 'crypt_confirmhook',
|
||||
\ 'crypt_replyencrypt', 'crypt_replysign', 'crypt_replysignencrypted', 'edit_hdrs',
|
||||
\ 'envelope_from', 'forw_decode', 'forw_decrypt', 'forw_quote', 'header_cache_compress',
|
||||
\ 'ignore_linear_white_space', 'imap_servernoise', 'include_onlyfirst', 'metoo',
|
||||
\ 'mime_subject', 'pgp_autoencrypt', 'pgp_autoinline', 'pgp_autosign',
|
||||
\ 'pgp_auto_traditional', 'pgp_create_traditional', 'pgp_replyencrypt', 'pgp_replyinline',
|
||||
\ 'pgp_replysign', 'pgp_replysignencrypted', 'reverse_realname', 'ssl_usesystemcerts',
|
||||
\ 'use_8bitmime', 'virtual_spoolfile', 'xterm_set_titles'
|
||||
\ ], 1)
|
||||
|
||||
" CHECKED 2020-06-21
|
||||
" CHECKED 2022-04-08
|
||||
" List of DT_QUAD in MuttVars in mutt_config.c
|
||||
call s:boolQuadGen('Quad', [
|
||||
\ 'abort_noattach', 'abort_nosubject', 'abort_unmodified', 'bounce', 'catchup_newsgroup',
|
||||
@@ -481,31 +494,32 @@ call s:boolQuadGen('Quad', [
|
||||
\ 'post_moderated', 'print', 'quit', 'recall', 'reply_to', 'ssl_starttls',
|
||||
\ ], 0)
|
||||
|
||||
" CHECKED 2020-06-21
|
||||
" CHECKED 2022-04-08
|
||||
" Deprecated Quads
|
||||
" List of DT_SYNONYM or DT_DEPRECATED Quads in MuttVars in mutt_config.c
|
||||
call s:boolQuadGen('Quad', [
|
||||
\ 'mime_fwd', 'pgp_encrypt_self', 'pgp_verify_sig', 'smime_encrypt_self'
|
||||
\ ], 1)
|
||||
|
||||
" CHECKED 2020-06-21
|
||||
" CHECKED 2022-04-08
|
||||
" List of DT_NUMBER or DT_LONG in MuttVars in mutt_config.c
|
||||
syntax keyword muttrcVarNum skipwhite contained
|
||||
\ connect_timeout debug_level header_cache_compress_level history
|
||||
\ imap_fetch_chunk_size imap_keepalive imap_pipeline_depth imap_poll_timeout mail_check
|
||||
\ mail_check_stats_interval menu_context net_inc nm_db_limit nm_open_timeout
|
||||
\ nm_query_window_current_position nm_query_window_duration nntp_context nntp_poll
|
||||
\ pager_context pager_index_lines pgp_timeout pop_checkinterval read_inc reflow_wrap
|
||||
\ save_history score_threshold_delete score_threshold_flag score_threshold_read
|
||||
\ search_context sendmail_wait sidebar_component_depth sidebar_width skip_quoted_offset
|
||||
\ sleep_time smime_timeout ssl_min_dh_prime_bits timeout time_inc toggle_quoted_show_levels
|
||||
\ wrap wrap_headers write_inc
|
||||
\ connect_timeout debug_level header_cache_compress_level history imap_fetch_chunk_size
|
||||
\ imap_keepalive imap_pipeline_depth imap_poll_timeout mail_check mail_check_stats_interval
|
||||
\ menu_context net_inc nm_db_limit nm_open_timeout nm_query_window_current_position
|
||||
\ nm_query_window_duration nntp_context nntp_poll pager_context pager_index_lines
|
||||
\ pager_read_delay pager_skip_quoted_context pgp_timeout pop_check_interval read_inc
|
||||
\ reflow_wrap save_history score_threshold_delete score_threshold_flag score_threshold_read
|
||||
\ search_context sendmail_wait sidebar_component_depth sidebar_width sleep_time
|
||||
\ smime_timeout ssl_min_dh_prime_bits timeout time_inc toggle_quoted_show_levels wrap
|
||||
\ wrap_headers write_inc
|
||||
\ nextgroup=muttrcSetNumAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
" CHECKED 2022-04-08
|
||||
" Deprecated Numbers
|
||||
syntax keyword muttrcVarDeprecatedNum contained skipwhite
|
||||
\ header_cache_pagesize wrapmargin
|
||||
\ nextgroup=muttrcSetNumAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
\ header_cache_pagesize pop_checkinterval skip_quoted_offset
|
||||
|
||||
" CHECKED 2020-06-21
|
||||
" CHECKED 2022-04-08
|
||||
" List of DT_STRING in MuttVars in mutt_config.c
|
||||
" Special cases first, and all the rest at the end
|
||||
" Formats themselves must be updated in their respective groups
|
||||
@@ -517,19 +531,19 @@ syntax keyword muttrcVarStr contained skipwhite compose_format nextgroup=muttrcV
|
||||
syntax keyword muttrcVarStr contained skipwhite folder_format vfolder_format nextgroup=muttrcVarEqualsFolderFmt
|
||||
syntax keyword muttrcVarStr contained skipwhite attribution forward_format index_format message_format pager_format nextgroup=muttrcVarEqualsIdxFmt
|
||||
syntax keyword muttrcVarStr contained skipwhite mix_entry_format nextgroup=muttrcVarEqualsMixFmt
|
||||
syntax keyword muttrcVarStr contained skipwhite pattern_format nextgroup=muttrcVarEqualsPatternFmt
|
||||
syntax keyword muttrcVarStr contained skipwhite
|
||||
\ pgp_clearsign_command pgp_decode_command pgp_decrypt_command
|
||||
\ pgp_encrypt_only_command pgp_encrypt_sign_command pgp_export_command pgp_getkeys_command
|
||||
\ pgp_import_command pgp_list_pubring_command pgp_list_secring_command
|
||||
\ pgp_sign_command pgp_verify_command pgp_verify_key_command
|
||||
\ pgp_clear_sign_command pgp_decode_command pgp_decrypt_command pgp_encrypt_only_command
|
||||
\ pgp_encrypt_sign_command pgp_export_command pgp_get_keys_command pgp_import_command
|
||||
\ pgp_list_pubring_command pgp_list_secring_command pgp_sign_command pgp_verify_command
|
||||
\ pgp_verify_key_command
|
||||
\ nextgroup=muttrcVarEqualsPGPCmdFmt
|
||||
syntax keyword muttrcVarStr contained skipwhite pgp_entry_format nextgroup=muttrcVarEqualsPGPFmt
|
||||
syntax keyword muttrcVarStr contained skipwhite query_format nextgroup=muttrcVarEqualsQueryFmt
|
||||
syntax keyword muttrcVarStr contained skipwhite
|
||||
\ smime_decrypt_command smime_encrypt_command smime_get_cert_command
|
||||
\ smime_get_cert_email_command smime_get_signer_cert_command
|
||||
\ smime_import_cert_command smime_pk7out_command smime_sign_command
|
||||
\ smime_verify_command smime_verify_opaque_command
|
||||
\ smime_get_cert_email_command smime_get_signer_cert_command smime_import_cert_command
|
||||
\ smime_pk7out_command smime_sign_command smime_verify_command smime_verify_opaque_command
|
||||
\ nextgroup=muttrcVarEqualsSmimeFmt
|
||||
syntax keyword muttrcVarStr contained skipwhite status_format ts_icon_format ts_status_format nextgroup=muttrcVarEqualsStatusFmt
|
||||
syntax keyword muttrcVarStr contained skipwhite date_format nextgroup=muttrcVarEqualsStrftimeFmt
|
||||
@@ -538,64 +552,66 @@ syntax keyword muttrcVarStr contained skipwhite sidebar_format nextgroup=muttrcV
|
||||
syntax keyword muttrcVarStr contained skipwhite
|
||||
\ abort_key arrow_string assumed_charset attach_charset attach_sep attribution_locale
|
||||
\ autocrypt_acct_format charset config_charset content_type crypt_protected_headers_subject
|
||||
\ default_hook dsn_notify dsn_return empty_subject escape forward_attribution_intro
|
||||
\ forward_attribution_trailer header_cache_backend header_cache_compress_method hidden_tags
|
||||
\ hostname imap_authenticators imap_delim_chars imap_headers imap_login imap_pass imap_user
|
||||
\ indent_string mailcap_path mark_macro_prefix mh_seq_flagged mh_seq_replied mh_seq_unseen
|
||||
\ newsgroups_charset news_server nm_default_url nm_exclude_tags nm_flagged_tag nm_query_type
|
||||
\ nm_query_window_current_search nm_query_window_timebase nm_record_tags nm_replied_tag
|
||||
\ nm_unread_tag nntp_authenticators nntp_pass nntp_user pgp_default_key pgp_sign_as pipe_sep
|
||||
\ pop_authenticators pop_host pop_pass pop_user postpone_encrypt_as post_indent_string
|
||||
\ preconnect preferred_languages realname send_charset show_multipart_alternative
|
||||
\ sidebar_delim_chars sidebar_divider_char sidebar_indent_string simple_search
|
||||
\ smime_default_key smime_encrypt_with smime_sign_as smime_sign_digest_alg
|
||||
\ smtp_authenticators smtp_pass smtp_url smtp_user spam_separator ssl_ciphers
|
||||
\ default_hook dsn_notify dsn_return empty_subject forward_attribution_intro
|
||||
\ forward_attribution_trailer greeting header_cache_backend header_cache_compress_method
|
||||
\ hidden_tags hostname imap_authenticators imap_delim_chars imap_headers imap_login
|
||||
\ imap_pass imap_user indent_string mailcap_path mark_macro_prefix mh_seq_flagged
|
||||
\ mh_seq_replied mh_seq_unseen newsgroups_charset news_server nm_default_url nm_exclude_tags
|
||||
\ nm_flagged_tag nm_query_type nm_query_window_current_search nm_query_window_or_terms
|
||||
\ nm_query_window_timebase nm_record_tags nm_replied_tag nm_unread_tag nntp_authenticators
|
||||
\ nntp_pass nntp_user pgp_default_key pgp_sign_as pipe_sep pop_authenticators pop_host
|
||||
\ pop_pass pop_user postpone_encrypt_as post_indent_string preconnect preferred_languages
|
||||
\ real_name send_charset show_multipart_alternative sidebar_delim_chars sidebar_divider_char
|
||||
\ sidebar_indent_string simple_search smime_default_key smime_encrypt_with smime_sign_as
|
||||
\ smime_sign_digest_alg smtp_authenticators smtp_pass smtp_url smtp_user spam_separator
|
||||
\ ssl_ciphers
|
||||
\ nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
|
||||
" Deprecated strings
|
||||
syntax keyword muttrcVarDeprecatedStr
|
||||
\ abort_noattach_regexp attach_keyword forw_format hdr_format indent_str msg_format
|
||||
\ nm_default_uri pgp_self_encrypt_as post_indent_str print_cmd quote_regexp reply_regexp
|
||||
\ smime_self_encrypt_as xterm_icon xterm_title
|
||||
\ abort_noattach_regexp attach_keyword escape forw_format hdr_format indent_str msg_format
|
||||
\ nm_default_uri pgp_clearsign_command pgp_getkeys_command pgp_self_encrypt_as
|
||||
\ post_indent_str print_cmd quote_regexp realname reply_regexp smime_self_encrypt_as
|
||||
\ spoolfile visual xterm_icon xterm_title
|
||||
|
||||
" CHECKED 2020-06-21
|
||||
" CHECKED 2022-04-08
|
||||
" List of DT_ADDRESS
|
||||
syntax keyword muttrcVarStr contained skipwhite envelope_from_address from nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
" List of DT_ENUM
|
||||
syntax keyword muttrcVarStr contained skipwhite mbox_type nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
syntax keyword muttrcVarStr contained skipwhite mbox_type use_threads nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
" List of DT_MBTABLE
|
||||
syntax keyword muttrcVarStr contained skipwhite crypt_chars flag_chars from_chars status_chars to_chars nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
|
||||
" CHECKED 2020-06-21
|
||||
" List of DT_PATH
|
||||
" CHECKED 2022-04-08
|
||||
" List of DT_PATH or DT_MAILBOX
|
||||
syntax keyword muttrcVarStr contained skipwhite
|
||||
\ alias_file attach_save_dir autocrypt_dir certificate_file debug_file
|
||||
\ entropy_file folder header_cache history_file mbox message_cachedir newsrc
|
||||
\ news_cache_dir postponed record signature smime_ca_location
|
||||
\ smime_certificates smime_keys spoolfile ssl_ca_certificates_file
|
||||
\ ssl_client_cert tmpdir trash
|
||||
\ smime_certificates smime_keys spool_file ssl_ca_certificates_file ssl_client_cert
|
||||
\ tmpdir trash
|
||||
\ nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
" List of DT_COMMAND (excluding pgp_*_command and smime_*_command)
|
||||
syntax keyword muttrcVarStr contained skipwhite
|
||||
\ display_filter editor inews ispell mixmaster new_mail_command pager
|
||||
\ print_command query_command sendmail shell visual external_search_command
|
||||
\ print_command query_command sendmail shell external_search_command
|
||||
\ imap_oauth_refresh_command pop_oauth_refresh_command
|
||||
\ mime_type_query_command smtp_oauth_refresh_command tunnel
|
||||
\ nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
|
||||
" CHECKED 2020-06-21
|
||||
" CHECKED 2022-04-08
|
||||
" List of DT_REGEX
|
||||
syntax keyword muttrcVarStr contained skipwhite
|
||||
\ abort_noattach_regex gecos_mask mask pgp_decryption_okay pgp_good_sign
|
||||
\ quote_regex reply_regex smileys
|
||||
\ abort_noattach_regex gecos_mask mask pgp_decryption_okay pgp_good_sign quote_regex
|
||||
\ reply_regex smileys
|
||||
\ nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
" List of DT_SORT
|
||||
syntax keyword muttrcVarStr contained skipwhite
|
||||
\ pgp_sort_keys sidebar_sort_method sort sort_alias sort_aux sort_browser
|
||||
\ nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
|
||||
|
||||
" CHECKED 2020-06-21
|
||||
" List of commands in Commands in mutt_config.c
|
||||
" CHECKED 2022-04-08
|
||||
" List of commands in mutt_commands in mutt_commands.c
|
||||
" Remember to remove hooks, they have already been dealt with
|
||||
syntax keyword muttrcCommand skipwhite alias nextgroup=muttrcAliasGroupDef,muttrcAliasKey,muttrcAliasNL
|
||||
syntax keyword muttrcCommand skipwhite bind nextgroup=muttrcBindMenuList,muttrcBindMenuListNL
|
||||
@@ -607,14 +623,12 @@ syntax keyword muttrcCommand skipwhite spam nextgroup=muttrcSpamPattern
|
||||
syntax keyword muttrcCommand skipwhite unalias nextgroup=muttrcUnAliasKey,muttrcUnAliasNL
|
||||
syntax keyword muttrcCommand skipwhite unhook nextgroup=muttrcHooks
|
||||
syntax keyword muttrcCommand skipwhite
|
||||
\ alternative_order attachments auto_view finish hdr_order ifdef ifndef
|
||||
\ ignore lua lua-source mailboxes mailto_allow mime_lookup my_hdr push score
|
||||
\ setenv sidebar_whitelist source subjectrx subscribe-to tag-formats
|
||||
\ tag-transforms unalternative_order unattachments unauto_view uncolor
|
||||
\ unhdr_order unignore unmailboxes unmailto_allow unmime_lookup unmono
|
||||
\ unmy_hdr unscore unsetenv unsidebar_whitelist unsubjectrx unsubscribe-from
|
||||
\ unvirtual-mailboxes virtual-mailboxes named-mailboxes
|
||||
\ echo unbind unmacro
|
||||
\ alternative_order attachments auto_view cd echo finish hdr_order ifdef ifndef ignore lua
|
||||
\ lua-source mailboxes mailto_allow mime_lookup my_hdr named-mailboxes push score setenv
|
||||
\ sidebar_whitelist source subjectrx subscribe-to tag-formats tag-transforms
|
||||
\ unalternative_order unattachments unauto_view unbind uncolor unhdr_order unignore unmacro
|
||||
\ unmailboxes unmailto_allow unmime_lookup unmono unmy_hdr unscore unsetenv
|
||||
\ unsidebar_whitelist unsubjectrx unsubscribe-from unvirtual-mailboxes virtual-mailboxes
|
||||
|
||||
function! s:genFunctions(functions)
|
||||
for f in a:functions
|
||||
@@ -622,66 +636,68 @@ function! s:genFunctions(functions)
|
||||
endfor
|
||||
endfunction
|
||||
|
||||
" CHECKED 2020-06-21
|
||||
" CHECKED 2022-04-08
|
||||
" List of functions in functions.c
|
||||
" Note: 'noop' is included but is elsewhere in the source
|
||||
call s:genFunctions(['noop',
|
||||
\ 'accept', 'append', 'attach-file', 'attach-key', 'attach-message', 'attach-news-message',
|
||||
\ 'autocrypt-acct-menu', 'autocrypt-menu', 'backspace', 'backward-char', 'backward-word',
|
||||
\ 'bol', 'bottom-page', 'bottom', 'bounce-message', 'break-thread', 'buffy-cycle',
|
||||
\ 'buffy-list', 'capitalize-word', 'catchup', 'chain-next', 'chain-prev', 'change-dir',
|
||||
\ 'change-folder-readonly', 'change-folder', 'change-newsgroup-readonly',
|
||||
\ 'change-newsgroup', 'change-vfolder', 'check-new', 'check-stats',
|
||||
\ 'accept', 'alias-dialog', 'append', 'attach-file', 'attach-key', 'attach-message',
|
||||
\ 'attach-news-message', 'autocrypt-acct-menu', 'autocrypt-menu', 'backspace',
|
||||
\ 'backward-char', 'backward-word', 'bol', 'bottom', 'bottom-page', 'bounce-message',
|
||||
\ 'break-thread', 'buffy-cycle', 'buffy-list', 'capitalize-word', 'catchup', 'chain-next',
|
||||
\ 'chain-prev', 'change-dir', 'change-folder', 'change-folder-readonly', 'change-newsgroup',
|
||||
\ 'change-newsgroup-readonly', 'change-vfolder', 'check-new', 'check-stats',
|
||||
\ 'check-traditional-pgp', 'clear-flag', 'collapse-all', 'collapse-parts',
|
||||
\ 'collapse-thread', 'complete-query', 'complete', 'compose-to-sender', 'copy-file',
|
||||
\ 'collapse-thread', 'complete', 'complete-query', 'compose-to-sender', 'copy-file',
|
||||
\ 'copy-message', 'create-account', 'create-alias', 'create-mailbox', 'current-bottom',
|
||||
\ 'current-middle', 'current-top', 'decode-copy', 'decode-save', 'decrypt-copy',
|
||||
\ 'decrypt-save', 'delete-account', 'delete-char', 'delete-entry', 'delete-mailbox',
|
||||
\ 'delete-message', 'delete-pattern', 'delete-subthread', 'delete-thread', 'delete',
|
||||
\ 'decrypt-save', 'delete', 'delete-account', 'delete-char', 'delete-entry',
|
||||
\ 'delete-mailbox', 'delete-message', 'delete-pattern', 'delete-subthread', 'delete-thread',
|
||||
\ 'descend-directory', 'detach-file', 'display-address', 'display-filename',
|
||||
\ 'display-message', 'display-toggle-weed', 'downcase-word', 'edit-bcc', 'edit-cc',
|
||||
\ 'edit-description', 'edit-encoding', 'edit-fcc', 'edit-file', 'edit-followup-to',
|
||||
\ 'edit-from', 'edit-headers', 'edit-label', 'edit-language', 'edit-message', 'edit-mime',
|
||||
\ 'edit-newsgroups', 'edit-or-view-raw-message', 'edit-raw-message', 'edit-reply-to',
|
||||
\ 'edit-subject', 'edit-to', 'edit-type', 'edit-x-comment-to', 'edit', 'end-cond',
|
||||
\ 'enter-command', 'enter-mask', 'entire-thread', 'eol', 'exit', 'extract-keys',
|
||||
\ 'fetch-mail', 'filter-entry', 'first-entry', 'flag-message', 'followup-message',
|
||||
\ 'forget-passphrase', 'forward-char', 'forward-message', 'forward-to-group',
|
||||
\ 'forward-word', 'get-attachment', 'get-children', 'get-message', 'get-parent',
|
||||
\ 'goto-folder', 'goto-parent', 'group-alternatives', 'group-chat-reply',
|
||||
\ 'group-multilingual', 'group-reply', 'half-down', 'half-up', 'help', 'history-down',
|
||||
\ 'history-search', 'history-up', 'imap-fetch-mail', 'imap-logout-all', 'insert', 'ispell',
|
||||
\ 'jump', 'kill-eol', 'kill-eow', 'kill-line', 'kill-word', 'last-entry',
|
||||
\ 'limit-current-thread', 'limit', 'link-threads', 'list-reply', 'mail-key',
|
||||
\ 'mailbox-cycle', 'mailbox-list', 'mail', 'mark-as-new', 'mark-message', 'middle-page',
|
||||
\ 'mix', 'modify-labels-then-hide', 'modify-labels', 'modify-tags-then-hide',
|
||||
\ 'modify-tags', 'move-down', 'move-up', 'new-mime', 'next-entry', 'next-line',
|
||||
\ 'next-new-then-unread', 'next-new', 'next-page', 'next-subthread', 'next-thread',
|
||||
\ 'next-undeleted', 'next-unread-mailbox', 'next-unread', 'parent-message', 'pgp-menu',
|
||||
\ 'pipe-entry', 'pipe-message', 'post-message', 'postpone-message', 'previous-entry',
|
||||
\ 'previous-line', 'previous-new-then-unread', 'previous-new', 'previous-page',
|
||||
\ 'previous-subthread', 'previous-thread', 'previous-undeleted', 'previous-unread',
|
||||
\ 'print-entry', 'print-message', 'purge-message', 'purge-thread', 'quasi-delete',
|
||||
\ 'query-append', 'query', 'quit', 'quote-char', 'read-subthread', 'read-thread',
|
||||
\ 'recall-message', 'reconstruct-thread', 'redraw-screen', 'refresh', 'reload-active',
|
||||
\ 'rename-attachment', 'rename-file', 'rename-mailbox', 'reply', 'resend-message',
|
||||
\ 'root-message', 'save-entry', 'save-message', 'search-next', 'search-opposite',
|
||||
\ 'search-reverse', 'search-toggle', 'search', 'select-entry', 'select-new',
|
||||
\ 'display-message', 'display-toggle-weed', 'downcase-word', 'edit', 'edit-bcc', 'edit-cc',
|
||||
\ 'edit-content-id', 'edit-description', 'edit-encoding', 'edit-fcc', 'edit-file',
|
||||
\ 'edit-followup-to', 'edit-from', 'edit-headers', 'edit-label', 'edit-language',
|
||||
\ 'edit-message', 'edit-mime', 'edit-newsgroups', 'edit-or-view-raw-message',
|
||||
\ 'edit-raw-message', 'edit-reply-to', 'edit-subject', 'edit-to', 'edit-type',
|
||||
\ 'edit-x-comment-to', 'end-cond', 'enter-command', 'enter-mask', 'entire-thread', 'eol',
|
||||
\ 'error-history', 'exit', 'extract-keys', 'fetch-mail', 'filter-entry', 'first-entry',
|
||||
\ 'flag-message', 'followup-message', 'forget-passphrase', 'forward-char',
|
||||
\ 'forward-message', 'forward-to-group', 'forward-word', 'get-attachment', 'get-children',
|
||||
\ 'get-message', 'get-parent', 'goto-folder', 'goto-parent', 'group-alternatives',
|
||||
\ 'group-chat-reply', 'group-multilingual', 'group-related', 'group-reply', 'half-down',
|
||||
\ 'half-up', 'help', 'history-down', 'history-search', 'history-up', 'imap-fetch-mail',
|
||||
\ 'imap-logout-all', 'insert', 'ispell', 'jump', 'kill-eol', 'kill-eow', 'kill-line',
|
||||
\ 'kill-word', 'last-entry', 'limit', 'limit-current-thread', 'link-threads', 'list-reply',
|
||||
\ 'list-subscribe', 'list-unsubscribe', 'mail', 'mail-key', 'mailbox-cycle', 'mailbox-list',
|
||||
\ 'mark-as-new', 'mark-message', 'middle-page', 'mix', 'modify-labels',
|
||||
\ 'modify-labels-then-hide', 'modify-tags', 'modify-tags-then-hide', 'move-down', 'move-up',
|
||||
\ 'new-mime', 'next-entry', 'next-line', 'next-new', 'next-new-then-unread', 'next-page',
|
||||
\ 'next-subthread', 'next-thread', 'next-undeleted', 'next-unread', 'next-unread-mailbox',
|
||||
\ 'parent-message', 'pgp-menu', 'pipe-entry', 'pipe-message', 'post-message',
|
||||
\ 'postpone-message', 'previous-entry', 'previous-line', 'previous-new',
|
||||
\ 'previous-new-then-unread', 'previous-page', 'previous-subthread', 'previous-thread',
|
||||
\ 'previous-undeleted', 'previous-unread', 'print-entry', 'print-message', 'purge-message',
|
||||
\ 'purge-thread', 'quasi-delete', 'query', 'query-append', 'quit', 'quote-char',
|
||||
\ 'read-subthread', 'read-thread', 'recall-message', 'reconstruct-thread', 'redraw-screen',
|
||||
\ 'refresh', 'reload-active', 'rename-attachment', 'rename-file', 'rename-mailbox', 'reply',
|
||||
\ 'resend-message', 'root-message', 'save-entry', 'save-message', 'search', 'search-next',
|
||||
\ 'search-opposite', 'search-reverse', 'search-toggle', 'select-entry', 'select-new',
|
||||
\ 'send-message', 'set-flag', 'shell-escape', 'show-limit', 'show-log-messages',
|
||||
\ 'show-version', 'sidebar-next-new', 'sidebar-first', 'sidebar-last', 'sidebar-next',
|
||||
\ 'sidebar-open', 'sidebar-page-down', 'sidebar-page-up', 'sidebar-prev-new',
|
||||
\ 'sidebar-prev', 'sidebar-toggle-virtual', 'sidebar-toggle-visible', 'skip-quoted',
|
||||
\ 'smime-menu', 'sort-mailbox', 'sort-reverse', 'sort', 'subscribe-pattern',
|
||||
\ 'sync-mailbox', 'tag-entry', 'tag-message', 'tag-pattern', 'tag-prefix-cond',
|
||||
\ 'tag-prefix', 'tag-subthread', 'tag-thread', 'toggle-active', 'toggle-disposition',
|
||||
\ 'toggle-mailboxes', 'toggle-new', 'toggle-prefer-encrypt', 'toggle-quoted',
|
||||
\ 'toggle-read', 'toggle-recode', 'toggle-subscribed', 'toggle-unlink', 'toggle-write',
|
||||
\ 'top-page', 'top', 'transpose-chars', 'uncatchup', 'undelete-entry', 'undelete-message',
|
||||
\ 'undelete-pattern', 'undelete-subthread', 'undelete-thread', 'unsubscribe-pattern',
|
||||
\ 'untag-pattern', 'upcase-word', 'update-encoding', 'verify-key',
|
||||
\ 'vfolder-from-query-readonly', 'vfolder-from-query', 'vfolder-window-backward',
|
||||
\ 'vfolder-window-forward', 'view-attachments', 'view-attach', 'view-file', 'view-mailcap',
|
||||
\ 'view-name', 'view-raw-message', 'view-text', 'what-key', 'write-fcc'
|
||||
\ 'show-version', 'sidebar-first', 'sidebar-last', 'sidebar-next', 'sidebar-next-new',
|
||||
\ 'sidebar-open', 'sidebar-page-down', 'sidebar-page-up', 'sidebar-prev',
|
||||
\ 'sidebar-prev-new', 'sidebar-toggle-virtual', 'sidebar-toggle-visible', 'skip-headers',
|
||||
\ 'skip-quoted', 'smime-menu', 'sort', 'sort-alias', 'sort-alias-reverse', 'sort-mailbox',
|
||||
\ 'sort-reverse', 'subscribe', 'subscribe-pattern', 'sync-mailbox', 'tag-entry',
|
||||
\ 'tag-message', 'tag-pattern', 'tag-prefix', 'tag-prefix-cond', 'tag-subthread',
|
||||
\ 'tag-thread', 'toggle-active', 'toggle-disposition', 'toggle-mailboxes', 'toggle-new',
|
||||
\ 'toggle-prefer-encrypt', 'toggle-quoted', 'toggle-read', 'toggle-recode',
|
||||
\ 'toggle-subscribed', 'toggle-unlink', 'toggle-write', 'top', 'top-page',
|
||||
\ 'transpose-chars', 'uncatchup', 'undelete-entry', 'undelete-message', 'undelete-pattern',
|
||||
\ 'undelete-subthread', 'undelete-thread', 'ungroup-attachment', 'unsubscribe',
|
||||
\ 'unsubscribe-pattern', 'untag-pattern', 'upcase-word', 'update-encoding', 'verify-key',
|
||||
\ 'vfolder-from-query', 'vfolder-from-query-readonly', 'vfolder-window-backward',
|
||||
\ 'vfolder-window-forward', 'vfolder-window-reset', 'view-attach', 'view-attachments',
|
||||
\ 'view-file', 'view-mailcap', 'view-name', 'view-pager', 'view-raw-message', 'view-text',
|
||||
\ 'what-key', 'write-fcc'
|
||||
\ ])
|
||||
|
||||
" Define the default highlighting.
|
||||
@@ -758,6 +774,7 @@ highlight def link muttrcFolderFormatEscapes muttrcEscape
|
||||
highlight def link muttrcGroupIndexFormatEscapes muttrcEscape
|
||||
highlight def link muttrcIndexFormatEscapes muttrcEscape
|
||||
highlight def link muttrcMixFormatEscapes muttrcEscape
|
||||
highlight def link muttrcPatternFormatEscapes muttrcEscape
|
||||
highlight def link muttrcPGPCmdFormatEscapes muttrcEscape
|
||||
highlight def link muttrcPGPFormatEscapes muttrcEscape
|
||||
highlight def link muttrcPGPTimeEscapes muttrcEscape
|
||||
@@ -774,6 +791,7 @@ highlight def link muttrcComposeFormatConditionals muttrcFormatConditionals2
|
||||
highlight def link muttrcFolderFormatConditionals muttrcFormatConditionals2
|
||||
highlight def link muttrcIndexFormatConditionals muttrcFormatConditionals2
|
||||
highlight def link muttrcMixFormatConditionals muttrcFormatConditionals2
|
||||
highlight def link muttrcPatternFormatConditionals muttrcFormatConditionals2
|
||||
highlight def link muttrcPGPCmdFormatConditionals muttrcFormatConditionals2
|
||||
highlight def link muttrcPGPFormatConditionals muttrcFormatConditionals2
|
||||
highlight def link muttrcSmimeFormatConditionals muttrcFormatConditionals2
|
||||
@@ -789,6 +807,7 @@ highlight def link muttrcFolderFormatStr muttrcString
|
||||
highlight def link muttrcGroupIndexFormatStr muttrcString
|
||||
highlight def link muttrcIndexFormatStr muttrcString
|
||||
highlight def link muttrcMixFormatStr muttrcString
|
||||
highlight def link muttrcPatternFormatStr muttrcString
|
||||
highlight def link muttrcPGPCmdFormatStr muttrcString
|
||||
highlight def link muttrcPGPFormatStr muttrcString
|
||||
highlight def link muttrcQueryFormatStr muttrcString
|
||||
|
||||
129
runtime/syntax/openscad.vim
Normal file
129
runtime/syntax/openscad.vim
Normal file
@@ -0,0 +1,129 @@
|
||||
" Vim syntax file
|
||||
" Language: OpenSCAD
|
||||
" Maintainer: Niklas Adam <adam@oddodd.org>
|
||||
" Last change: 2022-04-15
|
||||
"
|
||||
"
|
||||
" From salkin-mada/openscad.nvim
|
||||
" Building on the work of Sirtaj Singh Kang and others for vim-openscad
|
||||
"
|
||||
|
||||
" quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syntax case ignore
|
||||
|
||||
setlocal iskeyword=a-z,A-Z,48-57,_
|
||||
|
||||
syn match openscadAoperator "{"
|
||||
syn match openscadAoperator "}"
|
||||
syn match openscadLi "\["
|
||||
syn match openscadLi "\]"
|
||||
syn match openscadPar "("
|
||||
syn match openscadPar ")"
|
||||
|
||||
syn match openscadSpecialVariable "\$[a-zA-Z_]\+\>" display
|
||||
syn match openscadModifier "^\s*[\*\!\#\%]" display
|
||||
|
||||
syn match openscadBinaryoperator "+"
|
||||
syn match openscadBinaryoperator "-"
|
||||
syn match openscadBinaryoperator "*"
|
||||
syn match openscadBinaryoperator "/"
|
||||
syn match openscadBinaryoperator "%"
|
||||
syn match openscadBinaryoperator "\*\*"
|
||||
syn match openscadBinaryoperator "<"
|
||||
syn match openscadBinaryoperator "<="
|
||||
syn match openscadBinaryoperator ">"
|
||||
syn match openscadBinaryoperator ">="
|
||||
syn match openscadBinaryoperator "="
|
||||
syn match openscadBinaryoperator "=="
|
||||
syn match openscadBinaryoperator "==="
|
||||
syn match openscadBinaryoperator "!="
|
||||
syn match openscadBinaryoperator "!=="
|
||||
syn match openscadBinaryoperator "&"
|
||||
syn match openscadBinaryoperator "|"
|
||||
syn match openscadBinaryoperator "<!"
|
||||
syn match openscadBinaryoperator "?"
|
||||
syn match openscadBinaryoperator "??"
|
||||
syn match openscadBinaryoperator "!?"
|
||||
syn match openscadBinaryoperator "!"
|
||||
syn match openscadBinaryoperator "#"
|
||||
syn match openscadBinaryoperator "_"
|
||||
syn match openscadBinaryoperator "\.\."
|
||||
syn match openscadBinaryoperator "\.\.\."
|
||||
syn match openscadBinaryoperator "`"
|
||||
syn match openscadBinaryoperator ":"
|
||||
|
||||
syn keyword openscadFunctionDef function nextgroup=openscadFunction skipwhite skipempty
|
||||
syn match openscadFunction /\<\h\w*\>/ contained display
|
||||
|
||||
syn keyword openscadModuleDef module nextgroup=openscadModule skipwhite skipempty
|
||||
syn match openscadModule /\<\h\w*\>/ contained display
|
||||
|
||||
syn keyword openscadStatement echo assign let assert
|
||||
syn keyword openscadConditional if else
|
||||
syn keyword openscadRepeat for intersection_for
|
||||
syn keyword openscadInclude include use
|
||||
syn keyword openscadCsgKeyword union difference intersection render intersection_for
|
||||
syn keyword openscadTransform scale rotate translate resize mirror multmatrix color minkowski hull projection linear_extrude rotate_extrude offset
|
||||
syn keyword openscadPrimitiveSolid cube sphere cylinder polyhedron surface
|
||||
syn keyword openscadPrimitive2D square circle polygon import_dxf text
|
||||
syn keyword openscadPrimitiveImport import child children
|
||||
|
||||
syn match openscadNumbers "\<\d\|\.\d" contains=openscadNumber display transparent
|
||||
syn match openscadNumber "\d\+" display contained
|
||||
syn match openscadNumber "\.\d\+" display contained
|
||||
|
||||
syn region openscadString start=/"/ skip=/\\"/ end=/"/
|
||||
|
||||
syn keyword openscadBoolean true false
|
||||
|
||||
syn keyword openscadCommentTodo TODO FIXME XXX NOTE contained display
|
||||
syn match openscadInlineComment ://.*$: contains=openscadCommentTodo
|
||||
syn region openscadBlockComment start=:/\*: end=:\*/: fold contains=openscadCommentTodo
|
||||
|
||||
syn region openscadBlock start="{" end="}" transparent fold
|
||||
syn region openscadVector start="\[" end="\]" transparent fold
|
||||
|
||||
syn keyword openscadBuiltin abs acos asin atan atan2 ceil cos exp floor ln log
|
||||
syn keyword openscadBuiltin lookup max min pow rands round sign sin sqrt tan
|
||||
syn keyword openscadBuiltin str len search version version_num concat chr ord cross norm
|
||||
syn keyword openscadBuiltin parent_module
|
||||
syn keyword openscadBuiltin dxf_cross dxf_dim
|
||||
syn keyword openscadBuiltinSpecial PI undef
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""
|
||||
" linkage
|
||||
"""""""""""""""""""""""""""""""""""""""""
|
||||
hi def link openscadFunctionDef Structure
|
||||
hi def link openscadAoperator Function
|
||||
hi def link openscadLi Function
|
||||
" hi def link openscadPar Structure
|
||||
hi def link openscadBuiltinSpecial Special
|
||||
hi def link openscadBinaryoperator Special
|
||||
hi def link openscadFunction Function
|
||||
hi def link openscadModuleDef Structure
|
||||
hi def link openscadModule Function
|
||||
hi def link openscadBlockComment Comment
|
||||
hi def link openscadBoolean Boolean
|
||||
hi def link openscadBuiltin Function
|
||||
hi def link openscadConditional Conditional
|
||||
hi def link openscadCsgKeyword Structure
|
||||
hi def link openscadInclude Include
|
||||
hi def link openscadInlineComment Comment
|
||||
hi def link openscadModifier Special
|
||||
hi def link openscadStatement Statement
|
||||
hi def link openscadNumbers Number
|
||||
hi def link openscadNumber Number
|
||||
hi def link openscadPrimitiveSolid Keyword
|
||||
hi def link openscadPrimitive2D Keyword
|
||||
hi def link openscadPrimitiveImport Keyword
|
||||
hi def link openscadRepeat Repeat
|
||||
hi def link openscadSpecialVariable Special
|
||||
hi def link openscadString String
|
||||
hi def link openscadTransform Statement
|
||||
hi def link openscadCommentTodo Todo
|
||||
|
||||
let b:current_syntax = 'openscad'
|
||||
@@ -1,9 +1,10 @@
|
||||
" Vim syntax file
|
||||
" Language: SML
|
||||
" Filenames: *.sml *.sig
|
||||
" Maintainers: Markus Mottl <markus.mottl@gmail.com>
|
||||
" Fabrizio Zeno Cornelli <zeno@filibusta.crema.unimi.it>
|
||||
" Last Change: 2021 Oct 04
|
||||
" Maintainer: Markus Mottl <markus.mottl@gmail.com>
|
||||
" Previous Maintainer: Fabrizio Zeno Cornelli
|
||||
" <zeno@filibusta.crema.unimi.it> (invalid)
|
||||
" Last Change: 2022 Apr 01
|
||||
" 2015 Aug 31 - Fixed opening of modules (Ramana Kumar)
|
||||
" 2006 Oct 23 - Fixed character highlighting bug (MM)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim syntax support file
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2020 Apr 13
|
||||
" Last Change: 2022 Apr 12
|
||||
|
||||
" This file sets up for syntax highlighting.
|
||||
" It is loaded from "syntax.vim" and "manual.vim".
|
||||
@@ -37,7 +37,7 @@ fun! s:SynSet()
|
||||
unlet b:current_syntax
|
||||
endif
|
||||
|
||||
let s = expand("<amatch>")
|
||||
0verbose let s = expand("<amatch>")
|
||||
if s == "ON"
|
||||
" :set syntax=ON
|
||||
if &filetype == ""
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim syntax support file
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2001 Sep 04
|
||||
" Last Change: 2022 Apr 12
|
||||
|
||||
" This file is used for ":syntax on".
|
||||
" It installs the autocommands and starts highlighting for all buffers.
|
||||
@@ -28,8 +28,9 @@ endif
|
||||
|
||||
" Set up the connection between FileType and Syntax autocommands.
|
||||
" This makes the syntax automatically set when the file type is detected.
|
||||
" Avoid an error when 'verbose' is set and <amatch> expansion fails.
|
||||
augroup syntaxset
|
||||
au! FileType * exe "set syntax=" . expand("<amatch>")
|
||||
au! FileType * 0verbose exe "set syntax=" . expand("<amatch>")
|
||||
augroup END
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
" Vim syntax file
|
||||
" Language: Vim 8.2 script
|
||||
" Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
|
||||
" Last Change: March 14, 2022
|
||||
" Version: 8.2-29
|
||||
" Last Change: April 10, 2022
|
||||
" Version: 8.2-34
|
||||
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_VIM
|
||||
" Automatically generated keyword lists: {{{1
|
||||
|
||||
@@ -30,14 +30,14 @@ 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
|
||||
|
||||
" vimOptions are caught only when contained in a vimSet {{{2
|
||||
syn keyword vimOption contained acd ambw arshape aw backupskip beval bk bri bufhidden cdh ci cinwords cocu complete copyindent cryptmethod csl cuc debug dictionary display ef endofline esckeys fdc fdt fileencoding fixeol foldcolumn foldminlines fp gfn grepprg guiligatures hf hkmap icon imc imsf inde is isprint kmp lbr listchars lsp makeencoding maxmem mh mmp more mouseshape mzschemedll odev pa path pheader previewheight printmbcharset pvp pyxversion redrawtime ri rs sb scroll sections shcf shelltype showbreak sidescroll smartindent sp spf srr statusline sw sxq tabstop tags tbs termguicolors textmode thesaurusfunc titlestring tpm ttimeoutlen ttyscroll tx undolevels vartabstop vfile virtualedit warn wfh wildchar wim winminheight wmh write
|
||||
syn keyword vimOption contained ai anti asd awa balloondelay bevalterm bkc briopt buflisted cdhome cin clipboard cole completefunc cot cscopepathcomp cspc cul deco diff dy efm eol et fde fen fileencodings fk foldenable foldnestmax fs gfs gtl guioptions hh hkmapp iconstring imcmdline imst indentexpr isf joinspaces kp lcs lm luadll makeprg maxmempattern mis mmt mouse mouset mzschemegcdll oft packpath pdev pi previewpopup printmbfont pvw qe regexpengine rightleft rtp sbo scrollbind secure shell shellxescape showcmd sidescrolloff smarttab spc spl ss stl swapfile syn tag tagstack tc termwinkey textwidth tildeop tl tr ttm ttytype uc undoreload vb vi visualbell wb wfw wildcharm winaltkeys winminwidth wmnu writeany
|
||||
syn keyword vimOption contained akm antialias autochdir background ballooneval bex bl brk buftype cdpath cindent cm colorcolumn completeopt cp cscopeprg csprg culopt def diffexpr ea ei ep eventignore fdi fenc fileformat fkmap foldexpr foldopen fsync gfw gtt guipty hi hkp ignorecase imd imstatusfunc indentkeys isfname js langmap linebreak lmap lw mat maxmemtot mkspellmem mod mousef mousetime nf ofu para penc pm previewwindow printoptions pw qftf relativenumber rightleftcmd ru sbr scrollfocus sel shellcmdflag shellxquote showfulltag signcolumn smc spell splitbelow ssl stmp swapsync synmaxcol tagbsearch tal tcldll termwinscroll tf timeout tm ts tty tw udf updatecount vbs viewdir vop wc wh wildignore wincolor winptydll wmw writebackup
|
||||
syn keyword vimOption contained al ar autoindent backspace balloonevalterm bexpr bo browsedir casemap cedit cink cmdheight columns completepopup cpo cscopequickfix csqf cursorbind define diffopt ead ek equalalways ex fdl fencs fileformats flp foldignore foldtext ft ghr guicursor guitablabel hid hl im imdisable imstyle indk isi key langmenu lines lnr lz matchpairs mco ml modeline mousefocus mp nrformats omnifunc paragraphs perldll pmbcs printdevice prompt pythondll quickfixtextfunc remap rl rubydll sc scrolljump selection shellpipe shiftround showmatch siso smd spellcapcheck splitright ssop sts swb syntax tagcase tb tenc termwinsize tfu timeoutlen to tsl ttybuiltin twk udir updatetime vdir viewoptions vsts wcm whichwrap wildignorecase window winwidth wop writedelay
|
||||
syn keyword vimOption contained aleph arab autoread backup balloonexpr bg bomb bs cb cf cinkeys cmdwinheight com completeslash cpoptions cscoperelative csre cursorcolumn delcombine digraph eadirection emo equalprg expandtab fdls fex fileignorecase fml foldlevel formatexpr gcr gli guifont guitabtooltip hidden hlg imactivatefunc imi inc inex isident keymap langnoremap linespace loadplugins ma matchtime mef mle modelineexpr mousehide mps nu opendevice paste pex pmbfn printencoding pt pythonhome quoteescape renderoptions rlc ruf scb scrolloff selectmode shellquote shiftwidth showmode sj sn spellfile spo st su swf ta tagfunc tbi term termwintype tgc title toolbar tsr ttyfast tws ul ur ve vif vts wcr wi wildmenu winfixheight wiv wrap ws
|
||||
syn keyword vimOption contained allowrevins arabic autoshelldir backupcopy bdir bh breakat bsdir cc cfu cino cmp comments concealcursor cpp cscopetag cst cursorline dex dip eb emoji errorbells exrc fdm ff filetype fmr foldlevelstart formatlistpat gd go guifontset helpfile highlight hls imactivatekey iminsert include inf isk keymodel langremap lisp lpl macatsui maxcombine menc mls modelines mousem msm number operatorfunc pastetoggle pexpr popt printexpr pumheight pythonthreedll rdt report rnu ruler scf scrollopt sessionoptions shellredir shm showtabline slm so spelllang spr sta sua switchbuf tabline taglength tbidi termbidi terse tgst titlelen toolbariconsize tsrfu ttym twsl undodir ut verbose viminfo wa wd wic wildmode winfixwidth wiw wrapmargin ww
|
||||
syn keyword vimOption contained altkeymap arabicshape autowrite backupdir bdlay bin breakindent bsk ccv ch cinoptions cms commentstring conceallevel cpt cscopetagorder csto cursorlineopt dg dir ed enc errorfile fcl fdn ffs fillchars fo foldmarker formatoptions gdefault gp guifontwide helpheight history hlsearch imaf ims includeexpr infercase iskeyword keywordprg laststatus lispwords lrm magic maxfuncdepth menuitems mm modifiable mousemodel mzq numberwidth opfunc patchexpr pfn pp printfont pumwidth pythonthreehome re restorescreen ro rulerformat scl scs sft shellslash shortmess shq sm softtabstop spelloptions sps stal suffixes sws tabpagemax tagrelative tbis termencoding textauto thesaurus titleold top ttimeout ttymouse twt undofile varsofttabstop verbosefile viminfofile wak weirdinvert wig wildoptions winheight wm wrapscan xtermcodes
|
||||
syn keyword vimOption contained ambiwidth ari autowriteall backupext belloff binary breakindentopt bt cd charconvert cinw co compatible confirm crb cscopeverbose csverb cwh dict directory edcompatible encoding errorformat fcs fdo fic fixendofline foldclose foldmethod formatprg gfm grepformat guiheadroom helplang hk ic imak imsearch incsearch insertmode isp km lazyredraw list ls makeef maxmapdepth mfd mmd modified mouses mzquantum nuw osfiletype patchmode ph preserveindent printheader pvh pyx readonly revins rop runtimepath scr sect sh shelltemp shortname si smartcase sol spellsuggest sr startofline suffixesadd sxe
|
||||
syn keyword vimOption contained acd ambw arshape aw backupskip beval bk bri bufhidden cdh ci cinsd cms commentstring conceallevel cpt cscopetagorder csto cursorlineopt dg dir ed enc errorfile fcl fdn ffs fillchars fo foldmarker formatoptions gdefault gp guifontwide helpheight history hlsearch imaf ims includeexpr infercase iskeyword keywordprg laststatus lispwords lrm magic maxfuncdepth menuitems mm modifiable mousemev mps nu opendevice paste pex pmbfn printencoding pt pythonhome quoteescape renderoptions rlc ruf scb scrolloff selectmode shellquote shiftwidth showmode sj sn spellfile spo st su swf ta taglength tbis termguicolors textmode thesaurusfunc titlestring tpm ttimeoutlen ttyscroll tx undolevels vartabstop vfile virtualedit warn wfh wildchar wim winminheight wmh write
|
||||
syn keyword vimOption contained ai anti asd awa balloondelay bevalterm bkc briopt buflisted cdhome cin cinw co compatible confirm crb cscopeverbose csverb cwh dict directory edcompatible encoding errorformat fcs fdo fic fixendofline foldclose foldmethod formatprg gfm grepformat guiheadroom helplang hk ic imak imsearch incsearch insertmode isp km lazyredraw list ls makeef maxmapdepth mfd mmd modified mousemodel msm number operatorfunc pastetoggle pexpr popt printexpr pumheight pythonthreedll rdt report rnu ruler scf scrollopt sessionoptions shellredir shm showtabline slm so spelllang spr sta sua switchbuf tabline tagrelative tbs termwinkey textwidth tildeop tl tr ttm ttytype uc undoreload vb vi visualbell wb wfw wildcharm winaltkeys winminwidth wmnu writeany
|
||||
syn keyword vimOption contained akm antialias autochdir background ballooneval bex bl brk buftype cdpath cindent cinwords cocu complete copyindent cryptmethod csl cuc debug dictionary display ef endofline esckeys fdc fdt fileencoding fixeol foldcolumn foldminlines fp gfn grepprg guiligatures hf hkmap icon imc imsf inde is isprint kmp lbr listchars lsp makeencoding maxmem mh mmp more mousemoveevent mzq numberwidth opfunc patchexpr pfn pp printfont pumwidth pythonthreehome re restorescreen ro rulerformat scl scs sft shellslash shortmess shq sm softtabstop spelloptions sps stal suffixes sws tabpagemax tags tc termwinscroll tf timeout tm ts tty tw udf updatecount vbs viewdir vop wc wh wildignore wincolor winptydll wmw writebackup
|
||||
syn keyword vimOption contained al ar autoindent backspace balloonevalterm bexpr bo browsedir casemap cedit cink clipboard cole completefunc cot cscopepathcomp cspc cul deco diff dy efm eol et fde fen fileencodings fk foldenable foldnestmax fs gfs gtl guioptions hh hkmapp iconstring imcmdline imst indentexpr isf joinspaces kp lcs lm luadll makeprg maxmempattern mis mmt mouse mouses mzquantum nuw osfiletype patchmode ph preserveindent printheader pvh pyx readonly revins rop runtimepath scr sect sh shelltemp shortname si smartcase sol spellsuggest sr startofline suffixesadd sxe tabstop tagstack tcldll termwinsize tfu timeoutlen to tsl ttybuiltin twk udir updatetime vdir viewoptions vsts wcm whichwrap wildignorecase window winwidth wop writedelay
|
||||
syn keyword vimOption contained aleph arab autoread backup balloonexpr bg bomb bs cb cf cinkeys cm colorcolumn completeopt cp cscopeprg csprg culopt def diffexpr ea ei ep eventignore fdi fenc fileformat fkmap foldexpr foldopen fsync gfw gtt guipty hi hkp ignorecase imd imstatusfunc indentkeys isfname js langmap linebreak lmap lw mat maxmemtot mkspellmem mod mousef mouseshape mzschemedll odev pa path pheader previewheight printmbcharset pvp pyxversion redrawtime ri rs sb scroll sections shcf shelltype showbreak sidescroll smartindent sp spf srr statusline sw sxq tag tal tenc termwintype tgc title toolbar tsr ttyfast tws ul ur ve vif vts wcr wi wildmenu winfixheight wiv wrap ws
|
||||
syn keyword vimOption contained allowrevins arabic autoshelldir backupcopy bdir bh breakat bsdir cc cfu cino cmdheight columns completepopup cpo cscopequickfix csqf cursorbind define diffopt ead ek equalalways ex fdl fencs fileformats flp foldignore foldtext ft ghr guicursor guitablabel hid hl im imdisable imstyle indk isi key langmenu lines lnr lz matchpairs mco ml modeline mousefocus mouset mzschemegcdll oft packpath pdev pi previewpopup printmbfont pvw qe regexpengine rightleft rtp sbo scrollbind secure shell shellxescape showcmd sidescrolloff smarttab spc spl ss stl swapfile syn tagbsearch tb term terse tgst titlelen toolbariconsize tsrfu ttym twsl undodir ut verbose viminfo wa wd wic wildmode winfixwidth wiw wrapmargin ww
|
||||
syn keyword vimOption contained altkeymap arabicshape autowrite backupdir bdlay bin breakindent bsk ccv ch cinoptions cmdwinheight com completeslash cpoptions cscoperelative csre cursorcolumn delcombine digraph eadirection emo equalprg expandtab fdls fex fileignorecase fml foldlevel formatexpr gcr gli guifont guitabtooltip hidden hlg imactivatefunc imi inc inex isident keymap langnoremap linespace loadplugins ma matchtime mef mle modelineexpr mousehide mousetime nf ofu para penc pm previewwindow printoptions pw qftf relativenumber rightleftcmd ru sbr scrollfocus sel shellcmdflag shellxquote showfulltag signcolumn smc spell splitbelow ssl stmp swapsync synmaxcol tagcase tbi termbidi textauto thesaurus titleold top ttimeout ttymouse twt undofile varsofttabstop verbosefile viminfofile wak weirdinvert wig wildoptions winheight wm wrapscan xtermcodes
|
||||
syn keyword vimOption contained ambiwidth ari autowriteall backupext belloff binary breakindentopt bt cd charconvert cinscopedecls cmp comments concealcursor cpp cscopetag cst cursorline dex dip eb emoji errorbells exrc fdm ff filetype fmr foldlevelstart formatlistpat gd go guifontset helpfile highlight hls imactivatekey iminsert include inf isk keymodel langremap lisp lpl macatsui maxcombine menc mls modelines mousem mp nrformats omnifunc paragraphs perldll pmbcs printdevice prompt pythondll quickfixtextfunc remap rl rubydll sc scrolljump selection shellpipe shiftround showmatch siso smd spellcapcheck splitright ssop sts swb syntax tagfunc tbidi termencoding
|
||||
|
||||
" vimOptions: These are the turn-off setting variants {{{2
|
||||
syn keyword vimOption contained noacd noallowrevins noantialias noarabic noarshape noautoindent noautowrite noawa noballoonevalterm nobin nobl nobri noci nocompatible nocp nocscopetag nocst nocul nocursorline nodg noea noedcompatible noemoji noequalalways noet noexrc nofileignorecase nofk nofs nogdefault nohidden nohkmapp nohlsearch noignorecase noimcmdline noincsearch noinsertmode nojs nolazyredraw nolisp noloadplugins nolz nomagic nomle nomodelineexpr nomore nomousefocus nonu noodev nopaste nopreserveindent noprompt noreadonly noremap norevins norightleft nornu nors noruler nosc noscf noscrollfocus nosecure noshellslash noshiftround noshowcmd noshowmatch nosi nosmartcase nosmarttab nosn nospell nosplitright nosr nosta nostmp noswf notagbsearch notagstack notbidi notermbidi notextauto notf notildeop notitle notop nottimeout nottyfast noudf novb nowa nowb nowfh nowic nowildmenu nowinfixwidth nowmnu nowrapscan nowriteany nows
|
||||
@@ -67,14 +67,14 @@ syn keyword vimErrSetting contained bioskey biosk conskey consk autoprint beauti
|
||||
|
||||
" AutoCmd Events {{{2
|
||||
syn case ignore
|
||||
syn keyword vimAutoEvent contained BufAdd BufDelete BufFilePost BufHidden BufNew BufRead BufReadPost BufUnload BufWinLeave BufWrite BufWritePost CmdlineChanged CmdlineLeave CmdwinEnter ColorScheme CompleteChanged CompleteDone CompleteDonePre CursorHold CursorHoldI CursorMoved CursorMovedI DiffUpdated DirChanged DirChangedPre EncodingChanged ExitPre FileAppendCmd FileAppendPost FileAppendPre FileChangedRO FileChangedShell FileChangedShellPost FileEncoding FileExplorer FileReadCmd FileReadPost FileReadPre FileType FileWriteCmd FileWritePost FileWritePre FilterReadPost FilterReadPre FilterWritePost FilterWritePre FocusGained FocusLost FuncUndefined GUIEnter GUIFailed InsertChange InsertCharPre InsertEnter InsertLeave InsertLeavePre MenuPopup ModeChanged OptionSet QuickFixCmdPost QuickFixCmdPre QuitPre RemoteReply SafeState SafeStateAgain SessionLoadPost ShellCmdPost ShellFilterPost SigUSR1 SourceCmd SourcePost SourcePre SpellFileMissing StdinReadPost StdinReadPre SwapExists Syntax TabClosed TabEnter TabLeave TabNew TermChanged TerminalOpen TerminalWinOpen TermResponse TextChanged TextChangedI TextChangedP TextYankPost User VimEnter VimLeave VimLeavePre VimResized VimResume VimSuspend WinClosed WinEnter WinLeave WinNew
|
||||
syn keyword vimAutoEvent contained BufCreate BufEnter BufFilePre BufLeave BufNewFile BufReadCmd BufReadPre BufWinEnter BufWipeout BufWriteCmd BufWritePre CmdlineEnter CmdUndefined CmdwinLeave ColorSchemePre
|
||||
syn keyword vimAutoEvent contained BufAdd BufDelete BufFilePost BufHidden BufNew BufRead BufReadPost BufUnload BufWinLeave BufWrite BufWritePost CmdlineChanged CmdlineLeave CmdwinEnter ColorScheme CompleteChanged CompleteDonePre CursorHold CursorHoldI CursorMoved CursorMovedI DiffUpdated DirChanged DirChangedPre EncodingChanged ExitPre FileAppendCmd FileAppendPost FileAppendPre FileChangedRO FileChangedShell FileChangedShellPost FileEncoding FileExplorer FileReadCmd FileReadPost FileReadPre FileType FileWriteCmd FileWritePost FileWritePre FilterReadPost FilterReadPre FilterWritePost FilterWritePre FocusGained FocusLost FuncUndefined GUIEnter GUIFailed InsertChange InsertCharPre InsertEnter InsertLeave InsertLeavePre MenuPopup ModeChanged OptionSet QuickFixCmdPost QuickFixCmdPre QuitPre RemoteReply SafeState SafeStateAgain SessionLoadPost ShellCmdPost ShellFilterPost SigUSR1 SourceCmd SourcePost SourcePre SpellFileMissing StdinReadPost StdinReadPre SwapExists Syntax TabClosed TabEnter TabLeave TabNew TermChanged TerminalOpen TerminalWinOpen TermResponse TextChanged TextChangedI TextChangedP TextYankPost User VimEnter VimLeave VimLeavePre VimResized VimResume VimSuspend WinClosed WinEnter WinLeave WinNew WinScrolled
|
||||
syn keyword vimAutoEvent contained BufCreate BufEnter BufFilePre BufLeave BufNewFile BufReadCmd BufReadPre BufWinEnter BufWipeout BufWriteCmd BufWritePre CmdlineEnter CmdUndefined CmdwinLeave ColorSchemePre CompleteDone
|
||||
|
||||
" Highlight commonly used Groupnames {{{2
|
||||
syn keyword vimGroup contained Comment Constant String Character Number Boolean Float Identifier Function Statement Conditional Repeat Label Operator Keyword Exception PreProc Include Define Macro PreCondit Type StorageClass Structure Typedef Special SpecialChar Tag Delimiter SpecialComment Debug Underlined Ignore Error Todo
|
||||
|
||||
" Default highlighting groups {{{2
|
||||
syn keyword vimHLGroup contained ColorColumn Cursor CursorColumn CursorIM CursorLine CursorLineFold CursorLineNr CursorLineSign DiffAdd DiffChange DiffDelete DiffText Directory EndOfBuffer ErrorMsg FoldColumn Folded IncSearch LineNr LineNrAbove LineNrBelow MatchParen Menu ModeMsg MoreMsg NonText Normal Pmenu PmenuSbar PmenuSel PmenuThumb Question QuickFixLine Scrollbar Search SignColumn SpecialKey SpellBad SpellCap SpellLocal SpellRare StatusLine StatusLineNC StatusLineTerm TabLine TabLineFill TabLineSel Terminal Title Tooltip VertSplit Visual VisualNOS WarningMsg WildMenu
|
||||
syn keyword vimHLGroup contained ColorColumn CurSearch Cursor CursorColumn CursorIM CursorLine CursorLineFold CursorLineNr CursorLineSign DiffAdd DiffChange DiffDelete DiffText Directory EndOfBuffer ErrorMsg FoldColumn Folded IncSearch LineNr LineNrAbove LineNrBelow MatchParen Menu ModeMsg MoreMsg NonText Normal Pmenu PmenuSbar PmenuSel PmenuThumb Question QuickFixLine Scrollbar Search SignColumn SpecialKey SpellBad SpellCap SpellLocal SpellRare StatusLine StatusLineNC StatusLineTerm TabLine TabLineFill TabLineSel Terminal Title Tooltip VertSplit Visual VisualNOS WarningMsg WildMenu
|
||||
syn match vimHLGroup contained "Conceal"
|
||||
syn case match
|
||||
|
||||
@@ -230,7 +230,7 @@ syn keyword vimAugroupKey contained aug[roup]
|
||||
|
||||
" Operators: {{{2
|
||||
" =========
|
||||
syn cluster vimOperGroup contains=vimEnvvar,vimFunc,vimFuncVar,vimOper,vimOperParen,vimNumber,vimString,vimType,vimRegister,vimContinue,vim9Comment
|
||||
syn cluster vimOperGroup contains=vimEnvvar,vimFunc,vimFuncVar,vimOper,vimOperParen,vimNumber,vimString,vimType,vimRegister,vimContinue,vim9Comment,vimVar
|
||||
syn match vimOper "||\|&&\|[-+.!]" skipwhite nextgroup=vimString,vimSpecFile
|
||||
syn match vimOper "\%#=1\(==\|!=\|>=\|<=\|=\~\|!\~\|>\|<\|=\|!\~#\)[?#]\{0,2}" skipwhite nextgroup=vimString,vimSpecFile
|
||||
syn match vimOper "\(\<is\|\<isnot\)[?#]\{0,2}\>" skipwhite nextgroup=vimString,vimSpecFile
|
||||
@@ -465,8 +465,9 @@ syn case match
|
||||
" User Function Highlighting: {{{2
|
||||
" (following Gautam Iyer's suggestion)
|
||||
" ==========================
|
||||
syn match vimFunc "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%(\w\+\.\)*\I[a-zA-Z0-9_.]*\)\ze\s*(" contains=vimFuncName,vimUserFunc,vimExecute
|
||||
syn match vimUserFunc contained "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%(\w\+\.\)*\I[a-zA-Z0-9_.]*\)\|\<\u[a-zA-Z0-9.]*\>\|\<if\>" contains=vimNotation
|
||||
syn match vimFunc "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%(\w\+\.\)*\I[a-zA-Z0-9_.]*\)\ze\s*(" contains=vimCommand,vimFuncEcho,vimFuncName,vimUserFunc,vimExecute
|
||||
syn match vimUserFunc contained "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%(\w\+\.\)*\I[a-zA-Z0-9_.]*\)\|\<\u[a-zA-Z0-9.]*\>\|\<if\>" contains=vimCommand,vimNotation
|
||||
syn keyword vimFuncEcho contained ec ech echo
|
||||
|
||||
" User Command Highlighting: {{{2
|
||||
"syn match vimUsrCmd '^\s*\zs\u\w*.*$'
|
||||
@@ -898,6 +899,7 @@ if !exists("skip_vim_syntax_inits")
|
||||
hi def link vimError Error
|
||||
hi def link vimFBVar vimVar
|
||||
hi def link vimFgBgAttrib vimHiAttrib
|
||||
hi def link vimFuncEcho vimCommand
|
||||
hi def link vimHiCtermul vimHiTerm
|
||||
hi def link vimFold Folded
|
||||
hi def link vimFTCmd vimCommand
|
||||
|
||||
14
src/alloc.c
14
src/alloc.c
@@ -719,6 +719,20 @@ ga_grow(garray_T *gap, int n)
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Same as ga_grow() but uses an allocation id for testing.
|
||||
*/
|
||||
int
|
||||
ga_grow_id(garray_T *gap, int n, alloc_id_T id UNUSED)
|
||||
{
|
||||
#ifdef FEAT_EVAL
|
||||
if (alloc_fail_id == id && alloc_does_fail(sizeof(list_T)))
|
||||
return FAIL;
|
||||
#endif
|
||||
|
||||
return ga_grow(gap, n);
|
||||
}
|
||||
|
||||
int
|
||||
ga_grow_inner(garray_T *gap, int n)
|
||||
{
|
||||
|
||||
@@ -44,5 +44,6 @@ typedef enum {
|
||||
aid_newwin_wvars,
|
||||
aid_newtabpage_tvars,
|
||||
aid_blob_alloc,
|
||||
aid_get_func,
|
||||
aid_last
|
||||
} alloc_id_T;
|
||||
|
||||
4
src/auto/configure
vendored
4
src/auto/configure
vendored
@@ -10212,12 +10212,12 @@ $as_echo "no" >&6; }
|
||||
|
||||
GUI_LIB_LOC="`echo $GUI_LIB_LOC|sed 's%-L%%g'`"
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of Motif GUI libs" >&5
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of Motif GUI libs" >&5
|
||||
$as_echo_n "checking for location of Motif GUI libs... " >&6; }
|
||||
gui_libs="`echo $x_libraries|sed 's%/^/^/*$%%'` `echo "$gui_XXX" | sed s/XXX/lib/g` /usr/lib/i386-linux-gnu /usr/lib/x86_64-linux-gnu `echo "$GUI_INC_LOC" | sed s/include/lib/` $GUI_LIB_LOC"
|
||||
GUI_LIB_LOC=
|
||||
for try in $gui_libs; do
|
||||
for libtry in "$try"/libXm.a "$try"/libXm.so* "$try"/libXm.sl "$try"/libXm.dylib; do
|
||||
for libtry in "$try"/libXm.a "$try"/libXm.dll.a "$try"/libXm.so* "$try"/libXm.sl "$try"/libXm.dylib; do
|
||||
if test -f "$libtry"; then
|
||||
GUI_LIB_LOC=$try
|
||||
fi
|
||||
|
||||
@@ -55,7 +55,7 @@ typedef struct AutoCmd
|
||||
char once; // "One shot": removed after execution
|
||||
char nested; // If autocommands nest here.
|
||||
char last; // last command in list
|
||||
sctx_T script_ctx; // script context where defined
|
||||
sctx_T script_ctx; // script context where it is defined
|
||||
struct AutoCmd *next; // next AutoCmd in list
|
||||
} AutoCmd;
|
||||
|
||||
@@ -190,6 +190,7 @@ static struct event_name
|
||||
{"WinClosed", EVENT_WINCLOSED},
|
||||
{"WinEnter", EVENT_WINENTER},
|
||||
{"WinLeave", EVENT_WINLEAVE},
|
||||
{"WinScrolled", EVENT_WINSCROLLED},
|
||||
{"VimResized", EVENT_VIMRESIZED},
|
||||
{"TextYankPost", EVENT_TEXTYANKPOST},
|
||||
{"VimSuspend", EVENT_VIMSUSPEND},
|
||||
@@ -233,12 +234,13 @@ struct AutoPatCmd_S
|
||||
char_u *sfname; // sfname to match with
|
||||
char_u *tail; // tail of fname
|
||||
event_T event; // current event
|
||||
sctx_T script_ctx; // script context where it is defined
|
||||
int arg_bufnr; // Initially equal to <abuf>, set to zero when
|
||||
// buf is deleted.
|
||||
AutoPatCmd *next; // chain of active apc-s for auto-invalidation
|
||||
AutoPatCmd_T *next; // chain of active apc-s for auto-invalidation
|
||||
};
|
||||
|
||||
static AutoPatCmd *active_apc_list = NULL; // stack of active autocommands
|
||||
static AutoPatCmd_T *active_apc_list = NULL; // stack of active autocommands
|
||||
|
||||
// Macro to loop over all the patterns for an autocmd event
|
||||
#define FOR_ALL_AUTOCMD_PATTERNS(event, ap) \
|
||||
@@ -263,7 +265,7 @@ static char_u *event_nr2name(event_T event);
|
||||
static int au_get_grouparg(char_u **argp);
|
||||
static int do_autocmd_event(event_T event, char_u *pat, int once, int nested, char_u *cmd, int forceit, int group, int flags);
|
||||
static int apply_autocmds_group(event_T event, char_u *fname, char_u *fname_io, int force, int group, buf_T *buf, exarg_T *eap);
|
||||
static void auto_next_pat(AutoPatCmd *apc, int stop_at_last);
|
||||
static void auto_next_pat(AutoPatCmd_T *apc, int stop_at_last);
|
||||
static int au_find_group(char_u *name);
|
||||
|
||||
static event_T last_event;
|
||||
@@ -452,9 +454,9 @@ au_cleanup(void)
|
||||
void
|
||||
aubuflocal_remove(buf_T *buf)
|
||||
{
|
||||
AutoPat *ap;
|
||||
event_T event;
|
||||
AutoPatCmd *apc;
|
||||
AutoPat *ap;
|
||||
event_T event;
|
||||
AutoPatCmd_T *apc;
|
||||
|
||||
// invalidate currently executing autocommands
|
||||
for (apc = active_apc_list; apc; apc = apc->next)
|
||||
@@ -1239,18 +1241,17 @@ do_autocmd_event(
|
||||
// need to initialize last_mode for the first ModeChanged
|
||||
// autocmd
|
||||
if (event == EVENT_MODECHANGED && !has_modechanged())
|
||||
{
|
||||
typval_T rettv;
|
||||
typval_T tv[2];
|
||||
|
||||
tv[0].v_type = VAR_NUMBER;
|
||||
tv[0].vval.v_number = 1;
|
||||
tv[1].v_type = VAR_UNKNOWN;
|
||||
f_mode(tv, &rettv);
|
||||
STRCPY(last_mode, rettv.vval.v_string);
|
||||
vim_free(rettv.vval.v_string);
|
||||
}
|
||||
get_mode(last_mode);
|
||||
#endif
|
||||
// Initialize the fields checked by the WinScrolled trigger to
|
||||
// stop it from firing right after the first autocmd is defined.
|
||||
if (event == EVENT_WINSCROLLED && !has_winscrolled())
|
||||
{
|
||||
curwin->w_last_topline = curwin->w_topline;
|
||||
curwin->w_last_leftcol = curwin->w_leftcol;
|
||||
curwin->w_last_width = curwin->w_width;
|
||||
curwin->w_last_height = curwin->w_height;
|
||||
}
|
||||
|
||||
if (is_buflocal)
|
||||
{
|
||||
@@ -1782,6 +1783,15 @@ trigger_cursorhold(void)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Return TRUE when there is a WinScrolled autocommand defined.
|
||||
*/
|
||||
int
|
||||
has_winscrolled(void)
|
||||
{
|
||||
return (first_autopat[(int)EVENT_WINSCROLLED] != NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Return TRUE when there is a CursorMoved autocommand defined.
|
||||
*/
|
||||
@@ -1905,7 +1915,7 @@ apply_autocmds_group(
|
||||
int save_autocmd_busy;
|
||||
int save_autocmd_nested;
|
||||
static int nesting = 0;
|
||||
AutoPatCmd patcmd;
|
||||
AutoPatCmd_T patcmd;
|
||||
AutoPat *ap;
|
||||
sctx_T save_current_sctx;
|
||||
#ifdef FEAT_EVAL
|
||||
@@ -2078,7 +2088,8 @@ apply_autocmds_group(
|
||||
|| event == EVENT_DIRCHANGEDPRE
|
||||
|| event == EVENT_MODECHANGED
|
||||
|| event == EVENT_USER
|
||||
|| event == EVENT_WINCLOSED)
|
||||
|| event == EVENT_WINCLOSED
|
||||
|| event == EVENT_WINSCROLLED)
|
||||
{
|
||||
fname = vim_strsave(fname);
|
||||
autocmd_fname_full = TRUE; // don't expand it later
|
||||
@@ -2163,15 +2174,14 @@ apply_autocmds_group(
|
||||
tail = gettail(fname);
|
||||
|
||||
// Find first autocommand that matches
|
||||
CLEAR_FIELD(patcmd);
|
||||
patcmd.curpat = first_autopat[(int)event];
|
||||
patcmd.nextcmd = NULL;
|
||||
patcmd.group = group;
|
||||
patcmd.fname = fname;
|
||||
patcmd.sfname = sfname;
|
||||
patcmd.tail = tail;
|
||||
patcmd.event = event;
|
||||
patcmd.arg_bufnr = autocmd_bufnr;
|
||||
patcmd.next = NULL;
|
||||
auto_next_pat(&patcmd, FALSE);
|
||||
|
||||
// found one, start executing the autocommands
|
||||
@@ -2353,16 +2363,21 @@ is_autocmd_blocked(void)
|
||||
*/
|
||||
static void
|
||||
auto_next_pat(
|
||||
AutoPatCmd *apc,
|
||||
AutoPatCmd_T *apc,
|
||||
int stop_at_last) // stop when 'last' flag is set
|
||||
{
|
||||
AutoPat *ap;
|
||||
AutoCmd *cp;
|
||||
char_u *name;
|
||||
char *s;
|
||||
char_u **sourcing_namep = &SOURCING_NAME;
|
||||
estack_T *entry;
|
||||
char_u *namep;
|
||||
|
||||
VIM_CLEAR(*sourcing_namep);
|
||||
entry = ((estack_T *)exestack.ga_data) + exestack.ga_len - 1;
|
||||
|
||||
// Clear the exestack entry for this ETYPE_AUCMD entry.
|
||||
VIM_CLEAR(entry->es_name);
|
||||
entry->es_info.aucmd = NULL;
|
||||
|
||||
for (ap = apc->curpat; ap != NULL && !got_int; ap = ap->next)
|
||||
{
|
||||
@@ -2382,20 +2397,22 @@ auto_next_pat(
|
||||
{
|
||||
name = event_nr2name(apc->event);
|
||||
s = _("%s Autocommands for \"%s\"");
|
||||
*sourcing_namep = alloc(STRLEN(s)
|
||||
+ STRLEN(name) + ap->patlen + 1);
|
||||
if (*sourcing_namep != NULL)
|
||||
namep = alloc(STRLEN(s) + STRLEN(name) + ap->patlen + 1);
|
||||
if (namep != NULL)
|
||||
{
|
||||
sprintf((char *)*sourcing_namep, s,
|
||||
(char *)name, (char *)ap->pat);
|
||||
sprintf((char *)namep, s, (char *)name, (char *)ap->pat);
|
||||
if (p_verbose >= 8)
|
||||
{
|
||||
verbose_enter();
|
||||
smsg(_("Executing %s"), *sourcing_namep);
|
||||
smsg(_("Executing %s"), namep);
|
||||
verbose_leave();
|
||||
}
|
||||
}
|
||||
|
||||
// Update the exestack entry for this autocmd.
|
||||
entry->es_name = namep;
|
||||
entry->es_info.aucmd = apc;
|
||||
|
||||
apc->curpat = ap;
|
||||
apc->nextcmd = ap->cmds;
|
||||
// mark last command
|
||||
@@ -2412,6 +2429,15 @@ auto_next_pat(
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Get the script context where autocommand "acp" is defined.
|
||||
*/
|
||||
sctx_T *
|
||||
acp_script_ctx(AutoPatCmd_T *acp)
|
||||
{
|
||||
return &acp->script_ctx;
|
||||
}
|
||||
|
||||
/*
|
||||
* Get next autocommand command.
|
||||
* Called by do_cmdline() to get the next line for ":if".
|
||||
@@ -2424,7 +2450,7 @@ getnextac(
|
||||
int indent UNUSED,
|
||||
getline_opt_T options UNUSED)
|
||||
{
|
||||
AutoPatCmd *acp = (AutoPatCmd *)cookie;
|
||||
AutoPatCmd_T *acp = (AutoPatCmd_T *)cookie;
|
||||
char_u *retval;
|
||||
AutoCmd *ac;
|
||||
|
||||
@@ -2471,6 +2497,7 @@ getnextac(
|
||||
au_del_cmd(ac);
|
||||
autocmd_nested = ac->nested;
|
||||
current_sctx = ac->script_ctx;
|
||||
acp->script_ctx = current_sctx;
|
||||
if (ac->last)
|
||||
acp->nextcmd = NULL;
|
||||
else
|
||||
|
||||
35
src/buffer.c
35
src/buffer.c
@@ -150,7 +150,8 @@ buffer_ensure_loaded(buf_T *buf)
|
||||
aco_save_T aco;
|
||||
|
||||
aucmd_prepbuf(&aco, buf);
|
||||
swap_exists_action = SEA_NONE;
|
||||
if (swap_exists_action != SEA_READONLY)
|
||||
swap_exists_action = SEA_NONE;
|
||||
open_buffer(FALSE, NULL, 0);
|
||||
aucmd_restbuf(&aco);
|
||||
}
|
||||
@@ -1053,10 +1054,12 @@ goto_buffer(
|
||||
int count)
|
||||
{
|
||||
bufref_T old_curbuf;
|
||||
int save_sea = swap_exists_action;
|
||||
|
||||
set_bufref(&old_curbuf, curbuf);
|
||||
|
||||
swap_exists_action = SEA_DIALOG;
|
||||
if (swap_exists_action == SEA_NONE)
|
||||
swap_exists_action = SEA_DIALOG;
|
||||
(void)do_buffer(*eap->cmd == 's' ? DOBUF_SPLIT : DOBUF_GOTO,
|
||||
start, dir, count, eap->forceit);
|
||||
if (swap_exists_action == SEA_QUIT && *eap->cmd == 's')
|
||||
@@ -1071,7 +1074,7 @@ goto_buffer(
|
||||
|
||||
// Quitting means closing the split window, nothing else.
|
||||
win_close(curwin, TRUE);
|
||||
swap_exists_action = SEA_NONE;
|
||||
swap_exists_action = save_sea;
|
||||
swap_exists_did_quit = TRUE;
|
||||
|
||||
#if defined(FEAT_EVAL)
|
||||
@@ -2065,10 +2068,9 @@ buflist_new(
|
||||
buf = curbuf;
|
||||
// It's like this buffer is deleted. Watch out for autocommands that
|
||||
// change curbuf! If that happens, allocate a new buffer anyway.
|
||||
if (curbuf->b_p_bl)
|
||||
apply_autocmds(EVENT_BUFDELETE, NULL, NULL, FALSE, curbuf);
|
||||
if (buf == curbuf)
|
||||
apply_autocmds(EVENT_BUFWIPEOUT, NULL, NULL, FALSE, curbuf);
|
||||
buf_freeall(buf, BFA_WIPE | BFA_DEL);
|
||||
if (buf != curbuf) // autocommands deleted the buffer!
|
||||
return NULL;
|
||||
#ifdef FEAT_EVAL
|
||||
if (aborting()) // autocmds may abort script processing
|
||||
{
|
||||
@@ -2076,12 +2078,6 @@ buflist_new(
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
if (buf == curbuf)
|
||||
{
|
||||
// Make sure 'bufhidden' and 'buftype' are empty
|
||||
clear_string_option(&buf->b_p_bh);
|
||||
clear_string_option(&buf->b_p_bt);
|
||||
}
|
||||
}
|
||||
if (buf != curbuf || curbuf == NULL)
|
||||
{
|
||||
@@ -2129,14 +2125,6 @@ buflist_new(
|
||||
|
||||
if (buf == curbuf)
|
||||
{
|
||||
// free all things allocated for this buffer
|
||||
buf_freeall(buf, 0);
|
||||
if (buf != curbuf) // autocommands deleted the buffer!
|
||||
return NULL;
|
||||
#if defined(FEAT_EVAL)
|
||||
if (aborting()) // autocmds may abort script processing
|
||||
return NULL;
|
||||
#endif
|
||||
free_buffer_stuff(buf, FALSE); // delete local variables et al.
|
||||
|
||||
// Init the options.
|
||||
@@ -2350,6 +2338,7 @@ free_buf_options(
|
||||
#ifdef FEAT_CINDENT
|
||||
clear_string_option(&buf->b_p_cink);
|
||||
clear_string_option(&buf->b_p_cino);
|
||||
clear_string_option(&buf->b_p_cinsd);
|
||||
#endif
|
||||
#if defined(FEAT_CINDENT) || defined(FEAT_SMARTINDENT)
|
||||
clear_string_option(&buf->b_p_cinw);
|
||||
@@ -3072,6 +3061,8 @@ buflist_setfpos(
|
||||
wip->wi_fpos.lnum = lnum;
|
||||
wip->wi_fpos.col = col;
|
||||
}
|
||||
if (win != NULL)
|
||||
wip->wi_changelistidx = win->w_changelistidx;
|
||||
if (copy_options && win != NULL)
|
||||
{
|
||||
// Save the window-specific option values.
|
||||
@@ -3206,6 +3197,8 @@ get_winopts(buf_T *buf)
|
||||
}
|
||||
else
|
||||
copy_winopt(&curwin->w_allbuf_opt, &curwin->w_onebuf_opt);
|
||||
if (wip != NULL)
|
||||
curwin->w_changelistidx = wip->wi_changelistidx;
|
||||
|
||||
#ifdef FEAT_FOLDING
|
||||
// Set 'foldlevel' to 'foldlevelstart' if it's not negative.
|
||||
|
||||
10
src/change.c
10
src/change.c
@@ -640,9 +640,13 @@ changed_common(
|
||||
if (hasAnyFolding(wp))
|
||||
set_topline(wp, wp->w_topline);
|
||||
#endif
|
||||
// Relative numbering may require updating more.
|
||||
// If lines have been added or removed, relative numbering always
|
||||
// requires a redraw.
|
||||
if (wp->w_p_rnu && xtra != 0)
|
||||
redraw_win_later(wp, SOME_VALID);
|
||||
{
|
||||
wp->w_last_cursor_lnum_rnu = 0;
|
||||
redraw_win_later(wp, VALID);
|
||||
}
|
||||
#ifdef FEAT_SYN_HL
|
||||
// Cursor line highlighting probably need to be updated with
|
||||
// "VALID" if it's below the change.
|
||||
@@ -1655,7 +1659,7 @@ open_line(
|
||||
lead_len = get_leader_len(saved_line, &lead_flags,
|
||||
dir == BACKWARD, TRUE);
|
||||
#ifdef FEAT_CINDENT
|
||||
if (lead_len == 0 && do_cindent && dir == FORWARD)
|
||||
if (lead_len == 0 && curbuf->b_p_cin && do_cindent && dir == FORWARD)
|
||||
{
|
||||
// Check for a line comment after code.
|
||||
comment_start = check_linecomment(saved_line);
|
||||
|
||||
@@ -178,7 +178,10 @@ ch_logfile(char_u *fname, char_u *opt)
|
||||
|
||||
if (log_fd != NULL)
|
||||
{
|
||||
fprintf(log_fd, "==== start log session ====\n");
|
||||
fprintf(log_fd, "==== start log session %s ====\n",
|
||||
get_ctime(time(NULL), FALSE));
|
||||
// flush now, if fork/exec follows it could be written twice
|
||||
fflush(log_fd);
|
||||
#ifdef FEAT_RELTIME
|
||||
profile_start(&log_start);
|
||||
#endif
|
||||
@@ -1180,8 +1183,9 @@ prepare_buffer(buf_T *buf)
|
||||
buf_copy_options(buf, BCO_ENTER);
|
||||
curbuf = buf;
|
||||
#ifdef FEAT_QUICKFIX
|
||||
set_option_value((char_u *)"bt", 0L, (char_u *)"nofile", OPT_LOCAL);
|
||||
set_option_value((char_u *)"bh", 0L, (char_u *)"hide", OPT_LOCAL);
|
||||
set_option_value_give_err((char_u *)"bt",
|
||||
0L, (char_u *)"nofile", OPT_LOCAL);
|
||||
set_option_value_give_err((char_u *)"bh", 0L, (char_u *)"hide", OPT_LOCAL);
|
||||
#endif
|
||||
if (curbuf->b_ml.ml_mfp == NULL)
|
||||
ml_open(curbuf);
|
||||
@@ -2027,26 +2031,30 @@ channel_consume(channel_T *channel, ch_part_T part, int len)
|
||||
* Collapses the first and second buffer for "channel"/"part".
|
||||
* Returns FAIL if that is not possible.
|
||||
* When "want_nl" is TRUE collapse more buffers until a NL is found.
|
||||
* When the channel part mode is "lsp", collapse all the buffers as the http
|
||||
* header and the JSON content can be present in multiple buffers.
|
||||
*/
|
||||
int
|
||||
channel_collapse(channel_T *channel, ch_part_T part, int want_nl)
|
||||
{
|
||||
readq_T *head = &channel->ch_part[part].ch_head;
|
||||
readq_T *node = head->rq_next;
|
||||
readq_T *last_node;
|
||||
readq_T *n;
|
||||
char_u *newbuf;
|
||||
char_u *p;
|
||||
long_u len;
|
||||
ch_mode_T mode = channel->ch_part[part].ch_mode;
|
||||
readq_T *head = &channel->ch_part[part].ch_head;
|
||||
readq_T *node = head->rq_next;
|
||||
readq_T *last_node;
|
||||
readq_T *n;
|
||||
char_u *newbuf;
|
||||
char_u *p;
|
||||
long_u len;
|
||||
|
||||
if (node == NULL || node->rq_next == NULL)
|
||||
return FAIL;
|
||||
|
||||
last_node = node->rq_next;
|
||||
len = node->rq_buflen + last_node->rq_buflen;
|
||||
if (want_nl)
|
||||
if (want_nl || mode == MODE_LSP)
|
||||
while (last_node->rq_next != NULL
|
||||
&& channel_first_nl(last_node) == NULL)
|
||||
&& (mode == MODE_LSP
|
||||
|| channel_first_nl(last_node) == NULL))
|
||||
{
|
||||
last_node = last_node->rq_next;
|
||||
len += last_node->rq_buflen;
|
||||
@@ -3002,6 +3010,12 @@ may_invoke_callback(channel_T *channel, ch_part_T part)
|
||||
// Get any json message in the queue.
|
||||
if (channel_get_json(channel, part, -1, FALSE, &listtv) == FAIL)
|
||||
{
|
||||
if (ch_mode == MODE_LSP)
|
||||
// In the "lsp" mode, the http header and the json payload may
|
||||
// be received in multiple messages. So concatenate all the
|
||||
// received messages.
|
||||
(void)channel_collapse(channel, part, FALSE);
|
||||
|
||||
// Parse readahead, return when there is still no message.
|
||||
channel_parse_json(channel, part);
|
||||
if (channel_get_json(channel, part, -1, FALSE, &listtv) == FAIL)
|
||||
@@ -3970,6 +3984,7 @@ channel_read_json_block(
|
||||
sock_T fd;
|
||||
int timeout;
|
||||
chanpart_T *chanpart = &channel->ch_part[part];
|
||||
ch_mode_T mode = channel->ch_part[part].ch_mode;
|
||||
int retval = FAIL;
|
||||
|
||||
ch_log(channel, "Blocking read JSON for id %d", id);
|
||||
@@ -3980,6 +3995,12 @@ channel_read_json_block(
|
||||
|
||||
for (;;)
|
||||
{
|
||||
if (mode == MODE_LSP)
|
||||
// In the "lsp" mode, the http header and the json payload may be
|
||||
// received in multiple messages. So concatenate all the received
|
||||
// messages.
|
||||
(void)channel_collapse(channel, part, FALSE);
|
||||
|
||||
more = channel_parse_json(channel, part);
|
||||
|
||||
// search for message "id"
|
||||
@@ -3997,6 +4018,11 @@ channel_read_json_block(
|
||||
if (channel_parse_messages())
|
||||
continue;
|
||||
|
||||
// channel_parse_messages() may fill the queue with new data to
|
||||
// process.
|
||||
if (channel_has_readahead(channel, part))
|
||||
continue;
|
||||
|
||||
// Wait for up to the timeout. If there was an incomplete message
|
||||
// use the deadline for that.
|
||||
timeout = timeout_arg;
|
||||
@@ -4511,6 +4537,7 @@ ch_expr_common(typval_T *argvars, typval_T *rettv, int eval)
|
||||
ch_part_T part_read;
|
||||
jobopt_T opt;
|
||||
int timeout;
|
||||
int callback_present = FALSE;
|
||||
|
||||
// return an empty string by default
|
||||
rettv->v_type = VAR_STRING;
|
||||
@@ -4537,7 +4564,10 @@ ch_expr_common(typval_T *argvars, typval_T *rettv, int eval)
|
||||
{
|
||||
dict_T *d;
|
||||
dictitem_T *di;
|
||||
int callback_present = FALSE;
|
||||
|
||||
// return an empty dict by default
|
||||
if (rettv_dict_alloc(rettv) == FAIL)
|
||||
return;
|
||||
|
||||
if (argvars[1].v_type != VAR_DICT)
|
||||
{
|
||||
@@ -4620,6 +4650,14 @@ ch_expr_common(typval_T *argvars, typval_T *rettv, int eval)
|
||||
}
|
||||
}
|
||||
free_job_options(&opt);
|
||||
if (ch_mode == MODE_LSP && !eval && callback_present)
|
||||
{
|
||||
// if ch_sendexpr() is used to send a LSP message and a callback
|
||||
// function is specified, then return the generated identifier for the
|
||||
// message. The user can use this to cancel the request (if needed).
|
||||
if (rettv->vval.v_dict != NULL)
|
||||
dict_add_number(rettv->vval.v_dict, "id", id);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -420,23 +420,40 @@ cin_islabel_skip(char_u **s)
|
||||
}
|
||||
|
||||
/*
|
||||
* Recognize a "public/private/protected" scope declaration label.
|
||||
* Recognize a scope declaration label from the 'cinscopedecls' option.
|
||||
*/
|
||||
static int
|
||||
cin_isscopedecl(char_u *s)
|
||||
cin_isscopedecl(char_u *p)
|
||||
{
|
||||
int i;
|
||||
size_t cinsd_len;
|
||||
char_u *cinsd_buf;
|
||||
char_u *cinsd;
|
||||
size_t len;
|
||||
char_u *skip;
|
||||
char_u *s = cin_skipcomment(p);
|
||||
int found = FALSE;
|
||||
|
||||
s = cin_skipcomment(s);
|
||||
if (STRNCMP(s, "public", 6) == 0)
|
||||
i = 6;
|
||||
else if (STRNCMP(s, "protected", 9) == 0)
|
||||
i = 9;
|
||||
else if (STRNCMP(s, "private", 7) == 0)
|
||||
i = 7;
|
||||
else
|
||||
cinsd_len = STRLEN(curbuf->b_p_cinsd) + 1;
|
||||
cinsd_buf = alloc(cinsd_len);
|
||||
if (cinsd_buf == NULL)
|
||||
return FALSE;
|
||||
return (*(s = cin_skipcomment(s + i)) == ':' && s[1] != ':');
|
||||
|
||||
for (cinsd = curbuf->b_p_cinsd; *cinsd; )
|
||||
{
|
||||
len = copy_option_part(&cinsd, cinsd_buf, (int)cinsd_len, ",");
|
||||
if (STRNCMP(s, cinsd_buf, len) == 0)
|
||||
{
|
||||
skip = cin_skipcomment(s + len);
|
||||
if (*skip == ':' && skip[1] != ':')
|
||||
{
|
||||
found = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
vim_free(cinsd_buf);
|
||||
return found;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -378,6 +378,7 @@ int cmdline_pum_active(void)
|
||||
void cmdline_pum_remove(void)
|
||||
{
|
||||
int save_p_lz = p_lz;
|
||||
int save_KeyTyped = KeyTyped;
|
||||
|
||||
pum_undisplay();
|
||||
VIM_CLEAR(compl_match_array);
|
||||
@@ -385,6 +386,10 @@ void cmdline_pum_remove(void)
|
||||
update_screen(0);
|
||||
p_lz = save_p_lz;
|
||||
redrawcmd();
|
||||
|
||||
// When a function is called (e.g. for 'foldtext') KeyTyped might be reset
|
||||
// as a side effect.
|
||||
KeyTyped = save_KeyTyped;
|
||||
}
|
||||
|
||||
void cmdline_pum_cleanup(cmdline_info_T *cclp)
|
||||
@@ -2877,13 +2882,7 @@ ExpandGeneric(
|
||||
ga_clear_strings(&ga);
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
for (i = 0; i < ga.ga_len; ++i)
|
||||
{
|
||||
fuzmatch = &((fuzmatch_str_T *)ga.ga_data)[i];
|
||||
vim_free(fuzmatch->str);
|
||||
}
|
||||
ga_clear(&ga);
|
||||
fuzmatch_str_free(ga.ga_data, ga.ga_len);
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
|
||||
@@ -2965,11 +2965,12 @@ if test -z "$SKIP_MOTIF"; then
|
||||
|
||||
dnl Ubuntu has libXm.so in /usr/lib/i386-linux-gnu and elsewhere. The
|
||||
dnl linker will figure out which one to use, we only check if one exists.
|
||||
dnl Cygwin uses the .dll.a extension.
|
||||
AC_MSG_CHECKING(for location of Motif GUI libs)
|
||||
gui_libs="`echo $x_libraries|sed 's%/[^/][^/]*$%%'` `echo "$gui_XXX" | sed s/XXX/lib/g` /usr/lib/i386-linux-gnu /usr/lib/x86_64-linux-gnu `echo "$GUI_INC_LOC" | sed s/include/lib/` $GUI_LIB_LOC"
|
||||
GUI_LIB_LOC=
|
||||
for try in $gui_libs; do
|
||||
for libtry in "$try"/libXm.a "$try"/libXm.so* "$try"/libXm.sl "$try"/libXm.dylib; do
|
||||
for libtry in "$try"/libXm.a "$try"/libXm.dll.a "$try"/libXm.so* "$try"/libXm.sl "$try"/libXm.dylib; do
|
||||
if test -f "$libtry"; then
|
||||
GUI_LIB_LOC=$try
|
||||
fi
|
||||
|
||||
@@ -752,7 +752,7 @@ crypt_check_swapfile_curbuf(void)
|
||||
// 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);
|
||||
set_option_value_give_err((char_u *)"swf", 0, NULL, OPT_LOCAL);
|
||||
msg_scroll = TRUE;
|
||||
msg(_("Note: Encryption of swapfile not supported, disabling swap file"));
|
||||
}
|
||||
@@ -807,7 +807,7 @@ crypt_get_key(
|
||||
|
||||
if (store)
|
||||
{
|
||||
set_option_value((char_u *)"key", 0L, p1, OPT_LOCAL);
|
||||
set_option_value_give_err((char_u *)"key", 0L, p1, OPT_LOCAL);
|
||||
crypt_free_key(p1);
|
||||
p1 = curbuf->b_p_key;
|
||||
#ifdef FEAT_SODIUM
|
||||
|
||||
@@ -1466,7 +1466,7 @@ set_diff_option(win_T *wp, int value)
|
||||
curwin = wp;
|
||||
curbuf = curwin->w_buffer;
|
||||
++curbuf_lock;
|
||||
set_option_value((char_u *)"diff", (long)value, NULL, OPT_LOCAL);
|
||||
set_option_value_give_err((char_u *)"diff", (long)value, NULL, OPT_LOCAL);
|
||||
--curbuf_lock;
|
||||
curwin = old_curwin;
|
||||
curbuf = curwin->w_buffer;
|
||||
|
||||
@@ -2617,8 +2617,8 @@ win_update(win_T *wp)
|
||||
int scr_row = W_WINROW(wp) + wp->w_height - 1;
|
||||
|
||||
// Last line isn't finished: Display "@@@" in the last screen line.
|
||||
screen_puts_len((char_u *)"@@", 2, scr_row, wp->w_wincol,
|
||||
HL_ATTR(HLF_AT));
|
||||
screen_puts_len((char_u *)"@@", wp->w_width > 2 ? 2 : wp->w_width,
|
||||
scr_row, wp->w_wincol, HL_ATTR(HLF_AT));
|
||||
screen_fill(scr_row, scr_row + 1,
|
||||
(int)wp->w_wincol + 2, (int)W_ENDCOL(wp),
|
||||
'@', ' ', HL_ATTR(HLF_AT));
|
||||
@@ -2627,10 +2627,13 @@ win_update(win_T *wp)
|
||||
}
|
||||
else if (dy_flags & DY_LASTLINE) // 'display' has "lastline"
|
||||
{
|
||||
int start_col = (int)W_ENDCOL(wp) - 3;
|
||||
|
||||
// Last line isn't finished: Display "@@@" at the end.
|
||||
screen_fill(W_WINROW(wp) + wp->w_height - 1,
|
||||
W_WINROW(wp) + wp->w_height,
|
||||
(int)W_ENDCOL(wp) - 3, (int)W_ENDCOL(wp),
|
||||
start_col < wp->w_wincol ? wp->w_wincol : start_col,
|
||||
(int)W_ENDCOL(wp),
|
||||
'@', '@', HL_ATTR(HLF_AT));
|
||||
set_empty_rows(wp, srow);
|
||||
wp->w_botline = lnum;
|
||||
|
||||
55
src/edit.c
55
src/edit.c
@@ -284,7 +284,7 @@ edit(
|
||||
else
|
||||
State = INSERT;
|
||||
|
||||
trigger_modechanged();
|
||||
may_trigger_modechanged();
|
||||
stop_insert_mode = FALSE;
|
||||
|
||||
#ifdef FEAT_CONCEAL
|
||||
@@ -293,14 +293,9 @@ edit(
|
||||
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.
|
||||
// ptr2cells() treats a TAB character as double-width.
|
||||
if (ptr2cells(ml_get_cursor()) > 1)
|
||||
{
|
||||
curwin->w_valid &= ~VALID_VIRTCOL;
|
||||
curs_columns(TRUE);
|
||||
}
|
||||
// need to position cursor again when on a TAB
|
||||
if (gchar_cursor() == TAB)
|
||||
curwin->w_valid &= ~(VALID_WROW|VALID_WCOL|VALID_VIRTCOL);
|
||||
|
||||
/*
|
||||
* Enable langmap or IME, indicated by 'iminsert'.
|
||||
@@ -1298,6 +1293,9 @@ docomplete:
|
||||
disable_fold_update--;
|
||||
#endif
|
||||
compl_busy = FALSE;
|
||||
#ifdef FEAT_SMARTINDENT
|
||||
can_si = TRUE; // allow smartindenting
|
||||
#endif
|
||||
break;
|
||||
|
||||
case Ctrl_Y: // copy from previous line or scroll down
|
||||
@@ -1529,6 +1527,9 @@ ins_redraw(int ready) // not busy with something
|
||||
(linenr_T)(curwin->w_cursor.lnum + 1));
|
||||
}
|
||||
|
||||
if (ready)
|
||||
may_trigger_winscrolled();
|
||||
|
||||
// Trigger SafeState if nothing is pending.
|
||||
may_trigger_safestate(ready
|
||||
&& !ins_compl_active()
|
||||
@@ -3149,21 +3150,20 @@ mb_replace_pop_ins(int cc)
|
||||
replace_push(c);
|
||||
break;
|
||||
}
|
||||
|
||||
buf[0] = c;
|
||||
for (i = 1; i < n; ++i)
|
||||
buf[i] = replace_pop();
|
||||
if (utf_iscomposing(utf_ptr2char(buf)))
|
||||
ins_bytes_len(buf, n);
|
||||
else
|
||||
{
|
||||
buf[0] = c;
|
||||
for (i = 1; i < n; ++i)
|
||||
buf[i] = replace_pop();
|
||||
if (utf_iscomposing(utf_ptr2char(buf)))
|
||||
ins_bytes_len(buf, n);
|
||||
else
|
||||
{
|
||||
// Not a composing char, put it back.
|
||||
for (i = n - 1; i >= 0; --i)
|
||||
replace_push(buf[i]);
|
||||
break;
|
||||
}
|
||||
// Not a composing char, put it back.
|
||||
for (i = n - 1; i >= 0; --i)
|
||||
replace_push(buf[i]);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3701,9 +3701,10 @@ ins_esc(
|
||||
#endif
|
||||
|
||||
State = NORMAL;
|
||||
trigger_modechanged();
|
||||
// need to position cursor again (e.g. when on a TAB )
|
||||
changed_cline_bef_curs();
|
||||
may_trigger_modechanged();
|
||||
// need to position cursor again when on a TAB
|
||||
if (gchar_cursor() == TAB)
|
||||
curwin->w_valid &= ~(VALID_WROW|VALID_WCOL|VALID_VIRTCOL);
|
||||
|
||||
setmouse();
|
||||
#ifdef CURSOR_SHAPE
|
||||
@@ -3837,7 +3838,7 @@ ins_insert(int replaceState)
|
||||
State = INSERT | (State & LANGMAP);
|
||||
else
|
||||
State = replaceState | (State & LANGMAP);
|
||||
trigger_modechanged();
|
||||
may_trigger_modechanged();
|
||||
AppendCharToRedobuff(K_INS);
|
||||
showmode();
|
||||
#ifdef CURSOR_SHAPE
|
||||
@@ -4406,7 +4407,7 @@ bracketed_paste(paste_mode_T mode, int drop, garray_T *gap)
|
||||
if (!p_paste)
|
||||
// Also have the side effects of setting 'paste' to make it work much
|
||||
// faster.
|
||||
set_option_value((char_u *)"paste", TRUE, NULL, 0);
|
||||
set_option_value_give_err((char_u *)"paste", TRUE, NULL, 0);
|
||||
|
||||
for (;;)
|
||||
{
|
||||
@@ -4481,7 +4482,7 @@ bracketed_paste(paste_mode_T mode, int drop, garray_T *gap)
|
||||
--no_mapping;
|
||||
allow_keys = save_allow_keys;
|
||||
if (!save_paste)
|
||||
set_option_value((char_u *)"paste", FALSE, NULL, 0);
|
||||
set_option_value_give_err((char_u *)"paste", FALSE, NULL, 0);
|
||||
|
||||
return ret_char;
|
||||
}
|
||||
|
||||
33
src/errors.h
33
src/errors.h
@@ -1152,8 +1152,10 @@ EXTERN char e_region_is_guarded_cannot_modify[]
|
||||
#endif
|
||||
EXTERN char e_ambiguous_use_of_user_defined_command[]
|
||||
INIT(= N_("E464: Ambiguous use of user-defined command"));
|
||||
#ifdef FEAT_EVAL
|
||||
EXTERN char e_ambiguous_use_of_user_defined_command_str[]
|
||||
INIT(= N_("E464: Ambiguous use of user-defined command: %s"));
|
||||
#endif
|
||||
EXTERN char e_winsize_requires_two_number_arguments[]
|
||||
INIT(= N_("E465: :winsize requires two number arguments"));
|
||||
EXTERN char e_winpos_requires_two_number_arguments[]
|
||||
@@ -1554,14 +1556,9 @@ EXTERN char e_too_many_signs_defined[]
|
||||
EXTERN char e_unknown_printer_font_str[]
|
||||
INIT(= N_("E613: Unknown printer font: %s"));
|
||||
#endif
|
||||
#ifdef FEAT_BROWSE
|
||||
EXTERN char e_vim_selfile_cant_return_to_current_directory[]
|
||||
INIT(= N_("E614: vim_SelFile: can't return to current directory"));
|
||||
EXTERN char e_vim_selfile_cant_get_current_directory[]
|
||||
INIT(= N_("E615: vim_SelFile: can't get current directory"));
|
||||
EXTERN char e_vim_selfile_cant_get_font_str[]
|
||||
INIT(= N_("E616: vim_SelFile: can't get font %s"));
|
||||
#endif
|
||||
// E614 unused
|
||||
// E615 unused
|
||||
// E616 unused
|
||||
#ifdef FEAT_GUI_GTK
|
||||
EXTERN char e_cannot_be_changed_in_gtk_GUI[]
|
||||
INIT(= N_("E617: Cannot be changed in the GTK GUI"));
|
||||
@@ -2809,8 +2806,7 @@ EXTERN char e_cannot_delete_vim9_script_function_str[]
|
||||
INIT(= N_("E1084: Cannot delete Vim9 script function %s"));
|
||||
EXTERN char e_not_callable_type_str[]
|
||||
INIT(= N_("E1085: Not a callable type: %s"));
|
||||
EXTERN char e_function_reference_invalid[]
|
||||
INIT(= N_("E1086: Function reference invalid"));
|
||||
// E1086 unused
|
||||
EXTERN char e_cannot_use_index_when_declaring_variable[]
|
||||
INIT(= N_("E1087: Cannot use an index when declaring a variable"));
|
||||
EXTERN char e_script_cannot_import_itself[]
|
||||
@@ -3082,7 +3078,7 @@ EXTERN char e_no_white_space_allowed_after_str_str[]
|
||||
EXTERN char e_dot_can_only_be_used_on_dictionary_str[]
|
||||
INIT(= N_("E1203: Dot can only be used on a dictionary: %s"));
|
||||
#endif
|
||||
EXTERN char e_regexp_number_after_dot_pos_search[]
|
||||
EXTERN char e_regexp_number_after_dot_pos_search_chr[]
|
||||
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"));
|
||||
@@ -3115,16 +3111,20 @@ 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
|
||||
#ifdef FEAT_EVAL
|
||||
# ifdef FEAT_JOB_CHANNEL
|
||||
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"));
|
||||
# endif
|
||||
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"));
|
||||
# ifdef FEAT_JOB_CHANNEL
|
||||
EXTERN char e_string_or_blob_required_for_argument_nr[]
|
||||
INIT(= N_("E1221: String or Blob required for argument %d"));
|
||||
# endif
|
||||
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[]
|
||||
@@ -3157,8 +3157,7 @@ EXTERN char e_exists_compiled_can_only_be_used_in_def_function[]
|
||||
EXTERN char e_legacy_must_be_followed_by_command[]
|
||||
INIT(= N_("E1234: legacy must be followed by a command"));
|
||||
#ifdef FEAT_EVAL
|
||||
EXTERN char e_function_reference_is_not_set[]
|
||||
INIT(= N_("E1235: Function reference is not set"));
|
||||
// E1235 unused
|
||||
EXTERN char e_cannot_use_str_itself_it_is_imported[]
|
||||
INIT(= N_("E1236: Cannot use %s itself, it is imported"));
|
||||
#endif
|
||||
@@ -3256,3 +3255,11 @@ EXTERN char e_compiling_closure_without_context_str[]
|
||||
EXTERN char e_using_type_not_in_script_context_str[]
|
||||
INIT(= N_("E1272: Using type not in a script context: %s"));
|
||||
#endif
|
||||
EXTERN char e_nfa_regexp_missing_value_in_chr[]
|
||||
INIT(= N_("E1273: (NFA regexp) missing value in '\\%%%c'"));
|
||||
EXTERN char e_no_script_file_name_to_substitute_for_script[]
|
||||
INIT(= N_("E1274: No script file name to substitute for \"<script>\""));
|
||||
#ifdef FEAT_EVAL
|
||||
EXTERN char e_string_or_function_required_for_arrow_parens_expr[]
|
||||
INIT(= N_("E1275: String or function required for ->(expr)"));
|
||||
#endif
|
||||
|
||||
51
src/eval.c
51
src/eval.c
@@ -639,7 +639,15 @@ deref_function_name(
|
||||
|
||||
ref.v_type = VAR_UNKNOWN;
|
||||
if (eval7(arg, &ref, evalarg, FALSE) == FAIL)
|
||||
return NULL;
|
||||
{
|
||||
dictitem_T *v;
|
||||
|
||||
// If <SID>VarName was used it would not be found, try another way.
|
||||
v = find_var_also_in_script(name, NULL, FALSE);
|
||||
if (v == NULL)
|
||||
return NULL;
|
||||
copy_tv(&v->di_tv, &ref);
|
||||
}
|
||||
if (*skipwhite(*arg) != NUL)
|
||||
{
|
||||
if (verbose)
|
||||
@@ -4094,19 +4102,23 @@ eval_lambda(
|
||||
++*arg;
|
||||
ret = eval1(arg, rettv, evalarg);
|
||||
*arg = skipwhite_and_linebreak(*arg, evalarg);
|
||||
if (**arg == ')')
|
||||
{
|
||||
++*arg;
|
||||
}
|
||||
else
|
||||
if (**arg != ')')
|
||||
{
|
||||
emsg(_(e_missing_closing_paren));
|
||||
ret = FAIL;
|
||||
return FAIL;
|
||||
}
|
||||
if (rettv->v_type != VAR_STRING && rettv->v_type != VAR_FUNC
|
||||
&& rettv->v_type != VAR_PARTIAL)
|
||||
{
|
||||
emsg(_(e_string_or_function_required_for_arrow_parens_expr));
|
||||
return FAIL;
|
||||
}
|
||||
++*arg;
|
||||
}
|
||||
if (ret != OK)
|
||||
return FAIL;
|
||||
else if (**arg != '(')
|
||||
|
||||
if (**arg != '(')
|
||||
{
|
||||
if (verbose)
|
||||
{
|
||||
@@ -5636,34 +5648,35 @@ var2fpos(
|
||||
name = tv_get_string_chk(varp);
|
||||
if (name == NULL)
|
||||
return NULL;
|
||||
|
||||
pos.lnum = 0;
|
||||
if (name[0] == '.' && (!in_vim9script() || name[1] == NUL))
|
||||
{
|
||||
// cursor
|
||||
pos = curwin->w_cursor;
|
||||
if (charcol)
|
||||
pos.col = buf_byteidx_to_charidx(curbuf, pos.lnum, pos.col);
|
||||
return &pos;
|
||||
}
|
||||
if (name[0] == 'v' && name[1] == NUL) // Visual start
|
||||
else if (name[0] == 'v' && name[1] == NUL)
|
||||
{
|
||||
// Visual start
|
||||
if (VIsual_active)
|
||||
pos = VIsual;
|
||||
else
|
||||
pos = curwin->w_cursor;
|
||||
if (charcol)
|
||||
pos.col = buf_byteidx_to_charidx(curbuf, pos.lnum, pos.col);
|
||||
return &pos;
|
||||
}
|
||||
if (name[0] == '\'' && (!in_vim9script()
|
||||
else if (name[0] == '\'' && (!in_vim9script()
|
||||
|| (name[1] != NUL && name[2] == NUL)))
|
||||
{
|
||||
// mark
|
||||
pp = getmark_buf_fnum(curbuf, name[1], FALSE, fnum);
|
||||
if (pp == NULL || pp == (pos_T *)-1 || pp->lnum <= 0)
|
||||
return NULL;
|
||||
pos = *pp;
|
||||
}
|
||||
if (pos.lnum != 0)
|
||||
{
|
||||
if (charcol)
|
||||
pp->col = buf_byteidx_to_charidx(curbuf, pp->lnum, pp->col);
|
||||
return pp;
|
||||
pos.col = buf_byteidx_to_charidx(curbuf, pos.lnum, pos.col);
|
||||
return &pos;
|
||||
}
|
||||
|
||||
pos.coladd = 0;
|
||||
@@ -6800,7 +6813,7 @@ do_string_sub(
|
||||
// If it's still empty it was changed and restored, need to restore in
|
||||
// the complicated way.
|
||||
if (*p_cpo == NUL)
|
||||
set_option_value((char_u *)"cpo", 0L, save_cpo, 0);
|
||||
set_option_value_give_err((char_u *)"cpo", 0L, save_cpo, 0);
|
||||
free_string_option(save_cpo);
|
||||
}
|
||||
|
||||
|
||||
@@ -1660,7 +1660,7 @@ static funcentry_T global_functions[] =
|
||||
{"ch_readraw", 1, 2, FEARG_1, arg2_chan_or_job_dict,
|
||||
ret_string, JOB_FUNC(f_ch_readraw)},
|
||||
{"ch_sendexpr", 2, 3, FEARG_1, arg23_chanexpr,
|
||||
ret_void, JOB_FUNC(f_ch_sendexpr)},
|
||||
ret_any, JOB_FUNC(f_ch_sendexpr)},
|
||||
{"ch_sendraw", 2, 3, FEARG_1, arg23_chanraw,
|
||||
ret_void, JOB_FUNC(f_ch_sendraw)},
|
||||
{"ch_setoptions", 2, 2, FEARG_1, arg2_chan_or_job_dict,
|
||||
@@ -3673,8 +3673,10 @@ f_environ(typval_T *argvars UNUSED, typval_T *rettv)
|
||||
#if !defined(AMIGA)
|
||||
int i = 0;
|
||||
char_u *entry, *value;
|
||||
# ifdef MSWIN
|
||||
# if defined (MSWIN)
|
||||
# if !defined(_UCRT)
|
||||
extern wchar_t **_wenviron;
|
||||
# endif
|
||||
# else
|
||||
extern char **environ;
|
||||
# endif
|
||||
@@ -4065,7 +4067,6 @@ f_expand(typval_T *argvars, typval_T *rettv)
|
||||
{
|
||||
char_u *s;
|
||||
int len;
|
||||
char *errormsg;
|
||||
int options = WILD_SILENT|WILD_USE_NL|WILD_LIST_NOTFOUND;
|
||||
expand_T xpc;
|
||||
int error = FALSE;
|
||||
@@ -4096,9 +4097,15 @@ f_expand(typval_T *argvars, typval_T *rettv)
|
||||
s = tv_get_string(&argvars[0]);
|
||||
if (*s == '%' || *s == '#' || *s == '<')
|
||||
{
|
||||
++emsg_off;
|
||||
char *errormsg = NULL;
|
||||
|
||||
if (p_verbose == 0)
|
||||
++emsg_off;
|
||||
result = eval_vars(s, s, &len, NULL, &errormsg, NULL);
|
||||
--emsg_off;
|
||||
if (p_verbose == 0)
|
||||
--emsg_off;
|
||||
else if (errormsg != NULL)
|
||||
emsg(errormsg);
|
||||
if (rettv->v_type == VAR_LIST)
|
||||
{
|
||||
if (rettv_list_alloc(rettv) != FAIL && result != NULL)
|
||||
@@ -4724,6 +4731,7 @@ f_getchangelist(typval_T *argvars, typval_T *rettv)
|
||||
int i;
|
||||
list_T *l;
|
||||
dict_T *d;
|
||||
int changelistindex;
|
||||
|
||||
if (rettv_list_alloc(rettv) != OK)
|
||||
return;
|
||||
@@ -4745,13 +4753,25 @@ f_getchangelist(typval_T *argvars, typval_T *rettv)
|
||||
if (list_append_list(rettv->vval.v_list, l) == FAIL)
|
||||
return;
|
||||
/*
|
||||
* The current window change list index tracks only the position in the
|
||||
* current buffer change list. For other buffers, use the change list
|
||||
* length as the current index.
|
||||
* The current window change list index tracks only the position for the
|
||||
* current buffer. For other buffers use the stored index for the current
|
||||
* window, or, if that's not available, the change list length.
|
||||
*/
|
||||
list_append_number(rettv->vval.v_list,
|
||||
(varnumber_T)((buf == curwin->w_buffer)
|
||||
? curwin->w_changelistidx : buf->b_changelistlen));
|
||||
if (buf == curwin->w_buffer)
|
||||
{
|
||||
changelistindex = curwin->w_changelistidx;
|
||||
}
|
||||
else
|
||||
{
|
||||
wininfo_T *wip;
|
||||
|
||||
FOR_ALL_BUF_WININFO(buf, wip)
|
||||
if (wip->wi_win == curwin)
|
||||
break;
|
||||
changelistindex = wip != NULL ? wip->wi_changelistidx
|
||||
: buf->b_changelistlen;
|
||||
}
|
||||
list_append_number(rettv->vval.v_list, (varnumber_T)changelistindex);
|
||||
|
||||
for (i = 0; i < buf->b_changelistlen; ++i)
|
||||
{
|
||||
@@ -9042,7 +9062,7 @@ theend:
|
||||
// If it's still empty it was changed and restored, need to restore in
|
||||
// the complicated way.
|
||||
if (*p_cpo == NUL)
|
||||
set_option_value((char_u *)"cpo", 0L, save_cpo, 0);
|
||||
set_option_value_give_err((char_u *)"cpo", 0L, save_cpo, 0);
|
||||
free_string_option(save_cpo);
|
||||
}
|
||||
|
||||
@@ -9205,9 +9225,9 @@ f_setenv(typval_T *argvars, typval_T *rettv UNUSED)
|
||||
name = tv_get_string_buf(&argvars[0], namebuf);
|
||||
if (argvars[1].v_type == VAR_SPECIAL
|
||||
&& argvars[1].vval.v_number == VVAL_NULL)
|
||||
vim_unsetenv(name);
|
||||
vim_unsetenv_ext(name);
|
||||
else
|
||||
vim_setenv(name, tv_get_string_buf(&argvars[1], valbuf));
|
||||
vim_setenv_ext(name, tv_get_string_buf(&argvars[1], valbuf));
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
167
src/evalvars.c
167
src/evalvars.c
@@ -602,6 +602,66 @@ list_script_vars(int *first)
|
||||
"s:", FALSE, first);
|
||||
}
|
||||
|
||||
/*
|
||||
* Evaluate all the Vim expressions (`=expr`) in string "str" and return the
|
||||
* resulting string. The caller must free the returned string.
|
||||
*/
|
||||
static char_u *
|
||||
eval_all_expr_in_str(char_u *str)
|
||||
{
|
||||
garray_T ga;
|
||||
char_u *s;
|
||||
char_u *p;
|
||||
char_u save_c;
|
||||
char_u *exprval;
|
||||
int status;
|
||||
|
||||
ga_init2(&ga, 1, 80);
|
||||
p = str;
|
||||
|
||||
// Look for `=expr`, evaluate the expression and replace `=expr` with the
|
||||
// result.
|
||||
while (*p != NUL)
|
||||
{
|
||||
s = p;
|
||||
while (*p != NUL && (*p != '`' || p[1] != '='))
|
||||
p++;
|
||||
ga_concat_len(&ga, s, p - s);
|
||||
if (*p == NUL)
|
||||
break; // no backtick expression found
|
||||
|
||||
s = p;
|
||||
p += 2; // skip `=
|
||||
|
||||
status = *p == NUL ? OK : skip_expr(&p, NULL);
|
||||
if (status == FAIL || *p != '`')
|
||||
{
|
||||
// invalid expression or missing ending backtick
|
||||
if (status != FAIL)
|
||||
emsg(_(e_missing_backtick));
|
||||
vim_free(ga.ga_data);
|
||||
return NULL;
|
||||
}
|
||||
s += 2; // skip `=
|
||||
save_c = *p;
|
||||
*p = NUL;
|
||||
exprval = eval_to_string(s, TRUE);
|
||||
*p = save_c;
|
||||
p++;
|
||||
if (exprval == NULL)
|
||||
{
|
||||
// expression evaluation failed
|
||||
vim_free(ga.ga_data);
|
||||
return NULL;
|
||||
}
|
||||
ga_concat(&ga, exprval);
|
||||
vim_free(exprval);
|
||||
}
|
||||
ga_append(&ga, NUL);
|
||||
|
||||
return ga.ga_data;
|
||||
}
|
||||
|
||||
/*
|
||||
* Get a list of lines from a HERE document. The here document is a list of
|
||||
* lines surrounded by a marker.
|
||||
@@ -619,20 +679,23 @@ list_script_vars(int *first)
|
||||
* tcl, mzscheme), script_get is set to TRUE. In this case, if the marker is
|
||||
* missing, then '.' is accepted as a marker.
|
||||
*
|
||||
* Returns a List with {lines} or NULL.
|
||||
* Returns a List with {lines} or NULL on failure.
|
||||
*/
|
||||
list_T *
|
||||
heredoc_get(exarg_T *eap, char_u *cmd, int script_get)
|
||||
{
|
||||
char_u *theline;
|
||||
char_u *theline = NULL;
|
||||
char_u *marker;
|
||||
list_T *l;
|
||||
char_u *p;
|
||||
char_u *str;
|
||||
int marker_indent_len = 0;
|
||||
int text_indent_len = 0;
|
||||
char_u *text_indent = NULL;
|
||||
char_u dot[] = ".";
|
||||
int comment_char = in_vim9script() ? '#' : '"';
|
||||
int evalstr = FALSE;
|
||||
int eval_failed = FALSE;
|
||||
|
||||
if (eap->getline == NULL)
|
||||
{
|
||||
@@ -642,21 +705,36 @@ heredoc_get(exarg_T *eap, char_u *cmd, int script_get)
|
||||
|
||||
// Check for the optional 'trim' word before the marker
|
||||
cmd = skipwhite(cmd);
|
||||
if (STRNCMP(cmd, "trim", 4) == 0 && (cmd[4] == NUL || VIM_ISWHITE(cmd[4])))
|
||||
{
|
||||
cmd = skipwhite(cmd + 4);
|
||||
|
||||
// Trim the indentation from all the lines in the here document.
|
||||
// The amount of indentation trimmed is the same as the indentation of
|
||||
// the first line after the :let command line. To find the end marker
|
||||
// the indent of the :let command line is trimmed.
|
||||
p = *eap->cmdlinep;
|
||||
while (VIM_ISWHITE(*p))
|
||||
while (TRUE)
|
||||
{
|
||||
if (STRNCMP(cmd, "trim", 4) == 0
|
||||
&& (cmd[4] == NUL || VIM_ISWHITE(cmd[4])))
|
||||
{
|
||||
p++;
|
||||
marker_indent_len++;
|
||||
cmd = skipwhite(cmd + 4);
|
||||
|
||||
// Trim the indentation from all the lines in the here document.
|
||||
// The amount of indentation trimmed is the same as the indentation
|
||||
// of the first line after the :let command line. To find the end
|
||||
// marker the indent of the :let command line is trimmed.
|
||||
p = *eap->cmdlinep;
|
||||
while (VIM_ISWHITE(*p))
|
||||
{
|
||||
p++;
|
||||
marker_indent_len++;
|
||||
}
|
||||
text_indent_len = -1;
|
||||
|
||||
continue;
|
||||
}
|
||||
text_indent_len = -1;
|
||||
if (STRNCMP(cmd, "eval", 4) == 0
|
||||
&& (cmd[4] == NUL || VIM_ISWHITE(cmd[4])))
|
||||
{
|
||||
cmd = skipwhite(cmd + 4);
|
||||
evalstr = TRUE;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// The marker is the next word.
|
||||
@@ -698,6 +776,7 @@ heredoc_get(exarg_T *eap, char_u *cmd, int script_get)
|
||||
int mi = 0;
|
||||
int ti = 0;
|
||||
|
||||
vim_free(theline);
|
||||
theline = eap->getline(NUL, eap->cookie, 0, FALSE);
|
||||
if (theline == NULL)
|
||||
{
|
||||
@@ -711,10 +790,12 @@ heredoc_get(exarg_T *eap, char_u *cmd, int script_get)
|
||||
&& STRNCMP(theline, *eap->cmdlinep, marker_indent_len) == 0)
|
||||
mi = marker_indent_len;
|
||||
if (STRCMP(marker, theline + mi) == 0)
|
||||
{
|
||||
vim_free(theline);
|
||||
break;
|
||||
}
|
||||
|
||||
// If expression evaluation failed in the heredoc, then skip till the
|
||||
// end marker.
|
||||
if (eval_failed)
|
||||
continue;
|
||||
|
||||
if (text_indent_len == -1 && *theline != NUL)
|
||||
{
|
||||
@@ -734,12 +815,32 @@ heredoc_get(exarg_T *eap, char_u *cmd, int script_get)
|
||||
if (theline[ti] != text_indent[ti])
|
||||
break;
|
||||
|
||||
if (list_append_string(l, theline + ti, -1) == FAIL)
|
||||
str = theline + ti;
|
||||
if (evalstr)
|
||||
{
|
||||
str = eval_all_expr_in_str(str);
|
||||
if (str == NULL)
|
||||
{
|
||||
// expression evaluation failed
|
||||
eval_failed = TRUE;
|
||||
continue;
|
||||
}
|
||||
vim_free(theline);
|
||||
theline = str;
|
||||
}
|
||||
|
||||
if (list_append_string(l, str, -1) == FAIL)
|
||||
break;
|
||||
vim_free(theline);
|
||||
}
|
||||
vim_free(theline);
|
||||
vim_free(text_indent);
|
||||
|
||||
if (eval_failed)
|
||||
{
|
||||
// expression evaluation in the heredoc failed
|
||||
list_free(l);
|
||||
return NULL;
|
||||
}
|
||||
return l;
|
||||
}
|
||||
|
||||
@@ -1795,7 +1896,7 @@ do_unlet_var(
|
||||
|
||||
// Environment variable, normal name or expanded name.
|
||||
if (*lp->ll_name == '$')
|
||||
vim_unsetenv(lp->ll_name + 1);
|
||||
vim_unsetenv_ext(lp->ll_name + 1);
|
||||
else if (do_unlet(lp->ll_name, forceit) == FAIL)
|
||||
ret = FAIL;
|
||||
*name_end = cc;
|
||||
@@ -2828,13 +2929,18 @@ eval_variable(
|
||||
}
|
||||
else if (rettv != NULL)
|
||||
{
|
||||
svar_T *sv = NULL;
|
||||
int was_assigned = FALSE;
|
||||
|
||||
if (ht != NULL && ht == get_script_local_ht()
|
||||
&& tv != &SCRIPT_SV(current_sctx.sc_sid)->sv_var.di_tv)
|
||||
{
|
||||
svar_T *sv = find_typval_in_script(tv, 0, TRUE);
|
||||
|
||||
sv = find_typval_in_script(tv, 0, TRUE);
|
||||
if (sv != NULL)
|
||||
{
|
||||
type = sv->sv_type;
|
||||
was_assigned = sv->sv_flags & SVFLAG_ASSIGNED;
|
||||
}
|
||||
}
|
||||
|
||||
// If a list or dict variable wasn't initialized and has meaningful
|
||||
@@ -2843,7 +2949,7 @@ eval_variable(
|
||||
if (ht != &globvarht)
|
||||
{
|
||||
if (tv->v_type == VAR_DICT && tv->vval.v_dict == NULL
|
||||
&& ((type != NULL && type != &t_dict_empty)
|
||||
&& ((type != NULL && !was_assigned)
|
||||
|| !in_vim9script()))
|
||||
{
|
||||
tv->vval.v_dict = dict_alloc();
|
||||
@@ -2851,10 +2957,12 @@ eval_variable(
|
||||
{
|
||||
++tv->vval.v_dict->dv_refcount;
|
||||
tv->vval.v_dict->dv_type = alloc_type(type);
|
||||
if (sv != NULL)
|
||||
sv->sv_flags |= SVFLAG_ASSIGNED;
|
||||
}
|
||||
}
|
||||
else if (tv->v_type == VAR_LIST && tv->vval.v_list == NULL
|
||||
&& ((type != NULL && type != &t_list_empty)
|
||||
&& ((type != NULL && !was_assigned)
|
||||
|| !in_vim9script()))
|
||||
{
|
||||
tv->vval.v_list = list_alloc();
|
||||
@@ -2862,15 +2970,21 @@ eval_variable(
|
||||
{
|
||||
++tv->vval.v_list->lv_refcount;
|
||||
tv->vval.v_list->lv_type = alloc_type(type);
|
||||
if (sv != NULL)
|
||||
sv->sv_flags |= SVFLAG_ASSIGNED;
|
||||
}
|
||||
}
|
||||
else if (tv->v_type == VAR_BLOB && tv->vval.v_blob == NULL
|
||||
&& ((type != NULL && type != &t_blob_null)
|
||||
&& ((type != NULL && !was_assigned)
|
||||
|| !in_vim9script()))
|
||||
{
|
||||
tv->vval.v_blob = blob_alloc();
|
||||
if (tv->vval.v_blob != NULL)
|
||||
{
|
||||
++tv->vval.v_blob->bv_refcount;
|
||||
if (sv != NULL)
|
||||
sv->sv_flags |= SVFLAG_ASSIGNED;
|
||||
}
|
||||
}
|
||||
}
|
||||
copy_tv(tv, rettv);
|
||||
@@ -3587,6 +3701,7 @@ set_var_const(
|
||||
goto failed;
|
||||
if (type == NULL)
|
||||
type = sv->sv_type;
|
||||
sv->sv_flags |= SVFLAG_ASSIGNED;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4000,7 +4115,7 @@ set_option_from_tv(char_u *varname, typval_T *varp)
|
||||
strval = tv_get_string_buf_chk(varp, nbuf);
|
||||
}
|
||||
if (!error && strval != NULL)
|
||||
set_option_value(varname, numval, strval, OPT_LOCAL);
|
||||
set_option_value_give_err(varname, numval, strval, OPT_LOCAL);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -817,6 +817,9 @@ f_win_gotoid(typval_T *argvars, typval_T *rettv)
|
||||
FOR_ALL_TAB_WINDOWS(tp, wp)
|
||||
if (wp->w_id == id)
|
||||
{
|
||||
// When jumping to another buffer stop Visual mode.
|
||||
if (VIsual_active && wp->w_buffer != curbuf)
|
||||
end_visual_mode();
|
||||
goto_tabpage_win(tp, wp);
|
||||
rettv->vval.v_number = 1;
|
||||
return;
|
||||
|
||||
@@ -3182,7 +3182,7 @@ do_ecmd(
|
||||
redraw_curbuf_later(NOT_VALID); // redraw this buffer later
|
||||
}
|
||||
|
||||
if (p_im)
|
||||
if (p_im && (State & INSERT) == 0)
|
||||
need_start_insertmode = TRUE;
|
||||
|
||||
#ifdef FEAT_AUTOCHDIR
|
||||
@@ -4960,8 +4960,7 @@ ex_global(exarg_T *eap)
|
||||
else
|
||||
{
|
||||
delim = *cmd; // get the delimiter
|
||||
if (delim)
|
||||
++cmd; // skip delimiter if there is one
|
||||
++cmd; // skip delimiter if there is one
|
||||
pat = cmd; // remember start of pattern
|
||||
cmd = skip_regexp_ex(cmd, delim, magic_isset(), &eap->arg, NULL, NULL);
|
||||
if (cmd[0] == delim) // end delimiter found
|
||||
|
||||
@@ -563,9 +563,11 @@ ex_listdo(exarg_T *eap)
|
||||
// Clear 'shm' to avoid that the file message overwrites
|
||||
// any output from the command.
|
||||
p_shm_save = vim_strsave(p_shm);
|
||||
set_option_value((char_u *)"shm", 0L, (char_u *)"", 0);
|
||||
set_option_value_give_err((char_u *)"shm",
|
||||
0L, (char_u *)"", 0);
|
||||
do_argfile(eap, i);
|
||||
set_option_value((char_u *)"shm", 0L, p_shm_save, 0);
|
||||
set_option_value_give_err((char_u *)"shm",
|
||||
0L, p_shm_save, 0);
|
||||
vim_free(p_shm_save);
|
||||
}
|
||||
if (curwin->w_arg_idx != i)
|
||||
@@ -623,9 +625,9 @@ ex_listdo(exarg_T *eap)
|
||||
// Go to the next buffer. Clear 'shm' to avoid that the file
|
||||
// message overwrites any output from the command.
|
||||
p_shm_save = vim_strsave(p_shm);
|
||||
set_option_value((char_u *)"shm", 0L, (char_u *)"", 0);
|
||||
set_option_value_give_err((char_u *)"shm", 0L, (char_u *)"", 0);
|
||||
goto_buffer(eap, DOBUF_FIRST, FORWARD, next_fnum);
|
||||
set_option_value((char_u *)"shm", 0L, p_shm_save, 0);
|
||||
set_option_value_give_err((char_u *)"shm", 0L, p_shm_save, 0);
|
||||
vim_free(p_shm_save);
|
||||
|
||||
// If autocommands took us elsewhere, quit here.
|
||||
@@ -645,9 +647,9 @@ ex_listdo(exarg_T *eap)
|
||||
// Clear 'shm' to avoid that the file message overwrites
|
||||
// any output from the command.
|
||||
p_shm_save = vim_strsave(p_shm);
|
||||
set_option_value((char_u *)"shm", 0L, (char_u *)"", 0);
|
||||
set_option_value_give_err((char_u *)"shm", 0L, (char_u *)"", 0);
|
||||
ex_cnext(eap);
|
||||
set_option_value((char_u *)"shm", 0L, p_shm_save, 0);
|
||||
set_option_value_give_err((char_u *)"shm", 0L, p_shm_save, 0);
|
||||
vim_free(p_shm_save);
|
||||
|
||||
// If jumping to the next quickfix entry fails, quit here
|
||||
|
||||
106
src/ex_docmd.c
106
src/ex_docmd.c
@@ -477,7 +477,7 @@ do_exmode(
|
||||
else
|
||||
exmode_active = EXMODE_NORMAL;
|
||||
State = NORMAL;
|
||||
trigger_modechanged();
|
||||
may_trigger_modechanged();
|
||||
|
||||
// When using ":global /pat/ visual" and then "Q" we return to continue
|
||||
// the :global command.
|
||||
@@ -1733,6 +1733,7 @@ do_one_cmd(
|
||||
exarg_T ea; // Ex command arguments
|
||||
cmdmod_T save_cmdmod;
|
||||
int save_reg_executing = reg_executing;
|
||||
int save_pending_end_reg_executing = pending_end_reg_executing;
|
||||
int ni; // set when Not Implemented
|
||||
char_u *cmd;
|
||||
int starts_with_colon = FALSE;
|
||||
@@ -2630,6 +2631,7 @@ doend:
|
||||
undo_cmdmod(&cmdmod);
|
||||
cmdmod = save_cmdmod;
|
||||
reg_executing = save_reg_executing;
|
||||
pending_end_reg_executing = save_pending_end_reg_executing;
|
||||
|
||||
if (ea.nextcmd && *ea.nextcmd == NUL) // not really a next command
|
||||
ea.nextcmd = NULL;
|
||||
@@ -2781,7 +2783,9 @@ parse_command_modifiers(
|
||||
cmdmod_T *cmod,
|
||||
int skip_only)
|
||||
{
|
||||
char_u *orig_cmd = eap->cmd;
|
||||
char_u *cmd_start = NULL;
|
||||
int did_plus_cmd = FALSE;
|
||||
char_u *p;
|
||||
int starts_with_colon = FALSE;
|
||||
int vim9script = in_vim9script();
|
||||
@@ -2817,6 +2821,7 @@ parse_command_modifiers(
|
||||
&& curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count)
|
||||
{
|
||||
eap->cmd = (char_u *)"+";
|
||||
did_plus_cmd = TRUE;
|
||||
if (!skip_only)
|
||||
ex_pressedreturn = TRUE;
|
||||
}
|
||||
@@ -3082,7 +3087,11 @@ parse_command_modifiers(
|
||||
if (!checkforcmd_noparen(&p, "verbose", 4))
|
||||
break;
|
||||
if (vim_isdigit(*eap->cmd))
|
||||
{
|
||||
cmod->cmod_verbose = atoi((char *)eap->cmd);
|
||||
if (cmod->cmod_verbose == 0)
|
||||
cmod->cmod_verbose = -1;
|
||||
}
|
||||
else
|
||||
cmod->cmod_verbose = 1;
|
||||
eap->cmd = p;
|
||||
@@ -3099,13 +3108,29 @@ parse_command_modifiers(
|
||||
// Since the modifiers have been parsed put the colon on top of the
|
||||
// space: "'<,'>mod cmd" -> "mod:'<,'>cmd
|
||||
// Put eap->cmd after the colon.
|
||||
mch_memmove(cmd_start - 5, cmd_start, eap->cmd - cmd_start);
|
||||
eap->cmd -= 5;
|
||||
mch_memmove(eap->cmd - 1, ":'<,'>", 6);
|
||||
if (did_plus_cmd)
|
||||
{
|
||||
size_t len = STRLEN(cmd_start);
|
||||
|
||||
// Special case: empty command may have been changed to "+":
|
||||
// "'<,'>mod" -> "mod'<,'>+
|
||||
mch_memmove(orig_cmd, cmd_start, len);
|
||||
STRCPY(orig_cmd + len, "'<,'>+");
|
||||
}
|
||||
else
|
||||
{
|
||||
mch_memmove(cmd_start - 5, cmd_start, eap->cmd - cmd_start);
|
||||
eap->cmd -= 5;
|
||||
mch_memmove(eap->cmd - 1, ":'<,'>", 6);
|
||||
}
|
||||
}
|
||||
else
|
||||
// no modifiers, move the pointer back
|
||||
eap->cmd -= 5;
|
||||
// No modifiers, move the pointer back.
|
||||
// Special case: empty command may have been changed to "+".
|
||||
if (did_plus_cmd)
|
||||
eap->cmd = (char_u *)"'<,'>+";
|
||||
else
|
||||
eap->cmd = orig_cmd;
|
||||
}
|
||||
|
||||
return OK;
|
||||
@@ -3156,11 +3181,11 @@ apply_cmdmod(cmdmod_T *cmod)
|
||||
cmod->cmod_did_sandbox = TRUE;
|
||||
}
|
||||
#endif
|
||||
if (cmod->cmod_verbose > 0)
|
||||
if (cmod->cmod_verbose != 0)
|
||||
{
|
||||
if (cmod->cmod_verbose_save == 0)
|
||||
cmod->cmod_verbose_save = p_verbose + 1;
|
||||
p_verbose = cmod->cmod_verbose;
|
||||
p_verbose = cmod->cmod_verbose < 0 ? 0 : cmod->cmod_verbose;
|
||||
}
|
||||
|
||||
if ((cmod->cmod_flags & (CMOD_SILENT | CMOD_UNSILENT))
|
||||
@@ -8288,6 +8313,9 @@ ex_redraw(exarg_T *eap)
|
||||
RedrawingDisabled = r;
|
||||
p_lz = p;
|
||||
|
||||
// After drawing the statusline screen_attr may still be set.
|
||||
screen_stop_highlight();
|
||||
|
||||
// Reset msg_didout, so that a message that's there is overwritten.
|
||||
msg_didout = FALSE;
|
||||
msg_col = 0;
|
||||
@@ -8295,6 +8323,10 @@ ex_redraw(exarg_T *eap)
|
||||
// No need to wait after an intentional redraw.
|
||||
need_wait_return = FALSE;
|
||||
|
||||
// When invoked from a callback or autocmd the command line may be active.
|
||||
if (State & CMDLINE)
|
||||
redrawcmdline();
|
||||
|
||||
out_flush();
|
||||
}
|
||||
|
||||
@@ -8456,6 +8488,7 @@ save_current_state(save_state_T *sst)
|
||||
sst->save_finish_op = finish_op;
|
||||
sst->save_opcount = opcount;
|
||||
sst->save_reg_executing = reg_executing;
|
||||
sst->save_pending_end_reg_executing = pending_end_reg_executing;
|
||||
|
||||
msg_scroll = FALSE; // no msg scrolling in Normal mode
|
||||
restart_edit = 0; // don't go to Insert mode
|
||||
@@ -8485,6 +8518,7 @@ restore_current_state(save_state_T *sst)
|
||||
finish_op = sst->save_finish_op;
|
||||
opcount = sst->save_opcount;
|
||||
reg_executing = sst->save_reg_executing;
|
||||
pending_end_reg_executing = sst->save_pending_end_reg_executing;
|
||||
msg_didout |= sst->save_msg_didout; // don't reset msg_didout now
|
||||
current_sctx.sc_version = sst->save_script_version;
|
||||
|
||||
@@ -8950,8 +8984,10 @@ find_cmdline_var(char_u *src, int *usedlen)
|
||||
#define SPEC_SLNUM (SPEC_SFILE + 1)
|
||||
"<stack>", // call stack
|
||||
#define SPEC_STACK (SPEC_SLNUM + 1)
|
||||
"<script>", // script file name
|
||||
#define SPEC_SCRIPT (SPEC_STACK + 1)
|
||||
"<afile>", // autocommand file name
|
||||
#define SPEC_AFILE (SPEC_STACK + 1)
|
||||
#define SPEC_AFILE (SPEC_SCRIPT + 1)
|
||||
"<abuf>", // autocommand buffer number
|
||||
#define SPEC_ABUF (SPEC_AFILE + 1)
|
||||
"<amatch>", // autocommand match name
|
||||
@@ -8990,6 +9026,7 @@ find_cmdline_var(char_u *src, int *usedlen)
|
||||
* "<cfile>" to path name under the cursor
|
||||
* "<sfile>" to sourced file name
|
||||
* "<stack>" to call stack
|
||||
* "<script>" to current script name
|
||||
* "<slnum>" to sourced file line number
|
||||
* "<afile>" to file name for autocommand
|
||||
* "<abuf>" to buffer number for autocommand
|
||||
@@ -9219,14 +9256,28 @@ eval_vars(
|
||||
break;
|
||||
|
||||
case SPEC_SFILE: // file name for ":so" command
|
||||
case SPEC_STACK: // call stack
|
||||
result = estack_sfile(spec_idx == SPEC_SFILE
|
||||
? ESTACK_SFILE : ESTACK_STACK);
|
||||
result = estack_sfile(ESTACK_SFILE);
|
||||
if (result == NULL)
|
||||
{
|
||||
*errormsg = spec_idx == SPEC_SFILE
|
||||
? _(e_no_source_file_name_to_substitute_for_sfile)
|
||||
: _(e_no_call_stack_to_substitute_for_stack);
|
||||
*errormsg = _(e_no_source_file_name_to_substitute_for_sfile);
|
||||
return NULL;
|
||||
}
|
||||
resultbuf = result; // remember allocated string
|
||||
break;
|
||||
case SPEC_STACK: // call stack
|
||||
result = estack_sfile(ESTACK_STACK);
|
||||
if (result == NULL)
|
||||
{
|
||||
*errormsg = _(e_no_call_stack_to_substitute_for_stack);
|
||||
return NULL;
|
||||
}
|
||||
resultbuf = result; // remember allocated string
|
||||
break;
|
||||
case SPEC_SCRIPT: // script file name
|
||||
result = estack_sfile(ESTACK_SCRIPT);
|
||||
if (result == NULL)
|
||||
{
|
||||
*errormsg = _(e_no_script_file_name_to_substitute_for_script);
|
||||
return NULL;
|
||||
}
|
||||
resultbuf = result; // remember allocated string
|
||||
@@ -9395,18 +9446,23 @@ ex_behave(exarg_T *eap)
|
||||
{
|
||||
if (STRCMP(eap->arg, "mswin") == 0)
|
||||
{
|
||||
set_option_value((char_u *)"selection", 0L, (char_u *)"exclusive", 0);
|
||||
set_option_value((char_u *)"selectmode", 0L, (char_u *)"mouse,key", 0);
|
||||
set_option_value((char_u *)"mousemodel", 0L, (char_u *)"popup", 0);
|
||||
set_option_value((char_u *)"keymodel", 0L,
|
||||
(char_u *)"startsel,stopsel", 0);
|
||||
set_option_value_give_err((char_u *)"selection",
|
||||
0L, (char_u *)"exclusive", 0);
|
||||
set_option_value_give_err((char_u *)"selectmode",
|
||||
0L, (char_u *)"mouse,key", 0);
|
||||
set_option_value_give_err((char_u *)"mousemodel",
|
||||
0L, (char_u *)"popup", 0);
|
||||
set_option_value_give_err((char_u *)"keymodel",
|
||||
0L, (char_u *)"startsel,stopsel", 0);
|
||||
}
|
||||
else if (STRCMP(eap->arg, "xterm") == 0)
|
||||
{
|
||||
set_option_value((char_u *)"selection", 0L, (char_u *)"inclusive", 0);
|
||||
set_option_value((char_u *)"selectmode", 0L, (char_u *)"", 0);
|
||||
set_option_value((char_u *)"mousemodel", 0L, (char_u *)"extend", 0);
|
||||
set_option_value((char_u *)"keymodel", 0L, (char_u *)"", 0);
|
||||
set_option_value_give_err((char_u *)"selection",
|
||||
0L, (char_u *)"inclusive", 0);
|
||||
set_option_value_give_err((char_u *)"selectmode", 0L, (char_u *)"", 0);
|
||||
set_option_value_give_err((char_u *)"mousemodel",
|
||||
0L, (char_u *)"extend", 0);
|
||||
set_option_value_give_err((char_u *)"keymodel", 0L, (char_u *)"", 0);
|
||||
}
|
||||
else
|
||||
semsg(_(e_invalid_argument_str), eap->arg);
|
||||
@@ -9520,7 +9576,7 @@ ex_setfiletype(exarg_T *eap)
|
||||
if (STRNCMP(arg, "FALLBACK ", 9) == 0)
|
||||
arg += 9;
|
||||
|
||||
set_option_value((char_u *)"filetype", 0L, arg, OPT_LOCAL);
|
||||
set_option_value_give_err((char_u *)"filetype", 0L, arg, OPT_LOCAL);
|
||||
if (arg != eap->arg)
|
||||
did_filetype = FALSE;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user