mirror of
https://github.com/vim/vim
synced 2025-07-30 10:21:50 +00:00
Compare commits
201 Commits
Author | SHA1 | Date | |
---|---|---|---|
0de7369fd4 | |||
56dba60216 | |||
885de449c0 | |||
33d3ce640c | |||
77fc0b02e5 | |||
53ef573148 | |||
9b36750640 | |||
1fc6ea9bf3 | |||
66e13aedc7 | |||
7851c69a12 | |||
3fd7480cd2 | |||
d0eaf675aa | |||
0044e5100a | |||
dbec26d789 | |||
8530b41fd3 | |||
da1050cd6f | |||
2c645e8b00 | |||
4c84dd33ad | |||
928a131356 | |||
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 | |||
cc766a85f4 | |||
4829c1c9e9 | |||
7a411a306f | |||
15f74fab65 | |||
242c152c08 | |||
2b74b6805b | |||
1061195057 | |||
0b962e5685 | |||
292e1b9f68 | |||
fa010cdfb1 | |||
c4cb544cd5 | |||
8ef6997e2d | |||
ce416b453a | |||
a3157a476b | |||
72bb47e38f | |||
58f331a05f | |||
0dac1ab579 | |||
5018a836c0 | |||
97f8c1081e | |||
eabddc425e | |||
c1658a196b | |||
17fa233f6f | |||
22ebd172e4 | |||
ffe6e646dc | |||
782c6744b4 | |||
96e08e028c | |||
3a6f952cc8 | |||
a6c18d38ca | |||
ccbfd4883f | |||
1104a6d0c2 | |||
49d008d96b | |||
4dea2d92e4 | |||
d1d2684c80 | |||
1712518f48 | |||
c0ceeeb839 | |||
b4ad3b0dea | |||
46eea444d9 | |||
9247a221ce | |||
2bdad61267 | |||
b55986c52d | |||
fd01280d01 | |||
1624639ec8 | |||
24565cf27b | |||
859cc21c6b | |||
471b3aed3e | |||
8be423b7ac | |||
9dac9b1751 | |||
3e559cd884 | |||
565d1278cb | |||
1501b63f8d | |||
501f978288 | |||
ec15b1cfdc | |||
c75bca3ee9 | |||
f3980dc5d0 | |||
347538fad0 | |||
bf269ed0b0 | |||
c6c1ec4da5 | |||
5e877baf87 | |||
acf7d73a7f | |||
abb6fbd14d | |||
90da27b927 | |||
5d46dcfeed | |||
03a297c63f | |||
43216611a5 | |||
9dd42a6311 | |||
1e2c4175dc | |||
f8e43f6107 | |||
f4f0525c34 | |||
454ce6737c | |||
98b7fe725e | |||
ac48506ac6 |
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 }}
|
||||
|
||||
|
5
Filelist
5
Filelist
@ -446,10 +446,6 @@ SRC_UNIX = \
|
||||
src/create_cmdidxs.vim \
|
||||
src/create_nvcmdidxs.c \
|
||||
src/create_nvcmdidxs.vim \
|
||||
src/gui_at_fs.c \
|
||||
src/gui_at_sb.c \
|
||||
src/gui_at_sb.h \
|
||||
src/gui_athena.c \
|
||||
src/gui_gtk.c \
|
||||
src/gui_gtk_f.c \
|
||||
src/gui_gtk_f.h \
|
||||
@ -474,7 +470,6 @@ SRC_UNIX = \
|
||||
src/osdef1.h.in \
|
||||
src/osdef2.h.in \
|
||||
src/pathdef.sh \
|
||||
src/proto/gui_athena.pro \
|
||||
src/proto/gui_gtk.pro \
|
||||
src/proto/gui_gtk_x11.pro \
|
||||
src/proto/gui_gtk_gresources.pro \
|
||||
|
File diff suppressed because one or more lines are too long
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
|
||||
|
@ -2,7 +2,7 @@
|
||||
" Maintainer: <vacancy>
|
||||
" Previous Maintainer: Aaron Griffin <aaronmgriffin@gmail.com>
|
||||
" Version: 0.9
|
||||
" Last Updated: 2020 Oct 9
|
||||
" Last Updated: 2022 Mar 30
|
||||
"
|
||||
" Roland Puntaier: this file contains adaptations for python3 and is parallel to pythoncomplete.vim
|
||||
"
|
||||
@ -91,6 +91,9 @@ endfunction
|
||||
|
||||
function! s:DefPython()
|
||||
py3 << PYTHONEOF
|
||||
import warnings
|
||||
warnings.simplefilter(action='ignore', category=FutureWarning)
|
||||
|
||||
import sys, tokenize, io, types
|
||||
from token import NAME, DEDENT, NEWLINE, STRING
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
" Maintainer: Drew Vogel <dvogel@sidejump.org>
|
||||
" Last Change: 2021 Jul 25
|
||||
" Last Change: 2022 Mar 20
|
||||
"
|
||||
" Replaced rgb.txt as the source of de facto standard color names. This is
|
||||
" sourced each time the colorscheme command is run. It is also sourced each
|
||||
@ -430,6 +430,8 @@ call extend(v:colornames, {
|
||||
\ 'yellow2': '#eeee00',
|
||||
\ 'yellow3': '#cdcd00',
|
||||
\ 'yellow4': '#8b8b00',
|
||||
\ 'dark yellow': '#8b8b00',
|
||||
\ 'darkyellow': '#8b8b00',
|
||||
\ 'gold1': '#ffd700',
|
||||
\ 'gold2': '#eec900',
|
||||
\ 'gold3': '#cdad00',
|
||||
@ -506,6 +508,8 @@ call extend(v:colornames, {
|
||||
\ 'orangered2': '#ee4000',
|
||||
\ 'orangered3': '#cd3700',
|
||||
\ 'orangered4': '#8b2500',
|
||||
\ 'light red': '#ff8b8b',
|
||||
\ 'lightred': '#ff8b8b',
|
||||
\ 'red1': '#ff0000',
|
||||
\ 'red2': '#ee0000',
|
||||
\ 'red3': '#cd0000',
|
||||
@ -538,6 +542,8 @@ call extend(v:colornames, {
|
||||
\ 'violetred2': '#ee3a8c',
|
||||
\ 'violetred3': '#cd3278',
|
||||
\ 'violetred4': '#8b2252',
|
||||
\ 'light magenta': '#ff8bff',
|
||||
\ 'lightmagenta': '#ff8bff',
|
||||
\ 'magenta1': '#ff00ff',
|
||||
\ 'magenta2': '#ee00ee',
|
||||
\ 'magenta3': '#cd00cd',
|
||||
|
@ -1,4 +1,4 @@
|
||||
*autocmd.txt* For Vim version 8.2. Last change: 2022 Mar 04
|
||||
*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|
|
||||
@ -690,9 +695,9 @@ CursorHoldI Just like CursorHold, but in Insert mode.
|
||||
CursorMoved After the cursor was moved in Normal or Visual
|
||||
mode. Also when the text of the cursor line
|
||||
has been changed, e.g., with "x", "rx" or "p".
|
||||
Not triggered when there is typeahead, while
|
||||
executing commands in a script file, when
|
||||
an operator is pending or when moving to
|
||||
Not always triggered when there is typeahead,
|
||||
while executing commands in a script file,
|
||||
when an operator is pending or when moving to
|
||||
another window while remaining at the same
|
||||
cursor position.
|
||||
For an example see |match-parens|.
|
||||
@ -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 08
|
||||
*builtin.txt* For Vim version 8.2. Last change: 2022 Apr 16
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -161,7 +161,8 @@ exists_compiled({expr}) Number |TRUE| if {expr} exists at compile time
|
||||
exp({expr}) Float exponential of {expr}
|
||||
expand({expr} [, {nosuf} [, {list}]])
|
||||
any expand special keywords in {expr}
|
||||
expandcmd({expr}) String expand {expr} like with `:edit`
|
||||
expandcmd({string} [, {options}])
|
||||
String expand {string} like with `:edit`
|
||||
extend({expr1}, {expr2} [, {expr3}])
|
||||
List/Dict insert items of {expr2} into {expr1}
|
||||
extendnew({expr1}, {expr2} [, {expr3}])
|
||||
@ -1562,14 +1563,15 @@ confirm({msg} [, {choices} [, {default} [, {type}]]])
|
||||
or another valid interrupt key, confirm() returns 0.
|
||||
|
||||
An example: >
|
||||
:let choice = confirm("What do you want?", "&Apples\n&Oranges\n&Bananas", 2)
|
||||
:if choice == 0
|
||||
: echo "make up your mind!"
|
||||
:elseif choice == 3
|
||||
: echo "tasteful"
|
||||
:else
|
||||
: echo "I prefer bananas myself."
|
||||
:endif
|
||||
let choice = confirm("What do you want?",
|
||||
\ "&Apples\n&Oranges\n&Bananas", 2)
|
||||
if choice == 0
|
||||
echo "make up your mind!"
|
||||
elseif choice == 3
|
||||
echo "tasteful"
|
||||
else
|
||||
echo "I prefer bananas myself."
|
||||
endif
|
||||
< In a GUI dialog, buttons are used. The layout of the buttons
|
||||
depends on the 'v' flag in 'guioptions'. If it is included,
|
||||
the buttons are always put vertically. Otherwise, confirm()
|
||||
@ -1752,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.
|
||||
@ -1762,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.
|
||||
@ -2043,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()`.
|
||||
@ -2234,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
|
||||
@ -2267,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.
|
||||
@ -2292,16 +2300,28 @@ expand({string} [, {nosuf} [, {list}]]) *expand()*
|
||||
Can also be used as a |method|: >
|
||||
Getpattern()->expand()
|
||||
|
||||
expandcmd({string}) *expandcmd()*
|
||||
expandcmd({string} [, {options}]) *expandcmd()*
|
||||
Expand special items in String {string} like what is done for
|
||||
an Ex command such as `:edit`. This expands special keywords,
|
||||
like with |expand()|, and environment variables, anywhere in
|
||||
{string}. "~user" and "~/path" are only expanded at the
|
||||
start.
|
||||
Returns the expanded string. Example: >
|
||||
:echo expandcmd('make %<.o')
|
||||
|
||||
< Can also be used as a |method|: >
|
||||
The following items are supported in the {options} Dict
|
||||
argument:
|
||||
errmsg If set to TRUE, error messages are displayed
|
||||
if an error is encountered during expansion.
|
||||
By default, error messages are not displayed.
|
||||
|
||||
Returns the expanded string. If an error is encountered
|
||||
during expansion, the unmodified {string} is returned.
|
||||
|
||||
Example: >
|
||||
:echo expandcmd('make %<.o')
|
||||
make /path/runtime/doc/builtin.o
|
||||
:echo expandcmd('make %<.o', {'errmsg': v:true})
|
||||
<
|
||||
Can also be used as a |method|: >
|
||||
GetCommand()->expandcmd()
|
||||
<
|
||||
extend({expr1}, {expr2} [, {expr3}]) *extend()*
|
||||
@ -2727,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()*
|
||||
@ -3256,6 +3276,7 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()*
|
||||
messages |:messages| suboptions
|
||||
option options
|
||||
packadd optional package |pack-add| names
|
||||
scriptnames sourced script names |:scriptnames|
|
||||
shellcmd Shell command
|
||||
sign |:sign| suboptions
|
||||
syntax syntax file names |'syntax'|
|
||||
@ -3275,7 +3296,10 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()*
|
||||
|
||||
If the 'wildoptions' option contains 'fuzzy', then fuzzy
|
||||
matching is used to get the completion matches. Otherwise
|
||||
regular expression matching is used.
|
||||
regular expression matching is used. Thus this function
|
||||
follows the user preference, what happens on the command line.
|
||||
If you do not want this you can make 'wildoptions' empty
|
||||
before calling getcompletion() and restore it afterwards.
|
||||
|
||||
If {type} is "cmdline", then the |cmdline-completion| result is
|
||||
returned. For example, to complete the possible values after
|
||||
@ -4815,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()
|
||||
@ -5557,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
|
||||
@ -5565,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
|
||||
@ -5577,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.
|
||||
|
||||
@ -6005,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
|
||||
@ -6675,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}
|
||||
|
||||
|
||||
@ -10007,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 Feb 27
|
||||
*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')`
|
||||
@ -53,6 +54,7 @@ RAW nothing known, Vim cannot tell where a message ends
|
||||
NL every message ends in a NL (newline) character
|
||||
JSON JSON encoding |json_encode()|
|
||||
JS JavaScript style JSON-like encoding |js_encode()|
|
||||
LSP Language Server Protocol encoding |language-server-protocol|
|
||||
|
||||
Common combination are:
|
||||
- Using a job connected through pipes in NL mode. E.g., to run a style
|
||||
@ -118,10 +120,13 @@ To open a channel: >
|
||||
|
||||
Use |ch_status()| to see if the channel could be opened.
|
||||
|
||||
{address} has the form "hostname:port". E.g., "localhost:8765".
|
||||
|
||||
When using an IPv6 address, enclose it within square brackets. E.g.,
|
||||
"[2001:db8::1]:8765".
|
||||
*channel-address*
|
||||
{address} can be a domain name or an IP address, followed by a port number, or
|
||||
a Unix-domain socket path prefixed by "unix:". E.g. >
|
||||
www.example.com:80 " domain + port
|
||||
127.0.0.1:1234 " IPv4 + port
|
||||
[2001:db8::1]:8765 " IPv6 + port
|
||||
unix:/tmp/my-socket " Unix-domain socket path
|
||||
|
||||
{options} is a dictionary with optional entries: *channel-open-options*
|
||||
|
||||
@ -130,6 +135,7 @@ When using an IPv6 address, enclose it within square brackets. E.g.,
|
||||
"js" - Use JS (JavaScript) encoding, more efficient than JSON.
|
||||
"nl" - Use messages that end in a NL character
|
||||
"raw" - Use raw messages
|
||||
"lsp" - Use language server protocol encoding
|
||||
*channel-callback* *E921*
|
||||
"callback" A function that is called when a message is received that is
|
||||
not handled otherwise (e.g. a JSON message with ID zero). It
|
||||
@ -140,8 +146,8 @@ When using an IPv6 address, enclose it within square brackets. E.g.,
|
||||
endfunc
|
||||
let channel = ch_open("localhost:8765", {"callback": "Handle"})
|
||||
<
|
||||
When "mode" is "json" or "js" the "msg" argument is the body
|
||||
of the received message, converted to Vim types.
|
||||
When "mode" is "json" or "js" or "lsp" the "msg" argument is
|
||||
the body of the received message, converted to Vim types.
|
||||
When "mode" is "nl" the "msg" argument is one message,
|
||||
excluding the NL.
|
||||
When "mode" is "raw" the "msg" argument is the whole message
|
||||
@ -165,7 +171,19 @@ When using an IPv6 address, enclose it within square brackets. E.g.,
|
||||
to check for messages, the close_cb may be invoked while still
|
||||
in the callback. The plugin must handle this somehow, it can
|
||||
be useful to know that no more data is coming.
|
||||
*channel-drop*
|
||||
If it is not known if there is a message to be read, use a
|
||||
try/catch block: >
|
||||
try
|
||||
let msg = ch_readraw(a:channel)
|
||||
catch
|
||||
let msg = 'no message'
|
||||
endtry
|
||||
try
|
||||
let err = ch_readraw(a:channel, #{part: 'err'})
|
||||
catch
|
||||
let err = 'no error'
|
||||
endtry
|
||||
< *channel-drop*
|
||||
"drop" Specifies when to drop messages:
|
||||
"auto" When there is no callback to handle a message.
|
||||
The "close_cb" is also considered for this.
|
||||
@ -407,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'})
|
||||
@ -443,7 +462,7 @@ to check if there is something to read.
|
||||
Note that when there is no callback, messages are dropped. To avoid that add
|
||||
a close callback to the channel.
|
||||
|
||||
To read all output from a RAW channel that is available: >
|
||||
To read all normal output from a RAW channel that is available: >
|
||||
let output = ch_readraw(channel)
|
||||
To read the error output: >
|
||||
let output = ch_readraw(channel, {"part": "err"})
|
||||
@ -503,6 +522,7 @@ ch_evalexpr({handle}, {expr} [, {options}]) *ch_evalexpr()*
|
||||
according to the type of channel. The function cannot be used
|
||||
with a raw channel. See |channel-use|.
|
||||
{handle} can be a Channel or a Job that has a Channel.
|
||||
When using the "lsp" channel mode, {expr} must be a |Dict|.
|
||||
*E917*
|
||||
{options} must be a Dictionary. It must not have a "callback"
|
||||
entry. It can have a "timeout" entry to specify the timeout
|
||||
@ -510,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.
|
||||
@ -564,10 +585,15 @@ ch_info({handle}) *ch_info()*
|
||||
When opened with ch_open():
|
||||
"hostname" the hostname of the address
|
||||
"port" the port of the address
|
||||
"path" the path of the Unix-domain socket
|
||||
"sock_status" "open" or "closed"
|
||||
"sock_mode" "NL", "RAW", "JSON" or "JS"
|
||||
"sock_io" "socket"
|
||||
"sock_timeout" timeout in msec
|
||||
|
||||
Note that "path" is only present for Unix-domain sockets, for
|
||||
regular ones "hostname" and "port" are present instead.
|
||||
|
||||
When opened with job_start():
|
||||
"out_status" "open", "buffered" or "closed"
|
||||
"out_mode" "NL", "RAW", "JSON" or "JS"
|
||||
@ -578,7 +604,7 @@ ch_info({handle}) *ch_info()*
|
||||
"err_io" "out", "null", "pipe", "file" or "buffer"
|
||||
"err_timeout" timeout in msec
|
||||
"in_status" "open" or "closed"
|
||||
"in_mode" "NL", "RAW", "JSON" or "JS"
|
||||
"in_mode" "NL", "RAW", "JSON", "JS" or "LSP"
|
||||
"in_io" "null", "pipe", "file" or "buffer"
|
||||
"in_timeout" timeout in msec
|
||||
|
||||
@ -610,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
|
||||
@ -626,11 +652,8 @@ ch_open({address} [, {options}]) *ch_open()*
|
||||
Open a channel to {address}. See |channel|.
|
||||
Returns a Channel. Use |ch_status()| to check for failure.
|
||||
|
||||
{address} is a String and has the form "hostname:port", e.g.,
|
||||
"localhost:8765".
|
||||
|
||||
When using an IPv6 address, enclose it within square brackets.
|
||||
E.g., "[2001:db8::1]:8765".
|
||||
{address} is a String, see |channel-address| for the possible
|
||||
accepted forms.
|
||||
|
||||
If {options} is given it must be a |Dictionary|.
|
||||
See |channel-open-options|.
|
||||
@ -674,6 +697,17 @@ ch_sendexpr({handle}, {expr} [, {options}]) *ch_sendexpr()*
|
||||
with a raw channel.
|
||||
See |channel-use|. *E912*
|
||||
{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)
|
||||
@ -1361,5 +1395,190 @@ The same in |Vim9| script: >
|
||||
# start accepting shell commands
|
||||
startinsert
|
||||
|
||||
==============================================================================
|
||||
15. Language Server Protocol *language-server-protocol*
|
||||
|
||||
The language server protocol specification is available at:
|
||||
|
||||
https://microsoft.github.io/language-server-protocol/specification
|
||||
|
||||
Each LSP protocol message starts with a simple HTTP header followed by the
|
||||
payload encoded in JSON-RPC format. This is described in:
|
||||
|
||||
https://www.jsonrpc.org/specification
|
||||
|
||||
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: >
|
||||
|
||||
let ch = ch_open(..., #{mode: 'lsp'})
|
||||
|
||||
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 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)
|
||||
|
||||
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. 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 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. 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: '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. 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'})
|
||||
|
||||
To respond to a JSON-RPC request message from the server, use the
|
||||
|ch_sendexpr()| function. In the response message, copy the 'id' field value
|
||||
from the server request message. Example: >
|
||||
|
||||
let resp = {}
|
||||
let resp.id = req.id
|
||||
let resp.result = 1
|
||||
call ch_sendexpr(ch, resp)
|
||||
|
||||
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,30 @@ 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.
|
||||
|
||||
{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 +3297,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 +4721,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
|
||||
@ -25,7 +25,7 @@ Other GUI documentation:
|
||||
|
||||
First you must make sure you actually have a version of Vim with the GUI code
|
||||
included. You can check this with the ":version" command, it says "with xxx
|
||||
GUI", where "xxx" is X11-Motif, X11-Athena, Photon, GTK2, GTK3, etc., or
|
||||
GUI", where "xxx" is X11-Motif, Photon, GTK2, GTK3, etc., or
|
||||
"MS-Windows 32 bit GUI version".
|
||||
|
||||
How to start the GUI depends on the system used. Mostly you can run the
|
||||
@ -108,7 +108,7 @@ There are a number of options which only have meaning in the GUI version of
|
||||
Vim. These are 'guicursor', 'guifont', 'guipty' and 'guioptions'. They are
|
||||
documented in |options.txt| with all the other options.
|
||||
|
||||
If using the Motif or Athena version of the GUI (but not for the GTK+ or
|
||||
If using the Motif version of the GUI (but not for the GTK+ or
|
||||
Win32 version), a number of X resources are available. See |gui-resources|.
|
||||
|
||||
Another way to set the colors for different occasions is with highlight
|
||||
@ -236,7 +236,7 @@ takes too much time or you don't like the cursor jumping to another line,
|
||||
include the 'h' flag in 'guioptions'. Then the scrolling is limited by the
|
||||
text of the current cursor line.
|
||||
|
||||
*athena-intellimouse*
|
||||
*motif-intellimouse*
|
||||
If you have an Intellimouse and an X server that supports using the wheel,
|
||||
then you can use the wheel to scroll the text up and down in gvim. This works
|
||||
with XFree86 4.0 and later, and with some older versions when you add patches.
|
||||
@ -261,6 +261,7 @@ Other options that are relevant:
|
||||
'mousefocus' window focus follows mouse pointer |gui-mouse-focus|
|
||||
'mousemodel' what mouse button does which action
|
||||
'mousehide' hide mouse pointer while typing text
|
||||
'mousemoveevent' enable mouse move events so that <MouseMove> can be mapped
|
||||
'selectmode' whether to start Select mode or Visual mode
|
||||
|
||||
A quick way to set these is with the ":behave" command.
|
||||
@ -406,6 +407,9 @@ These mappings make selection work the way it probably should in a Motif
|
||||
application, with shift-left mouse allowing for extending the visual area
|
||||
rather than the right mouse button.
|
||||
|
||||
<MouseMove> may be mapped, but 'mousemoveevent' must be enabled to use the
|
||||
mapping.
|
||||
|
||||
Mouse mapping with modifiers does not work for modeless selection.
|
||||
|
||||
|
||||
@ -742,7 +746,7 @@ because the item will never be selected. Use a single colon to keep it
|
||||
simple.
|
||||
|
||||
*gui-toolbar*
|
||||
The toolbar is currently available in the Win32, Athena, Motif, GTK+ (X11),
|
||||
The toolbar is currently available in the Win32, Motif, GTK+ (X11),
|
||||
and Photon GUI. It should turn up in other GUIs in due course. The
|
||||
default toolbar is setup in menu.vim.
|
||||
The display of the toolbar is controlled by the 'guioptions' letter 'T'. You
|
||||
@ -858,7 +862,7 @@ The window toolbar uses the ToolbarLine and ToolbarButton highlight groups.
|
||||
When splitting the window the window toolbar is not copied to the new window.
|
||||
|
||||
*popup-menu*
|
||||
In the Win32, GTK+, Motif, Athena and Photon GUI, you can define the
|
||||
In the Win32, GTK+, Motif and Photon GUI, you can define the
|
||||
special menu "PopUp". This is the menu that is displayed when the right mouse
|
||||
button is pressed, if 'mousemodel' is set to popup or popup_setpos.
|
||||
Example: >
|
||||
|
@ -1,11 +1,11 @@
|
||||
*gui_x11.txt* For Vim version 8.2. Last change: 2020 Jun 05
|
||||
*gui_x11.txt* For Vim version 8.2. Last change: 2022 Apr 03
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
|
||||
|
||||
Vim's Graphical User Interface *gui-x11* *GUI-X11*
|
||||
*Athena* *Motif*
|
||||
*Motif*
|
||||
1. Starting the X11 GUI |gui-x11-start|
|
||||
2. GUI Resources |gui-resources|
|
||||
3. Shell Commands |gui-pty|
|
||||
@ -64,7 +64,7 @@ flag in 'guioptions'. |-f|.
|
||||
==============================================================================
|
||||
2. GUI Resources *gui-resources* *.Xdefaults*
|
||||
|
||||
If using the Motif or Athena version of the GUI (not for the KDE, GTK+ or Win32
|
||||
If using the Motif version of the GUI (not for the KDE, GTK+ or Win32
|
||||
version), a number of X resources are available. You should use Vim's class
|
||||
"Vim" when setting these. They are as follows:
|
||||
|
||||
@ -96,7 +96,6 @@ version), a number of X resources are available. You should use Vim's class
|
||||
is same size as terminal that started it).
|
||||
scrollbarWidth Thickness of scrollbars.
|
||||
borderWidth Thickness of border around text area.
|
||||
menuHeight Height of the menu bar (only for Athena).
|
||||
|
||||
A special font for italic, bold, and italic-bold text will only be used if
|
||||
the user has specified one via a resource. No attempt is made to guess what
|
||||
@ -135,12 +134,9 @@ which make Motif applications look even better, highly recommended!
|
||||
|
||||
The "Vim*fontList" is to set the menu font for Motif. Example: >
|
||||
Vim*menuBar*fontList: -*-courier-medium-r-*-*-10-*-*-*-*-*-*-*
|
||||
With Athena: >
|
||||
Vim*menuBar*SmeBSB*font: -*-courier-medium-r-*-*-10-*-*-*-*-*-*-*
|
||||
Vim*menuBar*MenuButton*font: -*-courier-medium-r-*-*-10-*-*-*-*-*-*-*
|
||||
|
||||
NOTE: A more portable, and indeed more correct, way to specify the menu font
|
||||
in either Motif or Athena is through the resource: >
|
||||
in Motif is through the resource: >
|
||||
Vim.menuFont: -*-courier-medium-r-*-*-10-*-*-*-*-*-*-*
|
||||
Or, when compiled with the |+xfontset| feature: >
|
||||
Vim.menuFontSet: -*-courier-medium-r-*-*-10-*-*-*-*-*-*-*
|
||||
@ -255,7 +251,7 @@ For example: >
|
||||
:10vmenu File.Print :w !lpr -Php3
|
||||
<
|
||||
*X11-icon*
|
||||
Vim uses a black&white icon by default when compiled with Motif or Athena. A
|
||||
Vim uses a black&white icon by default when compiled with Motif. A
|
||||
colored Vim icon is included as $VIMRUNTIME/vim32x32.xpm. For GTK+, this is
|
||||
the builtin icon used. Unfortunately, how you should install it depends on
|
||||
your window manager. When you use this, remove the 'i' flag from
|
||||
@ -594,8 +590,7 @@ GTK+ files on your system. When both GTK+ 2 and GTK+ 3 are available, GTK+ 2
|
||||
will be chosen unless --enable-gui=gtk3 is passed explicitly to configure.
|
||||
|
||||
If the GTK+ files cannot be found, then the Motif files will be searched for.
|
||||
Finally, if this fails, the Athena files will be searched for. If all three
|
||||
fail, the GUI will be disabled.
|
||||
If both fail, the GUI will be disabled.
|
||||
|
||||
For GTK+, Vim's configuration process uses pkg-config(1) to check if the
|
||||
GTK+ required for a specified build is properly installed and usable.
|
||||
@ -621,10 +616,10 @@ explicitly to configure, and avoid passing --enable-gnome-check to that, as
|
||||
the functionality of the GNOME 2 support has already been consolidated in
|
||||
GTK+ 3.
|
||||
|
||||
Otherwise, if you are using Motif or Athena, when you have the Motif or Athena
|
||||
files in a directory where configure doesn't look, edit the Makefile to enter
|
||||
the names of the directories. Search for "GUI_INC_LOC" for an example to set
|
||||
the Motif directories, "CONF_OPT_X" for Athena.
|
||||
Otherwise, if you are using Motif, when you have the Motif files in a
|
||||
directory where configure doesn't look, edit the Makefile to enter the names
|
||||
of the directories. Search for "GUI_INC_LOC" for an example to set
|
||||
the Motif directories.
|
||||
|
||||
*gui-x11-gtk*
|
||||
Currently, Vim supports both GTK+ 2 and GTK+ 3.
|
||||
@ -643,18 +638,11 @@ few problems, but you might make it compile and run with a bit of work, please
|
||||
send me the patches if you do). The newest releases of LessTif have been
|
||||
reported to work fine too.
|
||||
|
||||
*gui-x11-athena*
|
||||
The Athena version uses the Xaw widget set by default. If you have the 3D
|
||||
version, you might want to link with Xaw3d instead. This will make the
|
||||
menus look a bit better. Edit the Makefile and look for "XAW_LIB". The
|
||||
scrollbars will remain the same, because Vim has its own, which are already
|
||||
3D (in fact, they look more like Motif).
|
||||
|
||||
*gui-x11-neXtaw*
|
||||
The neXtaw version is mostly like Athena, but uses different widgets.
|
||||
*gui-x11-athena* *gui-x11-neXtaw*
|
||||
Support for the Athena GUI and neXtaw was removed in patch 8.2.4677.
|
||||
|
||||
*gui-x11-misc*
|
||||
In general, do not try to mix files from different GTK+, Motif, Athena and X11
|
||||
In general, do not try to mix files from different GTK+, Motif and X11
|
||||
versions. This will cause problems. For example, using header files for
|
||||
X11R5 with a library for X11R6 probably doesn't work (although the linking
|
||||
won't give an error message, Vim will crash later).
|
||||
|
@ -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 13
|
||||
*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
|
||||
@ -800,7 +800,7 @@ If the previous expansion was split, because it got longer than 'textwidth',
|
||||
then just the text in the current line will be used.
|
||||
|
||||
If the match found is at the end of a line, then the first word in the next
|
||||
line will be inserted and the message "word from next line" displayed, if
|
||||
line will be inserted and the message "Word from other line" displayed, if
|
||||
this word is accepted the next CTRL-X CTRL-P or CTRL-X CTRL-N will search
|
||||
for those lines starting with this word.
|
||||
|
||||
@ -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 13
|
||||
*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.
|
||||
|
||||
@ -987,7 +987,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
nostop like start, except CTRL-W and CTRL-U do not stop at the start of
|
||||
insert.
|
||||
|
||||
When the value is empty, Vi compatible backspacing is used.
|
||||
When the value is empty, Vi compatible backspacing is used, none of
|
||||
the ways mentioned for the items above are possible.
|
||||
|
||||
For backwards compatibility with version 5.4 and earlier:
|
||||
value effect ~
|
||||
@ -1018,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
|
||||
@ -1042,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
|
||||
@ -1064,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
|
||||
@ -1137,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
|
||||
@ -1264,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.
|
||||
@ -1289,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).
|
||||
|
||||
@ -1401,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.
|
||||
@ -1415,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
|
||||
@ -1660,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.: >
|
||||
@ -1767,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
|
||||
@ -1801,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.
|
||||
|
||||
@ -1942,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
|
||||
@ -2011,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
|
||||
@ -2627,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|.
|
||||
@ -2907,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
|
||||
@ -3111,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'*
|
||||
@ -3371,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
|
||||
@ -3561,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.
|
||||
@ -3779,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:
|
||||
@ -3898,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}
|
||||
@ -3979,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'*
|
||||
@ -4091,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
|
||||
@ -4110,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.
|
||||
@ -4139,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"
|
||||
@ -4151,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 --")
|
||||
@ -4394,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
|
||||
@ -4415,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'*
|
||||
@ -4806,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
|
||||
@ -5007,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'*
|
||||
@ -5031,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
|
||||
@ -5516,6 +5533,18 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|
||||
The 'mousemodel' option is set by the |:behave| command.
|
||||
|
||||
*'mousemoveevent'* *'mousemev'*
|
||||
'mousemoveevent' 'mousemev' boolean (default off)
|
||||
global
|
||||
{only works in the GUI}
|
||||
When on, mouse move events are delivered to the input queue and are
|
||||
available for mapping. The default, off, avoids the mouse movement
|
||||
overhead except when needed. See |gui-mouse-mapping|.
|
||||
Warning: Setting this option can make pending mappings to be aborted
|
||||
when the mouse is moved.
|
||||
Currently only works in the GUI, may be made to work in a terminal
|
||||
later.
|
||||
|
||||
*'mouseshape'* *'mouses'* *E547*
|
||||
'mouseshape' 'mouses' string (default "i-r:beam,s:updown,sd:udsizing,
|
||||
vs:leftright,vd:lrsizing,m:no,
|
||||
@ -5524,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,..
|
||||
@ -6665,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
|
||||
@ -7284,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
|
||||
@ -7306,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
|
||||
@ -7351,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
|
||||
@ -7656,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
|
||||
<
|
||||
@ -7702,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.
|
||||
@ -8335,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.
|
||||
@ -8350,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
|
||||
@ -8669,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
|
||||
@ -8699,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
|
||||
@ -8822,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.
|
||||
@ -9038,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 Jan 21
|
||||
*repeat.txt* For Vim version 8.2. Last change: 2022 Apr 08
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -210,22 +210,26 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
|
||||
|
||||
To source a range of lines that doesn't start with the
|
||||
|:vim9script| command in Vim9 script context, the
|
||||
|:vim9cmd| modifier can be used.
|
||||
|:vim9cmd| modifier can be used. If you use a Visual
|
||||
selection and type ":", the range in the form "'<,'>"
|
||||
can come before it: >
|
||||
:'<,'>vim9cmd source
|
||||
< Otherwise the range goes after the modifier and must
|
||||
have a colon prefixed, like all Vim9 ranges: >
|
||||
:vim9cmd :5,9source
|
||||
|
||||
When a range of lines in a buffer is sourced in the
|
||||
< When a range of lines in a buffer is sourced in the
|
||||
Vim9 script context, the previously defined
|
||||
script-local variables and functions are not cleared.
|
||||
This works like the range started with the
|
||||
":vim9script noclear" command. The "++clear" argument
|
||||
can be used to clear the script-local variables and
|
||||
functions before sourcing the script. This works like
|
||||
the range started with the |:vimscript| command
|
||||
the range started with the `:vim9script` command
|
||||
without the "noclear" argument. See |vim9-reload| for
|
||||
more information.
|
||||
Examples: >
|
||||
|
||||
:4,5source
|
||||
:vim9cmd :'<,'>source
|
||||
:10,18source ++clear
|
||||
|
||||
*:source!*
|
||||
@ -1039,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}.
|
||||
@ -1067,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*
|
||||
@ -8000,6 +8009,7 @@ lace.vim syntax.txt /*lace.vim*
|
||||
lambda eval.txt /*lambda*
|
||||
lang-variable eval.txt /*lang-variable*
|
||||
language-mapping map.txt /*language-mapping*
|
||||
language-server-protocol channel.txt /*language-server-protocol*
|
||||
last-pattern pattern.txt /*last-pattern*
|
||||
last-position-jump usr_05.txt /*last-position-jump*
|
||||
last_buffer_nr() builtin.txt /*last_buffer_nr()*
|
||||
@ -8256,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
|
||||
@ -131,8 +131,8 @@ test_gui_event({event}, {args})
|
||||
forward: set to 1 for forward search.
|
||||
|
||||
"mouse":
|
||||
Inject a mouse button click event. The supported items in
|
||||
{args} are:
|
||||
Inject either a mouse button click, or a mouse move, event.
|
||||
The supported items in {args} are:
|
||||
button: mouse button. The supported values are:
|
||||
0 right mouse button
|
||||
1 middle mouse button
|
||||
@ -151,6 +151,12 @@ test_gui_event({event}, {args})
|
||||
4 shift is pressed
|
||||
8 alt is pressed
|
||||
16 ctrl is pressed
|
||||
move: Optional; if used and TRUE then a mouse move
|
||||
event can be generated.
|
||||
Only {args} row: and col: are used and
|
||||
required; they are interpreted as pixels.
|
||||
Only results in an event when 'mousemoveevent'
|
||||
is set or a popup uses mouse move events.
|
||||
|
||||
"scrollbar":
|
||||
Set or drag the left, right or horizontal scrollbar. Only
|
||||
|
@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 8.2. Last change: 2022 Mar 18
|
||||
*todo.txt* For Vim version 8.2. Last change: 2022 Apr 18
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -38,19 +38,21 @@ browser use: https://github.com/vim/vim/issues/1234
|
||||
*known-bugs*
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
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
|
||||
vim9type.c
|
||||
- Adjust intro message to say "help version9".
|
||||
|
||||
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
|
||||
@ -151,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.
|
||||
@ -196,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.
|
||||
|
||||
@ -223,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
|
||||
@ -253,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
|
||||
@ -305,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
|
||||
@ -417,13 +430,6 @@ register, then "" doesn't contain anything. Make it still follow "+.
|
||||
|
||||
File marks merging has duplicates since 7.4.1925. (Ingo Karkat, #5733)
|
||||
|
||||
"make test_gui" crashed in submenu_change(). Fix and remove workaround in
|
||||
add_pixmap_args().
|
||||
Athena is OK.
|
||||
Motif: Build on Ubuntu can't enter any text in dialog text fields.
|
||||
Running test_gui and test_gui_init with Motif sometimes kills the window
|
||||
manager. Problem with Motif?
|
||||
|
||||
When editing a file with ":edit" the output of :swapname is relative, while
|
||||
editing it with "vim file" it is absolute. (#355)
|
||||
Which one should it be?
|
||||
@ -478,11 +484,6 @@ Test loose_clipboard() by selecting text before suspending.
|
||||
|
||||
Undo puts cursor in wrong line after "cG<Esc>" undo.
|
||||
|
||||
Implement completion for "breakadd". Should expand the second argument, e.g.
|
||||
"func", and then function names after ":breakadd func". Including
|
||||
script-local functions.
|
||||
Also for ":profile".
|
||||
|
||||
:unmap <c-n> gives error but does remove the mapping. (Antony Scriven, 2019
|
||||
Dec 19)
|
||||
|
||||
@ -1931,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)
|
||||
@ -2401,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
|
||||
@ -2501,10 +2493,6 @@ Works OK when 'cmdheight' is 2.
|
||||
8 Use a mechanism similar to omni completion to figure out the kind of tab
|
||||
for CTRL-] and jump to the appropriate matching tag (if there are
|
||||
several).
|
||||
Alternative: be able to define a function that takes the tag name and uses
|
||||
taglist() to find the right location. With indication of using CTRL-] so
|
||||
that the context can be taken into account. (Robert Webb)
|
||||
Patch by Christian Brabandt, 2013 May 31.
|
||||
|
||||
The utf class table is missing some entries:
|
||||
0x2212, minus sign
|
||||
@ -3251,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.
|
||||
@ -3263,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.
|
||||
@ -3281,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()?
|
||||
@ -3780,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().
|
||||
@ -5671,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 18
|
||||
*vim9.txt* For Vim version 8.2. Last change: 2022 Apr 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -184,8 +184,8 @@ For now you will need to pass the dictionary explicitly: >
|
||||
def DictFunc(d: dict<any>, arg: string)
|
||||
echo d[arg]
|
||||
enddef
|
||||
var d = {item: 'value', func: DictFunc}
|
||||
d.func(d, 'item')
|
||||
var ad = {item: 'value', func: DictFunc}
|
||||
ad.func(ad, 'item')
|
||||
|
||||
You can call a legacy dict function though: >
|
||||
func Legacy() dict
|
||||
@ -376,13 +376,23 @@ 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
|
||||
default to the number zero.
|
||||
*E1016* *E1052* *E1066*
|
||||
default to the number zero. For example, when declaring a list, items can be
|
||||
added: >
|
||||
var myList: list<number>
|
||||
myList->add(7)
|
||||
|
||||
Initializing a variable to a null value, e.g. `null_list`, differs from not
|
||||
initializing the variable. This throws an error: >
|
||||
var myList = null_list
|
||||
myList->add(7) # E1130: Cannot add to null list
|
||||
|
||||
< *E1016* *E1052* *E1066*
|
||||
In Vim9 script `:let` cannot be used. An existing variable is assigned to
|
||||
without any command. The same for global, window, tab, buffer and Vim
|
||||
variables, because they are not really declared. Those can also be deleted
|
||||
@ -1243,7 +1253,7 @@ Closures defined in a loop will share the same context. For example: >
|
||||
A closure must be compiled in the context that it is defined in, so that
|
||||
variables in that context can be found. This mostly happens correctly, except
|
||||
when a function is marked for debugging with `breakadd` after it was compiled.
|
||||
Make sure the define the breakpoint before compiling the outerh function.
|
||||
Make sure to define the breakpoint before compiling the outer function.
|
||||
|
||||
The "inloop" variable will exist only once, all closures put in the list refer
|
||||
to the same instance, which in the end will have the value 4. This is
|
||||
@ -1710,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
|
||||
@ -1735,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
|
||||
@ -1755,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")
|
||||
@ -155,14 +155,21 @@ au BufNewFile,BufRead *.asp
|
||||
\ setf aspvbs |
|
||||
\ endif
|
||||
|
||||
" Grub (must be before catch *.lst)
|
||||
" Grub (must be before pattern *.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
|
||||
" Must be before the pattern *.mac.
|
||||
" *.dem omitted - also used by gnuplot demos
|
||||
" *.mc omitted - used by dist#ft#McSetf()
|
||||
au BufNewFile,BufRead *.demo,*.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()
|
||||
|
||||
" Macro (VAX)
|
||||
" Assembly - Macro (VAX)
|
||||
au BufNewFile,BufRead *.mar setf vmasm
|
||||
|
||||
" Atlas
|
||||
@ -205,11 +212,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 +369,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 +401,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
|
||||
|
||||
@ -420,6 +427,9 @@ au BufNewFile,BufRead *.ex call dist#ft#ExCheck()
|
||||
au BufRead,BufNewFile mix.lock,*.exs setf elixir
|
||||
au BufRead,BufNewFile *.eex,*.leex setf eelixir
|
||||
|
||||
" Elvish
|
||||
au BufRead,BufNewFile *.elv setf elvish
|
||||
|
||||
" Euphoria 3 or 4
|
||||
au BufNewFile,BufRead *.eu,*.ew,*.exu,*.exw call dist#ft#EuphoriaCheck()
|
||||
if has("fname_case")
|
||||
@ -441,7 +451,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
|
||||
@ -948,6 +958,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
|
||||
|
||||
@ -972,7 +987,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
|
||||
@ -1005,6 +1020,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")
|
||||
@ -1135,18 +1153,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
|
||||
@ -1274,19 +1285,25 @@ 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
|
||||
|
||||
" Org
|
||||
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
|
||||
@ -1341,9 +1358,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
|
||||
@ -1629,16 +1647,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
|
||||
@ -1661,7 +1685,8 @@ au BufNewFile,BufRead *.siv,*.sieve setf sieve
|
||||
" Sendmail
|
||||
au BufNewFile,BufRead sendmail.cf setf sm
|
||||
|
||||
" Sendmail .mc files are actually m4. Could also be MS Message text file.
|
||||
" Sendmail .mc files are actually m4. Could also be MS Message text file or
|
||||
" Maxima.
|
||||
au BufNewFile,BufRead *.mc call dist#ft#McSetf()
|
||||
|
||||
" Services
|
||||
@ -1732,7 +1757,7 @@ au BufNewFile,BufRead .zshrc,.zshenv,.zlogin,.zlogout,.zcompdump setf zsh
|
||||
au BufNewFile,BufRead *.zsh setf zsh
|
||||
|
||||
" Scheme
|
||||
au BufNewFile,BufRead *.scm,*.ss,*.sld,*.rkt,*.rktd,*.rktl setf scheme
|
||||
au BufNewFile,BufRead *.scm,*.ss,*.sld,*.rkt,*.rktd,*.rktl setf scheme
|
||||
|
||||
" Screen RC
|
||||
au BufNewFile,BufRead .screenrc,screenrc setf screen
|
||||
@ -2038,6 +2063,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")
|
||||
|
@ -5,7 +5,7 @@
|
||||
" Meikel Brandmeyer <mb@kotka.de>
|
||||
" URL: https://github.com/clojure-vim/clojure.vim
|
||||
" License: Vim (see :h license)
|
||||
" Last Change: 2021-10-26
|
||||
" Last Change: 2022-03-24
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@ -43,7 +43,7 @@ setlocal commentstring=;\ %s
|
||||
" specially and hence are not indented specially.
|
||||
"
|
||||
" -*- LISPWORDS -*-
|
||||
" Generated from https://github.com/clojure-vim/clojure.vim/blob/62b215f079ce0f3834fd295c7a7f6bd8cc54bcc3/clj/src/vim_clojure_static/generate.clj
|
||||
" Generated from https://github.com/clojure-vim/clojure.vim/blob/fd280e33e84c88e97860930557dba3ff80b1a82d/clj/src/vim_clojure_static/generate.clj
|
||||
setlocal lispwords=as->,binding,bound-fn,case,catch,cond->,cond->>,condp,def,definline,definterface,defmacro,defmethod,defmulti,defn,defn-,defonce,defprotocol,defrecord,defstruct,deftest,deftest-,deftype,doseq,dotimes,doto,extend,extend-protocol,extend-type,fn,for,if,if-let,if-not,if-some,let,letfn,locking,loop,ns,proxy,reify,set-test,testing,when,when-first,when-let,when-not,when-some,while,with-bindings,with-in-str,with-local-vars,with-open,with-precision,with-redefs,with-redefs-fn,with-test
|
||||
|
||||
" Provide insert mode completions for special forms and clojure.core. As
|
||||
@ -66,10 +66,10 @@ endif
|
||||
|
||||
" Filter files in the browse dialog
|
||||
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
||||
let b:browsefilter = "Clojure Source Files (*.clj)\t*.clj\n" .
|
||||
\ "ClojureScript Source Files (*.cljs)\t*.cljs\n" .
|
||||
\ "Java Source Files (*.java)\t*.java\n" .
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
let b:browsefilter = "All Files\t*\n" .
|
||||
\ "Clojure Files\t*.clj;*.cljc;*.cljs;*.cljx\n" .
|
||||
\ "EDN Files\t*.edn\n" .
|
||||
\ "Java Files\t*.java\n"
|
||||
let b:undo_ftplugin .= ' | unlet! b:browsefilter'
|
||||
endif
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" URL: https://github.com/vim-ruby/vim-ruby
|
||||
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2020 Feb 13
|
||||
" Last Change: 2022 Mar 21
|
||||
|
||||
if (exists("b:did_ftplugin"))
|
||||
finish
|
||||
@ -53,7 +53,7 @@ endif
|
||||
" TODO:
|
||||
"setlocal define=^\\s*def
|
||||
|
||||
setlocal comments=:#
|
||||
setlocal comments=b:#
|
||||
setlocal commentstring=#\ %s
|
||||
|
||||
if !exists('g:ruby_version_paths')
|
||||
@ -87,8 +87,14 @@ endfunction
|
||||
|
||||
function! s:build_path(path) abort
|
||||
let path = join(map(copy(a:path), 'v:val ==# "." ? "" : v:val'), ',')
|
||||
if &g:path !~# '\v^%(\.,)=%(/%(usr|emx)/include,)=,$'
|
||||
let path = substitute(&g:path,',,$',',','') . ',' . path
|
||||
if &g:path =~# '\v^%(\.,)=%(/%(usr|emx)/include,)=,$'
|
||||
let path = path . ',.,,'
|
||||
elseif &g:path =~# ',\.,,$'
|
||||
let path = &g:path[0:-4] . path . ',.,,'
|
||||
elseif &g:path =~# ',,$'
|
||||
let path = &g:path[0:-2] . path . ',,'
|
||||
else
|
||||
let path = substitute(&g:path, '[^,]\zs$', ',', '') . path
|
||||
endif
|
||||
return path
|
||||
endfunction
|
||||
@ -164,6 +170,8 @@ let b:undo_ftplugin .= "| sil! cunmap <buffer> <Plug><ctag>| sil! cunmap <buffer
|
||||
if !exists("g:no_plugin_maps") && !exists("g:no_ruby_maps")
|
||||
nmap <buffer><script> <SID>: :<C-U>
|
||||
nmap <buffer><script> <SID>c: :<C-U><C-R>=v:count ? v:count : ''<CR>
|
||||
cmap <buffer> <SID><cfile> <Plug><cfile>
|
||||
cmap <buffer> <SID><ctag> <Plug><ctag>
|
||||
|
||||
nnoremap <silent> <buffer> [m :<C-U>call <SID>searchsyn('\<def\>',['rubyDefine'],'b','n')<CR>
|
||||
nnoremap <silent> <buffer> ]m :<C-U>call <SID>searchsyn('\<def\>',['rubyDefine'],'','n')<CR>
|
||||
@ -210,20 +218,20 @@ if !exists("g:no_plugin_maps") && !exists("g:no_ruby_maps")
|
||||
call s:map('c', '', '<C-R><C-F> <Plug><cfile>')
|
||||
|
||||
cmap <buffer><script><expr> <SID>tagzv &foldopen =~# 'tag' ? '<Bar>norm! zv' : ''
|
||||
call s:map('n', '<silent>', '<C-]> <SID>:exe v:count1."tag <Plug><ctag>"<SID>tagzv<CR>')
|
||||
call s:map('n', '<silent>', 'g<C-]> <SID>:exe "tjump <Plug><ctag>"<SID>tagzv<CR>')
|
||||
call s:map('n', '<silent>', 'g] <SID>:exe "tselect <Plug><ctag>"<SID>tagzv<CR>')
|
||||
call s:map('n', '<silent>', '<C-W>] <SID>:exe v:count1."stag <Plug><ctag>"<SID>tagzv<CR>')
|
||||
call s:map('n', '<silent>', '<C-W><C-]> <SID>:exe v:count1."stag <Plug><ctag>"<SID>tagzv<CR>')
|
||||
call s:map('n', '<silent>', '<C-W>g<C-]> <SID>:exe "stjump <Plug><ctag>"<SID>tagzv<CR>')
|
||||
call s:map('n', '<silent>', '<C-W>g] <SID>:exe "stselect <Plug><ctag>"<SID>tagzv<CR>')
|
||||
call s:map('n', '<silent>', '<C-W>} <SID>:exe v:count1."ptag <Plug><ctag>"<CR>')
|
||||
call s:map('n', '<silent>', '<C-W>g} <SID>:exe "ptjump <Plug><ctag>"<CR>')
|
||||
call s:map('n', '<script><silent>', '<C-]> <SID>:exe v:count1."tag <SID><ctag>"<SID>tagzv<CR>')
|
||||
call s:map('n', '<script><silent>', 'g<C-]> <SID>:exe "tjump <SID><ctag>"<SID>tagzv<CR>')
|
||||
call s:map('n', '<script><silent>', 'g] <SID>:exe "tselect <SID><ctag>"<SID>tagzv<CR>')
|
||||
call s:map('n', '<script><silent>', '<C-W>] <SID>:exe v:count1."stag <SID><ctag>"<SID>tagzv<CR>')
|
||||
call s:map('n', '<script><silent>', '<C-W><C-]> <SID>:exe v:count1."stag <SID><ctag>"<SID>tagzv<CR>')
|
||||
call s:map('n', '<script><silent>', '<C-W>g<C-]> <SID>:exe "stjump <SID><ctag>"<SID>tagzv<CR>')
|
||||
call s:map('n', '<script><silent>', '<C-W>g] <SID>:exe "stselect <SID><ctag>"<SID>tagzv<CR>')
|
||||
call s:map('n', '<script><silent>', '<C-W>} <SID>:exe v:count1."ptag <SID><ctag>"<CR>')
|
||||
call s:map('n', '<script><silent>', '<C-W>g} <SID>:exe "ptjump <SID><ctag>"<CR>')
|
||||
|
||||
call s:map('n', '<silent>', 'gf <SID>c:find <Plug><cfile><CR>')
|
||||
call s:map('n', '<silent>', '<C-W>f <SID>c:sfind <Plug><cfile><CR>')
|
||||
call s:map('n', '<silent>', '<C-W><C-F> <SID>c:sfind <Plug><cfile><CR>')
|
||||
call s:map('n', '<silent>', '<C-W>gf <SID>c:tabfind <Plug><cfile><CR>')
|
||||
call s:map('n', '<script><silent>', 'gf <SID>c:find <SID><cfile><CR>')
|
||||
call s:map('n', '<script><silent>', '<C-W>f <SID>c:sfind <SID><cfile><CR>')
|
||||
call s:map('n', '<script><silent>', '<C-W><C-F> <SID>c:sfind <SID><cfile><CR>')
|
||||
call s:map('n', '<script><silent>', '<C-W>gf <SID>c:tabfind <SID><cfile><CR>')
|
||||
endif
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
|
@ -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
|
||||
|
@ -5,7 +5,7 @@
|
||||
" Meikel Brandmeyer <mb@kotka.de>
|
||||
" URL: https://github.com/clojure-vim/clojure.vim
|
||||
" License: Vim (see :h license)
|
||||
" Last Change: 2021-10-26
|
||||
" Last Change: 2022-03-24
|
||||
|
||||
if exists("b:did_indent")
|
||||
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
|
||||
|
@ -4,7 +4,7 @@
|
||||
" Previous Maintainer: Nikolai Weibull <now at bitwi.se>
|
||||
" URL: https://github.com/vim-ruby/vim-ruby
|
||||
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2021 Feb 03
|
||||
" Last Change: 2022 Mar 22
|
||||
|
||||
" 0. Initialization {{{1
|
||||
" =================
|
||||
@ -40,9 +40,11 @@ setlocal nosmartindent
|
||||
" Now, set up our indentation expression and keys that trigger it.
|
||||
setlocal indentexpr=GetRubyIndent(v:lnum)
|
||||
setlocal indentkeys=0{,0},0),0],!^F,o,O,e,:,.
|
||||
setlocal indentkeys+==end,=else,=elsif,=when,=ensure,=rescue,==begin,==end
|
||||
setlocal indentkeys+==end,=else,=elsif,=when,=in\ ,=ensure,=rescue,==begin,==end
|
||||
setlocal indentkeys+==private,=protected,=public
|
||||
|
||||
let b:undo_indent = "setlocal indentexpr< indentkeys< smartindent<"
|
||||
|
||||
" Only define the function once.
|
||||
if exists("*GetRubyIndent")
|
||||
finish
|
||||
@ -85,14 +87,17 @@ let s:skip_expr =
|
||||
" Regex used for words that, at the start of a line, add a level of indent.
|
||||
let s:ruby_indent_keywords =
|
||||
\ '^\s*\zs\<\%(module\|class\|if\|for' .
|
||||
\ '\|while\|until\|else\|elsif\|case\|when\|unless\|begin\|ensure\|rescue' .
|
||||
\ '\|while\|until\|else\|elsif\|case\|when\|in\|unless\|begin\|ensure\|rescue' .
|
||||
\ '\|\%(\K\k*[!?]\?\s\+\)\=def\):\@!\>' .
|
||||
\ '\|\%([=,*/%+-]\|<<\|>>\|:\s\)\s*\zs' .
|
||||
\ '\<\%(if\|for\|while\|until\|case\|unless\|begin\):\@!\>'
|
||||
|
||||
" Def without an end clause: def method_call(...) = <expression>
|
||||
let s:ruby_endless_def = '\<def\s\+\k\+[!?]\=\%((.*)\|\s\)\s*='
|
||||
|
||||
" Regex used for words that, at the start of a line, remove a level of indent.
|
||||
let s:ruby_deindent_keywords =
|
||||
\ '^\s*\zs\<\%(ensure\|else\|rescue\|elsif\|when\|end\):\@!\>'
|
||||
\ '^\s*\zs\<\%(ensure\|else\|rescue\|elsif\|when\|in\|end\):\@!\>'
|
||||
|
||||
" Regex that defines the start-match for the 'end' keyword.
|
||||
"let s:end_start_regex = '\%(^\|[^.]\)\<\%(module\|class\|def\|if\|for\|while\|until\|case\|unless\|begin\|do\)\>'
|
||||
@ -104,15 +109,31 @@ let s:end_start_regex =
|
||||
\ '\|\%(^\|[^.:@$]\)\@<=\<do:\@!\>'
|
||||
|
||||
" Regex that defines the middle-match for the 'end' keyword.
|
||||
let s:end_middle_regex = '\<\%(ensure\|else\|\%(\%(^\|;\)\s*\)\@<=\<rescue:\@!\>\|when\|elsif\):\@!\>'
|
||||
let s:end_middle_regex = '\<\%(ensure\|else\|\%(\%(^\|;\)\s*\)\@<=\<rescue:\@!\>\|when\|\%(\%(^\|;\)\s*\)\@<=\<in\|elsif\):\@!\>'
|
||||
|
||||
" Regex that defines the end-match for the 'end' keyword.
|
||||
let s:end_end_regex = '\%(^\|[^.:@$]\)\@<=\<end:\@!\>'
|
||||
|
||||
" Expression used for searchpair() call for finding match for 'end' keyword.
|
||||
let s:end_skip_expr = s:skip_expr .
|
||||
\ ' || (expand("<cword>") == "do"' .
|
||||
\ ' && getline(".") =~ "^\\s*\\<\\(while\\|until\\|for\\):\\@!\\>")'
|
||||
" Expression used for searchpair() call for finding a match for an 'end' keyword.
|
||||
function! s:EndSkipExpr()
|
||||
if eval(s:skip_expr)
|
||||
return 1
|
||||
elseif expand('<cword>') == 'do'
|
||||
\ && getline(".") =~ '^\s*\<\(while\|until\|for\):\@!\>'
|
||||
return 1
|
||||
elseif getline('.') =~ s:ruby_endless_def
|
||||
return 1
|
||||
elseif getline('.') =~ '\<def\s\+\k\+[!?]\=([^)]*$'
|
||||
" Then it's a `def method(` with a possible `) =` later
|
||||
call search('\<def\s\+\k\+\zs(', 'W', line('.'))
|
||||
normal! %
|
||||
return getline('.') =~ ')\s*='
|
||||
else
|
||||
return 0
|
||||
endif
|
||||
endfunction
|
||||
|
||||
let s:end_skip_expr = function('s:EndSkipExpr')
|
||||
|
||||
" Regex that defines continuation lines, not including (, {, or [.
|
||||
let s:non_bracket_continuation_regex =
|
||||
@ -572,6 +593,11 @@ function! s:AfterUnbalancedBracket(pline_info) abort
|
||||
call cursor(info.plnum, closing.pos + 1)
|
||||
normal! %
|
||||
|
||||
if strpart(info.pline, closing.pos) =~ '^)\s*='
|
||||
" special case: the closing `) =` of an endless def
|
||||
return indent(s:GetMSL(line('.')))
|
||||
endif
|
||||
|
||||
if s:Match(line('.'), s:ruby_indent_keywords)
|
||||
return indent('.') + info.sw
|
||||
else
|
||||
@ -610,7 +636,7 @@ function! s:AfterIndentKeyword(pline_info) abort
|
||||
let info = a:pline_info
|
||||
let col = s:Match(info.plnum, s:ruby_indent_keywords)
|
||||
|
||||
if col > 0
|
||||
if col > 0 && s:Match(info.plnum, s:ruby_endless_def) <= 0
|
||||
call cursor(info.plnum, col)
|
||||
let ind = virtcol('.') - 1 + info.sw
|
||||
" TODO: make this better (we need to count them) (or, if a searchpair
|
||||
@ -657,7 +683,7 @@ function! s:IndentingKeywordInMSL(msl_info) abort
|
||||
" TODO: this does not take into account contrived things such as
|
||||
" module Foo; class Bar; end
|
||||
let col = s:Match(info.plnum_msl, s:ruby_indent_keywords)
|
||||
if col > 0
|
||||
if col > 0 && s:Match(info.plnum_msl, s:ruby_endless_def) <= 0
|
||||
let ind = indent(info.plnum_msl) + info.sw
|
||||
if s:Match(info.plnum_msl, s:end_end_regex)
|
||||
let ind = ind - info.sw
|
||||
|
@ -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
|
||||
|
File diff suppressed because one or more lines are too long
@ -3,7 +3,7 @@
|
||||
" Maintainer: Debian Vim Maintainers
|
||||
" Former Maintainers: Gerfried Fuchs <alfie@ist.org>
|
||||
" Wichert Akkerman <wakkerma@debian.org>
|
||||
" Last Change: 2021 Oct 19
|
||||
" Last Change: 2022 Mar 28
|
||||
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debchangelog.vim
|
||||
|
||||
" Standard syntax initialization
|
||||
@ -24,7 +24,7 @@ let s:supported = [
|
||||
\ 'jessie', 'stretch', 'buster', 'bullseye', 'bookworm',
|
||||
\ 'trixie', 'sid', 'rc-buggy',
|
||||
\
|
||||
\ 'trusty', 'xenial', 'bionic', 'focal', 'hirsute', 'impish', 'jammy',
|
||||
\ 'trusty', 'xenial', 'bionic', 'focal', 'impish', 'jammy',
|
||||
\ 'devel'
|
||||
\ ]
|
||||
let s:unsupported = [
|
||||
@ -35,7 +35,7 @@ let s:unsupported = [
|
||||
\ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid',
|
||||
\ 'maverick', 'natty', 'oneiric', 'precise', 'quantal', 'raring', 'saucy',
|
||||
\ 'utopic', 'vivid', 'wily', 'yakkety', 'zesty', 'artful', 'cosmic',
|
||||
\ 'disco', 'eoan', 'groovy'
|
||||
\ 'disco', 'eoan', 'hirsute', 'groovy'
|
||||
\ ]
|
||||
let &cpo=s:cpo
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
" Language: Debian sources.list
|
||||
" Maintainer: Debian Vim Maintainers
|
||||
" Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl>
|
||||
" Last Change: 2021 Oct 19
|
||||
" Last Change: 2022 Mar 28
|
||||
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debsources.vim
|
||||
|
||||
" Standard syntax initialization
|
||||
@ -26,7 +26,7 @@ let s:supported = [
|
||||
\ 'jessie', 'stretch', 'buster', 'bullseye', 'bookworm',
|
||||
\ 'trixie', 'sid', 'rc-buggy',
|
||||
\
|
||||
\ 'trusty', 'xenial', 'bionic', 'focal', 'hirsute', 'impish', 'jammy',
|
||||
\ 'trusty', 'xenial', 'bionic', 'focal', 'impish', 'jammy',
|
||||
\ 'devel'
|
||||
\ ]
|
||||
let s:unsupported = [
|
||||
@ -37,7 +37,7 @@ let s:unsupported = [
|
||||
\ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid',
|
||||
\ 'maverick', 'natty', 'oneiric', 'precise', 'quantal', 'raring', 'saucy',
|
||||
\ 'utopic', 'vivid', 'wily', 'yakkety', 'zesty', 'artful', 'cosmic',
|
||||
\ 'disco', 'eoan', 'groovy'
|
||||
\ 'disco', 'eoan', 'hirsute', 'groovy'
|
||||
\ ]
|
||||
let &cpo=s:cpo
|
||||
|
||||
|
@ -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:]]*)?$"
|
||||
|
@ -3,9 +3,9 @@
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" URL: https://github.com/vim-ruby/vim-ruby
|
||||
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2018 Jul 04
|
||||
" Last Change: 2022 Mar 18
|
||||
|
||||
if &syntax !~# '\<eruby\>' || get(b:, 'current_syntax') =~# '\<eruby\>'
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
@ -19,8 +19,6 @@ endif
|
||||
|
||||
if &filetype =~ '^eruby\.'
|
||||
let b:eruby_subtype = matchstr(&filetype,'^eruby\.\zs\w\+')
|
||||
elseif &filetype =~ '^.*\.eruby\>'
|
||||
let b:eruby_subtype = matchstr(&filetype,'^.\{-\}\ze\.eruby\>')
|
||||
elseif !exists("b:eruby_subtype") && main_syntax == 'eruby'
|
||||
let s:lines = getline(1)."\n".getline(2)."\n".getline(3)."\n".getline(4)."\n".getline(5)."\n".getline("$")
|
||||
let b:eruby_subtype = matchstr(s:lines,'eruby_subtype=\zs\w\+')
|
||||
@ -54,10 +52,10 @@ if !b:eruby_nest_level
|
||||
let b:eruby_nest_level = 1
|
||||
endif
|
||||
|
||||
if get(b:, 'eruby_subtype', '') !~# '^\%(eruby\)\=$' && &syntax =~# '^eruby\>'
|
||||
if exists("b:eruby_subtype") && b:eruby_subtype != '' && b:eruby_subtype !=? 'eruby'
|
||||
exe "runtime! syntax/".b:eruby_subtype.".vim"
|
||||
unlet! b:current_syntax
|
||||
endif
|
||||
unlet! b:current_syntax
|
||||
syn include @rubyTop syntax/ruby.vim
|
||||
|
||||
syn cluster erubyRegions contains=erubyOneLiner,erubyBlock,erubyExpression,erubyComment
|
||||
@ -72,7 +70,7 @@ exe 'syn region erubyComment matchgroup=erubyDelimiter start="<%\{1,'.b:erub
|
||||
hi def link erubyDelimiter PreProc
|
||||
hi def link erubyComment Comment
|
||||
|
||||
let b:current_syntax = matchstr(&syntax, '^.*\<eruby\>')
|
||||
let b:current_syntax = 'eruby'
|
||||
|
||||
if main_syntax == 'eruby'
|
||||
unlet main_syntax
|
||||
|
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'
|
@ -3,7 +3,7 @@
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" URL: https://github.com/vim-ruby/vim-ruby
|
||||
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2021 Jun 06
|
||||
" Last Change: 2021 Nov 03
|
||||
" ----------------------------------------------------------------------------
|
||||
"
|
||||
" Previous Maintainer: Mirko Nasato
|
||||
@ -66,7 +66,7 @@ endfunction
|
||||
com! -nargs=* SynFold call s:run_syntax_fold(<q-args>)
|
||||
|
||||
" Not-Top Cluster {{{1
|
||||
syn cluster rubyNotTop contains=@rubyCommentNotTop,@rubyStringNotTop,@rubyRegexpSpecial,@rubyDeclaration,@rubyExceptionHandler,@rubyClassOperator,rubyConditional,rubyModuleName,rubyClassName,rubySymbolDelimiter,rubyParentheses,@Spell
|
||||
syn cluster rubyNotTop contains=@rubyCommentNotTop,@rubyStringNotTop,@rubyRegexpSpecial,@rubyDeclaration,@rubyExceptionHandler,@rubyClassOperator,rubyConditional,rubyModuleName,rubyClassName,rubySymbolDelimiter,rubyDoubleQuoteSymbolDelimiter,rubySingleQuoteSymbolDelimiter,rubyParentheses,@Spell
|
||||
|
||||
" Whitespace Errors {{{1
|
||||
if exists("ruby_space_errors")
|
||||
@ -364,6 +364,9 @@ if !exists("b:ruby_no_expensive") && !exists("ruby_no_expensive")
|
||||
SynFold 'class' syn region rubyClassBlock start="\<class\>" matchgroup=rubyClass skip="\<end:" end="\<end\>" contains=ALLBUT,@rubyNotTop
|
||||
SynFold 'module' syn region rubyModuleBlock start="\<module\>" matchgroup=rubyModule skip="\<end:" end="\<end\>" contains=ALLBUT,@rubyNotTop
|
||||
|
||||
" endless def
|
||||
syn match rubyDefine "\<def\s\+\ze[^[:space:];#(]\+\%(\s\+\|\s*(.*)\s*\)=" nextgroup=rubyMethodDeclaration skipwhite
|
||||
|
||||
" modifiers
|
||||
syn match rubyLineContinuation "\\$" nextgroup=@rubyModifier skipwhite skipnl
|
||||
syn match rubyConditionalModifier "\<\%(if\|unless\)\>"
|
||||
@ -430,9 +433,10 @@ endif
|
||||
" Comments and Documentation {{{1
|
||||
syn match rubySharpBang "\%^#!.*" display
|
||||
syn keyword rubyTodo FIXME NOTE TODO OPTIMIZE HACK REVIEW XXX todo contained
|
||||
syn match rubyEncoding "[[:alnum:]-]\+" contained display
|
||||
syn match rubyEncoding "[[:alnum:]-_]\+" contained display
|
||||
syn match rubyMagicComment "\c\%<3l#\s*\zs\%(coding\|encoding\):" contained nextgroup=rubyEncoding skipwhite
|
||||
syn match rubyMagicComment "\c\%<10l#\s*\zs\%(frozen_string_literal\|warn_indent\|warn_past_scope\):" contained nextgroup=rubyBoolean skipwhite
|
||||
syn match rubyMagicComment "\c\%<10l#\s*\zs\%(shareable_constant_value\):" contained nextgroup=rubyEncoding skipwhite
|
||||
syn match rubyComment "#.*" contains=@rubyCommentSpecial,rubySpaceError,@Spell
|
||||
|
||||
syn cluster rubyCommentSpecial contains=rubySharpBang,rubyTodo,rubyMagicComment
|
||||
@ -465,6 +469,10 @@ syn match rubyDefinedOperator "\%#=1\<defined?" display
|
||||
syn match rubySymbol "\%(\w\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[?!]\=::\@!"he=e-1 contained containedin=rubyBlockParameterList,rubyCurlyBlock
|
||||
syn match rubySymbol "[]})\"':]\@1<!\<\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[!?]\=:[[:space:],;]\@="he=e-1
|
||||
syn match rubySymbol "[[:space:],{(]\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[!?]\=:[[:space:],;]\@="hs=s+1,he=e-1
|
||||
syn match rubySingleQuoteSymbolDelimiter "'" contained
|
||||
syn match rubySymbol "'\%(\\.\|[^']\)*'::\@!"he=e-1 contains=rubyQuoteEscape,rubyBackslashEscape,rubySingleQuoteSymbolDelimiter
|
||||
syn match rubyDoubleQuoteSymbolDelimiter "\"" contained
|
||||
syn match rubySymbol "\"\%(\\.\|[^\"]\)*\"::\@!"he=e-1 contains=@rubyStringSpecial,rubyDoubleQuoteSymbolDelimiter
|
||||
|
||||
" __END__ Directive {{{1
|
||||
SynFold '__END__' syn region rubyData matchgroup=rubyDataDirective start="^__END__$" end="\%$"
|
||||
@ -565,6 +573,8 @@ hi def link rubyHeredocDelimiter rubyStringDelimiter
|
||||
hi def link rubyPercentRegexpDelimiter rubyRegexpDelimiter
|
||||
hi def link rubyPercentStringDelimiter rubyStringDelimiter
|
||||
hi def link rubyPercentSymbolDelimiter rubySymbolDelimiter
|
||||
hi def link rubyDoubleQuoteSymbolDelimiter rubySymbolDelimiter
|
||||
hi def link rubySingleQuoteSymbolDelimiter rubySymbolDelimiter
|
||||
hi def link rubyRegexpDelimiter rubyStringDelimiter
|
||||
hi def link rubySymbolDelimiter rubySymbol
|
||||
hi def link rubyString String
|
||||
|
@ -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,5 +1,5 @@
|
||||
" Language: tmux(1) configuration file
|
||||
" Version: 3.2a (git-44ada9cd)
|
||||
" Version: 3.3-rc (git-964deae4)
|
||||
" URL: https://github.com/ericpruitt/tmux.vim/
|
||||
" Maintainer: Eric Pruitt <eric.pruitt@gmail.com>
|
||||
" License: 2-Clause BSD (http://opensource.org/licenses/BSD-2-Clause)
|
||||
@ -18,40 +18,49 @@ syntax iskeyword @,48-57,_,192-255,-
|
||||
syntax case match
|
||||
|
||||
syn keyword tmuxAction none any current other
|
||||
syn keyword tmuxBoolean off on
|
||||
syn keyword tmuxBoolean off on yes no
|
||||
|
||||
syn keyword tmuxTodo FIXME NOTE TODO XXX contained
|
||||
|
||||
syn match tmuxColour /\<colour[0-9]\+/ display
|
||||
syn match tmuxColour /\<colou\?r[0-9]\+\>/ display
|
||||
syn match tmuxKey /\(C-\|M-\|\^\)\+\S\+/ display
|
||||
syn match tmuxNumber /\<\d\+\>/ display
|
||||
syn match tmuxFlags /\s-\a\+/ display
|
||||
syn match tmuxVariable /\w\+=/ display
|
||||
syn match tmuxVariableExpansion /\${\=\w\+}\=/ display
|
||||
syn match tmuxControl /%\(if\|elif\|else\|endif\)/
|
||||
syn match tmuxVariableExpansion /\$\({[A-Za-z_]\w*}\|[A-Za-z_]\w*\)/ display
|
||||
syn match tmuxControl /^\s*%\(if\|elif\|else\|endif\)\>/
|
||||
syn match tmuxEscape /\\\(u\x\{4\}\|U\x\{8\}\|\o\{3\}\|[\\ernt$]\)/ display
|
||||
|
||||
syn region tmuxComment start=/#/ skip=/\\\@<!\\$/ end=/$/ contains=tmuxTodo,@Spell
|
||||
|
||||
syn region tmuxString start=+"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=tmuxFormatString,@Spell
|
||||
syn region tmuxString start=+'+ skip=+\\\\\|\\'\|\\$+ excludenl end=+'+ end='$' contains=tmuxFormatString,@Spell
|
||||
syn region tmuxString start=+"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=tmuxFormatString,tmuxEscape,tmuxVariableExpansion,@Spell
|
||||
syn region tmuxUninterpolatedString start=+'+ skip=+\\$+ excludenl end=+'+ end='$' contains=tmuxFormatString,@Spell
|
||||
|
||||
" TODO: Figure out how escaping works inside of #(...) and #{...} blocks.
|
||||
syn region tmuxFormatString start=/#[#DFhHIPSTW]/ end=// contained keepend
|
||||
syn region tmuxFormatString start=/#{/ skip=/#{.\{-}}/ end=/}/ keepend
|
||||
syn region tmuxFormatString start=/#(/ skip=/#(.\{-})/ end=/)/ contained keepend
|
||||
|
||||
" At the time of this writing, the latest tmux release will parse a line
|
||||
" reading "abc=xyz set-option ..." as an assignment followed by a command
|
||||
" hence the presence of "\s" in the "end" argument.
|
||||
syn region tmuxAssignment matchgroup=tmuxVariable start=/^\s*[A-Za-z_]\w*=\@=/ skip=/\\$\|\\\s/ end=/\s\|$/ contains=tmuxString,tmuxUninterpolatedString,tmuxVariableExpansion,tmuxControl,tmuxEscape
|
||||
|
||||
hi def link tmuxFormatString Identifier
|
||||
hi def link tmuxAction Boolean
|
||||
hi def link tmuxBoolean Boolean
|
||||
hi def link tmuxCommands Keyword
|
||||
hi def link tmuxControl Keyword
|
||||
hi def link tmuxControl PreCondit
|
||||
hi def link tmuxComment Comment
|
||||
hi def link tmuxEscape Special
|
||||
hi def link tmuxEscapeUnquoted Special
|
||||
hi def link tmuxKey Special
|
||||
hi def link tmuxNumber Number
|
||||
hi def link tmuxFlags Identifier
|
||||
hi def link tmuxOptions Function
|
||||
hi def link tmuxString String
|
||||
hi def link tmuxTodo Todo
|
||||
hi def link tmuxUninterpolatedString
|
||||
\ String
|
||||
hi def link tmuxVariable Identifier
|
||||
hi def link tmuxVariableExpansion Identifier
|
||||
|
||||
@ -61,63 +70,85 @@ hi def link tmuxVariableExpansion Identifier
|
||||
if get(g:, "tmux_syntax_colors", 1)
|
||||
for s:i in range(0, 255)
|
||||
let s:bg = (!s:i || s:i == 16 || (s:i > 231 && s:i < 235)) ? 15 : "none"
|
||||
exec "syn match tmuxColour" . s:i . " /\\<colour" . s:i . "\\>/ display"
|
||||
exec "syn match tmuxColour" . s:i . " /\\<colou\\?r" . s:i . "\\>/ display"
|
||||
\ " | highlight tmuxColour" . s:i . " ctermfg=" . s:i . " ctermbg=" . s:bg
|
||||
endfor
|
||||
endif
|
||||
|
||||
syn keyword tmuxOptions
|
||||
\ backspace buffer-limit command-alias copy-command default-terminal editor
|
||||
\ escape-time exit-empty activity-action assume-paste-time base-index
|
||||
\ bell-action default-command default-shell default-size destroy-unattached
|
||||
\ activity-action after-bind-key after-capture-pane after-copy-mode
|
||||
\ after-display-message after-display-panes after-kill-pane
|
||||
\ after-list-buffers after-list-clients after-list-keys after-list-panes
|
||||
\ after-list-sessions after-list-windows after-load-buffer after-lock-server
|
||||
\ after-new-session after-new-window after-paste-buffer after-pipe-pane
|
||||
\ after-queue after-refresh-client after-rename-session after-rename-window
|
||||
\ after-resize-pane after-resize-window after-save-buffer
|
||||
\ after-select-layout after-select-pane after-select-window after-send-keys
|
||||
\ after-set-buffer after-set-environment after-set-hook after-set-option
|
||||
\ after-show-environment after-show-messages after-show-options
|
||||
\ after-split-window after-unbind-key aggressive-resize alert-activity
|
||||
\ alert-bell alert-silence allow-passthrough allow-rename alternate-screen
|
||||
\ assume-paste-time automatic-rename automatic-rename-format backspace
|
||||
\ base-index bell-action buffer-limit client-active client-attached
|
||||
\ client-detached client-focus-in client-focus-out client-resized
|
||||
\ client-session-changed clock-mode-colour clock-mode-style command-alias
|
||||
\ copy-command copy-mode-current-match-style copy-mode-mark-style
|
||||
\ copy-mode-match-style cursor-colour cursor-style default-command
|
||||
\ default-shell default-size default-terminal destroy-unattached
|
||||
\ detach-on-destroy display-panes-active-colour display-panes-colour
|
||||
\ display-panes-time display-time exit-unattached extended-keys focus-events
|
||||
\ history-file history-limit key-table lock-after-time lock-command
|
||||
\ message-command-style message-limit message-style aggressive-resize
|
||||
\ allow-rename alternate-screen automatic-rename automatic-rename-format
|
||||
\ clock-mode-colour clock-mode-style copy-mode-current-match-style
|
||||
\ copy-mode-mark-style copy-mode-match-style main-pane-height
|
||||
\ main-pane-width mode-keys mode-style monitor-activity monitor-bell
|
||||
\ monitor-silence mouse other-pane-height other-pane-width
|
||||
\ pane-active-border-style pane-base-index pane-border-format
|
||||
\ pane-border-lines pane-border-status pane-border-style pane-colours prefix
|
||||
\ prefix2 prompt-history-limit remain-on-exit renumber-windows repeat-time
|
||||
\ set-clipboard set-titles set-titles-string silence-action status status-bg
|
||||
\ status-fg status-format status-interval status-justify status-keys
|
||||
\ status-left status-left-length status-left-style status-position
|
||||
\ status-right status-right-length status-right-style status-style
|
||||
\ synchronize-panes terminal-features terminal-overrides update-environment
|
||||
\ user-keys visual-activity visual-bell visual-silence window-active-style
|
||||
\ display-panes-time display-time editor escape-time exit-empty
|
||||
\ exit-unattached extended-keys fill-character focus-events history-file
|
||||
\ history-limit key-table lock-after-time lock-command main-pane-height
|
||||
\ main-pane-width message-command-style message-limit message-style
|
||||
\ mode-keys mode-style monitor-activity monitor-bell monitor-silence mouse
|
||||
\ other-pane-height other-pane-width pane-active-border-style
|
||||
\ pane-base-index pane-border-format pane-border-indicators
|
||||
\ pane-border-lines pane-border-status pane-border-style pane-colours
|
||||
\ pane-died pane-exited pane-focus-in pane-focus-out pane-mode-changed
|
||||
\ pane-set-clipboard pane-title-changed popup-border-lines
|
||||
\ popup-border-style popup-style prefix prefix2 prompt-history-limit
|
||||
\ remain-on-exit remain-on-exit-format renumber-windows repeat-time
|
||||
\ scroll-on-clear session-closed session-created session-renamed
|
||||
\ session-window-changed set-clipboard set-titles set-titles-string
|
||||
\ silence-action status status-bg status-fg status-format status-interval
|
||||
\ status-justify status-keys status-left status-left-length
|
||||
\ status-left-style status-position status-right status-right-length
|
||||
\ status-right-style status-style synchronize-panes terminal-features
|
||||
\ terminal-overrides update-environment user-keys visual-activity
|
||||
\ visual-bell visual-silence window-active-style window-layout-changed
|
||||
\ window-linked window-pane-changed window-renamed window-resized
|
||||
\ window-size window-status-activity-style window-status-bell-style
|
||||
\ window-status-current-format window-status-current-style
|
||||
\ window-status-format window-status-last-style window-status-separator
|
||||
\ window-status-style window-style word-separators wrap-search
|
||||
\ window-status-style window-style window-unlinked word-separators
|
||||
\ wrap-search xterm-keys
|
||||
|
||||
syn keyword tmuxCommands
|
||||
\ attach attach-session bind bind-key break-pane breakp capture-pane
|
||||
\ capturep choose-buffer choose-client choose-tree clear-history clearhist
|
||||
\ capturep choose-buffer choose-client choose-session choose-tree
|
||||
\ choose-window clear-history clear-prompt-history clearhist clearphist
|
||||
\ clock-mode command-prompt confirm confirm-before copy-mode customize-mode
|
||||
\ detach detach-client display display-menu display-message display-panes
|
||||
\ display-popup displayp find-window findw if if-shell join-pane joinp
|
||||
\ kill-pane kill-server kill-session kill-window killp has has-session killw
|
||||
\ delete-buffer deleteb detach detach-client display display-menu
|
||||
\ display-message display-panes display-popup displayp find-window findw has
|
||||
\ has-session if if-shell info join-pane joinp kill-pane kill-server
|
||||
\ kill-session kill-window killp killw last last-pane last-window lastp
|
||||
\ link-window linkw list-buffers list-clients list-commands list-keys
|
||||
\ list-panes list-sessions list-windows load-buffer loadb lock lock-client
|
||||
\ lock-server lock-session lockc last-pane lastp locks ls last last-window
|
||||
\ lsb delete-buffer deleteb lsc lscm lsk lsp lsw menu move-pane move-window
|
||||
\ clear-prompt-history clearphist movep movew new new-session new-window
|
||||
\ neww next next-layout next-window nextl paste-buffer pasteb pipe-pane
|
||||
\ pipep popup prev previous-layout previous-window prevl refresh
|
||||
\ refresh-client rename rename-session rename-window renamew resize-pane
|
||||
\ resize-window resizep resizew respawn-pane respawn-window respawnp
|
||||
\ respawnw rotate-window rotatew run run-shell save-buffer saveb
|
||||
\ select-layout select-pane select-window selectl selectp selectw send
|
||||
\ send-keys send-prefix set set-buffer set-environment set-hook set-option
|
||||
\ lock-server lock-session lockc locks ls lsb lsc lscm lsk lsp lsw menu
|
||||
\ move-pane move-window movep movew new new-session new-window neww next
|
||||
\ next-layout next-window nextl paste-buffer pasteb pipe-pane pipep popup
|
||||
\ prev previous-layout previous-window prevl refresh refresh-client rename
|
||||
\ rename-session rename-window renamew resize-pane resize-window resizep
|
||||
\ resizew respawn-pane respawn-window respawnp respawnw rotate-window
|
||||
\ rotatew run run-shell save-buffer saveb select-layout select-pane
|
||||
\ select-window selectl selectp selectw send send-keys send-prefix
|
||||
\ server-info set set-buffer set-environment set-hook set-option
|
||||
\ set-window-option setb setenv setw show show-buffer show-environment
|
||||
\ show-hooks show-messages show-options show-prompt-history
|
||||
\ show-window-options showb showenv showmsgs showphist showw source
|
||||
\ source-file split-window splitw start start-server suspend-client suspendc
|
||||
\ swap-pane swap-window swapp swapw switch-client switchc unbind unbind-key
|
||||
\ unlink-window unlinkw wait wait-for
|
||||
\ source-file split-pane split-window splitp splitw start start-server
|
||||
\ suspend-client suspendc swap-pane swap-window swapp swapw switch-client
|
||||
\ switchc unbind unbind-key unlink-window unlinkw wait wait-for
|
||||
|
||||
let &cpo = s:original_cpo
|
||||
unlet! s:original_cpo s:bg s:i
|
||||
|
@ -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
|
||||
|
49
src/Makefile
49
src/Makefile
@ -182,10 +182,7 @@
|
||||
#Irix 6.5 cc ? 6.0 (S) David Harrison
|
||||
#Irix 64 bit 4.5 (K) Jon Wright
|
||||
#Linux 2.0 gcc-2.7.2 Infomagic Motif 4.3 (3) Ronald Rietman
|
||||
#Linux 2.0.31 gcc +X11 +GUI Athena 5.0w (U) Darren Hiebert
|
||||
#LynxOS 3.0.1 2.9-gnupro-98r2 +X11 +GUI Athena 5.7.1(O) Lorenz Hahn
|
||||
#LynxOS 3.1.0 2.9-gnupro-98r2 +X11 +GUI Athena 5.7.1(O) Lorenz Hahn
|
||||
#NEC UP4800 UNIX_SV 4.2MP cc +X11R6 Motif,Athena4.6b (Q) Lennart Schultz
|
||||
#NEC UP4800 UNIX_SV 4.2MP cc +X11R6 Motif 4.6b (Q) Lennart Schultz
|
||||
#NetBSD 1.0A gcc-2.4.5 -X11 -GUI 3.21 (X) Juergen Weigert
|
||||
#QNX 4.2 wcc386-10.6 -X11 4.2 (D) G.F. Desrochers
|
||||
#QNX 4.23 Watcom -X11 4.2 (F) John Oleynick
|
||||
@ -199,14 +196,12 @@
|
||||
#Solaris 2.4 (Sparc) cc +X11 +GUI 3.29 (9) Glauber
|
||||
#Solaris 2.4/2.5 clcc +X11 -GUI openwin 3.20 (7) Robert Colon
|
||||
#Solaris 2.5 (sun4m) cc (SC4.0) +X11R6 +GUI (CDE) 4.6b (E) Andrew Large
|
||||
#Solaris 2.5 cc +X11 +GUI Athena 4.2 (9) Sonia Heimann
|
||||
#Solaris 2.5 gcc 2.5.6 +X11 Motif 5.0m (R) Ant. Colombo
|
||||
#Solaris 2.6 gcc 2.8.1 ncurses 5.3 (G) Larry W. Virden
|
||||
#Solaris with -lthread 5.5 (W) K. Nagano
|
||||
#Solaris gcc (b) Riccardo
|
||||
#SunOS 4.1.x +X11 -GUI 5.1b (J) Bram Moolenaar
|
||||
#SunOS 4.1.3_U1 (sun4c) gcc +X11 +GUI Athena 5.0w (J) Darren Hiebert
|
||||
#SUPER-UX 6.2 (NEC SX-4) cc +X11R6 Motif,Athena4.6b (P) Lennart Schultz
|
||||
#SUPER-UX 6.2 (NEC SX-4) cc +X11R6 Motif 4.6b (P) Lennart Schultz
|
||||
#Tandem/NSK (c) Matthew Woehlke
|
||||
#Unisys 6035 cc +X11 Motif 5.3 (8) Glauber Ribeiro
|
||||
#ESIX V4.2 cc +X11 6.0 (a) Reinhard Wobst
|
||||
@ -1342,8 +1337,8 @@ HAIKUGUI_TESTTARGET = gui
|
||||
HAIKUGUI_BUNDLE =
|
||||
|
||||
# All GUI files
|
||||
ALL_GUI_SRC = gui.c gui_gtk.c gui_gtk_f.c gui_motif.c gui_xmdlg.c gui_xmebw.c gui_athena.c gui_gtk_x11.c gui_x11.c gui_at_sb.c gui_at_fs.c gui_haiku.cc
|
||||
ALL_GUI_PRO = gui.pro gui_gtk.pro gui_motif.pro gui_xmdlg.pro gui_athena.pro gui_gtk_x11.pro gui_x11.pro gui_w32.pro gui_photon.pro gui_haiku.pro
|
||||
ALL_GUI_SRC = gui.c gui_gtk.c gui_gtk_f.c gui_motif.c gui_xmdlg.c gui_xmebw.c gui_gtk_x11.c gui_x11.c gui_haiku.cc
|
||||
ALL_GUI_PRO = gui.pro gui_gtk.pro gui_motif.pro gui_xmdlg.pro gui_gtk_x11.pro gui_x11.pro gui_w32.pro gui_photon.pro gui_haiku.pro
|
||||
|
||||
# }}}
|
||||
|
||||
@ -3245,15 +3240,6 @@ objects/help.o: help.c
|
||||
objects/gui.o: gui.c
|
||||
$(CCC) -o $@ gui.c
|
||||
|
||||
objects/gui_at_fs.o: gui_at_fs.c
|
||||
$(CCC) -o $@ gui_at_fs.c
|
||||
|
||||
objects/gui_at_sb.o: gui_at_sb.c
|
||||
$(CCC) -o $@ gui_at_sb.c
|
||||
|
||||
objects/gui_athena.o: gui_athena.c
|
||||
$(CCC) -o $@ gui_athena.c
|
||||
|
||||
objects/beval.o: beval.c
|
||||
$(CCC) -o $@ beval.c
|
||||
|
||||
@ -4182,25 +4168,6 @@ objects/gui_xmebw.o: gui_xmebw.c vim.h protodef.h auto/config.h feature.h \
|
||||
os_unix.h auto/osdef.h ascii.h keymap.h termdefs.h macros.h option.h beval.h \
|
||||
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
|
||||
proto.h globals.h errors.h gui_xmebwp.h gui_xmebw.h
|
||||
objects/gui_athena.o: gui_athena.c vim.h protodef.h auto/config.h feature.h \
|
||||
os_unix.h auto/osdef.h ascii.h keymap.h termdefs.h macros.h option.h beval.h \
|
||||
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
|
||||
proto.h globals.h errors.h gui_at_sb.h gui_x11_pm.h \
|
||||
../pixmaps/tb_new.xpm ../pixmaps/tb_open.xpm ../pixmaps/tb_close.xpm \
|
||||
../pixmaps/tb_save.xpm ../pixmaps/tb_print.xpm ../pixmaps/tb_cut.xpm \
|
||||
../pixmaps/tb_copy.xpm ../pixmaps/tb_paste.xpm ../pixmaps/tb_find.xpm \
|
||||
../pixmaps/tb_find_next.xpm ../pixmaps/tb_find_prev.xpm \
|
||||
../pixmaps/tb_find_help.xpm ../pixmaps/tb_exit.xpm \
|
||||
../pixmaps/tb_undo.xpm ../pixmaps/tb_redo.xpm ../pixmaps/tb_help.xpm \
|
||||
../pixmaps/tb_macro.xpm ../pixmaps/tb_make.xpm \
|
||||
../pixmaps/tb_save_all.xpm ../pixmaps/tb_jump.xpm \
|
||||
../pixmaps/tb_ctags.xpm ../pixmaps/tb_load_session.xpm \
|
||||
../pixmaps/tb_save_session.xpm ../pixmaps/tb_new_session.xpm \
|
||||
../pixmaps/tb_blank.xpm ../pixmaps/tb_maximize.xpm \
|
||||
../pixmaps/tb_split.xpm ../pixmaps/tb_minimize.xpm \
|
||||
../pixmaps/tb_shell.xpm ../pixmaps/tb_replace.xpm \
|
||||
../pixmaps/tb_vsplit.xpm ../pixmaps/tb_maxwidth.xpm \
|
||||
../pixmaps/tb_minwidth.xpm
|
||||
objects/gui_gtk_x11.o: gui_gtk_x11.c vim.h protodef.h auto/config.h feature.h \
|
||||
os_unix.h auto/osdef.h ascii.h keymap.h termdefs.h macros.h option.h beval.h \
|
||||
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
|
||||
@ -4211,14 +4178,6 @@ objects/gui_x11.o: gui_x11.c vim.h protodef.h auto/config.h feature.h os_unix.h
|
||||
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
|
||||
proto.h globals.h errors.h ../runtime/vim32x32.xpm \
|
||||
../runtime/vim16x16.xpm ../runtime/vim48x48.xpm
|
||||
objects/gui_at_sb.o: gui_at_sb.c vim.h protodef.h auto/config.h feature.h \
|
||||
os_unix.h auto/osdef.h ascii.h keymap.h termdefs.h macros.h option.h beval.h \
|
||||
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
|
||||
proto.h globals.h errors.h gui_at_sb.h
|
||||
objects/gui_at_fs.o: gui_at_fs.c vim.h protodef.h auto/config.h feature.h \
|
||||
os_unix.h auto/osdef.h ascii.h keymap.h termdefs.h macros.h option.h beval.h \
|
||||
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
|
||||
proto.h globals.h errors.h gui_at_sb.h
|
||||
objects/gui_haiku.o: gui_haiku.cc vim.h protodef.h auto/config.h feature.h \
|
||||
os_unix.h ascii.h keymap.h termdefs.h macros.h option.h beval.h \
|
||||
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
|
||||
|
16
src/alloc.c
16
src/alloc.c
@ -180,7 +180,6 @@ alloc_clear(size_t size)
|
||||
return p;
|
||||
}
|
||||
|
||||
#if defined(FEAT_SIGNS) || defined(PROTO)
|
||||
/*
|
||||
* Same as alloc_clear() but with allocation id for testing
|
||||
*/
|
||||
@ -193,7 +192,6 @@ alloc_clear_id(size_t size, alloc_id_T id UNUSED)
|
||||
#endif
|
||||
return alloc_clear(size);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Allocate memory like lalloc() and set all bytes to zero.
|
||||
@ -721,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)
|
||||
{
|
||||
|
@ -40,5 +40,10 @@ typedef enum {
|
||||
aid_sign_getplaced_list,
|
||||
aid_insert_sign,
|
||||
aid_sign_getinfo,
|
||||
aid_newbuf_bvars,
|
||||
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
|
||||
|
@ -22,7 +22,7 @@
|
||||
blob_T *
|
||||
blob_alloc(void)
|
||||
{
|
||||
blob_T *blob = ALLOC_CLEAR_ONE(blob_T);
|
||||
blob_T *blob = ALLOC_CLEAR_ONE_ID(blob_T, aid_blob_alloc);
|
||||
|
||||
if (blob != NULL)
|
||||
ga_init2(&blob->bv_ga, 1, 100);
|
||||
|
41
src/buffer.c
41
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);
|
||||
}
|
||||
@ -708,6 +709,10 @@ aucmd_abort:
|
||||
*/
|
||||
if (wipe_buf)
|
||||
{
|
||||
// Do not wipe out the buffer if it is used in a window.
|
||||
if (buf->b_nwindows > 0)
|
||||
return FALSE;
|
||||
|
||||
if (action == DOBUF_WIPE_REUSE)
|
||||
{
|
||||
// we can re-use this buffer number, store it
|
||||
@ -1049,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')
|
||||
@ -1067,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)
|
||||
@ -2061,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
|
||||
{
|
||||
@ -2072,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)
|
||||
{
|
||||
@ -2089,7 +2089,7 @@ buflist_new(
|
||||
}
|
||||
#ifdef FEAT_EVAL
|
||||
// init b: variables
|
||||
buf->b_vars = dict_alloc();
|
||||
buf->b_vars = dict_alloc_id(aid_newbuf_bvars);
|
||||
if (buf->b_vars == NULL)
|
||||
{
|
||||
vim_free(ffname);
|
||||
@ -2125,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.
|
||||
@ -2346,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);
|
||||
@ -3068,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.
|
||||
@ -3202,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.
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user