mirror of
https://github.com/zoriya/vim.git
synced 2026-01-02 04:18:15 +00:00
Compare commits
223 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
139348f3e8 | ||
|
|
ab65fc77c5 | ||
|
|
92bb83e41c | ||
|
|
8ab375706e | ||
|
|
6bcb877ec1 | ||
|
|
2c363a2e95 | ||
|
|
fef8064b54 | ||
|
|
fc1dafa91c | ||
|
|
8bead9a058 | ||
|
|
0dcd39bad5 | ||
|
|
4dba04256b | ||
|
|
7b6903f02c | ||
|
|
2e5910bfbb | ||
|
|
91478ae49a | ||
|
|
148be9bc1c | ||
|
|
d5e8c92816 | ||
|
|
e7bebc495d | ||
|
|
7781ebe50f | ||
|
|
3b69006973 | ||
|
|
9d20daffc2 | ||
|
|
f9547eb6ef | ||
|
|
5daa911626 | ||
|
|
0346b799fc | ||
|
|
e507ff15d5 | ||
|
|
80ad3e2569 | ||
|
|
f272ae12ac | ||
|
|
c03f5c677a | ||
|
|
853886722c | ||
|
|
3d2bb8b6f1 | ||
|
|
6a12e3342d | ||
|
|
4d8479b335 | ||
|
|
206c2a6e19 | ||
|
|
3445320839 | ||
|
|
f2b26bcf8f | ||
|
|
b63f3ca66d | ||
|
|
76ab5446d5 | ||
|
|
ebd211c8a3 | ||
|
|
f8c6a17180 | ||
|
|
59ff64079b | ||
|
|
92e5df8047 | ||
|
|
3eb6bd9c2b | ||
|
|
28976e2acc | ||
|
|
df2c2988bb | ||
|
|
97202d9516 | ||
|
|
61015162ba | ||
|
|
1d859e2421 | ||
|
|
5ed58c7b70 | ||
|
|
9a046fd08b | ||
|
|
d697ddea14 | ||
|
|
2e6cdb91e8 | ||
|
|
3e492c2d5f | ||
|
|
bed72df3e6 | ||
|
|
21829c5f2c | ||
|
|
b7e2670b6a | ||
|
|
bb4b93ed85 | ||
|
|
ce0370d9e6 | ||
|
|
98989a0014 | ||
|
|
ff0e57fe77 | ||
|
|
e0e3917554 | ||
|
|
e5ea346a07 | ||
|
|
5c829bf229 | ||
|
|
ab55f11d9b | ||
|
|
c05fe07529 | ||
|
|
4efd994829 | ||
|
|
107e9cecf7 | ||
|
|
ced68a0070 | ||
|
|
8323cab31c | ||
|
|
f002a41d12 | ||
|
|
b204990346 | ||
|
|
7cf0c114d6 | ||
|
|
40be52ba71 | ||
|
|
dfbc5fd879 | ||
|
|
7cebe8ba7d | ||
|
|
9a562c184d | ||
|
|
9ae3705b6e | ||
|
|
4bce26bb70 | ||
|
|
402115f1c2 | ||
|
|
0d3de8cb59 | ||
|
|
b3005ce191 | ||
|
|
9b6344613e | ||
|
|
57d5a01cb4 | ||
|
|
e32e516dfa | ||
|
|
f904133e1a | ||
|
|
e71996bd08 | ||
|
|
5e6a7aa2b2 | ||
|
|
ccb47a2899 | ||
|
|
b1f2857096 | ||
|
|
c5f59fab23 | ||
|
|
a0f7f73ebb | ||
|
|
77a849c4b3 | ||
|
|
99880f96cf | ||
|
|
a28639e711 | ||
|
|
e64f83cc6a | ||
|
|
09fbedc8dc | ||
|
|
98a29d00a4 | ||
|
|
82aa6e09e0 | ||
|
|
f30a14db3b | ||
|
|
585587dadb | ||
|
|
036d07144e | ||
|
|
1430ceeb2d | ||
|
|
3af15ab788 | ||
|
|
85773bf32b | ||
|
|
239f8d9326 | ||
|
|
e2edc2ed4a | ||
|
|
70250fb4d2 | ||
|
|
f898f7c68d | ||
|
|
9ebcf231bd | ||
|
|
351ead09dd | ||
|
|
7c886db915 | ||
|
|
a3b494d6af | ||
|
|
e2924328c1 | ||
|
|
bf78974ca4 | ||
|
|
648ea76e1d | ||
|
|
883cf97f10 | ||
|
|
97c6943e11 | ||
|
|
797e63b9f2 | ||
|
|
17d015b243 | ||
|
|
d44cc593ce | ||
|
|
8f81b22e86 | ||
|
|
033135eb8e | ||
|
|
2415669348 | ||
|
|
fadd55bd63 | ||
|
|
e1ee58ac78 | ||
|
|
845b72854d | ||
|
|
681fc3fa78 | ||
|
|
6601b62943 | ||
|
|
c423ad77ed | ||
|
|
9145846b6a | ||
|
|
1bb4de5302 | ||
|
|
37487e16da | ||
|
|
a47e05f04a | ||
|
|
64ed4d4398 | ||
|
|
67876de7bb | ||
|
|
b0e6b51364 | ||
|
|
7cd24227c0 | ||
|
|
a0122dcd1c | ||
|
|
cb6cbf29e9 | ||
|
|
9567efa1b4 | ||
|
|
082517570d | ||
|
|
9e1d9e3473 | ||
|
|
df4c9af7e7 | ||
|
|
82be4849ee | ||
|
|
48e11c1054 | ||
|
|
16a6f91ccb | ||
|
|
086ae06862 | ||
|
|
75ab91ff34 | ||
|
|
6f02b00bb0 | ||
|
|
31a11b942a | ||
|
|
0186e58639 | ||
|
|
ab360526ef | ||
|
|
cff40ff986 | ||
|
|
657137ca48 | ||
|
|
e7525c5520 | ||
|
|
9e0f883f89 | ||
|
|
b657198cb3 | ||
|
|
832ea89ca9 | ||
|
|
299f3036ec | ||
|
|
ece0b87c0f | ||
|
|
467b59c2eb | ||
|
|
17126b1396 | ||
|
|
43b69b39ac | ||
|
|
c37b655443 | ||
|
|
328eac2b5d | ||
|
|
ebbf11c119 | ||
|
|
32b3f82010 | ||
|
|
b23279d7a2 | ||
|
|
0acbf5ae66 | ||
|
|
ecac591cce | ||
|
|
a79925a0a8 | ||
|
|
752fc692ac | ||
|
|
d62d87d8f3 | ||
|
|
d1510ee946 | ||
|
|
cef1270dec | ||
|
|
0ea0440865 | ||
|
|
014f698cb6 | ||
|
|
d93a7fc1a9 | ||
|
|
82c38fe508 | ||
|
|
bb0956fc65 | ||
|
|
5f63938447 | ||
|
|
6797782127 | ||
|
|
2ef951dd31 | ||
|
|
e5a2dc87fd | ||
|
|
5afd081cd3 | ||
|
|
cec77d4530 | ||
|
|
fefa6c347e | ||
|
|
b0d8182fa3 | ||
|
|
31a201a04a | ||
|
|
e68b02a1c4 | ||
|
|
339c1bdbdf | ||
|
|
a11919fa44 | ||
|
|
9d19e4f4ba | ||
|
|
508b5618ec | ||
|
|
66c50c5653 | ||
|
|
9281c6cae4 | ||
|
|
a72514945b | ||
|
|
7e6a515ed1 | ||
|
|
02faa944c6 | ||
|
|
2f91e2f8da | ||
|
|
628c102d12 | ||
|
|
aa210a3aec | ||
|
|
3e0107ea16 | ||
|
|
38a434f7ba | ||
|
|
edc10b541b | ||
|
|
3862ea3f62 | ||
|
|
c368957b19 | ||
|
|
e7a73e0762 | ||
|
|
b8ba9b9197 | ||
|
|
5178b1b02f | ||
|
|
69f7050ceb | ||
|
|
a8b8af19e4 | ||
|
|
d5ea8f08f7 | ||
|
|
5efe0e5d16 | ||
|
|
a387083b2f | ||
|
|
beef4eeda5 | ||
|
|
2949cfdbe4 | ||
|
|
adc8e44645 | ||
|
|
1779ff4842 | ||
|
|
dd1f426bd6 | ||
|
|
ca2f7e7af3 | ||
|
|
6b55377303 | ||
|
|
a04d447d3a | ||
|
|
de4f95b041 | ||
|
|
2a5c61a019 |
6
.codecov.yml
Normal file
6
.codecov.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
coverage:
|
||||
range: "80...100"
|
||||
status:
|
||||
project:
|
||||
default:
|
||||
threshold: 0.05%
|
||||
7
.github/CODEOWNERS
vendored
7
.github/CODEOWNERS
vendored
@@ -31,6 +31,7 @@ runtime/compiler/dartdevc.vim @dkearns
|
||||
runtime/compiler/dartdoc.vim @dkearns
|
||||
runtime/compiler/dartfmt.vim @dkearns
|
||||
runtime/compiler/eruby.vim @dkearns
|
||||
runtime/compiler/fbc.vim @dkearns
|
||||
runtime/compiler/gawk.vim @dkearns
|
||||
runtime/compiler/gjs.vim @dkearns
|
||||
runtime/compiler/haml.vim @tpope
|
||||
@@ -66,12 +67,14 @@ runtime/doc/pi_tar.txt @cecamp
|
||||
runtime/doc/pi_vimball.txt @cecamp
|
||||
runtime/doc/pi_zip.txt @cecamp
|
||||
runtime/ftplugin/awk.vim @dkearns
|
||||
runtime/ftplugin/basic.vim @dkearns
|
||||
runtime/ftplugin/bst.vim @tpope
|
||||
runtime/ftplugin/cfg.vim @chrisbra
|
||||
runtime/ftplugin/css.vim @dkearns
|
||||
runtime/ftplugin/cucumber.vim @tpope
|
||||
runtime/ftplugin/eiffel.vim @dkearns
|
||||
runtime/ftplugin/eruby.vim @tpope @dkearns
|
||||
runtime/ftplugin/freebasic.vim @dkearns
|
||||
runtime/ftplugin/git.vim @tpope
|
||||
runtime/ftplugin/gitcommit.vim @tpope
|
||||
runtime/ftplugin/gitconfig.vim @tpope
|
||||
@@ -93,6 +96,7 @@ runtime/ftplugin/ruby.vim @tpope @dkearns
|
||||
runtime/ftplugin/sass.vim @tpope
|
||||
runtime/ftplugin/scss.vim @tpope
|
||||
runtime/ftplugin/spec.vim @ignatenkobrain
|
||||
runtime/ftplugin/tidy.vim @dkearns
|
||||
runtime/ftplugin/tmux.vim @ericpruitt
|
||||
runtime/ftplugin/typescript.vim @dkearns
|
||||
runtime/ftplugin/typescriptreact.vim @dkearns
|
||||
@@ -127,12 +131,12 @@ runtime/syntax/amiga.vim @cecamp
|
||||
runtime/syntax/asm.vim @dkearns
|
||||
runtime/syntax/asmh8300.vim @dkearns
|
||||
runtime/syntax/awk.vim @dkearns
|
||||
runtime/syntax/basic.vim @dkearns
|
||||
runtime/syntax/bst.vim @tpope
|
||||
runtime/syntax/cabal.vim @coot
|
||||
runtime/syntax/cabalconfig.vim @coot
|
||||
runtime/syntax/cabalproject.vim @coot
|
||||
runtime/syntax/cs.vim @nickspoons
|
||||
runtime/syntax/cs.vim @nickspoons
|
||||
runtime/syntax/csh.vim @cecamp
|
||||
runtime/syntax/cucumber.vim @tpope
|
||||
runtime/syntax/datascript.vim @dpelle
|
||||
@@ -165,6 +169,7 @@ runtime/syntax/nsis.vim @k-takata
|
||||
runtime/syntax/pdf.vim @tpope
|
||||
runtime/syntax/php.vim @TysonAndre
|
||||
runtime/syntax/privoxy.vim @dkearns
|
||||
runtime/syntax/prolog.vim @XVilka
|
||||
runtime/syntax/rc.vim @chrisbra
|
||||
runtime/syntax/rpcgen.vim @cecamp
|
||||
runtime/syntax/ruby.vim @dkearns
|
||||
|
||||
15
Filelist
15
Filelist
@@ -3,20 +3,23 @@
|
||||
|
||||
# source files for all source archives
|
||||
SRC_ALL = \
|
||||
.gitignore \
|
||||
.cirrus.yml \
|
||||
.coveralls.yml \
|
||||
.gitattributes \
|
||||
.github/CODEOWNERS \
|
||||
.github/workflows/ci.yml \
|
||||
.github/workflows/codeql-analysis.yml \
|
||||
.gitignore \
|
||||
.hgignore \
|
||||
.lgtm.yml \
|
||||
.travis.yml \
|
||||
.cirrus.yml \
|
||||
.github/workflows/ci.yml \
|
||||
.github/workflows/codeql-analysis.yml \
|
||||
.github/CODEOWNERS \
|
||||
appveyor.yml \
|
||||
ci/appveyor.bat \
|
||||
ci/build-snd-dummy.sh \
|
||||
ci/config.mk*.sed \
|
||||
ci/if_ver*.vim \
|
||||
ci/load-snd-dummy.sh \
|
||||
ci/config.mk*.sed \
|
||||
ci/setup-xvfb.sh \
|
||||
src/Make_all.mak \
|
||||
src/README.md \
|
||||
src/alloc.h \
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[](https://www.vim.org)
|
||||
|
||||
[](https://github.com/vim/vim/actions?query=workflow%3A%22GitHub+CI%22) [](https://travis-ci.org/vim/vim) [](https://ci.appveyor.com/project/chrisbra/vim) [](https://cirrus-ci.com/github/vim/vim) [](https://codecov.io/gh/vim/vim?branch=master) [](https://scan.coverity.com/projects/vim) [](https://lgtm.com/projects/g/vim/vim/context:cpp) [](https://buildd.debian.org/vim) [](https://repology.org/metapackage/vim) [](https://fossies.org/linux/test/vim-master.tar.gz/codespell.html)
|
||||
[](https://github.com/vim/vim/actions?query=workflow%3A%22GitHub+CI%22) [](https://travis-ci.com/github/vim/vim) [](https://ci.appveyor.com/project/chrisbra/vim) [](https://cirrus-ci.com/github/vim/vim) [](https://codecov.io/gh/vim/vim?branch=master) [](https://scan.coverity.com/projects/vim) [](https://lgtm.com/projects/g/vim/vim/context:cpp) [](https://buildd.debian.org/vim) [](https://repology.org/metapackage/vim) [](https://fossies.org/linux/test/vim-master.tar.gz/codespell.html)
|
||||
|
||||
<sub>For translations of this README see the end.</sub>
|
||||
|
||||
|
||||
23
runtime/autoload/dist/ft.vim
vendored
23
runtime/autoload/dist/ft.vim
vendored
@@ -362,6 +362,10 @@ func dist#ft#FTinc()
|
||||
setf aspvbs
|
||||
elseif lines =~ "<?"
|
||||
setf php
|
||||
" Pascal supports // comments but they're vary rarely used for file
|
||||
" headers so assume POV-Ray
|
||||
elseif lines =~ '^\s*\%({\|(\*\)' || lines =~? s:ft_pascal_keywords
|
||||
setf pascal
|
||||
else
|
||||
call dist#ft#FTasmsyntax()
|
||||
if exists("b:asmsyntax")
|
||||
@@ -408,6 +412,9 @@ func dist#ft#FTprogress_asm()
|
||||
setf progress
|
||||
endfunc
|
||||
|
||||
let s:ft_pascal_comments = '^\s*\%({\|(\*\|//\)'
|
||||
let s:ft_pascal_keywords = '^\s*\%(program\|unit\|library\|uses\|begin\|procedure\|function\|const\|type\|var\)\>'
|
||||
|
||||
func dist#ft#FTprogress_pascal()
|
||||
if exists("g:filetype_p")
|
||||
exe "setf " . g:filetype_p
|
||||
@@ -419,8 +426,7 @@ func dist#ft#FTprogress_pascal()
|
||||
let lnum = 1
|
||||
while lnum <= 10 && lnum < line('$')
|
||||
let line = getline(lnum)
|
||||
if line =~ '^\s*\(program\|unit\|procedure\|function\|const\|type\|var\)\>'
|
||||
\ || line =~ '^\s*{' || line =~ '^\s*(\*'
|
||||
if line =~ s:ft_pascal_comments || line =~? s:ft_pascal_keywords
|
||||
setf pascal
|
||||
return
|
||||
elseif line !~ '^\s*$' || line =~ '^/\*'
|
||||
@@ -433,6 +439,19 @@ func dist#ft#FTprogress_pascal()
|
||||
setf progress
|
||||
endfunc
|
||||
|
||||
func dist#ft#FTpp()
|
||||
if exists("g:filetype_pp")
|
||||
exe "setf " . g:filetype_pp
|
||||
else
|
||||
let line = getline(nextnonblank(1))
|
||||
if line =~ s:ft_pascal_comments || line =~? s:ft_pascal_keywords
|
||||
setf pascal
|
||||
else
|
||||
setf puppet
|
||||
endif
|
||||
endif
|
||||
endfunc
|
||||
|
||||
func dist#ft#FTr()
|
||||
let max = line("$") > 50 ? 50 : line("$")
|
||||
|
||||
|
||||
27
runtime/compiler/fbc.vim
Normal file
27
runtime/compiler/fbc.vim
Normal file
@@ -0,0 +1,27 @@
|
||||
" Vim compiler file
|
||||
" Compiler: FreeBASIC Compiler
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2015 Jan 10
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
let current_compiler = "fbc"
|
||||
|
||||
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||
command -nargs=* CompilerSet setlocal <args>
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
CompilerSet makeprg=fbc
|
||||
CompilerSet errorformat=%-G%.%#Too\ many\ errors\\,\ exiting,
|
||||
\%f(%l)\ %tarning\ %n(%\\d%\\+):\ %m,
|
||||
\%E%f(%l)\ error\ %n:\ %m,
|
||||
\%-Z%p^,
|
||||
\%-C%.%#,
|
||||
\%-G%.%#
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
@@ -1,11 +1,11 @@
|
||||
" Vim Compiler File
|
||||
" Compiler: ocaml
|
||||
" Maintainer: Markus Mottl <markus.mottl@gmail.com>
|
||||
" URL: https://github.com/rgrinberg/vim-ocaml
|
||||
" URL: https://github.com/ocaml/vim-ocaml
|
||||
" Last Change:
|
||||
" 2020 Mar 28 - Improved error format (Thomas Leonard)
|
||||
" 2017 Nov 26 - Improved error format (Markus Mottl)
|
||||
" 2013 Aug 27 - Added a new OCaml error format (Markus Mottl)
|
||||
" 2013 Jun 30 - Initial version (Marc Weber)
|
||||
"
|
||||
" Marc Weber's comments:
|
||||
" Setting makeprg doesn't make sense, because there is ocamlc, ocamlopt,
|
||||
@@ -21,6 +21,7 @@
|
||||
"
|
||||
" So having it here makes people opt-in
|
||||
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
@@ -30,6 +31,7 @@ let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
CompilerSet errorformat =
|
||||
\%EFile\ \"%f\"\\,\ lines\ %*\\d-%l\\,\ characters\ %c-%*\\d:,
|
||||
\%EFile\ \"%f\"\\,\ line\ %l\\,\ characters\ %c-%*\\d:,
|
||||
\%EFile\ \"%f\"\\,\ line\ %l\\,\ characters\ %c-%*\\d\ %.%#,
|
||||
\%EFile\ \"%f\"\\,\ line\ %l\\,\ character\ %c:%m,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim compiler file
|
||||
" Compiler: HTML Tidy
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2016 Apr 21
|
||||
" Last Change: 2020 Sep 4
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
@@ -12,8 +12,15 @@ if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||
command -nargs=* CompilerSet setlocal <args>
|
||||
endif
|
||||
|
||||
CompilerSet makeprg=tidy\ -quiet\ -errors\ --gnu-emacs\ yes\ %:S
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" foo.html:8:1: Warning: inserting missing 'foobar' element
|
||||
" foo.html:9:2: Error: <foobar> is not recognized!
|
||||
CompilerSet errorformat=%f:%l:%c:\ %trror:%m,%f:%l:%c:\ %tarning:%m,%-G%.%#
|
||||
CompilerSet makeprg=tidy\ -quiet\ -errors\ --gnu-emacs\ yes
|
||||
CompilerSet errorformat=%f:%l:%c:\ %trror:\ %m,
|
||||
\%f:%l:%c:\ %tarning:\ %m,
|
||||
\%f:%l:%c:\ %tnfo:\ %m,
|
||||
\%f:%l:%c:\ %m,
|
||||
\%-G%.%#
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*autocmd.txt* For Vim version 8.2. Last change: 2020 Dec 19
|
||||
*autocmd.txt* For Vim version 8.2. Last change: 2021 Jan 28
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -54,7 +54,8 @@ effects. Be careful not to destroy your text.
|
||||
:au[tocmd] [group] {event} {pat} [++once] [++nested] {cmd}
|
||||
Add {cmd} to the list of commands that Vim will
|
||||
execute automatically on {event} for a file matching
|
||||
{pat} |autocmd-patterns|.
|
||||
{pat} |autocmd-patterns|.
|
||||
Here {event} cannot be "*". *E1155*
|
||||
Note: A quote character is seen as argument to the
|
||||
:autocmd and won't start a comment.
|
||||
Vim always adds the {cmd} after existing autocommands,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*change.txt* For Vim version 8.2. Last change: 2020 Nov 21
|
||||
*change.txt* For Vim version 8.2. Last change: 2021 Jan 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1631,24 +1631,31 @@ default setting is "tcq". You can separate the option letters with commas for
|
||||
readability.
|
||||
|
||||
letter meaning when present in 'formatoptions' ~
|
||||
|
||||
*fo-t*
|
||||
t Auto-wrap text using textwidth
|
||||
*fo-c*
|
||||
c Auto-wrap comments using textwidth, inserting the current comment
|
||||
leader automatically.
|
||||
*fo-r*
|
||||
r Automatically insert the current comment leader after hitting
|
||||
<Enter> in Insert mode.
|
||||
*fo-o*
|
||||
o Automatically insert the current comment leader after hitting 'o' or
|
||||
'O' in Normal mode.
|
||||
*fo-q*
|
||||
q Allow formatting of comments with "gq".
|
||||
Note that formatting will not change blank lines or lines containing
|
||||
only the comment leader. A new paragraph starts after such a line,
|
||||
or when the comment leader changes.
|
||||
*fo-w*
|
||||
w Trailing white space indicates a paragraph continues in the next line.
|
||||
A line that ends in a non-white character ends a paragraph.
|
||||
*fo-a*
|
||||
a Automatic formatting of paragraphs. Every time text is inserted or
|
||||
deleted the paragraph will be reformatted. See |auto-format|.
|
||||
When the 'c' flag is present this only happens for recognized
|
||||
comments.
|
||||
*fo-n*
|
||||
n When formatting text, recognize numbered lists. This actually uses
|
||||
the 'formatlistpat' option, thus any kind of list can be used. The
|
||||
indent of the text after the number is used for the next line. The
|
||||
@@ -1659,6 +1666,7 @@ n When formatting text, recognize numbered lists. This actually uses
|
||||
1. the first item
|
||||
wraps
|
||||
2. the second item
|
||||
< *fo-2*
|
||||
2 When formatting text, use the indent of the second line of a paragraph
|
||||
for the rest of the paragraph, instead of the indent of the first
|
||||
line. This supports paragraphs in which the first line has a
|
||||
@@ -1668,36 +1676,46 @@ n When formatting text, recognize numbered lists. This actually uses
|
||||
second line of the same paragraph
|
||||
third line.
|
||||
< This also works inside comments, ignoring the comment leader.
|
||||
*fo-v*
|
||||
v Vi-compatible auto-wrapping in insert mode: Only break a line at a
|
||||
blank that you have entered during the current insert command. (Note:
|
||||
this is not 100% Vi compatible. Vi has some "unexpected features" or
|
||||
bugs in this area. It uses the screen column instead of the line
|
||||
column.)
|
||||
*fo-b*
|
||||
b Like 'v', but only auto-wrap if you enter a blank at or before
|
||||
the wrap margin. If the line was longer than 'textwidth' when you
|
||||
started the insert, or you do not enter a blank in the insert before
|
||||
reaching 'textwidth', Vim does not perform auto-wrapping.
|
||||
*fo-l*
|
||||
l Long lines are not broken in insert mode: When a line was longer than
|
||||
'textwidth' when the insert command started, Vim does not
|
||||
automatically format it.
|
||||
*fo-m*
|
||||
m Also break at a multibyte character above 255. This is useful for
|
||||
Asian text where every character is a word on its own.
|
||||
*fo-M*
|
||||
M When joining lines, don't insert a space before or after a multibyte
|
||||
character. Overrules the 'B' flag.
|
||||
*fo-B*
|
||||
B When joining lines, don't insert a space between two multibyte
|
||||
characters. Overruled by the 'M' flag.
|
||||
*fo-1*
|
||||
1 Don't break a line after a one-letter word. It's broken before it
|
||||
instead (if possible).
|
||||
*fo-]*
|
||||
] Respect textwidth rigorously. With this flag set, no line can be
|
||||
longer than textwidth, unless line-break-prohibition rules make this
|
||||
impossible. Mainly for CJK scripts and works only if 'encoding' is
|
||||
"utf-8".
|
||||
*fo-j*
|
||||
j Where it makes sense, remove a comment leader when joining lines. For
|
||||
example, joining:
|
||||
int i; // the index ~
|
||||
// in the list ~
|
||||
Becomes:
|
||||
int i; // the index in the list ~
|
||||
*fo-p*
|
||||
p Don't break lines at single spaces that follow periods. This is
|
||||
intended to complement 'joinspaces' and |cpo-J|, for prose with
|
||||
sentences separated by two spaces. For example, with 'textwidth' set
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*cmdline.txt* For Vim version 8.2. Last change: 2020 Sep 14
|
||||
*cmdline.txt* For Vim version 8.2. Last change: 2021 Jan 26
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -849,6 +849,16 @@ function |expand()|.
|
||||
file name n. See |:oldfiles| or |v:oldfiles| to get the
|
||||
number. *E809*
|
||||
{only when compiled with the |+eval| and |+viminfo| features}
|
||||
In |Vim9-script| # is used to start a comment, use %% for the alternate file
|
||||
name:
|
||||
% Is replaced with the current file name.
|
||||
%% Is replaced with the alternate file name. *:_%%* *c_%%*
|
||||
%%n (where n is a number) is replaced with *:_%%0* *:_%%n*
|
||||
the file name of buffer n. "%%0" is the same as "%%". *c_%%n*
|
||||
%%% Is replaced with all names in the argument *:_%%%* *c_%%%#*
|
||||
list concatenated, separated by spaces.
|
||||
%%<n (where n is a number > 0) is replaced with old *:_%%<* *c_%%<*
|
||||
file name n.
|
||||
|
||||
Note that these, except "#<n", give the file name as it was typed. If an
|
||||
absolute path is needed (when using the file name from a different directory),
|
||||
@@ -1086,7 +1096,7 @@ Also see |`=|.
|
||||
In the command-line window the command line can be edited just like editing
|
||||
text in any window. It is a special kind of window, because you cannot leave
|
||||
it in a normal way.
|
||||
{not available when compiled without the |+cmdline_hist| feature}
|
||||
{not available when compiled without the |+cmdwin| feature}
|
||||
|
||||
|
||||
OPEN *c_CTRL-F* *q:* *q/* *q?*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*editing.txt* For Vim version 8.2. Last change: 2020 Dec 19
|
||||
*editing.txt* For Vim version 8.2. Last change: 2021 Jan 08
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1014,7 +1014,7 @@ to write anyway add a '!' to the command.
|
||||
|
||||
*write-permissions*
|
||||
When writing a new file the permissions are read-write. For unix the mask is
|
||||
0666 with additionally umask applied. When writing a file that was read Vim
|
||||
0o666 with additionally umask applied. When writing a file that was read Vim
|
||||
will preserve the permissions, but clear the s-bit.
|
||||
|
||||
*write-readonly*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 8.2. Last change: 2020 Dec 22
|
||||
*eval.txt* For Vim version 8.2. Last change: 2021 Jan 31
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -49,7 +49,7 @@ There are ten types of variables:
|
||||
*Number* *Integer*
|
||||
Number A 32 or 64 bit signed number. |expr-number|
|
||||
The number of bits is available in |v:numbersize|.
|
||||
Examples: -123 0x10 0177 0b1011
|
||||
Examples: -123 0x10 0177 0o177 0b1011
|
||||
|
||||
Float A floating point number. |floating-point-format| *Float*
|
||||
{only when compiled with the |+float| feature}
|
||||
@@ -97,9 +97,10 @@ the Number. Examples:
|
||||
Conversion from a String to a Number only happens in legacy Vim script, not in
|
||||
Vim9 script. It is done by converting the first digits to a number.
|
||||
Hexadecimal "0xf9", Octal "017" or "0o17", and Binary "0b10"
|
||||
numbers are recognized (NOTE: when using |scriptversion-4| octal with a
|
||||
leading "0" is not recognized). If the String doesn't start with digits, the
|
||||
result is zero.
|
||||
numbers are recognized
|
||||
NOTE: when using |scriptversion-4| octal with a leading "0" is not recognized.
|
||||
The 0o notation requires patch 8.2.0886.
|
||||
If the String doesn't start with digits, the result is zero.
|
||||
Examples:
|
||||
String "456" --> Number 456 ~
|
||||
String "6bar" --> Number 6 ~
|
||||
@@ -292,13 +293,13 @@ is not available it returns zero or the default value you specify: >
|
||||
|
||||
|
||||
List concatenation ~
|
||||
|
||||
*list-concatenation*
|
||||
Two lists can be concatenated with the "+" operator: >
|
||||
:let longlist = mylist + [5, 6]
|
||||
:let mylist += [7, 8]
|
||||
|
||||
To prepend or append an item turn the item into a list by putting [] around
|
||||
it. To change a list in-place see |list-modification| below.
|
||||
To prepend or append an item, turn the item into a list by putting [] around
|
||||
it. To change a list in-place, refer to |list-modification| below.
|
||||
|
||||
|
||||
Sublist ~
|
||||
@@ -313,6 +314,9 @@ similar to -1. >
|
||||
:let shortlist = mylist[2:2] " List with one item: [3]
|
||||
:let otherlist = mylist[:] " make a copy of the List
|
||||
|
||||
Notice that the last index is inclusive. If you prefer using an exclusive
|
||||
index use the |slice()| method.
|
||||
|
||||
If the first index is beyond the last item of the List or the second item is
|
||||
before the first item, the result is an empty list. There is no error
|
||||
message.
|
||||
@@ -1150,7 +1154,7 @@ expr7 *expr7*
|
||||
|
||||
For '!' |TRUE| becomes |FALSE|, |FALSE| becomes |TRUE| (one).
|
||||
For '-' the sign of the number is changed.
|
||||
For '+' the number is unchanged.
|
||||
For '+' the number is unchanged. Note: "++" has no effect.
|
||||
|
||||
A String will be converted to a Number first.
|
||||
|
||||
@@ -1191,6 +1195,7 @@ start with one!
|
||||
If the length of the String is less than the index, the result is an empty
|
||||
String. A negative index always results in an empty string (reason: backward
|
||||
compatibility). Use [-1:] to get the last byte or character.
|
||||
In Vim9 script a negative index is used like with a list: count from the end.
|
||||
|
||||
If expr8 is a |List| then it results the item at index expr1. See |list-index|
|
||||
for possible index values. If the index is out of range this results in an
|
||||
@@ -1215,6 +1220,9 @@ a Number it is first converted to a String.
|
||||
In Vim9 script the indexes are character indexes. To use byte indexes use
|
||||
|strpart()|.
|
||||
|
||||
The item at index expr1b is included, it is inclusive. For an exclusive index
|
||||
use the |slice()| function.
|
||||
|
||||
If expr1a is omitted zero is used. If expr1b is omitted the length of the
|
||||
string minus one is used.
|
||||
|
||||
@@ -1318,8 +1326,8 @@ When using the lambda form there must be no white space between the } and the
|
||||
number
|
||||
------
|
||||
number number constant *expr-number*
|
||||
*hex-number* *octal-number* *binary-number*
|
||||
|
||||
*0x* *hex-number* *0o* *octal-number* *binary-number*
|
||||
Decimal, Hexadecimal (starting with 0x or 0X), Binary (starting with 0b or 0B)
|
||||
and Octal (starting with 0, 0o or 0O).
|
||||
|
||||
@@ -1572,7 +1580,7 @@ Note how execute() is used to execute an Ex command. That's ugly though.
|
||||
|
||||
Lambda expressions have internal names like '<lambda>42'. If you get an error
|
||||
for a lambda expression, you can find what it is with the following command: >
|
||||
:function {'<lambda>42'}
|
||||
:function <lambda>42
|
||||
See also: |numbered-function|
|
||||
|
||||
==============================================================================
|
||||
@@ -2074,6 +2082,12 @@ v:null An empty String. Used to put "null" in JSON. See
|
||||
That is so that eval() can parse the string back to the same
|
||||
value. Read-only.
|
||||
|
||||
*v:numbermax* *numbermax-variable*
|
||||
v:numbermax Maximum value of a number.
|
||||
|
||||
*v:numbermin* *numbermin-variable*
|
||||
v:numbermin Minimum value of a number (negative)
|
||||
|
||||
*v:numbersize* *numbersize-variable*
|
||||
v:numbersize Number of bits in a Number. This is normally 64, but on some
|
||||
systems it may be 32.
|
||||
@@ -2475,12 +2489,13 @@ ch_status({handle} [, {options}])
|
||||
changenr() Number current change number
|
||||
char2nr({expr} [, {utf8}]) Number ASCII/UTF8 value of first char in {expr}
|
||||
charclass({string}) Number character class of {string}
|
||||
charcol({expr}) Number column number of cursor or mark
|
||||
charidx({string}, {idx} [, {countcc}])
|
||||
Number char index of byte {idx} in {string}
|
||||
chdir({dir}) String change current working directory
|
||||
cindent({lnum}) Number C indent for line {lnum}
|
||||
clearmatches([{win}]) none clear all matches
|
||||
col({expr}) Number column nr of cursor or mark
|
||||
col({expr}) Number column byte index of cursor or mark
|
||||
complete({startcol}, {matches}) none set Insert mode completion
|
||||
complete_add({expr}) Number add completion match
|
||||
complete_check() Number check for key typed during completion
|
||||
@@ -2521,6 +2536,9 @@ expand({expr} [, {nosuf} [, {list}]])
|
||||
expandcmd({expr}) String expand {expr} like with `:edit`
|
||||
extend({expr1}, {expr2} [, {expr3}])
|
||||
List/Dict insert items of {expr2} into {expr1}
|
||||
extendnew({expr1}, {expr2} [, {expr3}])
|
||||
List/Dict like |extend()| but creates a new
|
||||
List or Dictionary
|
||||
feedkeys({string} [, {mode}]) Number add key sequence to typeahead buffer
|
||||
filereadable({file}) Number |TRUE| if {file} is a readable file
|
||||
filewritable({file}) Number |TRUE| if {file} is a writable file
|
||||
@@ -2531,6 +2549,8 @@ finddir({name} [, {path} [, {count}]])
|
||||
findfile({name} [, {path} [, {count}]])
|
||||
String find file {name} in {path}
|
||||
flatten({list} [, {maxdepth}]) List flatten {list} up to {maxdepth} levels
|
||||
flattennew({list} [, {maxdepth}])
|
||||
List flatten a copy of {list}
|
||||
float2nr({expr}) Number convert Float {expr} to a Number
|
||||
floor({expr}) Float round {expr} down
|
||||
fmod({expr1}, {expr2}) Float remainder of {expr1} / {expr2}
|
||||
@@ -2558,6 +2578,7 @@ getbufvar({expr}, {varname} [, {def}])
|
||||
getchangelist([{expr}]) List list of change list items
|
||||
getchar([expr]) Number get one character from the user
|
||||
getcharmod() Number modifiers for the last typed character
|
||||
getcharpos({expr}) List position of cursor, mark, etc.
|
||||
getcharsearch() Dict last character search
|
||||
getcmdline() String return the current command-line
|
||||
getcmdpos() Number return cursor position in command-line
|
||||
@@ -2566,6 +2587,7 @@ getcmdwintype() String return current command-line window type
|
||||
getcompletion({pat}, {type} [, {filtered}])
|
||||
List list of cmdline completion matches
|
||||
getcurpos([{winnr}]) List position of the cursor
|
||||
getcursorcharpos([{winnr}]) List character position of the cursor
|
||||
getcwd([{winnr} [, {tabnr}]]) String get the current working directory
|
||||
getenv({name}) String return environment variable
|
||||
getfontname([{name}]) String name of font being used
|
||||
@@ -2767,6 +2789,7 @@ pyxeval({expr}) any evaluate |python_x| expression
|
||||
rand([{expr}]) Number get pseudo-random number
|
||||
range({expr} [, {max} [, {stride}]])
|
||||
List items from {expr} to {max}
|
||||
readblob({fname}) Blob read a |Blob| from {fname}
|
||||
readdir({dir} [, {expr} [, {dict}]])
|
||||
List file names in {dir} selected by {expr}
|
||||
readdirex({dir} [, {expr} [, {dict}]])
|
||||
@@ -2828,8 +2851,10 @@ setbufline({expr}, {lnum}, {text})
|
||||
setbufvar({expr}, {varname}, {val})
|
||||
none set {varname} in buffer {expr} to {val}
|
||||
setcellwidths({list}) none set character cell width overrides
|
||||
setcharpos({expr}, {list}) Number set the {expr} position to {list}
|
||||
setcharsearch({dict}) Dict set character search from {dict}
|
||||
setcmdpos({pos}) Number set cursor position in command-line
|
||||
setcursorcharpos({list}) Number move cursor to position in {list}
|
||||
setenv({name}, {val}) none set environment variable
|
||||
setfperm({fname}, {mode}) Number set {fname} file permissions to {mode}
|
||||
setline({lnum}, {line}) Number set line {lnum} to {line}
|
||||
@@ -2873,6 +2898,8 @@ sign_unplacelist({list}) List unplace a list of signs
|
||||
simplify({filename}) String simplify filename as much as possible
|
||||
sin({expr}) Float sine of {expr}
|
||||
sinh({expr}) Float hyperbolic sine of {expr}
|
||||
slice({expr}, {start} [, {end}]) String, List or Blob
|
||||
slice of a String, List or Blob
|
||||
sort({list} [, {func} [, {dict}]])
|
||||
List sort {list}, using {func} to compare
|
||||
sound_clear() none stop playing all sounds
|
||||
@@ -3006,7 +3033,8 @@ tr({src}, {fromstr}, {tostr}) String translate chars of {src} in {fromstr}
|
||||
trim({text} [, {mask} [, {dir}]])
|
||||
String trim characters in {mask} from {text}
|
||||
trunc({expr}) Float truncate Float {expr}
|
||||
type({name}) Number type of variable {name}
|
||||
type({expr}) Number type of value {expr}
|
||||
typename({expr}) String representation of the type of {expr}
|
||||
undofile({name}) String undo file name for {name}
|
||||
undotree() List undo file tree
|
||||
uniq({list} [, {func} [, {dict}]])
|
||||
@@ -3107,6 +3135,7 @@ append({lnum}, {text}) *append()*
|
||||
text line below line {lnum} in the current buffer.
|
||||
Otherwise append {text} as one text line below line {lnum} in
|
||||
the current buffer.
|
||||
Any type of item is accepted and converted to a String.
|
||||
{lnum} can be zero to insert a line before the first one.
|
||||
Returns 1 for failure ({lnum} out of range or out of memory),
|
||||
0 for success. Example: >
|
||||
@@ -3513,8 +3542,8 @@ byteidxcomp({expr}, {nr}) *byteidxcomp()*
|
||||
< The first and third echo result in 3 ('e' plus composing
|
||||
character is 3 bytes), the second echo results in 1 ('e' is
|
||||
one byte).
|
||||
Only works differently from byteidx() when 'encoding' is set to
|
||||
a Unicode encoding.
|
||||
Only works differently from byteidx() when 'encoding' is set
|
||||
to a Unicode encoding.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetName()->byteidxcomp(idx)
|
||||
@@ -3590,6 +3619,18 @@ charclass({string}) *charclass()*
|
||||
other specific Unicode class
|
||||
The class is used in patterns and word motions.
|
||||
|
||||
*charcol()*
|
||||
charcol({expr}) Same as |col()| but returns the character index of the column
|
||||
position given with {expr} instead of the byte position.
|
||||
|
||||
Example:
|
||||
With the cursor on '세' in line 5 with text "여보세요": >
|
||||
charcol('.') returns 3
|
||||
col('.') returns 7
|
||||
|
||||
< Can also be used as a |method|: >
|
||||
GetPos()->col()
|
||||
<
|
||||
*charidx()*
|
||||
charidx({string}, {idx} [, {countcc}])
|
||||
Return the character index of the byte at {idx} in {string}.
|
||||
@@ -3680,7 +3721,8 @@ col({expr}) The result is a Number, which is the byte index of the column
|
||||
out of range then col() returns zero.
|
||||
To get the line number use |line()|. To get both use
|
||||
|getpos()|.
|
||||
For the screen column position use |virtcol()|.
|
||||
For the screen column position use |virtcol()|. For the
|
||||
character position use |charcol()|.
|
||||
Note that only marks in the current file can be used.
|
||||
Examples: >
|
||||
col(".") column of cursor
|
||||
@@ -3981,6 +4023,9 @@ cursor({list})
|
||||
This is like the return value of |getpos()| or |getcurpos()|,
|
||||
but without the first item.
|
||||
|
||||
To position the cursor using the character count, use
|
||||
|setcursorcharpos()|.
|
||||
|
||||
Does not change the jumplist.
|
||||
If {lnum} is greater than the number of lines in the buffer,
|
||||
the cursor will be positioned at the last line in the buffer.
|
||||
@@ -4048,8 +4093,9 @@ delete({fname} [, {flags}]) *delete()*
|
||||
|
||||
A symbolic link itself is deleted, not what it points to.
|
||||
|
||||
The result is a Number, which is 0 if the delete operation was
|
||||
successful and -1 when the deletion failed or partly failed.
|
||||
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.
|
||||
|
||||
Use |remove()| to delete an item from a |List|.
|
||||
To delete a line from the buffer use |:delete| or
|
||||
@@ -4497,6 +4543,13 @@ extend({expr1}, {expr2} [, {expr3}]) *extend()*
|
||||
mylist->extend(otherlist)
|
||||
|
||||
|
||||
extendnew({expr1}, {expr2} [, {expr3}]) *extendnew()*
|
||||
Like |extend()| but instead of adding items to {expr1} a new
|
||||
List or Dictionary is created and returned. {expr1} remains
|
||||
unchanged. Items can still be changed by {expr2}, if you
|
||||
don't want that use |deepcopy()| first.
|
||||
|
||||
|
||||
feedkeys({string} [, {mode}]) *feedkeys()*
|
||||
Characters in {string} are queued for processing as if they
|
||||
come from a mapping or were typed by the user.
|
||||
@@ -4661,8 +4714,10 @@ flatten({list} [, {maxdepth}]) *flatten()*
|
||||
Flatten {list} up to {maxdepth} levels. Without {maxdepth}
|
||||
the result is a |List| without nesting, as if {maxdepth} is
|
||||
a very large number.
|
||||
The {list} is changed in place, make a copy first if you do
|
||||
The {list} is changed in place, use |flattennew()| if you do
|
||||
not want that.
|
||||
In Vim9 script flatten() cannot be used, you must always use
|
||||
|flattennew()|.
|
||||
*E900*
|
||||
{maxdepth} means how deep in nested lists changes are made.
|
||||
{list} is not modified when {maxdepth} is 0.
|
||||
@@ -4676,6 +4731,10 @@ flatten({list} [, {maxdepth}]) *flatten()*
|
||||
:echo flatten([1, [2, [3, 4]], 5], 1)
|
||||
< [1, 2, [3, 4], 5]
|
||||
|
||||
flattennew({list} [, {maxdepth}]) *flattennew()*
|
||||
Like |flatten()| but first make a copy of {list}.
|
||||
|
||||
|
||||
float2nr({expr}) *float2nr()*
|
||||
Convert {expr} to a Number by omitting the part after the
|
||||
decimal point.
|
||||
@@ -5220,6 +5279,20 @@ getcharmod() *getcharmod()*
|
||||
character itself are obtained. Thus Shift-a results in "A"
|
||||
without a modifier.
|
||||
|
||||
*getcharpos()*
|
||||
getcharpos({expr})
|
||||
Get the position for {expr}. Same as |getpos()| but the column
|
||||
number in the returned List is a character index instead of
|
||||
a byte index.
|
||||
|
||||
Example:
|
||||
With the cursor on '세' in line 5 with text "여보세요": >
|
||||
getcharpos('.') returns [0, 5, 3, 0]
|
||||
getpos('.') returns [0, 5, 7, 0]
|
||||
<
|
||||
Can also be used as a |method|: >
|
||||
GetMark()->getcharpos()
|
||||
|
||||
getcharsearch() *getcharsearch()*
|
||||
Return the current character search information as a {dict}
|
||||
with the following entries:
|
||||
@@ -5345,8 +5418,11 @@ getcurpos([{winid}])
|
||||
includes an extra "curswant" item in the list:
|
||||
[0, lnum, col, off, curswant] ~
|
||||
The "curswant" number is the preferred column when moving the
|
||||
cursor vertically. Also see |getpos()|.
|
||||
The first "bufnum" item is always zero.
|
||||
cursor vertically. Also see |getcursorcharpos()| and
|
||||
|getpos()|.
|
||||
The first "bufnum" item is always zero. The byte position of
|
||||
the cursor is returned in 'col'. To get the character
|
||||
position, use |getcursorcharpos()|.
|
||||
|
||||
The optional {winid} argument can specify the window. It can
|
||||
be the window number or the |window-ID|. The last known
|
||||
@@ -5360,7 +5436,24 @@ getcurpos([{winid}])
|
||||
call setpos('.', save_cursor)
|
||||
< Note that this only works within the window. See
|
||||
|winrestview()| for restoring more state.
|
||||
*getcwd()*
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetWinid()->getcurpos()
|
||||
|
||||
< *getcursorcharpos()*
|
||||
getcursorcharpos([{winid}])
|
||||
Same as |getcurpos()| but the column number in the returned
|
||||
List is a character index instead of a byte index.
|
||||
|
||||
Example:
|
||||
With the cursor on '보' in line 3 with text "여보세요": >
|
||||
getcursorcharpos() returns [0, 3, 2, 0, 3]
|
||||
getcurpos() returns [0, 3, 4, 0, 3]
|
||||
|
||||
< Can also be used as a |method|: >
|
||||
GetWinid()->getcursorcharpos()
|
||||
|
||||
< *getcwd()*
|
||||
getcwd([{winnr} [, {tabnr}]])
|
||||
The result is a String, which is the name of the current
|
||||
working directory.
|
||||
@@ -5667,16 +5760,18 @@ getpos({expr}) Get the position for {expr}. For possible values of {expr}
|
||||
Note that for '< and '> Visual mode matters: when it is "V"
|
||||
(visual line mode) the column of '< is zero and the column of
|
||||
'> is a large number.
|
||||
The column number in the returned List is the byte position
|
||||
within the line. To get the character position in the line,
|
||||
use |getcharpos()|
|
||||
This can be used to save and restore the position of a mark: >
|
||||
let save_a_mark = getpos("'a")
|
||||
...
|
||||
call setpos("'a", save_a_mark)
|
||||
< Also see |getcurpos()| and |setpos()|.
|
||||
< Also see |getcharpos()|, |getcurpos()| and |setpos()|.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetMark()->getpos()
|
||||
|
||||
|
||||
getqflist([{what}]) *getqflist()*
|
||||
Returns a |List| with all the current quickfix errors. Each
|
||||
list item is a dictionary with these entries:
|
||||
@@ -6143,8 +6238,8 @@ has({feature} [, {check}])
|
||||
|
||||
|
||||
has_key({dict}, {key}) *has_key()*
|
||||
The result is a Number, which is 1 if |Dictionary| {dict} has
|
||||
an entry with key {key}. Zero otherwise.
|
||||
The result is a Number, which is TRUE if |Dictionary| {dict}
|
||||
has an entry with key {key}. FALSE otherwise.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
mydict->has_key(key)
|
||||
@@ -6187,16 +6282,16 @@ haslocaldir([{winnr} [, {tabnr}]]) *haslocaldir()*
|
||||
GetWinnr()->haslocaldir()
|
||||
|
||||
hasmapto({what} [, {mode} [, {abbr}]]) *hasmapto()*
|
||||
The result is a Number, which is 1 if there is a mapping that
|
||||
contains {what} in somewhere in the rhs (what it is mapped to)
|
||||
and this mapping exists in one of the modes indicated by
|
||||
{mode}.
|
||||
The result is a Number, which is TRUE if there is a mapping
|
||||
that contains {what} in somewhere in the rhs (what it is
|
||||
mapped to) and this mapping exists in one of the modes
|
||||
indicated by {mode}.
|
||||
When {abbr} is there and it is |TRUE| use abbreviations
|
||||
instead of mappings. Don't forget to specify Insert and/or
|
||||
Command-line mode.
|
||||
Both the global mappings and the mappings local to the current
|
||||
buffer are checked for a match.
|
||||
If no matching mapping is found 0 is returned.
|
||||
If no matching mapping is found FALSE is returned.
|
||||
The following characters are recognized in {mode}:
|
||||
n Normal mode
|
||||
v Visual and Select mode
|
||||
@@ -6232,8 +6327,8 @@ histadd({history}, {item}) *histadd()*
|
||||
character is sufficient.
|
||||
If {item} does already exist in the history, it will be
|
||||
shifted to become the newest entry.
|
||||
The result is a Number: 1 if the operation was successful,
|
||||
otherwise 0 is returned.
|
||||
The result is a Number: TRUE if the operation was successful,
|
||||
otherwise FALSE is returned.
|
||||
|
||||
Example: >
|
||||
:call histadd("input", strftime("%Y %b %d"))
|
||||
@@ -6256,8 +6351,8 @@ histdel({history} [, {item}]) *histdel()*
|
||||
an index, see |:history-indexing|. The respective entry will
|
||||
be removed if it exists.
|
||||
|
||||
The result is a Number: 1 for a successful operation,
|
||||
otherwise 0 is returned.
|
||||
The result is TRUE for a successful operation, otherwise FALSE
|
||||
is returned.
|
||||
|
||||
Examples:
|
||||
Clear expression register history: >
|
||||
@@ -6309,7 +6404,7 @@ histnr({history}) *histnr()*
|
||||
GetHistory()->histnr()
|
||||
<
|
||||
hlexists({name}) *hlexists()*
|
||||
The result is a Number, which is non-zero if a highlight group
|
||||
The result is a Number, which is TRUE if a highlight group
|
||||
called {name} exists. This is when the group has been
|
||||
defined in some way. Not necessarily when highlighting has
|
||||
been defined for it, it may also have been used for a syntax
|
||||
@@ -6482,7 +6577,7 @@ inputrestore() *inputrestore()*
|
||||
Restore typeahead that was saved with a previous |inputsave()|.
|
||||
Should be called the same number of times inputsave() is
|
||||
called. Calling it more often is harmless though.
|
||||
Returns 1 when there is nothing to restore, 0 otherwise.
|
||||
Returns TRUE when there is nothing to restore, FALSE otherwise.
|
||||
|
||||
inputsave() *inputsave()*
|
||||
Preserve typeahead (also from mappings) and clear it, so that
|
||||
@@ -6490,7 +6585,7 @@ inputsave() *inputsave()*
|
||||
followed by a matching inputrestore() after the prompt. Can
|
||||
be used several times, in which case there must be just as
|
||||
many inputrestore() calls.
|
||||
Returns 1 when out of memory, 0 otherwise.
|
||||
Returns TRUE when out of memory, FALSE otherwise.
|
||||
|
||||
inputsecret({prompt} [, {text}]) *inputsecret()*
|
||||
This function acts much like the |input()| function with but
|
||||
@@ -6966,7 +7061,7 @@ listener_flush([{buf}]) *listener_flush()*
|
||||
|
||||
listener_remove({id}) *listener_remove()*
|
||||
Remove a listener previously added with listener_add().
|
||||
Returns zero when {id} could not be found, one when {id} was
|
||||
Returns FALSE when {id} could not be found, TRUE when {id} was
|
||||
removed.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
@@ -7471,24 +7566,24 @@ matchfuzzy({list}, {str} [, {dict}]) *matchfuzzy()*
|
||||
|
||||
matchfuzzypos({list}, {str} [, {dict}]) *matchfuzzypos()*
|
||||
Same as |matchfuzzy()|, but returns the list of matched
|
||||
strings and the list of character positions where characters
|
||||
in {str} matches. You can use |byteidx()|to convert a
|
||||
character position to a byte position.
|
||||
|
||||
strings, the list of character positions where characters
|
||||
in {str} matches and a list of matching scores. You can
|
||||
use |byteidx()|to convert a character position to a byte
|
||||
position.
|
||||
|
||||
If {str} matches multiple times in a string, then only the
|
||||
positions for the best match is returned.
|
||||
|
||||
If there are no matching strings or there is an error, then a
|
||||
list with two empty list items is returned.
|
||||
list with three empty list items is returned.
|
||||
|
||||
Example: >
|
||||
:echo matchfuzzypos(['testing'], 'tsg')
|
||||
< results in [['testing'], [[0, 2, 6]]] >
|
||||
< results in [['testing'], [[0, 2, 6]], [99]] >
|
||||
:echo matchfuzzypos(['clay', 'lacy'], 'la')
|
||||
< results in [['lacy', 'clay'], [[0, 1], [1, 2]]] >
|
||||
< results in [['lacy', 'clay'], [[0, 1], [1, 2]], [153, 133]] >
|
||||
:echo [{'text': 'hello', 'id' : 10}]->matchfuzzypos('ll', {'key' : 'text'})
|
||||
< results in [{'id': 10, 'text': 'hello'}] [[2, 3]]
|
||||
< results in [[{'id': 10, 'text': 'hello'}], [[2, 3]], [127]]
|
||||
|
||||
matchlist({expr}, {pat} [, {start} [, {count}]]) *matchlist()*
|
||||
Same as |match()|, but return a |List|. The first item in the
|
||||
@@ -7542,8 +7637,10 @@ matchstrpos({expr}, {pat} [, {start} [, {count}]]) *matchstrpos()*
|
||||
<
|
||||
|
||||
*max()*
|
||||
max({expr}) Return the maximum value of all items in {expr}.
|
||||
{expr} can be a |List| or a |Dictionary|. For a Dictionary,
|
||||
max({expr}) Return the maximum value of all items in {expr}. Example: >
|
||||
echo max([apples, pears, oranges])
|
||||
|
||||
< {expr} can be a |List| or a |Dictionary|. For a Dictionary,
|
||||
it returns the maximum of all values in the Dictionary.
|
||||
If {expr} is neither a List nor a Dictionary, or one of the
|
||||
items in {expr} cannot be used as a Number this results in
|
||||
@@ -7613,8 +7710,10 @@ menu_info({name} [, {mode}]) *menu_info()*
|
||||
|
||||
|
||||
< *min()*
|
||||
min({expr}) Return the minimum value of all items in {expr}.
|
||||
{expr} can be a |List| or a |Dictionary|. For a Dictionary,
|
||||
min({expr}) Return the minimum value of all items in {expr}. Example: >
|
||||
echo min([apples, pears, oranges])
|
||||
|
||||
< {expr} can be a |List| or a |Dictionary|. For a Dictionary,
|
||||
it returns the minimum of all values in the Dictionary.
|
||||
If {expr} is neither a List nor a Dictionary, or one of the
|
||||
items in {expr} cannot be used as a Number this results in
|
||||
@@ -7631,13 +7730,13 @@ mkdir({name} [, {path} [, {prot}]])
|
||||
necessary. Otherwise it must be "".
|
||||
|
||||
If {prot} is given it is used to set the protection bits of
|
||||
the new directory. The default is 0755 (rwxr-xr-x: r/w for
|
||||
the user readable for others). Use 0700 to make it unreadable
|
||||
for others. This is only used for the last part of {name}.
|
||||
Thus if you create /tmp/foo/bar then /tmp/foo will be created
|
||||
with 0755.
|
||||
the new directory. The default is 0o755 (rwxr-xr-x: r/w for
|
||||
the user, readable for others). Use 0o700 to make it
|
||||
unreadable for others. This is only used for the last part of
|
||||
{name}. Thus if you create /tmp/foo/bar then /tmp/foo will be
|
||||
created with 0o755.
|
||||
Example: >
|
||||
:call mkdir($HOME . "/tmp/foo/bar", "p", 0700)
|
||||
:call mkdir($HOME . "/tmp/foo/bar", "p", 0o700)
|
||||
|
||||
< This function is not available in the |sandbox|.
|
||||
|
||||
@@ -7645,8 +7744,8 @@ mkdir({name} [, {path} [, {prot}]])
|
||||
flag is passed (since patch 8.0.1708). However, without the
|
||||
"p" option the call will fail.
|
||||
|
||||
The function result is a Number, which is 1 if the call was
|
||||
successful or 0 if the directory creation failed or partly
|
||||
The function result is a Number, which is TRUE if the call was
|
||||
successful or FALSE if the directory creation failed or partly
|
||||
failed.
|
||||
|
||||
Not available on all systems. To check use: >
|
||||
@@ -8191,6 +8290,14 @@ rand([{expr}]) *rand()* *random*
|
||||
:echo rand(seed)
|
||||
:echo rand(seed) % 16 " random number 0 - 15
|
||||
<
|
||||
|
||||
readblob({fname}) *readblob()*
|
||||
Read file {fname} in binary mode and return a |Blob|.
|
||||
When the file can't be opened an error message is given and
|
||||
the result is an empty |Blob|.
|
||||
Also see |readfile()| and |writefile()|.
|
||||
|
||||
|
||||
readdir({directory} [, {expr} [, {dict}]]) *readdir()*
|
||||
Return a list with file and directory names in {directory}.
|
||||
You can also use |glob()| if you don't need to do complicated
|
||||
@@ -8305,6 +8412,7 @@ readdirex({directory} [, {expr} [, {dict}]]) *readdirex()*
|
||||
Can also be used as a |method|: >
|
||||
GetDirName()->readdirex()
|
||||
<
|
||||
|
||||
*readfile()*
|
||||
readfile({fname} [, {type} [, {max}]])
|
||||
Read file {fname} and return a |List|, each line of the file
|
||||
@@ -8316,8 +8424,6 @@ readfile({fname} [, {type} [, {max}]])
|
||||
- When the last line ends in a NL an extra empty list item is
|
||||
added.
|
||||
- No CR characters are removed.
|
||||
When {type} contains "B" a |Blob| is returned with the binary
|
||||
data of the file unmodified.
|
||||
Otherwise:
|
||||
- CR characters that appear before a NL are removed.
|
||||
- Whether the last line ends in a NL or not does not matter.
|
||||
@@ -8335,6 +8441,9 @@ readfile({fname} [, {type} [, {max}]])
|
||||
Note that without {max} the whole file is read into memory.
|
||||
Also note that there is no recognition of encoding. Read a
|
||||
file into a buffer if you need to.
|
||||
Deprecated (use |readblob()| instead): When {type} contains
|
||||
"B" a |Blob| is returned with the binary data of the file
|
||||
unmodified.
|
||||
When the file can't be opened an error message is given and
|
||||
the result is an empty list.
|
||||
Also see |writefile()|.
|
||||
@@ -8960,7 +9069,7 @@ searchcount([{options}]) *searchcount()*
|
||||
result. if search exceeded
|
||||
total count, "total" value
|
||||
becomes `maxcount + 1`
|
||||
(default: 0)
|
||||
(default: 99)
|
||||
pos |List| `[lnum, col, off]` value
|
||||
when recomputing the result.
|
||||
this changes "current" result
|
||||
@@ -9112,6 +9221,7 @@ server2client({clientid}, {string}) *server2client()*
|
||||
Send a reply string to {clientid}. The most recent {clientid}
|
||||
that sent a string can be retrieved with expand("<client>").
|
||||
{only available when compiled with the |+clientserver| feature}
|
||||
Returns zero for success, -1 for failure.
|
||||
Note:
|
||||
This id has to be stored before the next command can be
|
||||
received. I.e. before returning from the received command and
|
||||
@@ -9200,6 +9310,19 @@ setcellwidths({list}) *setcellwidths()*
|
||||
< You can use the script $VIMRUNTIME/tools/emoji_list.vim to see
|
||||
the effect for known emoji characters.
|
||||
|
||||
setcharpos({expr}, {list}) *setcharpos()*
|
||||
Same as |setpos()| but uses the specified column number as the
|
||||
character index instead of the byte index in the line.
|
||||
|
||||
Example:
|
||||
With the text "여보세요" in line 8: >
|
||||
call setcharpos('.', [0, 8, 4, 0])
|
||||
< positions the cursor on the fourth character '요'. >
|
||||
call setpos('.', [0, 8, 4, 0])
|
||||
< positions the cursor on the second character '보'.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetPosition()->setcharpos('.')
|
||||
|
||||
setcharsearch({dict}) *setcharsearch()*
|
||||
Set the current character search information to {dict},
|
||||
@@ -9236,12 +9359,27 @@ setcmdpos({pos}) *setcmdpos()*
|
||||
before inserting the resulting text.
|
||||
When the number is too big the cursor is put at the end of the
|
||||
line. A number smaller than one has undefined results.
|
||||
Returns 0 when successful, 1 when not editing the command
|
||||
line.
|
||||
Returns FALSE when successful, TRUE when not editing the
|
||||
command line.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetPos()->setcmdpos()
|
||||
|
||||
setcursorcharpos({lnum}, {col} [, {off}]) *setcursorcharpos()*
|
||||
setcursorcharpos({list})
|
||||
Same as |cursor()| but uses the specified column number as the
|
||||
character index instead of the byte index in the line.
|
||||
|
||||
Example:
|
||||
With the text "여보세요" in line 4: >
|
||||
call setcursorcharpos(4, 3)
|
||||
< positions the cursor on the third character '세'. >
|
||||
call cursor(4, 3)
|
||||
< positions the cursor on the first character '여'.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetCursorPos()->setcursorcharpos()
|
||||
|
||||
setenv({name}, {val}) *setenv()*
|
||||
Set environment variable {name} to {val}.
|
||||
When {val} is |v:null| the environment variable is deleted.
|
||||
@@ -9280,9 +9418,11 @@ setline({lnum}, {text}) *setline()*
|
||||
{lnum} is used like with |getline()|.
|
||||
When {lnum} is just below the last line the {text} will be
|
||||
added below the last line.
|
||||
{text} can be any type or a List of any type, each item is
|
||||
converted to a String.
|
||||
|
||||
If this succeeds, 0 is returned. If this fails (most likely
|
||||
because {lnum} is invalid) 1 is returned.
|
||||
If this succeeds, FALSE is returned. If this fails (most likely
|
||||
because {lnum} is invalid) TRUE is returned.
|
||||
|
||||
Example: >
|
||||
:call setline(5, strftime("%c"))
|
||||
@@ -9353,7 +9493,8 @@ setpos({expr}, {list})
|
||||
|
||||
"lnum" and "col" are the position in the buffer. The first
|
||||
column is 1. Use a zero "lnum" to delete a mark. If "col" is
|
||||
smaller than 1 then 1 is used.
|
||||
smaller than 1 then 1 is used. To use the character count
|
||||
instead of the byte count, use |setcharpos()|.
|
||||
|
||||
The "off" number is only used when 'virtualedit' is set. Then
|
||||
it is the offset in screen columns from the start of the
|
||||
@@ -9373,7 +9514,7 @@ setpos({expr}, {list})
|
||||
Returns 0 when the position could be set, -1 otherwise.
|
||||
An error message is given if {expr} is invalid.
|
||||
|
||||
Also see |getpos()| and |getcurpos()|.
|
||||
Also see |setcharpos()|, |getpos()| and |getcurpos()|.
|
||||
|
||||
This does not restore the preferred column for moving
|
||||
vertically; if you set the cursor position with this, |j| and
|
||||
@@ -9748,6 +9889,18 @@ sinh({expr}) *sinh()*
|
||||
{only available when compiled with the |+float| feature}
|
||||
|
||||
|
||||
slice({expr}, {start} [, {end}]) *slice()*
|
||||
Similar to using a |slice| "expr[start : end]", but "end" is
|
||||
used exclusive. And for a string the indexes are used as
|
||||
character indexes instead of byte indexes, like in
|
||||
|vim9script|.
|
||||
When {end} is omitted the slice continues to the last item.
|
||||
When {end} is -1 the last item is omitted.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetList()->slice(offset)
|
||||
|
||||
|
||||
sort({list} [, {func} [, {dict}]]) *sort()* *E702*
|
||||
Sort the items in {list} in-place. Returns {list}.
|
||||
|
||||
@@ -10874,7 +11027,7 @@ timer_start({time}, {callback} [, {options}])
|
||||
is the timer ID. The callback is only invoked when Vim is
|
||||
waiting for input.
|
||||
If you want to show a message look at |popup_notification()|
|
||||
to avoid intefering with what the user is doing.
|
||||
to avoid interfering with what the user is doing.
|
||||
|
||||
{options} is a dictionary. Supported entries:
|
||||
"repeat" Number of times to repeat calling the
|
||||
@@ -11027,6 +11180,14 @@ type({expr}) The result is a Number representing the type of {expr}.
|
||||
< Can also be used as a |method|: >
|
||||
mylist->type()
|
||||
|
||||
|
||||
typename({expr}) *typename()*
|
||||
Return a string representation of the type of {expr}.
|
||||
Example: >
|
||||
echo typename([1, 2, 3])
|
||||
list<number>
|
||||
|
||||
|
||||
undofile({name}) *undofile()*
|
||||
Return the name of the undo file that would be used for a file
|
||||
with name {name} when writing. This uses the 'undodir'
|
||||
@@ -11184,9 +11345,11 @@ win_execute({id}, {command} [, {silent}]) *win_execute()*
|
||||
call win_execute(winid, 'set syntax=python')
|
||||
< Doing the same with `setwinvar()` would not trigger
|
||||
autocommands and not actually show syntax highlighting.
|
||||
|
||||
*E994*
|
||||
Not all commands are allowed in popup windows.
|
||||
When window {id} does not exist then no error is given.
|
||||
When window {id} does not exist then no error is given and
|
||||
an empty string is returned.
|
||||
|
||||
Can also be used as a |method|, the base is passed as the
|
||||
second argument: >
|
||||
@@ -11234,7 +11397,7 @@ win_gettype([{nr}]) *win_gettype()*
|
||||
win_gotoid({expr}) *win_gotoid()*
|
||||
Go to window with ID {expr}. This may also change the current
|
||||
tabpage.
|
||||
Return 1 if successful, 0 if the window cannot be found.
|
||||
Return TRUE if successful, FALSE if the window cannot be found.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetWinid()->win_gotoid()
|
||||
@@ -12952,7 +13115,7 @@ text...
|
||||
:exe[cute] {expr1} .. Executes the string that results from the evaluation
|
||||
of {expr1} as an Ex command.
|
||||
Multiple arguments are concatenated, with a space in
|
||||
between. To avoid the extra space use the "."
|
||||
between. To avoid the extra space use the ".."
|
||||
operator to concatenate strings into one argument.
|
||||
{expr1} is used as the processed command, command line
|
||||
editing keys are not recognized.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*filetype.txt* For Vim version 8.2. Last change: 2020 Sep 28
|
||||
*filetype.txt* For Vim version 8.2. Last change: 2021 Jan 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -147,6 +147,7 @@ can be used to overrule the filetype used for certain extensions:
|
||||
*.w g:filetype_w |ft-cweb-syntax|
|
||||
*.i g:filetype_i |ft-progress-syntax|
|
||||
*.p g:filetype_p |ft-pascal-syntax|
|
||||
*.pp g:filetype_pp |ft-pascal-syntax|
|
||||
*.sh g:bash_is_sh |ft-sh-syntax|
|
||||
*.tex g:tex_flavor |ft-tex-plugin|
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ Vim had built-in support for hangul, the Korean language, for users without
|
||||
XIM (X Input Method). Since it didn't work well and was not maintained it was
|
||||
removed in Vim 8.1.2327.
|
||||
|
||||
If you want this hangul input mehod you can go back to Vim 8.1.2326 or
|
||||
If you want this hangul input method you can go back to Vim 8.1.2326 or
|
||||
earlier. If you think this code is still useful and want to maintain it, make
|
||||
a patch to add it back. However, making it work with UTF-8 encoding would be
|
||||
best.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*helphelp.txt* For Vim version 8.2. Last change: 2020 Dec 19
|
||||
*helphelp.txt* For Vim version 8.2. Last change: 2020 Dec 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -158,6 +158,9 @@ When no argument is given to |:help| the file given with the 'helpfile' option
|
||||
will be opened. Otherwise the specified tag is searched for in all "doc/tags"
|
||||
files in the directories specified in the 'runtimepath' option.
|
||||
|
||||
If you would like to open the help in the current window, see this tip:
|
||||
|help-curwin|.
|
||||
|
||||
The initial height of the help window can be set with the 'helpheight' option
|
||||
(default 20).
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*index.txt* For Vim version 8.2. Last change: 2020 Oct 05
|
||||
*index.txt* For Vim version 8.2. Last change: 2021 Jan 15
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1590,6 +1590,8 @@ tag command action ~
|
||||
|:sign| :sig[n] manipulate signs
|
||||
|:silent| :sil[ent] run a command silently
|
||||
|:sleep| :sl[eep] do nothing for a few seconds
|
||||
|:sleep!| :sl[eep]! do nothing for a few seconds, without the
|
||||
cursor visible
|
||||
|:slast| :sla[st] split window and go to last file in the
|
||||
argument list
|
||||
|:smagic| :sm[agic] :substitute with 'magic'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*intro.txt* For Vim version 8.2. Last change: 2020 Dec 19
|
||||
*intro.txt* For Vim version 8.2. Last change: 2020 Dec 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -678,8 +678,8 @@ Normal mode from any other mode. This can be used to make sure Vim is in
|
||||
Normal mode, without causing a beep like <Esc> would. However, this does not
|
||||
work in Ex mode. When used after a command that takes an argument, such as
|
||||
|f| or |m|, the timeout set with 'ttimeoutlen' applies.
|
||||
When focus is in a terminal window, CTRL-\ CTRL-N goes to Normal mode for only
|
||||
one command, see |t_CTRL-\_CTRL-N|.
|
||||
When focus is in a terminal window, CTRL-\ CTRL-N goes to Normal mode until an
|
||||
edit command is entered, see |t_CTRL-\_CTRL-N|.
|
||||
|
||||
*CTRL-\_CTRL-G* *i_CTRL-\_CTRL-G* *c_CTRL-\_CTRL-G* *v_CTRL-\_CTRL-G*
|
||||
The command CTRL-\ CTRL-G or <C-\><C-G> can be used to go to Insert mode when
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*message.txt* For Vim version 8.2. Last change: 2020 Sep 07
|
||||
*message.txt* For Vim version 8.2. Last change: 2020 Dec 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -794,6 +794,9 @@ and the screen is about to be redrawn:
|
||||
-> Press <Enter> or <Space> to redraw the screen and continue, without that
|
||||
key being used otherwise.
|
||||
-> Press ':' or any other Normal mode command character to start that command.
|
||||
Note that after an external command some special keys, such as the cursor
|
||||
keys, may not work normally, because the terminal is still set to a state
|
||||
for executing the external command.
|
||||
-> Press 'k', <Up>, 'u', 'b' or 'g' to scroll back in the messages. This
|
||||
works the same way as at the |more-prompt|. Only works when 'compatible'
|
||||
is off and 'more' is on.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 8.2. Last change: 2020 Dec 21
|
||||
*options.txt* For Vim version 8.2. Last change: 2021 Jan 08
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -438,7 +438,7 @@ the system, mostly it is something like 256 or 1024 characters.
|
||||
CTRL-? CTRL-H
|
||||
not CTRL-? CTRL-?
|
||||
|
||||
(CTRL-? is 0177 octal, 0x7f hex)
|
||||
(CTRL-? is 0o177 octal, 0x7f hex)
|
||||
|
||||
If your delete key terminal code is wrong, but the
|
||||
code for backspace is alright, you can put this in
|
||||
@@ -3273,7 +3273,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
See the 'endofline' option.
|
||||
|
||||
*'fkmap'* *'fk'* *'nofkmap'* *'nofk'*
|
||||
'fkmap' 'fk' boolean (default off) *E198*
|
||||
'fkmap' 'fk' boolean (default off)
|
||||
global
|
||||
{only available when compiled with the |+rightleft|
|
||||
feature}
|
||||
@@ -4877,6 +4877,10 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*lcs-space*
|
||||
space:c Character to show for a space. When omitted, spaces
|
||||
are left blank.
|
||||
*lcs-lead*
|
||||
lead:c Character to show for leading spaces. When omitted,
|
||||
leading spaces are blank. Overrides the "space"
|
||||
setting for leading spaces.
|
||||
*lcs-trail*
|
||||
trail:c Character to show for trailing spaces. When omitted,
|
||||
trailing spaces are blank. Overrides the "space"
|
||||
@@ -5221,7 +5225,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
NOTE: This option is set to the Vi default value when 'compatible' is
|
||||
set and to the Vim default value when 'compatible' is reset.
|
||||
|
||||
*'mouse'* *E538*
|
||||
*'mouse'*
|
||||
'mouse' string (default "", "a" for GUI and Win32,
|
||||
set to "a" or "nvi" in |defaults.vim|)
|
||||
global
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*os_vms.txt* For Vim version 8.2. Last change: 2020 Jun 07
|
||||
*os_vms.txt* For Vim version 8.2. Last change: 2021 Jan 04
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL
|
||||
@@ -72,7 +72,7 @@ See the file [.SRC]INSTALLVMS.TXT.
|
||||
4. Problems *vms-problems*
|
||||
|
||||
The code has been tested under Open VMS 6.2 - 8.2 on Alpha, VAX and IA64
|
||||
platforms with the DEC C compiler. It should work without big problems.
|
||||
platforms with the DEC C compiler. It should work without major problems.
|
||||
If your system does not have some include libraries you can tune up in
|
||||
OS_VMS_CONF.H file.
|
||||
|
||||
@@ -765,6 +765,15 @@ GNU_TOOLS.ZIP package downloadable from http://www.polarhome.com/vim/
|
||||
|
||||
9. VMS related changes *vms-changes*
|
||||
|
||||
Version 8.2
|
||||
- make all changes needed for clean compile build of v8.2 on VMS on all platforms
|
||||
- fix the call mkdir bug (vicente_polo@yahoo.es)
|
||||
- test on VSI OpenVMS Alpha and Itanium platforms
|
||||
- added LUA support
|
||||
- added XPM support - Motif GUI with toolbar on all platforms
|
||||
- XPM v3.4.11 libraries for IA64, AXP and VAX are added
|
||||
- start integrating the new test scripts
|
||||
|
||||
Version 8.1
|
||||
- make necessary changes to build v8.1 on VMS
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*pattern.txt* For Vim version 8.2. Last change: 2020 Dec 06
|
||||
*pattern.txt* For Vim version 8.2. Last change: 2021 Jan 08
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -394,15 +394,19 @@ the pattern will not match. This is only useful when debugging Vim.
|
||||
==============================================================================
|
||||
3. Magic */magic*
|
||||
|
||||
Some characters in the pattern are taken literally. They match with the same
|
||||
character in the text. When preceded with a backslash however, these
|
||||
characters get a special meaning.
|
||||
Some characters in the pattern, such as letters, are taken literally. They
|
||||
match exactly the same character in the text. When preceded with a backslash
|
||||
however, these characters may get a special meaning. For example, "a" matches
|
||||
the letter "a", while "\a" matches any alphabetic character.
|
||||
|
||||
Other characters have a special meaning without a backslash. They need to be
|
||||
preceded with a backslash to match literally.
|
||||
preceded with a backslash to match literally. For example "." matches any
|
||||
character while "\." matches a dot.
|
||||
|
||||
If a character is taken literally or not depends on the 'magic' option and the
|
||||
items mentioned next.
|
||||
items in the pattern mentioned next. The 'magic' option should always be set,
|
||||
but it can be switched off for Vi compatibility. We mention the effect of
|
||||
'nomagic' here for completeness, but we recommend against using that.
|
||||
*/\m* */\M*
|
||||
Use of "\m" makes the pattern after it be interpreted as if 'magic' is set,
|
||||
ignoring the actual value of the 'magic' option.
|
||||
@@ -411,30 +415,28 @@ Use of "\M" makes the pattern after it be interpreted as if 'nomagic' is used.
|
||||
Use of "\v" means that after it, all ASCII characters except '0'-'9', 'a'-'z',
|
||||
'A'-'Z' and '_' have special meaning: "very magic"
|
||||
|
||||
Use of "\V" means that after it, only a backslash and terminating character
|
||||
(usually / or ?) have special meaning: "very nomagic"
|
||||
Use of "\V" means that after it, only a backslash and the terminating
|
||||
character (usually / or ?) have special meaning: "very nomagic"
|
||||
|
||||
Examples:
|
||||
after: \v \m \M \V matches ~
|
||||
'magic' 'nomagic'
|
||||
$ $ $ \$ matches end-of-line
|
||||
. . \. \. matches any character
|
||||
a a a a literal 'a'
|
||||
\a \a \a \a any alphabetic character
|
||||
. . \. \. any character
|
||||
\. \. . . literal dot
|
||||
$ $ $ \$ end-of-line
|
||||
* * \* \* any number of the previous atom
|
||||
~ ~ \~ \~ latest substitute string
|
||||
() \(\) \(\) \(\) grouping into an atom
|
||||
| \| \| \| separating alternatives
|
||||
\a \a \a \a alphabetic character
|
||||
() \(\) \(\) \(\) group as an atom
|
||||
| \| \| \| nothing: separates alternatives
|
||||
\\ \\ \\ \\ literal backslash
|
||||
\. \. . . literal dot
|
||||
\{ { { { literal '{'
|
||||
a a a a literal 'a'
|
||||
\{ { { { literal curly brace
|
||||
|
||||
{only Vim supports \m, \M, \v and \V}
|
||||
|
||||
It is recommended to always keep the 'magic' option at the default setting,
|
||||
which is 'magic'. This avoids portability problems. To make a pattern immune
|
||||
to the 'magic' option being set or not, put "\m" or "\M" at the start of the
|
||||
pattern.
|
||||
If you want to you can make a pattern immune to the 'magic' option being set
|
||||
or not by putting "\m" or "\M" at the start of the pattern.
|
||||
|
||||
==============================================================================
|
||||
4. Overview of pattern items *pattern-overview*
|
||||
@@ -1177,7 +1179,7 @@ x A single character, with no special meaning, matches itself
|
||||
\b <BS>
|
||||
\n line break, see above |/[\n]|
|
||||
\d123 decimal number of character
|
||||
\o40 octal number of character up to 0377
|
||||
\o40 octal number of character up to 0o377
|
||||
\x20 hexadecimal number of character up to 0xff
|
||||
\u20AC hex. number of multibyte character up to 0xffff
|
||||
\U1234 hex. number of multibyte character up to 0xffffffff
|
||||
@@ -1215,7 +1217,8 @@ x A single character, with no special meaning, matches itself
|
||||
\%d123 Matches the character specified with a decimal number. Must be
|
||||
followed by a non-digit.
|
||||
\%o40 Matches the character specified with an octal number up to 0377.
|
||||
Numbers below 040 must be followed by a non-octal digit or a non-digit.
|
||||
Numbers below 0o40 must be followed by a non-octal digit or a
|
||||
non-digit.
|
||||
\%x2a Matches the character specified with up to two hexadecimal characters.
|
||||
\%u20AC Matches the character specified with up to four hexadecimal
|
||||
characters.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*popup.txt* For Vim version 8.2. Last change: 2020 Nov 07
|
||||
*popup.txt* For Vim version 8.2. Last change: 2021 Jan 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -309,8 +309,8 @@ popup_dialog({what}, {options}) *popup_dialog()*
|
||||
|
||||
popup_filter_menu({id}, {key}) *popup_filter_menu()*
|
||||
Filter that can be used for a popup. These keys can be used:
|
||||
j <Down> select item below
|
||||
k <Up> select item above
|
||||
j <Down> <C-N> select item below
|
||||
k <Up> <C-P> select item above
|
||||
<Space> <Enter> accept current selection
|
||||
x Esc CTRL-C cancel the menu
|
||||
Other keys are ignored.
|
||||
@@ -588,8 +588,6 @@ properties. It is in one of four forms:
|
||||
|
||||
If you want to create a new buffer yourself use |bufadd()| and pass the buffer
|
||||
number to popup_create().
|
||||
It is not possible to use the buffer of a terminal window. *E278* You CAN
|
||||
create a hidden terminal buffer and use that one in a popup window.
|
||||
|
||||
The second argument of |popup_create()| is a dictionary with options:
|
||||
line Screen line where to position the popup. Can use a
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*repeat.txt* For Vim version 8.2. Last change: 2020 Oct 09
|
||||
*repeat.txt* For Vim version 8.2. Last change: 2021 Jan 23
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -354,6 +354,14 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
|
||||
Vim version, or update Vim to a newer version. See
|
||||
|vimscript-version| for what changed between versions.
|
||||
|
||||
:vim9[script] [noclear] *:vim9* *:vim9script*
|
||||
Marks a script file as containing |Vim9-script|
|
||||
commands. Also see |vim9-namespace|.
|
||||
Must be the first command in the file.
|
||||
For [noclear] see |vim9-reload|.
|
||||
Without the |+eval| feature this changes the syntax
|
||||
for some commands.
|
||||
|
||||
*:scr* *:scriptnames*
|
||||
:scr[iptnames] List all sourced script names, in the order they were
|
||||
first sourced. The number is used for the script ID
|
||||
@@ -891,8 +899,9 @@ matches ".../plugin/explorer.vim", ".../plugin/iexplorer.vim", etc. >
|
||||
matches ".../plugin/explorer.vim" and "explorer.vim" in any other directory.
|
||||
|
||||
The match for functions is done against the name as it's shown in the output
|
||||
of ":function". For local functions this means that something like "<SNR>99_"
|
||||
is prepended.
|
||||
of ":function". However, for local functions the script-specific prefix such
|
||||
as "<SNR>99_" is ignored to make it easier to match script-local functions
|
||||
without knowing the ID of the script.
|
||||
|
||||
Note that functions are first loaded and later executed. When they are loaded
|
||||
the "file" breakpoints are checked, when they are executed the "func"
|
||||
@@ -947,10 +956,10 @@ OBSCURE
|
||||
|
||||
Profiling means that Vim measures the time that is spent on executing
|
||||
functions and/or scripts. The |+profile| feature is required for this.
|
||||
It is only included when Vim was compiled with "huge" features.
|
||||
It is included when Vim was compiled with "huge" features.
|
||||
|
||||
You can also use the |reltime()| function to measure time. This only requires
|
||||
the |+reltime| feature, which is present more often.
|
||||
the |+reltime| feature, which is present in more builds.
|
||||
|
||||
For profiling syntax highlighting see |:syntime|.
|
||||
|
||||
@@ -997,7 +1006,12 @@ For example, to profile the one_script.vim script file: >
|
||||
|
||||
|
||||
You must always start with a ":profile start fname" command. The resulting
|
||||
file is written when Vim exits. Here is an example of the output, with line
|
||||
file is written when Vim exits. For example, to profile one specific
|
||||
function: >
|
||||
profile start /tmp/vimprofile
|
||||
profile func MyFunc
|
||||
|
||||
Here is an example of the output, with line
|
||||
numbers prepended for the explanation:
|
||||
|
||||
1 FUNCTION Test2() ~
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*syntax.txt* For Vim version 8.2. Last change: 2020 Dec 17
|
||||
*syntax.txt* For Vim version 8.2. Last change: 2021 Jan 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -2335,11 +2335,12 @@ http://papp.plan9.de.
|
||||
|
||||
PASCAL *pascal.vim* *ft-pascal-syntax*
|
||||
|
||||
Files matching "*.p" could be Progress or Pascal. If the automatic detection
|
||||
doesn't work for you, or you don't edit Progress at all, use this in your
|
||||
startup vimrc: >
|
||||
Files matching "*.p" could be Progress or Pascal and those matching "*.pp"
|
||||
could be Puppet or Pascal. If the automatic detection doesn't work for you,
|
||||
or you only edit Pascal files, use this in your startup vimrc: >
|
||||
|
||||
:let filetype_p = "pascal"
|
||||
:let filetype_p = "pascal"
|
||||
:let filetype_pp = "pascal"
|
||||
|
||||
The Pascal syntax file has been extended to take into account some extensions
|
||||
provided by Turbo Pascal, Free Pascal Compiler and GNU Pascal Compiler.
|
||||
|
||||
@@ -1045,6 +1045,8 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
't_da' term.txt /*'t_da'*
|
||||
't_db' term.txt /*'t_db'*
|
||||
't_dl' term.txt /*'t_dl'*
|
||||
't_fd' term.txt /*'t_fd'*
|
||||
't_fe' term.txt /*'t_fe'*
|
||||
't_fs' term.txt /*'t_fs'*
|
||||
't_k1' term.txt /*'t_k1'*
|
||||
't_k2' term.txt /*'t_k2'*
|
||||
@@ -1783,6 +1785,8 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
09.2 usr_09.txt /*09.2*
|
||||
09.3 usr_09.txt /*09.3*
|
||||
09.4 usr_09.txt /*09.4*
|
||||
0o eval.txt /*0o*
|
||||
0x eval.txt /*0x*
|
||||
10.1 usr_10.txt /*10.1*
|
||||
10.2 usr_10.txt /*10.2*
|
||||
10.3 usr_10.txt /*10.3*
|
||||
@@ -1994,6 +1998,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
:AdaTagFile ft_ada.txt /*:AdaTagFile*
|
||||
:AdaTypes ft_ada.txt /*:AdaTypes*
|
||||
:Arguments terminal.txt /*:Arguments*
|
||||
:Asm terminal.txt /*:Asm*
|
||||
:Break terminal.txt /*:Break*
|
||||
:Cfilter quickfix.txt /*:Cfilter*
|
||||
:Clear terminal.txt /*:Clear*
|
||||
@@ -2072,6 +2077,11 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
:_#< cmdline.txt /*:_#<*
|
||||
:_#n cmdline.txt /*:_#n*
|
||||
:_% cmdline.txt /*:_%*
|
||||
:_%% cmdline.txt /*:_%%*
|
||||
:_%%% cmdline.txt /*:_%%%*
|
||||
:_%%0 cmdline.txt /*:_%%0*
|
||||
:_%%< cmdline.txt /*:_%%<*
|
||||
:_%%n cmdline.txt /*:_%%n*
|
||||
:_%: cmdline.txt /*:_%:*
|
||||
:_%< cmdline.txt /*:_%<*
|
||||
:a insert.txt /*:a*
|
||||
@@ -3104,9 +3114,11 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
:sip change.txt /*:sip*
|
||||
:sir change.txt /*:sir*
|
||||
:sl various.txt /*:sl*
|
||||
:sl! various.txt /*:sl!*
|
||||
:sla windows.txt /*:sla*
|
||||
:slast windows.txt /*:slast*
|
||||
:sleep various.txt /*:sleep*
|
||||
:sleep! various.txt /*:sleep!*
|
||||
:sm change.txt /*:sm*
|
||||
:smagic change.txt /*:smagic*
|
||||
:smap map.txt /*:smap*
|
||||
@@ -3389,8 +3401,8 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
:vie editing.txt /*:vie*
|
||||
:view editing.txt /*:view*
|
||||
:vim quickfix.txt /*:vim*
|
||||
:vim9 vim9.txt /*:vim9*
|
||||
:vim9script vim9.txt /*:vim9script*
|
||||
:vim9 repeat.txt /*:vim9*
|
||||
:vim9script repeat.txt /*:vim9script*
|
||||
:vimgrep quickfix.txt /*:vimgrep*
|
||||
:vimgrepa quickfix.txt /*:vimgrepa*
|
||||
:vimgrepadd quickfix.txt /*:vimgrepadd*
|
||||
@@ -4020,7 +4032,6 @@ E194 message.txt /*E194*
|
||||
E195 starting.txt /*E195*
|
||||
E196 various.txt /*E196*
|
||||
E197 mlang.txt /*E197*
|
||||
E198 options.txt /*E198*
|
||||
E199 cmdline.txt /*E199*
|
||||
E20 motion.txt /*E20*
|
||||
E200 autocmd.txt /*E200*
|
||||
@@ -4106,7 +4117,6 @@ E274 eval.txt /*E274*
|
||||
E275 textprop.txt /*E275*
|
||||
E276 eval.txt /*E276*
|
||||
E277 remote.txt /*E277*
|
||||
E278 popup.txt /*E278*
|
||||
E279 terminal.txt /*E279*
|
||||
E28 syntax.txt /*E28*
|
||||
E280 if_tcl.txt /*E280*
|
||||
@@ -4172,7 +4182,6 @@ E337 gui.txt /*E337*
|
||||
E338 editing.txt /*E338*
|
||||
E339 message.txt /*E339*
|
||||
E34 various.txt /*E34*
|
||||
E340 vi_diff.txt /*E340*
|
||||
E341 message.txt /*E341*
|
||||
E342 message.txt /*E342*
|
||||
E343 options.txt /*E343*
|
||||
@@ -4380,7 +4389,6 @@ E534 options.txt /*E534*
|
||||
E535 options.txt /*E535*
|
||||
E536 options.txt /*E536*
|
||||
E537 options.txt /*E537*
|
||||
E538 options.txt /*E538*
|
||||
E539 options.txt /*E539*
|
||||
E54 pattern.txt /*E54*
|
||||
E540 options.txt /*E540*
|
||||
@@ -5152,6 +5160,7 @@ VMS os_vms.txt /*VMS*
|
||||
Vi intro.txt /*Vi*
|
||||
View starting.txt /*View*
|
||||
Vim9 vim9.txt /*Vim9*
|
||||
Vim9-script vim9.txt /*Vim9-script*
|
||||
VimEnter autocmd.txt /*VimEnter*
|
||||
VimLeave autocmd.txt /*VimLeave*
|
||||
VimLeavePre autocmd.txt /*VimLeavePre*
|
||||
@@ -5563,6 +5572,10 @@ c_## cmdline.txt /*c_##*
|
||||
c_#< cmdline.txt /*c_#<*
|
||||
c_#n cmdline.txt /*c_#n*
|
||||
c_% cmdline.txt /*c_%*
|
||||
c_%% cmdline.txt /*c_%%*
|
||||
c_%%%# cmdline.txt /*c_%%%#*
|
||||
c_%%< cmdline.txt /*c_%%<*
|
||||
c_%%n cmdline.txt /*c_%%n*
|
||||
c_<BS> cmdline.txt /*c_<BS>*
|
||||
c_<C-Left> cmdline.txt /*c_<C-Left>*
|
||||
c_<C-R> cmdline.txt /*c_<C-R>*
|
||||
@@ -5746,8 +5759,10 @@ characterwise motion.txt /*characterwise*
|
||||
characterwise-register change.txt /*characterwise-register*
|
||||
characterwise-visual visual.txt /*characterwise-visual*
|
||||
charclass() eval.txt /*charclass()*
|
||||
charcol() eval.txt /*charcol()*
|
||||
charconvert_from-variable eval.txt /*charconvert_from-variable*
|
||||
charconvert_to-variable eval.txt /*charconvert_to-variable*
|
||||
charidx() eval.txt /*charidx()*
|
||||
charity uganda.txt /*charity*
|
||||
charset mbyte.txt /*charset*
|
||||
charset-conversion mbyte.txt /*charset-conversion*
|
||||
@@ -6336,6 +6351,7 @@ expression-commands eval.txt /*expression-commands*
|
||||
expression-syntax eval.txt /*expression-syntax*
|
||||
exrc starting.txt /*exrc*
|
||||
extend() eval.txt /*extend()*
|
||||
extendnew() eval.txt /*extendnew()*
|
||||
extension-removal cmdline.txt /*extension-removal*
|
||||
extensions-improvements todo.txt /*extensions-improvements*
|
||||
f motion.txt /*f*
|
||||
@@ -6415,7 +6431,26 @@ fname_new-variable eval.txt /*fname_new-variable*
|
||||
fname_out-variable eval.txt /*fname_out-variable*
|
||||
fnameescape() eval.txt /*fnameescape()*
|
||||
fnamemodify() eval.txt /*fnamemodify()*
|
||||
fo-1 change.txt /*fo-1*
|
||||
fo-2 change.txt /*fo-2*
|
||||
fo-B change.txt /*fo-B*
|
||||
fo-M change.txt /*fo-M*
|
||||
fo-] change.txt /*fo-]*
|
||||
fo-a change.txt /*fo-a*
|
||||
fo-b change.txt /*fo-b*
|
||||
fo-c change.txt /*fo-c*
|
||||
fo-j change.txt /*fo-j*
|
||||
fo-l change.txt /*fo-l*
|
||||
fo-m change.txt /*fo-m*
|
||||
fo-n change.txt /*fo-n*
|
||||
fo-o change.txt /*fo-o*
|
||||
fo-p change.txt /*fo-p*
|
||||
fo-q change.txt /*fo-q*
|
||||
fo-r change.txt /*fo-r*
|
||||
fo-t change.txt /*fo-t*
|
||||
fo-table change.txt /*fo-table*
|
||||
fo-v change.txt /*fo-v*
|
||||
fo-w change.txt /*fo-w*
|
||||
fold-behavior fold.txt /*fold-behavior*
|
||||
fold-colors fold.txt /*fold-colors*
|
||||
fold-commands fold.txt /*fold-commands*
|
||||
@@ -6940,6 +6975,7 @@ getbufvar() eval.txt /*getbufvar()*
|
||||
getchangelist() eval.txt /*getchangelist()*
|
||||
getchar() eval.txt /*getchar()*
|
||||
getcharmod() eval.txt /*getcharmod()*
|
||||
getcharpos() eval.txt /*getcharpos()*
|
||||
getcharsearch() eval.txt /*getcharsearch()*
|
||||
getcmdline() eval.txt /*getcmdline()*
|
||||
getcmdpos() eval.txt /*getcmdpos()*
|
||||
@@ -6947,6 +6983,7 @@ getcmdtype() eval.txt /*getcmdtype()*
|
||||
getcmdwintype() eval.txt /*getcmdwintype()*
|
||||
getcompletion() eval.txt /*getcompletion()*
|
||||
getcurpos() eval.txt /*getcurpos()*
|
||||
getcursorcharpos() eval.txt /*getcursorcharpos()*
|
||||
getcwd() eval.txt /*getcwd()*
|
||||
getenv() eval.txt /*getenv()*
|
||||
getfontname() eval.txt /*getfontname()*
|
||||
@@ -7147,6 +7184,7 @@ hebrew hebrew.txt /*hebrew*
|
||||
hebrew.txt hebrew.txt /*hebrew.txt*
|
||||
help helphelp.txt /*help*
|
||||
help-context help.txt /*help-context*
|
||||
help-curwin tips.txt /*help-curwin*
|
||||
help-summary usr_02.txt /*help-summary*
|
||||
help-tags tags 1
|
||||
help-translated helphelp.txt /*help-translated*
|
||||
@@ -8248,9 +8286,12 @@ notation intro.txt /*notation*
|
||||
notepad gui_w32.txt /*notepad*
|
||||
nr2char() eval.txt /*nr2char()*
|
||||
nroff.vim syntax.txt /*nroff.vim*
|
||||
null vim9.txt /*null*
|
||||
null-variable eval.txt /*null-variable*
|
||||
number_relativenumber options.txt /*number_relativenumber*
|
||||
numbered-function eval.txt /*numbered-function*
|
||||
numbermax-variable eval.txt /*numbermax-variable*
|
||||
numbermin-variable eval.txt /*numbermin-variable*
|
||||
numbersize-variable eval.txt /*numbersize-variable*
|
||||
o insert.txt /*o*
|
||||
o_CTRL-V motion.txt /*o_CTRL-V*
|
||||
@@ -8661,6 +8702,7 @@ read-in-close-cb channel.txt /*read-in-close-cb*
|
||||
read-messages insert.txt /*read-messages*
|
||||
read-only-share editing.txt /*read-only-share*
|
||||
read-stdin version5.txt /*read-stdin*
|
||||
readblob() eval.txt /*readblob()*
|
||||
readdir() eval.txt /*readdir()*
|
||||
readdirex() eval.txt /*readdirex()*
|
||||
readfile() eval.txt /*readfile()*
|
||||
@@ -8859,8 +8901,10 @@ set-spc-auto spell.txt /*set-spc-auto*
|
||||
setbufline() eval.txt /*setbufline()*
|
||||
setbufvar() eval.txt /*setbufvar()*
|
||||
setcellwidths() eval.txt /*setcellwidths()*
|
||||
setcharpos() eval.txt /*setcharpos()*
|
||||
setcharsearch() eval.txt /*setcharsearch()*
|
||||
setcmdpos() eval.txt /*setcmdpos()*
|
||||
setcursorcharpos() eval.txt /*setcursorcharpos()*
|
||||
setenv() eval.txt /*setenv()*
|
||||
setfperm() eval.txt /*setfperm()*
|
||||
setline() eval.txt /*setline()*
|
||||
@@ -8924,6 +8968,7 @@ sinh() eval.txt /*sinh()*
|
||||
skeleton autocmd.txt /*skeleton*
|
||||
skip_defaults_vim starting.txt /*skip_defaults_vim*
|
||||
slice eval.txt /*slice*
|
||||
slice() eval.txt /*slice()*
|
||||
slow-fast-terminal term.txt /*slow-fast-terminal*
|
||||
slow-start starting.txt /*slow-start*
|
||||
slow-terminal term.txt /*slow-terminal*
|
||||
@@ -9319,6 +9364,8 @@ t_f6 version4.txt /*t_f6*
|
||||
t_f7 version4.txt /*t_f7*
|
||||
t_f8 version4.txt /*t_f8*
|
||||
t_f9 version4.txt /*t_f9*
|
||||
t_fd term.txt /*t_fd*
|
||||
t_fe term.txt /*t_fe*
|
||||
t_float-variable eval.txt /*t_float-variable*
|
||||
t_fs term.txt /*t_fs*
|
||||
t_func-variable eval.txt /*t_func-variable*
|
||||
@@ -9541,6 +9588,7 @@ termdebug-prompt terminal.txt /*termdebug-prompt*
|
||||
termdebug-starting terminal.txt /*termdebug-starting*
|
||||
termdebug-stepping terminal.txt /*termdebug-stepping*
|
||||
termdebug-variables terminal.txt /*termdebug-variables*
|
||||
termdebug_disasm_window terminal.txt /*termdebug_disasm_window*
|
||||
termdebug_map_K terminal.txt /*termdebug_map_K*
|
||||
termdebug_popup terminal.txt /*termdebug_popup*
|
||||
termdebug_shortcuts terminal.txt /*termdebug_shortcuts*
|
||||
@@ -9692,6 +9740,7 @@ type-inference vim9.txt /*type-inference*
|
||||
type-mistakes tips.txt /*type-mistakes*
|
||||
typecorr-settings usr_41.txt /*typecorr-settings*
|
||||
typecorr.txt usr_41.txt /*typecorr.txt*
|
||||
typename() eval.txt /*typename()*
|
||||
u undo.txt /*u*
|
||||
uganda uganda.txt /*uganda*
|
||||
uganda.txt uganda.txt /*uganda.txt*
|
||||
@@ -9819,6 +9868,8 @@ v:mouse_win eval.txt /*v:mouse_win*
|
||||
v:mouse_winid eval.txt /*v:mouse_winid*
|
||||
v:none eval.txt /*v:none*
|
||||
v:null eval.txt /*v:null*
|
||||
v:numbermax eval.txt /*v:numbermax*
|
||||
v:numbermin eval.txt /*v:numbermin*
|
||||
v:numbersize eval.txt /*v:numbersize*
|
||||
v:oldfiles eval.txt /*v:oldfiles*
|
||||
v:operator eval.txt /*v:operator*
|
||||
@@ -10058,8 +10109,10 @@ vim-variable eval.txt /*vim-variable*
|
||||
vim.vim syntax.txt /*vim.vim*
|
||||
vim7 version7.txt /*vim7*
|
||||
vim8 version8.txt /*vim8*
|
||||
vim9 vim9.txt /*vim9*
|
||||
vim9-classes vim9.txt /*vim9-classes*
|
||||
vim9-const vim9.txt /*vim9-const*
|
||||
vim9-curly vim9.txt /*vim9-curly*
|
||||
vim9-declaration vim9.txt /*vim9-declaration*
|
||||
vim9-declarations usr_46.txt /*vim9-declarations*
|
||||
vim9-differences vim9.txt /*vim9-differences*
|
||||
@@ -10067,11 +10120,13 @@ vim9-export vim9.txt /*vim9-export*
|
||||
vim9-final vim9.txt /*vim9-final*
|
||||
vim9-gotchas vim9.txt /*vim9-gotchas*
|
||||
vim9-import vim9.txt /*vim9-import*
|
||||
vim9-namespace vim9.txt /*vim9-namespace*
|
||||
vim9-rationale vim9.txt /*vim9-rationale*
|
||||
vim9-reload vim9.txt /*vim9-reload*
|
||||
vim9-scopes vim9.txt /*vim9-scopes*
|
||||
vim9-script vim9.txt /*vim9-script*
|
||||
vim9-script-intro usr_46.txt /*vim9-script-intro*
|
||||
vim9-types vim9.txt /*vim9-types*
|
||||
vim9-user-command vim9.txt /*vim9-user-command*
|
||||
vim9.txt vim9.txt /*vim9.txt*
|
||||
vim9script vim9.txt /*vim9script*
|
||||
vim: options.txt /*vim:*
|
||||
@@ -10289,6 +10344,7 @@ xterm-command-server term.txt /*xterm-command-server*
|
||||
xterm-copy-paste term.txt /*xterm-copy-paste*
|
||||
xterm-cursor-keys term.txt /*xterm-cursor-keys*
|
||||
xterm-end-home-keys term.txt /*xterm-end-home-keys*
|
||||
xterm-focus-event term.txt /*xterm-focus-event*
|
||||
xterm-function-keys term.txt /*xterm-function-keys*
|
||||
xterm-modifier-keys term.txt /*xterm-modifier-keys*
|
||||
xterm-mouse options.txt /*xterm-mouse*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*term.txt* For Vim version 8.2. Last change: 2020 Apr 12
|
||||
*term.txt* For Vim version 8.2. Last change: 2021 Jan 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -373,6 +373,10 @@ Added by Vim (there are no standard codes for these):
|
||||
t_Ri restore icon text from stack *t_Ri* *'t_Ri'*
|
||||
t_TE end of "raw" mode *t_TE* *'t_TE'*
|
||||
t_TI put terminal into "raw" mode *t_TI* *'t_TI'*
|
||||
t_fd disable focus-event tracking *t_fd* *'t_fd'*
|
||||
|xterm-focus-event|
|
||||
t_fe enable focus-event tracking *t_fe* *'t_fe'*
|
||||
|xterm-focus-event|
|
||||
|
||||
Some codes have a start, middle and end part. The start and end are defined
|
||||
by the termcap option, the middle part is text.
|
||||
@@ -546,6 +550,16 @@ And run "xrdb -merge .Xresources" to make it effective. You can check the
|
||||
value with the context menu (right mouse button while CTRL key is pressed),
|
||||
there should be a tick at allow-window-ops.
|
||||
|
||||
*xterm-focus-event*
|
||||
Some terminals including xterm support the focus event tracking feature.
|
||||
If this feature is enabled by the 't_fe' sequence, special key sequences are
|
||||
sent from the terminal to Vim every time the terminal gains or loses focus.
|
||||
Vim fires focus events (|FocusGained|/|FocusLost|) by handling them accordingly.
|
||||
Focus event tracking is disabled by a 't_fd' sequence when exiting "raw" mode.
|
||||
If you would like to disable this feature, add the following to your .vimrc:
|
||||
`set t_fd=`
|
||||
`set t_fe=`
|
||||
|
||||
*termcap-colors*
|
||||
Note about colors: The 't_Co' option tells Vim the number of colors available.
|
||||
When it is non-zero, the 't_AB' and 't_AF' options are used to set the color.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*terminal.txt* For Vim version 8.2. Last change: 2020 Nov 25
|
||||
*terminal.txt* For Vim version 8.2. Last change: 2021 Jan 04
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -742,6 +742,9 @@ term_setapi({buf}, {expr}) *term_setapi()*
|
||||
The default is "Tapi_". When {expr} is an empty string then
|
||||
no |terminal-api| function can be used for {buf}.
|
||||
|
||||
When used as a method the base is used for {buf}: >
|
||||
GetBufnr()->term_setapi({expr})
|
||||
|
||||
term_setansicolors({buf}, {colors}) *term_setansicolors()*
|
||||
Set the ANSI color palette used by terminal {buf}.
|
||||
{colors} must be a List of 16 valid color names or hexadecimal
|
||||
@@ -1327,6 +1330,8 @@ Other commands ~
|
||||
*:Program* jump to the window with the running program
|
||||
*:Source* jump to the window with the source code, create it if there
|
||||
isn't one
|
||||
*:Asm* jump to the window with the disassembly, create it if there
|
||||
isn't one
|
||||
|
||||
|
||||
Prompt mode ~
|
||||
@@ -1349,6 +1354,12 @@ Prompt mode can be used even when the |+terminal| feature is present with: >
|
||||
The K key is normally mapped to :Evaluate. If you do not want this use: >
|
||||
let g:termdebug_map_K = 0
|
||||
|
||||
<
|
||||
*termdebug_disasm_window*
|
||||
If you want the Asm window shown by default, set this to 1. Setting to
|
||||
any value greater than 1 will set the Asm window height to that value: >
|
||||
let g:termdebug_disasm_window = 15
|
||||
<
|
||||
|
||||
Communication ~
|
||||
*termdebug-communication*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*tips.txt* For Vim version 8.2. Last change: 2009 Nov 07
|
||||
*tips.txt* For Vim version 8.2. Last change: 2020 Dec 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -30,6 +30,7 @@ Executing shell commands in a window |shell-window|
|
||||
Hex editing |hex-editing|
|
||||
Using <> notation in autocommands |autocmd-<>|
|
||||
Highlighting matching parens |match-parens|
|
||||
Opening help in the current window |help-curwin|
|
||||
|
||||
==============================================================================
|
||||
Editing C programs *C-editing*
|
||||
@@ -530,4 +531,28 @@ A slightly more advanced version is used in the |matchparen| plugin.
|
||||
autocmd InsertEnter * match none
|
||||
<
|
||||
|
||||
==============================================================================
|
||||
Opening help in the current window *help-curwin*
|
||||
|
||||
By default, help is displayed in a split window. If you prefer it opens in
|
||||
the current window, try this custom `:HelpCurwin` command:
|
||||
>
|
||||
command -bar -nargs=? -complete=help HelpCurwin execute s:HelpCurwin(<q-args>)
|
||||
let s:did_open_help = v:false
|
||||
|
||||
function s:HelpCurwin(subject) abort
|
||||
let mods = 'silent noautocmd keepalt'
|
||||
if !s:did_open_help
|
||||
execute mods .. ' help'
|
||||
execute mods .. ' helpclose'
|
||||
let s:did_open_help = v:true
|
||||
endif
|
||||
if !getcompletion(a:subject, 'help')->empty()
|
||||
execute mods .. ' edit ' .. &helpfile
|
||||
endif
|
||||
return 'help ' .. a:subject
|
||||
endfunction
|
||||
<
|
||||
|
||||
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 8.2. Last change: 2020 Dec 22
|
||||
*todo.txt* For Vim version 8.2. Last change: 2021 Jan 31
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -38,42 +38,41 @@ browser use: https://github.com/vim/vim/issues/1234
|
||||
*known-bugs*
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
Rewrite the section on "magic". Say that 'magic' is normally on, then this
|
||||
happens... If 'magic' is off, then this is different..
|
||||
|
||||
test_vim9_cmd: uses uninitialized var
|
||||
|
||||
Vim9 - Make everything work:
|
||||
- For an :autocmd and :command argument defined in Vim9 script, if a following
|
||||
line starts with "|" append it. It's like line continuation. (#6702)
|
||||
- The syntax of a range list[a:b] is ambiguous, is this one "a:b" variable or
|
||||
a range from "a" to "b"? To avoid confusion, require white space before
|
||||
(and after) the colon? #7409
|
||||
- Add a test for profiling with nested function calls and lambda.
|
||||
- Expand `=expr` in :next, :argedit, :argadd, :argdelete, :drop
|
||||
- Expand `=expr` in :vimgrep, :vimgrepadd, :lvimgrep, :lvimgrepadd
|
||||
- Expand `=expr` in :mkspell
|
||||
- Unlet with range: "unlet list[a : b]"
|
||||
- Implement "export {one, two three}".
|
||||
- Use "null" for v:null, like true and false? #7495
|
||||
- ISN_CHECKTYPE could use check_argtype()
|
||||
- Using a script variable inside a :def function doesn't work if the variable
|
||||
is inside a block, see Test_nested_function(). Should it work?
|
||||
- give error for variable name:
|
||||
let p = function('NoSuchFunc')
|
||||
var p = function('NoSuchFunc')
|
||||
- Make closures work better:
|
||||
- Create closure in a loop. Need to make a list of them.
|
||||
- If a :def function is called with a function reference, compile it to get
|
||||
the function type.
|
||||
def Filter(x: string, Cond: func(string): bool)
|
||||
Filter(x, { v -> v =~ '^b' })
|
||||
- Expand `=expr` in :next, :argedit, :argadd, :argdelete, :drop
|
||||
- Expand `=expr` in :vimgrep, :vimgrepadd, :lvimgrep, :lvimgrepadd
|
||||
- Expand `=expr` in :mkspell
|
||||
- Does this work already: can use func as reference:
|
||||
def SomeFunc() ...
|
||||
map(list, SomeFunc)
|
||||
Filter(x, (v) => v =~ '^b')
|
||||
- Make inline function work, to be used as a funcref:
|
||||
var Ref = (arg: type): type => {
|
||||
statement
|
||||
return expr
|
||||
}
|
||||
var Ref = (arg: type) => {
|
||||
statement
|
||||
statement
|
||||
}
|
||||
- For builtin functions using tv_get_string*() use check_for_string() to be
|
||||
more strict about the argument type.
|
||||
- Implement :lockvar and :unlockvar. How about local variables? Perhaps only
|
||||
allow this for global variables. Use :final or :const otherwise.
|
||||
- Allow function names that will be script-local to start with lower case
|
||||
letter?
|
||||
letter? Or also require names with s: prefix to use upper case?
|
||||
Also apply this function references "var ref = SomeFunc"
|
||||
- Support passing v:none to use the default argument value. (#6504)
|
||||
- Make map() give an error if the resulting type of the first argument is
|
||||
wrong. Only works if the type is known? Is this slow (need to go over all
|
||||
items)?
|
||||
- Run the same tests in :def and Vim9 script, like in Test_expr7_not()
|
||||
- Check many more builtin function arguments at compile time.
|
||||
- make 0 == 'string' fail on the script level, like inside :def.
|
||||
@@ -82,10 +81,10 @@ Vim9 - Make everything work:
|
||||
- Need the equivalent of get_lval() and set_var_lval() to implement assignment
|
||||
to nested list and dict members.
|
||||
- Assignment to dict doesn't work:
|
||||
let ret: dict<string> = #{}
|
||||
var ret: dict<string> = #{}
|
||||
ret[i] = string(i)
|
||||
- Appending to dict item doesn't work:
|
||||
let d[i] ..= value
|
||||
var d[i] ..= value
|
||||
- Using ".." at script level doesn't convert arguments to a string.
|
||||
- Compile replacement of :s command: s/pat/\=expr/
|
||||
- Compile redir to local variable: var_redir_start().
|
||||
@@ -97,61 +96,60 @@ Vim9 - Make everything work:
|
||||
- Implement "as Name" in "import Item as Name from ..."
|
||||
- Implement using imported items at script level from "import * as X" in
|
||||
eval_variable(). Should pass the ".xxx" that follows and return that.
|
||||
- Disallow unlet for local/script/imported vars
|
||||
- Make "++nr" work.
|
||||
- Make closures work:
|
||||
- Create closure in a loop. Need to make a list of them.
|
||||
- nested closure only uses one context, not all (#7150)
|
||||
- Make "++nr" work. "++g:count" doesn't work, thinks it is a range.
|
||||
- Reload: How to make sure type of script function hasn't changed?
|
||||
- expandcmd() with `=expr` in filename uses legacy expression.
|
||||
- eval_expr() in ex_cexpr()
|
||||
- eval_expr() call in dbg_parsearg() and debuggy_find()
|
||||
Improve error checking:
|
||||
- "echo Func()" is an error if Func() does not return anything.
|
||||
Before launch:
|
||||
- compile "skip" argument of searchpair()
|
||||
- compile "expr" and "call" expression of a channel in channel_exe_cmd()?
|
||||
- give an error for "echo Func()" if Func() does not return anything.
|
||||
- Using "windo echo expr" does not accept a line break inside "expr" (in a
|
||||
:def function and at script level in a not executed block). #7681
|
||||
|
||||
Once Vim9 is stable:
|
||||
- Change the help to prefer Vim9 syntax where appropriate
|
||||
- Use Vim9 for runtime files.
|
||||
PR #7497 for autoload/ccomplete.vim
|
||||
- Add all the error numbers in a good place in documentation.
|
||||
- In the generic eval docs, point out the Vim9 syntax where it differs.
|
||||
Also:
|
||||
- For range: make table of first ASCII character with flag to quickly check if
|
||||
it can be a Vim9 command. E.g. "+" can, but "." can't.
|
||||
|
||||
Also for Vim9:
|
||||
- better implementation for partial and tests for that.
|
||||
- Make "g:imported = Export.exported" work in Vim9 script.
|
||||
- Make Foo.Bar() work to call the dict function. (#5676)
|
||||
- Error in any command in "vim9script" aborts sourcing.
|
||||
- Find a way to test expressions in legacy and Vim9 script without duplication
|
||||
- Test each level of expressions properly, with type checking
|
||||
- Test try/catch and throw better, also nested.
|
||||
Test return inside try/finally jumps to finally and then returns.
|
||||
Test that return inside try/finally jumps to finally and then returns.
|
||||
- Test that a function defined inside a :def function is local to that
|
||||
function, g: functions can be defined and script-local functions cannot be
|
||||
defined.
|
||||
- implement :type
|
||||
- import type declaration?
|
||||
- Future work: See |vim9-classes|
|
||||
- implement enum
|
||||
- Make accessing varargs faster: arg[expr]
|
||||
EVAL expr
|
||||
LOADVARARG (varargs idx)
|
||||
- Make debugging work - at least per function. Need to recompile a function
|
||||
to step through it line-by-line? Evaluate the stack and variables on the
|
||||
stack?
|
||||
- Make profiling work - Add ISN_PROFILE instructions after every line?
|
||||
- List commands when 'verbose' is set or :verbose is used.
|
||||
Once Vim9 is stable:
|
||||
- Change the help to prefer Vim9 syntax where appropriate
|
||||
- Use Vim9 for runtime files.
|
||||
PR #7497 for autoload/ccomplete.vim
|
||||
Further improvements:
|
||||
- compile options that are an expression, e.g. "expr:" in 'spellsuggest',
|
||||
'foldexpr', 'foldtext', 'printexpr', 'diffexpr', 'patchexpr', 'charconvert',
|
||||
'balloonexpr', 'includeexpr', 'indentexpr', 'formatexpr'.
|
||||
- Make inline function work, to be used as a funcref:
|
||||
let ref = def(arg: type): rettype
|
||||
body
|
||||
enddef
|
||||
Give an error if compilation fails. (#7625)
|
||||
Use the location where the option was set for deciding whether it's to be
|
||||
evaluated in Vim9 script context.
|
||||
- implement :type; import type declaration.
|
||||
- implement enum; import enum.
|
||||
- Future work: See |vim9-classes|
|
||||
Define the keywords and commands to make sure it will be backwards
|
||||
compatible.
|
||||
- Make debugging work - at least per function. Need to recompile a function
|
||||
to step through it line-by-line? Evaluate the stack and variables on the
|
||||
stack?
|
||||
- List commands when 'verbose' is set or :verbose is used.
|
||||
|
||||
Further Vim9 improvements, possibly after launch:
|
||||
- For range: make table of first ASCII character with flag to quickly check if
|
||||
it can be a Vim9 command. E.g. "+" can, but "." can't.
|
||||
- compile get_lambda_tv() in popup_add_timeout()
|
||||
- inline call to map() and filter()
|
||||
- compile "skip" argument of searchpair()
|
||||
- compile "expr" and "call" expression of a channel in channel_exe_cmd()?
|
||||
- Make accessing varargs faster: arg[expr]
|
||||
EVAL expr
|
||||
LOADVARARG (varargs idx)
|
||||
|
||||
|
||||
Popup windows:
|
||||
- Add a flag to make a popup window focusable?
|
||||
@@ -183,8 +181,11 @@ Popup windows:
|
||||
- Figure out the size and position better if wrapping inserts indent
|
||||
|
||||
Text properties:
|
||||
- :goto does not go to the right place when text properties are present.
|
||||
(#5930)
|
||||
- Popup attached to text property stays visible when text is no longer
|
||||
visible. (#7736)
|
||||
- Popup attached to text property stays visible when text is deleted with
|
||||
"cc". (#7737) "C" works OK. "dd" also files in a buffer with a single
|
||||
line.
|
||||
- "cc" does not call inserted_bytes(). (Axel Forsman, #5763)
|
||||
- Combining text property with 'cursorline' does not always work (Billie
|
||||
Cleek, #5533)
|
||||
@@ -224,6 +225,7 @@ Terminal debugger:
|
||||
with another Vim instance.
|
||||
|
||||
Terminal emulator window:
|
||||
- Can escape a terminal popup with win_gotoid(), should be an error
|
||||
- No support for underline color, t_8u.
|
||||
- When in terminal-Normal mode when the job finishes, the cursor jumps to the
|
||||
end but the window is not updated. This only happens when typing "a".
|
||||
@@ -244,7 +246,6 @@ Terminal emulator window:
|
||||
be redrawn.
|
||||
- GUI: When using ":set go+=!" a system() call causes the hit-enter prompt.
|
||||
(#3327)
|
||||
- GUI: hang until key typed. (#3530)
|
||||
- Allow for specifying the directory, with ++cwd={dir}.
|
||||
- With a vertical split only one window is updated. (Linwei, 2018 Jun 2,
|
||||
#2977)
|
||||
@@ -266,7 +267,9 @@ Terminal emulator window:
|
||||
- When 'encoding' is not utf-8, or the job is using another encoding, setup
|
||||
conversions.
|
||||
|
||||
Error numbers available: E653
|
||||
Valgind reports memory leaks in test_options
|
||||
|
||||
test_arglist func Test_all_not_allowed_from_cmdwin() hangs on MS-Windows.
|
||||
|
||||
Mapping with partial match not executed properly in GTK. (Ingo Karkat, #7082)
|
||||
|
||||
@@ -276,6 +279,9 @@ Have another look at the implementation.
|
||||
Patch to implement the vimtutor with a plugin: #6414
|
||||
Was originally written by Felipe Morales.
|
||||
|
||||
Adding "10" to 'spellsuggest' causes spell suggestions to become very slow.
|
||||
(#4087) Did patch 8.2.2379 help?
|
||||
|
||||
Remove SPACE_IN_FILENAME ? It is only used for completion.
|
||||
|
||||
Making breakat support multibyte characters (Yasuhiro Matsumoto, #6598)
|
||||
@@ -301,6 +307,18 @@ Any way to convert "$" back by using a special value? (#6901)
|
||||
Can we detect true color support? https://gist.github.com/XVilka/8346728
|
||||
Try setting a color then request the current color, like using t_u7.
|
||||
|
||||
Regexp to search for duplicate lines does not work correctly:
|
||||
/\(^.*\n\)\1 (Chris Morgan, #6239)
|
||||
|
||||
Changing a capturing group to non-capturing changes the result: #7607
|
||||
:echo matchstr('aaa bbb', '\(.\{-1,}\>\)\|.*')
|
||||
aaa
|
||||
:echo matchstr('aaa bbb', '\%(.\{-1,}\>\)\|.*')
|
||||
aaa bbb
|
||||
Should also work without any group:
|
||||
:echo matchstr('aaa bbb', '.\{-1,}\>\|.*')
|
||||
aaa bbb (should be aaa)
|
||||
|
||||
Check out PR #543 (Roland Puntaier).
|
||||
Patch for multibyte characters in langmap and applying a mapping on them.
|
||||
(Christian Brabandt, 2015 Jun 12, update July 25)
|
||||
@@ -357,10 +375,6 @@ When "+ register is set then "" points to it. If another Vim grabs the "+
|
||||
register, then "" doesn't contain anything. Make it still follow "+.
|
||||
(#6435)
|
||||
|
||||
Patch to fix drawing error with DirectX. (James Grant, #5688)
|
||||
Causes flicker on resizing. Workaround from Ken Takata.
|
||||
How about only setting the attribute when part of the Vim window is offscreen?
|
||||
|
||||
File marks merging has duplicates since 7.4.1925. (Ingo Karkat, #5733)
|
||||
|
||||
"make test_gui" crashed in submenu_change(). Fix and remove workaround in
|
||||
@@ -386,9 +400,6 @@ corruption. (#6631)
|
||||
When 'lazyredraw' is set sometimes the title is not updated.
|
||||
(Jason Franklin, 2020 Feb 3) Looks like a race condition.
|
||||
|
||||
Regexp to search for duplicate lines does not work correctly:
|
||||
/\(^.*\n\)\1 (Chris Morgan, #6239)
|
||||
|
||||
With bash ":make" does not set v:shell_error. Possible solution: set
|
||||
'shellpipe' to "2>&1| tee %s; exit ${PIPESTATUS[0]}" #5994
|
||||
|
||||
@@ -457,12 +468,6 @@ Help for ":argadd fname" says that if "fname" is already in the argument list
|
||||
that entry is used. But instead it's always added. (#6210)
|
||||
Add flag AL_FIND_ADD, if there is one argument find it in the list.
|
||||
|
||||
Adding "10" to 'spellsuggest' causes spell suggestions to become very slow.
|
||||
(#4087)
|
||||
|
||||
behavior of i_CTRl-R_CTRL-R differs from documentation. (Paul Desmond Parker,
|
||||
#5771)
|
||||
|
||||
":bnext" in a help buffer is supposed to go to the next help buffer, but it
|
||||
goes to any buffer, and then :bnext skips help buffers, since they are
|
||||
unlisted. (#4478)
|
||||
@@ -474,9 +479,6 @@ find them. (Max Kukartsev, #6218)
|
||||
|
||||
Enable 'termbidi' if $VTE_VERSION >= 5703 ?
|
||||
|
||||
Universal solution to detect if t_RS is working, using cursor position.
|
||||
Koichi Iwamoto, #2126
|
||||
|
||||
Sound: support on Mac? Or does libcanberra work there?
|
||||
|
||||
Python 3.8 doesn't work. (Antonios Hadjigeorgalis, #5509)
|
||||
@@ -489,15 +491,8 @@ support combining characters. (Charles Campbell) Also #4687
|
||||
Output from assert_equalfile() doesn't give a hint about what's different.
|
||||
Assuming the files are text, print the line with the difference.
|
||||
|
||||
Add "t" action to settagstack(): truncate and add new entries. (#5405)
|
||||
|
||||
When 'relativenumber' is set the line just below a diff change doesn't get
|
||||
updated. (#6138)
|
||||
|
||||
Result of synID() sometimes wrong in help files. (#5252)
|
||||
|
||||
Status line is nut updated when splitting windows. (Marcin Szamotulski, #5496)
|
||||
|
||||
Problem showing a line if the number column width changes when using "o".
|
||||
(Mateusz Morusiewicz, #4245)
|
||||
|
||||
@@ -510,9 +505,6 @@ with packages under "start". (xtal8, #1994)
|
||||
Patch to add new motion ]( and ]{. (Yasuhiro Matsumoto, #5320)
|
||||
Better: use the "z" prefix. or ]t) and [t(.
|
||||
|
||||
Modeless selection doesn't work in gvim. (#4783)
|
||||
Caused by patch 8.1.1534.
|
||||
|
||||
Visual highlight not removed when 'display' is "lastline" and line doesn't
|
||||
fit. (Kevin Lawler, #4457)
|
||||
|
||||
@@ -523,9 +515,6 @@ Does not build with MinGW out of the box:
|
||||
- WINVER conflict, should use 0x0600 by default?
|
||||
- INT_MAX not defined: need to include <limits.h> in vim.h
|
||||
|
||||
Crash when mixing matchadd and substitute()? (Max Christian Pohle, 2018 May
|
||||
13, #2910) Can't reproduce?
|
||||
|
||||
Display messed up with matchparen, wrapping and scrolling. (#5638)
|
||||
Screen update bug related to matchparen. (Chris Heath, 2017 Mar 4, #1532)
|
||||
|
||||
@@ -534,14 +523,6 @@ when "qq" is mapped and after the first "q" the mouse is moved outside of the
|
||||
gvim window (with focus follows mouse), then the K_FOCUSLOST key is put in the
|
||||
input buffer. (#5302)
|
||||
|
||||
xterm should be able to pass focus changes to Vim, so that Vim can check for
|
||||
buffers that changed. Perhaps in misc.c, function selectwindow().
|
||||
Xterm 224 supports it!
|
||||
Patch to make FocusGained and FocusLost work in modern terminals. (Hayaki
|
||||
Saito, 2013 Apr 24) Update 2016 Aug 12.
|
||||
Also see issue #609.
|
||||
We could add the enable/disable sequences to t_ti/t_te or t_ks/t_ke.
|
||||
|
||||
:buffer completion does not escape "+" properly and results in a regexp error.
|
||||
(#5467)
|
||||
|
||||
@@ -560,16 +541,10 @@ Patch to add the :bvimgrep command. (Christian Brabandt, 2014 Nov 12)
|
||||
Updated 2016 Jun 10, #858 Update 2017 Mar 28: use <buffer>.
|
||||
Better use ":bufgrep" ?
|
||||
|
||||
Errors found with random data:
|
||||
heap-buffer-overflow in alist_add (#2472)
|
||||
|
||||
Improve fallback for menu translations, to avoid having to create lots of
|
||||
files that source the actual file. E.g. menu_da_de -> menu_da
|
||||
Include part of #3242?
|
||||
|
||||
When a terminal exit_cb closes the window, a following typed key is lost, if
|
||||
it's in a mapping. (2018 Oct 6, #2302, #3522)
|
||||
|
||||
Patch to have text objects defined by arbitrary single characters. (Daniel
|
||||
Thau, 2013 Nov 20, 2014 Jan 29, 2014 Jan 31)
|
||||
Added tests (James McCoy, 2016 Aug 3, #958). Still needs more work.
|
||||
@@ -582,11 +557,6 @@ Williams, 2018 Oct 30)
|
||||
|
||||
'[ mark in wrong column after put. (#4776)
|
||||
|
||||
"exepath('bin/cmd')" does not work while ":!bin/cmd" does work.
|
||||
(Daniel Hahler, #4710) and executable('bin/cmd') returns 1
|
||||
|
||||
Error drawing the number column when 'cursorline' is set. (#3893)
|
||||
|
||||
Problem with :tlmenu: Detach item added with all modes? Issue #3563.
|
||||
|
||||
Add an argument to expandcmd() to expand like ":next" does.
|
||||
@@ -656,13 +626,42 @@ Should we include some part of pull request #4505, not increment changedtick
|
||||
in some cases? E.g. for ":write" when the changed flag was already off, the
|
||||
buffer didn't change at all.
|
||||
|
||||
Line numbers in profile are off when function was defined with ":execute".
|
||||
(Daniel Hahler, #4511)
|
||||
|
||||
Session file contains absolute paths when "curdir" is removed form
|
||||
'sessionoptions', making it impossible to have a session with a relative path.
|
||||
(#4450)
|
||||
|
||||
Session file only contains local option values for buffers that are in a
|
||||
window, not other buffers. (#7532)
|
||||
|
||||
Script generated by :mksession does not work well if there are windows with
|
||||
modified buffers
|
||||
change "silent only" into "silent only!"
|
||||
change "edit fname" of first buffer to "hide edit fname"
|
||||
skip "badd fname" if "fname" is already in the buffer list
|
||||
remove remark about unloading buffers from documentation
|
||||
|
||||
When session file has name in argument list but the buffer was deleted, the
|
||||
buffer is not deleted when using the session file. (#1393)
|
||||
Should add the buffer in hidden state.
|
||||
|
||||
When a session file is created and there are "nofile" buffers, these are not
|
||||
filled. Need to trigger BufReadCmd autocommands. Also handle deleting the
|
||||
initial empty buffer better. (ZyX, 2015 March 8)
|
||||
|
||||
Setting the spell file in a session only reads the local additions, not the
|
||||
normal spell file. (Enno Nagel, 2014 Mar 29)
|
||||
|
||||
Directory wrong in session file, caused by ":lcd" in BufEnter autocommand.
|
||||
(Felix Kater, 2009 Mar 3)
|
||||
|
||||
Something wrong with session that has "cd" commands and "badd", in such a way
|
||||
that Vim doesn't find the edited file in the buffer list, causing the
|
||||
ATTENTION message? (Tony Mechelynck, 2008 Dec 1)
|
||||
Also: swap files are in ~/tmp/ One has relative file name ".mozilla/...".
|
||||
|
||||
'foldcolumn' in modeline applied to wrong window when using a session. (Teemu
|
||||
Likonen, March 19)
|
||||
|
||||
When using a timer callback vgetc_busy is reset, allowing for using input().
|
||||
But in a channel callback this does not happen. We need to do something
|
||||
similar to check_due_timer(). Also see #3809.
|
||||
@@ -689,9 +688,6 @@ a hint about how to fix it. (#4300)
|
||||
|
||||
Make balloon_show() work outside of 'balloonexpr'? Users expect it to work:
|
||||
#2948. (related to #1512?)
|
||||
On Win32 it stops showing, because showState is already ShS_SHOWING.
|
||||
balloon_show() does not work properly in the terminal. (Ben Jackson, 2017 Dec
|
||||
20, #2481)
|
||||
Also see #2352, want better control over balloon, perhaps set the position.
|
||||
Should also be possible to add highlighting, like in the status line?
|
||||
balloonexpr() on MS-Windows GUI doesn't handle accented chars? (nivaemail,
|
||||
@@ -717,12 +713,6 @@ Redo only remembers the last change. Could use "{count}g." to redo an older
|
||||
change. How does the user know which change? At least have a way to list
|
||||
them: ":repeats". Add to history, like search history and command line history.
|
||||
|
||||
Incsearch test fails when locale is "C". (Dominique Pelle, #3986)
|
||||
Also run all tests with C locale?
|
||||
|
||||
"vat" doesn't work well on XML when the closing > is on another line.
|
||||
#3927
|
||||
|
||||
Pasting foo} causes Vim to behave weird. (John Little, 2018 Jun 17)
|
||||
Related to bracketed paste. I cannot reproduce it.
|
||||
|
||||
@@ -741,8 +731,6 @@ Some xterm responses are not properly handled: (Markus Gömmel, 2019 Apr 1)
|
||||
Using CTRL-L to add a character to the search string that contains \v,
|
||||
punctuation is repeated. (Smylers, 2018 Nov 17, #3621)
|
||||
|
||||
ml_get error: (Israel Chauca Fuentes, 2018 Oct 17, #3550).
|
||||
|
||||
Using single wide base character with double wide composing character gives
|
||||
drawing errors. Fill up the base character? (Dominique, #4328)
|
||||
|
||||
@@ -777,8 +765,6 @@ Memory leak in test_alot with pyeval() (allocating partial)
|
||||
Memory leak in test_alot with expand()
|
||||
Memory leaks in test_channel? (or is it because of fork())
|
||||
|
||||
gethostbyname() is old, use getaddrinfo() if available. (#3227)
|
||||
|
||||
matchaddpos() gets slow with many matches. Proposal by Rick Howe, 2018 Jul
|
||||
19.
|
||||
|
||||
@@ -798,22 +784,15 @@ Problem with Visual yank when 'linebreak' and 'showbreak' are set.
|
||||
Patch with tests, but it's not clear how it is supposed to work. (tommm, 2018
|
||||
Nov 17) Asked about this, Dec 22. Christian will have a look.
|
||||
|
||||
Patch to fix that using "5gj" starting inside a closed fold does not work on
|
||||
screen lines but on text lines. (Julius Hulsmann, #4095) Lacks a test.
|
||||
|
||||
home_replace() uses $HOME instead of "homedir". (Cesar Martins, 2018 Aug 9)
|
||||
|
||||
When the status line uses term_gettitle(), it does not get updated when the
|
||||
terminal title changes. (Josh Triplett, 2018 Sep 9, #3418)
|
||||
How would we know that the status line needs to be updated?
|
||||
|
||||
Adjust windows installer explanation of behavior. (scootergrisen, #3310)
|
||||
|
||||
Update for xim-input-style help (Tony Mechelynck, 2019 Jan 10).
|
||||
Feedback from someone who uses this?
|
||||
|
||||
ml_get error. (Dominique Pelle, 2018 Sep 14, #3434)
|
||||
|
||||
Only output t_Cs when t_Ce is also set. do not use Cs and Ce termcap entries. (Daniel Hahler, 2018 Sep 25)
|
||||
Add t_cS and t_cR for cursor color select and reset. Use Cs and Cr terminfo
|
||||
values.
|
||||
@@ -836,48 +815,22 @@ includes the first screen line. (2018 Aug 23, #3368)
|
||||
Refactored HTML indent file. (Michael Lee, #1821)
|
||||
Asked to write a test.
|
||||
|
||||
MS-Windows: .lnk file not resolved properly when 'encoding' is set.
|
||||
(lkintact, 2018 Sep 22, #3473)
|
||||
|
||||
Merge checking for 'cursorline' and 'concealcursor', see neovim #9492.
|
||||
|
||||
Display error when a conceal match uses '\%>1l'. (#4854)
|
||||
|
||||
Add a windowID argument to placing a sign, so that it only shows up in one
|
||||
window for the buffer.
|
||||
|
||||
Request to add sign_setlist() to make it faster to add a lot of signs, e.g.
|
||||
when adding a sign for every quickfix entry. (#4557)
|
||||
|
||||
Win32 key codes are messy. Mike Williams tried to fix that, but now old
|
||||
mappings no longer work. Create a new terminal for the better solution?
|
||||
|
||||
Script generated by :mksession does not work well if there are windows with
|
||||
modified buffers
|
||||
change "silent only" into "silent only!"
|
||||
change "edit fname" of first buffer to "hide edit fname"
|
||||
skip "badd fname" if "fname" is already in the buffer list
|
||||
remove remark about unloading buffers from documentation
|
||||
|
||||
Compiler warnings (geeknik, 2017 Oct 26):
|
||||
- signed integer overflow in do_sub() (#2249)
|
||||
- signed integer overflow in get_address() (#2248)
|
||||
- signed integer overflow in getdecchrs() (#2254)
|
||||
- undefined left shift in get_string_tv() (#2250)
|
||||
|
||||
Win32 console: <F11> and <F12> typed in Insert mode don't result in normal
|
||||
characters. (#3246)
|
||||
|
||||
'foldtext' is evaluated too often. (Daniel Hahler, #2773)
|
||||
|
||||
Add Native language protocol server (LSP) support. (Yegappan Lakshmanan, 2018
|
||||
Oct 28)
|
||||
|
||||
ml_get error when using a Python script. (Yggdroot, 2017 Jun 1, #1737)
|
||||
Lemonboy can reproduce (2017 Jun 5)
|
||||
Also reproduced by Benjamin Doherty, 2018 Oct 4.
|
||||
Simpler way: Ken Takata, Oct 6.
|
||||
|
||||
Add more testing of the GTK GUI.
|
||||
- gtk_test_widget_click() can be used to simulate a click in a widget.
|
||||
|
||||
@@ -936,8 +889,6 @@ missing: --nofork, -A , -b, -h, etc.
|
||||
":au * * command" should not be allowed, only use * for event when listing or
|
||||
deleting autocmds, not when adding them.
|
||||
|
||||
Alternative manpager.vim. (Enno, 2018 Jan 5, #2529)
|
||||
|
||||
With 'foldmethod' "indent" and appending an empty line, what follows isn't
|
||||
included in the existing fold. Deleting the empty line and undo fixes it.
|
||||
(Oleg Koshovetc, 2018 Jul 15, #3214)
|
||||
@@ -959,9 +910,6 @@ Python indenting: alternative way to indent arguments:
|
||||
http://orchistro.tistory.com/236
|
||||
Should be supported with a flag.
|
||||
|
||||
Starting job with cwd option, when the directory does not exist, gives a
|
||||
confusing error message. (Wang Shidong, 2018 Jan 2, #2519)
|
||||
|
||||
Add the debug command line history to viminfo.
|
||||
|
||||
Add Makefiles to the runtime/spell directory tree, since nobody uses Aap.
|
||||
@@ -982,9 +930,6 @@ With foldmethod=syntax and nofoldenable comment highlighting isn't removed.
|
||||
Using 'wildignore' also applies to literally entered file name. Also with
|
||||
:drop (remote commands).
|
||||
|
||||
Inserting a line in a CompleteDone autocommand may confuse undo. (micbou,
|
||||
2018 Jun 18, #3027)
|
||||
|
||||
Implement option_save() and option_restore():
|
||||
option_restore({list}) *option_restore()*
|
||||
Restore options previously saved by option_save().
|
||||
@@ -1020,8 +965,6 @@ Also see #1689.
|
||||
When 'virtualedit' is "all" and 'cursorcolumn' is set, the wrong column may be
|
||||
highlighted. (van-de-bugger, 2018 Jan 23, #2576)
|
||||
|
||||
":file" does not show anything when 'shortmess' contains 'F'. (#3070)
|
||||
|
||||
No profile information for function that executes ":quit". (Daniel Hahler,
|
||||
2017 Dec 26, #2501)
|
||||
|
||||
@@ -1032,9 +975,6 @@ Add script number to profile? (#3330 breaks tests).
|
||||
A function defined locally and lambda's are not easily recognized.
|
||||
Mention where they were defined somewhere.
|
||||
|
||||
Invalid range error when using BufWinLeave for closing terminal.
|
||||
(Gabriel Barta, 2017 Nov 15, #2339)
|
||||
|
||||
ml_get errors with buggy script. (Dominique, 2017 Apr 30)
|
||||
|
||||
Error in emsg with buggy script. (Dominique, 2017 Apr 30)
|
||||
@@ -1100,10 +1040,6 @@ line breaks. (Ken Takata, 2017 Aug 22)
|
||||
|
||||
The ":move" command does not honor closed folds. (Ryan Lue, #2351)
|
||||
|
||||
Patch to fix increment/decrement not working properly when 'virtualedit' is
|
||||
set. (Hirohito Higashi, 2016 Aug 1, #923)
|
||||
Was this fixed?
|
||||
|
||||
Cannot copy modeless selection when cursor is inside it. (lkintact, #2300)
|
||||
|
||||
Test_writefile_fails_conversion failure on Solaris because if different iconv
|
||||
@@ -1120,7 +1056,7 @@ Overlong utf-8 sequence is displayed wrong. (Harm te Hennepe, 2017 Sep 14,
|
||||
#2089) Patch with possible solution by Björn Linse.
|
||||
|
||||
The change list index is local to a buffer, but it doesn't make sense using it
|
||||
for another buffer. (lacygoll) Copy w_changelistidx to wininfo_S and back.
|
||||
for another buffer. (lacygoill) Copy w_changelistidx to wininfo_S and back.
|
||||
|
||||
X11: Putting more than about 262040 characters of text on the clipboard and
|
||||
pasting it in another Vim doesn't work. (Dominique Pelle, 2008 Aug 21-23)
|
||||
@@ -1143,9 +1079,6 @@ Patch from Christian Brabandt to preserve upper case marks when wiping out a
|
||||
buffer. (2013 Dec 9)
|
||||
Also fixes #2166?
|
||||
|
||||
Python: After "import vim" error messages only show the first line of the
|
||||
stack trace. (Yggdroot, 2017 Jul 28, #1887)
|
||||
|
||||
Profile of a dict function is lost when the dict is deleted. Would it be
|
||||
possible to collect this? (Daniel Hahler, #2350)
|
||||
|
||||
@@ -1156,8 +1089,6 @@ Patch to skip writing a temp file for diffing if the buffer is equal to the
|
||||
existing file. (Akria Sheng, 2017 Jul 22)
|
||||
Could also skip writing lines that are the same.
|
||||
|
||||
Patch with Files for Latvian language. (Vitolins, 2017 May 3, #1675)
|
||||
|
||||
MS-Windows: Opening same file in a second gvim hangs. (Sven Bruggemann, 2017
|
||||
Jul 4)
|
||||
|
||||
@@ -1180,16 +1111,9 @@ Use gvimext.dll from the nightly build? (Issue #249)
|
||||
Problem with using :cd when remotely editing a file. (Gerd Wachsmuth, 2017 May
|
||||
8, #1690)
|
||||
|
||||
Bogus characters inserted when triggering indent while changing text.
|
||||
(Vitor Antunes, 2016 Nov 22, #1269)
|
||||
|
||||
Using "wviminfo /tmp/viminfo" does not store file marks that Vim knows about,
|
||||
it only works when merging with an existing file. (Shougo, 2017 Jun 19, #1781)
|
||||
|
||||
Segmentation fault with complete(). (Lifepillar, 2017 Apr 29, #1668)
|
||||
Check for "pat" to be NULL in search_for_exact_line()?
|
||||
How did it get NULL? Comment by Christian, Apr 30.
|
||||
|
||||
Is it possible to keep the complete menu open when calling complete()?
|
||||
(Prabir Shrestha, 2017 May 19, #1713)
|
||||
|
||||
@@ -1227,17 +1151,10 @@ Json string with trailing \u should be an error. (Lcd)
|
||||
import can't be used in define option when include matches too.
|
||||
(Romain Lafourcade, 2017 Jun 18, #1519)
|
||||
|
||||
When session file has name in argument list but the buffer was deleted, the
|
||||
buffer is not deleted when using the session file. (#1393)
|
||||
Should add the buffer in hidden state.
|
||||
|
||||
Wrong diff highlighting with three files. (2016 Oct 20, #1186)
|
||||
Also get E749 on exit.
|
||||
Another example in #1309
|
||||
|
||||
When deleting a mark or register, leave a tombstone, so that it's also deleted
|
||||
when writing viminfo (and the delete was the most recent action). #1339
|
||||
|
||||
Suggestion to improve pt-br spell checking. (Marcelo D Montu, 2016 Dec 15,
|
||||
#1330)
|
||||
|
||||
@@ -1266,9 +1183,6 @@ Check for errors E704 and E705 only does VAR_FUNC, should also do VAR_PARTIAL.
|
||||
(Nikolai Pavlov, 2017 Mar 13, #1557)
|
||||
Make a function to check for function-like type?
|
||||
|
||||
Screen updated delayed when using CTRL-O u in Insert mode.
|
||||
(Barlik, #1191) Perhaps because status message?
|
||||
|
||||
Implement named arguments for functions with optional arguments:
|
||||
func Foo(start, count = 1, all = 1)
|
||||
call Foo(12, all = 0)
|
||||
@@ -1304,9 +1218,6 @@ Useful to restore it. Is there another solution?
|
||||
|
||||
Patch for wrong cursor position on wrapped line, involving breakindent.
|
||||
(Ozaki Kiichi, 2016 Nov 25)
|
||||
Does this also fix #1408 ?
|
||||
|
||||
'cursorline' and match interfere. (Ozaki Kiichi, 2017 Jun 23, #1792)
|
||||
|
||||
Patch for 'cursorlinenr' option. (Ozaki Kiichi, 2016 Nov 30)
|
||||
|
||||
@@ -1355,7 +1266,6 @@ is used. (Filipe Brandenburger, #7322)
|
||||
gets redrawn in redraw_after_callback(). #6120
|
||||
- Add a separate timeout for opening a socket. Currently it's fixed at 50
|
||||
msec, which is too small for a remote connection. (tverniquet, #2130)
|
||||
- Problem with stderr on Windows? (Vincent Rischmann, 2016 Aug 31, #1026)
|
||||
- Writing raw mode to a buffer should still handle NL characters as line
|
||||
breaks. (Dmitry Zotikov, 2017 Aug 16)
|
||||
- When out_cb executes :sleep, the close_cb may be invoked. (Daniel Hahler,
|
||||
@@ -1471,11 +1381,6 @@ the system encoding (usually utf-8).
|
||||
MS-Windows: use WS_HIDE instead of SW_SHOWMINNOACTIVE in os_win32.c?
|
||||
Otherwise task flickers in taskbar.
|
||||
|
||||
Repeating 'opfunc' in a function only works once. (Tarmean, 2016 Jul 15, #925)
|
||||
|
||||
Have a way to get the call stack, in a function and from an exception.
|
||||
#1125
|
||||
|
||||
Second problem in #966: ins_compl_add_tv() uses get_dict_string() multiple
|
||||
times, overwrites the one buffer. (Nikolay Pavlov, 2016 Aug 5)
|
||||
|
||||
@@ -1535,10 +1440,6 @@ Mechelynck) Perhaps use exists("::tearoff") to check?
|
||||
Use vim.vim syntax highlighting for help file examples, but without ":" in
|
||||
'iskeyword' for syntax.
|
||||
|
||||
When command names are very long :command output is difficult to read. Use a
|
||||
maximum for the column width? (#871)
|
||||
Patcy by varmanishant, 2016 Jun 18, #876
|
||||
|
||||
Installation of .desktop files does not work everywhere.
|
||||
It's now fixed, but the target directory probably isn't right.
|
||||
Add configure check?
|
||||
@@ -1555,12 +1456,6 @@ Especially useful when using 'linebreak'
|
||||
":cd C:\Windows\System32\drivers\etc*" does not work, even though the
|
||||
directory exists. (Sergio Gallelli, 2013 Dec 29)
|
||||
|
||||
In debug mode one can inspect variables, but not the function parameters
|
||||
(starting with a:). (Luc Hermitte, 2017 Jan 4, #1352)
|
||||
|
||||
If ":bd" also closes a Tab page then the " mark is not set. (Harm te Hennepe,
|
||||
2016 Apr 25, #780)
|
||||
|
||||
Patch to avoid redrawing tabline when the popup menu is visible.
|
||||
(Christian Brabandt, 2016 Jan 28)
|
||||
|
||||
@@ -1611,9 +1506,6 @@ Patch to add :mapgroup, put mappings in a group like augroup.
|
||||
Value returned by virtcol() changes depending on how lines wrap. This is
|
||||
inconsistent with the documentation.
|
||||
|
||||
Value of virtcol() for '[ and '] depend on multibyte character.
|
||||
(Luchr, #277)
|
||||
|
||||
Can we cache the syntax attributes, so that updates for 'relativenumber' and
|
||||
'cursorline'/'cursorcolumn' are a lot faster? Thus store the attributes
|
||||
before combining them.
|
||||
@@ -1689,10 +1581,6 @@ Doesn't work completely (Dominique Orban)
|
||||
|
||||
Patch to add a "literal" argument to bufnr(). (Olaf Dabrunz, 2015 Aug 4)
|
||||
|
||||
When a session file is created and there are "nofile" buffers, these are not
|
||||
filled. Need to trigger BufReadCmd autocommands. Also handle deleting the
|
||||
initial empty buffer better. (ZyX, 2015 March 8)
|
||||
|
||||
Extended file attributes lost on write (backupcopy=no). Issue 306.
|
||||
|
||||
Patch to add :lockjumps. (Carlo Baldassi, 2015 May 25)
|
||||
@@ -1821,9 +1709,6 @@ Out of scope:
|
||||
- Development work on plugins (although diff with distributed version would be
|
||||
useful).
|
||||
|
||||
Setting the spell file in a session only reads the local additions, not the
|
||||
normal spell file. (Enno Nagel, 2014 Mar 29)
|
||||
|
||||
When typing the first character of a command, e.g. "f", then using a menu, the
|
||||
menu item doesn't work. Clear typeahead when using a menu?
|
||||
|
||||
@@ -2472,9 +2357,6 @@ opening/closing window causes other window with 'winfixheight' to change
|
||||
height. Also happens when there is another window in the frame, if it's not
|
||||
very high. (Yegappan Lakshmanan, 2010 Jul 22, Michael Peeters, 2010 Jul 22)
|
||||
|
||||
Directory wrong in session file, caused by ":lcd" in BufEnter autocommand.
|
||||
(Felix Kater, 2009 Mar 3)
|
||||
|
||||
Session file generates error upon loading, cause by --remote-silent-tab.
|
||||
(7tommm (ytommm) 2010 Nov 24)
|
||||
|
||||
@@ -2506,6 +2388,7 @@ part of standard Vim. The "1 to "9 registers are not sufficient.
|
||||
6 When yanking into the unnamed registers several times, somehow make the
|
||||
previous contents also available (like it's done for deleting). What
|
||||
register names to use? g"1, g"2, etc.?
|
||||
Also do this for the small delete register "-.
|
||||
|
||||
After doing "su" $HOME can be the old user's home, thus ~root/file is not
|
||||
correct. Don't use it in the swap file.
|
||||
@@ -2534,11 +2417,6 @@ still delete them. Also convert all buffer file names?
|
||||
"gqip" in Insert mode has an off-by-one error, causing it to reflow text.
|
||||
(Raul Coronado, 2009 Nov 2)
|
||||
|
||||
Something wrong with session that has "cd" commands and "badd", in such a way
|
||||
that Vim doesn't find the edited file in the buffer list, causing the
|
||||
ATTENTION message? (Tony Mechelynck, 2008 Dec 1)
|
||||
Also: swap files are in ~/tmp/ One has relative file name ".mozilla/...".
|
||||
|
||||
MS-Windows: editing the first, empty buffer, 'ffs' set to "unix,dos", ":enew"
|
||||
doesn't set 'ff' to "unix". (Ben Fritz, 2008 Dec 5) Reusing the old buffer
|
||||
probably causes this.
|
||||
@@ -2735,9 +2613,6 @@ New PHP syntax file, use it? (Peter Hodge)
|
||||
":echoe" in catch block stops processing, while this doesn't happen outside of
|
||||
a catch block. (ZyX, 2011 Jun 2)
|
||||
|
||||
'foldcolumn' in modeline applied to wrong window when using a session. (Teemu
|
||||
Likonen, March 19)
|
||||
|
||||
Test 54 uses shell commands, that doesn't work on non-Unix systems. Use some
|
||||
other way to test buffer-local autocommands.
|
||||
|
||||
@@ -3270,15 +3145,11 @@ Quickfix/Location List:
|
||||
window is cleared, to avoid going back to the list of errors buffer (would
|
||||
have two windows with it). Can we just remove the jump list entries for
|
||||
the quickfix buffer?
|
||||
- Quickfix window height is not kept with a vertical split. (Lifepillar,
|
||||
2018 Jun 10, #2998)
|
||||
- When an item in the quickfix list has a file name that does not exist,
|
||||
behave like the item was not a match for :cnext.
|
||||
- When adding an item to a new quickfix list make ":cnext" jump to that
|
||||
item. Make a difference being at the first item and not having used
|
||||
:cnext at all. (Afanasiy Fet, 2017 Jan 3)
|
||||
- This does not work: :set cscopequickfix=a-
|
||||
(Linewi, 2015 Jul 12, #914)
|
||||
- When opening quickfix window, disable spell checking?
|
||||
- Patch for supporting count before CR in quickfix window. (AOYAMA Shotaro,
|
||||
2007 Jan 1)
|
||||
@@ -5464,7 +5335,7 @@ Mappings and Abbreviations:
|
||||
not the <Space>.
|
||||
8 Give a warning when using CTRL-C in the lhs of a mapping. It will never
|
||||
(?) work.
|
||||
7 Add <0x8f> (hex), <033> (octal) and <123> (decimal) to <> notation?
|
||||
7 Add <0x8f> (hex), <0o33> (octal) and <123> (decimal) to <> notation?
|
||||
7 When someone tries to unmap with a trailing space, and it fails, try
|
||||
unmapping without the trailing space. Helps for ":unmap xx | unmap yy".
|
||||
6 Context-sensitive abbreviations: Specify syntax group(s) in which the
|
||||
|
||||
@@ -50,7 +50,7 @@ which moves to the previous end of a word:
|
||||
|
||||
This is a line with example text ~
|
||||
<----<----x---->------------>
|
||||
2ge ge e we
|
||||
2ge ge e 2e
|
||||
|
||||
If you are at the last word of a line, the "w" command will take you to the
|
||||
first word in the next line. Thus you can use this to move through a
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_41.txt* For Vim version 8.2. Last change: 2020 Dec 19
|
||||
*usr_41.txt* For Vim version 8.2. Last change: 2021 Jan 13
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -122,14 +122,14 @@ starts with a zero. "017" is decimal 15. A binary number starts with "0b" or
|
||||
decimal number, it will be interpreted as an octal number!
|
||||
The ":echo" command always prints decimal numbers. Example: >
|
||||
|
||||
:echo 0x7f 036
|
||||
:echo 0x7f 0o36
|
||||
< 127 30 ~
|
||||
|
||||
A number is made negative with a minus sign. This also works for hexadecimal,
|
||||
octal and binary numbers. A minus sign is also used for subtraction. Compare
|
||||
this with the previous example: >
|
||||
|
||||
:echo 0x7f -036
|
||||
:echo 0x7f -0o36
|
||||
< 97 ~
|
||||
|
||||
White space in an expression is ignored. However, it's recommended to use it
|
||||
@@ -137,7 +137,7 @@ for separating items, to make the expression easier to read. For example, to
|
||||
avoid the confusion with a negative number above, put a space between the
|
||||
minus sign and the following number: >
|
||||
|
||||
:echo 0x7f - 036
|
||||
:echo 0x7f - 0o36
|
||||
|
||||
==============================================================================
|
||||
*41.2* Variables
|
||||
@@ -619,6 +619,8 @@ String manipulation: *string-functions*
|
||||
submatch() get a specific match in ":s" and substitute()
|
||||
strpart() get part of a string using byte index
|
||||
strcharpart() get part of a string using char index
|
||||
slice() take a slice of a string, using char index in
|
||||
Vim9 script
|
||||
strgetchar() get character from a string using char index
|
||||
expand() expand special keywords
|
||||
expandcmd() expand a command like done for `:edit`
|
||||
@@ -640,6 +642,7 @@ List manipulation: *list-functions*
|
||||
insert() insert an item somewhere in a List
|
||||
add() append an item to a List
|
||||
extend() append a List to a List
|
||||
extendnew() make a new List and append items
|
||||
remove() remove one or more items from a List
|
||||
copy() make a shallow copy of a List
|
||||
deepcopy() make a full copy of a List
|
||||
@@ -647,6 +650,7 @@ List manipulation: *list-functions*
|
||||
map() change each List item
|
||||
mapnew() make a new List with changed items
|
||||
reduce() reduce a List to a value
|
||||
slice() take a slice of a List
|
||||
sort() sort a List
|
||||
reverse() reverse the order of a List
|
||||
uniq() remove copies of repeated adjacent items
|
||||
@@ -661,6 +665,7 @@ List manipulation: *list-functions*
|
||||
count() count number of times a value appears in a List
|
||||
repeat() repeat a List multiple times
|
||||
flatten() flatten a List
|
||||
flattennew() flatten a copy of a List
|
||||
|
||||
Dictionary manipulation: *dict-functions*
|
||||
get() get an entry without an error for a wrong key
|
||||
@@ -669,6 +674,7 @@ Dictionary manipulation: *dict-functions*
|
||||
empty() check if Dictionary is empty
|
||||
remove() remove an entry from a Dictionary
|
||||
extend() add entries from one Dictionary to another
|
||||
extendnew() make a new Dictionary and append items
|
||||
filter() remove selected entries from a Dictionary
|
||||
map() change each Dictionary entry
|
||||
mapnew() make a new Dictionary with changed items
|
||||
@@ -718,7 +724,8 @@ Other computation: *bitwise-function*
|
||||
srand() initialize seed used by rand()
|
||||
|
||||
Variables: *var-functions*
|
||||
type() type of a variable
|
||||
type() type of a variable as a number
|
||||
typename() type of a variable as text
|
||||
islocked() check if a variable is locked
|
||||
funcref() get a Funcref for a function reference
|
||||
function() get a Funcref for a function name
|
||||
@@ -753,6 +760,11 @@ Cursor and mark position: *cursor-functions* *mark-functions*
|
||||
screenchar() get character code at a screen line/row
|
||||
screenchars() get character codes at a screen line/row
|
||||
screenstring() get string of characters at a screen line/row
|
||||
charcol() character number of the cursor or a mark
|
||||
getcharpos() get character position of cursor, mark, etc.
|
||||
setcharpos() set character position of cursor, mark, etc.
|
||||
getcursorcharpos() get character position of the cursor
|
||||
setcursorcharpos() set character position of the cursor
|
||||
|
||||
Working with text in the current buffer: *text-functions*
|
||||
getline() get a line or list of lines from the buffer
|
||||
@@ -812,6 +824,7 @@ System functions and manipulation of files:
|
||||
setenv() set an environment variable
|
||||
hostname() name of the system
|
||||
readfile() read a file into a List of lines
|
||||
readblob() read a file into a Blob
|
||||
readdir() get a List of file names in a directory
|
||||
readdirex() get a List of file information in a directory
|
||||
writefile() write a List of lines or Blob into a file
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*various.txt* For Vim version 8.2. Last change: 2020 Nov 16
|
||||
*various.txt* For Vim version 8.2. Last change: 2021 Jan 26
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -345,8 +345,9 @@ N *+clientserver* Unix and Win32: Remote invocation |clientserver|
|
||||
*+clipboard* |clipboard| support compiled-in
|
||||
*+clipboard_working* |clipboard| support compiled-in and working
|
||||
T *+cmdline_compl* command line completion |cmdline-completion|
|
||||
S *+cmdline_hist* command line history |cmdline-history|
|
||||
T *+cmdline_hist* command line history |cmdline-history|
|
||||
N *+cmdline_info* |'showcmd'| and |'ruler'|
|
||||
S *+cmdwin* |cmdline-window| support
|
||||
T *+comments* |'comments'| support
|
||||
B *+conceal* "conceal" support, see |conceal| |:syn-conceal| etc.
|
||||
N *+cryptv* encryption support |encryption|
|
||||
@@ -411,7 +412,7 @@ N *+mouse_sysmouse* Unix only: *BSD console mouse handling |sysmouse|
|
||||
B *+mouse_sgr* Unix only: sgr mouse handling |sgr-mouse|
|
||||
B *+mouse_urxvt* Unix only: urxvt mouse handling |urxvt-mouse|
|
||||
N *+mouse_xterm* Unix only: xterm mouse handling |xterm-mouse|
|
||||
N *+multi_byte* 16 and 32 bit characters |multibyte|
|
||||
T *+multi_byte* Unicode support, 16 and 32 bit characters |multibyte|
|
||||
*+multi_byte_ime* Win32 input method for multibyte chars |multibyte-ime|
|
||||
N *+multi_lang* non-English language support |multi-lang|
|
||||
m *+mzscheme* Mzscheme interface |mzscheme|
|
||||
@@ -707,12 +708,12 @@ K Run a program to lookup the keyword under the
|
||||
not more than one line.
|
||||
|
||||
[N]gs *gs* *:sl* *:sleep*
|
||||
:[N]sl[eep] [N] [m] Do nothing for [N] seconds. When [m] is included,
|
||||
:[N]sl[eep] [N][m] Do nothing for [N] seconds. When [m] is included,
|
||||
sleep for [N] milliseconds. The count for "gs" always
|
||||
uses seconds. The default is one second. >
|
||||
:sleep "sleep for one second
|
||||
:5sleep "sleep for five seconds
|
||||
:sleep 100m "sleep for a hundred milliseconds
|
||||
:sleep 100m "sleep for 100 milliseconds
|
||||
10gs "sleep for ten seconds
|
||||
< Can be interrupted with CTRL-C (CTRL-Break on
|
||||
MS-Windows). "gs" stands for "goto sleep".
|
||||
@@ -722,6 +723,9 @@ K Run a program to lookup the keyword under the
|
||||
available when compiled with the |+netbeans_intg|
|
||||
feature}
|
||||
|
||||
*:sl!* *:sleep!*
|
||||
:[N]sl[eep]! [N] [m] Same as above, but hide the cursor
|
||||
|
||||
*:xrestore* *:xr*
|
||||
:xr[estore] [display] Reinitializes the connection to the X11 server. Useful
|
||||
after the X server restarts, e.g. when running Vim for
|
||||
|
||||
@@ -9661,7 +9661,7 @@ Solution: Check for tcsetattr() to return an error, retry when it does.
|
||||
Files: src/os_unix.c
|
||||
|
||||
Patch 6.2f.018
|
||||
Problem: Mac OS X 10.2: OK is defined to zero in cursus.h while Vim uses
|
||||
Problem: Mac OS X 10.2: OK is defined to zero in curses.h while Vim uses
|
||||
one. Redefining it causes a warning message.
|
||||
Solution: Undefine OK before defining it to one. (Taro Muraoka)
|
||||
Files: src/vim.h
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*version8.txt* For Vim version 8.2. Last change: 2020 Oct 25
|
||||
*version8.txt* For Vim version 8.2. Last change: 2020 Dec 24
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -3282,7 +3282,7 @@ Solution: Convert the printer name from the active codepage to 'encoding'.
|
||||
Files: src/os_mswin.c
|
||||
|
||||
Patch 7.4.472
|
||||
Problem: The "precedes" entry in 'listchar' will be drawn when 'showbreak'
|
||||
Problem: The "precedes" entry in 'listchars' will be drawn when 'showbreak'
|
||||
is set and 'list' is not.
|
||||
Solution: Only draw this character when 'list' is on. (Christian Brabandt)
|
||||
Files: src/screen.c
|
||||
@@ -16933,7 +16933,7 @@ Solution: Add #ifdefs.
|
||||
Files: src/screen.c
|
||||
|
||||
Patch 8.0.0383 (after 8.0.0382)
|
||||
Problem: Misplaced #ifdef. (Christ van Willigen)
|
||||
Problem: Misplaced #ifdef. (Christ van Willegen)
|
||||
Solution: Split assignment.
|
||||
Files: src/screen.c
|
||||
|
||||
@@ -19612,7 +19612,7 @@ Files: Filelist
|
||||
|
||||
Patch 8.0.0815
|
||||
Problem: Terminal window not correctly updated when 'statusline' invokes
|
||||
":sleep". (NIkolay Pavlov)
|
||||
":sleep". (Nikolay Pavlov)
|
||||
Solution: Clear got_int. Repeat redrawing when needed.
|
||||
Files: src/terminal.c
|
||||
|
||||
@@ -35835,7 +35835,7 @@ Files: src/ex_cmds2.c, src/getchar.c, src/testdir/test_mapping.vim,
|
||||
Patch 8.1.1592
|
||||
Problem: May start file dialog while exiting.
|
||||
Solution: Ignore the "browse" modifier when exiting. (Ozaki Kiichi,
|
||||
closes #4582
|
||||
closes #4582)
|
||||
Files: src/ex_cmds.c, src/terminal.c
|
||||
|
||||
Patch 8.1.1593
|
||||
@@ -46431,7 +46431,7 @@ Files: src/buffer.c, src/change.c, src/diff.c, src/evalbuffer.c,
|
||||
|
||||
Patch 8.2.0854
|
||||
Problem: Xxd cannot show offset as a decimal number.
|
||||
Solution: Add the "-d" flag. (Aapo Rantalainen, closes #5616
|
||||
Solution: Add the "-d" flag. (Aapo Rantalainen, closes #5616)
|
||||
Files: src/testdir/test_xxd.vim, src/xxd/xxd.c
|
||||
|
||||
Patch 8.2.0855
|
||||
@@ -46661,7 +46661,7 @@ Solution: Use // comments. (Yegappan Lakshmanan, closes #6190)
|
||||
Files: src/gui_xim.c
|
||||
|
||||
Patch 8.2.0890
|
||||
Problem: No color in terminal window when 'termguicolor' is set.
|
||||
Problem: No color in terminal window when 'termguicolors' is set.
|
||||
Solution: Clear the underline color. (closes #6186)
|
||||
Files: src/highlight.c
|
||||
|
||||
@@ -46728,7 +46728,7 @@ Files: runtime/doc/change.txt, src/mbyte.c, src/ops.c, src/option.h,
|
||||
|
||||
Patch 8.2.0902
|
||||
Problem: Using searchcount() in 'statusline' causes an error.
|
||||
Solution: Avoid saving/restoring the search patten recursively.
|
||||
Solution: Avoid saving/restoring the search pattern recursively.
|
||||
(closes #6194)
|
||||
Files: src/search.c, src/testdir/test_search_stat.vim,
|
||||
src/testdir/dumps/Test_searchstat_4.dump
|
||||
@@ -48832,7 +48832,7 @@ Files: src/buffer.c, src/testdir/test_tabline.vim
|
||||
Patch 8.2.1260
|
||||
Problem: There is no good test for CursorHold.
|
||||
Solution: Add a test. Remove duplicated test. (Yegappan Lakshmanan,
|
||||
closes #6503
|
||||
closes #6503)
|
||||
Files: src/testdir/test_autocmd.vim, src/testdir/test_buffer.vim,
|
||||
src/testdir/test_normal.vim
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*vi_diff.txt* For Vim version 8.2. Last change: 2020 Aug 15
|
||||
*vi_diff.txt* For Vim version 8.2. Last change: 2021 Jan 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -73,7 +73,7 @@ edit the termcap entry and try again. Vim has the |terminal-options|.
|
||||
Vim has only a few limits for the files that can be edited {Vi: can not handle
|
||||
<Nul> characters and characters above 128, has limited line length, many other
|
||||
limits}.
|
||||
*E340*
|
||||
|
||||
Maximum line length 2147483647 characters. Longer lines are split.
|
||||
Maximum number of lines 2147483647 lines.
|
||||
Maximum file size 2147483647 bytes (2 Gbyte) when a long integer is
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*vim9.txt* For Vim version 8.2. Last change: 2020 Dec 24
|
||||
*vim9.txt* For Vim version 8.2. Last change: 2021 Jan 23
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -14,7 +14,7 @@ features in Vim9 script.
|
||||
THIS IS STILL UNDER DEVELOPMENT - ANYTHING CAN BREAK - ANYTHING CAN CHANGE
|
||||
|
||||
|
||||
1. What is Vim9 script? |vim9-script|
|
||||
1. What is Vim9 script? |Vim9-script|
|
||||
2. Differences |vim9-differences|
|
||||
3. New style functions |fast-functions|
|
||||
4. Types |vim9-types|
|
||||
@@ -52,8 +52,9 @@ The Vim9 script syntax and semantics are used in:
|
||||
- a script file where the first command is `vim9script`
|
||||
- an autocommand defined in the context of the above
|
||||
|
||||
When using `:function` in a Vim9 script file the legacy syntax is used.
|
||||
However, this can be confusing and is therefore discouraged.
|
||||
When using `:function` in a Vim9 script file the legacy syntax is used, with
|
||||
the highest |scriptversion|. However, this can be confusing and is therefore
|
||||
discouraged.
|
||||
|
||||
Vim9 script and legacy Vim script can be mixed. There is no requirement to
|
||||
rewrite old scripts, they keep working as before. You may want to use a few
|
||||
@@ -70,28 +71,29 @@ Overview ~
|
||||
Brief summary of the differences you will most often encounter when using Vim9
|
||||
script and `:def` functions; details are below:
|
||||
- Comments start with #, not ": >
|
||||
echo "hello" # comment
|
||||
echo "hello" # comment
|
||||
- Using a backslash for line continuation is hardly ever needed: >
|
||||
echo "hello "
|
||||
echo "hello "
|
||||
.. yourName
|
||||
.. ", how are you?"
|
||||
- White space is required in many places.
|
||||
- Assign values without `:let`, declare variables with `:var`: >
|
||||
var count = 0
|
||||
var count = 0
|
||||
count += 3
|
||||
- Constants can be declared with `:final` and `:const`: >
|
||||
final matches = [] # add matches
|
||||
final matches = [] # add matches
|
||||
const names = ['Betty', 'Peter'] # cannot be changed
|
||||
- `:final` cannot be used as an abbreviation of `:finally`.
|
||||
- Variables and functions are script-local by default.
|
||||
- Functions are declared with argument types and return type: >
|
||||
def CallMe(count: number, message: string): bool
|
||||
- Call functions without `:call`: >
|
||||
writefile(['done'], 'file.txt')
|
||||
writefile(['done'], 'file.txt')
|
||||
- You cannot use `:xit`, `:t`, `:append`, `:change`, `:insert` or curly-braces
|
||||
names.
|
||||
- A range before a command must be prefixed with a colon: >
|
||||
:%s/this/that
|
||||
:%s/this/that
|
||||
- Unless mentioned specifically, the highest |scriptversion| is used.
|
||||
|
||||
|
||||
Comments starting with # ~
|
||||
@@ -315,7 +317,7 @@ The constant only applies to the value itself, not what it refers to. >
|
||||
NAMES[0] = ["Jack"] # Error!
|
||||
NAMES[0][0] = "Jack" # Error!
|
||||
NAMES[1] = ["Emma"] # Error!
|
||||
Names[1][0] = "Emma" # OK, now females[0] == "Emma"
|
||||
NAMES[1][0] = "Emma" # OK, now females[0] == "Emma"
|
||||
|
||||
< *E1092*
|
||||
Declaring more than one variable at a time, using the unpack notation, is
|
||||
@@ -401,10 +403,16 @@ Additionally, a lambda can contain statements in {}: >
|
||||
}
|
||||
NOT IMPLEMENTED YET
|
||||
|
||||
*vim9-curly*
|
||||
To avoid the "{" of a dictionary literal to be recognized as a statement block
|
||||
wrap it in parenthesis: >
|
||||
var Lambda = (arg) => ({key: 42})
|
||||
|
||||
Also when confused with the start of a command block: >
|
||||
({
|
||||
key: value
|
||||
})->method()
|
||||
|
||||
|
||||
Automatic line continuation ~
|
||||
|
||||
@@ -432,7 +440,7 @@ possible just before or after the operator. For example: >
|
||||
.. middle
|
||||
.. end
|
||||
var total = start +
|
||||
end -
|
||||
end -
|
||||
correction
|
||||
var result = positive
|
||||
? PosFunc(arg)
|
||||
@@ -485,6 +493,9 @@ Now "exit_cb: Func})" is actually a valid command: save any changes to the
|
||||
file "_cb: Func})" and exit. To avoid this kind of mistake in Vim9 script
|
||||
there must be white space between most command names and the argument.
|
||||
|
||||
However, the argument of a command that is a command won't be recognized. For
|
||||
example, after "windo echo expr" a line break inside "expr" will not be seen.
|
||||
|
||||
|
||||
Notes:
|
||||
- "enddef" cannot be used at the start of a continuation line, it ends the
|
||||
@@ -525,17 +536,23 @@ that using a literal key is much more common than using an expression, and
|
||||
considering that JavaScript uses this syntax, using the {} form for dictionary
|
||||
literals is considered a much more useful syntax. In Vim9 script the {} form
|
||||
uses literal keys: >
|
||||
let dict = {key: value}
|
||||
var dict = {key: value}
|
||||
|
||||
This works for alphanumeric characters, underscore and dash. If you want to
|
||||
use another character, use a single or double quoted string: >
|
||||
let dict = {'key with space': value}
|
||||
let dict = {"key\twith\ttabs": value}
|
||||
let dict = {'': value} # empty key
|
||||
var dict = {'key with space': value}
|
||||
var dict = {"key\twith\ttabs": value}
|
||||
var dict = {'': value} # empty key
|
||||
|
||||
In case the key needs to be an expression, square brackets can be used, just
|
||||
like in JavaScript: >
|
||||
let dict = {["key" .. nr]: value}
|
||||
var dict = {["key" .. nr]: value}
|
||||
|
||||
The key type can be string, number, bool or float. Other types result in an
|
||||
error. A number can be given with and without the []: >
|
||||
var dict = {123: 'without', [456]: 'with'}
|
||||
echo dict
|
||||
{'456': 'with', '123': 'without'}
|
||||
|
||||
|
||||
No :xit, :t, :append, :change or :insert ~
|
||||
@@ -550,6 +567,29 @@ Comparators ~
|
||||
The 'ignorecase' option is not used for comparators that use strings.
|
||||
|
||||
|
||||
For loop ~
|
||||
|
||||
Legacy Vim script has some tricks to make a for loop over a list handle
|
||||
deleting items at the current or previous item. In Vim9 script it just uses
|
||||
the index, if items are deleted then items in the list will be skipped.
|
||||
Example legacy script: >
|
||||
let l = [1, 2, 3, 4]
|
||||
for i in l
|
||||
echo i
|
||||
call remove(l, index(l, i))
|
||||
endfor
|
||||
Would echo:
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
In compiled Vim9 script you get:
|
||||
1
|
||||
3
|
||||
Generally, you should not change the list that is iterated over. Make a copy
|
||||
first if needed.
|
||||
|
||||
|
||||
White space ~
|
||||
|
||||
Vim9 script enforces proper use of white space. This is no longer allowed: >
|
||||
@@ -565,17 +605,26 @@ command: >
|
||||
|
||||
White space is required around most operators.
|
||||
|
||||
White space is required in a sublist (list slice) around the ":", except at
|
||||
the start and end: >
|
||||
otherlist = mylist[v : count] # v:count has a different meaning
|
||||
otherlist = mylist[:] # make a copy of the List
|
||||
otherlist = mylist[v :]
|
||||
otherlist = mylist[: v]
|
||||
|
||||
White space is not allowed:
|
||||
- Between a function name and the "(": >
|
||||
call Func (arg) # Error!
|
||||
call Func
|
||||
Func (arg) # Error!
|
||||
Func
|
||||
\ (arg) # Error!
|
||||
call Func(arg) # OK
|
||||
call Func(
|
||||
\ arg) # OK
|
||||
call Func(
|
||||
\ arg # OK
|
||||
\ )
|
||||
Func
|
||||
(arg) # Error!
|
||||
Func(arg) # OK
|
||||
Func(
|
||||
arg) # OK
|
||||
Func(
|
||||
arg # OK
|
||||
)
|
||||
|
||||
|
||||
Conditions and expressions ~
|
||||
@@ -595,7 +644,7 @@ is either falsy or truthy. This is mostly like JavaScript, except that an
|
||||
empty list and dict is falsy:
|
||||
|
||||
type truthy when ~
|
||||
bool v:true or 1
|
||||
bool true, v:true or 1
|
||||
number non-zero
|
||||
float non-zero
|
||||
string non-empty
|
||||
@@ -603,11 +652,11 @@ empty list and dict is falsy:
|
||||
list non-empty (different from JavaScript)
|
||||
dictionary non-empty (different from JavaScript)
|
||||
func when there is a function name
|
||||
special v:true
|
||||
special true or v:true
|
||||
job when not NULL
|
||||
channel when not NULL
|
||||
class when not NULL
|
||||
object when not NULL (TODO: when isTrue() returns v:true)
|
||||
object when not NULL (TODO: when isTrue() returns true)
|
||||
|
||||
The boolean operators "||" and "&&" expect the values to be boolean, zero or
|
||||
one: >
|
||||
@@ -622,25 +671,37 @@ one: >
|
||||
|
||||
When using "!" for inverting, there is no error for using any type and the
|
||||
result is a boolean. "!!" can be used to turn any value into boolean: >
|
||||
!'yes' == false
|
||||
!'yes' == false
|
||||
!![] == false
|
||||
!![1, 2, 3] == true
|
||||
!![1, 2, 3] == true
|
||||
|
||||
When using "`.."` for string concatenation arguments of simple types are
|
||||
always converted to string: >
|
||||
'hello ' .. 123 == 'hello 123'
|
||||
'hello ' .. v:true == 'hello v:true'
|
||||
'hello ' .. v:true == 'hello true'
|
||||
|
||||
Simple types are string, float, special and bool. For other types |string()|
|
||||
can be used.
|
||||
*false* *true*
|
||||
In Vim9 script one can use "true" for v:true and "false" for v:false.
|
||||
*false* *true* *null*
|
||||
In Vim9 script one can use "true" for v:true, "false" for v:false and "null"
|
||||
for v:null. When converting a boolean to a string "false" and "true" are
|
||||
used, not "v:false" and "v:true" like in legacy script. "v:none" is not
|
||||
changed, it is only used in JSON and has no equivalent in other languages.
|
||||
|
||||
Indexing a string with [idx] or [idx, idx] uses character indexes instead of
|
||||
Indexing a string with [idx] or [idx : idx] uses character indexes instead of
|
||||
byte indexes. Example: >
|
||||
echo 'bár'[1]
|
||||
In legacy script this results in the character 0xc3 (an illegal byte), in Vim9
|
||||
script this results in the string 'á'.
|
||||
A negative index is counting from the end, "[-1]" is the last character.
|
||||
To exclude the last character use |slice()|.
|
||||
If the index is out of range then an empty string results.
|
||||
|
||||
In legacy script "++var" and "--var" would be silently accepted and have no
|
||||
effect. This is an error in Vim9 script.
|
||||
|
||||
Numbers starting with zero are not considered to be octal, only numbers
|
||||
starting with "0o" are octal: "0o744". |scriptversion-4|
|
||||
|
||||
|
||||
What to watch out for ~
|
||||
@@ -650,21 +711,22 @@ same time tries to support the legacy Vim commands. Some compromises had to
|
||||
be made. Here is a summary of what might be unexpected.
|
||||
|
||||
Ex command ranges need to be prefixed with a colon. >
|
||||
-> # legacy Vim: shifts the previous line to the right
|
||||
->func() # Vim9: method call in continuation line
|
||||
:-> # Vim9: shifts the previous line to the right
|
||||
-> legacy Vim: shifts the previous line to the right
|
||||
->func() Vim9: method call in a continuation line
|
||||
:-> Vim9: shifts the previous line to the right
|
||||
|
||||
%s/a/b # legacy Vim: substitute on all lines
|
||||
%s/a/b legacy Vim: substitute on all lines
|
||||
x = alongname
|
||||
% another # Vim9: line continuation without a backslash
|
||||
:%s/a/b # Vim9: substitute on all lines
|
||||
'text'->func() # Vim9: method call
|
||||
:'t # legacy Vim: jump to mark m
|
||||
% another Vim9: modulo operator in a continuation line
|
||||
:%s/a/b Vim9: substitute on all lines
|
||||
't legacy Vim: jump to mark t
|
||||
'text'->func() Vim9: method call
|
||||
:'t Vim9: jump to mark t
|
||||
|
||||
Some Ex commands can be confused with assignments in Vim9 script: >
|
||||
g:name = value # assignment
|
||||
g:pattern:cmd # invalid command - ERROR
|
||||
:g:pattern:cmd # :global command
|
||||
g:name = value # assignment
|
||||
g:pattern:cmd # invalid command - ERROR
|
||||
:g:pattern:cmd # :global command
|
||||
|
||||
Functions defined with `:def` compile the whole function. Legacy functions
|
||||
can bail out, and the following lines are not parsed: >
|
||||
@@ -679,12 +741,12 @@ Vim9 functions are compiled as a whole: >
|
||||
if !has('feature')
|
||||
return
|
||||
endif
|
||||
use-feature # May give compilation error
|
||||
use-feature # May give a compilation error
|
||||
enddef
|
||||
For a workaround, split it in two functions: >
|
||||
func Maybe()
|
||||
if has('feature')
|
||||
call MaybyInner()
|
||||
call MaybeInner()
|
||||
endif
|
||||
endfunc
|
||||
if has('feature')
|
||||
@@ -699,6 +761,25 @@ evaluates to false: >
|
||||
use-feature
|
||||
endif
|
||||
enddef
|
||||
< *vim9-user-command*
|
||||
Another side effect of compiling a function is that the presence of a user
|
||||
command is checked at compile time. If the user command is defined later an
|
||||
error will result. This works: >
|
||||
command -nargs=1 MyCommand echom <q-args>
|
||||
def Works()
|
||||
MyCommand 123
|
||||
enddef
|
||||
This will give an error for "MyCommand" not being defined: >
|
||||
def Works()
|
||||
command -nargs=1 MyCommand echom <q-args>
|
||||
MyCommand 123
|
||||
enddef
|
||||
A workaround is to invoke the command indirectly with `:execute`: >
|
||||
def Works()
|
||||
command -nargs=1 MyCommand echom <q-args>
|
||||
execute 'MyCommand 123'
|
||||
enddef
|
||||
|
||||
Note that for unrecognized commands there is no check for "|" and a following
|
||||
command. This will give an error for missing `endif`: >
|
||||
def Maybe()
|
||||
@@ -772,6 +853,9 @@ prefix and they do not need to exist (they can be deleted any time).
|
||||
Note that for command line completion of {func} you
|
||||
can prepend "s:" to find script-local functions.
|
||||
|
||||
:disa[ssemble]! {func} Like `:disassemble` but with the instructions used for
|
||||
profiling.
|
||||
|
||||
Limitations ~
|
||||
|
||||
Local variables will not be visible to string evaluation. For example: >
|
||||
@@ -936,6 +1020,12 @@ an error, thus breaking backwards compatibility. For example:
|
||||
- Using a string value when setting a number options.
|
||||
- Using a number where a string is expected. *E1024*
|
||||
|
||||
One consequence is that the item type of a list or dict given to map() must
|
||||
not change. This will give an error in compiled code: >
|
||||
map([1, 2, 3], (i, v) => 'item ' .. i)
|
||||
E1012: Type mismatch; expected list<number> but got list<string>
|
||||
Instead use |mapnew()|.
|
||||
|
||||
==============================================================================
|
||||
|
||||
5. Namespace, Import and Export
|
||||
@@ -1045,14 +1135,14 @@ actually needed. A recommended mechanism:
|
||||
|
||||
1. In the plugin define user commands, functions and/or mappings that refer to
|
||||
an autoload script. >
|
||||
command -nargs=1 SearchForStuff call searchfor#Stuff(<f-args>)
|
||||
command -nargs=1 SearchForStuff searchfor#Stuff(<f-args>)
|
||||
|
||||
< This goes in .../plugin/anyname.vim. "anyname.vim" can be freely chosen.
|
||||
|
||||
2. In the autoload script do the actual work. You can import items from
|
||||
other files to split up functionality in appropriate pieces. >
|
||||
vim9script
|
||||
import FilterFunc from "../import/someother.vim"
|
||||
import FilterFunc from "../import/someother.vim"
|
||||
def searchfor#Stuff(arg: string)
|
||||
var filtered = FilterFunc(arg)
|
||||
...
|
||||
@@ -1138,12 +1228,12 @@ When compiling lines of Vim commands into instructions as much as possible
|
||||
should be done at compile time. Postponing it to runtime makes the execution
|
||||
slower and means mistakes are found only later. For example, when
|
||||
encountering the "+" character and compiling this into a generic add
|
||||
instruction, at execution time the instruction would have to inspect the type
|
||||
of the arguments and decide what kind of addition to do. And when the
|
||||
type is dictionary throw an error. If the types are known to be numbers then
|
||||
an "add number" instruction can be used, which is faster. The error can be
|
||||
given at compile time, no error handling is needed at runtime, since adding
|
||||
two numbers cannot fail.
|
||||
instruction, at runtime the instruction would have to inspect the type of the
|
||||
arguments and decide what kind of addition to do. And when the type is
|
||||
dictionary throw an error. If the types are known to be numbers then an "add
|
||||
number" instruction can be used, which is faster. The error can be given at
|
||||
compile time, no error handling is needed at runtime, since adding two numbers
|
||||
cannot fail.
|
||||
|
||||
The syntax for types, using <type> for compound types, is similar to Java. It
|
||||
is easy to understand and widely used. The type names are what were used in
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2020 Dec 07
|
||||
" Last Change: 2021 Jan 21
|
||||
|
||||
" Listen very carefully, I will say this only once
|
||||
if exists("did_load_filetypes")
|
||||
@@ -499,6 +499,9 @@ au BufNewFile,BufRead *.com call dist#ft#BindzoneCheck('dcl')
|
||||
" DOT
|
||||
au BufNewFile,BufRead *.dot,*.gv setf dot
|
||||
|
||||
" Dune
|
||||
au BufNewFile,BufRead jbuild,dune,dune-project,dune-workspace setf dune
|
||||
|
||||
" Dylan - lid files
|
||||
au BufNewFile,BufRead *.lid setf dylanlid
|
||||
|
||||
@@ -586,6 +589,9 @@ au BufNewFile,BufRead *.fan,*.fwt setf fan
|
||||
" Factor
|
||||
au BufNewFile,BufRead *.factor setf factor
|
||||
|
||||
" Fennel
|
||||
autocmd BufRead,BufNewFile *.fnl setf fennel
|
||||
|
||||
" Fetchmail RC file
|
||||
au BufNewFile,BufRead .fetchmailrc setf fetchmail
|
||||
|
||||
@@ -1125,8 +1131,8 @@ au BufNewFile,BufRead *.nse setf lua
|
||||
" NSIS
|
||||
au BufNewFile,BufRead *.nsi,*.nsh setf nsis
|
||||
|
||||
" OCAML
|
||||
au BufNewFile,BufRead *.ml,*.mli,*.mll,*.mly,.ocamlinit setf ocaml
|
||||
" OCaml
|
||||
au BufNewFile,BufRead *.ml,*.mli,*.mll,*.mly,.ocamlinit,*.mlt,*.mlp,*.mlip,*.mli.cppo,*.ml.cppo setf ocaml
|
||||
|
||||
" Occam
|
||||
au BufNewFile,BufRead *.occ setf occam
|
||||
@@ -1134,6 +1140,9 @@ au BufNewFile,BufRead *.occ setf occam
|
||||
" Omnimark
|
||||
au BufNewFile,BufRead *.xom,*.xin setf omnimark
|
||||
|
||||
" OPAM
|
||||
au BufNewFile,BufRead opam,*.opam,*.opam.template setf opam
|
||||
|
||||
" OpenROAD
|
||||
au BufNewFile,BufRead *.or setf openroad
|
||||
|
||||
@@ -1167,8 +1176,11 @@ au BufNewFile,BufRead *.papp,*.pxml,*.pxsl setf papp
|
||||
" Password file
|
||||
au BufNewFile,BufRead */etc/passwd,*/etc/passwd-,*/etc/passwd.edit,*/etc/shadow,*/etc/shadow-,*/etc/shadow.edit,*/var/backups/passwd.bak,*/var/backups/shadow.bak setf passwd
|
||||
|
||||
" Pascal (also *.p)
|
||||
au BufNewFile,BufRead *.pas,*.pp setf pascal
|
||||
" Pascal (also *.p, *.pp, *.inc)
|
||||
au BufNewFile,BufRead *.pas setf pascal
|
||||
|
||||
" Pascal or Puppet manifest
|
||||
au BufNewFile,BufRead *.pp call dist#ft#FTpp()
|
||||
|
||||
" Delphi or Lazarus program file
|
||||
au BufNewFile,BufRead *.dpr,*.lpr setf pascal
|
||||
@@ -1258,7 +1270,7 @@ au BufNewFile,BufRead *.pov setf pov
|
||||
" Povray configuration
|
||||
au BufNewFile,BufRead .povrayrc setf povini
|
||||
|
||||
" Povray, PHP or assembly
|
||||
" Povray, Pascal, PHP or assembly
|
||||
au BufNewFile,BufRead *.inc call dist#ft#FTinc()
|
||||
|
||||
" Printcap and Termcap
|
||||
@@ -1267,13 +1279,19 @@ au BufNewFile,BufRead *printcap
|
||||
au BufNewFile,BufRead *termcap
|
||||
\ let b:ptcap_type = "term" | setf ptcap
|
||||
|
||||
" PCCTS / ANTRL
|
||||
"au BufNewFile,BufRead *.g setf antrl
|
||||
" PCCTS / ANTLR
|
||||
"au BufNewFile,BufRead *.g setf antlr
|
||||
au BufNewFile,BufRead *.g setf pccts
|
||||
|
||||
" PPWizard
|
||||
au BufNewFile,BufRead *.it,*.ih setf ppwiz
|
||||
|
||||
" Puppet
|
||||
au BufNewFile,BufRead Puppetfile setf ruby
|
||||
|
||||
" Embedded Puppet
|
||||
au BufNewFile,BufRead *.epp setf epuppet
|
||||
|
||||
" Obj 3D file format
|
||||
" TODO: is there a way to avoid MS-Windows Object files?
|
||||
au BufNewFile,BufRead *.obj setf obj
|
||||
@@ -1416,8 +1434,8 @@ au BufNewFile,BufRead *.rb,*.rbw setf ruby
|
||||
" RubyGems
|
||||
au BufNewFile,BufRead *.gemspec setf ruby
|
||||
|
||||
" Rust
|
||||
au BufNewFile,BufRead *.rs setf rust
|
||||
" RBS (Ruby Signature)
|
||||
au BufNewFile,BufRead *.rbs setf rbs
|
||||
|
||||
" Rackup
|
||||
au BufNewFile,BufRead *.ru setf ruby
|
||||
@@ -1431,6 +1449,9 @@ au BufNewFile,BufRead *.builder,*.rxml,*.rjs setf ruby
|
||||
" Rantfile and Rakefile is like Ruby
|
||||
au BufNewFile,BufRead [rR]antfile,*.rant,[rR]akefile,*.rake setf ruby
|
||||
|
||||
" Rust
|
||||
au BufNewFile,BufRead *.rs setf rust
|
||||
|
||||
" S-lang (or shader language, or SmallLisp)
|
||||
au BufNewFile,BufRead *.sl setf slang
|
||||
|
||||
@@ -1547,6 +1568,9 @@ au BufNewFile,BufRead *.scm,*.ss,*.rkt setf scheme
|
||||
" Screen RC
|
||||
au BufNewFile,BufRead .screenrc,screenrc setf screen
|
||||
|
||||
" Sexplib
|
||||
au BufNewFile,BufRead *.sexp setf sexplib
|
||||
|
||||
" Simula
|
||||
au BufNewFile,BufRead *.sim setf simula
|
||||
|
||||
@@ -1607,6 +1631,9 @@ au BufNewFile,BufRead *.mib,*.my setf mib
|
||||
au BufNewFile,BufRead *.hog,snort.conf,vision.conf setf hog
|
||||
au BufNewFile,BufRead *.rules call dist#ft#FTRules()
|
||||
|
||||
" SPARQL queries
|
||||
au BufNewFile,BufRead *.rq,*.sparql setf sparql
|
||||
|
||||
" Spec (Linux RPM)
|
||||
au BufNewFile,BufRead *.spec setf spec
|
||||
|
||||
@@ -1717,8 +1744,13 @@ au BufNewFile,BufRead *.tli setf tli
|
||||
" Telix Salt
|
||||
au BufNewFile,BufRead *.slt setf tsalt
|
||||
|
||||
" Tera Term Language
|
||||
au BufRead,BufNewFile *.ttl setf teraterm
|
||||
" Tera Term Language or Turtle
|
||||
au BufRead,BufNewFile *.ttl
|
||||
\ if getline(1) =~ '^@\?\(prefix\|base\)' |
|
||||
\ setf turtle |
|
||||
\ else |
|
||||
\ setf teraterm |
|
||||
\ endif
|
||||
|
||||
" Terminfo
|
||||
au BufNewFile,BufRead *.ti setf terminfo
|
||||
|
||||
@@ -159,40 +159,41 @@ if exists("g:ada_abbrev")
|
||||
endif
|
||||
|
||||
" Section: Commands, Mapping, Menus {{{1
|
||||
"
|
||||
call ada#Map_Popup (
|
||||
\ 'Tag.List',
|
||||
\ 'l',
|
||||
\ 'call ada#List_Tag ()')
|
||||
call ada#Map_Popup (
|
||||
\'Tag.Jump',
|
||||
\'j',
|
||||
\'call ada#Jump_Tag ()')
|
||||
call ada#Map_Menu (
|
||||
\'Tag.Create File',
|
||||
\':AdaTagFile',
|
||||
\'call ada#Create_Tags (''file'')')
|
||||
call ada#Map_Menu (
|
||||
\'Tag.Create Dir',
|
||||
\':AdaTagDir',
|
||||
\'call ada#Create_Tags (''dir'')')
|
||||
if !exists(':AdaTagFile')
|
||||
call ada#Map_Popup (
|
||||
\ 'Tag.List',
|
||||
\ 'l',
|
||||
\ 'call ada#List_Tag ()')
|
||||
call ada#Map_Popup (
|
||||
\'Tag.Jump',
|
||||
\'j',
|
||||
\'call ada#Jump_Tag ()')
|
||||
call ada#Map_Menu (
|
||||
\'Tag.Create File',
|
||||
\':AdaTagFile',
|
||||
\'call ada#Create_Tags (''file'')')
|
||||
call ada#Map_Menu (
|
||||
\'Tag.Create Dir',
|
||||
\':AdaTagDir',
|
||||
\'call ada#Create_Tags (''dir'')')
|
||||
|
||||
call ada#Map_Menu (
|
||||
\'Highlight.Toggle Space Errors',
|
||||
\ ':AdaSpaces',
|
||||
\'call ada#Switch_Syntax_Option (''space_errors'')')
|
||||
call ada#Map_Menu (
|
||||
\'Highlight.Toggle Lines Errors',
|
||||
\ ':AdaLines',
|
||||
\'call ada#Switch_Syntax_Option (''line_errors'')')
|
||||
call ada#Map_Menu (
|
||||
\'Highlight.Toggle Rainbow Color',
|
||||
\ ':AdaRainbow',
|
||||
\'call ada#Switch_Syntax_Option (''rainbow_color'')')
|
||||
call ada#Map_Menu (
|
||||
\'Highlight.Toggle Standard Types',
|
||||
\ ':AdaTypes',
|
||||
\'call ada#Switch_Syntax_Option (''standard_types'')')
|
||||
call ada#Map_Menu (
|
||||
\'Highlight.Toggle Space Errors',
|
||||
\ ':AdaSpaces',
|
||||
\'call ada#Switch_Syntax_Option (''space_errors'')')
|
||||
call ada#Map_Menu (
|
||||
\'Highlight.Toggle Lines Errors',
|
||||
\ ':AdaLines',
|
||||
\'call ada#Switch_Syntax_Option (''line_errors'')')
|
||||
call ada#Map_Menu (
|
||||
\'Highlight.Toggle Rainbow Color',
|
||||
\ ':AdaRainbow',
|
||||
\'call ada#Switch_Syntax_Option (''rainbow_color'')')
|
||||
call ada#Map_Menu (
|
||||
\'Highlight.Toggle Standard Types',
|
||||
\ ':AdaTypes',
|
||||
\'call ada#Switch_Syntax_Option (''standard_types'')')
|
||||
endif
|
||||
|
||||
" 1}}}
|
||||
" Reset cpoptions
|
||||
|
||||
27
runtime/ftplugin/basic.vim
Normal file
27
runtime/ftplugin/basic.vim
Normal file
@@ -0,0 +1,27 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: BASIC
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2015 Jan 10
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
setlocal comments=:REM,:'
|
||||
setlocal commentstring='\ %s
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
|
||||
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
||||
let b:browsefilter = "BASIC Source Files (*.bas)\t*.bas\n" .
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
endif
|
||||
|
||||
let b:undo_ftplugin = "setl fo< com< cms< sua<" .
|
||||
\ " | unlet! b:browsefilter"
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Bazel (http://bazel.io)
|
||||
" Maintainer: David Barnett (https://github.com/google/vim-ft-bzl)
|
||||
" Last Change: 2015 Aug 11
|
||||
" Last Change: 2021 Jan 19
|
||||
|
||||
""
|
||||
" @section Introduction, intro
|
||||
@@ -51,6 +51,8 @@ if get(g:, 'ft_bzl_fold', 0)
|
||||
endif
|
||||
|
||||
if exists('*BzlFoldText')
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
finish
|
||||
endif
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Language: Dune buildsystem
|
||||
" Maintainer: Markus Mottl <markus.mottl@gmail.com>
|
||||
" Anton Kochkov <anton.kochkov@gmail.com>
|
||||
" URL: https://github.com/rgrinberg/vim-ocaml
|
||||
" URL: https://github.com/ocaml/vim-ocaml
|
||||
" Last Change:
|
||||
" 2018 Nov 3 - Added commentstring (Markus Mottl)
|
||||
" 2017 Sep 6 - Initial version (Etienne Millon)
|
||||
|
||||
@@ -1,87 +1,83 @@
|
||||
" Vim ftplugin file
|
||||
" Language: Erlang
|
||||
" Language: Erlang (http://www.erlang.org)
|
||||
" Maintainer: Csaba Hoch <csaba.hoch@gmail.com>
|
||||
" Author: Oscar Hellström <oscar@oscarh.net>
|
||||
" Contributors: Ricardo Catalinas Jiménez <jimenezrick@gmail.com>
|
||||
" Eduardo Lopez (http://github.com/tapichu)
|
||||
" Arvid Bjurklint (http://github.com/slarwise)
|
||||
" Last Update: 2021-Jan-08
|
||||
" License: Vim license
|
||||
" Version: 2012/01/25
|
||||
" URL: https://github.com/vim-erlang/vim-erlang-runtime
|
||||
|
||||
if exists('b:did_ftplugin')
|
||||
finish
|
||||
else
|
||||
let b:did_ftplugin = 1
|
||||
endif
|
||||
|
||||
if exists('s:did_function_definitions')
|
||||
call s:SetErlangOptions()
|
||||
finish
|
||||
else
|
||||
let s:did_function_definitions = 1
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
if !exists('g:erlang_keywordprg')
|
||||
let g:erlang_keywordprg = 'erl -man'
|
||||
let &l:keywordprg = get(g:, 'erlang_keywordprg', 'erl -man')
|
||||
|
||||
if get(g:, 'erlang_folding', 0)
|
||||
setlocal foldmethod=expr
|
||||
setlocal foldexpr=GetErlangFold(v:lnum)
|
||||
setlocal foldtext=ErlangFoldText()
|
||||
endif
|
||||
|
||||
if !exists('g:erlang_folding')
|
||||
let g:erlang_folding = 0
|
||||
endif
|
||||
setlocal comments=:%%%,:%%,:%
|
||||
setlocal commentstring=%%s
|
||||
|
||||
setlocal formatoptions+=ro
|
||||
|
||||
setlocal suffixesadd=.erl,.hrl
|
||||
|
||||
let &l:include = '^\s*-\%(include\|include_lib\)\s*("\zs\f*\ze")'
|
||||
let &l:define = '^\s*-\%(define\|record\|type\|opaque\)'
|
||||
|
||||
let s:erlang_fun_begin = '^\a\w*(.*$'
|
||||
let s:erlang_fun_end = '^[^%]*\.\s*\(%.*\)\?$'
|
||||
|
||||
function s:SetErlangOptions()
|
||||
if g:erlang_folding
|
||||
setlocal foldmethod=expr
|
||||
setlocal foldexpr=GetErlangFold(v:lnum)
|
||||
setlocal foldtext=ErlangFoldText()
|
||||
endif
|
||||
if !exists('*GetErlangFold')
|
||||
function GetErlangFold(lnum)
|
||||
let lnum = a:lnum
|
||||
let line = getline(lnum)
|
||||
|
||||
setlocal comments=:%%%,:%%,:%
|
||||
setlocal commentstring=%%s
|
||||
if line =~ s:erlang_fun_end
|
||||
return '<1'
|
||||
endif
|
||||
|
||||
setlocal formatoptions+=ro
|
||||
let &l:keywordprg = g:erlang_keywordprg
|
||||
endfunction
|
||||
if line =~ s:erlang_fun_begin && foldlevel(lnum - 1) == 1
|
||||
return '1'
|
||||
endif
|
||||
|
||||
function GetErlangFold(lnum)
|
||||
let lnum = a:lnum
|
||||
let line = getline(lnum)
|
||||
if line =~ s:erlang_fun_begin
|
||||
return '>1'
|
||||
endif
|
||||
|
||||
if line =~ s:erlang_fun_end
|
||||
return '<1'
|
||||
endif
|
||||
return '='
|
||||
endfunction
|
||||
endif
|
||||
|
||||
if line =~ s:erlang_fun_begin && foldlevel(lnum - 1) == 1
|
||||
return '1'
|
||||
endif
|
||||
if !exists('*ErlangFoldText')
|
||||
function ErlangFoldText()
|
||||
let line = getline(v:foldstart)
|
||||
let foldlen = v:foldend - v:foldstart + 1
|
||||
let lines = ' ' . foldlen . ' lines: ' . substitute(line, "[\ \t]*", '', '')
|
||||
if foldlen < 10
|
||||
let lines = ' ' . lines
|
||||
endif
|
||||
let retval = '+' . v:folddashes . lines
|
||||
|
||||
if line =~ s:erlang_fun_begin
|
||||
return '>1'
|
||||
endif
|
||||
return retval
|
||||
endfunction
|
||||
endif
|
||||
|
||||
return '='
|
||||
endfunction
|
||||
|
||||
function ErlangFoldText()
|
||||
let line = getline(v:foldstart)
|
||||
let foldlen = v:foldend - v:foldstart + 1
|
||||
let lines = ' ' . foldlen . ' lines: ' . substitute(line, "[\ \t]*", '', '')
|
||||
if foldlen < 10
|
||||
let lines = ' ' . lines
|
||||
endif
|
||||
let retval = '+' . v:folddashes . lines
|
||||
|
||||
return retval
|
||||
endfunction
|
||||
|
||||
call s:SetErlangOptions()
|
||||
|
||||
let b:undo_ftplugin = "setlocal foldmethod< foldexpr< foldtext<"
|
||||
\ . " comments< commentstring< formatoptions<"
|
||||
let b:undo_ftplugin = "setlocal keywordprg< foldmethod< foldexpr< foldtext<"
|
||||
\ . " comments< commentstring< formatoptions< suffixesadd< include<"
|
||||
\ . " define<"
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim: sw=2 et
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2008-07-19
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo< inc< | unlet! b:matchwords"
|
||||
|
||||
setlocal comments=s1:/*,mb:*,ex:*/,:// commentstring=/*\ %s\ */
|
||||
|
||||
13
runtime/ftplugin/freebasic.vim
Normal file
13
runtime/ftplugin/freebasic.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: FreeBasic
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2015 Jan 10
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
runtime! ftplugin/basic.vim
|
||||
|
||||
" vim: ts=8
|
||||
19
runtime/ftplugin/fstab.vim
Normal file
19
runtime/ftplugin/fstab.vim
Normal file
@@ -0,0 +1,19 @@
|
||||
" Vim ftplugin file
|
||||
" Language: fstab file
|
||||
" Maintainer: Radu Dineiu <radu.dineiu@gmail.com>
|
||||
" URL: https://raw.github.com/rid9/vim-fstab/master/ftplugin/fstab.vim
|
||||
" Last Change: 2021 Jan 02
|
||||
" Version: 1.0
|
||||
"
|
||||
" Credits:
|
||||
" Subhaditya Nath <sn03.general@gmail.com>
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
setlocal commentstring=#%s
|
||||
let b:undo_ftplugin = "setlocal commentstring<"
|
||||
|
||||
" vim: ts=8 ft=vim
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: Hamster Script
|
||||
" Version: 2.0.6.0
|
||||
" Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
|
||||
" Last Change: 2017 Mar 18
|
||||
" Last Change: 2021 Jan 19
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
@@ -57,6 +57,9 @@ if exists("loaded_matchit")
|
||||
endif
|
||||
|
||||
setlocal ignorecase
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
setlocal cpo+=M " makes \%( match \)
|
||||
|
||||
" Disabled, 'cpo' is a global option.
|
||||
" setlocal cpo+=M " makes \%( match \)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
" Pierre Vittet <pierre-vittet@pvittet.com>
|
||||
" Stefano Zacchiroli <zack@bononia.it>
|
||||
" Vincent Aravantinos <firstname.name@imag.fr>
|
||||
" URL: https://github.com/rgrinberg/vim-ocaml
|
||||
" URL: https://github.com/ocaml/vim-ocaml
|
||||
" Last Change:
|
||||
" 2013 Oct 27 - Added commentstring (MM)
|
||||
" 2013 Jul 26 - load default compiler settings (MM)
|
||||
@@ -38,7 +38,8 @@ let s:cposet=&cpoptions
|
||||
set cpo&vim
|
||||
|
||||
" Comment string
|
||||
setlocal comments=
|
||||
setlocal comments=sr:(*\ ,mb:\ ,ex:*)
|
||||
setlocal comments^=sr:(**,mb:\ \ ,ex:*)
|
||||
setlocal commentstring=(*%s*)
|
||||
|
||||
" Add mappings, unless the user didn't want this.
|
||||
@@ -158,6 +159,8 @@ let b:undo_ftplugin = "setlocal efm< foldmethod< foldexpr<"
|
||||
" - Only definitions below, executed once -------------------------------------
|
||||
|
||||
if exists("*OMLetFoldLevel")
|
||||
let &cpoptions = s:cposet
|
||||
unlet s:cposet
|
||||
finish
|
||||
endif
|
||||
|
||||
@@ -391,9 +394,9 @@ endfunction
|
||||
endif
|
||||
endfun
|
||||
|
||||
" This variable contain a dictionnary of list. Each element of the dictionnary
|
||||
" represent an annotation system. An annotation system is a list with :
|
||||
" - annotation file name as it's key
|
||||
" This variable contains a dictionary of lists. Each element of the dictionary
|
||||
" represents an annotation system. An annotation system is a list with:
|
||||
" - annotation file name as its key
|
||||
" - annotation file path as first element of the contained list
|
||||
" - build path as second element of the contained list
|
||||
" - annot_file_last_mod (contain the date of .annot file) as third element
|
||||
@@ -521,7 +524,7 @@ endfunction
|
||||
"c. link this stuff with what the user wants
|
||||
" ie. get the expression selected/under the cursor
|
||||
|
||||
let s:ocaml_word_char = '\w|[<EFBFBD>-<2D>]|'''
|
||||
let s:ocaml_word_char = '\w|[\xc0-\xff]|'''
|
||||
|
||||
"In: the current mode (eg. "visual", "normal", etc.)
|
||||
"Out: the borders of the expression we are looking for the type
|
||||
@@ -634,7 +637,7 @@ endfunction
|
||||
nnoremap <silent> <Plug>OCamlPrintType :<C-U>call Ocaml_print_type("normal")<CR>
|
||||
xnoremap <silent> <Plug>OCamlPrintType :<C-U>call Ocaml_print_type("visual")<CR>`<
|
||||
|
||||
let &cpoptions=s:cposet
|
||||
let &cpoptions = s:cposet
|
||||
unlet s:cposet
|
||||
|
||||
" vim:sw=2 fdm=indent
|
||||
|
||||
15
runtime/ftplugin/sexplib.vim
Normal file
15
runtime/ftplugin/sexplib.vim
Normal file
@@ -0,0 +1,15 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Sexplib
|
||||
" Maintainer: Markus Mottl <markus.mottl@gmail.com>
|
||||
" URL: https://github.com/ocaml/vim-ocaml
|
||||
" Last Change:
|
||||
" 2017 Apr 12 - First version (MM)
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin=1
|
||||
|
||||
" Comment string
|
||||
setl commentstring=;\ %s
|
||||
setl comments=:;
|
||||
@@ -6,7 +6,16 @@
|
||||
" See https://swift.org/LICENSE.txt for license information
|
||||
" See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
|
||||
"
|
||||
" Vim maintainer: Emir SARI <bitigchi@me.com>
|
||||
" Vim maintainer: Emir SARI <bitigchi@me.com>
|
||||
" Last Change: 2021 Jan 08
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
|
||||
let b:did_ftplugin = 1
|
||||
let b:undo_ftplugin = "setlocal comments< expandtab< tabstop< shiftwidth< smartindent<"
|
||||
|
||||
setlocal comments=s1:/*,mb:*,ex:*/,:///,://
|
||||
setlocal expandtab
|
||||
|
||||
32
runtime/ftplugin/tidy.vim
Normal file
32
runtime/ftplugin/tidy.vim
Normal file
@@ -0,0 +1,32 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: HMTL Tidy Configuration
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2020 Sep 4
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
setlocal comments=:#,://
|
||||
setlocal commentstring=#\ %s
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
|
||||
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
||||
let b:browsefilter = "HTML Tidy Files (tidyrc, .tidyrc, tidy.conf)\ttidyrc;.tidyrc;tidy.conf\n" .
|
||||
\ "HTML Files (*.html, *.htm)\t*.html;*.htm\n" .
|
||||
\ "XHTML Files (*.xhtml, *.xhtm)\t*.xhtml;*.xhtm\n" .
|
||||
\ "XML Files (*.xml)\t*.xml\n" .
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
endif
|
||||
|
||||
let b:undo_ftplugin = "setl fo< com< cms<" .
|
||||
\ " | unlet! b:browsefilter"
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim: nowrap sw=2 sts=2 ts=8
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim filetype plugin
|
||||
" Language: Vim
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2020 Aug 14
|
||||
" Last Change: 2021 Jan 23
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
@@ -48,18 +48,23 @@ setlocal isk+=#
|
||||
" Use :help to lookup the keyword under the cursor with K.
|
||||
setlocal keywordprg=:help
|
||||
|
||||
" Set 'comments' to format dashed lists in comments
|
||||
" Avoid that #{} starts a comment.
|
||||
setlocal com=sO:\"\ -,mO:\"\ \ ,sO:#\ -,mO:#\ \ ,eO:##,:\",b:#
|
||||
if "\n" .. getline(1, 10)->join("\n") =~# '\n\s*vim9\%[script]\>'
|
||||
" Set 'comments' to format dashed lists in comments
|
||||
setlocal com=sO:#\ -,mO:#\ \ ,eO:##,:#
|
||||
" Comments starts with # in Vim9 script
|
||||
setlocal commentstring=#%s
|
||||
else
|
||||
setlocal com=sO:\"\ -,mO:\"\ \ ,:\"
|
||||
" Comments starts with a double quote in legacy script
|
||||
setlocal commentstring=\"%s
|
||||
endif
|
||||
|
||||
|
||||
" Format comments to be up to 78 characters long
|
||||
if &tw == 0
|
||||
setlocal tw=78
|
||||
endif
|
||||
|
||||
" Comments start with a double quote; in Vim9 script # would also work
|
||||
setlocal commentstring=\"%s
|
||||
|
||||
if !exists("no_plugin_maps") && !exists("no_vim_maps")
|
||||
let b:did_add_maps = 1
|
||||
|
||||
@@ -83,8 +88,13 @@ endif
|
||||
" Let the matchit plugin know what items can be matched.
|
||||
if exists("loaded_matchit")
|
||||
let b:match_ignorecase = 0
|
||||
" "func" can also be used as a type:
|
||||
" var Ref: func
|
||||
" or to list functions:
|
||||
" func name
|
||||
" require a parenthesis following, then there can be an "endfunc".
|
||||
let b:match_words =
|
||||
\ '\<\%(fu\%[nction]\|def\)\>)\@!:\<retu\%[rn]\>:\<\%(endf\%[unction]\|enddef\)\>,' .
|
||||
\ '\<\%(fu\%[nction]\|def\)\s\+\S\+(:\<retu\%[rn]\>:\<\%(endf\%[unction]\|enddef\)\>,' .
|
||||
\ '\<\(wh\%[ile]\|for\)\>:\<brea\%[k]\>:\<con\%[tinue]\>:\<end\(w\%[hile]\|fo\%[r]\)\>,' .
|
||||
\ '\<if\>:\<el\%[seif]\>:\<en\%[dif]\>,' .
|
||||
\ '{:},' .
|
||||
|
||||
13
runtime/indent/dune.vim
Normal file
13
runtime/indent/dune.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim indent file
|
||||
" Language: dune
|
||||
" Maintainers: Markus Mottl <markus.mottl@gmail.com>
|
||||
" URL: https://github.com/ocaml/vim-ocaml
|
||||
" Last Change: 2021 Jan 01
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
|
||||
" dune format-dune-file uses 1 space to indent
|
||||
setlocal softtabstop=1 shiftwidth=1 expandtab
|
||||
@@ -74,11 +74,15 @@ endif
|
||||
if (b:fortran_fixed_source == 1)
|
||||
setlocal indentexpr=FortranGetFixedIndent()
|
||||
if exists("*FortranGetFixedIndent")
|
||||
let &cpoptions = s:cposet
|
||||
unlet s:cposet
|
||||
finish
|
||||
endif
|
||||
else
|
||||
setlocal indentexpr=FortranGetFreeIndent()
|
||||
if exists("*FortranGetFreeIndent")
|
||||
let &cpoptions = s:cposet
|
||||
unlet s:cposet
|
||||
finish
|
||||
endif
|
||||
endif
|
||||
@@ -213,7 +217,7 @@ function FortranGetFixedIndent()
|
||||
return ind
|
||||
endfunction
|
||||
|
||||
let &cpoptions=s:cposet
|
||||
let &cpoptions = s:cposet
|
||||
unlet s:cposet
|
||||
|
||||
" vim:sw=2 tw=130
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
" Maintainers: Jean-Francois Yuen <jfyuen@happycoders.org>
|
||||
" Mike Leary <leary@nwlink.com>
|
||||
" Markus Mottl <markus.mottl@gmail.com>
|
||||
" URL: http://www.ocaml.info/vim/indent/ocaml.vim
|
||||
" URL: https://github.com/ocaml/vim-ocaml
|
||||
" Last Change: 2017 Jun 13
|
||||
" 2005 Jun 25 - Fixed multiple bugs due to 'else\nreturn ind' working
|
||||
" 2005 May 09 - Added an option to not indent OCaml-indents specially (MM)
|
||||
@@ -30,7 +30,8 @@ setlocal nosmartindent
|
||||
" Comment formatting
|
||||
if !exists("no_ocaml_comments")
|
||||
if (has("comments"))
|
||||
setlocal comments=sr:(*,mb:*,ex:*)
|
||||
setlocal comments=sr:(*\ ,mb:\ ,ex:*)
|
||||
setlocal comments^=sr:(**,mb:\ \ ,ex:*)
|
||||
setlocal fo=cqort
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -227,4 +227,4 @@ endfunction
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim:sw=2
|
||||
" vim:sw=2
|
||||
|
||||
@@ -10,6 +10,11 @@ let cmd =
|
||||
\ 'some '
|
||||
\ 'string'
|
||||
|
||||
if 1
|
||||
let x = [
|
||||
\ ]
|
||||
endif
|
||||
|
||||
" END_INDENT
|
||||
|
||||
" START_INDENT
|
||||
@@ -21,8 +26,27 @@ let cmd =
|
||||
|
||||
" END_INDENT
|
||||
|
||||
" START_INDENT
|
||||
" INDENT_EXE let g:vim_indent_cont = 5
|
||||
|
||||
let list = [
|
||||
\ 'one',
|
||||
\ 'two']
|
||||
|
||||
" END_INDENT
|
||||
|
||||
" START_INDENT
|
||||
" INDENT_EXE unlet g:vim_indent_cont
|
||||
|
||||
let list = [
|
||||
'one',
|
||||
'two',
|
||||
]
|
||||
echo
|
||||
|
||||
" END_INDENT
|
||||
|
||||
" START_INDENT
|
||||
" INDENT_AT this-line
|
||||
func Some()
|
||||
let f = x " this-line
|
||||
|
||||
@@ -10,6 +10,11 @@ let cmd =
|
||||
\ 'some '
|
||||
\ 'string'
|
||||
|
||||
if 1
|
||||
let x = [
|
||||
\ ]
|
||||
endif
|
||||
|
||||
" END_INDENT
|
||||
|
||||
" START_INDENT
|
||||
@@ -21,8 +26,27 @@ let cmd =
|
||||
|
||||
" END_INDENT
|
||||
|
||||
" START_INDENT
|
||||
" INDENT_EXE let g:vim_indent_cont = 5
|
||||
|
||||
let list = [
|
||||
\ 'one',
|
||||
\ 'two']
|
||||
|
||||
" END_INDENT
|
||||
|
||||
" START_INDENT
|
||||
" INDENT_EXE unlet g:vim_indent_cont
|
||||
|
||||
let list = [
|
||||
'one',
|
||||
'two',
|
||||
]
|
||||
echo
|
||||
|
||||
" END_INDENT
|
||||
|
||||
" START_INDENT
|
||||
" INDENT_AT this-line
|
||||
func Some()
|
||||
let f = x " this-line
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim indent file
|
||||
" Language: Vim script
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2020 Sep 27
|
||||
" Last Change: 2021 Jan 21
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
@@ -38,6 +38,9 @@ function GetVimIndentIntern()
|
||||
" Find a non-blank line above the current line.
|
||||
let lnum = prevnonblank(v:lnum - 1)
|
||||
|
||||
" The previous line, ignoring line continuation
|
||||
let prev_text_end = lnum > 0 ? getline(lnum) : ''
|
||||
|
||||
" If the current line doesn't start with '\' or '"\ ' and below a line that
|
||||
" starts with '\' or '"\ ', use the indent of the line above it.
|
||||
let cur_text = getline(v:lnum)
|
||||
@@ -51,7 +54,10 @@ function GetVimIndentIntern()
|
||||
if lnum == 0
|
||||
return 0
|
||||
endif
|
||||
|
||||
" the start of the previous line, skipping over line continuation
|
||||
let prev_text = getline(lnum)
|
||||
let found_cont = 0
|
||||
|
||||
" Add a 'shiftwidth' after :if, :while, :try, :catch, :finally, :function
|
||||
" and :else. Add it three times for a line that starts with '\' or '"\ '
|
||||
@@ -83,6 +89,7 @@ function GetVimIndentIntern()
|
||||
endif
|
||||
|
||||
if cur_text =~ s:lineContPat && v:lnum > 1 && prev_text !~ s:lineContPat
|
||||
let found_cont = 1
|
||||
if exists("g:vim_indent_cont")
|
||||
let ind = ind + g:vim_indent_cont
|
||||
else
|
||||
@@ -114,10 +121,50 @@ function GetVimIndentIntern()
|
||||
endif
|
||||
endif
|
||||
|
||||
" For a line starting with "}" find the matching "{". If it is at the start
|
||||
" of the line align with it, probably end of a block.
|
||||
" Use the mapped "%" from matchit to find the match, otherwise we may match
|
||||
" a { inside a comment or string.
|
||||
if cur_text =~ '^\s*}'
|
||||
if maparg('%') != ''
|
||||
exe v:lnum
|
||||
silent! normal %
|
||||
if line('.') < v:lnum && getline('.') =~ '^\s*{'
|
||||
let ind = indent('.')
|
||||
endif
|
||||
else
|
||||
" todo: use searchpair() to find a match
|
||||
endif
|
||||
endif
|
||||
|
||||
" Below a line starting with "}" find the matching "{". If it is at the
|
||||
" end of the line we must be below the end of a dictionary.
|
||||
if prev_text =~ '^\s*}'
|
||||
if maparg('%') != ''
|
||||
exe lnum
|
||||
silent! normal %
|
||||
if line('.') == lnum || getline('.') !~ '^\s*{'
|
||||
let ind = ind - shiftwidth()
|
||||
endif
|
||||
else
|
||||
" todo: use searchpair() to find a match
|
||||
endif
|
||||
endif
|
||||
|
||||
" Below a line starting with "]" we must be below the end of a list.
|
||||
if prev_text_end =~ '^\s*]'
|
||||
let ind = ind - shiftwidth()
|
||||
endif
|
||||
|
||||
" A line ending in "{"/"[} is most likely the start of a dict/list literal,
|
||||
" indent the next line more. Not for a continuation line.
|
||||
if prev_text_end =~ '[{[]\s*$' && !found_cont
|
||||
let ind = ind + shiftwidth()
|
||||
endif
|
||||
|
||||
" Subtract a 'shiftwidth' on a :endif, :endwhile, :catch, :finally, :endtry,
|
||||
" :endfun, :enddef, :else and :augroup END.
|
||||
if cur_text =~ '^\s*\(ene\@!\|}\|cat\|finall\|el\|aug\%[roup]\s\+[eE][nN][dD]\)'
|
||||
if cur_text =~ '^\s*\(ene\@!\|cat\|finall\|el\|aug\%[roup]\s\+[eE][nN][dD]\)'
|
||||
let ind = ind - shiftwidth()
|
||||
endif
|
||||
|
||||
|
||||
@@ -2,16 +2,13 @@
|
||||
" Language: YAML
|
||||
" Maintainer: Nikolai Pavlov <zyx.vim@gmail.com>
|
||||
" Last Update: Lukas Reineke
|
||||
" Last Change: 2020 Jun 07
|
||||
" Last Change: 2021 Jan 19
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists('b:did_indent')
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal indentexpr=GetYAMLIndent(v:lnum)
|
||||
@@ -25,6 +22,9 @@ if exists('*GetYAMLIndent')
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function s:FindPrevLessIndentedLine(lnum, ...)
|
||||
let prevlnum = prevnonblank(a:lnum-1)
|
||||
let curindent = a:0 ? a:1 : indent(a:lnum)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
" Menu Translations: Turkish
|
||||
|
||||
source <sfile>:p:h/menu_tr_tr.cp1254.vim
|
||||
source <sfile>:p:h/menu_tr_tr.cp1254.vim
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
" Menu Translations: Turkish
|
||||
|
||||
source <sfile>:p:h/menu_tr_tr.iso_8859-9.vim
|
||||
source <sfile>:p:h/menu_tr_tr.iso_8859-9.vim
|
||||
|
||||
162
runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
vendored
162
runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
vendored
@@ -2,7 +2,7 @@
|
||||
"
|
||||
" Author: Bram Moolenaar
|
||||
" Copyright: Vim license applies, see ":help license"
|
||||
" Last Change: 2020 Dec 07
|
||||
" Last Change: 2021 Jan 03
|
||||
"
|
||||
" WORK IN PROGRESS - Only the basics work
|
||||
" Note: On MS-Windows you need a recent version of gdb. The one included with
|
||||
@@ -70,9 +70,14 @@ if !exists('g:termdebugger')
|
||||
endif
|
||||
|
||||
let s:pc_id = 12
|
||||
let s:break_id = 13 " breakpoint number is added to this
|
||||
let s:asm_id = 13
|
||||
let s:break_id = 14 " breakpoint number is added to this
|
||||
let s:stopped = 1
|
||||
|
||||
let s:parsing_disasm_msg = 0
|
||||
let s:asm_lines = []
|
||||
let s:asm_addr = ''
|
||||
|
||||
" Take a breakpoint number as used by GDB and turn it into an integer.
|
||||
" The breakpoint may contain a dot: 123.4 -> 123004
|
||||
" The main breakpoint has a zero subid.
|
||||
@@ -114,6 +119,7 @@ func s:StartDebug_internal(dict)
|
||||
|
||||
let s:ptywin = 0
|
||||
let s:pid = 0
|
||||
let s:asmwin = 0
|
||||
|
||||
" Uncomment this line to write logging in "debuglog".
|
||||
" call ch_logfile('debuglog', 'w')
|
||||
@@ -153,6 +159,14 @@ func s:StartDebug_internal(dict)
|
||||
else
|
||||
call s:StartDebug_term(a:dict)
|
||||
endif
|
||||
|
||||
if exists('g:termdebug_disasm_window')
|
||||
if g:termdebug_disasm_window
|
||||
let curwinid = win_getid(winnr())
|
||||
call s:GotoAsmwinOrCreateIt()
|
||||
call win_gotoid(curwinid)
|
||||
endif
|
||||
endif
|
||||
endfunc
|
||||
|
||||
" Use when debugger didn't start or ended.
|
||||
@@ -546,6 +560,14 @@ func s:GetFullname(msg)
|
||||
return name
|
||||
endfunc
|
||||
|
||||
" Extract the "addr" value from a gdb message with addr="0x0001234".
|
||||
func s:GetAsmAddr(msg)
|
||||
if a:msg !~ 'addr='
|
||||
return ''
|
||||
endif
|
||||
let addr = s:DecodeMessage(substitute(a:msg, '.*addr=', '', ''))
|
||||
return addr
|
||||
endfunc
|
||||
func s:EndTermDebug(job, status)
|
||||
exe 'bwipe! ' . s:commbuf
|
||||
unlet s:gdbwin
|
||||
@@ -609,6 +631,69 @@ func s:EndPromptDebug(job, status)
|
||||
call ch_log("Returning from EndPromptDebug()")
|
||||
endfunc
|
||||
|
||||
" Disassembly window - added by Michael Sartain
|
||||
"
|
||||
" - CommOutput: disassemble $pc
|
||||
" - CommOutput: &"disassemble $pc\n"
|
||||
" - CommOutput: ~"Dump of assembler code for function main(int, char**):\n"
|
||||
" - CommOutput: ~" 0x0000555556466f69 <+0>:\tpush rbp\n"
|
||||
" ...
|
||||
" - CommOutput: ~" 0x0000555556467cd0:\tpop rbp\n"
|
||||
" - CommOutput: ~" 0x0000555556467cd1:\tret \n"
|
||||
" - CommOutput: ~"End of assembler dump.\n"
|
||||
" - CommOutput: ^done
|
||||
|
||||
" - CommOutput: disassemble $pc
|
||||
" - CommOutput: &"disassemble $pc\n"
|
||||
" - CommOutput: &"No function contains specified address.\n"
|
||||
" - CommOutput: ^error,msg="No function contains specified address."
|
||||
func s:HandleDisasmMsg(msg)
|
||||
if a:msg =~ '^\^done'
|
||||
let curwinid = win_getid(winnr())
|
||||
if win_gotoid(s:asmwin)
|
||||
silent normal! gg0"_dG
|
||||
call setline(1, s:asm_lines)
|
||||
set nomodified
|
||||
set filetype=asm
|
||||
|
||||
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'
|
||||
endif
|
||||
|
||||
call win_gotoid(curwinid)
|
||||
endif
|
||||
|
||||
let s:parsing_disasm_msg = 0
|
||||
let s:asm_lines = []
|
||||
elseif a:msg =~ '^\^error,msg='
|
||||
if s:parsing_disasm_msg == 1
|
||||
" Disassemble call ran into an error. This can happen when gdb can't
|
||||
" find the function frame address, so let's try to disassemble starting
|
||||
" at current PC
|
||||
call s:SendCommand('disassemble $pc,+100')
|
||||
endif
|
||||
let s:parsing_disasm_msg = 0
|
||||
elseif a:msg =~ '\&\"disassemble \$pc'
|
||||
if a:msg =~ '+100'
|
||||
" This is our second disasm attempt
|
||||
let s:parsing_disasm_msg = 2
|
||||
endif
|
||||
else
|
||||
let value = substitute(a:msg, '^\~\"[ ]*', '', '')
|
||||
let value = substitute(value, '^=>[ ]*', '', '')
|
||||
let value = substitute(value, '\\n\"
|
||||
$', '', '')
|
||||
let value = substitute(value, '\\n\"$', '', '')
|
||||
let value = substitute(value, '
|
||||
', '', '')
|
||||
let value = substitute(value, '\\t', ' ', 'g')
|
||||
|
||||
if value != '' || !empty(s:asm_lines)
|
||||
call add(s:asm_lines, value)
|
||||
endif
|
||||
endif
|
||||
endfunc
|
||||
|
||||
" Handle a message received from gdb on the GDB/MI interface.
|
||||
@@ -618,7 +703,10 @@ func s:CommOutput(chan, msg)
|
||||
for msg in msgs
|
||||
" remove prefixed NL
|
||||
if msg[0] == "\n"
|
||||
if msg != ''
|
||||
let msg = msg[1:]
|
||||
endif
|
||||
|
||||
if s:parsing_disasm_msg
|
||||
call s:HandleDisasmMsg(msg)
|
||||
elseif msg != ''
|
||||
if msg =~ '^\(\*stopped\|\*running\|=thread-selected\)'
|
||||
@@ -631,6 +719,9 @@ func s:CommOutput(chan, msg)
|
||||
call s:HandleProgramRun(msg)
|
||||
elseif msg =~ '^\^done,value='
|
||||
call s:HandleEvaluate(msg)
|
||||
elseif msg =~ '^\^error,msg='
|
||||
call s:HandleError(msg)
|
||||
elseif msg =~ '^disassemble'
|
||||
let s:parsing_disasm_msg = 1
|
||||
let s:asm_lines = []
|
||||
endif
|
||||
@@ -671,6 +762,7 @@ func s:InstallCommands()
|
||||
|
||||
command -range -nargs=* Evaluate call s:Evaluate(<range>, <q-args>)
|
||||
command Gdb call win_gotoid(s:gdbwin)
|
||||
command Program call s:GotoProgram()
|
||||
command Source call s:GotoSourcewinOrCreateIt()
|
||||
command Asm call s:GotoAsmwinOrCreateIt()
|
||||
command Winbar call s:InstallWinbar()
|
||||
@@ -724,6 +816,7 @@ func s:DeleteCommands()
|
||||
delcommand Continue
|
||||
delcommand Evaluate
|
||||
delcommand Gdb
|
||||
delcommand Program
|
||||
delcommand Source
|
||||
delcommand Asm
|
||||
delcommand Winbar
|
||||
@@ -923,6 +1016,48 @@ func s:GotoSourcewinOrCreateIt()
|
||||
let s:sourcewin = win_getid(winnr())
|
||||
call s:InstallWinbar()
|
||||
endif
|
||||
endfunc
|
||||
|
||||
func s:GotoAsmwinOrCreateIt()
|
||||
if !win_gotoid(s:asmwin)
|
||||
if win_gotoid(s:sourcewin)
|
||||
exe 'rightbelow new'
|
||||
else
|
||||
exe 'new'
|
||||
endif
|
||||
|
||||
let s:asmwin = win_getid(winnr())
|
||||
|
||||
setlocal nowrap
|
||||
setlocal number
|
||||
setlocal noswapfile
|
||||
setlocal buftype=nofile
|
||||
|
||||
let asmbuf = bufnr('Termdebug-asm-listing')
|
||||
if asmbuf > 0
|
||||
exe 'buffer' . asmbuf
|
||||
else
|
||||
exe 'file Termdebug-asm-listing'
|
||||
endif
|
||||
|
||||
if exists('g:termdebug_disasm_window')
|
||||
if g:termdebug_disasm_window > 1
|
||||
exe 'resize ' . g:termdebug_disasm_window
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
if s:asm_addr != ''
|
||||
let lnum = search('^' . s:asm_addr)
|
||||
if lnum == 0
|
||||
if s:stopped
|
||||
call s:SendCommand('disassemble $pc')
|
||||
endif
|
||||
else
|
||||
exe 'sign unplace ' . s:asm_id
|
||||
exe 'sign place ' . s:asm_id . ' line=' . lnum . ' name=debugPC'
|
||||
endif
|
||||
endif
|
||||
endfunc
|
||||
|
||||
" Handle stopping and running message from gdb.
|
||||
@@ -941,6 +1076,27 @@ func s:HandleCursor(msg)
|
||||
if a:msg =~ 'fullname='
|
||||
let fname = s:GetFullname(a:msg)
|
||||
else
|
||||
let fname = ''
|
||||
endif
|
||||
|
||||
if a:msg =~ 'addr='
|
||||
let asm_addr = s:GetAsmAddr(a:msg)
|
||||
if asm_addr != ''
|
||||
let s:asm_addr = asm_addr
|
||||
|
||||
let curwinid = win_getid(winnr())
|
||||
if win_gotoid(s:asmwin)
|
||||
let lnum = search('^' . s:asm_addr)
|
||||
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'
|
||||
endif
|
||||
|
||||
call win_gotoid(curwinid)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
if a:msg =~ '^\(\*stopped\|=thread-selected\)' && filereadable(fname)
|
||||
|
||||
@@ -182,6 +182,14 @@ if s:line1 =~# "^#!"
|
||||
elseif s:name =~# 'clojure'
|
||||
set ft=clojure
|
||||
|
||||
" Free Pascal
|
||||
elseif s:name =~# 'instantfpc\>'
|
||||
set ft=pascal
|
||||
|
||||
" Fennel
|
||||
elseif s:name =~# 'fennel\>'
|
||||
set ft=fennel
|
||||
|
||||
endif
|
||||
unlet s:name
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim ABAP syntax file
|
||||
" Language: SAP - ABAP/R4
|
||||
" Maintainer: Marius Piedallu van Wyk <lailoken@gmail.com>
|
||||
" Last Change: 2018 Dec 12
|
||||
" Last Change: 2021 Jan 02
|
||||
" Comment: Thanks to EPI-USE Labs for all your assistance. :)
|
||||
|
||||
" Quit when a syntax file was already loaded
|
||||
@@ -193,4 +193,4 @@ hi def link abapHex Number
|
||||
|
||||
let b:current_syntax = "abap"
|
||||
|
||||
" vim: ts=8 sw=2
|
||||
" vim: ts=8 sw=2
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
" Vim syntax file
|
||||
" Language: BASIC
|
||||
" Maintainer: Allan Kelly <allan@fruitloaf.co.uk>
|
||||
" Last Change: 2011 Dec 25 by Thilo Six
|
||||
" Language: BASIC
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Previous Maintainer: Allan Kelly <allan@fruitloaf.co.uk>
|
||||
" Contributors: Thilo Six
|
||||
" Last Change: 2015 Jan 10
|
||||
|
||||
" First version based on Micro$soft QBASIC circa 1989, as documented in
|
||||
" 'Learn BASIC Now' by Halvorson&Rygmyr. Microsoft Press 1989.
|
||||
" This syntax file not a complete implementation yet. Send suggestions to the
|
||||
" maintainer.
|
||||
|
||||
" quit when a syntax file was already loaded
|
||||
" Prelude {{{1
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
@@ -16,7 +18,7 @@ endif
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" A bunch of useful BASIC keywords
|
||||
" Keywords {{{1
|
||||
syn keyword basicStatement BEEP beep Beep BLOAD bload Bload BSAVE bsave Bsave
|
||||
syn keyword basicStatement CALL call Call ABSOLUTE absolute Absolute
|
||||
syn keyword basicStatement CHAIN chain Chain CHDIR chdir Chdir
|
||||
@@ -116,32 +118,39 @@ syn keyword basicFunction RIGHT$ right$ Right$ RTRIM$ rtrim$ Rtrim$
|
||||
syn keyword basicFunction SPACE$ space$ Space$ STR$ str$ Str$
|
||||
syn keyword basicFunction STRING$ string$ String$ TIME$ time$ Time$
|
||||
syn keyword basicFunction UCASE$ ucase$ Ucase$ VARPTR$ varptr$ Varptr$
|
||||
syn keyword basicTodo contained TODO
|
||||
|
||||
"integer number, or floating point number without a dot.
|
||||
" Numbers {{{1
|
||||
" Integer number, or floating point number without a dot.
|
||||
syn match basicNumber "\<\d\+\>"
|
||||
"floating point number, with dot
|
||||
" Floating point number, with dot
|
||||
syn match basicNumber "\<\d\+\.\d*\>"
|
||||
"floating point number, starting with a dot
|
||||
" Floating point number, starting with a dot
|
||||
syn match basicNumber "\.\d\+\>"
|
||||
|
||||
" String and Character contstants
|
||||
syn match basicSpecial contained "\\\d\d\d\|\\."
|
||||
syn region basicString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=basicSpecial
|
||||
" String and Character constants {{{1
|
||||
syn match basicSpecial "\\\d\d\d\|\\." contained
|
||||
syn region basicString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=basicSpecial
|
||||
|
||||
syn region basicComment start="REM" end="$" contains=basicTodo
|
||||
syn region basicComment start="^[ \t]*'" end="$" contains=basicTodo
|
||||
" Line numbers {{{1
|
||||
syn region basicLineNumber start="^\d" end="\s"
|
||||
syn match basicTypeSpecifier "[a-zA-Z0-9][\$%&!#]"ms=s+1
|
||||
|
||||
" Data-type suffixes {{{1
|
||||
syn match basicTypeSpecifier "[a-zA-Z0-9][$%&!#]"ms=s+1
|
||||
" Used with OPEN statement
|
||||
syn match basicFilenumber "#\d\+"
|
||||
"syn sync ccomment basicComment
|
||||
|
||||
" Mathematical operators {{{1
|
||||
" syn match basicMathsOperator "[<>+\*^/\\=-]"
|
||||
syn match basicMathsOperator "-\|=\|[:<>+\*^/\\]\|AND\|OR"
|
||||
syn match basicMathsOperator "-\|=\|[:<>+\*^/\\]\|AND\|OR"
|
||||
|
||||
" Define the default highlighting.
|
||||
" Only when an item doesn't have highlighting yet
|
||||
" Comments {{{1
|
||||
syn keyword basicTodo TODO FIXME XXX NOTE contained
|
||||
syn region basicComment start="^\s*\zsREM\>" start="\%(:\s*\)\@<=REM\>" end="$" contains=basicTodo
|
||||
syn region basicComment start="'" end="$" contains=basicTodo
|
||||
|
||||
"syn sync ccomment basicComment
|
||||
|
||||
" Default Highlighting {{{1
|
||||
hi def link basicLabel Label
|
||||
hi def link basicConditional Conditional
|
||||
hi def link basicRepeat Repeat
|
||||
@@ -150,17 +159,18 @@ hi def link basicNumber Number
|
||||
hi def link basicError Error
|
||||
hi def link basicStatement Statement
|
||||
hi def link basicString String
|
||||
hi def link basicComment Comment
|
||||
hi def link basicSpecial Special
|
||||
hi def link basicComment Comment
|
||||
hi def link basicSpecial Special
|
||||
hi def link basicTodo Todo
|
||||
hi def link basicFunction Identifier
|
||||
hi def link basicTypeSpecifier Type
|
||||
hi def link basicFilenumber basicTypeSpecifier
|
||||
hi def link basicFunction Identifier
|
||||
hi def link basicTypeSpecifier Type
|
||||
hi def link basicFilenumber basicTypeSpecifier
|
||||
"hi basicMathsOperator term=bold cterm=bold gui=bold
|
||||
|
||||
|
||||
" Postscript {{{1
|
||||
let b:current_syntax = "basic"
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
" vim: ts=8
|
||||
|
||||
" vim: nowrap sw=2 sts=2 ts=8 noet fdm=marker:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: C
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2020 Aug 28
|
||||
" Last Change: 2021 Jan 11
|
||||
|
||||
" Quit when a (custom) syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
@@ -13,6 +13,9 @@ set cpo&vim
|
||||
|
||||
let s:ft = matchstr(&ft, '^\([^.]\)\+')
|
||||
|
||||
" check if this was included from cpp.vim
|
||||
let s:in_cpp_family = exists("b:filetype_in_cpp_family")
|
||||
|
||||
" Optional embedded Autodoc parsing
|
||||
" To enable it add: let g:c_autodoc = 1
|
||||
" to your .vimrc
|
||||
@@ -55,7 +58,7 @@ if !exists("c_no_cformat")
|
||||
endif
|
||||
|
||||
" cCppString: same as cString, but ends at end of line
|
||||
if s:ft ==# "cpp" && !exists("cpp_no_cpp11") && !exists("c_no_cformat")
|
||||
if s:in_cpp_family && !exists("cpp_no_cpp11") && !exists("c_no_cformat")
|
||||
" ISO C++11
|
||||
syn region cString start=+\(L\|u\|u8\|U\|R\|LR\|u8R\|uR\|UR\)\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend
|
||||
syn region cCppString start=+\(L\|u\|u8\|U\|R\|LR\|u8R\|uR\|UR\)\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell
|
||||
@@ -87,7 +90,7 @@ syn match cSpecialCharacter display "L\='\\\o\{1,3}'"
|
||||
syn match cSpecialCharacter display "'\\x\x\{1,2}'"
|
||||
syn match cSpecialCharacter display "L'\\x\x\+'"
|
||||
|
||||
if (s:ft ==# "c" && !exists("c_no_c11")) || (s:ft ==# "cpp" && !exists("cpp_no_cpp11"))
|
||||
if (s:ft ==# "c" && !exists("c_no_c11")) || (s:in_cpp_family && !exists("cpp_no_cpp11"))
|
||||
" ISO C11 or ISO C++ 11
|
||||
if exists("c_no_cformat")
|
||||
syn region cString start=+\%(U\|u8\=\)"+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,@Spell extend
|
||||
@@ -130,7 +133,7 @@ endif
|
||||
" But avoid matching <::.
|
||||
syn cluster cParenGroup contains=cParenError,cIncluded,cSpecial,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cUserLabel,cBitField,cOctalZero,@cCppOutInGroup,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom
|
||||
if exists("c_no_curly_error")
|
||||
if s:ft ==# 'cpp' && !exists("cpp_no_cpp11")
|
||||
if s:in_cpp_family && !exists("cpp_no_cpp11")
|
||||
syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,@cStringGroup,@Spell
|
||||
" cCppParen: same as cParen but ends at end-of-line; used in cDefine
|
||||
syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell
|
||||
@@ -144,7 +147,7 @@ if exists("c_no_curly_error")
|
||||
syn match cErrInParen display contained "^[{}]\|^<%\|^%>"
|
||||
endif
|
||||
elseif exists("c_no_bracket_error")
|
||||
if s:ft ==# 'cpp' && !exists("cpp_no_cpp11")
|
||||
if s:in_cpp_family && !exists("cpp_no_cpp11")
|
||||
syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,@cStringGroup,@Spell
|
||||
" cCppParen: same as cParen but ends at end-of-line; used in cDefine
|
||||
syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell
|
||||
@@ -158,7 +161,7 @@ elseif exists("c_no_bracket_error")
|
||||
syn match cErrInParen display contained "[{}]\|<%\|%>"
|
||||
endif
|
||||
else
|
||||
if s:ft ==# 'cpp' && !exists("cpp_no_cpp11")
|
||||
if s:in_cpp_family && !exists("cpp_no_cpp11")
|
||||
syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,cErrInBracket,cCppBracket,@cStringGroup,@Spell
|
||||
" cCppParen: same as cParen but ends at end-of-line; used in cDefine
|
||||
syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cErrInBracket,cParen,cBracket,cString,@Spell
|
||||
@@ -278,7 +281,7 @@ syn keyword cStorageClass static register auto volatile extern const
|
||||
if exists("c_gnu")
|
||||
syn keyword cStorageClass inline __attribute__
|
||||
endif
|
||||
if !exists("c_no_c99") && s:ft !=# 'cpp'
|
||||
if !exists("c_no_c99") && !s:in_cpp_family
|
||||
syn keyword cStorageClass inline restrict
|
||||
endif
|
||||
if !exists("c_no_c11")
|
||||
@@ -420,7 +423,7 @@ endif
|
||||
syn cluster cLabelGroup contains=cUserLabel
|
||||
syn match cUserCont display "^\s*\zs\I\i*\s*:$" contains=@cLabelGroup
|
||||
syn match cUserCont display ";\s*\zs\I\i*\s*:$" contains=@cLabelGroup
|
||||
if s:ft ==# 'cpp'
|
||||
if s:in_cpp_family
|
||||
syn match cUserCont display "^\s*\zs\%(class\|struct\|enum\)\@!\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
|
||||
syn match cUserCont display ";\s*\zs\%(class\|struct\|enum\)\@!\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
|
||||
else
|
||||
|
||||
@@ -2,13 +2,16 @@
|
||||
" Language: C++
|
||||
" Current Maintainer: vim-jp (https://github.com/vim-jp/vim-cpp)
|
||||
" Previous Maintainer: Ken Shan <ccshan@post.harvard.edu>
|
||||
" Last Change: 2019 Dec 18
|
||||
" Last Change: 2021 Jan 12
|
||||
|
||||
" quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
" inform C syntax that the file was included from cpp.vim
|
||||
let b:filetype_in_cpp_family = 1
|
||||
|
||||
" Read the C syntax to start with
|
||||
runtime! syntax/c.vim
|
||||
unlet b:current_syntax
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: Diff (context or unified)
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Translations by Jakson Alves de Aquino.
|
||||
" Last Change: 2020 Dec 07
|
||||
" Last Change: 2020 Dec 30
|
||||
|
||||
" Quit when a (custom) syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
@@ -348,11 +348,16 @@ syn match diffLine "^\d\+\(,\d\+\)\=[cda]\d\+\>.*"
|
||||
syn match diffFile "^diff\>.*"
|
||||
syn match diffFile "^Index: .*"
|
||||
syn match diffFile "^==== .*"
|
||||
" Old style diff uses *** for old and --- for new.
|
||||
" Unified diff uses --- for old and +++ for new; names are wrong but it works.
|
||||
syn match diffOldFile "^+++ .*"
|
||||
syn match diffOldFile "^\*\*\* .*"
|
||||
syn match diffNewFile "^--- .*"
|
||||
|
||||
if search('^@@ -\S\+ +\S\+ @@', 'nw', '', 100)
|
||||
" unified
|
||||
syn match diffOldFile "^--- .*"
|
||||
syn match diffNewFile "^+++ .*"
|
||||
else
|
||||
" context / old style
|
||||
syn match diffOldFile "^\*\*\* .*"
|
||||
syn match diffNewFile "^--- .*"
|
||||
endif
|
||||
|
||||
" Used by git
|
||||
syn match diffIndexLine "^index \x\x\x\x.*"
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
" Vim syntax file
|
||||
" Language: Dune buildsystem
|
||||
" Maintainer: Markus Mottl <markus.mottl@gmail.com>
|
||||
" Anton Kochkov <anton.kochkov@gmail.com>
|
||||
" URL: https://github.com/rgrinberg/vim-ocaml
|
||||
" URL: https://github.com/ocaml/vim-ocaml
|
||||
" Last Change:
|
||||
" 2019 Feb 27 - Add newer keywords to the syntax (Simon Cruanes)
|
||||
" 2018 May 8 - Check current_syntax (Kawahara Satoru)
|
||||
@@ -28,7 +29,7 @@ syn keyword lispKey ppx_runtime_libraries virtual_deps js_of_ocaml link_flags
|
||||
syn keyword lispKey javascript_files flags ocamlc_flags ocamlopt_flags pps staged_pps
|
||||
syn keyword lispKey library_flags c_flags c_library_flags kind package action
|
||||
syn keyword lispKey deps targets locks fallback
|
||||
syn keyword lispKey inline_tests tests names
|
||||
syn keyword lispKey inline_tests tests test names
|
||||
|
||||
syn keyword lispAtom true false
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
" Vim syntax file
|
||||
" Language: fstab file
|
||||
" Maintainer: Radu Dineiu <radu.dineiu@gmail.com>
|
||||
" URL: https://raw.github.com/rid9/vim-fstab/master/fstab.vim
|
||||
" Last Change: 2020 Aug 06
|
||||
" URL: https://raw.github.com/rid9/vim-fstab/master/syntax/fstab.vim
|
||||
" Last Change: 2020 Dec 30
|
||||
" Version: 1.4
|
||||
"
|
||||
" Credits:
|
||||
|
||||
216
runtime/syntax/gift.vim
Normal file
216
runtime/syntax/gift.vim
Normal file
@@ -0,0 +1,216 @@
|
||||
" Vim syntax file
|
||||
"
|
||||
" Language: Moodle GIFT (General Import Format Template)
|
||||
" Maintainer: Selim Temizer (http://selimtemizer.com)
|
||||
" Creation: November 28, 2020
|
||||
" Latest Revision: December 21, 2020
|
||||
" Note: The order of entities in this file is important!
|
||||
|
||||
if version < 600
|
||||
syntax clear
|
||||
elseif exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
|
||||
setlocal conceallevel=1
|
||||
|
||||
"-----------------------------------------------
|
||||
" GIFT entities
|
||||
|
||||
syn match giftS "\~" contained "GIFT special characters
|
||||
syn match giftS "=" contained
|
||||
syn match giftS "#" contained
|
||||
syn match giftS "{" contained
|
||||
syn match giftS "}" contained
|
||||
syn match giftS ":" contained
|
||||
|
||||
syn match giftES "\\\~" contained conceal cchar=~ "GIFT escaped special characters
|
||||
syn match giftES "\\=" contained conceal cchar==
|
||||
syn match giftES "\\#" contained conceal cchar=#
|
||||
syn match giftES "\\{" contained conceal cchar={
|
||||
syn match giftES "\\}" contained conceal cchar=}
|
||||
syn match giftES "\\:" contained conceal cchar=:
|
||||
|
||||
syn match giftEN "\\n" contained conceal cchar=n "GIFT escaped newline
|
||||
|
||||
syn match giftFormat "\[html]" contained "GIFT formats
|
||||
syn match giftFormat "\[plain]" contained
|
||||
syn match giftFormat "\[moodle]" contained
|
||||
syn match giftFormat "\[markdown]" contained
|
||||
|
||||
"--------------------------------------------------------
|
||||
" HTML entities
|
||||
|
||||
syn match giftH "<" contained "HTML characters that might need to be handled/escaped
|
||||
syn match giftH ">" contained
|
||||
syn match giftH "&" contained
|
||||
|
||||
syn match giftEH "<" contained conceal cchar=< "HTML escaped characters
|
||||
syn match giftEH ">" contained conceal cchar=>
|
||||
syn match giftEH "&" contained conceal cchar=&
|
||||
syn match giftEH " " contained conceal cchar=_
|
||||
|
||||
"-------------------------------------------------------
|
||||
" Answer components: Feedback and general feedback
|
||||
|
||||
syn match giftFB "#\_.\{-}\(\_^\|[^\\]\)\ze\(=\|\~\|#\|####\|}\)" contained contains=giftF "Feedback block
|
||||
syn match giftF "#\zs\_.\{-}\(\_^\|[^\\]\)\ze\(=\|\~\|#\|####\|}\)" contained contains=@giftCEF "Feedback
|
||||
|
||||
syn match giftGFB "####\_.\{-}\(\_^\|[^\\]\)\ze}" contained contains=giftGF "General feedback block
|
||||
syn match giftGF "####\zs\_.\{-}\(\_^\|[^\\]\)\ze}" contained contains=@giftCEF "General feedback
|
||||
|
||||
"------------------------------------------------------
|
||||
" Answer components: Other components
|
||||
|
||||
syn keyword giftTF T TRUE F FALSE contained
|
||||
|
||||
syn match giftNum1 "[-+]\=[.0-9]\+" contained "Something matching a number
|
||||
|
||||
syn match giftNum2 "[-+]\=[.0-9]\+\s*:\s*[-+]\=[.0-9]\+" contained contains=giftNum2D "Number with error margin
|
||||
syn match giftNum2D ":" contained "Associated delimiter
|
||||
|
||||
syn match giftNum3 "[-+]\=[.0-9]\+\s*\.\.\s*[-+]\=[.0-9]\+" contained contains=giftNum3D "Number as min/max range
|
||||
syn match giftNum3D "\.\." contained "Associated delimiter
|
||||
|
||||
syn match giftWeightB "%-*[0-9]\{1,2}\.\?[0-9]*%" contained contains=giftWeight "Weight block
|
||||
syn match giftWeight "%\zs-*[0-9]\{1,2}\.\?[0-9]*\ze%" contained "Weight
|
||||
|
||||
"-----------------------------------------------------
|
||||
" Answer choices
|
||||
|
||||
syn match giftWrongNum "\~\zs\_.\{-}\(\_^\|[^\\]\)\ze\(####\|}\)" contained contains=@giftCEFF "Wrong numeric choice
|
||||
syn match giftRightNum "=\zs\_.\{-}\(\_^\|[^\\]\)\ze\(=\|\~\|####\|}\)" contained contains=@giftCEFFW,@giftNums "Right numeric choice
|
||||
|
||||
syn match giftWrong "\~\zs\_.\{-}\(\_^\|[^\\]\)\ze\(=\|\~\|####\|}\)" contained contains=@giftCEFFW "Wrong choice
|
||||
syn match giftRight "=\zs\_.\{-}\(\ze->\|\(\_^\|[^\\]\)\ze\(=\|\~\|####\|}\)\)" contained contains=@giftCEFFW "Right choice
|
||||
syn match giftMatchB "->\_.\{-}\(\_^\|[^\\]\)\ze\(=\|\~\|####\|}\)" contained contains=giftMatch "Match choice block
|
||||
syn match giftMatch "->\zs\_.\{-}\(\_^\|[^\\]\)\ze\(=\|\~\|####\|}\)" contained contains=@giftCE "Match choice
|
||||
|
||||
"----------------------------------------------------
|
||||
" Answer
|
||||
|
||||
syn match giftAnswer "{\_.\{-}\(\_^\|[^\\]\)}" contained keepend contains=@giftA "General answer
|
||||
syn match giftAnswer "{}" contained "Minimal answer
|
||||
|
||||
syn match giftAnswerNum "{\_[[:space:]]*#\_[^#]\_.\{-}\(\_^\|[^\\]\)}" contained keepend contains=@giftANum "Numeric answer
|
||||
syn match giftAnswerNumD "{\zs\_[[:space:]]*#" contained "Associated delimiter
|
||||
|
||||
"---------------------------------------------------
|
||||
" Question
|
||||
|
||||
" The first pattern matches the last question at the end of the file (in case there is no empty line coming after).
|
||||
" However, it slows down parsing (and especially scrolling up), therefore it is commented out.
|
||||
|
||||
"syn match giftQuestion "[^{[:space:]]\_.\{-}\%$" keepend contains=@giftCEF,giftAnswer,giftAnswerNum
|
||||
syn match giftQuestion "[^{[:space:]]\_.\{-}\n\(\s*\n\)\+" keepend contains=@giftCEF,giftAnswer,giftAnswerNum
|
||||
|
||||
"--------------------------------------------------
|
||||
" Question name
|
||||
|
||||
syn match giftName "::\_.\{-}::" contains=@giftCE,giftNameD "Question name
|
||||
syn match giftNameD "::" contained "Associated delimiter
|
||||
|
||||
"-------------------------------------------------
|
||||
" Category
|
||||
|
||||
syn match giftCategoryB "^\s*\$CATEGORY:.*\n\+" contains=giftCategory "Category block
|
||||
syn match giftCategory "^\s*\$CATEGORY:\zs.*\ze\n" contained "Category
|
||||
|
||||
"------------------------------------------------
|
||||
" Comments (may need to be the last entity)
|
||||
|
||||
syn keyword giftTodo FIXME TODO NOTE FIX XXX contained
|
||||
|
||||
syn match giftIdB "\[id:\(\\]\|[^][:cntrl:]]\)\+]" contained contains=giftId "Id block
|
||||
syn match giftId "\[id:\zs\(\\]\|[^][:cntrl:]]\)\+\ze]" contained "Id
|
||||
|
||||
syn match giftTagB "\[tag:\(\\]\|[^]<>`[:cntrl:]]\)\+]" contained contains=giftTag "Tag block
|
||||
syn match giftTag "\[tag:\zs\(\\]\|[^]<>`[:cntrl:]]\)\+\ze]" contained "Tag
|
||||
|
||||
syn match giftComment "^\s*//.*" contains=giftTodo,giftIdB,giftTagB
|
||||
|
||||
"-----------------------------------------------
|
||||
" Clusters
|
||||
|
||||
"Comments and entities (to be escaped)
|
||||
syn cluster giftCE contains=giftComment,giftS,giftES,giftEN,giftH,giftEH
|
||||
|
||||
"The above plus format
|
||||
syn cluster giftCEF contains=@giftCE,giftFormat
|
||||
|
||||
"The above plus feedback block
|
||||
syn cluster giftCEFF contains=@giftCEF,giftFB
|
||||
|
||||
"The above plus weight block
|
||||
syn cluster giftCEFFW contains=@giftCEFF,giftWeightB
|
||||
|
||||
"Possible numerical representations
|
||||
syn cluster giftNums contains=giftNum1,giftNum2,giftNum3
|
||||
|
||||
"Possible contents of answers
|
||||
syn cluster giftA contains=giftComment,giftTF,giftWrong,giftRight,giftMatchB,giftFB,giftGFB
|
||||
|
||||
"Possible contents of numerical answers
|
||||
syn cluster giftANum contains=giftAnswerNumD,giftComment,@giftNums,giftWrongNum,giftRightNum,giftFB,giftGFB
|
||||
|
||||
"-----------------------------------------------
|
||||
|
||||
let b:current_syntax = "gift"
|
||||
|
||||
"-----------------------------------------------
|
||||
|
||||
hi Conceal ctermbg=NONE ctermfg=Blue guibg=NONE guifg=Blue
|
||||
hi Feedback ctermbg=NONE ctermfg=DarkCyan guibg=NONE guifg=DarkCyan
|
||||
hi GFeedback ctermbg=NONE ctermfg=DarkGreen guibg=NONE guifg=DarkGreen
|
||||
hi WeightB ctermbg=NONE ctermfg=DarkYellow guibg=NONE guifg=DarkYellow
|
||||
|
||||
"-----------------------------------------------
|
||||
|
||||
hi def link giftS Error
|
||||
hi def link giftES Conceal
|
||||
hi def link giftEN Conceal
|
||||
hi def link giftFormat LineNr
|
||||
|
||||
hi def link giftH Error
|
||||
hi def link giftEH Conceal
|
||||
|
||||
hi def link giftFB PreProc
|
||||
hi def link giftF Feedback
|
||||
hi def link giftGFB Title
|
||||
hi def link giftGF GFeedback
|
||||
|
||||
hi def link giftTF Question
|
||||
hi def link giftNum1 Question
|
||||
hi def link giftNum2 Question
|
||||
hi def link giftNum2D Special
|
||||
hi def link giftNum3 Question
|
||||
hi def link giftNum3D Special
|
||||
hi def link giftWeightB WeightB
|
||||
hi def link giftWeight Identifier
|
||||
|
||||
hi def link giftWrongNum Constant
|
||||
hi def link giftRightNum Question
|
||||
hi def link giftWrong Constant
|
||||
hi def link giftRight Question
|
||||
hi def link giftMatchB ModeMsg
|
||||
hi def link giftMatch Constant
|
||||
|
||||
hi def link giftAnswer MoreMsg
|
||||
hi def link giftAnswerNum MoreMsg
|
||||
hi def link giftAnswerNumD Identifier
|
||||
|
||||
hi def link giftQuestion Identifier
|
||||
|
||||
hi def link giftName PreProc
|
||||
hi def link giftNameD Directory
|
||||
|
||||
hi def link giftCategoryB LineNr
|
||||
hi def link giftCategory Directory
|
||||
|
||||
hi def link giftTodo Todo
|
||||
hi def link giftIdB LineNr
|
||||
hi def link giftId Title
|
||||
hi def link giftTagB LineNr
|
||||
hi def link giftTag Constant
|
||||
hi def link giftComment Comment
|
||||
@@ -4,7 +4,7 @@
|
||||
" Maintainers: Markus Mottl <markus.mottl@gmail.com>
|
||||
" Karl-Heinz Sylla <Karl-Heinz.Sylla@gmd.de>
|
||||
" Issac Trotts <ijtrotts@ucdavis.edu>
|
||||
" URL: https://github.com/rgrinberg/vim-ocaml
|
||||
" URL: https://github.com/ocaml/vim-ocaml
|
||||
" Last Change:
|
||||
" 2018 Nov 08 - Improved highlighting of operators (Maëlan)
|
||||
" 2018 Apr 22 - Improved support for PPX (Andrey Popp)
|
||||
@@ -18,14 +18,20 @@
|
||||
" can be distinguished from begin/end, which is used for indentation,
|
||||
" and folding. (David Baelde)
|
||||
|
||||
" quit when a syntax file was already loaded
|
||||
" Quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax") && b:current_syntax == "ocaml"
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:keepcpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" ' can be used in OCaml identifiers
|
||||
setlocal iskeyword+='
|
||||
|
||||
" ` is part of the name of polymorphic variants
|
||||
setlocal iskeyword+=`
|
||||
|
||||
" OCaml is case sensitive.
|
||||
syn case match
|
||||
|
||||
@@ -123,7 +129,7 @@ syn region ocamlSig matchgroup=ocamlSigEncl start="\<sig\>" matchgroup=ocamlSi
|
||||
syn region ocamlModSpec matchgroup=ocamlKeyword start="\<module\>" matchgroup=ocamlModule end="\<\u\(\w\|'\)*\>" contained contains=@ocamlAllErrs,ocamlComment skipwhite skipempty nextgroup=ocamlModTRWith,ocamlMPRestr
|
||||
|
||||
" "open"
|
||||
syn region ocamlNone matchgroup=ocamlKeyword start="\<open\>" matchgroup=ocamlModule end="\<\u\(\w\|'\)*\( *\. *\u\(\w\|'\)*\)*\>" contains=@ocamlAllErrs,ocamlComment
|
||||
syn match ocamlKeyword "\<open\>" skipwhite skipempty nextgroup=ocamlFullMod
|
||||
|
||||
" "include"
|
||||
syn match ocamlKeyword "\<include\>" skipwhite skipempty nextgroup=ocamlModParam,ocamlFullMod
|
||||
@@ -225,7 +231,18 @@ syn match ocamlStar "*"
|
||||
syn match ocamlAngle "<"
|
||||
syn match ocamlAngle ">"
|
||||
" Custom indexing operators:
|
||||
syn match ocamlIndexingOp "\.[~?!:|&$%=>@^/*+-][~?!.:|&$%<=>@^*/+-]*\(()\|\[]\|{}\)\(<-\)\?"
|
||||
syn region ocamlIndexing matchgroup=ocamlIndexingOp
|
||||
\ start="\.[~?!:|&$%=>@^/*+-][~?!.:|&$%<=>@^*/+-]*\_s*("
|
||||
\ end=")\(\_s*<-\)\?"
|
||||
\ contains=ALLBUT,@ocamlContained,ocamlParenErr
|
||||
syn region ocamlIndexing matchgroup=ocamlIndexingOp
|
||||
\ start="\.[~?!:|&$%=>@^/*+-][~?!.:|&$%<=>@^*/+-]*\_s*\["
|
||||
\ end="]\(\_s*<-\)\?"
|
||||
\ contains=ALLBUT,@ocamlContained,ocamlBrackErr
|
||||
syn region ocamlIndexing matchgroup=ocamlIndexingOp
|
||||
\ start="\.[~?!:|&$%=>@^/*+-][~?!.:|&$%<=>@^*/+-]*\_s*{"
|
||||
\ end="}\(\_s*<-\)\?"
|
||||
\ contains=ALLBUT,@ocamlContained,ocamlBraceErr
|
||||
" Extension operators (has to be declared before regular infix operators):
|
||||
syn match ocamlExtensionOp "#[#~?!.:|&$%<=>@^*/+-]\+"
|
||||
" Infix and prefix operators:
|
||||
@@ -283,7 +300,6 @@ syn sync match ocamlSigSync grouphere ocamlSig "\<sig\>"
|
||||
syn sync match ocamlSigSync groupthere ocamlSig "\<end\>"
|
||||
|
||||
" Define the default highlighting.
|
||||
" Only when an item doesn't have highlighting yet
|
||||
|
||||
hi def link ocamlBraceErr Error
|
||||
hi def link ocamlBrackErr Error
|
||||
@@ -308,14 +324,17 @@ hi def link ocamlModPath Include
|
||||
hi def link ocamlObject Include
|
||||
hi def link ocamlModule Include
|
||||
hi def link ocamlModParam1 Include
|
||||
hi def link ocamlGenMod Include
|
||||
hi def link ocamlModType Include
|
||||
hi def link ocamlMPRestr3 Include
|
||||
hi def link ocamlFullMod Include
|
||||
hi def link ocamlFuncWith Include
|
||||
hi def link ocamlModParam Include
|
||||
hi def link ocamlModTypeRestr Include
|
||||
hi def link ocamlWith Include
|
||||
hi def link ocamlMTDef Include
|
||||
hi def link ocamlSigEncl ocamlModule
|
||||
hi def link ocamlStructEncl ocamlModule
|
||||
hi def link ocamlSigEncl ocamlModule
|
||||
hi def link ocamlStructEncl ocamlModule
|
||||
|
||||
hi def link ocamlScript Include
|
||||
|
||||
@@ -326,24 +345,25 @@ hi def link ocamlModPreRHS Keyword
|
||||
hi def link ocamlMPRestr2 Keyword
|
||||
hi def link ocamlKeyword Keyword
|
||||
hi def link ocamlMethod Include
|
||||
hi def link ocamlArrow Keyword
|
||||
hi def link ocamlKeyChar Keyword
|
||||
hi def link ocamlAnyVar Keyword
|
||||
hi def link ocamlTopStop Keyword
|
||||
|
||||
hi def link ocamlRefAssign ocamlKeyChar
|
||||
hi def link ocamlEqual ocamlKeyChar
|
||||
hi def link ocamlStar ocamlInfixOp
|
||||
hi def link ocamlAngle ocamlInfixOp
|
||||
hi def link ocamlCons ocamlInfixOp
|
||||
hi def link ocamlRefAssign ocamlKeyChar
|
||||
hi def link ocamlEqual ocamlKeyChar
|
||||
hi def link ocamlStar ocamlInfixOp
|
||||
hi def link ocamlAngle ocamlInfixOp
|
||||
hi def link ocamlCons ocamlInfixOp
|
||||
|
||||
hi def link ocamlPrefixOp ocamlOperator
|
||||
hi def link ocamlInfixOp ocamlOperator
|
||||
hi def link ocamlExtensionOp ocamlOperator
|
||||
hi def link ocamlIndexingOp ocamlOperator
|
||||
hi def link ocamlPrefixOp ocamlOperator
|
||||
hi def link ocamlInfixOp ocamlOperator
|
||||
hi def link ocamlExtensionOp ocamlOperator
|
||||
hi def link ocamlIndexingOp ocamlOperator
|
||||
|
||||
if exists("ocaml_highlight_operators")
|
||||
hi def link ocamlInfixOpKeyword ocamlOperator
|
||||
hi def link ocamlOperator Operator
|
||||
hi def link ocamlOperator Operator
|
||||
else
|
||||
hi def link ocamlInfixOpKeyword Keyword
|
||||
endif
|
||||
@@ -353,7 +373,7 @@ hi def link ocamlCharacter Character
|
||||
hi def link ocamlNumber Number
|
||||
hi def link ocamlFloat Float
|
||||
hi def link ocamlString String
|
||||
hi def link ocamlQuotedStringDelim Identifier
|
||||
hi def link ocamlQuotedStringDelim Identifier
|
||||
|
||||
hi def link ocamlLabel Identifier
|
||||
|
||||
@@ -363,8 +383,11 @@ hi def link ocamlTodo Todo
|
||||
|
||||
hi def link ocamlEncl Keyword
|
||||
|
||||
hi def link ocamlPpxEncl ocamlEncl
|
||||
hi def link ocamlPpxEncl ocamlEncl
|
||||
|
||||
let b:current_syntax = "ocaml"
|
||||
|
||||
let &cpo = s:keepcpo
|
||||
unlet s:keepcpo
|
||||
|
||||
" vim: ts=8
|
||||
|
||||
38
runtime/syntax/opam.vim
Normal file
38
runtime/syntax/opam.vim
Normal file
@@ -0,0 +1,38 @@
|
||||
" Vim syntax file
|
||||
" Language: OPAM - OCaml package manager
|
||||
" Maintainer: Markus Mottl <markus.mottl@gmail.com>
|
||||
" URL: https://github.com/ocaml/vim-ocaml
|
||||
" Last Change:
|
||||
" 2020 Dec 31 - Added header (Markus Mottl)
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
" need %{vars}%
|
||||
" env: [[CAML_LD_LIBRARY_PATH = "%{lib}%/stublibs"]]
|
||||
syn keyword opamKeyword1 remove depends pin-depends depopts conflicts env packages patches version maintainer tags license homepage authors doc install author available name depexts substs synopsis description
|
||||
syn match opamKeyword2 "\v(bug-reports|post-messages|ocaml-version|opam-version|dev-repo|build-test|build-doc|build)"
|
||||
|
||||
syn keyword opamTodo FIXME NOTE NOTES TODO XXX contained
|
||||
syn match opamComment "#.*$" contains=opamTodo,@Spell
|
||||
syn match opamOperator ">\|<\|=\|<=\|>="
|
||||
|
||||
syn region opamInterpolate start=/%{/ end=/}%/ contained
|
||||
syn region opamString start=/"/ end=/"/ contains=opamInterpolate
|
||||
syn region opamSeq start=/\[/ end=/\]/ contains=ALLBUT,opamKeyword1,opamKeyword2
|
||||
syn region opamExp start=/{/ end=/}/ contains=ALLBUT,opamKeyword1,opamKeyword2
|
||||
|
||||
hi link opamKeyword1 Keyword
|
||||
hi link opamKeyword2 Keyword
|
||||
|
||||
hi link opamString String
|
||||
hi link opamExp Function
|
||||
hi link opamSeq Statement
|
||||
hi link opamOperator Operator
|
||||
hi link opamComment Comment
|
||||
hi link opamInterpolate Identifier
|
||||
|
||||
let b:current_syntax = "opam"
|
||||
|
||||
" vim: ts=2 sw=2
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: PROLOG
|
||||
" Maintainer: Anton Kochkov <anton.kochkov@gmail.com>
|
||||
" Last Change: 2019 Aug 29
|
||||
" Last Change: 2021 Jan 05
|
||||
|
||||
" There are two sets of highlighting in here:
|
||||
" If the "prolog_highlighting_clean" variable exists, it is rather sparse.
|
||||
@@ -21,16 +21,16 @@ syn case match
|
||||
" Very simple highlighting for comments, clause heads and
|
||||
" character codes. It respects prolog strings and atoms.
|
||||
|
||||
syn region prologCComment start=+/\*+ end=+\*/+
|
||||
syn match prologComment +%.*+
|
||||
syn region prologCComment start=+/\*+ end=+\*/+ contains=@Spell
|
||||
syn match prologComment +%.*+ contains=@Spell
|
||||
|
||||
if !exists("prolog_highlighting_no_keyword")
|
||||
syn keyword prologKeyword module meta_predicate multifile dynamic
|
||||
endif
|
||||
syn match prologCharCode +0'\\\=.+
|
||||
syn region prologString start=+"+ skip=+\\\\\|\\"+ end=+"+
|
||||
syn region prologString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell
|
||||
syn region prologAtom start=+'+ skip=+\\\\\|\\'+ end=+'+
|
||||
syn region prologClause matchgroup=prologClauseHead start=+^\s*[a-z]\w*+ matchgroup=Normal end=+\.\s\|\.$+ contains=ALLBUT,prologClause
|
||||
syn region prologClause matchgroup=prologClauseHead start=+^\s*[a-z]\w*+ matchgroup=Normal end=+\.\s\|\.$+ contains=ALLBUT,prologClause contains=@NoSpell
|
||||
|
||||
if !exists("prolog_highlighting_clean")
|
||||
|
||||
|
||||
88
runtime/syntax/sexplib.vim
Normal file
88
runtime/syntax/sexplib.vim
Normal file
@@ -0,0 +1,88 @@
|
||||
" Vim syntax file
|
||||
" Language: S-expressions as used in Sexplib
|
||||
" Filenames: *.sexp
|
||||
" Maintainers: Markus Mottl <markus.mottl@gmail.com>
|
||||
" URL: https://github.com/ocaml/vim-ocaml
|
||||
" Last Change: 2020 Dec 31 - Updated header for Vim contribution (MM)
|
||||
" 2017 Apr 11 - Improved matching of negative numbers (MM)
|
||||
" 2012 Jun 20 - Fixed a block comment highlighting bug (MM)
|
||||
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
if version < 600
|
||||
syntax clear
|
||||
elseif exists("b:current_syntax") && b:current_syntax == "sexplib"
|
||||
finish
|
||||
endif
|
||||
|
||||
" Sexplib is case sensitive.
|
||||
syn case match
|
||||
|
||||
" Comments
|
||||
syn keyword sexplibTodo contained TODO FIXME XXX NOTE
|
||||
syn region sexplibBlockComment matchgroup=sexplibComment start="#|" matchgroup=sexplibComment end="|#" contains=ALLBUT,sexplibQuotedAtom,sexplibUnquotedAtom,sexplibEncl,sexplibComment
|
||||
syn match sexplibSexpComment "#;" skipwhite skipempty nextgroup=sexplibQuotedAtomComment,sexplibUnquotedAtomComment,sexplibListComment,sexplibComment
|
||||
syn region sexplibQuotedAtomComment start=+"+ skip=+\\\\\|\\"+ end=+"+ contained
|
||||
syn match sexplibUnquotedAtomComment /\([^;()" \t#|]\|#[^;()" \t|]\||[^;()" \t#]\)[^;()" \t]*/ contained
|
||||
syn region sexplibListComment matchgroup=sexplibComment start="(" matchgroup=sexplibComment end=")" contained contains=ALLBUT,sexplibEncl,sexplibString,sexplibQuotedAtom,sexplibUnquotedAtom,sexplibTodo,sexplibNumber,sexplibFloat
|
||||
syn match sexplibComment ";.*" contains=sexplibTodo
|
||||
|
||||
" Atoms
|
||||
syn match sexplibUnquotedAtom /\([^;()" \t#|]\|#[^;()" \t|]\||[^;()" \t#]\)[^;()" \t]*/
|
||||
syn region sexplibQuotedAtom start=+"+ skip=+\\\\\|\\"+ end=+"+
|
||||
syn match sexplibNumber "-\=\<\d\(_\|\d\)*[l|L|n]\?\>"
|
||||
syn match sexplibNumber "-\=\<0[x|X]\(\x\|_\)\+[l|L|n]\?\>"
|
||||
syn match sexplibNumber "-\=\<0[o|O]\(\o\|_\)\+[l|L|n]\?\>"
|
||||
syn match sexplibNumber "-\=\<0[b|B]\([01]\|_\)\+[l|L|n]\?\>"
|
||||
syn match sexplibFloat "-\=\<\d\(_\|\d\)*\.\?\(_\|\d\)*\([eE][-+]\=\d\(_\|\d\)*\)\=\>"
|
||||
|
||||
" Lists
|
||||
syn region sexplibEncl transparent matchgroup=sexplibEncl start="(" matchgroup=sexplibEncl end=")" contains=ALLBUT,sexplibParenErr
|
||||
|
||||
" Errors
|
||||
syn match sexplibUnquotedAtomErr /\([^;()" \t#|]\|#[^;()" \t|]\||[^;()" \t#]\)[^;()" \t]*\(#|\||#\)[^;()" \t]*/
|
||||
syn match sexplibParenErr ")"
|
||||
|
||||
" Synchronization
|
||||
syn sync minlines=50
|
||||
syn sync maxlines=500
|
||||
|
||||
" Define the default highlighting.
|
||||
" For version 5.7 and earlier: only when not done already
|
||||
" For version 5.8 and later: only when an item doesn't have highlighting yet
|
||||
if version >= 508 || !exists("did_sexplib_syntax_inits")
|
||||
if version < 508
|
||||
let did_sexplib_syntax_inits = 1
|
||||
command -nargs=+ HiLink hi link <args>
|
||||
else
|
||||
command -nargs=+ HiLink hi def link <args>
|
||||
endif
|
||||
|
||||
HiLink sexplibParenErr Error
|
||||
HiLink sexplibUnquotedAtomErr Error
|
||||
|
||||
HiLink sexplibComment Comment
|
||||
HiLink sexplibSexpComment Comment
|
||||
HiLink sexplibQuotedAtomComment Include
|
||||
HiLink sexplibUnquotedAtomComment Comment
|
||||
HiLink sexplibBlockComment Comment
|
||||
HiLink sexplibListComment Comment
|
||||
|
||||
HiLink sexplibBoolean Boolean
|
||||
HiLink sexplibCharacter Character
|
||||
HiLink sexplibNumber Number
|
||||
HiLink sexplibFloat Float
|
||||
HiLink sexplibUnquotedAtom Identifier
|
||||
HiLink sexplibEncl Identifier
|
||||
HiLink sexplibQuotedAtom Keyword
|
||||
|
||||
HiLink sexplibTodo Todo
|
||||
|
||||
HiLink sexplibEncl Keyword
|
||||
|
||||
delcommand HiLink
|
||||
endif
|
||||
|
||||
let b:current_syntax = "sexplib"
|
||||
|
||||
" vim: ts=8
|
||||
@@ -3,13 +3,16 @@
|
||||
" Filenames: *.sml *.sig
|
||||
" Maintainers: Markus Mottl <markus.mottl@gmail.com>
|
||||
" Fabrizio Zeno Cornelli <zeno@filibusta.crema.unimi.it>
|
||||
" URL: http://www.ocaml.info/vim/syntax/sml.vim
|
||||
" Last Change: 2006 Oct 23 - Fixed character highlighting bug (MM)
|
||||
" 2002 Jun 02 - Fixed small typo (MM)
|
||||
" 2001 Nov 20 - Fixed small highlighting bug with modules (MM)
|
||||
" Last Change: 2019 Oct 01 - Only spell check strings & comments (Chuan Wei Foo)
|
||||
" 2015 Aug 31 - Fixed opening of modules (Ramana Kumar)
|
||||
" 2006 Oct 23 - Fixed character highlighting bug (MM)
|
||||
|
||||
" quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
|
||||
" Disable spell checking of syntax.
|
||||
syn spell notoplevel
|
||||
|
||||
finish
|
||||
endif
|
||||
|
||||
@@ -52,7 +55,7 @@ syn region smlEncl transparent matchgroup=smlKeyword start="#\[" matchgroup=sm
|
||||
|
||||
|
||||
" Comments
|
||||
syn region smlComment start="(\*" end="\*)" contains=smlComment,smlTodo
|
||||
syn region smlComment start="(\*" end="\*)" contains=smlComment,smlTodo,@Spell
|
||||
syn keyword smlTodo contained TODO FIXME XXX
|
||||
|
||||
|
||||
@@ -82,7 +85,7 @@ syn region smlSig matchgroup=smlModule start="\<sig\>" matchgroup=smlModule en
|
||||
syn region smlModSpec matchgroup=smlKeyword start="\<structure\>" matchgroup=smlModule end="\<\u\(\w\|'\)*\>" contained contains=@smlAllErrs,smlComment skipwhite skipempty nextgroup=smlModTRWith,smlMPRestr
|
||||
|
||||
" "open"
|
||||
syn region smlNone matchgroup=smlKeyword start="\<open\>" matchgroup=smlModule end="\<\u\(\w\|'\)*\(\.\u\(\w\|'\)*\)*\>" contains=@smlAllErrs,smlComment
|
||||
syn region smlNone matchgroup=smlKeyword start="\<open\>" matchgroup=smlModule end="\<\w\(\w\|'\)*\(\.\w\(\w\|'\)*\)*\>" contains=@smlAllErrs,smlComment
|
||||
|
||||
" "structure" - somewhat complicated stuff ;-)
|
||||
syn region smlModule matchgroup=smlKeyword start="\<\(structure\|functor\)\>" matchgroup=smlModule end="\<\u\(\w\|'\)*\>" contains=@smlAllErrs,smlComment skipwhite skipempty nextgroup=smlPreDef
|
||||
@@ -136,7 +139,7 @@ syn match smlModPath "\u\(\w\|'\)*\."he=e-1
|
||||
|
||||
syn match smlCharacter +#"\\""\|#"."\|#"\\\d\d\d"+
|
||||
syn match smlCharErr +#"\\\d\d"\|#"\\\d"+
|
||||
syn region smlString start=+"+ skip=+\\\\\|\\"+ end=+"+
|
||||
syn region smlString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell
|
||||
|
||||
syn match smlFunDef "=>"
|
||||
syn match smlRefAssign ":="
|
||||
@@ -149,9 +152,9 @@ syn match smlKeyChar ";"
|
||||
syn match smlKeyChar "\*"
|
||||
syn match smlKeyChar "="
|
||||
|
||||
syn match smlNumber "\<-\=\d\+\>"
|
||||
syn match smlNumber "\<-\=0[x|X]\x\+\>"
|
||||
syn match smlReal "\<-\=\d\+\.\d*\([eE][-+]\=\d\+\)\=[fl]\=\>"
|
||||
syn match smlNumber "\<-\=\d\+\>"
|
||||
syn match smlNumber "\<-\=0[x|X]\x\+\>"
|
||||
syn match smlReal "\<-\=\d\+\.\d*\([eE][-+]\=\d\+\)\=[fl]\=\>"
|
||||
|
||||
" Synchronization
|
||||
syn sync minlines=20
|
||||
@@ -167,49 +170,49 @@ syn sync match smlSigSync groupthere smlSig "\<end\>"
|
||||
" Define the default highlighting.
|
||||
" Only when an item doesn't have highlighting yet
|
||||
|
||||
hi def link smlBraceErr Error
|
||||
hi def link smlBrackErr Error
|
||||
hi def link smlParenErr Error
|
||||
hi def link smlBraceErr Error
|
||||
hi def link smlBrackErr Error
|
||||
hi def link smlParenErr Error
|
||||
|
||||
hi def link smlCommentErr Error
|
||||
hi def link smlCommentErr Error
|
||||
|
||||
hi def link smlEndErr Error
|
||||
hi def link smlThenErr Error
|
||||
hi def link smlEndErr Error
|
||||
hi def link smlThenErr Error
|
||||
|
||||
hi def link smlCharErr Error
|
||||
hi def link smlCharErr Error
|
||||
|
||||
hi def link smlComment Comment
|
||||
hi def link smlComment Comment
|
||||
|
||||
hi def link smlModPath Include
|
||||
hi def link smlModule Include
|
||||
hi def link smlModParam1 Include
|
||||
hi def link smlModType Include
|
||||
hi def link smlMPRestr3 Include
|
||||
hi def link smlFullMod Include
|
||||
hi def link smlModPath Include
|
||||
hi def link smlModule Include
|
||||
hi def link smlModParam1 Include
|
||||
hi def link smlModType Include
|
||||
hi def link smlMPRestr3 Include
|
||||
hi def link smlFullMod Include
|
||||
hi def link smlModTypeRestr Include
|
||||
hi def link smlWith Include
|
||||
hi def link smlMTDef Include
|
||||
hi def link smlWith Include
|
||||
hi def link smlMTDef Include
|
||||
|
||||
hi def link smlConstructor Constant
|
||||
|
||||
hi def link smlModPreRHS Keyword
|
||||
hi def link smlMPRestr2 Keyword
|
||||
hi def link smlKeyword Keyword
|
||||
hi def link smlFunDef Keyword
|
||||
hi def link smlRefAssign Keyword
|
||||
hi def link smlKeyChar Keyword
|
||||
hi def link smlAnyVar Keyword
|
||||
hi def link smlTopStop Keyword
|
||||
hi def link smlOperator Keyword
|
||||
hi def link smlModPreRHS Keyword
|
||||
hi def link smlMPRestr2 Keyword
|
||||
hi def link smlKeyword Keyword
|
||||
hi def link smlFunDef Keyword
|
||||
hi def link smlRefAssign Keyword
|
||||
hi def link smlKeyChar Keyword
|
||||
hi def link smlAnyVar Keyword
|
||||
hi def link smlTopStop Keyword
|
||||
hi def link smlOperator Keyword
|
||||
|
||||
hi def link smlBoolean Boolean
|
||||
hi def link smlCharacter Character
|
||||
hi def link smlNumber Number
|
||||
hi def link smlReal Float
|
||||
hi def link smlString String
|
||||
hi def link smlType Type
|
||||
hi def link smlTodo Todo
|
||||
hi def link smlEncl Keyword
|
||||
hi def link smlBoolean Boolean
|
||||
hi def link smlCharacter Character
|
||||
hi def link smlNumber Number
|
||||
hi def link smlReal Float
|
||||
hi def link smlString String
|
||||
hi def link smlType Type
|
||||
hi def link smlTodo Todo
|
||||
hi def link smlEncl Keyword
|
||||
|
||||
|
||||
let b:current_syntax = "sml"
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
" Vim syntax file
|
||||
" Language: HMTL Tidy configuration file (/etc/tidyrc ~/.tidyrc)
|
||||
" Language: HMTL Tidy Configuration
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2016 Apr 24
|
||||
" Last Change: 2020 Sep 4
|
||||
|
||||
" Preamble {{{1
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
@@ -12,10 +13,15 @@ set cpo&vim
|
||||
|
||||
syn iskeyword @,48-57,-,_
|
||||
|
||||
" Values {{{1
|
||||
syn match tidyWordSeparator contained ",\|\s" nextgroup=tidyWord skipwhite skipnl
|
||||
syn match tidyMuteIDSeparator contained ",\|\s" nextgroup=tidyMuteID skipwhite skipnl
|
||||
|
||||
syn case ignore
|
||||
syn keyword tidyBoolean contained t[rue] f[alse] y[es] n[o] 1 0
|
||||
syn keyword tidyAutoBoolean contained t[rue] f[alse] y[es] n[o] 1 0 auto
|
||||
syn case match
|
||||
syn keyword tidyCustomTags contained no blocklevel empty inline pre
|
||||
syn keyword tidyDoctype contained html5 omit auto strict loose transitional user
|
||||
syn keyword tidyEncoding contained raw ascii latin0 latin1 utf8 iso2022 mac win1252 ibm858 utf16le utf16be utf16 big5 shiftjis
|
||||
syn keyword tidyNewline contained LF CRLF CR
|
||||
@@ -24,36 +30,148 @@ syn keyword tidyRepeat contained keep-first keep-last
|
||||
syn keyword tidySorter contained alpha none
|
||||
syn region tidyString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ oneline
|
||||
syn region tidyString contained start=+'+ skip=+\\\\\|\\'+ end=+'+ oneline
|
||||
syn match tidyTags contained "\<\w\+\(\s*,\s*\w\+\)*\>"
|
||||
" Tag and attribute lists
|
||||
syn match tidyWord contained "\<\k\+\>:\@!" nextgroup=tidyWordSeparator skipwhite skipnl
|
||||
|
||||
syn keyword tidyBooleanOption add-xml-decl add-xml-pi add-xml-space
|
||||
\ anchor-as-name ascii-chars assume-xml-procins bare break-before-br
|
||||
\ clean coerce-endtags decorate-inferred-ul drop-empty-paras
|
||||
\ drop-empty-elements drop-font-tags drop-proprietary-attributes
|
||||
\ enclose-block-text enclose-text escape-cdata escape-scripts
|
||||
\ fix-backslash fix-bad-comments fix-uri force-output gdoc gnu-emacs
|
||||
\ hide-comments hide-endtags indent-attributes indent-cdata
|
||||
\ indent-with-tabs input-xml join-classes join-styles keep-time
|
||||
\ language literal-attributes logical-emphasis lower-literals markup
|
||||
\ merge-emphasis ncr numeric-entities omit-optional-tags output-html
|
||||
\ output-xhtml output-xml preserve-entities punctuation-wrap quiet
|
||||
\ quote-ampersand quote-marks quote-nbsp raw replace-color show-info
|
||||
\ show-warnings skip-nested split strict-tags-attributes tidy-mark
|
||||
\ uppercase-attributes uppercase-tags word-2000 wrap-asp
|
||||
\ wrap-attributes wrap-jste wrap-php wrap-script-literals
|
||||
\ wrap-sections write-back
|
||||
" Mute Message IDs {{{2
|
||||
syn keyword tidyMuteID ADDED_MISSING_CHARSET ANCHOR_DUPLICATED
|
||||
\ ANCHOR_NOT_UNIQUE APOS_UNDEFINED APPLET_MISSING_ALT AREA_MISSING_ALT
|
||||
\ ASCII_REQUIRES_DESCRIPTION ASSOCIATE_LABELS_EXPLICITLY
|
||||
\ ASSOCIATE_LABELS_EXPLICITLY_FOR ASSOCIATE_LABELS_EXPLICITLY_ID
|
||||
\ ATTRIBUTE_IS_NOT_ALLOWED ATTRIBUTE_VALUE_REPLACED
|
||||
\ ATTR_VALUE_NOT_LCASE AUDIO_MISSING_TEXT_AIFF AUDIO_MISSING_TEXT_AU
|
||||
\ AUDIO_MISSING_TEXT_RA AUDIO_MISSING_TEXT_RM AUDIO_MISSING_TEXT_SND
|
||||
\ AUDIO_MISSING_TEXT_WAV BACKSLASH_IN_URI BAD_ATTRIBUTE_VALUE
|
||||
\ BAD_ATTRIBUTE_VALUE_REPLACED BAD_CDATA_CONTENT BAD_SUMMARY_HTML5
|
||||
\ BAD_SURROGATE_LEAD BAD_SURROGATE_PAIR BAD_SURROGATE_TAIL
|
||||
\ CANT_BE_NESTED COERCE_TO_ENDTAG COLOR_CONTRAST_ACTIVE_LINK
|
||||
\ COLOR_CONTRAST_LINK COLOR_CONTRAST_TEXT COLOR_CONTRAST_VISITED_LINK
|
||||
\ CONTENT_AFTER_BODY CUSTOM_TAG_DETECTED DATA_TABLE_MISSING_HEADERS
|
||||
\ DATA_TABLE_MISSING_HEADERS_COLUMN DATA_TABLE_MISSING_HEADERS_ROW
|
||||
\ DATA_TABLE_REQUIRE_MARKUP_COLUMN_HEADERS
|
||||
\ DATA_TABLE_REQUIRE_MARKUP_ROW_HEADERS DISCARDING_UNEXPECTED
|
||||
\ DOCTYPE_AFTER_TAGS DOCTYPE_MISSING DUPLICATE_FRAMESET
|
||||
\ ELEMENT_NOT_EMPTY ELEMENT_VERS_MISMATCH_ERROR
|
||||
\ ELEMENT_VERS_MISMATCH_WARN ENCODING_MISMATCH
|
||||
\ ENSURE_PROGRAMMATIC_OBJECTS_ACCESSIBLE_APPLET
|
||||
\ ENSURE_PROGRAMMATIC_OBJECTS_ACCESSIBLE_EMBED
|
||||
\ ENSURE_PROGRAMMATIC_OBJECTS_ACCESSIBLE_OBJECT
|
||||
\ ENSURE_PROGRAMMATIC_OBJECTS_ACCESSIBLE_SCRIPT ESCAPED_ILLEGAL_URI
|
||||
\ FILE_CANT_OPEN FILE_CANT_OPEN_CFG FILE_NOT_FILE FIXED_BACKSLASH
|
||||
\ FOUND_STYLE_IN_BODY FRAME_MISSING_LONGDESC FRAME_MISSING_NOFRAMES
|
||||
\ FRAME_MISSING_TITLE FRAME_SRC_INVALID FRAME_TITLE_INVALID_NULL
|
||||
\ FRAME_TITLE_INVALID_SPACES HEADERS_IMPROPERLY_NESTED
|
||||
\ HEADER_USED_FORMAT_TEXT ID_NAME_MISMATCH ILLEGAL_NESTING
|
||||
\ ILLEGAL_URI_CODEPOINT ILLEGAL_URI_REFERENCE
|
||||
\ IMAGE_MAP_SERVER_SIDE_REQUIRES_CONVERSION
|
||||
\ IMG_ALT_SUSPICIOUS_FILENAME IMG_ALT_SUSPICIOUS_FILE_SIZE
|
||||
\ IMG_ALT_SUSPICIOUS_PLACEHOLDER IMG_ALT_SUSPICIOUS_TOO_LONG
|
||||
\ IMG_BUTTON_MISSING_ALT IMG_MAP_CLIENT_MISSING_TEXT_LINKS
|
||||
\ IMG_MAP_SERVER_REQUIRES_TEXT_LINKS IMG_MISSING_ALT IMG_MISSING_DLINK
|
||||
\ IMG_MISSING_LONGDESC IMG_MISSING_LONGDESC_DLINK
|
||||
\ INFORMATION_NOT_CONVEYED_APPLET INFORMATION_NOT_CONVEYED_IMAGE
|
||||
\ INFORMATION_NOT_CONVEYED_INPUT INFORMATION_NOT_CONVEYED_OBJECT
|
||||
\ INFORMATION_NOT_CONVEYED_SCRIPT INSERTING_AUTO_ATTRIBUTE
|
||||
\ INSERTING_TAG INVALID_ATTRIBUTE INVALID_NCR INVALID_SGML_CHARS
|
||||
\ INVALID_UTF16 INVALID_UTF8 INVALID_XML_ID JOINING_ATTRIBUTE
|
||||
\ LANGUAGE_INVALID LANGUAGE_NOT_IDENTIFIED
|
||||
\ LAYOUT_TABLES_LINEARIZE_PROPERLY LAYOUT_TABLE_INVALID_MARKUP
|
||||
\ LINK_TEXT_MISSING LINK_TEXT_NOT_MEANINGFUL
|
||||
\ LINK_TEXT_NOT_MEANINGFUL_CLICK_HERE LINK_TEXT_TOO_LONG
|
||||
\ LIST_USAGE_INVALID_LI LIST_USAGE_INVALID_OL LIST_USAGE_INVALID_UL
|
||||
\ MALFORMED_COMMENT MALFORMED_COMMENT_DROPPING MALFORMED_COMMENT_EOS
|
||||
\ MALFORMED_COMMENT_WARN MALFORMED_DOCTYPE METADATA_MISSING
|
||||
\ METADATA_MISSING_REDIRECT_AUTOREFRESH MISMATCHED_ATTRIBUTE_ERROR
|
||||
\ MISMATCHED_ATTRIBUTE_WARN MISSING_ATTRIBUTE MISSING_ATTR_VALUE
|
||||
\ MISSING_DOCTYPE MISSING_ENDTAG_BEFORE MISSING_ENDTAG_FOR
|
||||
\ MISSING_ENDTAG_OPTIONAL MISSING_IMAGEMAP MISSING_QUOTEMARK
|
||||
\ MISSING_QUOTEMARK_OPEN MISSING_SEMICOLON MISSING_SEMICOLON_NCR
|
||||
\ MISSING_STARTTAG MISSING_TITLE_ELEMENT MOVED_STYLE_TO_HEAD
|
||||
\ MULTIMEDIA_REQUIRES_TEXT NESTED_EMPHASIS NESTED_QUOTATION
|
||||
\ NEWLINE_IN_URI NEW_WINDOWS_REQUIRE_WARNING_BLANK
|
||||
\ NEW_WINDOWS_REQUIRE_WARNING_NEW NOFRAMES_CONTENT
|
||||
\ NOFRAMES_INVALID_CONTENT NOFRAMES_INVALID_LINK
|
||||
\ NOFRAMES_INVALID_NO_VALUE NON_MATCHING_ENDTAG OBJECT_MISSING_ALT
|
||||
\ OBSOLETE_ELEMENT OPTION_REMOVED OPTION_REMOVED_APPLIED
|
||||
\ OPTION_REMOVED_UNAPPLIED POTENTIAL_HEADER_BOLD
|
||||
\ POTENTIAL_HEADER_ITALICS POTENTIAL_HEADER_UNDERLINE
|
||||
\ PREVIOUS_LOCATION PROGRAMMATIC_OBJECTS_REQUIRE_TESTING_APPLET
|
||||
\ PROGRAMMATIC_OBJECTS_REQUIRE_TESTING_EMBED
|
||||
\ PROGRAMMATIC_OBJECTS_REQUIRE_TESTING_OBJECT
|
||||
\ PROGRAMMATIC_OBJECTS_REQUIRE_TESTING_SCRIPT PROPRIETARY_ATTRIBUTE
|
||||
\ PROPRIETARY_ATTR_VALUE PROPRIETARY_ELEMENT REMOVED_HTML5
|
||||
\ REMOVE_AUTO_REDIRECT REMOVE_AUTO_REFRESH REMOVE_BLINK_MARQUEE
|
||||
\ REMOVE_FLICKER_ANIMATED_GIF REMOVE_FLICKER_APPLET
|
||||
\ REMOVE_FLICKER_EMBED REMOVE_FLICKER_OBJECT REMOVE_FLICKER_SCRIPT
|
||||
\ REPEATED_ATTRIBUTE REPLACE_DEPRECATED_HTML_APPLET
|
||||
\ REPLACE_DEPRECATED_HTML_BASEFONT REPLACE_DEPRECATED_HTML_CENTER
|
||||
\ REPLACE_DEPRECATED_HTML_DIR REPLACE_DEPRECATED_HTML_FONT
|
||||
\ REPLACE_DEPRECATED_HTML_ISINDEX REPLACE_DEPRECATED_HTML_MENU
|
||||
\ REPLACE_DEPRECATED_HTML_S REPLACE_DEPRECATED_HTML_STRIKE
|
||||
\ REPLACE_DEPRECATED_HTML_U REPLACING_ELEMENT REPLACING_UNEX_ELEMENT
|
||||
\ SCRIPT_MISSING_NOSCRIPT SCRIPT_NOT_KEYBOARD_ACCESSIBLE_ON_CLICK
|
||||
\ SCRIPT_NOT_KEYBOARD_ACCESSIBLE_ON_MOUSE_DOWN
|
||||
\ SCRIPT_NOT_KEYBOARD_ACCESSIBLE_ON_MOUSE_MOVE
|
||||
\ SCRIPT_NOT_KEYBOARD_ACCESSIBLE_ON_MOUSE_OUT
|
||||
\ SCRIPT_NOT_KEYBOARD_ACCESSIBLE_ON_MOUSE_OVER
|
||||
\ SCRIPT_NOT_KEYBOARD_ACCESSIBLE_ON_MOUSE_UP SKIPOVER_ASCII_ART
|
||||
\ SPACE_PRECEDING_XMLDECL STRING_ARGUMENT_BAD STRING_CONTENT_LOOKS
|
||||
\ STRING_DOCTYPE_GIVEN STRING_MISSING_MALFORMED STRING_MUTING_TYPE
|
||||
\ STRING_NO_SYSID STRING_UNKNOWN_OPTION
|
||||
\ STYLESHEETS_REQUIRE_TESTING_LINK
|
||||
\ STYLESHEETS_REQUIRE_TESTING_STYLE_ATTR
|
||||
\ STYLESHEETS_REQUIRE_TESTING_STYLE_ELEMENT
|
||||
\ STYLE_SHEET_CONTROL_PRESENTATION SUSPECTED_MISSING_QUOTE
|
||||
\ TABLE_MAY_REQUIRE_HEADER_ABBR TABLE_MAY_REQUIRE_HEADER_ABBR_NULL
|
||||
\ TABLE_MAY_REQUIRE_HEADER_ABBR_SPACES TABLE_MISSING_CAPTION
|
||||
\ TABLE_MISSING_SUMMARY TABLE_SUMMARY_INVALID_NULL
|
||||
\ TABLE_SUMMARY_INVALID_PLACEHOLDER TABLE_SUMMARY_INVALID_SPACES
|
||||
\ TAG_NOT_ALLOWED_IN TEXT_EQUIVALENTS_REQUIRE_UPDATING_APPLET
|
||||
\ TEXT_EQUIVALENTS_REQUIRE_UPDATING_OBJECT
|
||||
\ TEXT_EQUIVALENTS_REQUIRE_UPDATING_SCRIPT TOO_MANY_ELEMENTS
|
||||
\ TOO_MANY_ELEMENTS_IN TRIM_EMPTY_ELEMENT UNESCAPED_AMPERSAND
|
||||
\ UNEXPECTED_ENDTAG UNEXPECTED_ENDTAG_ERR UNEXPECTED_ENDTAG_IN
|
||||
\ UNEXPECTED_END_OF_FILE UNEXPECTED_END_OF_FILE_ATTR
|
||||
\ UNEXPECTED_EQUALSIGN UNEXPECTED_GT UNEXPECTED_QUOTEMARK
|
||||
\ UNKNOWN_ELEMENT UNKNOWN_ELEMENT_LOOKS_CUSTOM UNKNOWN_ENTITY
|
||||
\ USING_BR_INPLACE_OF VENDOR_SPECIFIC_CHARS WHITE_IN_URI
|
||||
\ XML_DECLARATION_DETECTED XML_ID_SYNTAX
|
||||
\ contained nextgroup=tidyMuteIDSeparator skipwhite skipnl
|
||||
|
||||
" Options {{{1
|
||||
syn keyword tidyCustomTagsOption custom-tags contained nextgroup=tidyCustomTagsDelimiter
|
||||
syn match tidyCustomTagsDelimiter ":" nextgroup=tidyCustomTags contained skipwhite
|
||||
|
||||
syn keyword tidyBooleanOption add-meta-charset add-xml-decl
|
||||
\ add-xml-pi add-xml-space anchor-as-name ascii-chars
|
||||
\ assume-xml-procins bare break-before-br clean coerce-endtags
|
||||
\ decorate-inferred-ul drop-empty-paras drop-empty-elements
|
||||
\ drop-font-tags drop-proprietary-attributes enclose-block-text
|
||||
\ enclose-text escape-cdata escape-scripts fix-backslash
|
||||
\ fix-style-tags fix-uri force-output gdoc gnu-emacs hide-comments
|
||||
\ hide-endtags indent-attributes indent-cdata indent-with-tabs
|
||||
\ input-xml join-classes join-styles keep-tabs keep-time language
|
||||
\ literal-attributes logical-emphasis lower-literals markup
|
||||
\ merge-emphasis mute-id ncr numeric-entities omit-optional-tags
|
||||
\ output-html output-xhtml output-xml preserve-entities
|
||||
\ punctuation-wrap quiet quote-ampersand quote-marks quote-nbsp raw
|
||||
\ replace-color show-filename show-info show-meta-change show-warnings
|
||||
\ skip-nested split strict-tags-attributes tidy-mark
|
||||
\ uppercase-attributes uppercase-tags warn-proprietary-attributes
|
||||
\ word-2000 wrap-asp wrap-attributes wrap-jste wrap-php
|
||||
\ wrap-script-literals wrap-sections write-back
|
||||
\ contained nextgroup=tidyBooleanDelimiter
|
||||
|
||||
syn match tidyBooleanDelimiter ":" nextgroup=tidyBoolean contained skipwhite
|
||||
|
||||
syn keyword tidyAutoBooleanOption indent merge-divs merge-spans output-bom show-body-only vertical-space contained nextgroup=tidyAutoBooleanDelimiter
|
||||
syn keyword tidyAutoBooleanOption fix-bad-comments indent merge-divs merge-spans output-bom show-body-only vertical-space contained nextgroup=tidyAutoBooleanDelimiter
|
||||
syn match tidyAutoBooleanDelimiter ":" nextgroup=tidyAutoBoolean contained skipwhite
|
||||
|
||||
syn keyword tidyCSSSelectorOption css-prefix contained nextgroup=tidyCSSSelectorDelimiter
|
||||
syn match tidyCSSSelectorDelimiter ":" nextgroup=tidyCSSSelector contained skipwhite
|
||||
|
||||
syn keyword tidyDoctypeOption doctype contained nextgroup=tidyDoctypeDelimiter
|
||||
syn match tidyDoctypeDelimiter ":" nextgroup=tidyDoctype contained skipwhite
|
||||
syn match tidyDoctypeDelimiter ":" nextgroup=tidyDoctype,tidyString contained skipwhite
|
||||
|
||||
syn keyword tidyEncodingOption char-encoding input-encoding output-encoding contained nextgroup=tidyEncodingDelimiter
|
||||
syn match tidyEncodingDelimiter ":" nextgroup=tidyEncoding contained skipwhite
|
||||
@@ -67,8 +185,11 @@ syn match tidyNameDelimiter ":" nextgroup=tidyName contained skipwhite
|
||||
syn keyword tidyNewlineOption newline contained nextgroup=tidyNewlineDelimiter
|
||||
syn match tidyNewlineDelimiter ":" nextgroup=tidyNewline contained skipwhite
|
||||
|
||||
syn keyword tidyAttributesOption priority-attributes contained nextgroup=tidyAttributesDelimiter
|
||||
syn match tidyAttributesDelimiter ":" nextgroup=tidyWord contained skipwhite
|
||||
|
||||
syn keyword tidyTagsOption new-blocklevel-tags new-empty-tags new-inline-tags new-pre-tags contained nextgroup=tidyTagsDelimiter
|
||||
syn match tidyTagsDelimiter ":" nextgroup=tidyTags contained skipwhite
|
||||
syn match tidyTagsDelimiter ":" nextgroup=tidyWord contained skipwhite
|
||||
|
||||
syn keyword tidyRepeatOption repeated-attributes contained nextgroup=tidyRepeatDelimiter
|
||||
syn match tidyRepeatDelimiter ":" nextgroup=tidyRepeat contained skipwhite
|
||||
@@ -79,57 +200,77 @@ syn match tidySorterDelimiter ":" nextgroup=tidySorter contained skipwhite
|
||||
syn keyword tidyStringOption alt-text error-file gnu-emacs-file output-file contained nextgroup=tidyStringDelimiter
|
||||
syn match tidyStringDelimiter ":" nextgroup=tidyString contained skipwhite
|
||||
|
||||
syn keyword tidyMuteOption mute contained nextgroup=tidyMuteDelimiter
|
||||
syn match tidyMuteDelimiter ":" nextgroup=tidyMuteID contained skipwhite
|
||||
|
||||
syn cluster tidyOptions contains=tidy.*Option
|
||||
|
||||
" Option line anchor {{{1
|
||||
syn match tidyStart "^" nextgroup=@tidyOptions
|
||||
" Long standing bug - option lines (except the first) with leading whitespace
|
||||
" are silently ignored.
|
||||
syn match tidyErrorStart '^\s\+\ze\S'
|
||||
|
||||
" Comments {{{1
|
||||
syn match tidyComment "^\s*//.*$" contains=tidyTodo
|
||||
syn match tidyComment "^\s*#.*$" contains=tidyTodo
|
||||
syn keyword tidyTodo TODO NOTE FIXME XXX contained
|
||||
|
||||
" Default highlighting {{{1
|
||||
hi def link tidyAttributesOption Identifier
|
||||
hi def link tidyAutoBooleanOption Identifier
|
||||
hi def link tidyBooleanOption Identifier
|
||||
hi def link tidyCSSSelectorOption Identifier
|
||||
hi def link tidyCustomTagsOption Identifier
|
||||
hi def link tidyDoctypeOption Identifier
|
||||
hi def link tidyEncodingOption Identifier
|
||||
hi def link tidyIntegerOption Identifier
|
||||
hi def link tidyMuteOption Identifier
|
||||
hi def link tidyNameOption Identifier
|
||||
hi def link tidyNewlineOption Identifier
|
||||
hi def link tidyTagsOption Identifier
|
||||
hi def link tidyRepeatOption Identifier
|
||||
hi def link tidySorterOption Identifier
|
||||
hi def link tidyStringOption Identifier
|
||||
hi def link tidyTagsOption Identifier
|
||||
|
||||
hi def link tidyAttributesDelimiter Special
|
||||
hi def link tidyAutoBooleanDelimiter Special
|
||||
hi def link tidyBooleanDelimiter Special
|
||||
hi def link tidyCSSSelectorDelimiter Special
|
||||
hi def link tidyCustomTagsDelimiter Special
|
||||
hi def link tidyDoctypeDelimiter Special
|
||||
hi def link tidyEncodingDelimiter Special
|
||||
hi def link tidyIntegerDelimiter Special
|
||||
hi def link tidyMuteDelimiter Special
|
||||
hi def link tidyNameDelimiter Special
|
||||
hi def link tidyNewlineDelimiter Special
|
||||
hi def link tidyTagsDelimiter Special
|
||||
hi def link tidyRepeatDelimiter Special
|
||||
hi def link tidySorterDelimiter Special
|
||||
hi def link tidyStringDelimiter Special
|
||||
hi def link tidyTagsDelimiter Special
|
||||
|
||||
hi def link tidyAutoBoolean Boolean
|
||||
hi def link tidyBoolean Boolean
|
||||
hi def link tidyCustomTags Constant
|
||||
hi def link tidyDoctype Constant
|
||||
hi def link tidyEncoding Constant
|
||||
hi def link tidyMuteID Constant
|
||||
hi def link tidyNewline Constant
|
||||
hi def link tidyTags Constant
|
||||
hi def link tidyNumber Number
|
||||
hi def link tidyRepeat Constant
|
||||
hi def link tidySorter Constant
|
||||
hi def link tidyString String
|
||||
hi def link tidyWord Constant
|
||||
|
||||
hi def link tidyComment Comment
|
||||
hi def link tidyTodo Todo
|
||||
|
||||
hi def link tidyErrorStart Error
|
||||
|
||||
" Postscript {{{1
|
||||
let b:current_syntax = "tidy"
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim: ts=8
|
||||
" vim: ts=8 fdm=marker
|
||||
|
||||
@@ -907,7 +907,7 @@ ce 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있
|
||||
|
||||
5. <TAB> 을 눌러 ":edit" 명령어를 완성해 봅니다.
|
||||
|
||||
6. 이제 빈칸 하나를 추가한 뒤, 존재 파일 이름을 앞 부분을 입력합니다: :edit FIL
|
||||
6. 이제 빈칸 하나를 추가한 뒤, 존재하는 파일 이름의 앞 부분을 입력합니다: :edit FIL
|
||||
|
||||
7. <TAB> 을 눌러 파일 이름을 완성 시킵니다.
|
||||
|
||||
|
||||
@@ -907,7 +907,7 @@ ce
|
||||
|
||||
5. <TAB> <20><> <20><><EFBFBD><EFBFBD> ":edit" <20><><EFBFBD>ɾ <20>ϼ<EFBFBD><CFBC><EFBFBD> <20><><EFBFBD>ϴ<EFBFBD>.
|
||||
|
||||
6. <20><><EFBFBD><EFBFBD> <20><>ĭ <20>ϳ<EFBFBD><CFB3><EFBFBD> <20>߰<EFBFBD><DFB0><EFBFBD> <20><>, <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20≯<EFBFBD><CCB8><EFBFBD> <20><> <20>κ<EFBFBD><CEBA><EFBFBD> <20>Է<EFBFBD><D4B7>մϴ<D5B4>: :edit FIL
|
||||
6. <20><><EFBFBD><EFBFBD> <20><>ĭ <20>ϳ<EFBFBD><CFB3><EFBFBD> <20>߰<EFBFBD><DFB0><EFBFBD> <20><>, <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD> <20≯<EFBFBD><CCB8><EFBFBD> <20><> <20>κ<EFBFBD><CEBA><EFBFBD> <20>Է<EFBFBD><D4B7>մϴ<D5B4>: :edit FIL
|
||||
|
||||
7. <TAB> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20≯<EFBFBD><CCB8><EFBFBD> <20>ϼ<EFBFBD> <20><>ŵ<EFBFBD>ϴ<EFBFBD>.
|
||||
|
||||
|
||||
@@ -907,7 +907,7 @@ ce 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있
|
||||
|
||||
5. <TAB> 을 눌러 ":edit" 명령어를 완성해 봅니다.
|
||||
|
||||
6. 이제 빈칸 하나를 추가한 뒤, 존재 파일 이름을 앞 부분을 입력합니다: :edit FIL
|
||||
6. 이제 빈칸 하나를 추가한 뒤, 존재하는 파일 이름의 앞 부분을 입력합니다: :edit FIL
|
||||
|
||||
7. <TAB> 을 눌러 파일 이름을 완성 시킵니다.
|
||||
|
||||
|
||||
@@ -49,8 +49,8 @@ WINVER = 0x0501
|
||||
endif
|
||||
CXX := $(CROSS_COMPILE)g++
|
||||
WINDRES := $(CROSS_COMPILE)windres
|
||||
WINDRES_CXX = $(CXX)
|
||||
WINDRES_FLAGS = --preprocessor="$(WINDRES_CXX) -E -xc" -DRC_INVOKED
|
||||
# this used to have --preprocessor, but it's no longer supported
|
||||
WINDRES_FLAGS =
|
||||
LIBS := -luuid -lgdi32
|
||||
RES := gvimext.res
|
||||
DEFFILE = gvimext_ming.def
|
||||
|
||||
42
src/INSTALL
42
src/INSTALL
@@ -39,13 +39,53 @@ version of Vim that is small and starts up quickly, see the Makefile for how
|
||||
to disable the GUI and X11. If you don't have GUI libraries and/or X11, these
|
||||
features will be disabled automatically.
|
||||
|
||||
To built Vim on Ubuntu from scratch on a clean system using git:
|
||||
Install tools required to be able to get and build Vim:
|
||||
% sudo apt install git
|
||||
% sudo apt install make
|
||||
% sudo apt install clang
|
||||
|
||||
Build Vim with default features:
|
||||
% git clone https://github.com/vim/vim.git
|
||||
% cd vim/src
|
||||
% make
|
||||
|
||||
Run tests to check there are no problems:
|
||||
% make test
|
||||
|
||||
Install Vim in /usr/local:
|
||||
% sudo make install
|
||||
|
||||
Add X windows clipboard support (also needed for GUI):
|
||||
% sudo apt install libxt-dev
|
||||
% make reconfig
|
||||
|
||||
Add GUI support (ignore compiler warnings):
|
||||
% sudo apt install libgtk2.0-dev
|
||||
% make reconfig
|
||||
|
||||
Add Python 3 support:
|
||||
% sudo apt install libpython3-dev
|
||||
Uncomment this line in Makefile:
|
||||
"CONF_OPT_PYTHON3 = --enable-python3interp"
|
||||
% make reconfig
|
||||
|
||||
Debugging:
|
||||
% sudo apt install valgrind
|
||||
Uncomment this line in Makefile:
|
||||
CFLAGS = -g -Wall -Wextra -Wshadow -Wmissing-prototypes -Wunreachable-code -Wno-deprecated-declarations -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
|
||||
% make reconfig
|
||||
% make test_{test-name}
|
||||
See output in testdir/valgrind.test_{test-name}
|
||||
|
||||
|
||||
See the start of Makefile for more detailed instructions about how to compile
|
||||
Vim.
|
||||
|
||||
If you need extra compiler and/or linker arguments, set $CFLAGS and/or $LIBS
|
||||
before starting configure. Example:
|
||||
|
||||
env CFLAGS=-I/usr/local/include LIBS=-lm make
|
||||
env CFLAGS=-I/usr/local/include LIBS=-lm make
|
||||
|
||||
This is only needed for things that configure doesn't offer a specific argument
|
||||
for or figures out by itself. First try running configure without extra
|
||||
|
||||
@@ -220,7 +220,6 @@ WINDRES := $(CROSS_COMPILE)windres
|
||||
else
|
||||
WINDRES := windres
|
||||
endif
|
||||
WINDRES_CC = $(CC)
|
||||
|
||||
# Get the default ARCH.
|
||||
ifndef ARCH
|
||||
@@ -514,7 +513,8 @@ endif
|
||||
|
||||
CFLAGS = -I. -Iproto $(DEFINES) -pipe -march=$(ARCH) -Wall
|
||||
CXXFLAGS = -std=gnu++11
|
||||
WINDRES_FLAGS = --preprocessor="$(WINDRES_CC) -E -xc" -DRC_INVOKED
|
||||
# This used to have --preprocessor, but it's no longer supported
|
||||
WINDRES_FLAGS =
|
||||
EXTRA_LIBS =
|
||||
|
||||
ifdef GETTEXT
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# Makefile for Vim on OpenVMS
|
||||
#
|
||||
# Maintainer: Zoltan Arpadffy <arpadffy@polarhome.com>
|
||||
# Last change: 2020 Dec 30
|
||||
# Last change: 2021 Jan 04
|
||||
#
|
||||
# This script has been tested on VMS 6.2 to 8.4 on DEC Alpha, VAX and IA64
|
||||
# with MMS and MMK
|
||||
@@ -38,18 +38,18 @@ MODEL = HUGE
|
||||
# GUI or terminal mode executable.
|
||||
# Comment out if you want just the character terminal mode only.
|
||||
# GUI with Motif
|
||||
GUI = YES
|
||||
# GUI = YES
|
||||
|
||||
# GUI with GTK
|
||||
# If you have GTK installed you might want to enable this option.
|
||||
# NOTE: you will need to properly define GTK_DIR below
|
||||
# NOTE: since Vim 7.3 GTK 2+ is used that is not ported to VMS,
|
||||
# therefore this option should not be used
|
||||
# NOTE: since Vim 7.3 GTK 2+ is used that is not ported to VMS,
|
||||
# therefore this option should not be used
|
||||
# GTK = YES
|
||||
|
||||
# GUI/Motif with XPM
|
||||
# If you have XPM installed you might want to build Motif version with toolbar
|
||||
XPM = YES
|
||||
# XPM = YES
|
||||
|
||||
# Comment out if you want the compiler version with :ver command.
|
||||
# NOTE: This part can make some complications if you're using some
|
||||
@@ -59,7 +59,7 @@ CCVER = YES
|
||||
|
||||
# Uncomment if want a debug version. Resulting executable is DVIM.EXE
|
||||
# Development purpose only! Normally, it should not be defined. !!!
|
||||
# DEBUG = YES
|
||||
# DEBUG = YES
|
||||
|
||||
# Languages support for Perl, Python, TCL etc.
|
||||
# If you don't need it really, leave them behind the comment.
|
||||
@@ -68,6 +68,7 @@ CCVER = YES
|
||||
# VIM_PERL = YES
|
||||
# VIM_PYTHON = YES
|
||||
# VIM_RUBY = YES
|
||||
# VIM_LUA = YES
|
||||
|
||||
# X Input Method. For entering special languages like chinese and
|
||||
# Japanese.
|
||||
@@ -180,7 +181,7 @@ XPM_INC = ,[.xpm.include]
|
||||
XPM_LIB = ,OS_VMS_XPM.OPT/OPT
|
||||
.ELSE
|
||||
DEFS = "HAVE_CONFIG_H","FEAT_GUI_MOTIF"
|
||||
XPM_INC =
|
||||
XPM_INC =
|
||||
.ENDIF
|
||||
LIBS = ,OS_VMS_MOTIF.OPT/OPT
|
||||
GUI_FLAG =
|
||||
@@ -237,6 +238,15 @@ RUBY_LIB = ,OS_VMS_RUBY.OPT/OPT
|
||||
RUBY_INC =
|
||||
.ENDIF
|
||||
|
||||
.IFDEF VIM_LUA
|
||||
# LUA related setup.
|
||||
LUA_DEF = ,"FEAT_LUA"
|
||||
LUA_SRC = if_lua.c
|
||||
LUA_OBJ = if_lua.obj
|
||||
LUA_LIB = ,OS_VMS_LUA.OPT/OPT
|
||||
LUA_INC = ,LUA$ROOT:[INCLUDE]
|
||||
.ENDIF
|
||||
|
||||
.IFDEF VIM_XIM
|
||||
# XIM related setup.
|
||||
.IFDEF GUI
|
||||
@@ -247,7 +257,7 @@ XIM_DEF = ,"FEAT_XIM"
|
||||
.IFDEF VIM_MZSCHEME
|
||||
# MZSCHEME related setup
|
||||
MZSCH_DEF = ,"FEAT_MZSCHEME"
|
||||
MZSCH_SRC = if_mzsch.c
|
||||
MZSCH_SRC = if_mzsch.c
|
||||
MZSCH_OBJ = if_mzsch.obj
|
||||
.ENDIF
|
||||
|
||||
@@ -258,7 +268,7 @@ ICONV_DEF = ,"USE_ICONV"
|
||||
|
||||
# XDIFF related setup.
|
||||
XDIFF_SRC = xdiffi.c,xemit.c,xprepare.c,xutils.c,xhistogram.c,xpatience.c
|
||||
XDIFF_OBJ = xdiffi.obj,xemit.obj,xprepare.obj,xutils.obj,xhistogram.obj,xpatience.obj
|
||||
XDIFF_OBJ = xdiffi.obj,xemit.obj,xprepare.obj,xutils.obj,xhistogram.obj,xpatience.obj
|
||||
XDIFF_INC = ,[.xdiff]
|
||||
|
||||
######################################################################
|
||||
@@ -275,7 +285,7 @@ VIMHOST = "''F$TRNLNM("SYS$NODE")'''F$TRNLNM("UCX$INET_HOST")'.''F$TRNLNM("UCX$I
|
||||
.SUFFIXES : .obj .c
|
||||
|
||||
ALL_CFLAGS = /def=($(MODEL_DEF)$(DEFS)$(DEBUG_DEF)$(PERL_DEF)$(PYTHON_DEF) -
|
||||
$(TCL_DEF)$(RUBY_DEF)$(XIM_DEF)$(TAG_DEF)$(MZSCH_DEF) -
|
||||
$(TCL_DEF)$(RUBY_DEF)$(LUA_DEF)$(XIM_DEF)$(TAG_DEF)$(MZSCH_DEF) -
|
||||
$(ICONV_DEF)) -
|
||||
$(CFLAGS)$(GUI_FLAG) -
|
||||
/include=($(C_INC)$(GUI_INC_DIR)$(GUI_INC)$(PERL_INC)$(PYTHON_INC) -
|
||||
@@ -286,14 +296,14 @@ ALL_CFLAGS = /def=($(MODEL_DEF)$(DEFS)$(DEBUG_DEF)$(PERL_DEF)$(PYTHON_DEF) -
|
||||
# as $(GUI_INC) - replaced with $(GUI_INC_VER)
|
||||
# Otherwise should not be any other difference.
|
||||
ALL_CFLAGS_VER = /def=($(MODEL_DEF)$(DEFS)$(DEBUG_DEF)$(PERL_DEF)$(PYTHON_DEF) -
|
||||
$(TCL_DEF)$(RUBY_DEF)$(XIM_DEF)$(TAG_DEF)$(MZSCH_DEF) -
|
||||
$(TCL_DEF)$(RUBY_DEF)$(LUA_DEF)$(XIM_DEF)$(TAG_DEF)$(MZSCH_DEF) -
|
||||
$(ICONV_DEF)) -
|
||||
$(CFLAGS)$(GUI_FLAG) -
|
||||
/include=($(C_INC)$(GUI_INC_DIR)$(GUI_INC_VER)$(PERL_INC)$(PYTHON_INC) -
|
||||
$(TCL_INC)$(XDIFF_INC)$(XPM_INC))
|
||||
|
||||
ALL_LIBS = $(LIBS) $(GUI_LIB_DIR) $(GUI_LIB) $(XPM_LIB)\
|
||||
$(PERL_LIB) $(PYTHON_LIB) $(TCL_LIB) $(RUBY_LIB)
|
||||
$(PERL_LIB) $(PYTHON_LIB) $(TCL_LIB) $(RUBY_LIB) $(LUA_LIB)
|
||||
|
||||
SRC = \
|
||||
arabic.c \
|
||||
@@ -408,6 +418,7 @@ SRC = \
|
||||
$(PYTHON_SRC) \
|
||||
$(TCL_SRC) \
|
||||
$(RUBY_SRC) \
|
||||
$(LUA_SRC) \
|
||||
$(MZSCH_SRC) \
|
||||
$(XDIFF_SRC)
|
||||
|
||||
@@ -525,11 +536,12 @@ OBJ = \
|
||||
$(PYTHON_OBJ) \
|
||||
$(TCL_OBJ) \
|
||||
$(RUBY_OBJ) \
|
||||
$(LUA_OBJ) \
|
||||
$(MZSCH_OBJ) \
|
||||
$(XDIFF_OBJ)
|
||||
|
||||
# Default target is making the executable
|
||||
all : [.auto]config.h mmk_compat motif_env gtk_env perl_env python_env tcl_env ruby_env $(TARGET)
|
||||
all : [.auto]config.h mmk_compat motif_env gtk_env perl_env python_env tcl_env ruby_env lua_env $(TARGET)
|
||||
! $@
|
||||
|
||||
[.auto]config.h : $(CONFIG_H)
|
||||
@@ -611,7 +623,7 @@ motif_env :
|
||||
.ENDIF
|
||||
.IFDEF MMSIA64
|
||||
-@ write opt_file "[.xpm.vms.ia64]libxpm.olb/lib"
|
||||
.ENDIF
|
||||
.ENDIF
|
||||
-@ close opt_file
|
||||
.ELSE
|
||||
-@ write sys$output "using DECW/Motif environment."
|
||||
@@ -709,11 +721,24 @@ ruby_env :
|
||||
-@ !
|
||||
.ENDIF
|
||||
|
||||
.IFDEF VIM_LUA
|
||||
lua_env :
|
||||
-@ write sys$output "using LUA environment:"
|
||||
-@ write sys$output " include path: ""$(LUA_INC)"""
|
||||
-@ write sys$output "creating OS_VMS_LUA.OPT file."
|
||||
-@ open/write opt_file OS_VMS_LUA.OPT
|
||||
-@ write opt_file "LUA$ROOT:[LIB]LUA$SHR.EXE /share"
|
||||
-@ close opt_file
|
||||
.ELSE
|
||||
lua_env :
|
||||
-@ !
|
||||
.ENDIF
|
||||
|
||||
arabic.obj : arabic.c vim.h
|
||||
arglist.obj : arglist.c vim.h [.auto]config.h feature.h os_unix.h
|
||||
autocmd.obj : autocmd.c vim.h [.auto]config.h feature.h os_unix.h
|
||||
blowfish.obj : blowfish.c vim.h [.auto]config.h feature.h os_unix.h
|
||||
blob.obj : blob.c vim.h [.auto]config.h feature.h os_unix.h
|
||||
blob.obj : blob.c vim.h [.auto]config.h feature.h os_unix.h
|
||||
buffer.obj : buffer.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h term.h macros.h structs.h regexp.h \
|
||||
gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
|
||||
@@ -873,7 +898,7 @@ if_xcmdsrv.obj : if_xcmdsrv.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
if_mzsch.obj : if_mzsch.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h term.h macros.h option.h structs.h \
|
||||
regexp.h gui.h beval.h [.proto]gui_beval.pro ex_cmds.h proto.h \
|
||||
errors.h globals.h if_mzsch.h
|
||||
errors.h globals.h if_mzsch.h
|
||||
indent.obj : indent.c vim.h [.auto]config.h feature.h os_unix.h
|
||||
insexpand.obj : insexpand.c vim.h [.auto]config.h feature.h os_unix.h
|
||||
json.obj : json.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
@@ -1167,6 +1192,8 @@ if_ruby.obj : if_ruby.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h term.h macros.h structs.h regexp.h \
|
||||
gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
|
||||
errors.h globals.h version.h
|
||||
if_lua.obj : if_lua.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
errors.h globals.h version.h
|
||||
beval.obj : beval.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h term.h macros.h structs.h regexp.h \
|
||||
gui.h beval.h option.h ex_cmds.h proto.h \
|
||||
@@ -1186,4 +1213,4 @@ xemit.obj : [.xdiff]xemit.c [.xdiff]xinclude.h [.auto]config.h vim.h feature.h o
|
||||
xprepare.obj : [.xdiff]xprepare.c [.xdiff]xinclude.h [.auto]config.h vim.h feature.h os_unix.h
|
||||
xutils.obj : [.xdiff]xutils.c [.xdiff]xinclude.h [.auto]config.h vim.h feature.h os_unix.h
|
||||
xhistogram.obj : [.xdiff]xhistogram.c [.xdiff]xinclude.h [.auto]config.h vim.h feature.h os_unix.h
|
||||
xpatience.obj : [.xdiff]xpatience.c [.xdiff]xinclude.h [.auto]config.h vim.h feature.h os_unix.h
|
||||
xpatience.obj : [.xdiff]xpatience.c [.xdiff]xinclude.h [.auto]config.h vim.h feature.h os_unix.h
|
||||
|
||||
@@ -2294,9 +2294,12 @@ run_message_test: $(MESSAGE_TEST_TARGET)
|
||||
|
||||
# Run the libvterm tests.
|
||||
# This works only on GNU make, not on BSD make.
|
||||
# Libtool requires "gcc".
|
||||
test_libvterm:
|
||||
@if $(MAKE) --version 2>/dev/null | grep -qs "GNU Make"; then \
|
||||
cd libvterm; $(MAKE) -f Makefile test CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"; \
|
||||
if test -x "/usr/bin/gcc"; then \
|
||||
cd libvterm; $(MAKE) -f Makefile test CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"; \
|
||||
fi \
|
||||
fi
|
||||
|
||||
# Run individual OLD style test.
|
||||
|
||||
@@ -17,12 +17,29 @@
|
||||
#define AL_ADD 2
|
||||
#define AL_DEL 3
|
||||
|
||||
// This flag is set whenever the argument list is being changed and calling a
|
||||
// function that might trigger an autocommand.
|
||||
static int arglist_locked = FALSE;
|
||||
|
||||
static int
|
||||
check_arglist_locked(void)
|
||||
{
|
||||
if (arglist_locked)
|
||||
{
|
||||
emsg(_(e_cannot_change_arglist_recursively));
|
||||
return FAIL;
|
||||
}
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Clear an argument list: free all file names and reset it to zero entries.
|
||||
*/
|
||||
void
|
||||
alist_clear(alist_T *al)
|
||||
{
|
||||
if (check_arglist_locked() == FAIL)
|
||||
return;
|
||||
while (--al->al_ga.ga_len >= 0)
|
||||
vim_free(AARGLIST(al)[al->al_ga.ga_len].ae_fname);
|
||||
ga_clear(&al->al_ga);
|
||||
@@ -126,14 +143,9 @@ alist_set(
|
||||
int fnum_len)
|
||||
{
|
||||
int i;
|
||||
static int recursive = 0;
|
||||
|
||||
if (recursive)
|
||||
{
|
||||
emsg(_(e_au_recursive));
|
||||
if (check_arglist_locked() == FAIL)
|
||||
return;
|
||||
}
|
||||
++recursive;
|
||||
|
||||
alist_clear(al);
|
||||
if (ga_grow(&al->al_ga, count) == OK)
|
||||
@@ -152,7 +164,11 @@ alist_set(
|
||||
// May set buffer name of a buffer previously used for the
|
||||
// argument list, so that it's re-used by alist_add.
|
||||
if (fnum_list != NULL && i < fnum_len)
|
||||
{
|
||||
arglist_locked = TRUE;
|
||||
buf_set_name(fnum_list[i], files[i]);
|
||||
arglist_locked = FALSE;
|
||||
}
|
||||
|
||||
alist_add(al, files[i], use_curbuf ? 2 : 1);
|
||||
ui_breakcheck();
|
||||
@@ -163,8 +179,6 @@ alist_set(
|
||||
FreeWild(count, files);
|
||||
if (al == &global_alist)
|
||||
arg_had_last = FALSE;
|
||||
|
||||
--recursive;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -179,6 +193,10 @@ alist_add(
|
||||
{
|
||||
if (fname == NULL) // don't add NULL file names
|
||||
return;
|
||||
if (check_arglist_locked() == FAIL)
|
||||
return;
|
||||
arglist_locked = TRUE;
|
||||
|
||||
#ifdef BACKSLASH_IN_FILENAME
|
||||
slash_adjust(fname);
|
||||
#endif
|
||||
@@ -187,6 +205,8 @@ alist_add(
|
||||
AARGLIST(al)[al->al_ga.ga_len].ae_fnum =
|
||||
buflist_add(fname, BLN_LISTED | (set_fnum == 2 ? BLN_CURBUF : 0));
|
||||
++al->al_ga.ga_len;
|
||||
|
||||
arglist_locked = FALSE;
|
||||
}
|
||||
|
||||
#if defined(BACKSLASH_IN_FILENAME) || defined(PROTO)
|
||||
@@ -295,10 +315,10 @@ get_arglist_exp(
|
||||
return FAIL;
|
||||
if (wig == TRUE)
|
||||
i = expand_wildcards(ga.ga_len, (char_u **)ga.ga_data,
|
||||
fcountp, fnamesp, EW_FILE|EW_NOTFOUND);
|
||||
fcountp, fnamesp, EW_FILE|EW_NOTFOUND|EW_NOTWILD);
|
||||
else
|
||||
i = gen_expand_wildcards(ga.ga_len, (char_u **)ga.ga_data,
|
||||
fcountp, fnamesp, EW_FILE|EW_NOTFOUND);
|
||||
fcountp, fnamesp, EW_FILE|EW_NOTFOUND|EW_NOTWILD);
|
||||
|
||||
ga_clear(&ga);
|
||||
return i;
|
||||
@@ -334,7 +354,8 @@ alist_add_list(
|
||||
int i;
|
||||
int old_argcount = ARGCOUNT;
|
||||
|
||||
if (ga_grow(&ALIST(curwin)->al_ga, count) == OK)
|
||||
if (check_arglist_locked() != FAIL
|
||||
&& ga_grow(&ALIST(curwin)->al_ga, count) == OK)
|
||||
{
|
||||
if (after < 0)
|
||||
after = 0;
|
||||
@@ -343,6 +364,7 @@ alist_add_list(
|
||||
if (after < ARGCOUNT)
|
||||
mch_memmove(&(ARGLIST[after + count]), &(ARGLIST[after]),
|
||||
(ARGCOUNT - after) * sizeof(aentry_T));
|
||||
arglist_locked = TRUE;
|
||||
for (i = 0; i < count; ++i)
|
||||
{
|
||||
int flags = BLN_LISTED | (will_edit ? BLN_CURBUF : 0);
|
||||
@@ -350,6 +372,7 @@ alist_add_list(
|
||||
ARGLIST[after + i].ae_fname = files[i];
|
||||
ARGLIST[after + i].ae_fnum = buflist_add(files[i], flags);
|
||||
}
|
||||
arglist_locked = FALSE;
|
||||
ALIST(curwin)->al_ga.ga_len += count;
|
||||
if (old_argcount > 0 && curwin->w_arg_idx >= after)
|
||||
curwin->w_arg_idx += count;
|
||||
@@ -382,6 +405,9 @@ do_arglist(
|
||||
int match;
|
||||
int arg_escaped = TRUE;
|
||||
|
||||
if (check_arglist_locked() == FAIL)
|
||||
return FAIL;
|
||||
|
||||
// Set default argument for ":argadd" command.
|
||||
if (what == AL_ADD && *str == NUL)
|
||||
{
|
||||
@@ -531,6 +557,8 @@ ex_args(exarg_T *eap)
|
||||
|
||||
if (eap->cmdidx != CMD_args)
|
||||
{
|
||||
if (check_arglist_locked() == FAIL)
|
||||
return;
|
||||
alist_unlink(ALIST(curwin));
|
||||
if (eap->cmdidx == CMD_argglobal)
|
||||
ALIST(curwin) = &global_alist;
|
||||
@@ -540,6 +568,8 @@ ex_args(exarg_T *eap)
|
||||
|
||||
if (*eap->arg != NUL)
|
||||
{
|
||||
if (check_arglist_locked() == FAIL)
|
||||
return;
|
||||
// ":args file ..": define new argument list, handle like ":next"
|
||||
// Also for ":argslocal file .." and ":argsglobal file ..".
|
||||
ex_next(eap);
|
||||
@@ -776,6 +806,9 @@ ex_argdelete(exarg_T *eap)
|
||||
int i;
|
||||
int n;
|
||||
|
||||
if (check_arglist_locked() == FAIL)
|
||||
return;
|
||||
|
||||
if (eap->addr_count > 0 || *eap->arg == NUL)
|
||||
{
|
||||
// ":argdel" works like ":.argdel"
|
||||
@@ -884,6 +917,13 @@ do_arg_all(
|
||||
win_T *new_curwin = NULL;
|
||||
tabpage_T *new_curtab = NULL;
|
||||
|
||||
#ifdef FEAT_CMDWIN
|
||||
if (cmdwin_type != 0)
|
||||
{
|
||||
emsg(_(e_cmdwin));
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
if (ARGCOUNT <= 0)
|
||||
{
|
||||
// Don't give an error message. We don't want it when the ":all"
|
||||
|
||||
19
src/auto/configure
vendored
19
src/auto/configure
vendored
@@ -4482,7 +4482,7 @@ with_x_arg="$with_x"
|
||||
|
||||
if test -z "$CFLAGS"; then
|
||||
CFLAGS="-O"
|
||||
test "$GCC" = yes && CFLAGS="-O2 -fno-strength-reduce -Wall"
|
||||
test "$GCC" = yes && CFLAGS="-O2 -fno-strength-reduce -Wall -Wno-deprecated-declarations"
|
||||
fi
|
||||
if test "$GCC" = yes; then
|
||||
gccversion=`$CC -dumpversion`
|
||||
@@ -4510,9 +4510,9 @@ if test x"$CLANG_VERSION_STRING" != x"" ; then
|
||||
CLANG_VERSION=`expr $CLANG_MAJOR '*' 1000000 '+' $CLANG_MINOR '*' 1000 '+' $CLANG_REVISION`
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG_VERSION" >&5
|
||||
$as_echo "$CLANG_VERSION" >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if clang supports -fno-strength-reduce" >&5
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if clang supports -fno-strength-reduce" >&5
|
||||
$as_echo_n "checking if clang supports -fno-strength-reduce... " >&6; }
|
||||
if test "$CLANG_VERSION" -ge 500002075 ; then
|
||||
if test "$CLANG_MAJOR" -ge 10 -o "$CLANG_VERSION" -ge 500002075 ; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
CFLAGS=`echo "$CFLAGS" | sed -e 's/-fno-strength-reduce/ /'`
|
||||
@@ -9262,6 +9262,7 @@ $as_echo "no GUI support" >&6; } ;;
|
||||
$as_echo "yes/auto - automatic GUI support" >&6; }
|
||||
gui_auto=yes
|
||||
SKIP_GTK2=
|
||||
SKIP_GTK3=
|
||||
SKIP_GNOME=
|
||||
SKIP_MOTIF=
|
||||
SKIP_ATHENA=
|
||||
@@ -9523,6 +9524,8 @@ $as_echo "gtk test disabled" >&6; }
|
||||
fi
|
||||
|
||||
if test "x$PKG_CONFIG" != "xno"; then
|
||||
save_skip_gtk3=$SKIP_GTK3
|
||||
SKIP_GTK3=YES
|
||||
|
||||
if test "X$GTK_CONFIG" != "Xno" -o "X$PKG_CONFIG" != "Xno"; then
|
||||
{
|
||||
@@ -9561,6 +9564,8 @@ $as_echo_n "checking for GTK - version >= $min_gtk_version... " >&6; }
|
||||
sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
|
||||
}
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK -dev package" >&5
|
||||
$as_echo_n "checking for GTK -dev package... " >&6; }
|
||||
no_gtk=yes
|
||||
fi
|
||||
|
||||
@@ -9664,6 +9669,8 @@ $as_echo "no" >&6; }
|
||||
SKIP_MOTIF=YES
|
||||
GUITYPE=GTK
|
||||
|
||||
else
|
||||
SKIP_GTK3=$save_skip_gtk3
|
||||
fi
|
||||
fi
|
||||
if test "x$GUITYPE" = "xGTK"; then
|
||||
@@ -9776,6 +9783,8 @@ $as_echo "gtk test disabled" >&6; }
|
||||
fi
|
||||
|
||||
if test "x$PKG_CONFIG" != "xno"; then
|
||||
save_skip_gtk2=$SKIP_GTK2
|
||||
SKIP_GTK2=YES
|
||||
|
||||
if test "X$GTK_CONFIG" != "Xno" -o "X$PKG_CONFIG" != "Xno"; then
|
||||
{
|
||||
@@ -9814,6 +9823,8 @@ $as_echo_n "checking for GTK - version >= $min_gtk_version... " >&6; }
|
||||
sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
|
||||
}
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK -dev package" >&5
|
||||
$as_echo_n "checking for GTK -dev package... " >&6; }
|
||||
no_gtk=yes
|
||||
fi
|
||||
|
||||
@@ -9920,6 +9931,8 @@ $as_echo "no" >&6; }
|
||||
|
||||
$as_echo "#define USE_GTK3 1" >>confdefs.h
|
||||
|
||||
else
|
||||
SKIP_GTK2=$save_skip_gtk2
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -956,11 +956,14 @@ do_autocmd(char_u *arg_in, int forceit)
|
||||
last_group = AUGROUP_ERROR; // for listing the group name
|
||||
if (*arg == '*' || *arg == NUL || *arg == '|')
|
||||
{
|
||||
for (event = (event_T)0; (int)event < (int)NUM_EVENTS;
|
||||
event = (event_T)((int)event + 1))
|
||||
if (do_autocmd_event(event, pat,
|
||||
once, nested, cmd, forceit, group) == FAIL)
|
||||
break;
|
||||
if (!forceit && *cmd != NUL)
|
||||
emsg(_(e_cannot_define_autocommands_for_all_events));
|
||||
else
|
||||
for (event = (event_T)0; (int)event < (int)NUM_EVENTS;
|
||||
event = (event_T)((int)event + 1))
|
||||
if (do_autocmd_event(event, pat,
|
||||
once, nested, cmd, forceit, group) == FAIL)
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
32
src/buffer.c
32
src/buffer.c
@@ -492,8 +492,10 @@ can_unload_buffer(buf_T *buf)
|
||||
* supposed to close the window but autocommands close all other windows.
|
||||
*
|
||||
* When "ignore_abort" is TRUE don't abort even when aborting() returns TRUE.
|
||||
*
|
||||
* Return TRUE when we got to the end and b_nwindows was decremented.
|
||||
*/
|
||||
void
|
||||
int
|
||||
close_buffer(
|
||||
win_T *win, // if not NULL, set b_last_cursor
|
||||
buf_T *buf,
|
||||
@@ -540,7 +542,7 @@ close_buffer(
|
||||
if (wipe_buf || unload_buf)
|
||||
{
|
||||
if (!can_unload_buffer(buf))
|
||||
return;
|
||||
return FALSE;
|
||||
|
||||
// Wiping out or unloading a terminal buffer kills the job.
|
||||
free_terminal(buf);
|
||||
@@ -571,7 +573,7 @@ close_buffer(
|
||||
// Disallow deleting the buffer when it is locked (already being closed or
|
||||
// halfway a command that relies on it). Unloading is allowed.
|
||||
if ((del_buf || wipe_buf) && !can_unload_buffer(buf))
|
||||
return;
|
||||
return FALSE;
|
||||
|
||||
// check no autocommands closed the window
|
||||
if (win != NULL && win_valid_any_tab(win))
|
||||
@@ -600,7 +602,7 @@ close_buffer(
|
||||
// Autocommands deleted the buffer.
|
||||
aucmd_abort:
|
||||
emsg(_(e_auabort));
|
||||
return;
|
||||
return FALSE;
|
||||
}
|
||||
--buf->b_locked;
|
||||
if (abort_if_last && one_window())
|
||||
@@ -625,7 +627,7 @@ aucmd_abort:
|
||||
#ifdef FEAT_EVAL
|
||||
// autocmds may abort script processing
|
||||
if (!ignore_abort && aborting())
|
||||
return;
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -653,7 +655,7 @@ aucmd_abort:
|
||||
// Return when a window is displaying the buffer or when it's not
|
||||
// unloaded.
|
||||
if (buf->b_nwindows > 0 || !unload_buf)
|
||||
return;
|
||||
return FALSE;
|
||||
|
||||
// Always remove the buffer when there is no file name.
|
||||
if (buf->b_ffname == NULL)
|
||||
@@ -683,11 +685,11 @@ aucmd_abort:
|
||||
|
||||
// Autocommands may have deleted the buffer.
|
||||
if (!bufref_valid(&bufref))
|
||||
return;
|
||||
return FALSE;
|
||||
#ifdef FEAT_EVAL
|
||||
// autocmds may abort script processing
|
||||
if (!ignore_abort && aborting())
|
||||
return;
|
||||
return FALSE;
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -698,7 +700,7 @@ aucmd_abort:
|
||||
* deleted buffer.
|
||||
*/
|
||||
if (buf == curbuf && !is_curbuf)
|
||||
return;
|
||||
return FALSE;
|
||||
|
||||
if (win_valid_any_tab(win) && win->w_buffer == buf)
|
||||
win->w_buffer = NULL; // make sure we don't use the buffer now
|
||||
@@ -755,6 +757,7 @@ aucmd_abort:
|
||||
buf->b_p_bl = FALSE;
|
||||
}
|
||||
// NOTE: at this point "curbuf" may be invalid!
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2561,12 +2564,15 @@ buflist_findpat(
|
||||
char_u *p;
|
||||
int toggledollar;
|
||||
|
||||
if (pattern_end == pattern + 1 && (*pattern == '%' || *pattern == '#'))
|
||||
// "%" is current file, "%%" or "#" is alternate file
|
||||
if ((pattern_end == pattern + 1 && (*pattern == '%' || *pattern == '#'))
|
||||
|| (in_vim9script() && pattern_end == pattern + 2
|
||||
&& pattern[0] == '%' && pattern[1] == '%'))
|
||||
{
|
||||
if (*pattern == '%')
|
||||
match = curbuf->b_fnum;
|
||||
else
|
||||
if (*pattern == '#' || pattern_end == pattern + 2)
|
||||
match = curwin->w_alt_fnum;
|
||||
else
|
||||
match = curbuf->b_fnum;
|
||||
#ifdef FEAT_DIFF
|
||||
if (diffmode && !diff_mode_buf(buflist_findnr(match)))
|
||||
match = -1;
|
||||
|
||||
@@ -1496,6 +1496,9 @@ buf_write(
|
||||
#endif
|
||||
#if defined(HAVE_SELINUX) || defined(HAVE_SMACK)
|
||||
mch_copy_sec(fname, backup);
|
||||
#endif
|
||||
#ifdef MSWIN
|
||||
(void)mch_copy_file_attribute(fname, backup);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
@@ -1909,12 +1912,7 @@ restore_backup:
|
||||
|
||||
#if defined(MSWIN)
|
||||
if (backup != NULL && overwriting && !append)
|
||||
{
|
||||
if (backup_copy)
|
||||
(void)mch_copy_file_attribute(wfname, backup);
|
||||
else
|
||||
(void)mch_copy_file_attribute(backup, wfname);
|
||||
}
|
||||
(void)mch_copy_file_attribute(backup, wfname);
|
||||
|
||||
if (!overwriting && !append)
|
||||
{
|
||||
|
||||
@@ -1594,6 +1594,12 @@ vim_isbdigit(int c)
|
||||
return (c == '0' || c == '1');
|
||||
}
|
||||
|
||||
static int
|
||||
vim_isodigit(int c)
|
||||
{
|
||||
return (c >= '0' && c <= '7');
|
||||
}
|
||||
|
||||
/*
|
||||
* Vim's own character class functions. These exist because many library
|
||||
* islower()/toupper() etc. do not work properly: they crash when used with
|
||||
@@ -1831,7 +1837,7 @@ vim_str2nr(
|
||||
// binary
|
||||
ptr += 2;
|
||||
else if ((what & STR2NR_OOCT)
|
||||
&& (pre == 'O' || pre == 'o') && vim_isbdigit(ptr[2])
|
||||
&& (pre == 'O' || pre == 'o') && vim_isodigit(ptr[2])
|
||||
&& (maxlen == 0 || maxlen > 2))
|
||||
// octal with prefix "0o"
|
||||
ptr += 2;
|
||||
|
||||
@@ -2047,6 +2047,8 @@ clip_get_selection(Clipboard_T *cbd)
|
||||
ca.count1 = 1;
|
||||
ca.retval = CA_NO_ADJ_OP_END;
|
||||
do_pending_operator(&ca, 0, TRUE);
|
||||
|
||||
// restore things
|
||||
set_y_previous(old_y_previous);
|
||||
set_y_current(old_y_current);
|
||||
curwin->w_cursor = old_cursor;
|
||||
|
||||
@@ -90,7 +90,7 @@ with_x_arg="$with_x"
|
||||
dnl Set default value for CFLAGS if none is defined or it's empty
|
||||
if test -z "$CFLAGS"; then
|
||||
CFLAGS="-O"
|
||||
test "$GCC" = yes && CFLAGS="-O2 -fno-strength-reduce -Wall"
|
||||
test "$GCC" = yes && CFLAGS="-O2 -fno-strength-reduce -Wall -Wno-deprecated-declarations"
|
||||
fi
|
||||
if test "$GCC" = yes; then
|
||||
dnl method that should work for nearly all versions
|
||||
@@ -127,8 +127,9 @@ if test x"$CLANG_VERSION_STRING" != x"" ; then
|
||||
dnl change the constant 500002075 below appropriately. To get the
|
||||
dnl integer corresponding to a version number, refer to the
|
||||
dnl definition of CLANG_VERSION above.
|
||||
dnl Clang 11 reports "11", assume Clang 10 and later work like this.
|
||||
AC_MSG_CHECKING(if clang supports -fno-strength-reduce)
|
||||
if test "$CLANG_VERSION" -ge 500002075 ; then
|
||||
if test "$CLANG_MAJOR" -ge 10 -o "$CLANG_VERSION" -ge 500002075 ; then
|
||||
AC_MSG_RESULT(no)
|
||||
CFLAGS=`echo "$CFLAGS" | sed -e 's/-fno-strength-reduce/ /'`
|
||||
else
|
||||
@@ -2447,6 +2448,7 @@ else
|
||||
yes|""|auto) AC_MSG_RESULT(yes/auto - automatic GUI support)
|
||||
gui_auto=yes
|
||||
SKIP_GTK2=
|
||||
SKIP_GTK3=
|
||||
SKIP_GNOME=
|
||||
SKIP_MOTIF=
|
||||
SKIP_ATHENA=
|
||||
@@ -2583,6 +2585,9 @@ AC_DEFUN(AM_PATH_GTK,
|
||||
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
|
||||
}
|
||||
else
|
||||
dnl Put some text before the "no" to hint at installing the gtk-dev
|
||||
dnl packages.
|
||||
AC_MSG_CHECKING(for GTK -dev package)
|
||||
no_gtk=yes
|
||||
fi
|
||||
|
||||
@@ -2755,6 +2760,10 @@ if test -z "$SKIP_GTK2"; then
|
||||
if test "x$PKG_CONFIG" != "xno"; then
|
||||
dnl First try finding version 2.2.0 or later. The 2.0.x series has
|
||||
dnl problems (bold fonts, --remote doesn't work).
|
||||
dnl Disable checking for GTK3 here, otherwise it's found when GTK2 is not
|
||||
dnl found.
|
||||
save_skip_gtk3=$SKIP_GTK3
|
||||
SKIP_GTK3=YES
|
||||
AM_PATH_GTK(2.2.0,
|
||||
[GUI_LIB_LOC="$GTK_LIBDIR"
|
||||
GTK_LIBNAME="$GTK_LIBS"
|
||||
@@ -2766,6 +2775,8 @@ if test -z "$SKIP_GTK2"; then
|
||||
SKIP_MOTIF=YES
|
||||
GUITYPE=GTK
|
||||
AC_SUBST(GTK_LIBNAME)
|
||||
else
|
||||
SKIP_GTK3=$save_skip_gtk3
|
||||
fi
|
||||
fi
|
||||
if test "x$GUITYPE" = "xGTK"; then
|
||||
@@ -2801,6 +2812,8 @@ if test -z "$SKIP_GTK3"; then
|
||||
fi
|
||||
|
||||
if test "x$PKG_CONFIG" != "xno"; then
|
||||
save_skip_gtk2=$SKIP_GTK2
|
||||
SKIP_GTK2=YES
|
||||
AM_PATH_GTK(3.0.0,
|
||||
[GUI_LIB_LOC="$GTK_LIBDIR"
|
||||
GTK_LIBNAME="$GTK_LIBS"
|
||||
@@ -2814,6 +2827,8 @@ if test -z "$SKIP_GTK3"; then
|
||||
GUITYPE=GTK
|
||||
AC_SUBST(GTK_LIBNAME)
|
||||
AC_DEFINE(USE_GTK3)
|
||||
else
|
||||
SKIP_GTK2=$save_skip_gtk2
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -864,7 +864,7 @@ has_profiling(
|
||||
*/
|
||||
static linenr_T
|
||||
debuggy_find(
|
||||
int file, // TRUE for a file, FALSE for a function
|
||||
int is_file, // TRUE for a file, FALSE for a function
|
||||
char_u *fname, // file or function name
|
||||
linenr_T after, // after this line number
|
||||
garray_T *gap, // either &dbg_breakp or &prof_ga
|
||||
@@ -873,20 +873,25 @@ debuggy_find(
|
||||
struct debuggy *bp;
|
||||
int i;
|
||||
linenr_T lnum = 0;
|
||||
char_u *name = fname;
|
||||
char_u *name = NULL;
|
||||
char_u *short_name = fname;
|
||||
int prev_got_int;
|
||||
|
||||
// Return quickly when there are no breakpoints.
|
||||
if (gap->ga_len == 0)
|
||||
return (linenr_T)0;
|
||||
|
||||
// Replace K_SNR in function name with "<SNR>".
|
||||
if (!file && fname[0] == K_SPECIAL)
|
||||
// For a script-local function remove the prefix, so that
|
||||
// "profile func Func" matches "Func" in any script. Otherwise it's very
|
||||
// difficult to profile/debug a script-local function. It may match a
|
||||
// function in the wrong script, but that is much better than not being
|
||||
// able to profile/debug a function in a script with unknown ID.
|
||||
// Also match a script-specific name.
|
||||
if (!is_file && fname[0] == K_SPECIAL)
|
||||
{
|
||||
short_name = vim_strchr(fname, '_') + 1;
|
||||
name = alloc(STRLEN(fname) + 3);
|
||||
if (name == NULL)
|
||||
name = fname;
|
||||
else
|
||||
if (name != NULL)
|
||||
{
|
||||
STRCPY(name, "<SNR>");
|
||||
STRCPY(name + 5, fname + 3);
|
||||
@@ -898,8 +903,8 @@ debuggy_find(
|
||||
// Skip entries that are not useful or are for a line that is beyond
|
||||
// an already found breakpoint.
|
||||
bp = &DEBUGGY(gap, i);
|
||||
if (((bp->dbg_type == DBG_FILE) == file &&
|
||||
bp->dbg_type != DBG_EXPR && (
|
||||
if (((bp->dbg_type == DBG_FILE) == is_file
|
||||
&& bp->dbg_type != DBG_EXPR && (
|
||||
#ifdef FEAT_PROFILE
|
||||
gap == &prof_ga ||
|
||||
#endif
|
||||
@@ -910,7 +915,10 @@ debuggy_find(
|
||||
// while matching should abort it.
|
||||
prev_got_int = got_int;
|
||||
got_int = FALSE;
|
||||
if (vim_regexec_prog(&bp->dbg_prog, FALSE, name, (colnr_T)0))
|
||||
if ((name != NULL
|
||||
&& vim_regexec_prog(&bp->dbg_prog, FALSE, name, (colnr_T)0))
|
||||
|| vim_regexec_prog(&bp->dbg_prog, FALSE,
|
||||
short_name, (colnr_T)0))
|
||||
{
|
||||
lnum = bp->dbg_lnum;
|
||||
if (fp != NULL)
|
||||
@@ -932,9 +940,9 @@ debuggy_find(
|
||||
{
|
||||
if (bp->dbg_val == NULL)
|
||||
{
|
||||
debug_oldval = typval_tostring(NULL);
|
||||
debug_oldval = typval_tostring(NULL, TRUE);
|
||||
bp->dbg_val = tv;
|
||||
debug_newval = typval_tostring(bp->dbg_val);
|
||||
debug_newval = typval_tostring(bp->dbg_val, TRUE);
|
||||
line = TRUE;
|
||||
}
|
||||
else
|
||||
@@ -945,11 +953,11 @@ debuggy_find(
|
||||
typval_T *v;
|
||||
|
||||
line = TRUE;
|
||||
debug_oldval = typval_tostring(bp->dbg_val);
|
||||
debug_oldval = typval_tostring(bp->dbg_val, TRUE);
|
||||
// Need to evaluate again, typval_compare() overwrites
|
||||
// "tv".
|
||||
v = eval_expr(bp->dbg_name, NULL);
|
||||
debug_newval = typval_tostring(v);
|
||||
debug_newval = typval_tostring(v, TRUE);
|
||||
free_tv(bp->dbg_val);
|
||||
bp->dbg_val = v;
|
||||
}
|
||||
@@ -958,8 +966,8 @@ debuggy_find(
|
||||
}
|
||||
else if (bp->dbg_val != NULL)
|
||||
{
|
||||
debug_oldval = typval_tostring(bp->dbg_val);
|
||||
debug_newval = typval_tostring(NULL);
|
||||
debug_oldval = typval_tostring(bp->dbg_val, TRUE);
|
||||
debug_newval = typval_tostring(NULL, TRUE);
|
||||
free_tv(bp->dbg_val);
|
||||
bp->dbg_val = NULL;
|
||||
line = TRUE;
|
||||
|
||||
24
src/dict.c
24
src/dict.c
@@ -107,6 +107,8 @@ rettv_dict_set(typval_T *rettv, dict_T *d)
|
||||
dict_free_contents(dict_T *d)
|
||||
{
|
||||
hashtab_free_contents(&d->dv_hashtab);
|
||||
free_type(d->dv_type);
|
||||
d->dv_type = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -951,11 +953,13 @@ eval_dict(char_u **arg, typval_T *rettv, evalarg_T *evalarg, int literal)
|
||||
}
|
||||
if (evaluate)
|
||||
{
|
||||
if (vim9script && check_for_string(&tvkey) == FAIL)
|
||||
#ifdef FEAT_FLOAT
|
||||
if (tvkey.v_type == VAR_FLOAT)
|
||||
{
|
||||
clear_tv(&tvkey);
|
||||
goto failret;
|
||||
tvkey.vval.v_string = typval_tostring(&tvkey, TRUE);
|
||||
tvkey.v_type = VAR_STRING;
|
||||
}
|
||||
#endif
|
||||
key = tv_get_string_buf_chk(&tvkey, buf);
|
||||
if (key == NULL)
|
||||
{
|
||||
@@ -1030,7 +1034,8 @@ eval_dict(char_u **arg, typval_T *rettv, evalarg_T *evalarg, int literal)
|
||||
|
||||
if (**arg != '}')
|
||||
{
|
||||
semsg(_(e_missing_dict_end), *arg);
|
||||
if (evalarg != NULL)
|
||||
semsg(_(e_missing_dict_end), *arg);
|
||||
failret:
|
||||
if (d != NULL)
|
||||
dict_free(d);
|
||||
@@ -1057,6 +1062,12 @@ dict_extend(dict_T *d1, dict_T *d2, char_u *action)
|
||||
hashitem_T *hi2;
|
||||
int todo;
|
||||
char_u *arg_errmsg = (char_u *)N_("extend() argument");
|
||||
type_T *type;
|
||||
|
||||
if (d1->dv_type != NULL && d1->dv_type->tt_member != NULL)
|
||||
type = d1->dv_type->tt_member;
|
||||
else
|
||||
type = NULL;
|
||||
|
||||
todo = (int)d2->dv_hashtab.ht_used;
|
||||
for (hi2 = d2->dv_hashtab.ht_array; todo > 0; ++hi2)
|
||||
@@ -1076,6 +1087,11 @@ dict_extend(dict_T *d1, dict_T *d2, char_u *action)
|
||||
if (!valid_varname(hi2->hi_key, TRUE))
|
||||
break;
|
||||
}
|
||||
|
||||
if (type != NULL
|
||||
&& check_typval_type(type, &HI2DI(hi2)->di_tv, 0) == FAIL)
|
||||
break;
|
||||
|
||||
if (di1 == NULL)
|
||||
{
|
||||
di1 = dictitem_copy(HI2DI(hi2));
|
||||
|
||||
@@ -339,6 +339,7 @@ win_line(
|
||||
int change_end = -1; // last col of changed area
|
||||
#endif
|
||||
colnr_T trailcol = MAXCOL; // start of trailing spaces
|
||||
colnr_T leadcol = 0; // start of leading spaces
|
||||
#ifdef FEAT_LINEBREAK
|
||||
int need_showbreak = FALSE; // overlong line, skipping first x
|
||||
// chars
|
||||
@@ -734,8 +735,9 @@ win_line(
|
||||
|
||||
if (wp->w_p_list)
|
||||
{
|
||||
if (lcs_space || lcs_trail || lcs_nbsp)
|
||||
if (lcs_space || lcs_trail || lcs_lead || lcs_nbsp)
|
||||
extra_check = TRUE;
|
||||
|
||||
// find start of trailing whitespace
|
||||
if (lcs_trail)
|
||||
{
|
||||
@@ -744,6 +746,19 @@ win_line(
|
||||
--trailcol;
|
||||
trailcol += (colnr_T) (ptr - line);
|
||||
}
|
||||
// find end of leading whitespace
|
||||
if (lcs_lead)
|
||||
{
|
||||
leadcol = 0;
|
||||
while (VIM_ISWHITE(ptr[leadcol]))
|
||||
++leadcol;
|
||||
if (ptr[leadcol] == NUL)
|
||||
// in a line full of spaces all of them are treated as trailing
|
||||
leadcol = (colnr_T)0;
|
||||
else
|
||||
// keep track of the first column not filled with spaces
|
||||
leadcol += (colnr_T) (ptr - line) + 1;
|
||||
}
|
||||
}
|
||||
|
||||
wcr_attr = get_wcr_attr(wp);
|
||||
@@ -1992,6 +2007,7 @@ win_line(
|
||||
|| (c == ' '
|
||||
&& mb_l == 1
|
||||
&& lcs_space
|
||||
&& ptr - line >= leadcol
|
||||
&& ptr - line <= trailcol)))
|
||||
{
|
||||
c = (c == ' ') ? lcs_space : lcs_nbsp;
|
||||
@@ -2012,9 +2028,10 @@ win_line(
|
||||
mb_utf8 = FALSE;
|
||||
}
|
||||
|
||||
if (trailcol != MAXCOL && ptr > line + trailcol && c == ' ')
|
||||
if ((trailcol != MAXCOL && ptr > line + trailcol && c == ' ')
|
||||
|| (leadcol != 0 && ptr < line + leadcol && c == ' '))
|
||||
{
|
||||
c = lcs_trail;
|
||||
c = (ptr > line + trailcol) ? lcs_trail : lcs_lead;
|
||||
if (!attr_pri)
|
||||
{
|
||||
n_attr = 1;
|
||||
|
||||
@@ -196,6 +196,10 @@ edit(
|
||||
#endif
|
||||
ins_apply_autocmds(EVENT_INSERTENTER);
|
||||
|
||||
// Check for changed highlighting, e.g. for ModeMsg.
|
||||
if (need_highlight_changed)
|
||||
highlight_changed();
|
||||
|
||||
// Make sure the cursor didn't move. Do call check_cursor_col() in
|
||||
// case the text was modified. Since Insert mode was not started yet
|
||||
// a call to check_cursor_col() may move the cursor, especially with
|
||||
@@ -1586,7 +1590,7 @@ decodeModifyOtherKeys(int c)
|
||||
// Recognize:
|
||||
// form 0: {lead}{key};{modifier}u
|
||||
// form 1: {lead}27;{modifier};{key}~
|
||||
if ((c == CSI || (c == ESC && *p == '[')) && typebuf.tb_len >= 4)
|
||||
if (typebuf.tb_len >= 4 && (c == CSI || (c == ESC && *p == '[')))
|
||||
{
|
||||
idx = (*p == '[');
|
||||
if (p[idx] == '2' && p[idx + 1] == '7' && p[idx + 2] == ';')
|
||||
|
||||
24
src/errors.h
24
src/errors.h
@@ -16,6 +16,8 @@ EXTERN char e_undefined_variable_str[]
|
||||
EXTERN char e_undefined_variable_char_str[]
|
||||
INIT(= N_("E121: Undefined variable: %c:%s"));
|
||||
#endif
|
||||
EXTERN char e_ambiguous_use_of_user_defined_command[]
|
||||
INIT(= N_("E464: Ambiguous use of user-defined command"));
|
||||
EXTERN char e_invalid_command[]
|
||||
INIT(= N_("E476: Invalid command"));
|
||||
#ifdef FEAT_EVAL
|
||||
@@ -41,8 +43,8 @@ EXTERN char e_syntax_error_at_str[]
|
||||
INIT(= N_("E1002: Syntax error at %s"));
|
||||
EXTERN char e_missing_return_value[]
|
||||
INIT(= N_("E1003: Missing return value"));
|
||||
EXTERN char e_white_space_required_before_and_after_str[]
|
||||
INIT(= N_("E1004: White space required before and after '%s'"));
|
||||
EXTERN char e_white_space_required_before_and_after_str_at_str[]
|
||||
INIT(= N_("E1004: White space required before and after '%s' at \"%s\""));
|
||||
EXTERN char e_too_many_argument_types[]
|
||||
INIT(= N_("E1005: Too many argument types"));
|
||||
EXTERN char e_str_is_used_as_argument[]
|
||||
@@ -82,7 +84,7 @@ EXTERN char e_const_requires_a_value[]
|
||||
EXTERN char e_type_or_initialization_required[]
|
||||
INIT(= N_("E1022: Type or initialization required"));
|
||||
EXTERN char e_using_number_as_bool_nr[]
|
||||
INIT(= N_("E1023: Using a Number as a Bool: %d"));
|
||||
INIT(= N_("E1023: Using a Number as a Bool: %lld"));
|
||||
EXTERN char e_using_number_as_string[]
|
||||
INIT(= N_("E1024: Using a Number as a String"));
|
||||
EXTERN char e_using_rcurly_outside_if_block_scope[]
|
||||
@@ -335,3 +337,19 @@ EXTERN char e_script_variable_invalid_after_reload_in_function_str[]
|
||||
INIT(= N_("E1149: Script variable is invalid after reload in function %s"));
|
||||
EXTERN char e_script_variable_type_changed[]
|
||||
INIT(= N_("E1150: Script variable type changed"));
|
||||
EXTERN char e_mismatched_endfunction[]
|
||||
INIT(= N_("E1151: Mismatched endfunction"));
|
||||
EXTERN char e_mismatched_enddef[]
|
||||
INIT(= N_("E1152: Mismatched enddef"));
|
||||
EXTERN char e_invalid_operation_for_bool[]
|
||||
INIT(= N_("E1153: Invalid operation for bool"));
|
||||
EXTERN char e_divide_by_zero[]
|
||||
INIT(= N_("E1154: Divide by zero"));
|
||||
EXTERN char e_cannot_define_autocommands_for_all_events[]
|
||||
INIT(= N_("E1155: Cannot define autocommands for ALL events"));
|
||||
EXTERN char e_cannot_change_arglist_recursively[]
|
||||
INIT(= N_("E1156: Cannot change the argument list recursively"));
|
||||
EXTERN char e_missing_return_type[]
|
||||
INIT(= N_("E1157: Missing return type"));
|
||||
EXTERN char e_cannot_use_flatten_in_vim9_script[]
|
||||
INIT(= N_("E1158: Cannot use flatten() in Vim9 script"));
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user