Update runtime files

This commit is contained in:
Bram Moolenaar
2022-11-23 23:46:31 +00:00
parent 43300f6034
commit b59ae59a58
31 changed files with 3817 additions and 89 deletions

View File

@ -1,4 +1,4 @@
*autocmd.txt* For Vim version 9.0. Last change: 2022 May 24
*autocmd.txt* For Vim version 9.0. Last change: 2022 Nov 22
VIM REFERENCE MANUAL by Bram Moolenaar
@ -1058,8 +1058,8 @@ QuickFixCmdPre Before a quickfix command is run (|:make|,
QuickFixCmdPost Like QuickFixCmdPre, but after a quickfix
command is run, before jumping to the first
location. For |:cfile| and |:lfile| commands
it is run after error file is read and before
moving to the first error.
it is run after the error file is read and
before moving to the first error.
See |QuickFixCmdPost-example|.
*QuitPre*
QuitPre When using `:quit`, `:wq` or `:qall`, before
@ -1342,8 +1342,9 @@ VimSuspend When the Vim instance is suspended. Only when
CTRL-Z was typed inside Vim, or when the SIGTSTP
signal was sent to Vim, but not for SIGSTOP.
*WinClosed*
WinClosed After closing a window. The pattern is
matched against the |window-ID|. Both
WinClosed When closing a window, just before it is
removed from the window layout. The pattern
is matched against the |window-ID|. Both
<amatch> and <afile> are set to the
|window-ID|. Non-recursive (event cannot
trigger itself).

View File

@ -1,4 +1,4 @@
*builtin.txt* For Vim version 9.0. Last change: 2022 Nov 14
*builtin.txt* For Vim version 9.0. Last change: 2022 Nov 21
VIM REFERENCE MANUAL by Bram Moolenaar
@ -5572,6 +5572,10 @@ map({expr1}, {expr2}) *map()*
If {expr2} is a |Funcref| it is called with two arguments:
1. The key or the index of the current item.
2. the value of the current item.
With a legacy script lambda you don't get an error if it only
accepts one argument, but with a Vim9 lambda you get "E1106:
One argument too many", the number of arguments must match.
The function must return the new value of the item. Example
that changes each value by "key-value": >
func KeyValue(key, val)
@ -7938,29 +7942,38 @@ setbufvar({buf}, {varname}, {val}) *setbufvar()*
setcellwidths({list}) *setcellwidths()*
Specify overrides for cell widths of character ranges. This
tells Vim how wide characters are, counted in screen cells.
This overrides 'ambiwidth'. Example: >
setcellwidths([[0xad, 0xad, 1],
\ [0x2194, 0x2199, 2]])
tells Vim how wide characters are when displayed in the
terminal, counted in screen cells. The values override
'ambiwidth'. Example: >
call setcellwidths([
\ [0x111, 0x111, 1],
\ [0x2194, 0x2199, 2],
\ ])
< *E1109* *E1110* *E1111* *E1112* *E1113* *E1114*
The {list} argument is a list of lists with each three
numbers. These three numbers are [low, high, width]. "low"
and "high" can be the same, in which case this refers to one
character. Otherwise it is the range of characters from "low"
to "high" (inclusive). "width" is either 1 or 2, indicating
the character width in screen cells.
An error is given if the argument is invalid, also when a
range overlaps with another.
< The {list} argument is a List of Lists with each three
numbers: [{low}, {high}, {width}]. *E1109* *E1110*
{low} and {high} can be the same, in which case this refers to
one character. Otherwise it is the range of characters from
{low} to {high} (inclusive). *E1111* *E1114*
Only characters with value 0x100 and higher can be used.
{width} must be either 1 or 2, indicating the character width
in screen cells. *E1112*
An error is given if the argument is invalid, also when a
range overlaps with another. *E1113*
If the new value causes 'fillchars' or 'listchars' to become
invalid it is rejected and an error is given.
To clear the overrides pass an empty list: >
To clear the overrides pass an empty {list}: >
setcellwidths([]);
< You can use the script $VIMRUNTIME/tools/emoji_list.vim to see
the effect for known emoji characters.
the effect for known emoji characters. Move the cursor
through the text to check if the cell widths of your terminal
match with what Vim knows about each emoji. If it doesn't
look right you need to adjust the {list} argument.
setcharpos({expr}, {list}) *setcharpos()*
Same as |setpos()| but uses the specified column number as the

View File

@ -1,4 +1,4 @@
*change.txt* For Vim version 9.0. Last change: 2022 Sep 13
*change.txt* For Vim version 9.0. Last change: 2022 Nov 20
VIM REFERENCE MANUAL by Bram Moolenaar

View File

@ -1,4 +1,4 @@
*digraph.txt* For Vim version 9.0. Last change: 2021 Jul 19
*digraph.txt* For Vim version 9.0. Last change: 2022 Nov 22
VIM REFERENCE MANUAL by Bram Moolenaar
@ -162,7 +162,7 @@ These are the RFC1345 digraphs for the one-byte characters. See the output of
":digraphs" for the others.
EURO
*euro* *euro-digraph*
Exception: RFC1345 doesn't specify the euro sign. In Vim the digraph =e was
added for this. Note the difference between latin1, where the digraph Cu is
used for the currency sign, and latin9 (iso-8859-15), where the digraph =e is

View File

@ -1,4 +1,4 @@
*eval.txt* For Vim version 9.0. Last change: 2022 Nov 13
*eval.txt* For Vim version 9.0. Last change: 2022 Nov 22
VIM REFERENCE MANUAL by Bram Moolenaar
@ -1548,7 +1548,7 @@ to be doubled. These two commands are equivalent: >
if a =~ '\s*'
interpolated-string *$quote* *interp-string*
interpolated-string *$quote* *interpolated-string*
--------------------
$"string" interpolated string constant *expr-$quote*
$'string' interpolated literal string constant *expr-$'*
@ -2859,7 +2859,7 @@ text...
does not need to be doubled.
If "eval" is specified, then any Vim expression in the
form {expr} is evaluated and the result replaces the
expression, like with |interp-string|.
expression, like with |interpolated-string|.
Example where $HOME is expanded: >
let lines =<< trim eval END
some text

View File

@ -79,7 +79,7 @@ The last command will create the following syntax files:
- `context-data-context.vim`;
- `context-data-interfaces.vim`;
- `context-data-metafun.vim`;
- `context-data-tex.vim`.
- `context-data-tex.vim`.
The same command can be used to update those syntax files.

View File

@ -892,7 +892,7 @@ Groß): >
endfor
return res
endfunc
if exists('+thesaurusfunc')
set thesaurusfunc=Thesaur
endif

View File

@ -1,4 +1,4 @@
*intro.txt* For Vim version 9.0. Last change: 2022 Oct 12
*intro.txt* For Vim version 9.0. Last change: 2022 Nov 20
VIM REFERENCE MANUAL by Bram Moolenaar

View File

@ -1,4 +1,4 @@
*map.txt* For Vim version 9.0. Last change: 2022 Nov 14
*map.txt* For Vim version 9.0. Last change: 2022 Nov 23
VIM REFERENCE MANUAL by Bram Moolenaar
@ -1853,7 +1853,7 @@ When executed as: >
This will invoke: >
:call Myfunc("arg1","arg2")
< *q-args-example*
< *q-args-example*
A more substantial example: >
:function Allargs(command)
: let i = 0

View File

@ -1,4 +1,4 @@
*options.txt* For Vim version 9.0. Last change: 2022 Nov 12
*options.txt* For Vim version 9.0. Last change: 2022 Nov 23
VIM REFERENCE MANUAL by Bram Moolenaar
@ -4548,17 +4548,21 @@ A jump table for the options with a short description can be found at |Q_op|.
|+find_in_path| or |+eval| features}
Expression to be used to transform the string found with the 'include'
option to a file name. Mostly useful to change "." to "/" for Java: >
:set includeexpr=substitute(v:fname,'\\.','/','g')
:setlocal includeexpr=substitute(v:fname,'\\.','/','g')
< The "v:fname" variable will be set to the file name that was detected.
Note the double backslash: the `:set` command first halves them, then
one remains it the value, where "\." matches a dot literally. For
simple character replacements `tr()` avoids the need for escaping: >
:setlocal includeexpr=tr(v:fname,'.','/')
<
Also used for the |gf| command if an unmodified file name can't be
found. Allows doing "gf" on the name after an 'include' statement.
Also used for |<cfile>|.
If the expression starts with s: or |<SID>|, then it is replaced with
the script ID (|local-function|). Example: >
set includeexpr=s:MyIncludeExpr()
set includeexpr=<SID>SomeIncludeExpr()
setlocal includeexpr=s:MyIncludeExpr()
setlocal includeexpr=<SID>SomeIncludeExpr()
< Otherwise, the expression is evaluated in the context of the script
where the option was set, thus script-local items are available.

View File

@ -95,7 +95,7 @@ The default value for $VIM is set at compile time and can be determined with:
:version
The normal value is /boot/system/data/vim for Haikuports version,
The normal value is /boot/system/data/vim for Haikuports version,
/boot/system/non-packaged/data/vim for manual builds. If you don't like it
you can set the VIM environment variable to override this, or set 'helpfile'
in your .vimrc: >
@ -223,11 +223,11 @@ Thank you, all!
14. Bugs & to-do *haiku-bugs*
The port is under development now and far away from the perfect state. For bug
reports, patches and wishes, please use the Vim mailing list or Vim Github
repository.
Mailing list: https://www.vim.org/maillist.php
Vim Github repository: https://github.com/vim/vim

View File

@ -1,4 +1,4 @@
*quickref.txt* For Vim version 9.0. Last change: 2022 Oct 28
*quickref.txt* For Vim version 9.0. Last change: 2022 Nov 23
VIM REFERENCE MANUAL by Bram Moolenaar

View File

@ -4901,7 +4901,7 @@ is mostly used, because it looks better.
In the next section you can find information about indivisual highlight groups
and how to specify colors for them. Most likely you want to just select a set
of colors by using the `:colorscheme` command, for example: >
colorscheme pablo
<
*:colo* *:colorscheme* *E185*

View File

@ -437,10 +437,12 @@ $quote eval.txt /*$quote*
'key' options.txt /*'key'*
'keymap' options.txt /*'keymap'*
'keymodel' options.txt /*'keymodel'*
'keyprotocol' options.txt /*'keyprotocol'*
'keywordprg' options.txt /*'keywordprg'*
'km' options.txt /*'km'*
'kmp' options.txt /*'kmp'*
'kp' options.txt /*'kp'*
'kpc' options.txt /*'kpc'*
'langmap' options.txt /*'langmap'*
'langmenu' options.txt /*'langmenu'*
'langnoremap' options.txt /*'langnoremap'*
@ -4362,6 +4364,7 @@ E1309 map.txt /*E1309*
E131 userfunc.txt /*E131*
E1310 gui.txt /*E1310*
E1311 map.txt /*E1311*
E1312 windows.txt /*E1312*
E132 userfunc.txt /*E132*
E133 userfunc.txt /*E133*
E134 change.txt /*E134*
@ -5614,7 +5617,10 @@ WinClosed autocmd.txt /*WinClosed*
WinEnter autocmd.txt /*WinEnter*
WinLeave autocmd.txt /*WinLeave*
WinNew autocmd.txt /*WinNew*
WinResized autocmd.txt /*WinResized*
WinResized-event windows.txt /*WinResized-event*
WinScrolled autocmd.txt /*WinScrolled*
WinScrolled-event windows.txt /*WinScrolled-event*
X change.txt /*X*
X11 options.txt /*X11*
X11-icon gui_x11.txt /*X11-icon*
@ -6692,6 +6698,8 @@ escape() builtin.txt /*escape()*
escape-bar version4.txt /*escape-bar*
euphoria3.vim syntax.txt /*euphoria3.vim*
euphoria4.vim syntax.txt /*euphoria4.vim*
euro digraph.txt /*euro*
euro-digraph digraph.txt /*euro-digraph*
eval eval.txt /*eval*
eval() builtin.txt /*eval()*
eval-examples eval.txt /*eval-examples*
@ -7487,6 +7495,7 @@ get() builtin.txt /*get()*
get-ms-debuggers debug.txt /*get-ms-debuggers*
getbufinfo() builtin.txt /*getbufinfo()*
getbufline() builtin.txt /*getbufline()*
getbufoneline() builtin.txt /*getbufoneline()*
getbufvar() builtin.txt /*getbufvar()*
getchangelist() builtin.txt /*getchangelist()*
getchar() builtin.txt /*getchar()*
@ -8066,7 +8075,7 @@ interfaces-5.2 version5.txt /*interfaces-5.2*
internal-variables eval.txt /*internal-variables*
internal-wordlist spell.txt /*internal-wordlist*
internet intro.txt /*internet*
interp-string eval.txt /*interp-string*
interpolated-string eval.txt /*interpolated-string*
interrupt() builtin.txt /*interrupt()*
intro intro.txt /*intro*
intro.txt intro.txt /*intro.txt*
@ -8158,6 +8167,7 @@ keypad-plus intro.txt /*keypad-plus*
keypad-point intro.txt /*keypad-point*
keys() builtin.txt /*keys()*
keytrans() builtin.txt /*keytrans()*
kitty-keyboard-protocol map.txt /*kitty-keyboard-protocol*
known-bugs todo.txt /*known-bugs*
l motion.txt /*l*
l: eval.txt /*l:*
@ -10860,6 +10870,7 @@ whitespace pattern.txt /*whitespace*
wildcard editing.txt /*wildcard*
wildcards editing.txt /*wildcards*
wildmenumode() builtin.txt /*wildmenumode()*
win-scrolled-resized windows.txt /*win-scrolled-resized*
win16 os_win32.txt /*win16*
win32 os_win32.txt /*win32*
win32-!start gui_w32.txt /*win32-!start*

View File

@ -1,4 +1,4 @@
*textprop.txt* For Vim version 9.0. Last change: 2022 Oct 13
*textprop.txt* For Vim version 9.0. Last change: 2022 Nov 18
VIM REFERENCE MANUAL by Bram Moolenaar
@ -147,7 +147,8 @@ prop_add({lnum}, {col}, {props})
above/below the line if {col} is zero; prepend
and/or append spaces for padding with
highlighting; cannot be used with "length",
"end_lnum" and "end_col" |virtual-text|
"end_lnum" and "end_col"
See |virtual-text| for more information.
*E1294*
text_align when "text" is present and {col} is zero;
specifies where to display the text:

View File

@ -539,7 +539,7 @@ 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

View File

@ -1,4 +1,4 @@
*todo.txt* For Vim version 9.0. Last change: 2022 Nov 18
*todo.txt* For Vim version 9.0. Last change: 2022 Nov 23
VIM REFERENCE MANUAL by Bram Moolenaar
@ -38,24 +38,25 @@ browser use: https://github.com/vim/vim/issues/1234
*known-bugs*
-------------------- Known bugs and current work -----------------------
Keyboard protocol (also see below):
- Use the kitty_protocol_state value, similar to seenModifyOtherKeys
- When kitty_protocol_state is set then reset seenModifyOtherKeys.
Do not set seenModifyOtherKeys for kitty-protocol sequences in
handle_key_with_modifier().
virtual text issues:
- #11463 `after` is sometimes wrapped with `list`, `nowrap` and
`listchars+=extends:>`, cursor position is also wrong
- #11520 `below` cannot be placed below empty lines
James Alvarado looks into it
- virtual text `below` highlighted incorrectly when `cursorline` enabled
(Issue #11588)
'smoothscroll':
- PR #11502 - cursor position wrong
- PR #11514 - mouse click is off
- CTRL-E and gj in long line with 'scrolloff' 5 not working well yet.
- computing 'scrolloff' position row use w_skipcol
- Check this list: https://github.com/vim/vim/pulls?q=is%3Apr+is%3Aopen+smoothscroll+author%3Aychin
- Long line spanning multiple pages: After a few CTRL-E then gj causes a
scroll. (Ernie Rael, 18 Nov) Also pressing space or "l"
Switching to window for a buffer in set_buffer_lines() doesn't work if there
is no window. Use aucmd_prepbuf() instead. #11558
Upcoming larger works:
- Make spell checking work with recent .dic/.aff files, e.g. French. #4916
@ -70,12 +71,6 @@ Upcoming larger works:
- example plugin: https://github.com/uga-rosa/dps-vsctm.vim
- Better support for detecting terminal emulator behavior (esp. special key
handling) and taking away the need for users to tweak their config.
> In the libvterm fork properly implement:
- modifyOtherKeys 2 - follow xterm implementation as close as possible
- Kitty key protocol - just like the latest Kitty
So that in TermDebug the key handling can be stepped through (instead of
having to log messages all over the place to see what happens). Ask
Leonerd about location of code, he might want to take over some of it.
> In the table of names pointing to the list of entries, with an additional
one. So that "xterm-kitty" can first load "xterm" and then add "kitty"
entries.
@ -88,11 +83,6 @@ Upcoming larger works:
-> May also send t_RV and delay starting a shell command until the
response has been seen, to make sure the other responses don't get read
by a shell command.
> Add an option with a list of names that, when matching $TERM, indicate the
kitty keyboard protocol should be used? Allows adding "foot" and others
later, without modifying Vim. Perhaps a pattern-value pair:
set keyprotocol=kitty:kitty,foot:kitty,xterm:mok2,doggy:mok2
Here "mok2" means modifyOtherKeys level 2.
> Can we use the req_more_codes_from_term() mechanism with more terminals?
Should we repeat it after executing a shell command?
Can also add this to the 'keyprotocol' option: "mok2+tcap"
@ -294,7 +284,7 @@ Resetting 't_ut' already causes this?
When scheme can't be found by configure there is no clear "not found" message:
configure:5769: checking MzScheme install prefix
configure:5781: result:
configure:5781: result:
Can "CSI nr X" be used instead of outputting spaces? Is it faster? #8002
@ -4568,8 +4558,11 @@ Autocommands:
BufChangePre, BufChangePost and RevertBuf. (Shah)
ViewChanged - triggered when the text scrolls and when the window size
changes.
WinResized - After a window has been resized
WinClose - Just before closing a window
QuickfixList - when any entry in the current list changes or another
list is selected
QuickfixPosition - when selecting another entry in the current quickfix
list
- Write the file now and then ('autosave'):
*'autosave'* *'as'* *'noautosave'* *'noas'*
'autosave' 'as' number (default 0)

View File

@ -1,4 +1,4 @@
*usr_12.txt* For Vim version 9.0. Last change: 2021 Apr 19
*usr_12.txt* For Vim version 9.0. Last change: 2022 Nov 19
VIM USER MANUAL - by Bram Moolenaar

View File

@ -1,4 +1,4 @@
*usr_41.txt* For Vim version 9.0. Last change: 2022 Nov 14
*usr_41.txt* For Vim version 9.0. Last change: 2022 Nov 22
VIM USER MANUAL - by Bram Moolenaar
@ -442,7 +442,7 @@ If you don't like the concatenation you can use the $"string" form, which
accepts an expression in curly braces: >
echo $"Name: {name}"
See |interp-string| for more information.
See |interpolated-string| for more information.
Borrowed from the C language is the conditional expression: >
@ -803,7 +803,7 @@ List manipulation: *list-functions*
call() call a function with List as arguments
index() index of a value in a List or Blob
indexof() index in a List or Blob where an expression
evaluates to true
evaluates to true
max() maximum value in a List
min() minimum value in a List
count() count number of times a value appears in a List

View File

@ -1,4 +1,4 @@
*version9.txt* For Vim version 9.0. Last change: 2022 Jun 28
*version9.txt* For Vim version 9.0. Last change: 2022 Nov 23
VIM REFERENCE MANUAL by Bram Moolenaar
@ -254,7 +254,7 @@ summary.
Many memory leaks, invalid memory accesses and crashes have been fixed.
See the list of patches below: |bug-fixes-9|.
Support for Vim expression evaluation in a string. |interp-string|
Support for Vim expression evaluation in a string. |interpolated-string|
Support for evaluating Vim expressions in a heredoc. |:let-heredoc|
Support for fuzzy matching:
@ -28478,7 +28478,7 @@ Files: src/change.c, src/drawscreen.c, src/structs.h
Patch 8.2.4645
Problem: 'shortmess' changed when session does not store options.
Solution: Save and restore 'shortmess' if needed. (James Charti,
Solution: Save and restore 'shortmess' if needed. (James Cherti,
closes #10037)
Files: src/session.c, src/testdir/test_mksession.vim

View File

@ -1993,10 +1993,10 @@ Some commands have already been reserved:
Some examples: >
abstract class Person
abstract class Person
static const prefix = 'xxx'
var name: string
def constructor(name: string)
this.name = name
enddef

View File

@ -1,4 +1,4 @@
*windows.txt* For Vim version 9.0. Last change: 2022 May 11
*windows.txt* For Vim version 9.0. Last change: 2022 Nov 22
VIM REFERENCE MANUAL by Bram Moolenaar

View File

@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2022 Nov 17
" Last Change: 2022 Nov 23
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")

View File

@ -4,7 +4,7 @@
" Previous Maintainer: Max Ischenko <mfi@ukr.net>
" Contributor: Dorai Sitaram <ds26@gte.com>
" C.D. MacEachern <craig.daniel.maceachern@gmail.com>
" Last Change: 2022 Nov 16
" Last Change: 2022 Nov 19
if exists("b:did_ftplugin")
finish
@ -21,7 +21,7 @@ setlocal formatoptions-=t formatoptions+=croql
let &l:define = '\<function\|\<local\%(\s\+function\)\='
" TODO: handle init.lua
setlocal includeexpr=substitute(v:fname,'\.','/','g')
setlocal includeexpr=tr(v:fname,'.','/')
setlocal suffixesadd=.lua
let b:undo_ftplugin = "setlocal cms< com< def< fo< inex< sua<"

View File

@ -0,0 +1,49 @@
" Vim filetype plugin
" Language: Mermaid
" Maintainer: Craig MacEachern <https://github.com/craigmac/vim-mermaid>
" Last Change: 2022 Oct 13
if exists("b:did_ftplugin")
finish
endif
let s:keepcpo= &cpo
set cpo&vim
" Use mermaid live editor's style
setlocal expandtab
setlocal shiftwidth=2
setlocal softtabstop=-1
setlocal tabstop=4
" TODO: comments, formatlist stuff, based on what?
setlocal comments=b:#,fb:-
setlocal commentstring=#\ %s
setlocal formatoptions+=tcqln formatoptions-=r formatoptions-=o
setlocal formatlistpat=^\\s*\\d\\+\\.\\s\\+\\\|^\\s*[-*+]\\s\\+\\\|^\\[^\\ze[^\\]]\\+\\]:\\&^.\\{4\\}
if exists('b:undo_ftplugin')
let b:undo_ftplugin .= "|setl cms< com< fo< flp< et< ts< sts< sw<"
else
let b:undo_ftplugin = "setl cms< com< fo< flp< et< ts< sts< sw<"
endif
if !exists("g:no_plugin_maps") && !exists("g:no_markdown_maps")
nnoremap <silent><buffer> [[ :<C-U>call search('\%(^#\{1,5\}\s\+\S\\|^\S.*\n^[=-]\+$\)', "bsW")<CR>
nnoremap <silent><buffer> ]] :<C-U>call search('\%(^#\{1,5\}\s\+\S\\|^\S.*\n^[=-]\+$\)', "sW")<CR>
xnoremap <silent><buffer> [[ :<C-U>exe "normal! gv"<Bar>call search('\%(^#\{1,5\}\s\+\S\\|^\S.*\n^[=-]\+$\)', "bsW")<CR>
xnoremap <silent><buffer> ]] :<C-U>exe "normal! gv"<Bar>call search('\%(^#\{1,5\}\s\+\S\\|^\S.*\n^[=-]\+$\)', "sW")<CR>
let b:undo_ftplugin .= '|sil! nunmap <buffer> [[|sil! nunmap <buffer> ]]|sil! xunmap <buffer> [[|sil! xunmap <buffer> ]]'
endif
" if has("folding") && get(g:, "markdown_folding", 0)
" setlocal foldexpr=MarkdownFold()
" setlocal foldmethod=expr
" setlocal foldtext=MarkdownFoldText()
" let b:undo_ftplugin .= "|setl foldexpr< foldmethod< foldtext<"
" endif
let &cpo = s:keepcpo
unlet s:keepcpo
" vim:set sw=2:

70
runtime/ftplugin/obse.vim Normal file
View File

@ -0,0 +1,70 @@
" Vim filetype plugin file
" Language: Oblivion Language (obl)
" Original Creator: Kat <katisntgood@gmail.com>
" Maintainer: Kat <katisntgood@gmail.com>
" Created: August 08, 2021
" Last Change: 13 November 2022
if exists("b:did_ftplugin")
finish
endif
let s:cpo_save = &cpo
set cpo&vim
let b:undo_ftplugin = "setl com< cms<"
noremap <script> <buffer> <silent> [[ <nop>
noremap <script> <buffer> <silent> ]] <nop>
noremap <script> <buffer> <silent> [] <nop>
noremap <script> <buffer> <silent> ][ <nop>
setlocal commentstring=;%s
setlocal comments=:;
function s:NextSection(type, backwards, visual)
if a:visual
normal! gv
endif
if a:type == 1
let pattern = '\v(\n\n^\S|%^)'
let flags = 'e'
elseif a:type == 2
let pattern = '\v^\S.*'
let flags = ''
endif
if a:backwards
let dir = '?'
else
let dir = '/'
endif
execute 'silent normal! ' . dir . pattern . dir . flags . "\r"
endfunction
noremap <script> <buffer> <silent> ]]
\ :call <SID>NextSection(1, 0, 0)<cr>
noremap <script> <buffer> <silent> [[
\ :call <SID>NextSection(1, 1, 0)<cr>
noremap <script> <buffer> <silent> ][
\ :call <SID>NextSection(2, 0, 0)<cr>
noremap <script> <buffer> <silent> []
\ :call <SID>NextSection(2, 1, 0)<cr>
vnoremap <script> <buffer> <silent> ]]
\ :<c-u>call <SID>NextSection(1, 0, 1)<cr>
vnoremap <script> <buffer> <silent> [[
\ :<c-u>call <SID>NextSection(1, 1, 1)<cr>
vnoremap <script> <buffer> <silent> ][
\ :<c-u>call <SID>NextSection(2, 0, 1)<cr>
vnoremap <script> <buffer> <silent> []
\ :<c-u>call <SID>NextSection(2, 1, 1)<cr>
let &cpo = s:cpo_save
unlet s:cpo_save

55
runtime/indent/obse.vim Normal file
View File

@ -0,0 +1,55 @@
" Vim indent file
" Language: Oblivion Language (obl)
" Original Creator: Kat <katisntgood@gmail.com>
" Maintainer: Kat <katisntgood@gmail.com>
" Created: 01 November 2021
" Last Change: 13 November 2022
if exists("b:did_indent")
finish
endif
let b:did_indent = 1
let b:undo_indent = 'setlocal indentkeys< indentexpr<'
setlocal indentexpr=GetOblIndent()
setlocal indentkeys+==~endif,=~else,=~loop,=~end
if exists("*GetOblIndent")
finish
endif
let s:keepcpo = &cpo
set cpo&vim
let s:SKIP_LINES = '^\s*\(;.*\)'
function! GetOblIndent()
let lnum = prevnonblank(v:lnum - 1)
let cur_text = getline(v:lnum)
if lnum == 0
return 0
endif
let prev_text = getline(lnum)
let found_cont = 0
let ind = indent(lnum)
" indent next line on start terms
let i = match(prev_text, '\c^\s*\(\s\+\)\?\(\(if\|while\|foreach\|begin\|else\%[if]\)\>\)')
if i >= 0
let ind += shiftwidth()
if strpart(prev_text, i, 1) == '|' && has('syntax_items')
\ && synIDattr(synID(lnum, i, 1), "name") =~ '\(Comment\|String\)$'
let ind -= shiftwidth()
endif
endif
" indent current line on end/else terms
if cur_text =~ '\c^\s*\(\s\+\)\?\(\(loop\|endif\|else\%[if]\)\>\)'
let ind = ind - shiftwidth()
" if we are at a begin block just go to column 0
elseif cur_text =~ '\c^\s*\(\s\+\)\?\(\(begin\|end\)\>\)'
let ind = 0
endif
return ind
endfunction
let &cpo = s:keepcpo
unlet s:keepcpo

View File

@ -1,7 +1,7 @@
" These commands create the option window.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2022 Oct 28
" Last Change: 2022 Nov 23
" If there already is an option window, jump to that one.
let buf = bufnr('option-window')
@ -583,6 +583,8 @@ call <SID>BinOptionG("xtermcodes", &xtermcodes)
call <SID>AddOption("weirdinvert", gettext("terminal that requires extra redrawing"))
call <SID>BinOptionG("wiv", &wiv)
call <SID>AddOption("keyprotocol", gettext("what keyboard protocol to use for which terminal"))
call <SID>OptionG("kpc", &kpc)
call <SID>AddOption("esckeys", gettext("recognize keys that start with <Esc> in Insert mode"))
call <SID>BinOptionG("ek", &ek)
call <SID>AddOption("scrolljump", gettext("minimal number of lines to scroll at a time"))

155
runtime/syntax/mermaid.vim Normal file
View File

@ -0,0 +1,155 @@
" Vim syntax file
" Language: Mermaid
" Maintainer: Craig MacEahern <https://github.com/craigmac/vim-mermaid>
" Filenames: *.mmd
" Last Change: 2022 Nov 22
if exists("b:current_syntax")
finish
endif
let s:cpo_save = &cpo
set cpo&vim
syntax iskeyword @,48-57,192-255,$,_,-,:
syntax keyword mermaidKeyword
\ _blank
\ _self
\ _parent
\ _top
\ ::icon
\ accDescr
\ accTitle
\ actor
\ activate
\ alt
\ and
\ as
\ autonumber
\ branch
\ break
\ callback
\ checkout
\ class
\ classDef
\ classDiagram
\ click
\ commit
\ commitgitGraph
\ critical
\ dataFormat
\ dateFormat
\ deactivate
\ direction
\ element
\ else
\ end
\ erDiagram
\ flowchart
\ gantt
\ gitGraph
\ graph
\ journey
\ link
\ LR
\ TD
\ TB
\ RL
\ loop
\ merge
\ mindmap root
\ Note
\ Note right of
\ Note left of
\ Note over
\ note
\ note right of
\ note left of
\ note over
\ opt
\ option
\ par
\ participant
\ pie
\ rect
\ requirement
\ rgb
\ section
\ sequenceDiagram
\ state
\ stateDiagram
\ stateDiagram-v2
\ style
\ subgraph
\ title
highlight link mermaidKeyword Keyword
syntax match mermaidStatement "|"
syntax match mermaidStatement "--\?[>x)]>\?+\?-\?"
syntax match mermaidStatement "\~\~\~"
syntax match mermaidStatement "--"
syntax match mermaidStatement "---"
syntax match mermaidStatement "-->"
syntax match mermaidStatement "-\."
syntax match mermaidStatement "\.->"
syntax match mermaidStatement "-\.-"
syntax match mermaidStatement "-\.\.-"
syntax match mermaidStatement "-\.\.\.-"
syntax match mermaidStatement "=="
syntax match mermaidStatement "==>"
syntax match mermaidStatement "===>"
syntax match mermaidStatement "====>"
syntax match mermaidStatement "&"
syntax match mermaidStatement "--o"
syntax match mermaidStatement "--x"
syntax match mermaidStatement "x--x"
syntax match mermaidStatement "-----"
syntax match mermaidStatement "---->"
syntax match mermaidStatement "==="
syntax match mermaidStatement "===="
syntax match mermaidStatement "====="
syntax match mermaidStatement ":::"
syntax match mermaidStatement "<|--"
syntax match mermaidStatement "\*--"
syntax match mermaidStatement "o--"
syntax match mermaidStatement "o--o"
syntax match mermaidStatement "<--"
syntax match mermaidStatement "<-->"
syntax match mermaidStatement "\.\."
syntax match mermaidStatement "<\.\."
syntax match mermaidStatement "<|\.\."
syntax match mermaidStatement "--|>"
syntax match mermaidStatement "--\*"
syntax match mermaidStatement "--o"
syntax match mermaidStatement "\.\.>"
syntax match mermaidStatement "\.\.|>"
syntax match mermaidStatement "<|--|>"
syntax match mermaidStatement "||--o{"
highlight link mermaidStatement Statement
syntax match mermaidIdentifier "[\+-]\?\w\+(.*)[\$\*]\?"
highlight link mermaidIdentifier Identifier
syntax match mermaidType "[\+-\#\~]\?\cint\>"
syntax match mermaidType "[\+-\#\~]\?\cString\>"
syntax match mermaidType "[\+-\#\~]\?\cbool\>"
syntax match mermaidType "[\+-\#\~]\?\cBigDecimal\>"
syntax match mermaidType "[\+-\#\~]\?\cList\~.\+\~"
syntax match mermaidType "<<\w\+>>"
highlight link mermaidType Type
syntax match mermaidComment "%%.*$"
highlight link mermaidComment Comment
syntax region mermaidDirective start="%%{" end="\}%%"
highlight link mermaidDirective PreProc
syntax region mermaidString start=/"/ skip=/\\"/ end=/"/
highlight link mermaidString String
let b:current_syntax = "mermaid"
let &cpo = s:cpo_save
unlet s:cpo_save
" vim:set sw=2:

3360
runtime/syntax/obse.vim Normal file

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,8 @@
" Language: sway window manager config
" Original Author: James Eapen <james.eapen@vai.org>
" Maintainer: James Eapen <james.eapen@vai.org>
" Version: 0.11.1
" Version: 0.1.6
" Reference version (jamespeapen/swayconfig.vim): 0.11.6
" Last Change: 2022 Aug 08
" References:
@ -23,10 +24,6 @@ scriptencoding utf-8
" Error
"syn match swayConfigError /.*/
" Group mode/bar
syn keyword swayConfigBlockKeyword set input contained
syn region swayConfigBlock start=+.*s\?{$+ end=+^}$+ contains=i3ConfigBlockKeyword,swayConfigBlockKeyword,i3ConfigString,i3ConfigBind,i3ConfigComment,i3ConfigFont,i3ConfigFocusWrappingType,i3ConfigColor,i3ConfigVariable transparent keepend extend
" binding
syn keyword swayConfigBindKeyword bindswitch bindgesture contained
syn match swayConfigBind /^\s*\(bindswitch\)\s\+.*$/ contains=i3ConfigVariable,i3ConfigBindKeyword,swayConfigBindKeyword,i3ConfigVariableAndModifier,i3ConfigNumber,i3ConfigUnit,i3ConfigUnitOr,i3ConfigBindArgument,i3ConfigModifier,i3ConfigAction,i3ConfigString,i3ConfigGapStyleKeyword,i3ConfigBorderStyleKeyword
@ -45,7 +42,7 @@ syn match swayConfigFloating /^\s*floating\s\+\(enable\|disable\|toggle\)\s*$/ c
syn clear i3ConfigFloatingModifier
syn keyword swayConfigFloatingModifier floating_modifier contained
syn match swayConfigFloatingMouseAction /^\s\?.*floating_modifier\s.*\(normal\|inverted\)$/ contains=swayConfigFloatingModifier,i3ConfigVariable
syn match swayConfigFloatingMouseAction /^\s\?.*floating_modifier\s\S\+\s\?\(normal\|inverted\|none\)\?$/ contains=swayConfigFloatingModifier,i3ConfigVariable
" Gaps
syn clear i3ConfigSmartBorderKeyword
@ -57,6 +54,10 @@ syn match swayConfigSmartBorder /^\s*smart_borders\s\+\(on\|no_gaps\|off\)\s\?$/
syn keyword swayConfigClientColorKeyword focused_tab_title contained
syn match swayConfigClientColor /^\s*client.\w\+\s\+.*$/ contains=i3ConfigClientColorKeyword,i3ConfigColor,i3ConfigVariable,i3ConfigClientColorKeyword,swayConfigClientColorKeyword
" Input config
syn keyword swayConfigInputKeyword input contained
syn match swayConfigInput /^\s*input\s\+.*$/ contains=swayConfigInputKeyword
" set display outputs
syn match swayConfigOutput /^\s*output\s\+.*$/ contains=i3ConfigOutput
@ -65,21 +66,34 @@ syn keyword swayConfigFocusKeyword focus contained
syn keyword swayConfigFocusType output contained
syn match swayConfigFocus /^\s*focus\soutput\s.*$/ contains=swayConfigFocusKeyword,swayConfigFocusType
" focus follows mouse
syn clear i3ConfigFocusFollowsMouseType
syn clear i3ConfigFocusFollowsMouse
syn keyword swayConfigFocusFollowsMouseType yes no always contained
syn match swayConfigFocusFollowsMouse /^\s*focus_follows_mouse\s\+\(yes\|no\|always\)\s\?$/ contains=i3ConfigFocusFollowsMouseKeyword,swayConfigFocusFollowsMouseType
" xwayland
syn keyword swayConfigXwaylandKeyword xwayland contained
syn match swayConfigXwaylandModifier /^\s*xwayland\s\+\(enable\|disable\|force\)\s\?$/ contains=swayConfigXwaylandKeyword
" Group mode/bar
syn clear i3ConfigBlock
syn region swayConfigBlock start=+.*s\?{$+ end=+^}$+ contains=i3ConfigBlockKeyword,i3ConfigString,i3ConfigBind,i3ConfigInitializeKeyword,i3ConfigComment,i3ConfigFont,i3ConfigFocusWrappingType,i3ConfigColor,i3ConfigVariable,swayConfigInputKeyword,i3ConfigOutput transparent keepend extend
"hi def link swayConfigError Error
hi def link i3ConfigFloating Error
hi def link swayConfigFloating Type
hi def link swayConfigFloatingMouseAction Type
hi def link swayConfigFocusKeyword Type
hi def link swayConfigSmartBorderKeyword Type
hi def link swayConfigInputKeyword Type
hi def link swayConfigFocusFollowsMouseType Type
hi def link swayConfigBindGestureCommand Identifier
hi def link swayConfigBindGestureDirection Constant
hi def link swayConfigBindGesturePinchDirection Constant
hi def link swayConfigBindKeyword Identifier
hi def link swayConfigBlockKeyword Identifier
hi def link swayConfigClientColorKeyword Identifier
hi def link swayConfigFloatingKeyword Identifier
hi def link swayConfigFloatingModifier Identifier