mirror of
https://github.com/vim/vim
synced 2025-07-16 01:01:58 +00:00
Update runtime files.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 8.1. Last change: 2019 Apr 04
|
||||
*eval.txt* For Vim version 8.1. Last change: 2019 Apr 06
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -1044,7 +1044,7 @@ expr7 * expr7 Number multiplication *expr-star*
|
||||
expr7 / expr7 Number division *expr-/*
|
||||
expr7 % expr7 Number modulo *expr-%*
|
||||
|
||||
For all, except ".", Strings are converted to Numbers.
|
||||
For all, except "." and "..", Strings are converted to Numbers.
|
||||
For bitwise operators see |and()|, |or()| and |xor()|.
|
||||
|
||||
Note the difference between "+" and ".":
|
||||
@ -2508,9 +2508,7 @@ py3eval({expr}) any evaluate |python3| expression
|
||||
pyxeval({expr}) any evaluate |python_x| expression
|
||||
range({expr} [, {max} [, {stride}]])
|
||||
List items from {expr} to {max}
|
||||
readdir({directory} [, {expr}])
|
||||
List file names on {dir} with evalating
|
||||
{expr}
|
||||
readdir({dir} [, {expr}]) List file names in {dir} selected by {expr}
|
||||
readfile({fname} [, {type} [, {max}]])
|
||||
List get list of lines from file {fname}
|
||||
reg_executing() String get the executing register name
|
||||
@ -5398,6 +5396,9 @@ glob({expr} [, {nosuf} [, {list} [, {alllinks}]]]) *glob()*
|
||||
|
||||
If the expansion fails, the result is an empty String or List.
|
||||
|
||||
You can also use |readdir()| if you need to do complicated
|
||||
things, such as limiting the number of matches.
|
||||
|
||||
A name for a non-existing file is not included. A symbolic
|
||||
link is only included if it points to an existing file.
|
||||
However, when the {alllinks} argument is present and it is
|
||||
@ -7279,6 +7280,8 @@ range({expr} [, {max} [, {stride}]]) *range()*
|
||||
*readdir()*
|
||||
readdir({directory} [, {expr}])
|
||||
Return a list with file and directory names in {directory}.
|
||||
You can also use |glob()| if you don't need to do complicated
|
||||
things, such as limiting the number of matches.
|
||||
|
||||
When {expr} is omitted all entries are included.
|
||||
When {expr} is given, it is evaluated to check what to do:
|
||||
@ -7344,7 +7347,7 @@ reg_executing() *reg_executing()*
|
||||
|
||||
reg_recording() *reg_recording()*
|
||||
Returns the single letter name of the register being recorded.
|
||||
Returns an empty string string when not recording. See |q|.
|
||||
Returns an empty string when not recording. See |q|.
|
||||
|
||||
reltime([{start} [, {end}]]) *reltime()*
|
||||
Return an item that represents a time value. The format of
|
||||
|
@ -1,4 +1,4 @@
|
||||
*index.txt* For Vim version 8.1. Last change: 2019 Mar 21
|
||||
*index.txt* For Vim version 8.1. Last change: 2019 Apr 05
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -1547,7 +1547,8 @@ tag command action ~
|
||||
|:sbrewind| :sbr[ewind] split window and go to first file in the
|
||||
buffer list
|
||||
|:scriptnames| :scr[iptnames] list names of all sourced Vim scripts
|
||||
|:scriptencoding| :scripte[ncoding] encoding used in sourced Vim script
|
||||
|:scriptencoding| :scripte[ncoding] encoding used in sourced Vim script
|
||||
|:scriptversion| :scriptv[ersion] version of Vim script used
|
||||
|:scscope| :scs[cope] split window and execute cscope command
|
||||
|:set| :se[t] show or set options
|
||||
|:setfiletype| :setf[iletype] set 'filetype', unless it was set already
|
||||
|
@ -1,4 +1,4 @@
|
||||
*insert.txt* For Vim version 8.1. Last change: 2019 Mar 30
|
||||
*insert.txt* For Vim version 8.1. Last change: 2019 Apr 06
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
|
@ -1,4 +1,4 @@
|
||||
*message.txt* For Vim version 8.1. Last change: 2018 Dec 30
|
||||
*message.txt* For Vim version 8.1. Last change: 2019 Apr 04
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -703,11 +703,13 @@ Or use ":set nocp".
|
||||
This happens when an Ex command with mandatory argument(s) was executed, but
|
||||
no argument has been specified.
|
||||
|
||||
*E474* *E475* >
|
||||
*E474* *E475* *E983* >
|
||||
Invalid argument
|
||||
Invalid argument: {arg}
|
||||
Duplicate argument: {arg}
|
||||
|
||||
An Ex command has been executed, but an invalid argument has been specified.
|
||||
An Ex command or function has been executed, but an invalid argument has been
|
||||
specified.
|
||||
|
||||
*E488* >
|
||||
Trailing characters
|
||||
|
@ -1,4 +1,4 @@
|
||||
*repeat.txt* For Vim version 8.1. Last change: 2019 Apr 04
|
||||
*repeat.txt* For Vim version 8.1. Last change: 2019 Apr 05
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -327,8 +327,9 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
|
||||
|
||||
:scriptv[ersion] {version} *:scriptv* *:scriptversion*
|
||||
*E999* *E984*
|
||||
Specify the version of Vim for the lines that follow.
|
||||
Does not apply to sourced scripts.
|
||||
Specify the version of Vim for the lines that follow
|
||||
in the same file. Only applies at the toplevel of
|
||||
sourced scripts, not inside functions.
|
||||
|
||||
If {version} is higher than what the current Vim
|
||||
version supports E999 will be given. You either need
|
||||
|
@ -2531,6 +2531,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
:let-option eval.txt /*:let-option*
|
||||
:let-register eval.txt /*:let-register*
|
||||
:let-unpack eval.txt /*:let-unpack*
|
||||
:let..= eval.txt /*:let..=*
|
||||
:let.= eval.txt /*:let.=*
|
||||
:let/= eval.txt /*:let\/=*
|
||||
:letstar= eval.txt /*:letstar=*
|
||||
@ -2936,6 +2937,8 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
:scripte repeat.txt /*:scripte*
|
||||
:scriptencoding repeat.txt /*:scriptencoding*
|
||||
:scriptnames repeat.txt /*:scriptnames*
|
||||
:scriptv repeat.txt /*:scriptv*
|
||||
:scriptversion repeat.txt /*:scriptversion*
|
||||
:scs if_cscop.txt /*:scs*
|
||||
:scscope if_cscop.txt /*:scscope*
|
||||
:se options.txt /*:se*
|
||||
@ -4692,7 +4695,11 @@ E98 diff.txt /*E98*
|
||||
E980 eval.txt /*E980*
|
||||
E981 starting.txt /*E981*
|
||||
E982 terminal.txt /*E982*
|
||||
E983 message.txt /*E983*
|
||||
E984 repeat.txt /*E984*
|
||||
E985 eval.txt /*E985*
|
||||
E99 diff.txt /*E99*
|
||||
E999 repeat.txt /*E999*
|
||||
EX intro.txt /*EX*
|
||||
EXINIT starting.txt /*EXINIT*
|
||||
Elvis intro.txt /*Elvis*
|
||||
@ -5242,6 +5249,7 @@ autocmd-groups autocmd.txt /*autocmd-groups*
|
||||
autocmd-intro autocmd.txt /*autocmd-intro*
|
||||
autocmd-list autocmd.txt /*autocmd-list*
|
||||
autocmd-nested autocmd.txt /*autocmd-nested*
|
||||
autocmd-once autocmd.txt /*autocmd-once*
|
||||
autocmd-osfiletypes filetype.txt /*autocmd-osfiletypes*
|
||||
autocmd-patterns autocmd.txt /*autocmd-patterns*
|
||||
autocmd-remove autocmd.txt /*autocmd-remove*
|
||||
@ -6071,6 +6079,7 @@ expr-' eval.txt /*expr-'*
|
||||
expr-+ eval.txt /*expr-+*
|
||||
expr-- eval.txt /*expr--*
|
||||
expr-. eval.txt /*expr-.*
|
||||
expr-.. eval.txt /*expr-..*
|
||||
expr-/ eval.txt /*expr-\/*
|
||||
expr-< eval.txt /*expr-<*
|
||||
expr-<# eval.txt /*expr-<#*
|
||||
@ -7240,6 +7249,7 @@ ip motion.txt /*ip*
|
||||
iquote motion.txt /*iquote*
|
||||
is motion.txt /*is*
|
||||
isdirectory() eval.txt /*isdirectory()*
|
||||
isinf() eval.txt /*isinf()*
|
||||
islocked() eval.txt /*islocked()*
|
||||
isnan() eval.txt /*isnan()*
|
||||
it motion.txt /*it*
|
||||
@ -7367,6 +7377,7 @@ list-identity eval.txt /*list-identity*
|
||||
list-index eval.txt /*list-index*
|
||||
list-modification eval.txt /*list-modification*
|
||||
list-repeat windows.txt /*list-repeat*
|
||||
list2str() eval.txt /*list2str()*
|
||||
lite.vim syntax.txt /*lite.vim*
|
||||
literal-string eval.txt /*literal-string*
|
||||
lnum-variable eval.txt /*lnum-variable*
|
||||
@ -8316,6 +8327,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*
|
||||
readdir() eval.txt /*readdir()*
|
||||
readfile() eval.txt /*readfile()*
|
||||
readline.vim syntax.txt /*readline.vim*
|
||||
recording repeat.txt /*recording*
|
||||
@ -8734,6 +8746,7 @@ static-tag tagsrch.txt /*static-tag*
|
||||
status-line windows.txt /*status-line*
|
||||
statusmsg-variable eval.txt /*statusmsg-variable*
|
||||
str2float() eval.txt /*str2float()*
|
||||
str2list() eval.txt /*str2list()*
|
||||
str2nr() eval.txt /*str2nr()*
|
||||
strcasestr() eval.txt /*strcasestr()*
|
||||
strcharpart() eval.txt /*strcharpart()*
|
||||
@ -9679,6 +9692,8 @@ vimrc-filetype usr_05.txt /*vimrc-filetype*
|
||||
vimrc-intro usr_05.txt /*vimrc-intro*
|
||||
vimrc-option-example starting.txt /*vimrc-option-example*
|
||||
vimrc_example.vim usr_05.txt /*vimrc_example.vim*
|
||||
vimscript-version eval.txt /*vimscript-version*
|
||||
vimscript-versions eval.txt /*vimscript-versions*
|
||||
vimtutor usr_01.txt /*vimtutor*
|
||||
virtcol() eval.txt /*virtcol()*
|
||||
visual-block visual.txt /*visual-block*
|
||||
|
@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 8.1. Last change: 2019 Apr 04
|
||||
*todo.txt* For Vim version 8.1. Last change: 2019 Apr 07
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -156,13 +156,6 @@ 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.
|
||||
|
||||
Using "5gj" starting inside a closed fold does not work on screen lines but on
|
||||
text lines. (Julius Hulsmann, #4095)
|
||||
|
||||
Add "-once" to ":autocmd". Also add "-nested" as an alias for "nested".
|
||||
(Justin M. Keyes, #4100) Syntax of -once may be strange. ++once and ++nested
|
||||
is better?
|
||||
|
||||
C syntax: {} inside () causes following {} to be highlighted as error.
|
||||
(Michalis Giannakidis, 2006 Jun 1)
|
||||
|
||||
@ -175,8 +168,6 @@ added?
|
||||
This modeline throws unexpected errors: (#4165)
|
||||
vim: syn=nosyntax
|
||||
|
||||
Patch for listchars with multi-byte chars. #4197, discussion on #4046.
|
||||
|
||||
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.
|
||||
@ -200,10 +191,6 @@ Motif: Build on Ubuntu can't enter any text in dialog text fields.
|
||||
|
||||
nvo-mode mapping works on Windows, not on Linux. (#3678)
|
||||
|
||||
Patch to add isinf(). (Ozaki Kiichi, #3787)
|
||||
|
||||
Patch to de-duplicate code and add error message. (Yegappan, #4207)
|
||||
|
||||
No test for NULL after allocating memory: #4174
|
||||
src/crypt.c line 256;
|
||||
src/crypt_zip.c line 93;
|
||||
@ -218,60 +205,31 @@ No test for NULL after allocating memory: #4174
|
||||
src/option.c line 12980;
|
||||
src/popupmnu.c line 1090;
|
||||
|
||||
Missing tests for:
|
||||
- add_termcap_entry()
|
||||
|
||||
When using exclusive selection and vi" that fails, cursor moves to the left.
|
||||
Cursor should not move. (#4024)
|
||||
|
||||
Patch to be able to separately map CTRL-H and BS on Windows.
|
||||
(Linwei, 2017 Jul 11, #1833)
|
||||
|
||||
Patch to fix encoding of messages on MS-Windows. (Yasuhiro Matsumoto, 2019 Feb
|
||||
13, #3914)
|
||||
|
||||
Patch to fix encoding conversion in messages. (#3969)
|
||||
Check that this is fixed: (ichizok)
|
||||
vim --clean -X -V1 -es -c 'echo "hello"' -c quit
|
||||
|
||||
Incsearch test fails when locale is "C". (Dominique Pelle, #3986)
|
||||
Also run all tests with C locale?
|
||||
|
||||
Patch to improve readability of complicated if(). (ichizok, 2019 Jan 29,
|
||||
#3879)
|
||||
|
||||
"vat" doesn't work well on XML when the closing > is on another line.
|
||||
#3927
|
||||
|
||||
Patch to include ARM64 support. (Leendert van Doorn, 2019 Feb 9)
|
||||
|
||||
Pasting foo} causes Vim to behave weird. (John Little, 2018 Jun 17)
|
||||
Related to bracketed paste. I cannot reproduce it.
|
||||
|
||||
Patch to add tagfunc(). Cleaned up by Christian Brabandt, 2013 Jun 22.
|
||||
New update 2017 Apr 10, #1628
|
||||
https://github.com/chrisbra/vim-mq-patches/blob/master/tagfunc
|
||||
Updated by Andy Massimino, 2018 Feb 7:
|
||||
https://github.com/andymass/vim/commit/4e3aa0a5dab96d2799567622f3f537e357aa479e
|
||||
Or should we make it asynchronous?
|
||||
Patch by Andy Massimino: #4010 - needs a bit more work
|
||||
|
||||
When 'confirm' is set a "silent q" doesn't show the prompt. It should in this
|
||||
case. (Nate Peterson, 2019 Jan 31, #3892)
|
||||
For "silent! q" it should not prompt and just fail.
|
||||
|
||||
Patch to add readdir(). (Yasuhiro Matsumoto, #2439)
|
||||
|
||||
Patch to add list2str() and str2list(). #4190. Can be done with split/join
|
||||
and map(), but not for composing characters.
|
||||
|
||||
Patch to add equal field to complete items. (#3887)
|
||||
Needs to sync to latest version, merge conflicts.
|
||||
Summary: no way to avoid filtering for autocomlete function
|
||||
Problem: No way to avoid filtering for autocomlete function, causing
|
||||
flickering of the popup menu.
|
||||
Solution: Add the "equal" field to complete items. (closes #3887)
|
||||
|
||||
Patch to add CompleteChanged event: triggered when the complete popup menu
|
||||
changes. #4176
|
||||
|
||||
Patch to add tab-local directories. (Yegappan, #4212)
|
||||
Wait a bit for comments.
|
||||
|
||||
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.
|
||||
@ -281,6 +239,19 @@ Needs modification.
|
||||
|
||||
Patch for larger icons in installer. (#978) Still not good.
|
||||
|
||||
Patch to add tagfunc(). Cleaned up by Christian Brabandt, 2013 Jun 22.
|
||||
New update 2017 Apr 10, #1628
|
||||
https://github.com/chrisbra/vim-mq-patches/blob/master/tagfunc
|
||||
Updated by Andy Massimino, 2018 Feb 7:
|
||||
https://github.com/andymass/vim/commit/4e3aa0a5dab96d2799567622f3f537e357aa479e
|
||||
Or should we make it asynchronous?
|
||||
Patch by Andy Massimino: #4010 - needs more work, tests are missing, docs need
|
||||
updating, should probably return a string with extra info instad of dict
|
||||
entries.
|
||||
|
||||
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.
|
||||
|
||||
Some xterm responses are not properly handled: (Markus Gömmel, 2019 Apr 1)
|
||||
DCS 0 $ r Pt ST should be ignored.
|
||||
DCS 0 + r/Pt/ ST already ignored?
|
||||
@ -386,6 +357,10 @@ Does #2405 do this?
|
||||
Patch to add an interrupt() function: sets got_int. Useful in an autocommand
|
||||
such as BufWritePre that checks the file name or contents.
|
||||
|
||||
More patches to check:
|
||||
- #3797 add test for #3789
|
||||
- #4098 improve Travis config
|
||||
|
||||
Should make 'listchars' global-local. Local to window or to buffer?
|
||||
Probably window.
|
||||
Add something like 'fillchars' local to window, but allow for specifying a
|
||||
@ -3947,8 +3922,6 @@ Tab pages:
|
||||
8 Add local options for each tab page? E.g., 'diffopt' could differ between
|
||||
tab pages.
|
||||
7 Add local highlighting for each tab page?
|
||||
7 Add local directory for tab pages? How would this interfere with
|
||||
window-local directories?
|
||||
|
||||
|
||||
Spell checking:
|
||||
|
@ -1,4 +1,4 @@
|
||||
*usr_41.txt* For Vim version 8.1. Last change: 2019 Mar 29
|
||||
*usr_41.txt* For Vim version 8.1. Last change: 2019 Apr 06
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@ -775,6 +775,7 @@ System functions and manipulation of files:
|
||||
systemlist() get the result of a shell command as a list
|
||||
hostname() name of the system
|
||||
readfile() read a file into a List of lines
|
||||
readdir() get a List of file names in a directory
|
||||
writefile() write a List of lines or Blob into a file
|
||||
|
||||
Date and Time: *date-functions* *time-functions*
|
||||
|
@ -6,7 +6,7 @@ GenericName[de]=Texteditor
|
||||
GenericName[eo]=Tekstoredaktilo
|
||||
GenericName[fr]=Éditeur de texte
|
||||
GenericName[pl]=Edytor tekstu
|
||||
GenericName[is}=Ritvinnsluforrit
|
||||
GenericName[is]=Ritvinnsluforrit
|
||||
Comment=Edit text files
|
||||
Comment[af]=Redigeer tekslêers
|
||||
Comment[am]=የጽሑፍ ፋይሎች ያስተካክሉ
|
||||
|
@ -3,10 +3,17 @@
|
||||
" Maintainer: Christian Brabandt <cb@256bit.org>
|
||||
" Original Author: Nikolai Weibull <now@bitwi.se>
|
||||
" Previous Maintainer: Peter Aronoff <telemachus@arpinum.org>
|
||||
" Latest Revision: 2018-03-26
|
||||
" Latest Revision: 2019-03-25
|
||||
" License: Vim (see :h license)
|
||||
" Repository: https://github.com/chrisbra/vim-sh-indent
|
||||
" Changelog:
|
||||
" 20190325 - Indent fi; correctly
|
||||
" https://github.com/chrisbra/vim-sh-indent/issues/14
|
||||
" 20190319 - Indent arrays (only zsh and bash)
|
||||
" https://github.com/chrisbra/vim-sh-indent/issues/13
|
||||
" 20190316 - Make use of searchpairpos for nested if sections
|
||||
" fixes https://github.com/chrisbra/vim-sh-indent/issues/11
|
||||
" 20190201 - Better check for closing if sections
|
||||
" 20180724 - make check for zsh syntax more rigid (needs word-boundaries)
|
||||
" 20180326 - better support for line continuation
|
||||
" 20180325 - better detection of function definitions
|
||||
@ -59,6 +66,7 @@ function! s:indent_value(option)
|
||||
endfunction
|
||||
|
||||
function! GetShIndent()
|
||||
let curline = getline(v:lnum)
|
||||
let lnum = prevnonblank(v:lnum - 1)
|
||||
if lnum == 0
|
||||
return 0
|
||||
@ -72,7 +80,7 @@ function! GetShIndent()
|
||||
" Check contents of previous lines
|
||||
if line =~ '^\s*\%(if\|then\|do\|else\|elif\|case\|while\|until\|for\|select\|foreach\)\>' ||
|
||||
\ (&ft is# 'zsh' && line =~ '\<\%(if\|then\|do\|else\|elif\|case\|while\|until\|for\|select\|foreach\)\>')
|
||||
if line !~ '\<\%(fi\|esac\|done\|end\)\>\s*\%(#.*\)\=$'
|
||||
if !s:is_end_expression(line)
|
||||
let ind += s:indent_value('default')
|
||||
endif
|
||||
elseif s:is_case_label(line, pnum)
|
||||
@ -84,13 +92,22 @@ function! GetShIndent()
|
||||
if line !~ '}\s*\%(#.*\)\=$'
|
||||
let ind += s:indent_value('default')
|
||||
endif
|
||||
" array (only works for zsh or bash)
|
||||
elseif s:is_array(line) && line !~ ')\s*$' && (&ft is# 'zsh' || s:is_bash())
|
||||
let ind += s:indent_value('continuation-line')
|
||||
" end of array
|
||||
elseif curline =~ '^\s*)$'
|
||||
let ind -= s:indent_value('continuation-line')
|
||||
elseif s:is_continuation_line(line)
|
||||
if pnum == 0 || !s:is_continuation_line(pline)
|
||||
let ind += s:indent_value('continuation-line')
|
||||
endif
|
||||
elseif s:end_block(line) && !s:start_block(line)
|
||||
let ind -= s:indent_value('default')
|
||||
elseif pnum != 0 && s:is_continuation_line(pline) && !s:end_block(getline(v:lnum))
|
||||
elseif pnum != 0 &&
|
||||
\ s:is_continuation_line(pline) &&
|
||||
\ !s:end_block(curline) &&
|
||||
\ !s:is_end_expression(curline)
|
||||
" only add indent, if line and pline is in the same block
|
||||
let i = v:lnum
|
||||
let ind2 = indent(s:find_continued_lnum(pnum))
|
||||
@ -106,8 +123,15 @@ function! GetShIndent()
|
||||
|
||||
let pine = line
|
||||
" Check content of current line
|
||||
let line = getline(v:lnum)
|
||||
if line =~ '^\s*\%(then\|do\|else\|elif\|fi\|done\|end\)\>' || s:end_block(line)
|
||||
let line = curline
|
||||
" Current line is a endif line, so get indent from start of "if condition" line
|
||||
" TODO: should we do the same for other "end" lines?
|
||||
if curline =~ '^\s*\%(fi\);\?\s*\%(#.*\)\=$'
|
||||
let previous_line = searchpair('\<if\>', '', '\<fi\>', 'bnW')
|
||||
if previous_line > 0
|
||||
let ind = indent(previous_line)
|
||||
endif
|
||||
elseif line =~ '^\s*\%(then\|do\|else\|elif\|done\|end\)\>' || s:end_block(line)
|
||||
let ind -= s:indent_value('default')
|
||||
elseif line =~ '^\s*esac\>' && s:is_case_empty(getline(v:lnum - 1))
|
||||
let ind -= s:indent_value('default')
|
||||
@ -167,6 +191,10 @@ function! s:is_function_definition(line)
|
||||
\ a:line =~ '^\s*function\s*\w\S\+\s*\%(()\)\?\s*{'
|
||||
endfunction
|
||||
|
||||
function! s:is_array(line)
|
||||
return a:line =~ '^\s*\<\k\+\>=('
|
||||
endfunction
|
||||
|
||||
function! s:is_case_label(line, pnum)
|
||||
if a:line !~ '^\s*(\=.*)'
|
||||
return 0
|
||||
@ -210,8 +238,8 @@ endfunction
|
||||
|
||||
function! s:is_here_doc(line)
|
||||
if a:line =~ '^\w\+$'
|
||||
let here_pat = '<<-\?'. s:escape(a:line). '\$'
|
||||
return search(here_pat, 'bnW') > 0
|
||||
let here_pat = '<<-\?'. s:escape(a:line). '\$'
|
||||
return search(here_pat, 'bnW') > 0
|
||||
endif
|
||||
return 0
|
||||
endfunction
|
||||
@ -256,5 +284,13 @@ function! s:is_comment(line)
|
||||
return a:line =~ '^\s*#'
|
||||
endfunction
|
||||
|
||||
function! s:is_end_expression(line)
|
||||
return a:line =~ '\<\%(fi\|esac\|done\|end\)\>\s*\%(#.*\)\=$'
|
||||
endfunction
|
||||
|
||||
function! s:is_bash()
|
||||
return get(g:, 'is_bash', 0) || get(b:, 'is_bash', 0)
|
||||
endfunction
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
@ -3,8 +3,8 @@
|
||||
" Maintainer: Jorge Maldonado Ventura <jorgesumle@freakspot.net>
|
||||
" Previous Maintainer: Claudio Fleiner <claudio@fleiner.com>
|
||||
" Repository: https://notabug.org/jorgesumle/vim-html-syntax
|
||||
" Last Change: 2018 May 31
|
||||
" Included patch from Jay Sitter to add WAI-ARIA htmlArg keywords
|
||||
" Last Change: 2018 Apr 7
|
||||
" Included patch from Jorge Maldonado Ventura to fix rendering
|
||||
"
|
||||
|
||||
" Please check :help html.vim for some comments and a description of the options
|
||||
@ -159,47 +159,47 @@ if !exists("html_no_rendering")
|
||||
" rendering
|
||||
syn cluster htmlTop contains=@Spell,htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,htmlLink,javaScript,@htmlPreproc
|
||||
|
||||
syn region htmlStrike start="<del\>" end="</del>"me=e-6 contains=@htmlTop
|
||||
syn region htmlStrike start="<strike\>" end="</strike>"me=e-9 contains=@htmlTop
|
||||
syn region htmlStrike start="<del\>" end="</del\_s*>"me=s-1 contains=@htmlTop
|
||||
syn region htmlStrike start="<strike\>" end="</strike\_s*>"me=s-1 contains=@htmlTop
|
||||
|
||||
syn region htmlBold start="<b\>" end="</b>"me=e-4 contains=@htmlTop,htmlBoldUnderline,htmlBoldItalic
|
||||
syn region htmlBold start="<strong\>" end="</strong>"me=e-9 contains=@htmlTop,htmlBoldUnderline,htmlBoldItalic
|
||||
syn region htmlBoldUnderline contained start="<u\>" end="</u>"me=e-4 contains=@htmlTop,htmlBoldUnderlineItalic
|
||||
syn region htmlBoldItalic contained start="<i\>" end="</i>"me=e-4 contains=@htmlTop,htmlBoldItalicUnderline
|
||||
syn region htmlBoldItalic contained start="<em\>" end="</em>"me=e-5 contains=@htmlTop,htmlBoldItalicUnderline
|
||||
syn region htmlBoldUnderlineItalic contained start="<i\>" end="</i>"me=e-4 contains=@htmlTop
|
||||
syn region htmlBoldUnderlineItalic contained start="<em\>" end="</em>"me=e-5 contains=@htmlTop
|
||||
syn region htmlBoldItalicUnderline contained start="<u\>" end="</u>"me=e-4 contains=@htmlTop,htmlBoldUnderlineItalic
|
||||
syn region htmlBold start="<b\>" end="</b\_s*>"me=s-1 contains=@htmlTop,htmlBoldUnderline,htmlBoldItalic
|
||||
syn region htmlBold start="<strong\>" end="</strong\_s*>"me=s-1 contains=@htmlTop,htmlBoldUnderline,htmlBoldItalic
|
||||
syn region htmlBoldUnderline contained start="<u\>" end="</u\_s*>"me=s-1 contains=@htmlTop,htmlBoldUnderlineItalic
|
||||
syn region htmlBoldItalic contained start="<i\>" end="</i\_s*>"me=s-1 contains=@htmlTop,htmlBoldItalicUnderline
|
||||
syn region htmlBoldItalic contained start="<em\>" end="</em\_s*>"me=s-1 contains=@htmlTop,htmlBoldItalicUnderline
|
||||
syn region htmlBoldUnderlineItalic contained start="<i\>" end="</i\_s*>"me=s-1 contains=@htmlTop
|
||||
syn region htmlBoldUnderlineItalic contained start="<em\>" end="</em\_s*>"me=s-1 contains=@htmlTop
|
||||
syn region htmlBoldItalicUnderline contained start="<u\>" end="</u\_s*>"me=s-1 contains=@htmlTop,htmlBoldUnderlineItalic
|
||||
|
||||
syn region htmlUnderline start="<u\>" end="</u>"me=e-4 contains=@htmlTop,htmlUnderlineBold,htmlUnderlineItalic
|
||||
syn region htmlUnderlineBold contained start="<b\>" end="</b>"me=e-4 contains=@htmlTop,htmlUnderlineBoldItalic
|
||||
syn region htmlUnderlineBold contained start="<strong\>" end="</strong>"me=e-9 contains=@htmlTop,htmlUnderlineBoldItalic
|
||||
syn region htmlUnderlineItalic contained start="<i\>" end="</i>"me=e-4 contains=@htmlTop,htmlUnderlineItalicBold
|
||||
syn region htmlUnderlineItalic contained start="<em\>" end="</em>"me=e-5 contains=@htmlTop,htmlUnderlineItalicBold
|
||||
syn region htmlUnderlineItalicBold contained start="<b\>" end="</b>"me=e-4 contains=@htmlTop
|
||||
syn region htmlUnderlineItalicBold contained start="<strong\>" end="</strong>"me=e-9 contains=@htmlTop
|
||||
syn region htmlUnderlineBoldItalic contained start="<i\>" end="</i>"me=e-4 contains=@htmlTop
|
||||
syn region htmlUnderlineBoldItalic contained start="<em\>" end="</em>"me=e-5 contains=@htmlTop
|
||||
syn region htmlUnderline start="<u\>" end="</u\_s*>"me=s-1 contains=@htmlTop,htmlUnderlineBold,htmlUnderlineItalic
|
||||
syn region htmlUnderlineBold contained start="<b\>" end="</b\_s*>"me=s-1 contains=@htmlTop,htmlUnderlineBoldItalic
|
||||
syn region htmlUnderlineBold contained start="<strong\>" end="</strong\_s*>"me=s-1 contains=@htmlTop,htmlUnderlineBoldItalic
|
||||
syn region htmlUnderlineItalic contained start="<i\>" end="</i\_s*>"me=s-1 contains=@htmlTop,htmlUnderlineItalicBold
|
||||
syn region htmlUnderlineItalic contained start="<em\>" end="</em\_s*>"me=s-1 contains=@htmlTop,htmlUnderlineItalicBold
|
||||
syn region htmlUnderlineItalicBold contained start="<b\>" end="</b\_s*>"me=s-1 contains=@htmlTop
|
||||
syn region htmlUnderlineItalicBold contained start="<strong\>" end="</strong\_s*>"me=s-1 contains=@htmlTop
|
||||
syn region htmlUnderlineBoldItalic contained start="<i\>" end="</i\_s*>"me=s-1 contains=@htmlTop
|
||||
syn region htmlUnderlineBoldItalic contained start="<em\>" end="</em\_s*>"me=s-1 contains=@htmlTop
|
||||
|
||||
syn region htmlItalic start="<i\>" end="</i>"me=e-4 contains=@htmlTop,htmlItalicBold,htmlItalicUnderline
|
||||
syn region htmlItalic start="<em\>" end="</em>"me=e-5 contains=@htmlTop
|
||||
syn region htmlItalicBold contained start="<b\>" end="</b>"me=e-4 contains=@htmlTop,htmlItalicBoldUnderline
|
||||
syn region htmlItalicBold contained start="<strong\>" end="</strong>"me=e-9 contains=@htmlTop,htmlItalicBoldUnderline
|
||||
syn region htmlItalicBoldUnderline contained start="<u\>" end="</u>"me=e-4 contains=@htmlTop
|
||||
syn region htmlItalicUnderline contained start="<u\>" end="</u>"me=e-4 contains=@htmlTop,htmlItalicUnderlineBold
|
||||
syn region htmlItalicUnderlineBold contained start="<b\>" end="</b>"me=e-4 contains=@htmlTop
|
||||
syn region htmlItalicUnderlineBold contained start="<strong\>" end="</strong>"me=e-9 contains=@htmlTop
|
||||
syn region htmlItalic start="<i\>" end="</i\_s*>"me=s-1 contains=@htmlTop,htmlItalicBold,htmlItalicUnderline
|
||||
syn region htmlItalic start="<em\>" end="</em\_s*>"me=s-1 contains=@htmlTop
|
||||
syn region htmlItalicBold contained start="<b\>" end="</b\_s*>"me=s-1 contains=@htmlTop,htmlItalicBoldUnderline
|
||||
syn region htmlItalicBold contained start="<strong\>" end="</strong\_s*>"me=s-1 contains=@htmlTop,htmlItalicBoldUnderline
|
||||
syn region htmlItalicBoldUnderline contained start="<u\>" end="</u\_s*>"me=s-1 contains=@htmlTop
|
||||
syn region htmlItalicUnderline contained start="<u\>" end="</u\_s*>"me=s-1 contains=@htmlTop,htmlItalicUnderlineBold
|
||||
syn region htmlItalicUnderlineBold contained start="<b\>" end="</b\_s*>"me=s-1 contains=@htmlTop
|
||||
syn region htmlItalicUnderlineBold contained start="<strong\>" end="</strong\_s*>"me=s-1 contains=@htmlTop
|
||||
|
||||
syn match htmlLeadingSpace "^\s\+" contained
|
||||
syn region htmlLink start="<a\>\_[^>]*\<href\>" end="</a>"me=e-4 contains=@Spell,htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,htmlLeadingSpace,javaScript,@htmlPreproc
|
||||
syn region htmlH1 start="<h1\>" end="</h1>"me=e-5 contains=@htmlTop
|
||||
syn region htmlH2 start="<h2\>" end="</h2>"me=e-5 contains=@htmlTop
|
||||
syn region htmlH3 start="<h3\>" end="</h3>"me=e-5 contains=@htmlTop
|
||||
syn region htmlH4 start="<h4\>" end="</h4>"me=e-5 contains=@htmlTop
|
||||
syn region htmlH5 start="<h5\>" end="</h5>"me=e-5 contains=@htmlTop
|
||||
syn region htmlH6 start="<h6\>" end="</h6>"me=e-5 contains=@htmlTop
|
||||
syn region htmlHead start="<head\>" end="</head>"me=e-7 end="<body\>"me=e-5 end="<h[1-6]\>"me=e-3 contains=htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,htmlLink,htmlTitle,javaScript,cssStyle,@htmlPreproc
|
||||
syn region htmlTitle start="<title\>" end="</title>"me=e-8 contains=htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,javaScript,@htmlPreproc
|
||||
syn region htmlLink start="<a\>\_[^>]*\<href\>" end="</a\_s*>"me=s-1 contains=@Spell,htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,htmlLeadingSpace,javaScript,@htmlPreproc
|
||||
syn region htmlH1 start="<h1\>" end="</h1\_s*>"me=s-1 contains=@htmlTop
|
||||
syn region htmlH2 start="<h2\>" end="</h2\_s*>"me=s-1 contains=@htmlTop
|
||||
syn region htmlH3 start="<h3\>" end="</h3\_s*>"me=s-1 contains=@htmlTop
|
||||
syn region htmlH4 start="<h4\>" end="</h4\_s*>"me=s-1 contains=@htmlTop
|
||||
syn region htmlH5 start="<h5\>" end="</h5\_s*>"me=s-1 contains=@htmlTop
|
||||
syn region htmlH6 start="<h6\>" end="</h6\_s*>"me=s-1 contains=@htmlTop
|
||||
syn region htmlHead start="<head\>" end="</head\_s*>"me=s-1 end="<body\>"me=s-1 end="<h[1-6]\>"me=s-1 contains=htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,htmlLink,htmlTitle,javaScript,cssStyle,@htmlPreproc
|
||||
syn region htmlTitle start="<title\>" end="</title\_s*>"me=s-1 contains=htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,javaScript,@htmlPreproc
|
||||
endif
|
||||
|
||||
syn keyword htmlTagName contained noscript
|
||||
|
Reference in New Issue
Block a user